Skip to content

Commit d3075bd

Browse files
committed
Update formatting via the clang-format and cmake-format targets.
1 parent 642342b commit d3075bd

File tree

17 files changed

+82
-64
lines changed

17 files changed

+82
-64
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ else ()
327327
"Can't find Python3. Please manually specify PLSSVM_TARGET_PLATFORMS (e.g. -DPLSSVM_TARGET_PLATFORMS=\"cpu;nvidia:sm_70,sm_86;amd:gfx906;intel:skl\"!"
328328
)
329329
endif ()
330-
330+
331331
# run our `plssvm_target_platforms.py` script to determine the PLSSVM_TARGET_PLATFORMS string
332332
execute_process(
333333
COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/utility_scripts/plssvm_target_platforms.py" "--quiet"

bindings/Python/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ target_compile_options(${PLSSVM_BASE_LIBRARY_NAME} PUBLIC -fPIC)
122122
# append pybind11 bindings library to installed targets
123123
append_local_and_parent(PLSSVM_TARGETS_TO_INSTALL ${PLSSVM_PYTHON_BINDINGS_LIBRARY_NAME})
124124

125-
# install the __init__.py file so Python recognizes the package when installed via pip
126-
# install the __cli__.py file so the PLSSVM executables can be used when installed via pip
127-
# install the __install_check__.py file creating a new executable plssvm-install-check outputting some information when installed via pip
125+
# install necessary Python files to make pip install plssvm work correctly:
126+
#
127+
# - __init__.py: PLSSVM is correctly recognized as Python package
128+
# - __cli__.py: PLSSVM's executables are correctly usable
129+
# - __install_check__.py: custom script outputting some PLSSVM build information
128130
include(GNUInstallDirs)
129-
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py"
130-
"${CMAKE_CURRENT_SOURCE_DIR}/__cli__.py"
131-
"${CMAKE_CURRENT_SOURCE_DIR}/__install_check__.py"
131+
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py" "${CMAKE_CURRENT_SOURCE_DIR}/__cli__.py" "${CMAKE_CURRENT_SOURCE_DIR}/__install_check__.py"
132132
DESTINATION "${CMAKE_INSTALL_LIBDIR}"
133133
)

cmake/utility_macros.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ macro (check_test_file_validity FILE_NAME)
4040
message(STATUS "Skipped test file generation since it already exists (${FILE_NAME})!")
4141
endif ()
4242
endif ()
43-
endmacro ()
43+
endmacro ()

include/plssvm/backends/stdpar/csvm.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class csvc : public ::plssvm::csvc,
140140
*/
141141
explicit csvc(const parameter params) :
142142
::plssvm::csvm{ params },
143-
::plssvm::stdpar::csvm{ } { }
143+
::plssvm::stdpar::csvm{} { }
144144

145145
/**
146146
* @brief Construct a new C-SVC using the stdpar backend on the @p target platform with the parameters given through @p params.
@@ -160,7 +160,7 @@ class csvc : public ::plssvm::csvc,
160160
template <typename... Args, PLSSVM_REQUIRES(::plssvm::detail::has_only_parameter_named_args_v<Args...>)>
161161
explicit csvc(Args &&...named_args) :
162162
::plssvm::csvm{ std::forward<Args>(named_args)... },
163-
::plssvm::stdpar::csvm{ } { }
163+
::plssvm::stdpar::csvm{} { }
164164

165165
/**
166166
* @brief Construct a new C-SVC using the stdpar backend on the @p target platform and the optionally provided @p named_args.
@@ -188,7 +188,7 @@ class csvr : public ::plssvm::csvr,
188188
*/
189189
explicit csvr(const parameter params) :
190190
::plssvm::csvm{ params },
191-
::plssvm::stdpar::csvm{ } { }
191+
::plssvm::stdpar::csvm{} { }
192192

