Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion libcudacxx/include/cuda/std/__tuple_dir/make_tuple_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__fwd/complex.h>
#include <cuda/std/__fwd/array.h>
#include <cuda/std/__fwd/complex.h>
#include <cuda/std/__fwd/tuple.h>
#include <cuda/std/__tuple_dir/tuple_element.h>
#include <cuda/std/__tuple_dir/tuple_indices.h>
Expand Down Expand Up @@ -61,7 +63,27 @@ struct __make_tuple_types_flat<array<_Vt, _Np>, __tuple_indices<_Idx...>>
template <size_t>
using __value_type = _Vt;
template <class _Tp, class _ApplyFn = __apply_cvref_fn<_Tp>>
using __apply_quals = __tuple_types<__type_call<_ApplyFn, __value_type<_Idx>>...>;
using __apply_quals _CCCL_NODEBUG_ALIAS = __tuple_types<__type_call<_ApplyFn, __value_type<_Idx>>...>;
};

template <class _Vt, size_t... _Idx>
struct __make_tuple_types_flat<complex<_Vt>, __tuple_indices<_Idx...>>
{
static_assert(sizeof...(_Idx) == 2, "__make_tuple_types: complex has only 2 members");
template <size_t>
using __value_type = _Vt;
template <class _Tp, class _ApplyFn = __apply_cvref_fn<_Tp>>
using __apply_quals _CCCL_NODEBUG_ALIAS = __tuple_types<__type_call<_ApplyFn, __value_type<_Idx>>...>;
};

template <class _Vt, size_t... _Idx>
struct __make_tuple_types_flat<::cuda::complex<_Vt>, __tuple_indices<_Idx...>>
{
static_assert(sizeof...(_Idx) == 2, "__make_tuple_types: complex has only 2 members");
template <size_t>
using __value_type = _Vt;
template <class _Tp, class _ApplyFn = __apply_cvref_fn<_Tp>>
using __apply_quals _CCCL_NODEBUG_ALIAS = __tuple_types<__type_call<_ApplyFn, __value_type<_Idx>>...>;
};

template <class _Tp,
Expand Down
4 changes: 4 additions & 0 deletions libcudacxx/include/cuda/std/__tuple_dir/tuple_like.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# pragma system_header
#endif // no system header

#include <cuda/__fwd/complex.h>
#include <cuda/std/__concepts/concept_macros.h>
#include <cuda/std/__fwd/array.h>
#include <cuda/std/__fwd/complex.h>
Expand Down Expand Up @@ -58,6 +59,9 @@ inline constexpr bool __tuple_like_impl<array<_Tp, _Size>> = true;
template <class _Tp>
inline constexpr bool __tuple_like_impl<complex<_Tp>> = true;

template <class _Tp>
inline constexpr bool __tuple_like_impl<::cuda::complex<_Tp>> = true;

template <class _Ip, class _Sp, ::cuda::std::ranges::subrange_kind _Kp>
inline constexpr bool __tuple_like_impl<::cuda::std::ranges::subrange<_Ip, _Sp, _Kp>> = true;

Expand Down
4 changes: 4 additions & 0 deletions libcudacxx/include/cuda/std/__tuple_dir/tuple_like_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# pragma system_header
#endif // no system header

#include <cuda/__fwd/complex.h>
#include <cuda/std/__fwd/array.h>
#include <cuda/std/__fwd/complex.h>
#include <cuda/std/__fwd/pair.h>
Expand Down Expand Up @@ -54,6 +55,9 @@ inline constexpr bool __tuple_like_ext<array<_Tp, _Size>> = true;
template <class _Tp>
inline constexpr bool __tuple_like_ext<complex<_Tp>> = true;

template <class _Tp>
inline constexpr bool __tuple_like_ext<::cuda::complex<_Tp>> = true;

template <class... _Tp>
inline constexpr bool __tuple_like_ext<__tuple_types<_Tp...>> = true;

Expand Down
Loading