Skip to content

Commit cb07e97

Browse files
authored
Remove old C++ version checks (#6494)
1 parent 95c8c5e commit cb07e97

File tree

9 files changed

+11
-25
lines changed

9 files changed

+11
-25
lines changed

cub/cub/util_cpp_dialect.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ CUB_COMPILER_DEPRECATION(MSVC 2019(19.20 / 16.0 / 14.20));
6363
# ifndef CCCL_IGNORE_DEPRECATED_CPP_DIALECT
6464
# if _CCCL_STD_VER < 2017
6565
# error CUB requires at least C++17. Define CCCL_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.
66-
# endif // _CCCL_STD_VER >= 2017
66+
# endif // _CCCL_STD_VER < 2017
6767
# endif
6868

6969
# undef CUB_COMP_DEPR_IMPL

cudax/examples/vector.cuh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include <cuda/experimental/__detail/utility.cuh>
3232
#include <cuda/experimental/__launch/param_kind.cuh>
3333

34-
#if _CCCL_STD_VER >= 2017
3534
namespace cuda::experimental
3635
{
3736
using ::cuda::std::span;
@@ -144,4 +143,3 @@ private:
144143
} // namespace cuda::experimental
145144

146145
#endif
147-
#endif

cudax/include/cuda/experimental/__hierarchy/dimensions.cuh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include <cuda/std/__cccl/prologue.h>
1818

19-
#if _CCCL_STD_VER >= 2017
2019
namespace cuda::experimental
2120
{
2221
template <typename T, size_t... Extents>
@@ -154,7 +153,6 @@ template <typename TyTrunc, typename Index, typename Dims>
154153
}
155154
} // namespace __detail
156155
} // namespace cuda::experimental
157-
#endif // _CCCL_STD_VER >= 2017
158156

159157
#include <cuda/std/__cccl/epilogue.h>
160158

cudax/include/cuda/experimental/__hierarchy/hierarchy_dimensions.cuh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
#include <cuda/std/__cccl/prologue.h>
2929

