diff --git a/thrust/testing/allocator_aware_policies.cu b/thrust/testing/allocator_aware_policies.cu index f85facf9325..1a206dfb6f2 100644 --- a/thrust/testing/allocator_aware_policies.cu +++ b/thrust/testing/allocator_aware_policies.cu @@ -1,3 +1,8 @@ +#include + +// need to suppress deprecation warnings for execute_with_allocator_and_dependencies here and inside type traits +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #include #include @@ -118,3 +123,5 @@ SimpleUnitTest> TestAllocatorAttachmentInstance; + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/exclusive_scan/counting_iterator.cu b/thrust/testing/async/exclusive_scan/counting_iterator.cu index dd85b4c6e49..4d19e7c1978 100644 --- a/thrust/testing/async/exclusive_scan/counting_iterator.cu +++ b/thrust/testing/async/exclusive_scan/counting_iterator.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -40,3 +44,5 @@ struct test_counting_iterator DECLARE_GENERIC_SIZED_UNITTEST_WITH_TYPES(test_counting_iterator, UnsignedIntegralTypes); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/exclusive_scan/discard_output.cu b/thrust/testing/async/exclusive_scan/discard_output.cu index 7716e35b687..982cf723b9e 100644 --- a/thrust/testing/async/exclusive_scan/discard_output.cu +++ b/thrust/testing/async/exclusive_scan/discard_output.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -37,3 +41,5 @@ struct test_discard DECLARE_GENERIC_SIZED_UNITTEST_WITH_TYPES(test_discard, NumericTypes); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/exclusive_scan/large_indices.cu b/thrust/testing/async/exclusive_scan/large_indices.cu index d03b7fa5662..7bda85b327b 100644 --- a/thrust/testing/async/exclusive_scan/large_indices.cu +++ b/thrust/testing/async/exclusive_scan/large_indices.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -237,3 +241,5 @@ void test_large_indices_custom_scan_op() DECLARE_UNITTEST(test_large_indices_custom_scan_op); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/exclusive_scan/large_types.cu b/thrust/testing/async/exclusive_scan/large_types.cu index 2fea5f39a14..fef9511752f 100644 --- a/thrust/testing/async/exclusive_scan/large_types.cu +++ b/thrust/testing/async/exclusive_scan/large_types.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -52,3 +56,5 @@ struct test_large_types DECLARE_UNITTEST(test_large_types); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/exclusive_scan/mixed_types.cu b/thrust/testing/async/exclusive_scan/mixed_types.cu index b6f1f1cdcf3..4c12f07ae35 100644 --- a/thrust/testing/async/exclusive_scan/mixed_types.cu +++ b/thrust/testing/async/exclusive_scan/mixed_types.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -115,3 +119,5 @@ void test_scan_mixed_types(size_t num_values) DECLARE_SIZED_UNITTEST(test_scan_mixed_types); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/exclusive_scan/simple.cu b/thrust/testing/async/exclusive_scan/simple.cu index e36bea747ed..0c954d8cb44 100644 --- a/thrust/testing/async/exclusive_scan/simple.cu +++ b/thrust/testing/async/exclusive_scan/simple.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -65,3 +69,5 @@ struct test_simple_in_place DECLARE_GENERIC_SIZED_UNITTEST_WITH_TYPES(test_simple_in_place, NumericTypes); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/exclusive_scan/stateful_operator.cu b/thrust/testing/async/exclusive_scan/stateful_operator.cu index 1de89d95ffd..39c6c2e7083 100644 --- a/thrust/testing/async/exclusive_scan/stateful_operator.cu +++ b/thrust/testing/async/exclusive_scan/stateful_operator.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -62,3 +66,5 @@ struct test_stateful_operator DECLARE_GENERIC_SIZED_UNITTEST_WITH_TYPES(test_stateful_operator, NumericTypes); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/exclusive_scan/using_vs_adl.cu b/thrust/testing/async/exclusive_scan/using_vs_adl.cu index fe2bfb2e53e..27e9a3f4d86 100644 --- a/thrust/testing/async/exclusive_scan/using_vs_adl.cu +++ b/thrust/testing/async/exclusive_scan/using_vs_adl.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -168,3 +172,5 @@ void test_using_cpo() DECLARE_UNITTEST(test_using_cpo); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/inclusive_scan/counting_iterator.cu b/thrust/testing/async/inclusive_scan/counting_iterator.cu index da2f755252d..ba4cdb7778e 100644 --- a/thrust/testing/async/inclusive_scan/counting_iterator.cu +++ b/thrust/testing/async/inclusive_scan/counting_iterator.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -39,3 +43,5 @@ struct test_counting_iterator DECLARE_GENERIC_SIZED_UNITTEST_WITH_TYPES(test_counting_iterator, UnsignedIntegralTypes); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/inclusive_scan/discard_output.cu b/thrust/testing/async/inclusive_scan/discard_output.cu index 37c84df977b..6ccd2d9021e 100644 --- a/thrust/testing/async/inclusive_scan/discard_output.cu +++ b/thrust/testing/async/inclusive_scan/discard_output.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -35,3 +39,5 @@ struct test_discard DECLARE_GENERIC_SIZED_UNITTEST_WITH_TYPES(test_discard, NumericTypes); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/inclusive_scan/large_indices.cu b/thrust/testing/async/inclusive_scan/large_indices.cu index 1eb292cc995..c284b16eaad 100644 --- a/thrust/testing/async/inclusive_scan/large_indices.cu +++ b/thrust/testing/async/inclusive_scan/large_indices.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -232,3 +236,5 @@ void test_large_indices_custom_scan_op() DECLARE_UNITTEST(test_large_indices_custom_scan_op); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/inclusive_scan/large_types.cu b/thrust/testing/async/inclusive_scan/large_types.cu index b41257a0369..8e84d4c76ef 100644 --- a/thrust/testing/async/inclusive_scan/large_types.cu +++ b/thrust/testing/async/inclusive_scan/large_types.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -52,3 +56,5 @@ struct test_large_types DECLARE_UNITTEST(test_large_types); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/inclusive_scan/mixed_types.cu b/thrust/testing/async/inclusive_scan/mixed_types.cu index d9f058b120a..1c94c13acf9 100644 --- a/thrust/testing/async/inclusive_scan/mixed_types.cu +++ b/thrust/testing/async/inclusive_scan/mixed_types.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -106,3 +110,5 @@ void test_scan_mixed_types(size_t num_values) DECLARE_SIZED_UNITTEST(test_scan_mixed_types); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/inclusive_scan/simple.cu b/thrust/testing/async/inclusive_scan/simple.cu index 4f7ffcd90bc..18bc0e48e7a 100644 --- a/thrust/testing/async/inclusive_scan/simple.cu +++ b/thrust/testing/async/inclusive_scan/simple.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -90,3 +94,5 @@ struct test_simple_in_place DECLARE_GENERIC_SIZED_UNITTEST_WITH_TYPES(test_simple_in_place, NumericTypes); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/inclusive_scan/stateful_operator.cu b/thrust/testing/async/inclusive_scan/stateful_operator.cu index 0586fac503d..6970f9850c3 100644 --- a/thrust/testing/async/inclusive_scan/stateful_operator.cu +++ b/thrust/testing/async/inclusive_scan/stateful_operator.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -62,3 +66,5 @@ struct test_stateful_operator DECLARE_GENERIC_SIZED_UNITTEST_WITH_TYPES(test_stateful_operator, NumericTypes); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async/inclusive_scan/using_vs_adl.cu b/thrust/testing/async/inclusive_scan/using_vs_adl.cu index 1eb01aba5cd..846cdee108d 100644 --- a/thrust/testing/async/inclusive_scan/using_vs_adl.cu +++ b/thrust/testing/async/inclusive_scan/using_vs_adl.cu @@ -1,3 +1,7 @@ +#include + +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -166,3 +170,5 @@ void test_using_cpo() DECLARE_UNITTEST(test_using_cpo); #endif // C++14 + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async_copy.cu b/thrust/testing/async_copy.cu index f3a4fd0ee41..3975395e275 100644 --- a/thrust/testing/async_copy.cu +++ b/thrust/testing/async_copy.cu @@ -1,3 +1,8 @@ +#include + +// need to suppress deprecation warnings inside a lot of thrust headers +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -10,8 +15,6 @@ # include # include -_CCCL_SUPPRESS_DEPRECATED_PUSH - # define DEFINE_ASYNC_COPY_CALLABLE(name, ...) \ struct THRUST_PP_CAT2(name, _fn) \ { \ @@ -321,3 +324,5 @@ DECLARE_GENERIC_SIZED_UNITTEST_WITH_TYPES(test_async_copy_after, BuiltinNumericT // Can't do this today because we can't do cross-system with explicit policies. #endif + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async_reduce.cu b/thrust/testing/async_reduce.cu index 2d471c55aca..82a347262b4 100644 --- a/thrust/testing/async_reduce.cu +++ b/thrust/testing/async_reduce.cu @@ -1,5 +1,10 @@ #define THRUST_ENABLE_FUTURE_RAW_DATA_MEMBER +#include + +// need to suppress deprecation warnings inside several thrust headers +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #if _CCCL_STD_VER >= 2014 @@ -12,8 +17,6 @@ # include # include -_CCCL_SUPPRESS_DEPRECATED_PUSH - template struct custom_plus { @@ -541,16 +544,12 @@ struct test_async_reduce_using // When you import the customization points into the global namespace, // they should be selected instead of the synchronous algorithms. { - _CCCL_SUPPRESS_DEPRECATED_PUSH using namespace thrust::async; f0a = reduce(d0a.begin(), d0a.end()); - _CCCL_SUPPRESS_DEPRECATED_POP } { - _CCCL_SUPPRESS_DEPRECATED_PUSH using thrust::async::reduce; f0b = reduce(d0b.begin(), d0b.end()); - _CCCL_SUPPRESS_DEPRECATED_POP } // ADL should find the synchronous algorithms. @@ -884,3 +883,5 @@ struct test_async_reduce_bug1886 DECLARE_UNITTEST(test_async_reduce_bug1886); #endif + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/async_sort.cu b/thrust/testing/async_sort.cu index b7de68fceca..a074a27e140 100644 --- a/thrust/testing/async_sort.cu +++ b/thrust/testing/async_sort.cu @@ -1,3 +1,8 @@ +#include + +// need to suppress deprecation warnings inside a lot of thrust headers +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include // Disabled on MSVC && NVCC < 11.1 for GH issue #1098. @@ -15,8 +20,6 @@ # include -_CCCL_SUPPRESS_DEPRECATED_PUSH - enum wait_policy { wait_for_futures, @@ -177,3 +180,5 @@ DECLARE_GENERIC_SIZED_UNITTEST_WITH_TYPES_AND_NAME( // TODO: Test future return type. #endif + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/dependencies_aware_policies.cu b/thrust/testing/dependencies_aware_policies.cu index 214114081cb..9d104ad6700 100644 --- a/thrust/testing/dependencies_aware_policies.cu +++ b/thrust/testing/dependencies_aware_policies.cu @@ -1,3 +1,8 @@ +#include + +// need to suppress deprecation warnings for execute_with_allocator_and_dependencies inside type traits +_CCCL_SUPPRESS_DEPRECATED_PUSH + #include #include @@ -113,3 +118,5 @@ SimpleUnitTest> TestDependencyAttachmentInstance; + +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/testing/event.cu b/thrust/testing/event.cu index ca80b39b8d0..db26adf74f2 100644 --- a/thrust/testing/event.cu +++ b/thrust/testing/event.cu @@ -7,6 +7,10 @@ # include # include +// note: there is no matching _CCCL_SUPPRESS_DEPRECATED_POP, so the warning suppression leaks into more content of the +// generated cudafe1.stub.c file. +_CCCL_SUPPRESS_DEPRECATED_PUSH + /////////////////////////////////////////////////////////////////////////////// _CCCL_HOST void test_event_default_constructed() diff --git a/thrust/testing/future.cu b/thrust/testing/future.cu index f2bc38f5e93..9b8921eeea3 100644 --- a/thrust/testing/future.cu +++ b/thrust/testing/future.cu @@ -7,6 +7,10 @@ # include # include +// note: there is no matching _CCCL_SUPPRESS_DEPRECATED_POP, so the warning suppression leaks into more content of the +// generated cudafe1.stub.c file. +_CCCL_SUPPRESS_DEPRECATED_PUSH + struct mock {}; diff --git a/thrust/thrust/async/copy.h b/thrust/thrust/async/copy.h index 015c6c55192..19d3a061f85 100644 --- a/thrust/thrust/async/copy.h +++ b/thrust/thrust/async/copy.h @@ -51,6 +51,7 @@ namespace async namespace unimplemented { +_CCCL_SUPPRESS_DEPRECATED_PUSH template CCCL_DEPRECATED _CCCL_HOST event async_copy( thrust::execution_policy& from_exec, @@ -63,6 +64,7 @@ CCCL_DEPRECATED _CCCL_HOST event async_copy( "this algorithm is not implemented for the specified system"); return {}; } +_CCCL_SUPPRESS_DEPRECATED_POP } // namespace unimplemented diff --git a/thrust/thrust/async/for_each.h b/thrust/thrust/async/for_each.h index 1b4052dcc77..9be5793835d 100644 --- a/thrust/thrust/async/for_each.h +++ b/thrust/thrust/async/for_each.h @@ -51,6 +51,7 @@ namespace async namespace unimplemented { +_CCCL_SUPPRESS_DEPRECATED_PUSH template CCCL_DEPRECATED _CCCL_HOST event async_for_each(thrust::execution_policy&, ForwardIt, Sentinel, UnaryFunction) @@ -59,6 +60,7 @@ async_for_each(thrust::execution_policy&, ForwardIt, Sentinel, Un "this algorithm is not implemented for the specified system"); return {}; } +_CCCL_SUPPRESS_DEPRECATED_POP } // namespace unimplemented diff --git a/thrust/thrust/async/reduce.h b/thrust/thrust/async/reduce.h index 940bb030ec8..01fbd2df07d 100644 --- a/thrust/thrust/async/reduce.h +++ b/thrust/thrust/async/reduce.h @@ -53,6 +53,7 @@ namespace async namespace unimplemented { +_CCCL_SUPPRESS_DEPRECATED_PUSH template CCCL_DEPRECATED _CCCL_HOST future async_reduce(thrust::execution_policy&, ForwardIt, Sentinel, T, BinaryOp) @@ -61,6 +62,7 @@ async_reduce(thrust::execution_policy&, ForwardIt, Sentinel, T, B "this algorithm is not implemented for the specified system"); return {}; } +_CCCL_SUPPRESS_DEPRECATED_POP } // namespace unimplemented @@ -176,6 +178,7 @@ _CCCL_GLOBAL_CONSTANT reduce_detail::reduce_fn reduce{}; namespace unimplemented { +_CCCL_SUPPRESS_DEPRECATED_PUSH template CCCL_DEPRECATED _CCCL_HOST event async_reduce_into(thrust::execution_policy&, ForwardIt, Sentinel, OutputIt, T, BinaryOp) @@ -184,6 +187,7 @@ async_reduce_into(thrust::execution_policy&, ForwardIt, Sentinel, "this algorithm is not implemented for the specified system"); return {}; } +_CCCL_SUPPRESS_DEPRECATED_POP } // namespace unimplemented diff --git a/thrust/thrust/async/scan.h b/thrust/thrust/async/scan.h index 4cfd0fd6b89..d84c7e37bf3 100644 --- a/thrust/thrust/async/scan.h +++ b/thrust/thrust/async/scan.h @@ -52,6 +52,7 @@ namespace async namespace unimplemented { +_CCCL_SUPPRESS_DEPRECATED_PUSH template CCCL_DEPRECATED event async_inclusive_scan(thrust::execution_policy&, ForwardIt, Sentinel, OutputIt, BinaryOp) @@ -74,6 +75,7 @@ CCCL_DEPRECATED event async_exclusive_scan( "this algorithm is not implemented for the specified system"); return {}; } +_CCCL_SUPPRESS_DEPRECATED_POP } // namespace unimplemented diff --git a/thrust/thrust/async/sort.h b/thrust/thrust/async/sort.h index 22cbc0b8fed..721a5c4539d 100644 --- a/thrust/thrust/async/sort.h +++ b/thrust/thrust/async/sort.h @@ -53,6 +53,7 @@ namespace async namespace unimplemented { +_CCCL_SUPPRESS_DEPRECATED_PUSH template CCCL_DEPRECATED _CCCL_HOST event async_stable_sort(thrust::execution_policy&, ForwardIt, Sentinel, StrictWeakOrdering) @@ -61,6 +62,7 @@ async_stable_sort(thrust::execution_policy&, ForwardIt, Sentinel, "this algorithm is not implemented for the specified system"); return {}; } +_CCCL_SUPPRESS_DEPRECATED_POP } // namespace unimplemented @@ -164,12 +166,14 @@ _CCCL_GLOBAL_CONSTANT stable_sort_detail::stable_sort_fn stable_sort{}; namespace fallback { +_CCCL_SUPPRESS_DEPRECATED_PUSH template CCCL_DEPRECATED _CCCL_HOST event async_sort(thrust::execution_policy& exec, ForwardIt&& first, Sentinel&& last, StrictWeakOrdering&& comp) { return async_stable_sort(thrust::detail::derived_cast(exec), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(comp)); } +_CCCL_SUPPRESS_DEPRECATED_POP } // namespace fallback diff --git a/thrust/thrust/async/transform.h b/thrust/thrust/async/transform.h index b2802994f68..35b98554567 100644 --- a/thrust/thrust/async/transform.h +++ b/thrust/thrust/async/transform.h @@ -51,6 +51,7 @@ namespace async namespace unimplemented { +_CCCL_SUPPRESS_DEPRECATED_PUSH template CCCL_DEPRECATED _CCCL_HOST event async_transform( thrust::execution_policy& exec, ForwardIt first, Sentinel last, OutputIt output, UnaryOperation op) @@ -59,6 +60,7 @@ CCCL_DEPRECATED _CCCL_HOST event async_transform( "this algorithm is not implemented for the specified system"); return {}; } +_CCCL_SUPPRESS_DEPRECATED_POP } // namespace unimplemented diff --git a/thrust/thrust/detail/dependencies_aware_execution_policy.h b/thrust/thrust/detail/dependencies_aware_execution_policy.h index 67ae2825749..59e53299c82 100644 --- a/thrust/thrust/detail/dependencies_aware_execution_policy.h +++ b/thrust/thrust/detail/dependencies_aware_execution_policy.h @@ -29,55 +29,55 @@ #include +_CCCL_SUPPRESS_DEPRECATED_PUSH THRUST_NAMESPACE_BEGIN namespace detail { template