46#if defined(__linux__) || defined(__APPLE__)
76#if defined(__linux__) || defined(__APPLE__)
83 virtual bool Init(
const char *libName)
noexcept
87#if defined(__linux__) || defined(__APPLE__)
88 handle = dlopen(libName, RTLD_NOW);
90 if (handle ==
nullptr)
92 const char *dlsym_error = dlerror();
93 if (!mute && dlsym_error)
94 std::cerr <<
"Library: Unable to load library, error: " << dlsym_error << std::endl;
99 handle = LoadLibraryA(libName);
100 if (handle ==
nullptr)
102 const DWORD error = GetLastError();
104 std::cerr <<
"Library: Unable to load library, error code: " << error << std::endl;
114#if defined(__linux__) || defined(__APPLE__)
115 return dlsym(handle, funcName);
117 return GetProcAddress(handle, funcName);
137#if defined(__linux__) || defined(__APPLE__)
138 void *handle =
nullptr;
140 HINSTANCE handle =
nullptr;
void * GetFunction(const char *funcName) noexcept
const void * GetHandle() const noexcept
Library(const Library &)=delete
void SetMute(bool m) noexcept
virtual bool Init(const char *libName) noexcept
Library(Library &&)=delete
Library & operator=(Library &&)=delete
Library & operator=(const Library &)=delete
bool IsMuted() const noexcept
Portable dense contraction kernels.