Skip to content

Commit

Permalink
tidy up code
Browse files Browse the repository at this point in the history
  • Loading branch information
multiphaseCFD committed Sep 24, 2024
1 parent 6239ffe commit 87d898d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 21 deletions.
4 changes: 0 additions & 4 deletions pennylane_lightning/core/src/bindings/Bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ PYBIND11_MODULE(
// Register bindings for general info:
registerInfo(m);

registerUtils(m);

// Register bindings for backend-specific info:
registerBackendSpecificInfo(m);

Expand All @@ -84,8 +82,6 @@ PYBIND11_MODULE(
pybind11::options options;
options.disable_function_signatures();

registerUtils(m);

// Register bindings for backend-specific info:
registerBackendSpecificInfo(m);

Expand Down
15 changes: 0 additions & 15 deletions pennylane_lightning/core/src/bindings/Bindings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,21 +302,6 @@ void registerInfo(py::module_ &m) {
m.def("runtime_info", &getRuntimeInfo, "Runtime information.");
}

/**
* @brief Register bindings for Lightning utils.
*
* @param m Pybind11 module.
*/
void registerUtils(py::module_ &m) {
py::class_<BLASLibLoaderManager>(m, "BLASLibLoader")
.def_static(
"getInstance",
[](const std::string &param) {
return &BLASLibLoaderManager::getInstance(param);
},
py::return_value_policy::reference_internal);
}

/**
* @brief Register observable classes.
*
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/core/src/utils/SharedLibLoader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SharedLibLoader final {
explicit SharedLibLoader(const std::string &filename) {
const std::lock_guard<std::mutex> lock(mtx_);
handle_ = PL_DLOPEN(filename.c_str(), RTLD_LAZY);
// PL_ABORT_IF(!handle_, PL_DLERROR());
PL_ABORT_IF(!handle_, PL_DLERROR());
}

~SharedLibLoader() noexcept {
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/core/src/utils/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ set(TEST_SOURCES Test_BitUtil.cpp
Test_RuntimeInfo.cpp
Test_TypeTraits.cpp
Test_Util.cpp
Test_UtilLinearAlg.cpp
)

list(APPEND TEST_SOURCES Test_UtilLinearAlg.cpp)

add_executable(utils_test_runner ${TEST_SOURCES})
target_link_libraries(utils_test_runner PRIVATE utils_tests)
Expand Down

0 comments on commit 87d898d

Please sign in to comment.