Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop unused TEST_COMPILER_CUDACC_BELOW_11_3 macro #3946

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test()
int main(int, char**)
{
test();

static_assert(test(), "");

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ int main(int, char**)
{
test();
test<const int*>();

static_assert(test(), "");
static_assert(test<const int*>(), ""); // clang otherwise hits the evaluation limit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,7 @@ __host__ __device__
check_noexcept(array);
typename C::iterator i = array.begin();
typename C::const_iterator j = array.cbegin();
#if !defined(TEST_COMPILER_CUDACC_BELOW_11_3) // seems there are different nullptr's
assert(i == j);
#else // ^^^ !TEST_COMPILER_CUDACC_BELOW_11_3 ^^^ / vvv TEST_COMPILER_CUDACC_BELOW_11_3 vvv
assert(i == nullptr);
assert(j == nullptr);
#endif // TEST_COMPILER_CUDACC_BELOW_11_3
}

{
Expand Down Expand Up @@ -146,17 +141,10 @@ __host__ __device__
assert(ii1 == ii4);
static_assert(cuda::std::is_same_v<decltype(ii1), int*>, "");
static_assert(cuda::std::is_same_v<decltype(cii), const int*>, "");
#if !defined(TEST_COMPILER_CUDACC_BELOW_11_3) // old NVCC has issues comparing int* with const int*
assert(ii1 == cii);
#else // ^^^ !TEST_COMPILER_CUDACC_BELOW_11_3 ^^^ / vvv TEST_COMPILER_CUDACC_BELOW_11_3 vvv
assert(ii1 == nullptr);
assert(cii == nullptr);
#endif // TEST_COMPILER_CUDACC_BELOW_11_3

assert(!(ii1 != ii2));
#if !defined(TEST_COMPILER_CUDACC_BELOW_11_3) // old NVCC has issues comparing int* with const int*
assert(!(ii1 != cii));
#endif // TEST_COMPILER_CUDACC_BELOW_11_3

C c = {};
check_noexcept(c);
Expand Down Expand Up @@ -193,16 +181,11 @@ __host__ __device__

assert(!(ii1 != ii2));

#ifndef TEST_COMPILER_CUDACC_BELOW_11_3 // old NVCC has issues comparing int* with const int*
assert((ii1 == cii));
assert((cii == ii1));
assert(!(ii1 != cii));
assert(!(cii != ii1));
#else // ^^^ !TEST_COMPILER_CUDACC_BELOW_11_3 ^^^ / vvv TEST_COMPILER_CUDACC_BELOW_11_3 vvv
assert(ii1 == nullptr);
assert(cii == nullptr);
#endif // TEST_COMPILER_CUDACC_BELOW_11_3
// This breaks NVCCs constexpr evaluator
// This breaks NVCCs constexpr evaluator
if (!TEST_IS_CONSTANT_EVALUATED())
{
assert(!(ii1 < cii));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,16 @@ int main(int, char**)

static_assert(is_array_cons_avail_v<cuda::std::dextents<int, 2>, my_int, 2> == true, "");

#if !defined(TEST_COMPILER_CUDACC_BELOW_11_3)
// Constraint: rank consistency
static_assert(is_array_cons_avail_v<cuda::std::dextents<int, 1>, int, 2> == false, "");

// Constraint: convertibility
static_assert(is_array_cons_avail_v<cuda::std::dextents<my_int, 1>, my_int_non_convertible, 1> == false, "");

// Constraint: nonthrow-constructibility
# ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT
#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT
static_assert(is_array_cons_avail_v<cuda::std::dextents<int, 1>, my_int_non_nothrow_constructible, 1> == false, "");
# endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT
#endif // !defined(TEST_COMPILER_CUDACC_BELOW_11_3)
#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,16 @@ int main(int, char**)

static_assert(is_span_cons_avail_v<cuda::std::dextents<int, 2>, my_int, 2> == true, "");

#if !defined(TEST_COMPILER_CUDACC_BELOW_11_3)
// Constraint: rank consistency
static_assert(is_span_cons_avail_v<cuda::std::dextents<int, 1>, int, 2> == false, "");

// Constraint: convertibility
static_assert(is_span_cons_avail_v<cuda::std::dextents<int, 1>, my_int_non_convertible, 1> == false, "");

// Constraint: nonthrow-constructibility
# ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT
#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT
static_assert(is_span_cons_avail_v<cuda::std::dextents<int, 1>, my_int_non_nothrow_constructible, 1> == false, "");
# endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT
#endif // !defined(TEST_COMPILER_CUDACC_BELOW_11_3)
#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ struct G
__host__ __device__ friend void iter_swap(const PointerTo<G>&, const PointerTo<F>&);
};

#if !defined(TEST_COMPILER_CUDACC_BELOW_11_3)
static_assert(cuda::std::indirectly_swappable<PointerTo<A>, PointerTo<B>>, "");
#endif // !TEST_COMPILER_CUDACC_BELOW_11_3
static_assert(!cuda::std::indirectly_swappable<PointerTo<A>, PointerTo<C>>, "");
static_assert(!cuda::std::indirectly_swappable<PointerTo<A>, PointerTo<D>>, "");
static_assert(!cuda::std::indirectly_swappable<PointerTo<A>, PointerTo<E>>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ static_assert(cuda::std::indirectly_movable_storable<NotAForwardIterator, NotAFo
static_assert(cuda::std::indirectly_swappable<NotAForwardIterator>, "");
static_assert(!cuda::std::permutable<NotAForwardIterator>, "");

#if !defined(TEST_COMPILER_CUDACC_BELOW_11_3)
struct NonCopyable
{
NonCopyable(const NonCopyable&) = delete;
Expand All @@ -39,7 +38,6 @@ static_assert(cuda::std::forward_iterator<NotIMS>, "");
static_assert(!cuda::std::indirectly_movable_storable<NotIMS, NotIMS>, "");
static_assert(cuda::std::indirectly_swappable<NotIMS>, "");
static_assert(!cuda::std::permutable<NotIMS>, "");
#endif // !TEST_COMPILER_CUDACC_BELOW_11_3

// Note: it is impossible for an iterator to satisfy `indirectly_movable_storable` but not `indirectly_swappable`:
// `indirectly_swappable` requires both iterators to be `indirectly_readable` and for `ranges::iter_swap` to be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,11 @@ __host__ __device__ constexpr bool test()
return true;
}

#ifndef TEST_COMPILER_CUDACC_BELOW_11_3 // nvcc segfaults here
static_assert(!cuda::std::is_invocable_v<IterSwapT, int*>, ""); // too few arguments
static_assert(!cuda::std::is_invocable_v<IterSwapT, int*, int*, int*>, ""); // too many arguments
static_assert(!cuda::std::is_invocable_v<IterSwapT, int, int*>, "");
static_assert(!cuda::std::is_invocable_v<IterSwapT, int*, int>, "");
static_assert(!cuda::std::is_invocable_v<IterSwapT, void*, void*>, "");
#endif // TEST_COMPILER_CUDACC_BELOW_11_3

#if TEST_STD_VER > 2017
// Test ADL-proofing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ __host__ __device__ void pointer_test()
runtime_test<const volatile T>();

// The constexpr tests are always const, but we can test them anyway.
#if !defined(TEST_COMPILER_CUDACC_BELOW_11_3)
constexpr_test<T>();
constexpr_test<const T>();

# if !defined(TEST_COMPILER_GCC)
#if !defined(TEST_COMPILER_GCC)
constexpr_test<volatile T>();
constexpr_test<const volatile T>();
# endif // !TEST_COMPILER_GCC
#endif // !TEST_COMPILER_CUDACC_BELOW_11_3
#endif // !TEST_COMPILER_GCC
}

int main(int, char**)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,7 @@ int main(int, char**)
static_assert(testReturnTypes(), "");

testArray();
#ifndef TEST_COMPILER_CUDACC_BELOW_11_3
static_assert(testArray(), "");
#endif // TEST_COMPILER_CUDACC_BELOW_11_3

testBeginMember();
static_assert(testBeginMember(), "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,7 @@ int main(int, char**)
static_assert(testReturnTypes(), "");

testArray();
#ifndef TEST_COMPILER_CUDACC_BELOW_11_3
static_assert(testArray(), "");
#endif // TEST_COMPILER_CUDACC_BELOW_11_3

testEndMember();
static_assert(testEndMember(), "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,7 @@ int main(int, char**)
static_assert(testReturnTypes());

testArray();
#ifndef TEST_COMPILER_CUDACC_BELOW_11_3
static_assert(testArray());
#endif // TEST_COMPILER_CUDACC_BELOW_11_3

testRBeginMember();
static_assert(testRBeginMember());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,7 @@ int main(int, char**)
static_assert(testReturnTypes());

testArray();
#ifndef TEST_COMPILER_CUDACC_BELOW_11_3
static_assert(testArray());
#endif // TEST_COMPILER_CUDACC_BELOW_11_3

testREndMember();
static_assert(testREndMember());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ __host__ __device__ constexpr bool test()
int main(int, char**)
{
test();
#ifndef TEST_COMPILER_CUDACC_BELOW_11_3
static_assert(test());
#endif // TEST_COMPILER_CUDACC_BELOW_11_3

return 0;
}
Loading
Loading