ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert_micro::optimize::OptimizePassRegistry Class Reference

#include <OMOptimizePassesBuilder.h>

Public Member Functions

constexpr OptimizePassRegistry ()
 
OMStatus getOptimizeFunc (uint32_t idx, OptimizePassFunc **optimize_func) const
 
constexpr uint32_t getPassNumber () const
 

Detailed Description

Definition at line 48 of file OMOptimizePassesBuilder.h.

Constructor & Destructor Documentation

◆ OptimizePassRegistry()

constexpr onert_micro::optimize::OptimizePassRegistry::OptimizePassRegistry ( )
inlineconstexpr

Definition at line 51 of file OMOptimizePassesBuilder.h.

51 : _optimize_passes()
52 {
53#define REGISTER_PASS(name) \
54 registerOptimizePasses(optimize::OMPassBuilderID::PASS_##name, onert_micro_##name);
55
56#include "BuildPass.lst"
57
58#undef REGISTER_PASS
59 }

Member Function Documentation

◆ getOptimizeFunc()

OMStatus onert_micro::optimize::OptimizePassRegistry::getOptimizeFunc ( uint32_t  idx,
OptimizePassFunc **  optimize_func 
) const
inline

Definition at line 61 of file OMOptimizePassesBuilder.h.

62 {
63 assert(idx < size_t(optimize::OMPassBuilderID::Size));
64 if (idx >= size_t(optimize::OMPassBuilderID::Size))
65 {
66 *optimize_func = nullptr;
67 return UnknownError;
68 }
69 *optimize_func = _optimize_passes[idx];
70 return Ok;
71 }

References onert_micro::Ok, onert_micro::optimize::Size, and onert_micro::UnknownError.

Referenced by onert_micro::optimize::OMOptimizer::optimize().

◆ getPassNumber()

constexpr uint32_t onert_micro::optimize::OptimizePassRegistry::getPassNumber ( ) const
inlineconstexpr

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