Skip to content

Commit

Permalink
adding test kernel to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aghaeifar committed Dec 25, 2024
1 parent b8125a9 commit 91eac0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ jobs:

- name: test config creation
run: ${{github.workspace}}/spinwalk_test --run_test=test_config_creation

- name: test kernel
run: ${{github.workspace}}/spinwalk_test --run_test=test_kernel
3 changes: 3 additions & 0 deletions tests/test_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "../src/sim/kernels.cuh"

BOOST_AUTO_TEST_SUITE(test_kernel)

BOOST_AUTO_TEST_CASE(test_sub2ind_3d_row_major) {
int64_t x = 1, y = 2, z = 3;
Expand Down Expand Up @@ -78,3 +79,5 @@ BOOST_AUTO_TEST_CASE(test_relax) {
BOOST_TEST(std::abs(m1[1] - m0[1] * e2) < 1e-5);
BOOST_TEST(std::abs(m1[2] - (1.0f + e1 * (m0[2] - 1.0f))) < 1e-5);
}

BOOST_AUTO_TEST_SUITE_END()

0 comments on commit 91eac0c

Please sign in to comment.