Skip to content

Fix parenthesis position in submdspan#368

Merged
crtrott merged 1 commit into
kokkos:stablefrom
tpadioleau:fix-typo-submdspan
Dec 2, 2024
Merged

Fix parenthesis position in submdspan#368
crtrott merged 1 commit into
kokkos:stablefrom
tpadioleau:fix-typo-submdspan

Conversation

@tpadioleau

Copy link
Copy Markdown
Member

Closes #367

@tpadioleau

Copy link
Copy Markdown
Member Author

Btw, we have two ways to check if we have to workaround CTAD issues

  • #if defined(_MDSPAN_HAS_HIP) || defined(_MDSPAN_HAS_CUDA)
    MDSPAN_IMPL_STANDARD_NAMESPACE::detail::tuple<decltype(MDSPAN_IMPL_STANDARD_NAMESPACE::detail::stride_of(slices))...>{
    MDSPAN_IMPL_STANDARD_NAMESPACE::detail::stride_of(slices)...}).values),
    #else
  • #if defined(_MDSPAN_HAS_HIP) || \
    (defined(__NVCC__) && \
    (__CUDACC_VER_MAJOR__ * 100 + __CUDACC_VER_MINOR__ * 10) < 1120)
    MDSPAN_IMPL_STANDARD_NAMESPACE::detail::tuple<decltype(detail::stride_of(slices))...>(
    detail::stride_of(slices)...).values)),
    #else

Could we keep only one ?

@dalg24

dalg24 commented Dec 2, 2024

Copy link
Copy Markdown
Member

@nmm0 @crtrott plz review

@tpadioleau

tpadioleau commented Dec 2, 2024

Copy link
Copy Markdown
Member Author

I would go for the safer solution 1.

#if defined(_MDSPAN_HAS_HIP) || defined(_MDSPAN_HAS_CUDA)
MDSPAN_IMPL_STANDARD_NAMESPACE::detail::tuple<decltype(MDSPAN_IMPL_STANDARD_NAMESPACE::detail::stride_of(slices))...>{
MDSPAN_IMPL_STANDARD_NAMESPACE::detail::stride_of(slices)...}).values),
#else

@crtrott crtrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah Number one is fine

@crtrott crtrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can be done in a follow up unifying the guard.

@crtrott crtrott merged commit ff2551d into kokkos:stable Dec 2, 2024
@tpadioleau tpadioleau deleted the fix-typo-submdspan branch December 3, 2024 09:28
@tpadioleau tpadioleau mentioned this pull request Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compilation error with submdspan in CUDA/HIP

4 participants