Skip to content

Commit 87f7246

Browse files
authored
We currently do not expose any meow_t alias until C++14 (#2763)
This forces us to duplicate a ton of code with `__meow_t` for no benbefit at all We already backport half the standard so kets just do the right thing and use those aliases whenever possible While we are at it also actually use the `_CCCL_NODDEBUG_ALIAS` attribute when possible
1 parent 16ac5be commit 87f7246

File tree

245 files changed

+1319
-1497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+1319
-1497
lines changed

c2h/include/c2h/catch2_test_helper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ auto BitwiseEqualsRange(const Range& range) -> CustomEqualsRangeMatcher<Range, b
193193
#include <cuda/std/tuple>
194194
_LIBCUDACXX_BEGIN_NAMESPACE_STD
195195
template <size_t N, typename... T>
196-
__enable_if_t<(N == sizeof...(T))> print_elem(::std::ostream&, const tuple<T...>&)
196+
enable_if_t<(N == sizeof...(T))> print_elem(::std::ostream&, const tuple<T...>&)
197197
{}
198198

199199
template <size_t N, typename... T>
200-
__enable_if_t<(N < sizeof...(T))> print_elem(::std::ostream& os, const tuple<T...>& tup)
200+
enable_if_t<(N < sizeof...(T))> print_elem(::std::ostream& os, const tuple<T...>& tup)
201201
{
202202
_CCCL_IF_CONSTEXPR (N != 0)
203203
{

cub/benchmarks/bench/transform/babelstream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct narrowing_error : std::runtime_error
9191

9292
// from C++ GSL
9393
// implementation insipired by: https://github.com/microsoft/GSL/blob/main/include/gsl/narrow
94-
template <typename DstT, typename SrcT, ::cuda::std::__enable_if_t<::cuda::std::is_arithmetic<SrcT>::value, int> = 0>
94+
template <typename DstT, typename SrcT, ::cuda::std::enable_if_t<::cuda::std::is_arithmetic<SrcT>::value, int> = 0>
9595
constexpr DstT narrow(SrcT value)
9696
{
9797
constexpr bool is_different_signedness = ::cuda::std::is_signed<SrcT>::value != ::cuda::std::is_signed<DstT>::value;

cub/cub/detail/choose_offset.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ using choose_signed_offset_t = typename choose_signed_offset<NumItemsT>::type;
148148
template <typename... Iter>
149149
struct common_iterator_value
150150
{
151-
using type = ::cuda::std::__common_type_t<::cuda::std::__iter_value_type<Iter>...>;
151+
using type = ::cuda::std::common_type_t<::cuda::std::__iter_value_type<Iter>...>;
152152
};
153153
template <typename... Iter>
154154
using common_iterator_value_t = typename common_iterator_value<Iter...>::type;

cub/cub/detail/type_traits.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ _CCCL_SUPPRESS_DEPRECATED_PUSH
5050
_CCCL_SUPPRESS_DEPRECATED_POP
5151
#include <cuda/std/type_traits>
5252

53-
#define _CUB_TEMPLATE_REQUIRES(...) ::cuda::std::__enable_if_t<(__VA_ARGS__)>* = nullptr
53+
#define _CUB_TEMPLATE_REQUIRES(...) ::cuda::std::enable_if_t<(__VA_ARGS__)>* = nullptr
5454

5555
CUB_NAMESPACE_BEGIN
5656
namespace detail

cub/cub/device/dispatch/dispatch_merge.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class choose_merge_agent
4040
&& sizeof(typename fallback_agent_t::TempStorage) <= max_smem_per_block;
4141

4242
public:
43-
using type = ::cuda::std::__conditional_t<use_fallback, fallback_agent_t, default_agent_t>;
43+
using type = ::cuda::std::conditional_t<use_fallback, fallback_agent_t, default_agent_t>;
4444
};
4545

4646
// Computes the merge path intersections at equally wide intervals. The approach is outlined in the paper:

cub/cub/device/dispatch/dispatch_transform.cuh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ _CCCL_DEVICE _CCCL_FORCEINLINE void prefetch_tile(const T* addr, int tile_size)
147147
// TODO(miscco): we should probably constrain It to not be a contiguous iterator in C++17 (and change the overload
148148
// above to accept any contiguous iterator)
149149
// overload for any iterator that is not a pointer, do nothing
150-
template <int, typename It, ::cuda::std::__enable_if_t<!::cuda::std::is_pointer<It>::value, int> = 0>
150+
template <int, typename It, ::cuda::std::enable_if_t<!::cuda::std::is_pointer<It>::value, int> = 0>
151151
_CCCL_DEVICE _CCCL_FORCEINLINE void prefetch_tile(It, int)
152152
{}
153153

@@ -232,20 +232,20 @@ _CCCL_DEVICE _CCCL_FORCEINLINE auto poor_apply(F&& f, Tuple&& t)
232232
-> decltype(poor_apply_impl(
233233
::cuda::std::forward<F>(f),
234234
::cuda::std::forward<Tuple>(t),
235-
::cuda::std::make_index_sequence<::cuda::std::tuple_size<::cuda::std::__libcpp_remove_reference_t<Tuple>>::value>{}))
235+
::cuda::std::make_index_sequence<::cuda::std::tuple_size<::cuda::std::remove_reference_t<Tuple>>::value>{}))
236236
{
237237
return poor_apply_impl(
238238
::cuda::std::forward<F>(f),
239239
::cuda::std::forward<Tuple>(t),
240-
::cuda::std::make_index_sequence<::cuda::std::tuple_size<::cuda::std::__libcpp_remove_reference_t<Tuple>>::value>{});
240+
::cuda::std::make_index_sequence<::cuda::std::tuple_size<::cuda::std::remove_reference_t<Tuple>>::value>{});
241241
}
242242

