Skip to content

Commit

Permalink
Fixed compile errors when building for CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
ddement committed Sep 25, 2024
1 parent 1f52662 commit 6ba5a14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions tests/unit_tests/model/test_copy_nodes_to_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ TEST(CopyNodesToState, OneNode_Position) {
constexpr auto q_exact = std::array{8., 9., 10., 11., 12., 13., 14.};
constexpr auto v_exact = std::array<double, 6>{};
constexpr auto vd_exact = std::array<double, 6>{};
auto nodes = std::vector{std::make_shared<Node>(size_t{}, x0_exact, q_exact, v_exact, vd_exact)};
auto nodes =
std::vector{std::make_shared<Node>(size_t{1234U}, x0_exact, q_exact, v_exact, vd_exact)};

CopyNodesToState(state, nodes);

Expand Down Expand Up @@ -57,7 +58,8 @@ TEST(CopyNodesToState, OneNode_Velocity) {
constexpr auto q_exact = std::array<double, 7>{};
constexpr auto v_exact = std::array{15., 16., 17., 18., 19., 20.};
constexpr auto vd_exact = std::array{21., 22., 23., 24., 25., 26.};
auto nodes = std::vector{std::make_shared<Node>(size_t{}, x0_exact, q_exact, v_exact, vd_exact)};
auto nodes =
std::vector{std::make_shared<Node>(size_t{1234U}, x0_exact, q_exact, v_exact, vd_exact)};

CopyNodesToState(state, nodes);

Expand Down
6 changes: 5 additions & 1 deletion tests/unit_tests/regression/test_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ TEST(QuaternionTest, RotationVectorToQuaternion_Set2) {
TestRotationToQuaternion(phi, {0.707107, 0., 0., 0.707107});
}

TEST(QuaternionTest, QuaternionToRotationVector_1) {
void test_quaternion_to_rotation_vector_2() {
const auto n = 100U;
const auto dtheta = M_PI / static_cast<double>(n);
for (size_t i = 0; i < n; ++i) {
Expand All @@ -223,6 +223,10 @@ TEST(QuaternionTest, QuaternionToRotationVector_1) {
}
}

TEST(QuaternionTest, QuaternionToRotationVector_1) {
test_quaternion_to_rotation_vector_2();
}

TEST(QuaternionTest, QuaternionToRotationVector_2) {
const auto n = 100U;
const auto dtheta = M_PI / static_cast<double>(n);
Expand Down

0 comments on commit 6ba5a14

Please sign in to comment.