Skip to content

Commit

Permalink
Small changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
breyerml committed Nov 7, 2023
1 parent ac1ebee commit 32d6332
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bindings/Python/backends/sycl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void init_sycl(py::module_ &m, const py::exception<plssvm::exception> &base_exce
.value("AUTOMATIC", plssvm::sycl::kernel_invocation_type::automatic, "use the best kernel invocation type for the current SYCL implementation and target hardware platform")
.value("ND_RANGE", plssvm::sycl::kernel_invocation_type::nd_range, "use the nd_range kernel invocation type");

// initialize SYCL binding classes
// initialize SYCL binding classes
#if defined(PLSSVM_SYCL_BACKEND_HAS_HIPSYCL)
const py::module_ hipsycl_module = init_hipsycl_csvm(m, base_exception);
#endif
Expand Down
27 changes: 13 additions & 14 deletions bindings/Python/data_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
#include "plssvm/constants.hpp" // plssvm::real_type
#include "plssvm/detail/type_list.hpp" // plssvm::detail::label_type_list

#include "utility.hpp" // check_kwargs_for_correctness, assemble_unique_class_name,
// pyarray_to_vector, pyarray_to_string_vector, pylist_to_string_vector, pyarray_to_matrix
#include "utility.hpp" // check_kwargs_for_correctness, assemble_unique_class_name,
// pyarray_to_vector, pyarray_to_string_vector, pylist_to_string_vector, pyarray_to_matrix

#include "fmt/core.h" // fmt::format
#include "fmt/format.h" // fmt::join
#include "pybind11/numpy.h" // py::array_t
#include "pybind11/pybind11.h" // py::module_, py::class_, py::init, py::return_value_policy, py::arg, py::kwargs, py::value_error, py::pos_only, py::list
#include "pybind11/stl.h" // support for STL types
#include "fmt/core.h" // fmt::format
#include "fmt/format.h" // fmt::join
#include "pybind11/numpy.h" // py::array_t
#include "pybind11/pybind11.h" // py::module_, py::class_, py::init, py::return_value_policy, py::arg, py::kwargs, py::value_error, py::pos_only, py::list
#include "pybind11/stl.h" // support for STL types

#include <array> // std::array
#include <cstddef> // std::size_t
#include <string> // std::string
#include <tuple> // std::tuple_element_t, std::tuple_size_v
#include <type_traits> // std::is_same_v
#include <utility> // std::move, std::integer_sequence, std::make_integer_sequence
#include <array> // std::array
#include <cstddef> // std::size_t
#include <string> // std::string
#include <tuple> // std::tuple_element_t, std::tuple_size_v
#include <type_traits> // std::is_same_v
#include <utility> // std::move, std::integer_sequence, std::make_integer_sequence

namespace py = pybind11;

Expand Down Expand Up @@ -176,7 +176,6 @@ void instantiate_data_set_bindings(py::module_ &m, label_type) {
.def("save", py::overload_cast<const std::string &>(&data_set_type::save, py::const_), "save the data set to a file automatically deriving the file format type from the file extension")
.def("num_data_points", &data_set_type::num_data_points, "the number of data points in the data set")
.def("num_features", &data_set_type::num_features, "the number of features per data point")
.def("data", &data_set_type::data, py::return_value_policy::reference_internal, "the data saved as 2D vector")
.def(
"data", [](const data_set_type &data) {
return matrix_to_pyarray(data.data());
Expand Down
2 changes: 1 addition & 1 deletion bindings/Python/detail/performance_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void init_performance_tracker([[maybe_unused]] py::module_ &m) {

// use a detail.PerformanceTracker submodule for the performance tracking bindings
py::module_ detail_module = m.def_submodule("detail", "a module containing detail functionality for the performance tracker");
py::module_ performance_tracker_module = detail_module.def_submodule("PerformanceTracker", "whatever");
py::module_ performance_tracker_module = detail_module.def_submodule("PerformanceTracker");

// bind the performance tracker functions
performance_tracker_module
Expand Down

0 comments on commit 32d6332

Please sign in to comment.