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 82 of file OMKernelExecutionBuilder.h.

Constructor & Destructor Documentation

◆ KernelCustomExecuteRegistry()

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

Definition at line 85 of file OMKernelExecutionBuilder.h.

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

Member Function Documentation

◆ getKernelExecuteFunc()

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

Definition at line 96 of file OMKernelExecutionBuilder.h.

97 {
98 auto builder_id_opcode = size_t(builderID);
99 if (builder_id_opcode >= size_t(core::OMBuilderID::Size))
100 {
101 *execute_func = nullptr;
102 return UnknownError;
103 }
104 const auto builder_id_offset = size_t(core::OMBuilderID::BuiltinOperatorsSize);
105 builder_id_opcode -= builder_id_offset - 1;
106
107 *execute_func = _operator_execute[builder_id_opcode];
108 return Ok;
109 }

References onert_micro::core::BuiltinOperatorsSize, onert_micro::Ok, 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: