Skip to content

Commit

Permalink
Merge pull request #48 from krasznaa/MoreWarningFixes-main-20220204
Browse files Browse the repository at this point in the history
More MSVC Fixes, main branch (2022.02.04.)
  • Loading branch information
krasznaa authored Feb 11, 2022
2 parents e82eda3 + 50a184c commit 9d0d6d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion math/cmath/include/algebra/math/impl/cmath_getter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ struct vector_getter {
ALGEBRA_HOST_DEVICE inline result_type operator()(
const matrix_type<ROWS, COLS> &m, std::size_t row, std::size_t col) {

result_type subvector;
result_type subvector{};
for (std::size_t irow = row; irow < row + SIZE; ++irow) {
subvector[irow - row] = m[col][irow];
}
Expand Down
5 changes: 5 additions & 0 deletions tests/common/test_host_basics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ TYPED_TEST_P(test_host_basics, transform3) {
auto m44 = trf2.matrix();
typename TypeParam::transform3 trfm(m44);

// Make sure that algebra::getter:vector can be called.
(void)algebra::getter::vector<3>(m44, 0, 0);
(void)algebra::getter::vector<3>(m44, 0, 1);
(void)algebra::getter::vector<3>(m44, 0, 2);

// Re-evaluate rot and trn
auto rotm = trfm.rotation();
ASSERT_NEAR(element_getter(rotm, 0, 0), x[0], this->m_epsilon);
Expand Down

0 comments on commit 9d0d6d0

Please sign in to comment.