Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added language standard parallelism to dot product #251

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ if(LINALG_ENABLE_KOKKOS)
find_package(KokkosKernels REQUIRED)
endif()

find_package(TBB)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More recent versions of GCC (for instance) shouldn't require TBB for std::execution::par to work. Furthermore, nvc++ comes with its own, non-TBB implementation of std::execution::par. Would you consider gating this on compiler version, instead of requiring a third-party library? That could even be done in the code -- the code would just need to test the appropriate compiler version to ensure that the C++ algorithms are available (see https://en.cppreference.com/w/cpp/compiler_support/17 and search for "Parallel algorithms and execution policies").

option(LINALG_ENABLE_TBB
"Enable Threaded Building Blocks for tests. Default: autodetect TBB installation."
${TBB_FOUND}
)
if(LINALG_ENABLE_TBB)
find_package(TBB REQUIRED)
endif()

################################################################################

CONFIGURE_FILE(include/experimental/__p1673_bits/linalg_config.h.in
Expand All @@ -152,6 +161,10 @@ if(LINALG_ENABLE_KOKKOS)
)
endif()

if(LINALG_ENABLE_TBB)
target_link_libraries(linalg INTERFACE TBB::tbb)
endif()

target_include_directories(linalg INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
Expand Down
2 changes: 1 addition & 1 deletion examples/01_scale.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// Make mdspan less verbose
using std::experimental::mdspan;
using std::experimental::extents;
using std::experimental::dynamic_extent;
using std::dynamic_extent;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change suggests that CI doesn't actually build the examples. Should we consider fixing that?

This change might actually need to depend on the C++ version, as std::dynamic_extent entered the Standard in C++20 with span. We'll have to revisit the examples anyway, because of the recent change to use macros to specify the namespaces. (The macros let users control them, so that they can but don't need to go into std.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI builds the examples; I just wasn't building them on my PC.

I was unaware of the macros change. Can you give me an example?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MDSPAN_IMPL_STANDARD_NAMESPACE and MDSPAN_IMPL_PROPOSED_NAMESPACE are the two macros. They can be defined by users, but they also get default definitions, e.g., here in include/experimental/mdspan. The library assumes that MDSPAN_IMPL_PROPOSED_NAMESPACE is nested inside MDSPAN_IMPL_STANDARD_NAMESPACE.

Using these macros might require updating the version of the reference mdspan implementation that github's CI pulls in.


int main(int argc, char* argv[]) {
std::cout << "Scale" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion examples/02_matrix_vector_product_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// Make mdspan less verbose
using std::experimental::mdspan;
using std::experimental::extents;
using std::experimental::dynamic_extent;
using std::dynamic_extent;

int main(int argc, char* argv[]) {
std::cout << "Matrix Vector Product Basic" << std::endl;
Expand Down
4 changes: 2 additions & 2 deletions examples/03_matrix_vector_product_mixedprec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// Make mdspan less verbose
using std::experimental::mdspan;
using std::experimental::extents;
using std::experimental::dynamic_extent;
using std::dynamic_extent;
using std::experimental::submdspan;
using std::experimental::full_extent;
using std::full_extent;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see above comment on std::full_extent; thanks!


int main(int argc, char* argv[]) {
std::cout << "Matrix Vector Product MixedPrec" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion examples/kokkos-based/add_kokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int main(int argc, char* argv[])
value_type* y_ptr = y_view.data();
value_type* z_ptr = z_view.data();

using dyn_1d_ext_type = std::experimental::extents<std::experimental::dynamic_extent>;
using dyn_1d_ext_type = std::experimental::extents<std::dynamic_extent>;
using mdspan_type = std::experimental::mdspan<value_type, dyn_1d_ext_type>;
mdspan_type x(x_ptr,N);
mdspan_type y(y_ptr,N);
Expand Down
2 changes: 1 addition & 1 deletion examples/kokkos-based/dot_kokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ int main(int argc, char* argv[])
value_type* a_ptr = a_view.data();
value_type* b_ptr = b_view.data();

using dyn_1d_ext_type = std::experimental::extents<std::experimental::dynamic_extent>;
using dyn_1d_ext_type = std::experimental::extents<std::dynamic_extent>;
using mdspan_type = std::experimental::mdspan<value_type, dyn_1d_ext_type>;
mdspan_type a(a_ptr,N);
mdspan_type b(b_ptr,N);
Expand Down
2 changes: 1 addition & 1 deletion examples/kokkos-based/dotc_kokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ int main(int argc, char* argv[])
value_type* a_ptr = a_view.data();
value_type* b_ptr = b_view.data();

using dyn_1d_ext_type = std::experimental::extents<std::experimental::dynamic_extent>;
using dyn_1d_ext_type = std::experimental::extents<std::dynamic_extent>;
using mdspan_type = std::experimental::mdspan<value_type, dyn_1d_ext_type>;
mdspan_type a(a_ptr,N);
mdspan_type b(b_ptr,N);
Expand Down
2 changes: 1 addition & 1 deletion examples/kokkos-based/scale_kokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ int main(int argc, char* argv[])

// Requires CTAD working, GCC 11.1 works but some others are buggy
// std::experimental::mdspan a(a_ptr,N);
std::experimental::mdspan<double,std::experimental::extents<std::experimental::dynamic_extent>> a(a_ptr,N);
std::experimental::mdspan<double,std::experimental::extents<std::dynamic_extent>> a(a_ptr,N);
for(std::size_t i=0; i<a.extent(0); i++) a(i) = i;

// This forwards to KokkosKernels (https://github.com/kokkos/kokkos-kernels
Expand Down
2 changes: 1 addition & 1 deletion examples/kokkos-based/vector_abs_sum_kokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int main(int argc, char* argv[])
Kokkos::View<value_type*> x_view("x",N);
value_type* x_ptr = x_view.data();

using dyn_1d_ext_type = std::experimental::extents<std::experimental::dynamic_extent>;
using dyn_1d_ext_type = std::experimental::extents<std::dynamic_extent>;
using mdspan_type = std::experimental::mdspan<value_type, dyn_1d_ext_type>;
mdspan_type x(x_ptr,N);
for(std::size_t i=0; i<x.extent(0); i++){
Expand Down
2 changes: 1 addition & 1 deletion examples/kokkos-based/vector_norm2_kokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int main(int argc, char* argv[])
Kokkos::View<value_type*> x_view("x",N);
value_type* x_ptr = x_view.data();

using dyn_1d_ext_type = std::experimental::extents<std::experimental::dynamic_extent>;
using dyn_1d_ext_type = std::experimental::extents<std::dynamic_extent>;
using mdspan_type = std::experimental::mdspan<value_type, dyn_1d_ext_type>;
mdspan_type x(x_ptr,N);
for(std::size_t i=0; i<x.extent(0); i++){
Expand Down
2 changes: 1 addition & 1 deletion examples/kokkos-based/vector_sum_of_squares_kokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int main(int argc, char* argv[])
Kokkos::View<value_type*> x_view("x",N);
value_type* x_ptr = x_view.data();

using dyn_1d_ext_type = std::experimental::extents<std::experimental::dynamic_extent>;
using dyn_1d_ext_type = std::experimental::extents<std::dynamic_extent>;
using mdspan_type = std::experimental::mdspan<value_type, dyn_1d_ext_type>;
mdspan_type x(x_ptr,N);
for(std::size_t i=0; i<x.extent(0); i++){
Expand Down
21 changes: 15 additions & 6 deletions include/experimental/__p1673_bits/blas1_dot.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#ifndef LINALG_INCLUDE_EXPERIMENTAL___P1673_BITS_BLAS1_DOT_HPP_
#define LINALG_INCLUDE_EXPERIMENTAL___P1673_BITS_BLAS1_DOT_HPP_

#include <ranges>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<ranges> is a C++20 include. Would you consider protecting both the include and the use of iota_view below with the appropriate feature test macro, and providing a fall-back implementation? It's OK if the fall-back is not parallel.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Can you point me to an example of using a feature test macro?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! This web page gives a good summary.

// Ensure that the feature test macro __cpp_lib_ranges is available;
// <version> also defines this macro, but that is a C++20 header.
#include <algorithm>

#if defined(__cpp_lib_ranges)
#  include <ranges>
#endif

void some_function() {
#if defined(__cpp_lib_ranges_iota)
  // ... code using views::iota ...
#else
  // ... fall-back code ...
#endif
}

The point of using two different macros -- one for the header, and one for the specific feature iota::view -- is that the feature came after the header, so some compiler versions may have the header but not the feature.

#include <type_traits>

namespace std {
Expand Down Expand Up @@ -90,7 +91,7 @@ template<class ElementType1,
class Accessor2,
class Scalar>
Scalar dot(
std::experimental::linalg::impl::inline_exec_t&& /* exec */,
std::experimental::linalg::impl::inline_exec_t&& exec,
std::experimental::mdspan<ElementType1, std::experimental::extents<SizeType1, ext1>, Layout1, Accessor1> v1,
std::experimental::mdspan<ElementType2, std::experimental::extents<SizeType2, ext2>, Layout2, Accessor2> v2,
Scalar init)
Expand All @@ -100,10 +101,18 @@ Scalar dot(
v1.static_extent(0) == v2.static_extent(0));

using size_type = std::common_type_t<SizeType1, SizeType2>;
for (size_type k = 0; k < v1.extent(0); ++k) {
init += v1(k) * v2(k);
}
return init;
using scalar_type = std::common_type_t<ElementType1, ElementType2, Scalar>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary the right type. For example, if operator* returns a higher-precision type than its inputs (as might make sense for custom integer or fixed-point real types, for example), then what you want here is the common type of Scalar and the result of operator*. However, it turns out that you don't need scalar_type here; please see the comment below.

using std::ranges::iota_view;
using std::ranges::begin;
using std::ranges::end;

iota_view range{size_type{}, v1.extent(0)};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preferred way to use range factories is std::views::FOO (in this case, std::views::iota) instead of std::ranges::FOO_view.


Scalar sum = std::transform_reduce(exec, begin(range), end(range), init,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "inline" executor should be executing inline. This means that, while it can use Standard Library algorithms, it shouldn't be passing along any execution policy (even if that execution policy is "sequential" -- please see my comments below). Would you consider changing this to remove the execution policy argument?

Suggested change
Scalar sum = std::transform_reduce(exec, begin(range), end(range), init,
Scalar sum = std::transform_reduce(begin(range), end(range), init,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. What do we need to add to handle other execution policies?

std::plus<scalar_type> {},
amklinv-nnl marked this conversation as resolved.
Show resolved Hide resolved
[=](size_type i) { return v1[i] * v2[i]; });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct. Another approach would be to use std::views::transform on the iota view to turn i into v1[i] (or v2[i]). Then you could use std::plus<void> directly, instead of creating a lambda that captures v1 and v2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the input. Can you show me what that would look like?


return sum;
}

template<class ExecutionPolicy,
Expand Down Expand Up @@ -155,7 +164,7 @@ Scalar dot(std::experimental::mdspan<ElementType1, std::experimental::extents<Si
std::experimental::mdspan<ElementType2, std::experimental::extents<SizeType2, ext2>, Layout2, Accessor2> v2,
Scalar init)
{
return dot(std::experimental::linalg::impl::default_exec_t(), v1, v2, init);
return dot(std::experimental::linalg::impl::default_exec(), v1, v2, init);
}

template<class ElementType1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ inline namespace __p1673_version_0 {
namespace linalg {
namespace impl {
// the execution policy used for default serial inline implementations
struct inline_exec_t {};
using inline_exec_t = std::execution::sequenced_policy;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see note above about the "inline" executor.

Any Standard Algorithm overload that takes an ExecutionPolicy template parameter is a "parallel algorithm" (see [algorithms.parallel] 2). That changes what the algorithm assumes about the behavior of element access functions.

Therefore, it's really important that the "inline" executor not use any parallel algorithm, even if ExecutionPolicy is sequenced_policy.


// The execution policy used when no execution policy is provided
// It must be remapped to some other execution policy, which the default mapper does
struct default_exec_t {};
using default_exec_t = std::execution::parallel_policy;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// It must be remapped to some other execution policy, which the default mapper does -- it's important that we not circumvent the default mapper. Would you consider, thus, reverting this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, the execpolicy_mapper did not like this default. I can restore it and show you the error it gave me.

auto default_exec() { return std::execution::par; };

// helpers
template<class T> struct is_inline_exec : std::false_type{};
Expand Down
2 changes: 1 addition & 1 deletion tests/kokkos-based/gtest_fixtures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
// is a header since this is limited to tests
using std::experimental::mdspan;
using std::experimental::extents;
using std::experimental::dynamic_extent;
using std::dynamic_extent;

//
// helper class for generating random numbers
Expand Down
12 changes: 6 additions & 6 deletions tests/kokkos-based/matrix_frob_norm_kokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ TEST_F(blas2_signed_float_fixture, kokkos_matrix_frob_norm_trivial_empty)
{
std::vector<value_type> v;

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does CI not actually test this test? (Please see comment above about std::dynamic_extent.) If so, then should we consider using the namespace macros instead of std explicitly?

using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 0, 0);
namespace stdla = std::experimental::linalg;
Expand All @@ -109,7 +109,7 @@ TEST_F(blas2_signed_float_fixture, kokkos_matrix_frob_norm_trivial_one_element)
constexpr value_type myvalue = static_cast<value_type>(-1.5);
std::vector<value_type> v = {myvalue};

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 1, 1);
namespace stdla = std::experimental::linalg;
Expand Down Expand Up @@ -143,7 +143,7 @@ TEST_F(blas2_signed_double_fixture, kokkos_matrix_frob_norm_trivial_empty)
{
std::vector<value_type> v;

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 0, 0);
namespace stdla = std::experimental::linalg;
Expand All @@ -165,7 +165,7 @@ TEST_F(blas2_signed_double_fixture, kokkos_matrix_frob_norm_trivial_one_element)
constexpr value_type myvalue = static_cast<value_type>(-1.5);
std::vector<value_type> v = {myvalue};

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 1, 1);
namespace stdla = std::experimental::linalg;
Expand Down Expand Up @@ -202,7 +202,7 @@ TEST_F(blas2_signed_complex_double_fixture, kokkos_matrix_frob_norm_trivial_empt
using stdc_t = value_type;
if constexpr (alignof(value_type) == alignof(kc_t)){
std::vector<value_type> v;
constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 0, 0);
namespace stdla = std::experimental::linalg;
Expand All @@ -229,7 +229,7 @@ TEST_F(blas2_signed_complex_double_fixture, kokkos_matrix_frob_norm_trivial_one_
constexpr value_type myvalue{-1.5, 2.2};
std::vector<value_type> v = {myvalue};

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 1, 1);
namespace stdla = std::experimental::linalg;
Expand Down
12 changes: 6 additions & 6 deletions tests/kokkos-based/matrix_inf_norm_kokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ TEST_F(blas2_signed_float_fixture, kokkos_matrix_inf_norm_trivial_empty)
{
std::vector<value_type> v;

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 0, 0);
namespace stdla = std::experimental::linalg;
Expand All @@ -109,7 +109,7 @@ TEST_F(blas2_signed_float_fixture, kokkos_matrix_inf_norm_trivial_zero_rows)
{
std::vector<value_type> v{1.2, -2.4};

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 0, 2);
namespace stdla = std::experimental::linalg;
Expand Down Expand Up @@ -143,7 +143,7 @@ TEST_F(blas2_signed_double_fixture, kokkos_matrix_inf_norm_trivial_empty)
{
std::vector<value_type> v;

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 0, 0);
namespace stdla = std::experimental::linalg;
Expand All @@ -164,7 +164,7 @@ TEST_F(blas2_signed_double_fixture, kokkos_matrix_inf_norm_trivial_zero_rows)
{
std::vector<value_type> v{1.2, -2.4};

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 0, 2);
namespace stdla = std::experimental::linalg;
Expand Down Expand Up @@ -202,7 +202,7 @@ TEST_F(blas2_signed_complex_double_fixture, kokkos_matrix_inf_norm_trivial_empty
if constexpr (alignof(value_type) == alignof(kc_t)){

std::vector<value_type> v;
constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 0, 0);
namespace stdla = std::experimental::linalg;
Expand Down Expand Up @@ -230,7 +230,7 @@ TEST_F(blas2_signed_complex_double_fixture, kokkos_matrix_inf_norm_trivial_zero_
v[0] = {1.2, -1.};
v[1] = {-2.4, 4.};

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 0, 2);
namespace stdla = std::experimental::linalg;
Expand Down
12 changes: 6 additions & 6 deletions tests/kokkos-based/matrix_one_norm_kokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ TEST_F(blas2_signed_float_fixture, kokkos_matrix_one_norm_trivial_empty)
{
std::vector<value_type> v;

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 0, 0);
namespace stdla = std::experimental::linalg;
Expand All @@ -109,7 +109,7 @@ TEST_F(blas2_signed_float_fixture, kokkos_matrix_one_norm_trivial_zero_col)
{
std::vector<value_type> v{1.2, -2.4};

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 2, 0);
namespace stdla = std::experimental::linalg;
Expand Down Expand Up @@ -143,7 +143,7 @@ TEST_F(blas2_signed_double_fixture, kokkos_matrix_one_norm_trivial_empty)
{
std::vector<value_type> v;

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 0, 0);
namespace stdla = std::experimental::linalg;
Expand All @@ -164,7 +164,7 @@ TEST_F(blas2_signed_double_fixture, kokkos_matrix_one_norm_trivial_zero_col)
{
std::vector<value_type> v{1.2, -2.4};

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 2, 0);
namespace stdla = std::experimental::linalg;
Expand Down Expand Up @@ -203,7 +203,7 @@ TEST_F(blas2_signed_complex_double_fixture, kokkos_matrix_one_norm_trivial_empty

std::vector<value_type> v;

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 0, 0);
namespace stdla = std::experimental::linalg;
Expand Down Expand Up @@ -231,7 +231,7 @@ TEST_F(blas2_signed_complex_double_fixture, kokkos_matrix_one_norm_trivial_zero_
v[0] = {1.2, -1.};
v[1] = {-2.4, 4.};

constexpr auto de = std::experimental::dynamic_extent;
constexpr auto de = std::dynamic_extent;
using s_t = std::experimental::mdspan<value_type, std::experimental::extents<de, de>>;
s_t M(v.data(), 2, 0);
namespace stdla = std::experimental::linalg;
Expand Down
4 changes: 2 additions & 2 deletions tests/kokkos-based/mdspan_to_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void mdspan_to_view_test_impl()
{
using std::experimental::mdspan;
using std::experimental::extents;
using std::experimental::dynamic_extent;
using std::dynamic_extent;

// rank1, non-const
{
Expand Down Expand Up @@ -96,7 +96,7 @@ void transposed_mdspan_to_view_test_impl()
{
using std::experimental::mdspan;
using std::experimental::extents;
using std::experimental::dynamic_extent;
using std::dynamic_extent;

using lr_t = std::experimental::layout_right;
using ll_t = std::experimental::layout_left;
Expand Down
2 changes: 1 addition & 1 deletion tests/native/add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <vector>

namespace {
using std::experimental::dynamic_extent;
using std::dynamic_extent;
using std::experimental::extents;
using std::experimental::mdspan;
using std::experimental::linalg::add;
Expand Down
2 changes: 1 addition & 1 deletion tests/native/conjugate_transposed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <vector>

namespace {
using std::experimental::dynamic_extent;
using std::dynamic_extent;
using std::experimental::extents;
using std::experimental::mdspan;
using std::experimental::linalg::conjugate_transposed;
Expand Down
Loading