diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 285d5f55..35dc1e6f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -102,8 +102,6 @@ jobs: test-stdBLAS: runs-on: ubuntu-latest - container: - image: amklinv/mdspan-dependencies:latest needs: build-stdblas steps: diff --git a/examples/01_scale.cpp b/examples/01_scale.cpp index aefd190a..e38f0f2b 100644 --- a/examples/01_scale.cpp +++ b/examples/01_scale.cpp @@ -1,3 +1,9 @@ +// Examples currently use parentheses (e.g., A(i,j)) +// for the array access operator, +// instead of square brackets (e.g., A[i,j]). +// This must be defined before including any mdspan headers. +#define MDSPAN_USE_PAREN_OPERATOR 1 + #include #include @@ -10,10 +16,14 @@ # include #endif -// Make mdspan less verbose using std::experimental::mdspan; using std::experimental::extents; -using std::experimental::dynamic_extent; +#if defined(__cpp_lib_span) +#include + using std::dynamic_extent; +#else + using std::experimental::dynamic_extent; +#endif int main(int argc, char* argv[]) { std::cout << "Scale" << std::endl; @@ -23,7 +33,10 @@ int main(int argc, char* argv[]) { std::vector x_vec(N); // Create and initialize mdspan - // With CTAD working we could do, GCC 11.1 works but some others are buggy + // + // With CTAD working we could do the following. + // GCC 11.1 works but some other compilers are buggy. + // // mdspan x(x_vec.data(), N); mdspan> x(x_vec.data(),N); for(int i=0; i #include @@ -10,10 +16,14 @@ # include #endif -// Make mdspan less verbose using std::experimental::mdspan; using std::experimental::extents; -using std::experimental::dynamic_extent; +#if defined(__cpp_lib_span) +#include + using std::dynamic_extent; +#else + using std::experimental::dynamic_extent; +#endif int main(int argc, char* argv[]) { std::cout << "Matrix Vector Product Basic" << std::endl; diff --git a/examples/03_matrix_vector_product_mixedprec.cpp b/examples/03_matrix_vector_product_mixedprec.cpp index 94c6db06..2b1388f4 100644 --- a/examples/03_matrix_vector_product_mixedprec.cpp +++ b/examples/03_matrix_vector_product_mixedprec.cpp @@ -1,13 +1,23 @@ +// Examples currently use parentheses (e.g., A(i,j)) +// for the array access operator, +// instead of square brackets (e.g., A[i,j]). +// This must be defined before including any mdspan headers. +#define MDSPAN_USE_PAREN_OPERATOR 1 + #include #include -// Make mdspan less verbose -using std::experimental::mdspan; +#if defined(__cpp_lib_span) +#include + using std::dynamic_extent; +#else + using std::experimental::dynamic_extent; +#endif using std::experimental::extents; -using std::experimental::dynamic_extent; +using std::full_extent; // not in experimental namespace +using std::experimental::mdspan; using std::experimental::submdspan; -using std::experimental::full_extent; int main(int argc, char* argv[]) { std::cout << "Matrix Vector Product MixedPrec" << std::endl; @@ -44,4 +54,3 @@ int main(int argc, char* argv[]) { for(int i=0; i -#include #include #include namespace { - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::mdspan; using std::experimental::linalg::add; TEST(BLAS1_add, vector_double) diff --git a/tests/native/conjugate_transposed.cpp b/tests/native/conjugate_transposed.cpp index 41edac6a..ccf775f2 100644 --- a/tests/native/conjugate_transposed.cpp +++ b/tests/native/conjugate_transposed.cpp @@ -1,14 +1,8 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include -#include -#include namespace { - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::mdspan; using std::experimental::linalg::conjugate_transposed; TEST(conjugate_transposed, mdspan_complex_double) diff --git a/tests/native/conjugated.cpp b/tests/native/conjugated.cpp index 3362d2c6..daaf4bf2 100644 --- a/tests/native/conjugated.cpp +++ b/tests/native/conjugated.cpp @@ -1,15 +1,8 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include -#include -#include namespace { - using std::experimental::dextents; - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::mdspan; using std::experimental::linalg::conjugated; template diff --git a/tests/native/copy.cpp b/tests/native/copy.cpp index 0bfe1023..1e50951d 100644 --- a/tests/native/copy.cpp +++ b/tests/native/copy.cpp @@ -1,14 +1,8 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include -#include -#include namespace { - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::mdspan; using std::experimental::linalg::copy; template diff --git a/tests/native/dot.cpp b/tests/native/dot.cpp index f5773589..19d8936e 100644 --- a/tests/native/dot.cpp +++ b/tests/native/dot.cpp @@ -1,8 +1,6 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include -#include // FIXME (mfh 2022/06/17) Temporarily disable calling the BLAS, // to get PR testing workflow running with mdspan tag. @@ -22,9 +20,6 @@ double ddot_wrapper (const int N, const double* DX, #endif // 0 namespace { - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::mdspan; using std::experimental::linalg::dot; using std::experimental::linalg::dotc; diff --git a/tests/native/gemm.cpp b/tests/native/gemm.cpp index e88d7267..9c8c6117 100644 --- a/tests/native/gemm.cpp +++ b/tests/native/gemm.cpp @@ -1,20 +1,14 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include -#include #include namespace { - using std::experimental::mdspan; - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::layout_left; using std::experimental::linalg::explicit_diagonal; using std::experimental::linalg::implicit_unit_diagonal; using std::experimental::linalg::lower_triangle; using std::experimental::linalg::matrix_product; - using std::experimental::linalg::scaled; + using std::experimental::linalg::scaled; using std::experimental::linalg::transposed; using std::experimental::linalg::upper_triangle; using std::cout; diff --git a/tests/native/gemv.cpp b/tests/native/gemv.cpp index b126ae4f..2fd6d9b6 100644 --- a/tests/native/gemv.cpp +++ b/tests/native/gemv.cpp @@ -1,15 +1,9 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include -#include #include namespace { - using std::experimental::mdspan; - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::layout_left; using std::experimental::linalg::matrix_vector_product; using std::experimental::linalg::transposed; using std::cout; diff --git a/tests/native/gemv_no_ambig.cpp b/tests/native/gemv_no_ambig.cpp index 17c3a21c..db3d98e4 100644 --- a/tests/native/gemv_no_ambig.cpp +++ b/tests/native/gemv_no_ambig.cpp @@ -1,8 +1,6 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include -#include #include #if (! defined(__GNUC__)) || (__GNUC__ > 9) @@ -14,9 +12,6 @@ namespace { -using std::experimental::mdspan; -using std::experimental::extents; -using std::experimental::dynamic_extent; using std::experimental::linalg::matrix_vector_product; using std::experimental::linalg::scaled; diff --git a/tests/native/givens.cpp b/tests/native/givens.cpp index 8a2c57e4..8519faa9 100644 --- a/tests/native/givens.cpp +++ b/tests/native/givens.cpp @@ -1,14 +1,9 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include #include -#include namespace { - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::mdspan; using std::experimental::linalg::givens_rotation_setup; using std::experimental::linalg::givens_rotation_apply; diff --git a/tests/native/gtest_fixtures.hpp b/tests/native/gtest_fixtures.hpp index 04f1a039..aeb010af 100644 --- a/tests/native/gtest_fixtures.hpp +++ b/tests/native/gtest_fixtures.hpp @@ -45,13 +45,32 @@ #include "gtest/gtest.h" +// Tests currently use parentheses (e.g., A(i,j)) +// for the array access operator, +// instead of square brackets (e.g., A[i,j]). +// This must be defined before including any mdspan headers. +#define MDSPAN_USE_PAREN_OPERATOR 1 + #include #include #include + using std::experimental::default_accessor; + using std::dextents; // not in experimental namespace +#if defined(__cpp_lib_span) +#include + using std::dynamic_extent; +#else using std::experimental::dynamic_extent; +#endif using std::experimental::extents; + using std::full_extent; // not in experimental namespace + using std::experimental::layout_left; + using std::experimental::layout_right; + using std::experimental::layout_stride; using std::experimental::mdspan; + using std::experimental::submdspan; + using dbl_vector_t = mdspan>; using cpx_vector_t = mdspan, extents>; constexpr ptrdiff_t NROWS(10); @@ -64,8 +83,8 @@ storage(10), v(storage.data(), 10) { - v(0) = 0.5; - v(1) = 0.2; + v(0) = 0.5; + v(1) = 0.2; v(2) = 0.1; v(3) = 0.4; v(4) = 0.8; @@ -75,7 +94,7 @@ v(8) = 0.2; v(9) = 0.9; } - + std::vector storage; dbl_vector_t v; }; // end class unsigned_double_vector @@ -88,8 +107,8 @@ storage(10), v(storage.data(), 10) { - v(0) = 0.5; - v(1) = 0.2; + v(0) = 0.5; + v(1) = 0.2; v(2) = 0.1; v(3) = 0.4; v(4) = -0.8; @@ -99,7 +118,7 @@ v(8) = 0.2; v(9) = -0.9; } - + std::vector storage; dbl_vector_t v; }; // end class signed_double_vector @@ -119,7 +138,7 @@ v(3) = std::complex(-0.3, 0.5); v(4) = std::complex( 0.2, -0.9); } - + std::vector> storage; cpx_vector_t v; }; // end class signed_double_vector diff --git a/tests/native/hemm.cpp b/tests/native/hemm.cpp index e493aa3b..3b52f835 100644 --- a/tests/native/hemm.cpp +++ b/tests/native/hemm.cpp @@ -1,16 +1,9 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include -#include #include -#include namespace { - using std::experimental::mdspan; - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::layout_left; using std::experimental::linalg::explicit_diagonal; using std::experimental::linalg::implicit_unit_diagonal; using std::experimental::linalg::lower_triangle; @@ -52,7 +45,7 @@ namespace { A(2,0) = 4.4 + 2.2i; A(2,1) = -2.8 - 4.0i; A(2,2) = -1.2; - + // Fill B B(0,0) = 1.3; B(0,1) = 2.5; @@ -75,8 +68,8 @@ namespace { constexpr double TOL = 1e-9; for (ptrdiff_t j = 0; j < n; ++j) { for (ptrdiff_t i = 0; i < m; ++i) { - EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) - << "Matrices differ at index (" + EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) + << "Matrices differ at index (" << i << "," << j << ")\n"; } } @@ -108,7 +101,7 @@ namespace { A(0,2) = 4.4 - 2.2i; A(1,2) = -2.8 + 4.0i; A(2,2) = -1.2; - + // Fill B B(0,0) = 1.3; B(0,1) = 2.5; @@ -131,8 +124,8 @@ namespace { constexpr double TOL = 1e-9; for (ptrdiff_t j = 0; j < n; ++j) { for (ptrdiff_t i = 0; i < m; ++i) { - EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) - << "Matrices differ at index (" + EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) + << "Matrices differ at index (" << i << "," << j << ")\n"; } } @@ -164,7 +157,7 @@ namespace { A(2,0) = 4.4 + 2.2i; A(2,1) = -2.8 - 4.0i; A(2,2) = -1.2; - + // Fill B B(0,0) = 1.3; B(1,0) = 2.5; @@ -187,8 +180,8 @@ namespace { constexpr double TOL = 1e-9; for (ptrdiff_t j = 0; j < m; ++j) { for (ptrdiff_t i = 0; i < n; ++i) { - EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) - << "Matrices differ at index (" + EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) + << "Matrices differ at index (" << i << "," << j << ")\n"; } } @@ -220,7 +213,7 @@ namespace { A(0,2) = 4.4 - 2.2i; A(1,2) = -2.8 + 4.0i; A(2,2) = -1.2; - + // Fill B B(0,0) = 1.3; B(1,0) = 2.5; @@ -243,8 +236,8 @@ namespace { constexpr double TOL = 1e-9; for (ptrdiff_t j = 0; j < m; ++j) { for (ptrdiff_t i = 0; i < n; ++i) { - EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) - << "Matrices differ at index (" + EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) + << "Matrices differ at index (" << i << "," << j << ")\n"; } } diff --git a/tests/native/idx_abs_max.cpp b/tests/native/idx_abs_max.cpp index d17148d5..d84040dd 100644 --- a/tests/native/idx_abs_max.cpp +++ b/tests/native/idx_abs_max.cpp @@ -1,9 +1,6 @@ -#include "gtest/gtest.h" -#include "gtest_fixtures.hpp" +#include "./gtest_fixtures.hpp" #include -#include -#include namespace { @@ -11,32 +8,33 @@ namespace { TEST_F(unsigned_double_vector, idx_abs_max) { - EXPECT_EQ(9, idx_abs_max(v)); + constexpr size_t expected(9); + EXPECT_EQ(expected, idx_abs_max(v)); } TEST_F(signed_double_vector, idx_abs_max) { - EXPECT_EQ(9, idx_abs_max(v)); + constexpr size_t expected(9); + EXPECT_EQ(expected, idx_abs_max(v)); } TEST_F(signed_complex_vector, idx_abs_max) { - EXPECT_EQ(2, idx_abs_max(v)); + constexpr size_t expected(2); + EXPECT_EQ(expected, idx_abs_max(v)); } TEST(BLAS1_idx_abs_max, trivial_case) { - namespace stdexp = std::experimental; - constexpr auto expected = std::numeric_limits::max(); std::array arr; - using extents_type = stdexp::extents; - stdexp::mdspan a(arr.data(),0); + using extents_type = extents; + mdspan a(arr.data(),0); EXPECT_EQ(expected, idx_abs_max(a)); - using extents_type2 = stdexp::extents; - stdexp::mdspan b(arr.data()); + using extents_type2 = extents; + mdspan b(arr.data()); EXPECT_EQ(expected, idx_abs_max(b)); } diff --git a/tests/native/iterator.cpp b/tests/native/iterator.cpp index 75bac785..024f53b7 100644 --- a/tests/native/iterator.cpp +++ b/tests/native/iterator.cpp @@ -1,24 +1,13 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include #include #include #include #include #include -#include namespace { - using std::experimental::full_extent; - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::layout_left; - using std::experimental::layout_right; - using std::experimental::layout_stride; // does compile - using std::experimental::mdspan; - using std::experimental::submdspan; - MDSPAN_TEMPLATE_REQUIRES( class ElementType, class Extents, diff --git a/tests/native/matrix_inf_norm.cpp b/tests/native/matrix_inf_norm.cpp index 48e58c38..4b8bf52d 100644 --- a/tests/native/matrix_inf_norm.cpp +++ b/tests/native/matrix_inf_norm.cpp @@ -1,10 +1,8 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include #include #include -#include namespace { using std::experimental::linalg::matrix_inf_norm; @@ -12,13 +10,13 @@ namespace { using std::endl; template - using basic_matrix_t = std::experimental::mdspan< + using basic_matrix_t = mdspan< ElementType, - std::experimental::extents, + extents, Layout, - std::experimental::default_accessor>; + default_accessor>; template struct Magnitude { @@ -63,7 +61,6 @@ namespace { { using std::abs; using scalar_t = Scalar; - using std::experimental::layout_left; using matrix_t = basic_matrix_t; constexpr size_t maxNumRows = 7; diff --git a/tests/native/matrix_one_norm.cpp b/tests/native/matrix_one_norm.cpp index 65b8bc1a..e731bad9 100644 --- a/tests/native/matrix_one_norm.cpp +++ b/tests/native/matrix_one_norm.cpp @@ -1,28 +1,23 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include #include #include -#include namespace { - //using std::experimental::mdspan; - //using std::experimental::dynamic_extent; - //using std::experimental::extents; using std::experimental::linalg::matrix_one_norm; using std::cout; using std::endl; template - using basic_matrix_t = std::experimental::mdspan< + using basic_matrix_t = mdspan< ElementType, - std::experimental::extents< + extents< std::size_t, - std::experimental::dynamic_extent, - std::experimental::dynamic_extent>, + dynamic_extent, + dynamic_extent>, Layout, - std::experimental::default_accessor>; + default_accessor>; template struct Magnitude { @@ -67,7 +62,6 @@ namespace { { using std::abs; using scalar_t = Scalar; - using std::experimental::layout_left; using matrix_t = basic_matrix_t; constexpr size_t maxNumRows = 7; diff --git a/tests/native/norm2.cpp b/tests/native/norm2.cpp index 7294773e..662bed6d 100644 --- a/tests/native/norm2.cpp +++ b/tests/native/norm2.cpp @@ -1,9 +1,7 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include #include -#include // FIXME (mfh 2022/06/17) Temporarily disable calling the BLAS, // to get PR testing workflow running with mdspan tag. @@ -21,9 +19,6 @@ double dnrm2_wrapper(const int N, const double* X, const int INCX) #endif // 0 namespace { - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::mdspan; using std::experimental::linalg::vector_norm2; TEST(BLAS1_norm2, mdspan_zero) diff --git a/tests/native/scale.cpp b/tests/native/scale.cpp index 0b3af6b4..6b957f76 100644 --- a/tests/native/scale.cpp +++ b/tests/native/scale.cpp @@ -1,13 +1,8 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include -#include namespace { - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::mdspan; using std::experimental::linalg::scale; TEST(BLAS1_scale, mdspan_double) diff --git a/tests/native/scaled.cpp b/tests/native/scaled.cpp index 9f554226..479befb9 100644 --- a/tests/native/scaled.cpp +++ b/tests/native/scaled.cpp @@ -1,21 +1,15 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include #include -#include namespace { - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::mdspan; using std::experimental::linalg::scaled; template void test_accessor_scaled_element_constification() { using std::experimental::linalg::accessor_scaled; - using std::experimental::default_accessor; using std::experimental::linalg::scaled_scalar; using nc_def_acc_type = default_accessor; diff --git a/tests/native/swap.cpp b/tests/native/swap.cpp index bc9e7ebc..4860b329 100644 --- a/tests/native/swap.cpp +++ b/tests/native/swap.cpp @@ -1,13 +1,8 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include -#include namespace { - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::mdspan; using std::experimental::linalg::swap_elements; TEST(BLAS1_swap, mdspan_double) diff --git a/tests/native/symm.cpp b/tests/native/symm.cpp index 45bd9384..863c744a 100644 --- a/tests/native/symm.cpp +++ b/tests/native/symm.cpp @@ -1,16 +1,9 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include -#include #include -#include namespace { - using std::experimental::mdspan; - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::layout_left; using std::experimental::linalg::explicit_diagonal; using std::experimental::linalg::implicit_unit_diagonal; using std::experimental::linalg::lower_triangle; @@ -52,7 +45,7 @@ namespace { A(2,0) = 4.4 + 2.2i; A(2,1) = -2.8 - 4.0i; A(2,2) = -1.2 + 1.7i; - + // Fill B B(0,0) = 1.3; B(0,1) = 2.5; @@ -75,8 +68,8 @@ namespace { constexpr double TOL = 1e-9; for (ptrdiff_t j = 0; j < n; ++j) { for (ptrdiff_t i = 0; i < m; ++i) { - EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) - << "Matrices differ at index (" + EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) + << "Matrices differ at index (" << i << "," << j << ")\n"; } } @@ -108,7 +101,7 @@ namespace { A(0,2) = 4.4 + 2.2i; A(1,2) = -2.8 - 4.0i; A(2,2) = -1.2 + 1.7i; - + // Fill B B(0,0) = 1.3; B(0,1) = 2.5; @@ -131,8 +124,8 @@ namespace { constexpr double TOL = 1e-9; for (ptrdiff_t j = 0; j < n; ++j) { for (ptrdiff_t i = 0; i < m; ++i) { - EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) - << "Matrices differ at index (" + EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) + << "Matrices differ at index (" << i << "," << j << ")\n"; } } @@ -164,7 +157,7 @@ namespace { A(2,0) = 4.4 + 2.2i; A(2,1) = -2.8 - 4.0i; A(2,2) = -1.2 + 1.7i; - + // Fill B B(0,0) = 1.3; B(1,0) = 2.5; @@ -187,8 +180,8 @@ namespace { constexpr double TOL = 1e-9; for (ptrdiff_t j = 0; j < m; ++j) { for (ptrdiff_t i = 0; i < n; ++i) { - EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) - << "Matrices differ at index (" + EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) + << "Matrices differ at index (" << i << "," << j << ")\n"; } } @@ -220,7 +213,7 @@ namespace { A(0,2) = 4.4 + 2.2i; A(1,2) = -2.8 - 4.0i; A(2,2) = -1.2 + 1.7i; - + // Fill B B(0,0) = 1.3; B(1,0) = 2.5; @@ -243,8 +236,8 @@ namespace { constexpr double TOL = 1e-9; for (ptrdiff_t j = 0; j < m; ++j) { for (ptrdiff_t i = 0; i < n; ++i) { - EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) - << "Matrices differ at index (" + EXPECT_COMPLEX_NEAR(gs(i,j), C(i,j), TOL) + << "Matrices differ at index (" << i << "," << j << ")\n"; } } diff --git a/tests/native/transposed.cpp b/tests/native/transposed.cpp index 24ed4d56..2182a9d6 100644 --- a/tests/native/transposed.cpp +++ b/tests/native/transposed.cpp @@ -1,14 +1,9 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include #include -#include namespace { - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::mdspan; using std::experimental::linalg::transposed; template diff --git a/tests/native/trmm.cpp b/tests/native/trmm.cpp index 70185745..43d7871e 100644 --- a/tests/native/trmm.cpp +++ b/tests/native/trmm.cpp @@ -1,9 +1,7 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include #include -#include namespace { using std::experimental::linalg::explicit_diagonal; @@ -12,11 +10,6 @@ namespace { using std::experimental::linalg::matrix_product; using std::experimental::linalg::transposed; using std::experimental::linalg::upper_triangle; - using std::experimental::dextents; - using std::experimental::dynamic_extent; - using std::experimental::extents; - using std::experimental::layout_left; - using std::experimental::mdspan; using std::cout; using std::endl; diff --git a/tests/native/trsm.cpp b/tests/native/trsm.cpp index 101c2752..b628994e 100644 --- a/tests/native/trsm.cpp +++ b/tests/native/trsm.cpp @@ -1,18 +1,9 @@ -#include "gtest/gtest.h" +#include "./gtest_fixtures.hpp" #include -#include -#include #include namespace { - - using std::experimental::mdspan; - using std::experimental::dynamic_extent; - using std::experimental::dextents; - using std::experimental::layout_right; - using std::experimental::layout_left; - constexpr std::size_t num_rows_A = 3; constexpr std::size_t num_cols_A = 3; constexpr double storage_A[] =