ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert_micro::execute::KernelCustomExecuteRegistry Class Reference

#include <OMKernelExecutionBuilder.h>

Public Member Functions

constexpr KernelCustomExecuteRegistry ()
 
OMStatus getKernelExecuteFunc (core::OMBuilderID builderID, KernelExecuteFunc **execute_func) const
 

Detailed Description

Definition at line 83 of file OMKernelExecutionBuilder.h.

Constructor & Destructor Documentation

◆ KernelCustomExecuteRegistry()

constexpr onert_micro::execute::KernelCustomExecuteRegistry::KernelCustomExecuteRegistry ( )
inlineconstexpr

Definition at line 86 of file OMKernelExecutionBuilder.h.

86 : _operator_execute()
87 {
88#define REGISTER_CUSTOM_KERNEL(name, string_name) \
89 registerKernelExecute(core::OMBuilderID::CUSTOM_##name, execute_kernel_Circle##name);
90
91#include "CustomKernelsToBuild.lst"
92
93#undef REGISTER_CUSTOM_KERNEL
94 }

Member Function Documentation

◆ getKernelExecuteFunc()

OMStatus onert_micro::execute::KernelCustomExecuteRegistry::getKernelExecuteFunc ( core::OMBuilderID  builderID,
KernelExecuteFunc **  execute_func 
) const
inline

Definition at line 97 of file OMKernelExecutionBuilder.h.

98 {
99 auto builder_id_opcode = size_t(builderID);
100 if (builder_id_opcode >= size_t(core::OMBuilderID::Size))
101 {
102 *execute_func = nullptr;
103 OM_LOG_AND_RETURN(UnknownError, "Unknown error encountered");
104 }
105 const auto builder_id_offset = size_t(core::OMBuilderID::BuiltinOperatorsSize);
106 builder_id_opcode -= builder_id_offset - 1;
107
108 *execute_func = _operator_execute[builder_id_opcode];
109 return Ok;
110 }
#define OM_LOG_AND_RETURN(err, msg)
Definition OMLog.h:31

References onert_micro::core::BuiltinOperatorsSize, onert_micro::Ok, OM_LOG_AND_RETURN, onert_micro::core::Size, and onert_micro::UnknownError.

Referenced by onert_micro::execute::OMKernelExecute::runForward().


The documentation for this class was generated from the following file: