Skip to content

Commit

Permalink
Ensure that cuda::std::pair is potentially trivially copyable
Browse files Browse the repository at this point in the history
trivially copyable is a requirement for memcpy. We want to ensure that our pair implementation satisfies that whenever possible.

This is especially important for thrust::pair as that is used in rmm extensively.

Fixes #1246
  • Loading branch information
miscco committed Jan 5, 2024
1 parent a34cda5 commit 40f1d89
Show file tree
Hide file tree
Showing 5 changed files with 645 additions and 628 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
# pragma system_header
#endif // no system header

#if _CCCL_STD_VER > 2011

#define _LIBCUDACXX_PP_CAT_(_Xp, ...) _Xp##__VA_ARGS__
#define _LIBCUDACXX_PP_CAT(_Xp, ...) _LIBCUDACXX_PP_CAT_(_Xp, __VA_ARGS__)

Expand Down Expand Up @@ -285,7 +283,7 @@ _LIBCUDACXX_INLINE_VISIBILITY inline constexpr bool _Is_true() {
return true;
}

#if defined(_LIBCUDACXX_COMPILER_CLANG) || defined(_LIBCUDACXX_COMPILER_MSVC)
#if defined(_LIBCUDACXX_COMPILER_CLANG) || defined(_LIBCUDACXX_COMPILER_MSVC) || _CCCL_STD_VER == 2011
template <bool _Bp>
_LIBCUDACXX_INLINE_VISIBILITY _Concept::_Enable_if_t<_Bp> _Requires() {}
#else
Expand All @@ -294,6 +292,4 @@ _LIBCUDACXX_INLINE_VAR constexpr int _Requires = 0;
#endif
} // namespace _Concept

#endif // _CCCL_STD_VER > 2011

#endif //_CUDA___CONCEPTS
Loading

0 comments on commit 40f1d89

Please sign in to comment.