diff --git a/examples/viz/tree_visualization.cpp b/examples/viz/tree_visualization.cpp index 40bec673d..2d8442e3e 100644 --- a/examples/viz/tree_visualization.cpp +++ b/examples/viz/tree_visualization.cpp @@ -28,7 +28,7 @@ template void loadPointCloud(std::string const &filename, Points &random_points) { static_assert(Kokkos::is_view_v); - static_assert(Points::rank == 1); + static_assert(Points::rank() == 1); static_assert( ArborX::GeometryTraits::dimension_v == 3); @@ -55,7 +55,7 @@ template void writePointCloud(Points random_points, std::string const &filename) { static_assert(Kokkos::is_view_v); - static_assert(Points::rank == 1); + static_assert(Points::rank() == 1); static_assert( ArborX::GeometryTraits::dimension_v == 3); diff --git a/src/distributed/detail/ArborX_Distributor.hpp b/src/distributed/detail/ArborX_Distributor.hpp index a7637f020..ce05fd4c4 100644 --- a/src/distributed/detail/ArborX_Distributor.hpp +++ b/src/distributed/detail/ArborX_Distributor.hpp @@ -217,7 +217,7 @@ class Distributor Kokkos::Profiling::ScopedRegion guard( "ArborX::Distributor::createFromSends(batched)"); - static_assert(View::rank == 1); + static_assert(View::rank() == 1); static_assert( std::is_same::value); @@ -238,7 +238,7 @@ class Distributor Kokkos::Profiling::ScopedRegion guard( "ArborX::Distributor::createFromSends"); - static_assert(View::rank == 1); + static_assert(View::rank() == 1); static_assert( std::is_same::value); @@ -289,12 +289,12 @@ class Distributor static_assert( KokkosExt::is_accessible_from::value); - static_assert(ExportView::rank == 1 && + static_assert(ExportView::rank() == 1 && (std::is_same_v || std::is_same_v)); - static_assert(ImportView::rank == 1 && + static_assert(ImportView::rank() == 1 && (std::is_same_v || std::is_same_v && SourceValues::rank == 1, + static_assert(Kokkos::is_view_v && SourceValues::rank() == 1, "Source values must be a 1D view of values"); static_assert( KokkosExt::is_accessible_from && ApproxValues::rank == 1, + static_assert(Kokkos::is_view_v && ApproxValues::rank() == 1, "Approx values must be a 1D view"); static_assert( KokkosExt::is_accessible_from && SourcePoints::rank == 2, + static_assert(Kokkos::is_view_v && SourcePoints::rank() == 2, "source points must be a 2D view of points"); static_assert( KokkosExt::is_accessible_from, "Matrix must be a view"); - static_assert(Matrix::rank == 2, "Matrix must be 2D"); + static_assert(Matrix::rank() == 2, "Matrix must be 2D"); KOKKOS_ASSERT(mat.extent(0) == mat.extent(1)); } @@ -95,7 +95,7 @@ KOKKOS_FUNCTION void symmetricPseudoInverseSVDKernel(Matrix &mat, Diag &diag, "mat must be writable"); static_assert(Kokkos::is_view_v, "diag must be a view"); - static_assert(Diag::rank == 1, "diag must be 1D"); + static_assert(Diag::rank() == 1, "diag must be 1D"); static_assert(!std::is_const_v, "diag must be writable"); @@ -237,7 +237,7 @@ void symmetricPseudoInverseSVD(ExecutionSpace const &space, static_assert(Kokkos::is_view_v, "matrices must be a view"); static_assert(!std::is_const_v, "matrices must be writable"); - static_assert(InOutMatrices::rank == 3, + static_assert(InOutMatrices::rank() == 3, "matrices must be a list of square matrices"); static_assert( ArborX::Details::KokkosExt::is_accessible_from< diff --git a/src/kokkos_ext/ArborX_KokkosExtMinMaxReduce.hpp b/src/kokkos_ext/ArborX_KokkosExtMinMaxReduce.hpp index be5839d1b..19191dbf8 100644 --- a/src/kokkos_ext/ArborX_KokkosExtMinMaxReduce.hpp +++ b/src/kokkos_ext/ArborX_KokkosExtMinMaxReduce.hpp @@ -30,7 +30,8 @@ minmax_reduce(ExecutionSpace const &space, ViewType const &v) static_assert(is_accessible_from::value, "View must be accessible from the execution space"); - static_assert(ViewType::rank == 1, "minmax_reduce requires a View of rank 1"); + static_assert(ViewType::rank() == 1, + "minmax_reduce requires a View of rank 1"); auto const n = v.extent(0); ARBORX_ASSERT(n > 0); @@ -65,7 +66,7 @@ typename ViewType::non_const_value_type min_reduce(ExecutionSpace const &space, static_assert(is_accessible_from::value, "View must be accessible from the execution space"); - static_assert(ViewType::rank == 1, "min_reduce requires a View of rank 1"); + static_assert(ViewType::rank() == 1, "min_reduce requires a View of rank 1"); auto const n = v.extent(0); ARBORX_ASSERT(n > 0); @@ -92,7 +93,7 @@ typename ViewType::non_const_value_type max_reduce(ExecutionSpace const &space, static_assert(is_accessible_from::value, "View must be accessible from the execution space"); - static_assert(ViewType::rank == 1, "max_reduce requires a View of rank 1"); + static_assert(ViewType::rank() == 1, "max_reduce requires a View of rank 1"); auto const n = v.extent(0); ARBORX_ASSERT(n > 0); diff --git a/src/kokkos_ext/ArborX_KokkosExtSort.hpp b/src/kokkos_ext/ArborX_KokkosExtSort.hpp index 2f7f4341b..f76005e2e 100644 --- a/src/kokkos_ext/ArborX_KokkosExtSort.hpp +++ b/src/kokkos_ext/ArborX_KokkosExtSort.hpp @@ -83,8 +83,8 @@ void sortByKey(ExecutionSpace const &space, Keys &keys, Values &values) static_assert(Kokkos::is_view::value); static_assert(Kokkos::is_view::value); - static_assert(Keys::rank == 1); - static_assert(Values::rank == 1); + static_assert(Keys::rank() == 1); + static_assert(Values::rank() == 1); static_assert(KokkosExt::is_accessible_from::value); static_assert(KokkosExt::is_accessible_from; static_assert(Kokkos::is_view::value); static_assert(Kokkos::is_view::value); - static_assert(Keys::rank == 1); - static_assert(Values::rank == 1); + static_assert(Keys::rank() == 1); + static_assert(Values::rank() == 1); static_assert(KokkosExt::is_accessible_from::value); static_assert(KokkosExt::is_accessible_from; static_assert(Kokkos::is_view::value); static_assert(Kokkos::is_view::value); - static_assert(Keys::rank == 1); - static_assert(Values::rank == 1); + static_assert(Keys::rank() == 1); + static_assert(Values::rank() == 1); static_assert(KokkosExt::is_accessible_from::value); static_assert(KokkosExt::is_accessible_from::value, "View must be accessible from the execution space"); - static_assert(unsigned(ViewType::rank) == unsigned(1), + static_assert(unsigned(ViewType::rank()) == unsigned(1), "iota requires a View of rank 1"); using ValueType = typename ViewType::value_type; diff --git a/src/misc/ArborX_SortUtils.hpp b/src/misc/ArborX_SortUtils.hpp index f8b57c3a5..d68c42347 100644 --- a/src/misc/ArborX_SortUtils.hpp +++ b/src/misc/ArborX_SortUtils.hpp @@ -51,8 +51,8 @@ void applyInversePermutation(ExecutionSpace const &space, { static_assert(Kokkos::is_view_v); static_assert(Kokkos::is_view_v); - static_assert(InputView::rank == 1); - static_assert(OutputView::rank == 1); + static_assert(InputView::rank() == 1); + static_assert(OutputView::rank() == 1); static_assert(std::is_integral_v); auto const n = input_view.extent(0); @@ -73,8 +73,8 @@ void applyPermutation(ExecutionSpace const &space, { static_assert(Kokkos::is_view_v); static_assert(Kokkos::is_view_v); - static_assert(InputView::rank == 1); - static_assert(OutputView::rank == 1); + static_assert(InputView::rank() == 1); + static_assert(OutputView::rank() == 1); static_assert(std::is_integral_v); auto const n = input_view.extent(0); diff --git a/src/spatial/detail/ArborX_AccessTraits.hpp b/src/spatial/detail/ArborX_AccessTraits.hpp index 7eed68bc6..4bc7c1151 100644 --- a/src/spatial/detail/ArborX_AccessTraits.hpp +++ b/src/spatial/detail/ArborX_AccessTraits.hpp @@ -39,7 +39,7 @@ using AccessTraitsNotSpecializedArchetypeAlias = template struct AccessTraits< - View, Tag, std::enable_if_t{} && View::rank == 1>> + View, Tag, std::enable_if_t{} && View::rank() == 1>> { // Returns a const reference KOKKOS_FUNCTION static typename View::const_value_type &get(View const &v, @@ -56,7 +56,7 @@ struct AccessTraits< template struct AccessTraits< - View, Tag, std::enable_if_t{} && View::rank == 2>> + View, Tag, std::enable_if_t{} && View::rank() == 2>> { template KOKKOS_FUNCTION static auto getPoint(std::index_sequence, diff --git a/test/ArborX_EnableViewComparison.hpp b/test/ArborX_EnableViewComparison.hpp index f391299ec..b40c6894c 100644 --- a/test/ArborX_EnableViewComparison.hpp +++ b/test/ArborX_EnableViewComparison.hpp @@ -29,7 +29,7 @@ template void arborxViewCheck(U const &u, V const &v, std::string const &u_name, std::string const &v_name, CommonValueType tol = 0) { - static constexpr int rank = U::rank; + static constexpr int rank = U::rank(); bool same_dim_size = true; for (int i = 0; i < rank; i++) @@ -88,8 +88,8 @@ void arborxViewCheck(U const &u, V const &v, std::string const &u_name, auto view_a = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace{}, u); \ auto view_b = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace{}, v); \ \ - static_assert(unsigned(std::decay_t::rank) == \ - unsigned(std::decay_t::rank), \ + static_assert(unsigned(std::decay_t::rank()) == \ + unsigned(std::decay_t::rank()), \ "'" #VIEWA "' and '" #VIEWB "' must have the same rank"); \ \ std::string view_a_name(#VIEWA); \ @@ -115,7 +115,7 @@ struct is_forward_iterable> : public boost::mpl::true_ // NOTE Prefer static assertion to SFINAE because error message about no // operator== for the operands is not as clear. static_assert( - Kokkos::View::rank == 1 && + Kokkos::View::rank() == 1 && !std::is_same_v::array_layout, Kokkos::LayoutStride> && ArborX::Details::KokkosExt::is_accessible_from_host<