243243
// mult must be a power of 2
244244
template <typename Integral>
245245
_CCCL_HOST_DEVICE _CCCL_FORCEINLINE constexpr auto round_up_to_po2_multiple(Integral x, Integral mult) -> Integral
246246
{
247247
#if _CCCL_STD_VER > 2011
248-
_CCCL_ASSERT(::cuda::std::has_single_bit(static_cast<::cuda::std::__make_unsigned_t<Integral>>(mult)), "");
248+
_CCCL_ASSERT(::cuda::std::has_single_bit(static_cast<::cuda::std::make_unsigned_t<Integral>>(mult)), "");
249249
#endif // _CCCL_STD_VER > 2011
250250
return (x + mult - 1) & ~(mult - 1);
251251
}
@@ -544,15 +544,15 @@ using needs_aligned_ptr_t =
544544
>;
545545

546546
#ifdef _CUB_HAS_TRANSFORM_UBLKCP
547-
template <Algorithm Alg, typename It, ::cuda::std::__enable_if_t<needs_aligned_ptr_t<Alg>::value, int> = 0>
547+
template <Algorithm Alg, typename It, ::cuda::std::enable_if_t<needs_aligned_ptr_t<Alg>::value, int> = 0>
548548
_CCCL_DEVICE _CCCL_FORCEINLINE auto select_kernel_arg(
549549
::cuda::std::integral_constant<Algorithm, Alg>, kernel_arg<It>&& arg) -> aligned_base_ptr<value_t<It>>&&
550550
{
551551
return ::cuda::std::move(arg.aligned_ptr);
552552
}
553553
#endif // _CUB_HAS_TRANSFORM_UBLKCP
554554

