Skip to content

Commit

Permalink
Merge branch 'dot-double-test' into 'master'
Browse files Browse the repository at this point in the history
add dot double test

See merge request correaa/boost-multi!1011
  • Loading branch information
correaa committed Apr 19, 2024
2 parents 534763f + 577a7b2 commit c0ba771
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/multi/adaptors/blas/test/dot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ BOOST_AUTO_TEST_CASE(blas_dot_context) {
BOOST_TEST( res2 == std::inner_product(begin(x), end(x), begin(y), 0.0F) );
}

BOOST_AUTO_TEST_CASE(blas_dot_no_context_double) {
multi::array<double, 1> const x = {1.0, 2.0, 3.0}; // NOLINT(readability-identifier-length) BLAS naming
multi::array<double, 1> const y = {1.0, 2.0, 3.0}; // NOLINT(readability-identifier-length) BLAS naming
auto res = +blas::dot(x, y);
BOOST_TEST( res == std::inner_product(begin(x), end(x), begin(y), 0.0) );
}

BOOST_AUTO_TEST_CASE(blas_dot_no_context) {
multi::array<float, 1> const x = {1.0F, 2.0F, 3.0F}; // NOLINT(readability-identifier-length) BLAS naming
multi::array<float, 1> const y = {1.0F, 2.0F, 3.0F}; // NOLINT(readability-identifier-length) BLAS naming
Expand Down

0 comments on commit c0ba771

Please sign in to comment.