Skip to content

Commit

Permalink
Test.
Browse files Browse the repository at this point in the history
  • Loading branch information
breyerml committed Feb 16, 2025
1 parent bbfc833 commit 00071f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/plssvm/matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,12 @@ matrix<T, layout_>::matrix(const matrix<T, other_layout_> &other) :
// same layout -> simply memcpy underlying array
std::memcpy(this->data(), other.data(), this->size_padded() * sizeof(value_type));
} else {
const auto num_row = static_cast<ssize_type>(this->num_rows());
const auto num_cols = static_cast<ssize_type>(this->num_cols());
const std::size_t num_row = this->num_rows();
const std::size_t num_cols = this->num_cols();
// convert AoS -> SoA or SoA -> AoS
#pragma omp parallel for collapse(2)
for (ssize_type row = 0; row < num_row; ++row) {
for (ssize_type col = 0; col < num_cols; ++col) {
for (size_type row = 0; row < num_row; ++row) {
for (size_type col = 0; col < num_cols; ++col) {
(*this)(row, col) = other(row, col);
}
}
Expand Down
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ target_include_directories(${PLSSVM_BASE_TEST_LIBRARY_NAME} PUBLIC "${CMAKE_CURR
target_compile_definitions(${PLSSVM_BASE_TEST_LIBRARY_NAME} PUBLIC PLSSVM_TEST_PATH="${CMAKE_CURRENT_LIST_DIR}")
target_compile_definitions(${PLSSVM_BASE_TEST_LIBRARY_NAME} PUBLIC PLSSVM_CLASSIFICATION_TEST_FILE="${PLSSVM_CLASSIFICATION_TEST_FILE}")
target_compile_definitions(${PLSSVM_BASE_TEST_LIBRARY_NAME} PUBLIC PLSSVM_REGRESSION_TEST_FILE="${PLSSVM_REGRESSION_TEST_FILE}")
target_compile_definitions(${PLSSVM_BASE_TEST_LIBRARY_NAME} PUBLIC GTEST_API_="")

# link against plssvm library
target_link_libraries(${PLSSVM_BASE_TEST_LIBRARY_NAME} PUBLIC ${PLSSVM_ALL_LIBRARY_NAME})
Expand Down

0 comments on commit 00071f9

Please sign in to comment.