Skip to content

Commit

Permalink
kokkos#6805: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
nmm0 committed May 1, 2024
1 parent 215f8d9 commit 153e853
Showing 1 changed file with 32 additions and 16 deletions.
48 changes: 32 additions & 16 deletions core/unit_test/TestMDSpanConversion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,83 +182,99 @@ struct TestViewMDSpanConversion {
test_conversion_from_mdspan<Kokkos::LayoutLeft>(
Kokkos::View<value_type *, Kokkos::LayoutLeft, ExecutionSpace>("ref",
7),
typename layout_left_padded<7>::template mapping<Kokkos::dextents<std::size_t, 1>>{
typename layout_left_padded<7>::template mapping<
Kokkos::dextents<std::size_t, 1>>{
Kokkos::dextents<std::size_t, 1>(7)});

test_conversion_from_mdspan<Kokkos::LayoutLeft>(
Kokkos::View<value_type[7], Kokkos::LayoutLeft, ExecutionSpace>("ref"),
typename layout_left_padded<7>::template mapping<Kokkos::extents<std::size_t, 7>>{
typename layout_left_padded<7>::template mapping<
Kokkos::extents<std::size_t, 7>>{
Kokkos::extents<std::size_t, 7>()});
test_conversion_from_mdspan<Kokkos::LayoutLeft>(
Kokkos::View<value_type[7], Kokkos::LayoutLeft, ExecutionSpace>("ref"),
typename layout_left_padded<7>::template mapping<Kokkos::dextents<std::size_t, 1>>{
typename layout_left_padded<7>::template mapping<
Kokkos::dextents<std::size_t, 1>>{
Kokkos::dextents<std::size_t, 1>(7)});
test_conversion_from_mdspan<Kokkos::LayoutLeft>(
Kokkos::View<value_type *, Kokkos::LayoutLeft, ExecutionSpace>("ref",
7),
typename layout_left_padded<7>::template mapping<Kokkos::extents<std::size_t, 7>>{
typename layout_left_padded<7>::template mapping<
Kokkos::extents<std::size_t, 7>>{
Kokkos::extents<std::size_t, 7>()});

test_conversion_from_mdspan<Kokkos::LayoutLeft>(
Kokkos::View<value_type **, Kokkos::LayoutLeft, ExecutionSpace>("ref",
7, 3),
typename layout_left_padded<7>::template mapping<Kokkos::dextents<std::size_t, 2>>{
typename layout_left_padded<7>::template mapping<
Kokkos::dextents<std::size_t, 2>>{
Kokkos::dextents<std::size_t, 2>(7, 3)});
test_conversion_from_mdspan<Kokkos::LayoutLeft>(
Kokkos::View<value_type[7][3], Kokkos::LayoutLeft, ExecutionSpace>(
"ref"),
typename layout_left_padded<7>::template mapping<Kokkos::extents<std::size_t, 7, 3>>{
typename layout_left_padded<7>::template mapping<
Kokkos::extents<std::size_t, 7, 3>>{
Kokkos::extents<std::size_t, 7, 3>()});
test_conversion_from_mdspan<Kokkos::LayoutLeft>(
Kokkos::View<value_type[7][3], Kokkos::LayoutLeft, ExecutionSpace>(
"ref"),
typename layout_left_padded<7>::template mapping<Kokkos::dextents<std::size_t, 2>>{
typename layout_left_padded<7>::template mapping<
Kokkos::dextents<std::size_t, 2>>{
Kokkos::dextents<std::size_t, 2>(7, 3)});
test_conversion_from_mdspan<Kokkos::LayoutLeft>(
Kokkos::View<value_type **, Kokkos::LayoutLeft, ExecutionSpace>("ref",
7, 3),
typename layout_left_padded<7>::template mapping<Kokkos::extents<std::size_t, 7, 3>>{
typename layout_left_padded<7>::template mapping<
Kokkos::extents<std::size_t, 7, 3>>{
Kokkos::extents<std::size_t, 7, 3>()});

// LayoutRight
test_conversion_from_mdspan<Kokkos::LayoutRight>(
Kokkos::View<value_type *, Kokkos::LayoutRight, ExecutionSpace>("ref",
7),
typename layout_right_padded<7>::template mapping<Kokkos::dextents<std::size_t, 1>>{
typename layout_right_padded<7>::template mapping<
Kokkos::dextents<std::size_t, 1>>{
Kokkos::dextents<std::size_t, 1>(7)});
test_conversion_from_mdspan<Kokkos::LayoutRight>(
Kokkos::View<value_type[7], Kokkos::LayoutRight, ExecutionSpace>("ref"),
typename layout_right_padded<7>::template mapping<Kokkos::extents<std::size_t, 7>>{
typename layout_right_padded<7>::template mapping<
Kokkos::extents<std::size_t, 7>>{
Kokkos::extents<std::size_t, 7>()});
test_conversion_from_mdspan<Kokkos::LayoutRight>(
Kokkos::View<value_type[7], Kokkos::LayoutRight, ExecutionSpace>("ref"),
typename layout_right_padded<7>::template mapping<Kokkos::dextents<std::size_t, 1>>{
typename layout_right_padded<7>::template mapping<
Kokkos::dextents<std::size_t, 1>>{
Kokkos::dextents<std::size_t, 1>(7)});
test_conversion_from_mdspan<Kokkos::LayoutRight>(
Kokkos::View<value_type *, Kokkos::LayoutRight, ExecutionSpace>("ref",
7),
typename layout_right_padded<7>::template mapping<Kokkos::extents<std::size_t, 7>>{
typename layout_right_padded<7>::template mapping<
Kokkos::extents<std::size_t, 7>>{
Kokkos::extents<std::size_t, 7>()});

test_conversion_from_mdspan<Kokkos::LayoutRight>(
Kokkos::View<value_type **, Kokkos::LayoutRight, ExecutionSpace>("ref",
3, 7),
typename layout_right_padded<7>::template mapping<Kokkos::dextents<std::size_t, 2>>{
typename layout_right_padded<7>::template mapping<
Kokkos::dextents<std::size_t, 2>>{
Kokkos::dextents<std::size_t, 2>(3, 7)});
test_conversion_from_mdspan<Kokkos::LayoutRight>(
Kokkos::View<value_type[3][7], Kokkos::LayoutRight, ExecutionSpace>(
"ref"),
typename layout_right_padded<7>::template mapping<Kokkos::extents<std::size_t, 3, 7>>{
typename layout_right_padded<7>::template mapping<
Kokkos::extents<std::size_t, 3, 7>>{
Kokkos::extents<std::size_t, 3, 7>()});
test_conversion_from_mdspan<Kokkos::LayoutRight>(
Kokkos::View<value_type[3][7], Kokkos::LayoutRight, ExecutionSpace>(
"ref"),
typename layout_right_padded<7>::template mapping<Kokkos::dextents<std::size_t, 2>>{
typename layout_right_padded<7>::template mapping<
Kokkos::dextents<std::size_t, 2>>{
Kokkos::dextents<std::size_t, 2>(3, 7)});
test_conversion_from_mdspan<Kokkos::LayoutRight>(
Kokkos::View<value_type **, Kokkos::LayoutRight, ExecutionSpace>("ref",
3, 7),
typename layout_right_padded<7>::template mapping<Kokkos::extents<std::size_t, 3, 7>>{
typename layout_right_padded<7>::template mapping<
Kokkos::extents<std::size_t, 3, 7>>{
Kokkos::extents<std::size_t, 3, 7>()});

// LayoutStride
Expand Down

0 comments on commit 153e853

Please sign in to comment.