555-
template <Algorithm Alg, typename It, ::cuda::std::__enable_if_t<!needs_aligned_ptr_t<Alg>::value, int> = 0>
555+
template <Algorithm Alg, typename It, ::cuda::std::enable_if_t<!needs_aligned_ptr_t<Alg>::value, int> = 0>
556556
_CCCL_DEVICE _CCCL_FORCEINLINE auto
557557
select_kernel_arg(::cuda::std::integral_constant<Algorithm, Alg>, kernel_arg<It>&& arg) -> It&&
558558
{

cub/cub/thread/thread_reduce.cuh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ ThreadReduceSequential(const Input& input, ReductionOp reduction_op)
131131
/// Specialization for DPX reduction
132132
template <typename Input, typename ReductionOp>
133133
_CCCL_NODISCARD _CCCL_DEVICE _CCCL_FORCEINLINE auto
134-
ThreadReduceDpx(const Input& input, ReductionOp reduction_op) -> ::cuda::std::__remove_cvref_t<decltype(input[0])>
134+
ThreadReduceDpx(const Input& input, ReductionOp reduction_op) -> ::cuda::std::remove_cvref_t<decltype(input[0])>
135135
{
136-
using T = ::cuda::std::__remove_cvref_t<decltype(input[0])>;
136+
using T = ::cuda::std::remove_cvref_t<decltype(input[0])>;
137137
constexpr int length = detail::static_size<Input>();
138138
T array[length];
139139
# pragma unroll
@@ -153,7 +153,7 @@ ThreadReduceDpx(const Input& input, ReductionOp reduction_op) -> ::cuda::std::__
153153
// DPX/Sequential dispatch
154154
template <typename Input,
155155
typename ReductionOp,
156-
typename ValueT = ::cuda::std::__remove_cvref_t<decltype(::cuda::std::declval<Input>()[0])>,
156+
typename ValueT = ::cuda::std::remove_cvref_t<decltype(::cuda::std::declval<Input>()[0])>,
157157
typename AccumT = ::cuda::std::__accumulator_t<ReductionOp, ValueT>,
158158
_CUB_TEMPLATE_REQUIRES(enable_dpx_reduction<Input, ReductionOp, AccumT>())>
159159
_CCCL_NODISCARD _CCCL_DEVICE _CCCL_FORCEINLINE AccumT ThreadReduce(const Input& input, ReductionOp reduction_op)
@@ -170,7 +170,7 @@ _CCCL_NODISCARD _CCCL_DEVICE _CCCL_FORCEINLINE AccumT ThreadReduce(const Input&
170170

171171
template <typename Input,
172172
typename ReductionOp,
173-
typename ValueT = ::cuda::std::__remove_cvref_t<decltype(::cuda::std::declval<Input>()[0])>,
173+
typename ValueT = ::cuda::std::remove_cvref_t<decltype(::cuda::std::declval<Input>()[0])>,
174174
typename AccumT = ::cuda::std::__accumulator_t<ReductionOp, ValueT>,
175175
_CUB_TEMPLATE_REQUIRES(!enable_dpx_reduction<Input, ReductionOp, AccumT>())>
176176
_CCCL_NODISCARD _CCCL_DEVICE _CCCL_FORCEINLINE AccumT ThreadReduce(const Input& input, ReductionOp reduction_op)
@@ -213,7 +213,7 @@ template <typename Input,
213213
typename ReductionOp,
214214
typename PrefixT,
215215
#ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document
216-
typename ValueT = ::cuda::std::__remove_cvref_t<decltype(::cuda::std::declval<Input>()[0])>,
216+
typename ValueT = ::cuda::std::remove_cvref_t<decltype(::cuda::std::declval<Input>()[0])>,
217217
#endif // !DOXYGEN_SHOULD_SKIP_THIS
218218
typename AccumT = ::cuda::std::__accumulator_t<ReductionOp, ValueT, PrefixT>>
219219
_CCCL_NODISCARD _CCCL_DEVICE _CCCL_FORCEINLINE AccumT

cub/cub/util_type.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ using value_t =
100100
typename std::iterator_traits<Iterator>::value_type;
101101
# endif // defined(_CCCL_COMPILER_NVRTC)
102102

103-
template <typename It, typename FallbackT, bool = ::cuda::std::is_void<::cuda::std::__remove_pointer_t<It>>::value>
103+
template <typename It, typename FallbackT, bool = ::cuda::std::is_void<::cuda::std::remove_pointer_t<It>>::value>
104104
struct non_void_value_impl
105105
{
106106
using type = FallbackT;

cub/test/catch2_test_device_adjacent_difference_substract_left.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ C2H_TEST("DeviceAdjacentDifference::SubtractLeftCopy works with pointers", "[dev
163163
template <class T>
164164
struct cust_diff
165165
{
166-
template <class T2, cuda::std::__enable_if_t<cuda::std::is_same<T, T2>::value, int> = 0>
166+
template <class T2, cuda::std::enable_if_t<cuda::std::is_same<T, T2>::value, int> = 0>
167167
__host__ __device__ constexpr T2 operator()(const T2& lhs, const T2& rhs) const noexcept
168168
{
169169
return lhs - rhs;

cub/test/catch2_test_device_adjacent_difference_substract_right.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ C2H_TEST("DeviceAdjacentDifference::SubtractRightCopy does not change the input"
9292
template <class T>
9393
struct ref_diff
9494
{
95-
template <class T2, cuda::std::__enable_if_t<cuda::std::is_same<T, T2>::value, int> = 0>
95+
template <class T2, cuda::std::enable_if_t<cuda::std::is_same<T, T2>::value, int> = 0>
9696
__host__ __device__ constexpr T2 operator()(const T2& lhs, const T2& rhs) const noexcept
9797
{
9898
return rhs - lhs;

0 commit comments

Comments
 (0)