ONE - On-device Neural Engine
|
Class to manage loading and unloading of dynamic library containing implementation of IQuantizer interface. More...
#include <QuantizerLoader.h>
Public Types | |
using | dlhandle_destroy_t = std::function< void(void *)> |
Typedef for function pointer to destroy loaded library handle. | |
using | factory_t = IQuantizer *(*)() |
Typedef for function pointer to create instance of IQuantizer. | |
using | quantizer_destory_t = void(*)(IQuantizer *) |
Typedef for function pointer to destroy instance of IQuantizer. | |
Public Member Functions | |
int32_t | loadLibrary () |
Load dynamic library containing implementation of IQuantizer. | |
int32_t | unloadLibrary () |
Unload dynamic library containing implementation of IQuantizer. | |
IQuantizer * | get () const |
Get instance of IQuantizer created through factory method. | |
Static Public Member Functions | |
static QuantizerLoader & | instance () |
Get singleton instance of QuantizerLoader. | |
Class to manage loading and unloading of dynamic library containing implementation of IQuantizer interface.
Definition at line 34 of file QuantizerLoader.h.
using onert::odc::QuantizerLoader::dlhandle_destroy_t = std::function<void(void *)> |
Typedef for function pointer to destroy loaded library handle.
Definition at line 40 of file QuantizerLoader.h.
using onert::odc::QuantizerLoader::factory_t = IQuantizer *(*)() |
Typedef for function pointer to create instance of IQuantizer.
Definition at line 44 of file QuantizerLoader.h.
using onert::odc::QuantizerLoader::quantizer_destory_t = void (*)(IQuantizer *) |
Typedef for function pointer to destroy instance of IQuantizer.
Definition at line 48 of file QuantizerLoader.h.
|
inline |
Get instance of IQuantizer created through factory method.
Definition at line 78 of file QuantizerLoader.h.
Referenced by loadLibrary(), and unloadLibrary().
|
static |
Get singleton instance of QuantizerLoader.
Definition at line 35 of file QuantizerLoader.cc.
Referenced by onert::odc::QuantizeManager::deleteMinMaxFile(), onert::odc::QuantizeManager::quantize(), onert::odc::QuantizeManager::readyForQuantize(), and onert::odc::QuantizeManager::setMinMaxRecordsThreshold().
int32_t onert::odc::QuantizerLoader::loadLibrary | ( | ) |
Load dynamic library containing implementation of IQuantizer.
Definition at line 41 of file QuantizerLoader.cc.
References get().
int32_t onert::odc::QuantizerLoader::unloadLibrary | ( | ) |
Unload dynamic library containing implementation of IQuantizer.
Definition at line 92 of file QuantizerLoader.cc.
References get().