Skip to content

Commit

Permalink
Merge pull request #290 from nmm0/benchmark-submdspan-compiling
Browse files Browse the repository at this point in the history
fix broken benchmarks from submdspan changes
  • Loading branch information
crtrott authored Oct 31, 2023
2 parents d964165 + 33772c8 commit e155162
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion benchmarks/fill.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void _do_fill_random(
)
{
for(SizeT i = 0; i < s.extent(0); ++i) {
_do_fill_random(KokkosEx::submdspan(s, i, _repeated_with<decltype(Es)>(Kokkos::full_extent)...), gen, dist);
_do_fill_random(Kokkos::submdspan(s, i, _repeated_with<decltype(Es)>(Kokkos::full_extent)...), gen, dist);
}
}

Expand Down
6 changes: 3 additions & 3 deletions benchmarks/sum/sum_submdspan_right.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ void BM_MDSpan_Sum_Subspan_3D_right(benchmark::State& state, MDSpan, DynSizes...
value_type sum = 0;
using index_type = typename MDSpan::index_type;
for(index_type i = 0; i < s.extent(0); ++i) {
auto sub_i = KokkosEx::submdspan(s, i, Kokkos::full_extent, Kokkos::full_extent);
auto sub_i = Kokkos::submdspan(s, i, Kokkos::full_extent, Kokkos::full_extent);
for (index_type j = 0; j < s.extent(1); ++j) {
auto sub_i_j = KokkosEx::submdspan(sub_i, j, Kokkos::full_extent);
auto sub_i_j = Kokkos::submdspan(sub_i, j, Kokkos::full_extent);
for (index_type k = 0; k < s.extent(2); ++k) {
sum += sub_i_j(k);
}
Expand Down Expand Up @@ -134,7 +134,7 @@ _MDSPAN_CONSTEXPR_14 void _do_sum_submdspan(
)
{
for(index_type i = 0; i < s.extent(0); ++i) {
_impl::_do_sum_submdspan(sum, KokkosEx::submdspan(
_impl::_do_sum_submdspan(sum, Kokkos::submdspan(
s, i, _repeated_with<decltype(Es)>(Kokkos::full_extent)...)
);
}
Expand Down
2 changes: 1 addition & 1 deletion comp_bench/cbench_submdspan.cpp.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ int test(int* data) {
>
>(data);
<% n.times do |i| %>
auto <%= "sub#{i+1}_#{k}" %> = KokkosEx::submdspan(
auto <%= "sub#{i+1}_#{k}" %> = Kokkos::submdspan(
<%= "sub#{i}_#{k}" %>,
1
<%= ", Kokkos::full_extent" * (n - i - 1) %>
Expand Down

0 comments on commit e155162

Please sign in to comment.