30-
#if _CCCL_STD_VER >= 2017
3130
namespace cuda::experimental
3231
{
3332
/* TODO right now operator stacking can end up with a wrong unit, we could use below type, but we would need an explicit
@@ -398,9 +397,9 @@ struct hierarchy_dimensions
398397
: levels(ls)
399398
{}
400399

401-
# if !defined(_CCCL_NO_THREE_WAY_COMPARISON) && !_CCCL_COMPILER(MSVC, <, 19, 39) && !_CCCL_COMPILER(GCC, <, 12)
400+
#if !defined(_CCCL_NO_THREE_WAY_COMPARISON) && !_CCCL_COMPILER(MSVC, <, 19, 39) && !_CCCL_COMPILER(GCC, <, 12)
402401
[[nodiscard]] _CCCL_HIDE_FROM_ABI constexpr bool operator==(const hierarchy_dimensions&) const noexcept = default;
403-
# else // ^^^ !_CCCL_NO_THREE_WAY_COMPARISON ^^^ / vvv _CCCL_NO_THREE_WAY_COMPARISON vvv
402+
#else // ^^^ !_CCCL_NO_THREE_WAY_COMPARISON ^^^ / vvv _CCCL_NO_THREE_WAY_COMPARISON vvv
404403
[[nodiscard]] _CCCL_API friend constexpr bool
405404
operator==(const hierarchy_dimensions& left, const hierarchy_dimensions& right) noexcept
406405
{
@@ -412,7 +411,7 @@ struct hierarchy_dimensions
412411
{
413412
return left.levels != right.levels;
414413
}
415-
# endif // _CCCL_NO_THREE_WAY_COMPARISON
414+
#endif // _CCCL_NO_THREE_WAY_COMPARISON
416415

417416
private:
418417
// This being static is a bit of a hack to make extents_type working without incomplete class member access
@@ -819,12 +818,12 @@ public:
819818
}
820819
}
821820

822-
# ifndef _CCCL_DOXYGEN_INVOKED // Do not document
821+
#ifndef _CCCL_DOXYGEN_INVOKED // Do not document
823822
constexpr hierarchy_dimensions combine([[maybe_unused]] __empty_hierarchy __empty) const
824823
{
825824
return *this;
826825
}
827-
# endif // _CCCL_DOXYGEN_INVOKED
826+
#endif // _CCCL_DOXYGEN_INVOKED
828827
};
829828

830829
/**
@@ -944,7 +943,6 @@ constexpr auto hierarchy_add_level(const hierarchy_dimensions<Unit, Levels...>&
944943
}
945944
}
946945
} // namespace cuda::experimental
947-
#endif // _CCCL_STD_VER >= 2017
948946

949947
#include <cuda/std/__cccl/epilogue.h>
950948

cudax/include/cuda/experimental/__hierarchy/hierarchy_levels.cuh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
#include <cuda/std/__cccl/prologue.h>
2121

22-
#if _CCCL_STD_VER >= 2017
2322
namespace cuda::experimental
2423
{
2524
namespace hierarchy
@@ -488,7 +487,6 @@ _CCCL_DEVICE auto index(const Unit&, const Level&)
488487
}
489488
} // namespace hierarchy
490489
} // namespace cuda::experimental
491-
#endif // _CCCL_STD_VER >= 2017
492490

493491
#include <cuda/std/__cccl/epilogue.h>
494492

cudax/include/cuda/experimental/__hierarchy/level_dimensions.cuh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#include <cuda/std/__cccl/prologue.h>
2020

21-
#if _CCCL_STD_VER >= 2017
2221
namespace cuda::experimental
2322
{
2423
namespace __detail
@@ -128,9 +127,9 @@ struct level_dimensions
128127
_CCCL_HOST_DEVICE constexpr level_dimensions()
129128
: dims(){};
130129

131-
# if !defined(_CCCL_NO_THREE_WAY_COMPARISON) && !_CCCL_COMPILER(MSVC, <, 19, 39) && !_CCCL_COMPILER(GCC, <, 12)
130+
#if !defined(_CCCL_NO_THREE_WAY_COMPARISON) && !_CCCL_COMPILER(MSVC, <, 19, 39) && !_CCCL_COMPILER(GCC, <, 12)
132131
[[nodiscard]] _CCCL_HIDE_FROM_ABI constexpr bool operator==(const level_dimensions&) const noexcept = default;
133-
# else // ^^^ !_CCCL_NO_THREE_WAY_COMPARISON ^^^ / vvv _CCCL_NO_THREE_WAY_COMPARISON vvv
132+
#else // ^^^ !_CCCL_NO_THREE_WAY_COMPARISON ^^^ / vvv _CCCL_NO_THREE_WAY_COMPARISON vvv
134133
[[nodiscard]] _CCCL_API friend constexpr bool
135134
operator==(const level_dimensions& left, const level_dimensions& right) noexcept
136135
{
@@ -142,7 +141,7 @@ struct level_dimensions
142141
{
143142
return left.dims != right.dims;
144143
}
145-
# endif // _CCCL_NO_THREE_WAY_COMPARISON
144+
#endif // _CCCL_NO_THREE_WAY_COMPARISON
146145
};
147146

148147
/**
@@ -217,7 +216,6 @@ _CCCL_HOST_DEVICE constexpr auto block_dims(T t) noexcept
217216
return level_dimensions<block_level, decltype(dims)>(dims);
218217
}
219218
} // namespace cuda::experimental
220-
#endif // _CCCL_STD_VER >= 2017
221219

222220
#include <cuda/std/__cccl/epilogue.h>
223221

examples/cudax/vector_add/vector.cuh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include <cuda/experimental/__detail/utility.cuh>
3232
#include <cuda/experimental/__launch/param_kind.cuh>
3333

34-
#if _CCCL_STD_VER >= 2017
3534
namespace cuda::experimental
3635
{
3736
using ::cuda::std::span;
@@ -144,4 +143,3 @@ private:
144143
} // namespace cuda::experimental
145144

146145
#endif
147-
#endif

libcudacxx/test/libcudacxx/heterogeneous/helpers.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,6 @@ void validate_device_dynamic(tester_list<Testers...> testers, Args... args)
428428
permute_tests(test_harness, initial_launcher_list{});
429429
}
430430

431-
#if _CCCL_STD_VER >= 2014
432431
template <typename T>
433432
struct manual_object
434433
{
@@ -470,7 +469,6 @@ struct manual_object
470469

471470
template <typename T>
472471
__managed__ manual_object<T> managed_variable{};
473-
#endif
474472

475473
template <typename Creator, typename Destroyer, typename Validator, std::size_t N>
476474
void validate_in_managed_memory_helper(const Creator& creator, const Destroyer& destroyer, Validator (&performers)[N])
@@ -529,7 +527,7 @@ void validate_managed(tester_list<Testers...>, Args... args)
529527
validate_in_managed_memory_helper(device_constructor, device_destructor, host_init_device_check);
530528
validate_in_managed_memory_helper(device_constructor, device_destructor, device_init_host_check);
531529

532-
#if _CCCL_STD_VER >= 2014 && !defined(__clang__)
530+
#if !defined(__clang__)
533531
// The managed variable template part of this test is disabled under clang, pending nvbug 2790305 being fixed.
534532

535533
auto host_variable_constructor = [args...]() -> T* {

thrust/thrust/detail/config/cpp_dialect.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ THRUST_COMPILER_DEPRECATION(MSVC 2019(19.20 / 16.0 / 14.20));
7272
#ifndef CCCL_IGNORE_DEPRECATED_CPP_DIALECT
7373
# if _CCCL_STD_VER < 2017
7474
# error Thrust requires at least C++17. Define CCCL_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.
75-
# endif // _CCCL_STD_VER >= 2017
75+
# endif // _CCCL_STD_VER < 2017
7676
#endif
7777

7878
#undef THRUST_COMP_DEPR_IMPL

0 commit comments

Comments
 (0)