193193
/**
194194
* @brief Construct a new C-SVR using the stdpar backend on the @p target platform with the parameters given through @p params.
@@ -208,7 +208,7 @@ class csvr : public ::plssvm::csvr,
208208
template <typename... Args, PLSSVM_REQUIRES(::plssvm::detail::has_only_parameter_named_args_v<Args...>)>
209209
explicit csvr(Args &&...named_args) :
210210
::plssvm::csvm{ std::forward<Args>(named_args)... },
211-
::plssvm::stdpar::csvm{ } { }
211+
::plssvm::stdpar::csvm{} { }
212212

213213
/**
214214
* @brief Construct a new C-SVR using the stdpar backend on the @p target platform and the optionally provided @p named_args.
@@ -219,7 +219,7 @@ class csvr : public ::plssvm::csvr,
219219
template <typename... Args, PLSSVM_REQUIRES(::plssvm::detail::has_only_parameter_named_args_v<Args...>)>
220220
explicit csvr(const target_platform target, Args &&...named_args) :
221221
::plssvm::csvm{ std::forward<Args>(named_args)... },
222-
::plssvm::stdpar::csvm{ target} { }
222+
::plssvm::stdpar::csvm{ target } { }
223223
};
224224

225225
} // namespace stdpar

include/plssvm/detail/cmd/data_set_variants.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
#include "plssvm/constants.hpp" // plssvm::real_type
1717
#include "plssvm/data_set/classification_data_set.hpp" // plssvm::classification_data_set
18-
#include "plssvm/data_set/min_max_scaler.hpp" // plssvm::min_max_scaler
1918
#include "plssvm/data_set/data_set.hpp" // plssvm::data_set
19+
#include "plssvm/data_set/min_max_scaler.hpp" // plssvm::min_max_scaler
2020
#include "plssvm/data_set/regression_data_set.hpp" // plssvm::regression_data_set
2121
#include "plssvm/detail/cmd/parser_predict.hpp" // plssvm::detail::cmd::parser_predict
2222
#include "plssvm/detail/cmd/parser_scale.hpp" // plssvm::detail::cmd::parser_scale

include/plssvm/detail/io/arff_parsing.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ template <typename label_type>
113113
// a numeric field must also contain a name
114114
const std::string_view name = check_for_valid_name(line, "@ATTRIBUTE", "NUMERIC");
115115
// the attribute name "CLASS" is reserved!
116-
if (detail::as_upper_case(name) != "CLASS") {// add a feature to the running count
116+
if (detail::as_upper_case(name) != "CLASS") { // add a feature to the running count
117117
++num_features;
118118
// increment class index as long as no class labels have been read
119119
if (!has_label) {

include/plssvm/model/regression_model.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ class regression_model : public model<U> {
6565
// Make the protected member variables visible in the derived class.
6666
using base_model::alpha_ptr_;
6767
using base_model::data_;
68-
using base_model::num_support_vectors_;
6968
using base_model::num_features_;
69+
using base_model::num_support_vectors_;
7070
using base_model::params_;
7171
using base_model::rho_ptr_;
7272

include/plssvm/parameter.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ constexpr bool has_only_kokkos_parameter_named_args_v = !igor::has_other_than<Ar
9393
template <typename... Args>
9494
constexpr bool has_only_kokkos_named_args_v = !igor::has_other_than<Args...>(plssvm::kokkos_execution_space);
9595

96-
9796
} // namespace detail
9897

9998
/**

include/plssvm/svm/csvc.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ namespace plssvm {
6161
class csvc : virtual public csvm {
6262
// befriend svc dummy struct used in the plssvm.SVC Python bindings
6363
friend struct ::svc;
64+
6465
public:
6566
/// The type of the model returned by a call to the `fit` function and used in the `predict` and `score` functions.
6667
template <typename T>

src/plssvm/detail/io/file_reader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ void file_reader::open_memory_mapped_file_unix([[maybe_unused]] const char *file
298298
// open the file
299299
file_descriptor_ = ::open(filename, O_RDONLY);
300300

301-
struct stat attr { };
301+
struct stat attr{};
302302

303303
// check if file could be opened
304304
if (fstat(file_descriptor_, &attr) == -1) {

0 commit comments

Comments
 (0)