ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert_micro::import::KernelCustomConfigureRegistry Class Reference

#include <OMKernelConfigureBuilder.h>

Public Member Functions

constexpr KernelCustomConfigureRegistry ()
 
OMStatus getKernelConfigureFunc (core::OMBuilderID builderID, KernelConfigureFunc **configure_func) const
 

Detailed Description

Definition at line 85 of file OMKernelConfigureBuilder.h.

Constructor & Destructor Documentation

◆ KernelCustomConfigureRegistry()

constexpr onert_micro::import::KernelCustomConfigureRegistry::KernelCustomConfigureRegistry ( )
inlineconstexpr

Definition at line 88 of file OMKernelConfigureBuilder.h.

88 : _operator_configure()
89 {
90#define REGISTER_CUSTOM_KERNEL(name, string_name) \
91 registerKernelConfigure(core::OMBuilderID::CUSTOM_##name, configure_kernel_Circle##name);
92
93#include "CustomKernelsToBuild.lst"
94
95#undef REGISTER_CUSTOM_KERNEL
96 }

Member Function Documentation

◆ getKernelConfigureFunc()

OMStatus onert_micro::import::KernelCustomConfigureRegistry::getKernelConfigureFunc ( core::OMBuilderID  builderID,
KernelConfigureFunc **  configure_func 
) const
inline

Definition at line 99 of file OMKernelConfigureBuilder.h.

101 {
102 auto builder_id_opcode = size_t(builderID);
103 if (builder_id_opcode >= size_t(core::OMBuilderID::Size))
104 {
105 *configure_func = nullptr;
106 return UnknownError;
107 }
108 const auto builder_id_offset = size_t(core::OMBuilderID::BuiltinOperatorsSize);
109 builder_id_opcode -= builder_id_offset - 1;
110
111 *configure_func = _operator_configure[builder_id_opcode];
112 return Ok;
113 }

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

Referenced by onert_micro::import::OMKernelConfiguration::configureKernels().


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