48 typedef void destroy_bs(
Backend *bck);
52 m_lib = dlopen(
"./libBS2CYPRESS.so", RTLD_LAZY);
56 "Error loading ./libBS2CYPRESS.so: " + std::string(dlerror()));
58 "Installed bs lib will be used before " 59 "subproject executable");
60 m_lib = dlopen(
"libBS2CYPRESS.so",
64 "Error loading libBS2CYPRESS.so: " +
65 std::string(dlerror()));
66 m_lib = dlopen(BS_LIBRARY_PATH,
69 throw std::runtime_error(
70 "Error loading BrainScaleS backend: " +
71 std::string(dlerror()) +
72 "\nMake sure that you are running on a BrainScaleS " 74 "bs2cypress lib is available either in this folder or " 75 "in LD_LIBRARY_PATH!");
81 ~
BS_Lib() { dlclose(m_lib); }
110 create_bs *mkr = (create_bs *)dlsym(m_lib,
"make_brainscales_backend");
static BS_Lib & instance()
Creates a Singleton instance. Only at first time calling this method the library will be loaded...
Definition: brainscales_lib.hpp:93
Singleton class for runtime loading of the BrainScaleS Backend, which wraps all BrainScaleS libraries...
Definition: brainscales_lib.hpp:45
Definition: backend.hpp:50
nlohmann::json Json
Definition: json.hpp:27
Backend * create_bs_backend(Json &setup)
Creates a pointer to a BrainScaleS Backend. This can be executed several times, as it only creates a ...
Definition: brainscales_lib.hpp:108
void debug(const std::string &module, const std::string &message)
Definition: brainscales_lib.hpp:39
void operator=(BS_Lib const &)=delete