13 #include "../../ie_api.h"
14 #include "../ie_exception.hpp"
22 class SharedObjectLoader {
24 void *shared_object =
nullptr;
32 explicit SharedObjectLoader(
const char* pluginName) {
33 shared_object = dlopen(pluginName, RTLD_LAZY);
35 if (shared_object ==
nullptr)
38 ~SharedObjectLoader() noexcept(false) {
39 if (0 != dlclose(shared_object)) {
50 void *get_symbol(
const char* symbolName)
const {
51 void * procAddr =
nullptr;
53 procAddr = dlsym(shared_object, symbolName);
54 if (procAddr ==
nullptr)
55 THROW_IE_EXCEPTION <<
"dlSym cannot locate method '" << symbolName <<
"': " << dlerror();
#define THROW_IE_EXCEPTION
A macro used to throw the exception with a notable description.
Definition: ie_exception.hpp:22
Definition: ie_argmax_layer.hpp:11