Skip to content

Commit

Permalink
Fix CUDA errors in submdspan about int to size_t narrowing (#350)
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Trott <crtrott@sandia.gov>
Co-authored-by: Daniel Arndt <arndtd@ornl.gov>
  • Loading branch information
3 people authored Jul 3, 2024
1 parent 08cc851 commit 98a12b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/experimental/__p2630_bits/submdspan_mapping.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ struct deduce_layout_left_submapping<
IndexType, SubRank, std::index_sequence<Idx...>, SliceSpecifiers...> {

using count_range = index_sequence_scan_impl<
0, (is_index_slice_v<SliceSpecifiers, IndexType> ? 0 : 1)...>;
0u, (is_index_slice_v<SliceSpecifiers, IndexType> ? 0u : 1u)...>;

constexpr static int gap_len =
(((Idx > 0 && count_range::get(Idx) == 1 &&
Expand Down Expand Up @@ -361,7 +361,7 @@ struct deduce_layout_right_submapping<

static constexpr size_t Rank = sizeof...(Idx);
using count_range = index_sequence_scan_impl<
0, (std::is_convertible_v<SliceSpecifiers, IndexType> ? 0 : 1)...>;
0u, (std::is_convertible_v<SliceSpecifiers, IndexType> ? 0u : 1u)...>;
//__static_partial_sums<!std::is_convertible_v<SliceSpecifiers,
// IndexType>...>;
constexpr static int gap_len =
Expand Down

0 comments on commit 98a12b0

Please sign in to comment.