ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert_micro::core::utils Namespace Reference

Functions

OMStatus checkCondition (bool cond)
 
template<typename T >
const T * castInputData (uint8_t *tensor_data)
 
template<typename T >
T * castOutputData (uint8_t *tensor_data)
 

Function Documentation

◆ castInputData()

template<typename T >
const T * onert_micro::core::utils::castInputData ( uint8_t *  tensor_data)

Definition at line 36 of file OMUtils.h.

37{
38 return tensor_data != nullptr ? reinterpret_cast<const T *>(tensor_data) : nullptr;
39}

◆ castOutputData()

template<typename T >
T * onert_micro::core::utils::castOutputData ( uint8_t *  tensor_data)

Definition at line 41 of file OMUtils.h.

42{
43 return tensor_data != nullptr ? reinterpret_cast<T *>(tensor_data) : nullptr;
44}

◆ checkCondition()

OMStatus onert_micro::core::utils::checkCondition ( bool  cond)

Definition at line 22 of file OMUtils.cpp.

23{
24 if (cond)
25 return Ok;
26
27 assert(cond && "check condition failed");
28
30}
@ FailedCheckCondition
Definition OMStatus.h:32

References onert_micro::FailedCheckCondition, and onert_micro::Ok.