diff --git a/cub/cmake/CubBuildCompilerTargets.cmake b/cub/cmake/CubBuildCompilerTargets.cmake index 2cef662dcaf..4d2b4547048 100644 --- a/cub/cmake/CubBuildCompilerTargets.cmake +++ b/cub/cmake/CubBuildCompilerTargets.cmake @@ -11,6 +11,9 @@ function(cub_build_compiler_targets) set(cxx_compile_options) set(cuda_compile_options) + # Ensure that we build our tests without treating ourself as system header + list(APPEND cxx_compile_definitions "_CCCL_NO_SYSTEM_HEADER") + if ("MSVC" STREQUAL "${CMAKE_CXX_COMPILER_ID}") list(APPEND cxx_compile_definitions _ENABLE_EXTENDED_ALIGNED_STORAGE) list(APPEND cuda_compile_options "--use-local-env") diff --git a/cub/cub/agent/agent_adjacent_difference.cuh b/cub/cub/agent/agent_adjacent_difference.cuh index b135fbbf53b..f5b89daecfe 100644 --- a/cub/cub/agent/agent_adjacent_difference.cuh +++ b/cub/cub/agent/agent_adjacent_difference.cuh @@ -28,6 +28,13 @@ #pragma once #include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../util_type.cuh" #include "../util_namespace.cuh" #include "../block/block_load.cuh" @@ -159,7 +166,7 @@ struct AgentDifference } else { - InputT tile_prev_input = MayAlias + InputT tile_prev_input = MayAlias ? first_tile_previous[tile_idx] : *(input_it + tile_base - 1); diff --git a/cub/cub/agent/agent_batch_memcpy.cuh b/cub/cub/agent/agent_batch_memcpy.cuh index 20db5bb6aec..78f89c61823 100644 --- a/cub/cub/agent/agent_batch_memcpy.cuh +++ b/cub/cub/agent/agent_batch_memcpy.cuh @@ -33,6 +33,14 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/agent/agent_histogram.cuh b/cub/cub/agent/agent_histogram.cuh index 94c2efcaf4e..c4226ba913e 100644 --- a/cub/cub/agent/agent_histogram.cuh +++ b/cub/cub/agent/agent_histogram.cuh @@ -33,11 +33,18 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include "../util_type.cuh" #include "../block/block_load.cuh" -#include "../config.cuh" #include "../grid/grid_queue.cuh" #include "../iterator/cache_modified_input_iterator.cuh" @@ -301,8 +308,8 @@ struct AgentHistogram for (int CHANNEL = 0; CHANNEL < NUM_ACTIVE_CHANNELS; ++CHANNEL) { int channel_bins = num_privatized_bins[CHANNEL]; - for (int privatized_bin = threadIdx.x; - privatized_bin < channel_bins; + for (int privatized_bin = threadIdx.x; + privatized_bin < channel_bins; privatized_bin += BLOCK_THREADS) { int output_bin = -1; @@ -631,7 +638,7 @@ struct AgentHistogram // Consume a partially-full tile at the end of the row OffsetT num_remaining = (num_row_pixels * NUM_CHANNELS) - col_offset; ConsumeTile(tile_offset, num_remaining); - } + } else { // Consume full tile diff --git a/cub/cub/agent/agent_merge_sort.cuh b/cub/cub/agent/agent_merge_sort.cuh index 2e994dd97e1..6a50f3347a4 100644 --- a/cub/cub/agent/agent_merge_sort.cuh +++ b/cub/cub/agent/agent_merge_sort.cuh @@ -28,6 +28,13 @@ #pragma once #include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../util_type.cuh" #include "../util_namespace.cuh" #include "../block/block_load.cuh" diff --git a/cub/cub/agent/agent_radix_sort_downsweep.cuh b/cub/cub/agent/agent_radix_sort_downsweep.cuh index d7e77bb882c..a28bbdfa597 100644 --- a/cub/cub/agent/agent_radix_sort_downsweep.cuh +++ b/cub/cub/agent/agent_radix_sort_downsweep.cuh @@ -35,6 +35,14 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include @@ -44,7 +52,6 @@ #include #include #include -#include #include #include @@ -135,7 +142,7 @@ struct AgentRadixSortDownsweep using ValuesItr = CacheModifiedInputIterator; // Radix ranking type to use - using BlockRadixRankT = + using BlockRadixRankT = cub::detail::block_radix_rank_t< RANK_ALGORITHM, BLOCK_THREADS, RADIX_BITS, IS_DESCENDING, SCAN_ALGORITHM>; @@ -202,7 +209,7 @@ struct AgentRadixSortDownsweep // The global scatter base offset for each digit (valid in the first RADIX_DIGITS threads) OffsetT bin_offset[BINS_TRACKED_PER_THREAD]; - std::uint32_t current_bit; + std::uint32_t current_bit; std::uint32_t num_bits; // Whether to short-cirucit @@ -488,15 +495,15 @@ struct AgentRadixSortDownsweep OffsetT relative_bin_offsets[ITEMS_PER_THREAD]; // Assign default (min/max) value to all keys - bit_ordered_type default_key = IS_DESCENDING - ? traits::min_raw_binary_key(decomposer) + bit_ordered_type default_key = IS_DESCENDING + ? traits::min_raw_binary_key(decomposer) : traits::max_raw_binary_key(decomposer); // Load tile of keys LoadKeys( keys, block_offset, - valid_items, + valid_items, default_key, Int2Type(), Int2Type()); diff --git a/cub/cub/agent/agent_radix_sort_histogram.cuh b/cub/cub/agent/agent_radix_sort_histogram.cuh index 9e895b8d0d2..5d571011482 100644 --- a/cub/cub/agent/agent_radix_sort_histogram.cuh +++ b/cub/cub/agent/agent_radix_sort_histogram.cuh @@ -34,9 +34,16 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../block/block_load.cuh" #include "../block/radix_rank_sort_operations.cuh" -#include "../config.cuh" #include "../thread/thread_reduce.cuh" #include "../util_math.cuh" #include "../util_type.cuh" @@ -120,7 +127,7 @@ struct AgentRadixSortHistogram // thread fields // shared memory storage _TempStorage& s; - + // bins for the histogram OffsetT* d_bins_out; @@ -175,7 +182,7 @@ struct AgentRadixSortHistogram } __device__ __forceinline__ - void LoadTileKeys(OffsetT tile_offset, bit_ordered_type (&keys)[ITEMS_PER_THREAD]) + void LoadTileKeys(OffsetT tile_offset, bit_ordered_type (&keys)[ITEMS_PER_THREAD]) { // tile_offset < num_items always, hence the line below works bool full_tile = num_items - tile_offset >= TILE_ITEMS; @@ -264,7 +271,7 @@ struct AgentRadixSortHistogram AccumulateSharedHistograms(tile_offset, keys); } CTA_SYNC(); - + // Accumulate the result in global memory. AccumulateGlobalHistograms(); CTA_SYNC(); diff --git a/cub/cub/agent/agent_radix_sort_onesweep.cuh b/cub/cub/agent/agent_radix_sort_onesweep.cuh index 6c57d1f0215..190c6c29eb8 100644 --- a/cub/cub/agent/agent_radix_sort_onesweep.cuh +++ b/cub/cub/agent/agent_radix_sort_onesweep.cuh @@ -33,10 +33,17 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../block/block_radix_rank.cuh" #include "../block/radix_rank_sort_operations.cuh" #include "../block/block_store.cuh" -#include "../config.cuh" #include "../util_ptx.cuh" #include "../util_type.cuh" @@ -64,7 +71,7 @@ template < int NOMINAL_BLOCK_THREADS_4B, int NOMINAL_ITEMS_PER_THREAD_4B, typename ComputeT, - /** \brief Number of private histograms to use in the ranker; + /** \brief Number of private histograms to use in the ranker; ignored if the ranking algorithm is not one of RADIX_RANK_MATCH_EARLY_COUNTS_* */ int _RANK_NUM_PARTS, /** \brief Ranking algorithm used in the onesweep kernel. Only algorithms that @@ -106,7 +113,7 @@ struct AgentRadixSortOnesweep RANK_NUM_PARTS = AgentRadixSortOnesweepPolicy::RANK_NUM_PARTS, TILE_ITEMS = BLOCK_THREADS * ITEMS_PER_THREAD, RADIX_BITS = AgentRadixSortOnesweepPolicy::RADIX_BITS, - RADIX_DIGITS = 1 << RADIX_BITS, + RADIX_DIGITS = 1 << RADIX_BITS, BINS_PER_THREAD = (RADIX_DIGITS + BLOCK_THREADS - 1) / BLOCK_THREADS, FULL_BINS = BINS_PER_THREAD * BLOCK_THREADS == RADIX_DIGITS, WARP_THREADS = CUB_PTX_WARP_THREADS, @@ -127,7 +134,7 @@ struct AgentRadixSortOnesweep typename traits::template digit_extractor_t; typedef PortionOffsetT AtomicOffsetT; - + static constexpr RadixRankAlgorithm RANK_ALGORITHM = AgentRadixSortOnesweepPolicy::RANK_ALGORITHM; static constexpr BlockScanAlgorithm SCAN_ALGORITHM = @@ -224,7 +231,7 @@ struct AgentRadixSortOnesweep __device__ __forceinline__ void LookbackPartial(int (&bins)[BINS_PER_THREAD]) { #pragma unroll - for (int u = 0; u < BINS_PER_THREAD; ++u) + for (int u = 0; u < BINS_PER_THREAD; ++u) { int bin = ThreadBin(u); if (FULL_BINS || bin < RADIX_DIGITS) @@ -260,7 +267,7 @@ struct AgentRadixSortOnesweep agent.TryShortCircuit(keys, bins); } }; - + __device__ __forceinline__ void LookbackGlobal(int (&bins)[BINS_PER_THREAD]) { #pragma unroll @@ -452,7 +459,7 @@ struct AgentRadixSortOnesweep { s.global_offsets[bin] = d_bins_in[bin] - offsets[u]; } - } + } } __device__ __forceinline__ void UpdateBinsGlobal(int (&bins)[BINS_PER_THREAD], @@ -512,7 +519,7 @@ struct AgentRadixSortOnesweep constexpr int ITEMS_PER_WARP = TILE_ITEMS / BLOCK_WARPS; constexpr int ALIGN = 8; constexpr auto CACHE_MODIFIER = STORE_CG; - + int warp_start = warp * ITEMS_PER_WARP; int warp_end = (warp + 1) * ITEMS_PER_WARP; int warp_offset = warp_start; @@ -596,11 +603,11 @@ struct AgentRadixSortOnesweep // compute digits corresponding to the keys int digits[ITEMS_PER_THREAD]; ComputeKeyDigits(digits); - + // load values ValueT values[ITEMS_PER_THREAD]; LoadValues(block_idx * TILE_ITEMS, values); - + // scatter values CTA_SYNC(); ScatterValuesShared(values, ranks); @@ -608,7 +615,7 @@ struct AgentRadixSortOnesweep CTA_SYNC(); ScatterValuesGlobal(digits); } - + __device__ __forceinline__ void GatherScatterValues( int (&ranks)[ITEMS_PER_THREAD], Int2Type keys_only) {} @@ -628,7 +635,7 @@ struct AgentRadixSortOnesweep BlockRadixRankT(s.rank_temp_storage).RankKeys( keys, ranks, digit_extractor(), exclusive_digit_prefix, CountsCallback(*this, bins, keys)); - + // scatter keys in shared memory CTA_SYNC(); ScatterKeysShared(keys, ranks); @@ -637,7 +644,7 @@ struct AgentRadixSortOnesweep LoadBinsToOffsetsGlobal(exclusive_digit_prefix); LookbackGlobal(bins); UpdateBinsGlobal(bins, exclusive_digit_prefix); - + // scatter keys in global memory CTA_SYNC(); ScatterKeysGlobal(); diff --git a/cub/cub/agent/agent_radix_sort_upsweep.cuh b/cub/cub/agent/agent_radix_sort_upsweep.cuh index 1a534454627..da048835da9 100644 --- a/cub/cub/agent/agent_radix_sort_upsweep.cuh +++ b/cub/cub/agent/agent_radix_sort_upsweep.cuh @@ -33,12 +33,19 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../thread/thread_reduce.cuh" #include "../thread/thread_load.cuh" #include "../warp/warp_reduce.cuh" #include "../block/block_load.cuh" #include "../block/radix_rank_sort_operations.cuh" -#include "../config.cuh" #include "../util_type.cuh" #include "../iterator/cache_modified_input_iterator.cuh" @@ -321,7 +328,7 @@ struct AgentRadixSortUpsweep const OffsetT &block_end) { // Process partial tile if necessary using single loads - for (OffsetT offset = threadIdx.x; offset < block_end - block_offset; offset += BLOCK_THREADS) + for (OffsetT offset = threadIdx.x; offset < block_end - block_offset; offset += BLOCK_THREADS) { // Load and bucket key bit_ordered_type key = d_keys_in[block_offset + offset]; @@ -346,7 +353,7 @@ struct AgentRadixSortUpsweep : temp_storage(temp_storage.Alias()), d_keys_in(reinterpret_cast(d_keys_in)), - current_bit(current_bit), + current_bit(current_bit), num_bits(num_bits), decomposer(decomposer) {} diff --git a/cub/cub/agent/agent_reduce.cuh b/cub/cub/agent/agent_reduce.cuh index 4a29d707b30..697f427eda5 100644 --- a/cub/cub/agent/agent_reduce.cuh +++ b/cub/cub/agent/agent_reduce.cuh @@ -13,9 +13,9 @@ * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; @@ -27,17 +27,24 @@ ******************************************************************************/ /** - * @file cub::AgentReduce implements a stateful abstraction of CUDA thread + * @file cub::AgentReduce implements a stateful abstraction of CUDA thread * blocks for participating in device-wide reduction. */ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include -#include #include #include #include @@ -368,7 +375,7 @@ struct AgentReduce .Reduce(thread_aggregate, reduction_op, valid_items); } - // Extracting this into a function saves 8% of generated kernel size by allowing to reuse + // Extracting this into a function saves 8% of generated kernel size by allowing to reuse // the block reduction below. This also workaround hang in nvcc. ConsumeFullTileRange(thread_aggregate, even_share, can_vectorize); @@ -439,7 +446,7 @@ private: even_share.block_offset += even_share.block_stride; - // Consume subsequent full tiles of input, at least one full tile was processed, so + // Consume subsequent full tiles of input, at least one full tile was processed, so // `even_share.block_end >= TILE_ITEMS` while (even_share.block_offset <= even_share.block_end - TILE_ITEMS) { diff --git a/cub/cub/agent/agent_reduce_by_key.cuh b/cub/cub/agent/agent_reduce_by_key.cuh index f04fb73f053..79ee04dd85c 100644 --- a/cub/cub/agent/agent_reduce_by_key.cuh +++ b/cub/cub/agent/agent_reduce_by_key.cuh @@ -33,12 +33,19 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include #include #include -#include #include #include @@ -68,8 +75,8 @@ CUB_NAMESPACE_BEGIN * @tparam _SCAN_ALGORITHM * The BlockScan algorithm to use * - * @tparam DelayConstructorT - * Implementation detail, do not specify directly, requirements on the + * @tparam DelayConstructorT + * Implementation detail, do not specify directly, requirements on the * content of this type are subject to breaking change. */ template #include "single_pass_scan_operators.cuh" @@ -41,7 +49,6 @@ #include "../block/block_scan.cuh" #include "../block/block_exchange.cuh" #include "../block/block_discontinuity.cuh" -#include "../config.cuh" #include "../grid/grid_queue.cuh" #include "../iterator/cache_modified_input_iterator.cuh" #include "../iterator/constant_input_iterator.cuh" @@ -56,28 +63,28 @@ CUB_NAMESPACE_BEGIN /** * Parameterizable tuning policy type for AgentRle * - * @tparam _BLOCK_THREADS + * @tparam _BLOCK_THREADS * Threads per thread block * - * @tparam _ITEMS_PER_THREAD + * @tparam _ITEMS_PER_THREAD * Items per thread (per tile of input) * - * @tparam _LOAD_ALGORITHM + * @tparam _LOAD_ALGORITHM * The BlockLoad algorithm to use * - * @tparam _LOAD_MODIFIER + * @tparam _LOAD_MODIFIER * Cache load modifier for reading input elements * - * @tparam _STORE_WARP_TIME_SLICING - * Whether or not only one warp's worth of shared memory should be allocated and time-sliced among - * block-warps during any store-related data transpositions + * @tparam _STORE_WARP_TIME_SLICING + * Whether or not only one warp's worth of shared memory should be allocated and time-sliced among + * block-warps during any store-related data transpositions * (versus each warp having its own storage) * - * @tparam _SCAN_ALGORITHM + * @tparam _SCAN_ALGORITHM * The BlockScan algorithm to use * - * @tparam DelayConstructorT - * Implementation detail, do not specify directly, requirements on the + * @tparam DelayConstructorT + * Implementation detail, do not specify directly, requirements on the * content of this type are subject to breaking change. */ template #include #include #include #include -#include #include #include @@ -73,8 +80,8 @@ CUB_NAMESPACE_BEGIN * @tparam _SCAN_ALGORITHM * The BlockScan algorithm to use * - * @tparam DelayConstructorT - * Implementation detail, do not specify directly, requirements on the + * @tparam DelayConstructorT + * Implementation detail, do not specify directly, requirements on the * content of this type are subject to breaking change. */ template #include #include #include #include -#include #include #include @@ -52,8 +59,8 @@ CUB_NAMESPACE_BEGIN /** * Parameterizable tuning policy type for AgentScanByKey * - * @tparam DelayConstructorT - * Implementation detail, do not specify directly, requirements on the + * @tparam DelayConstructorT + * Implementation detail, do not specify directly, requirements on the * content of this type are subject to breaking change. */ template #include "single_pass_scan_operators.cuh" @@ -40,7 +48,6 @@ #include "../block/block_store.cuh" #include "../block/block_scan.cuh" #include "../block/block_discontinuity.cuh" -#include "../config.cuh" #include "../iterator/cache_modified_input_iterator.cuh" #include "../iterator/constant_input_iterator.cuh" @@ -240,7 +247,7 @@ struct AgentSegmentFixup else BlockLoadPairs(temp_storage.load_pairs).Load(d_pairs_in + tile_offset, pairs); - // RLE + // RLE #pragma unroll for (int ITEM = 1; ITEM < ITEMS_PER_THREAD; ++ITEM) { diff --git a/cub/cub/agent/agent_segmented_radix_sort.cuh b/cub/cub/agent/agent_segmented_radix_sort.cuh index a629771120e..b869ec60908 100644 --- a/cub/cub/agent/agent_segmented_radix_sort.cuh +++ b/cub/cub/agent/agent_segmented_radix_sort.cuh @@ -27,10 +27,17 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include -#include #include #include @@ -152,7 +159,7 @@ struct AgentSegmentedRadixSort // Lowest() -> -1.79769e+308 = 00...00b -> TwiddleIn -> -0 = 10...00b // LOWEST -> -nan = 11...11b -> TwiddleIn -> 0 = 00...00b - bit_ordered_type default_key_bits = IS_DESCENDING + bit_ordered_type default_key_bits = IS_DESCENDING ? traits::min_raw_binary_key(decomposer) : traits::max_raw_binary_key(decomposer); KeyT oob_default = reinterpret_cast(default_key_bits); diff --git a/cub/cub/agent/agent_select_if.cuh b/cub/cub/agent/agent_select_if.cuh index fcccffe7f6a..564316b30dd 100644 --- a/cub/cub/agent/agent_select_if.cuh +++ b/cub/cub/agent/agent_select_if.cuh @@ -33,6 +33,14 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include "single_pass_scan_operators.cuh" @@ -41,7 +49,6 @@ #include "../block/block_scan.cuh" #include "../block/block_exchange.cuh" #include "../block/block_discontinuity.cuh" -#include "../config.cuh" #include "../grid/grid_queue.cuh" #include "../iterator/cache_modified_input_iterator.cuh" @@ -55,23 +62,23 @@ CUB_NAMESPACE_BEGIN /** * Parameterizable tuning policy type for AgentSelectIf * - * @tparam _BLOCK_THREADS + * @tparam _BLOCK_THREADS * Threads per thread block * - * @tparam _ITEMS_PER_THREAD + * @tparam _ITEMS_PER_THREAD * Items per thread (per tile of input) * - * @tparam _LOAD_ALGORITHM + * @tparam _LOAD_ALGORITHM * The BlockLoad algorithm to use * - * @tparam _LOAD_MODIFIER + * @tparam _LOAD_MODIFIER * Cache load modifier for reading input elements * - * @tparam _SCAN_ALGORITHM + * @tparam _SCAN_ALGORITHM * The BlockScan algorithm to use * - * @tparam DelayConstructorT - * Implementation detail, do not specify directly, requirements on the + * @tparam DelayConstructorT + * Implementation detail, do not specify directly, requirements on the * content of this type are subject to breaking change. */ template #include "../util_type.cuh" #include "../block/block_reduce.cuh" #include "../block/block_scan.cuh" #include "../block/block_exchange.cuh" -#include "../config.cuh" #include "../thread/thread_search.cuh" #include "../thread/thread_operators.cuh" #include "../iterator/cache_modified_input_iterator.cuh" diff --git a/cub/cub/agent/agent_sub_warp_merge_sort.cuh b/cub/cub/agent/agent_sub_warp_merge_sort.cuh index 21ca2e5030c..e53ec5e6f7e 100644 --- a/cub/cub/agent/agent_sub_warp_merge_sort.cuh +++ b/cub/cub/agent/agent_sub_warp_merge_sort.cuh @@ -27,8 +27,15 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include #include @@ -159,21 +166,21 @@ class AgentSubWarpSort return lhs == rhs; } - __device__ static bool get_oob_default(Int2Type /* is bool */) + __device__ static bool get_oob_default(Int2Type /* is bool */) { // Traits::MAX_KEY for `bool` is 0xFF which is different from `true` and makes // comparison with oob unreliable. return !IS_DESCENDING; } - __device__ static KeyT get_oob_default(Int2Type /* is bool */) + __device__ static KeyT get_oob_default(Int2Type /* is bool */) { // For FP64 the difference is: // Lowest() -> -1.79769e+308 = 00...00b -> TwiddleIn -> -0 = 10...00b // LOWEST -> -nan = 11...11b -> TwiddleIn -> 0 = 00...00b // Segmented sort doesn't support custom types at the moment. - bit_ordered_type default_key_bits = IS_DESCENDING + bit_ordered_type default_key_bits = IS_DESCENDING ? traits::min_raw_binary_key(detail::identity_decomposer_t{}) : traits::max_raw_binary_key(detail::identity_decomposer_t{}); return reinterpret_cast(default_key_bits); @@ -253,7 +260,7 @@ public: KeyT keys[PolicyT::ITEMS_PER_THREAD]; ValueT values[PolicyT::ITEMS_PER_THREAD]; - KeyT oob_default = + KeyT oob_default = AgentSubWarpSort::get_oob_default(Int2Type::value>{}); WarpLoadKeysT(storage.load_keys) diff --git a/cub/cub/agent/agent_three_way_partition.cuh b/cub/cub/agent/agent_three_way_partition.cuh index 93cc8d3966e..17ec5aa0fe2 100644 --- a/cub/cub/agent/agent_three_way_partition.cuh +++ b/cub/cub/agent/agent_three_way_partition.cuh @@ -27,6 +27,14 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include @@ -36,7 +44,6 @@ #include #include #include -#include #include diff --git a/cub/cub/agent/agent_unique_by_key.cuh b/cub/cub/agent/agent_unique_by_key.cuh index bf943a00b09..a7b9e0a367b 100644 --- a/cub/cub/agent/agent_unique_by_key.cuh +++ b/cub/cub/agent/agent_unique_by_key.cuh @@ -32,6 +32,14 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include @@ -51,8 +59,8 @@ CUB_NAMESPACE_BEGIN /** * Parameterizable tuning policy type for AgentUniqueByKey * - * @tparam DelayConstructorT - * Implementation detail, do not specify directly, requirements on the + * @tparam DelayConstructorT + * Implementation detail, do not specify directly, requirements on the * content of this type are subject to breaking change. */ template (num_items - tile_offset); OffsetT num_selections = ConsumeTile(num_remaining, - tile_idx, + tile_idx, tile_offset, tile_state); - if (threadIdx.x == 0) + if (threadIdx.x == 0) { *d_num_selected_out = num_selections; } diff --git a/cub/cub/agent/single_pass_scan_operators.cuh b/cub/cub/agent/single_pass_scan_operators.cuh index 342e859246c..ff8a4e18347 100644 --- a/cub/cub/agent/single_pass_scan_operators.cuh +++ b/cub/cub/agent/single_pass_scan_operators.cuh @@ -33,9 +33,16 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include #include @@ -110,22 +117,22 @@ enum ScanTileStatus SCAN_TILE_INCLUSIVE, // Inclusive tile prefix is available }; -namespace detail +namespace detail { template __device__ __forceinline__ void delay() { NV_IF_TARGET(NV_PROVIDES_SM_70, - (if (Delay > 0) + (if (Delay > 0) { - if (gridDim.x < GridThreshold) + if (gridDim.x < GridThreshold) { __threadfence_block(); } - else + else { - __nanosleep(Delay); + __nanosleep(Delay); } })); } @@ -134,15 +141,15 @@ template __device__ __forceinline__ void delay(int ns) { NV_IF_TARGET(NV_PROVIDES_SM_70, - (if (ns > 0) + (if (ns > 0) { - if (gridDim.x < GridThreshold) + if (gridDim.x < GridThreshold) { __threadfence_block(); } - else + else { - __nanosleep(ns); + __nanosleep(ns); } })); } @@ -194,7 +201,7 @@ struct no_delay_constructor_t { struct delay_t { - __device__ __forceinline__ void operator()() + __device__ __forceinline__ void operator()() { NV_IF_TARGET(NV_PROVIDES_SM_70, (), @@ -215,7 +222,7 @@ struct reduce_by_key_delay_constructor_t { struct delay_t { - __device__ __forceinline__ void operator()() + __device__ __forceinline__ void operator()() { NV_DISPATCH_TARGET( NV_IS_EXACTLY_SM_80, (delay();), @@ -262,7 +269,7 @@ struct exponential_backoff_constructor_t } }; - __device__ __forceinline__ exponential_backoff_constructor_t(unsigned int /* seed */) + __device__ __forceinline__ exponential_backoff_constructor_t(unsigned int /* seed */) { always_delay(); } @@ -437,7 +444,7 @@ struct exponential_backon_constructor_t unsigned int max_delay = InitialDelay; - __device__ __forceinline__ exponential_backon_constructor_t(unsigned int /* seed */) + __device__ __forceinline__ exponential_backon_constructor_t(unsigned int /* seed */) { always_delay(); } @@ -613,7 +620,7 @@ struct ScanTileState /** * Wait for the corresponding tile to become non-invalid */ - template > + template > __device__ __forceinline__ void WaitForValid( int tile_idx, StatusWord &status, @@ -628,7 +635,7 @@ struct ScanTileState } while (WARP_ANY((tile_descriptor.status == SCAN_TILE_INVALID), 0xffffffff)) - { + { delay_or_prevent_hoisting(); TxnWord alias = detail::load_relaxed(d_tile_descriptors + TILE_STATUS_PADDING + tile_idx); tile_descriptor = reinterpret_cast(alias); @@ -642,11 +649,11 @@ struct ScanTileState * Loads and returns the tile's value. The returned value is undefined if either (a) the tile's status is invalid or * (b) there is no memory fence between reading a non-invalid status and the call to LoadValid. */ - __device__ __forceinline__ T LoadValid(int tile_idx) - { + __device__ __forceinline__ T LoadValid(int tile_idx) + { TxnWord alias = d_tile_descriptors[TILE_STATUS_PADDING + tile_idx]; TileDescriptor tile_descriptor = reinterpret_cast(alias); - return tile_descriptor.value; + return tile_descriptor.value; } }; @@ -704,7 +711,7 @@ struct ScanTileState error = CubDebug( AliasTemporaries(d_temp_storage, temp_storage_bytes, allocations, allocation_sizes)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -784,7 +791,7 @@ struct ScanTileState /** * Wait for the corresponding tile to become non-invalid */ - template + template __device__ __forceinline__ void WaitForValid( int tile_idx, StatusWord &status, @@ -798,7 +805,7 @@ struct ScanTileState __threadfence(); } while (WARP_ANY((status == SCAN_TILE_INVALID), 0xffffffff)); - if (status == StatusWord(SCAN_TILE_PARTIAL)) + if (status == StatusWord(SCAN_TILE_PARTIAL)) { value = ThreadLoad(d_tile_partial + TILE_STATUS_PADDING + tile_idx); } @@ -812,9 +819,9 @@ struct ScanTileState * Loads and returns the tile's value. The returned value is undefined if either (a) the tile's status is invalid or * (b) there is no memory fence between reading a non-invalid status and the call to LoadValid. */ - __device__ __forceinline__ T LoadValid(int tile_idx) - { - return d_tile_inclusive[TILE_STATUS_PADDING + tile_idx]; + __device__ __forceinline__ T LoadValid(int tile_idx) + { + return d_tile_inclusive[TILE_STATUS_PADDING + tile_idx]; } }; @@ -1008,7 +1015,7 @@ struct ReduceByKeyScanTileState /** * Wait for the corresponding tile to become non-invalid */ - template ::delay_t> + template ::delay_t> __device__ __forceinline__ void WaitForValid( int tile_idx, StatusWord &status, @@ -1058,8 +1065,8 @@ struct ReduceByKeyScanTileState * the current tile by using the call-back warp to wait on on * aggregates/prefixes from predecessor tiles to become available. * - * @tparam DelayConstructorT - * Implementation detail, do not specify directly, requirements on the + * @tparam DelayConstructorT + * Implementation detail, do not specify directly, requirements on the * content of this type are subject to breaking change. */ template < @@ -1096,7 +1103,7 @@ struct TilePrefixCallbackOp T exclusive_prefix; ///< Exclusive prefix for the tile T inclusive_prefix; ///< Inclusive prefix for the tile - // Constructs prefix functor for a given tile index. + // Constructs prefix functor for a given tile index. // Precondition: thread blocks processing all of the predecessor tiles were scheduled. __device__ __forceinline__ TilePrefixCallbackOp(ScanTileStateT &tile_status, TempStorage &temp_storage, @@ -1117,7 +1124,7 @@ struct TilePrefixCallbackOp {} // Block until all predecessors within the warp-wide window have non-invalid status - template > + template > __device__ __forceinline__ void ProcessWindow( int predecessor_idx, ///< Preceding tile index to inspect diff --git a/cub/cub/block/block_adjacent_difference.cuh b/cub/cub/block/block_adjacent_difference.cuh index b62c7fb23ec..b24b4bf5c5d 100644 --- a/cub/cub/block/block_adjacent_difference.cuh +++ b/cub/cub/block/block_adjacent_difference.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2021, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -36,6 +36,13 @@ #pragma once #include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../util_type.cuh" #include "../util_ptx.cuh" @@ -489,7 +496,7 @@ public: } /** - * @brief Subtracts the left element of each adjacent pair of elements + * @brief Subtracts the left element of each adjacent pair of elements * partitioned across a CUDA thread block. * * @par @@ -497,7 +504,7 @@ public: * - \smemreuse * * @par Snippet - * The code snippet below illustrates how to use @p BlockAdjacentDifference + * The code snippet below illustrates how to use @p BlockAdjacentDifference * to compute the left difference between adjacent elements. * * @par @@ -516,7 +523,7 @@ public: * * __global__ void ExampleKernel(...) * { - * // Specialize BlockAdjacentDifference for a 1D block of + * // Specialize BlockAdjacentDifference for a 1D block of * // 128 threads of type int * using BlockAdjacentDifferenceT = * cub::BlockAdjacentDifference; @@ -607,7 +614,7 @@ public: } /** - * @brief Subtracts the left element of each adjacent pair of elements + * @brief Subtracts the left element of each adjacent pair of elements * partitioned across a CUDA thread block. * * @par @@ -615,7 +622,7 @@ public: * - \smemreuse * * @par Snippet - * The code snippet below illustrates how to use @p BlockAdjacentDifference + * The code snippet below illustrates how to use @p BlockAdjacentDifference * to compute the left difference between adjacent elements. * * @par @@ -634,7 +641,7 @@ public: * * __global__ void ExampleKernel(...) * { - * // Specialize BlockAdjacentDifference for a 1D block of + * // Specialize BlockAdjacentDifference for a 1D block of * // 128 threads of type int * using BlockAdjacentDifferenceT = * cub::BlockAdjacentDifference; @@ -725,9 +732,9 @@ public: { output[0] = input[0]; } - else if (linear_tid == 0) + else if (linear_tid == 0) { - output[0] = difference_op(input[0], + output[0] = difference_op(input[0], tile_predecessor_item); } else diff --git a/cub/cub/block/block_discontinuity.cuh b/cub/cub/block/block_discontinuity.cuh index a3bf17f3190..b94e125e93c 100644 --- a/cub/cub/block/block_discontinuity.cuh +++ b/cub/cub/block/block_discontinuity.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -34,6 +34,13 @@ #pragma once #include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../util_type.cuh" #include "../util_ptx.cuh" diff --git a/cub/cub/block/block_exchange.cuh b/cub/cub/block/block_exchange.cuh index 5f4bc2e84a8..d6a7cfbbbe8 100644 --- a/cub/cub/block/block_exchange.cuh +++ b/cub/cub/block/block_exchange.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,7 +33,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/block/block_histogram.cuh b/cub/cub/block/block_histogram.cuh index b9ab759607d..949bd2bcb34 100644 --- a/cub/cub/block/block_histogram.cuh +++ b/cub/cub/block/block_histogram.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,9 +33,16 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "specializations/block_histogram_sort.cuh" #include "specializations/block_histogram_atomic.cuh" -#include "../config.cuh" #include "../util_ptx.cuh" CUB_NAMESPACE_BEGIN diff --git a/cub/cub/block/block_load.cuh b/cub/cub/block/block_load.cuh index b419ab6e726..5af8abca9e1 100644 --- a/cub/cub/block/block_load.cuh +++ b/cub/cub/block/block_load.cuh @@ -33,12 +33,19 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include "../block/block_exchange.cuh" #include "../iterator/cache_modified_input_iterator.cuh" -#include "../config.cuh" #include "../util_ptx.cuh" #include "../util_type.cuh" diff --git a/cub/cub/block/block_merge_sort.cuh b/cub/cub/block/block_merge_sort.cuh index dc07ef6c294..7e414cdc4be 100644 --- a/cub/cub/block/block_merge_sort.cuh +++ b/cub/cub/block/block_merge_sort.cuh @@ -27,6 +27,14 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/block/block_radix_rank.cuh b/cub/cub/block/block_radix_rank.cuh index 18655af4f0b..8495947789c 100644 --- a/cub/cub/block/block_radix_rank.cuh +++ b/cub/cub/block/block_radix_rank.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,13 +33,20 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include "../thread/thread_reduce.cuh" #include "../thread/thread_scan.cuh" #include "../block/block_scan.cuh" #include "../block/radix_rank_sort_operations.cuh" -#include "../config.cuh" #include "../util_ptx.cuh" #include "../util_type.cuh" @@ -102,7 +109,7 @@ struct warp_in_block_matcher_t { static __device__ std::uint32_t match_any(std::uint32_t label, std::uint32_t warp_id) { - if (warp_id == static_cast(PartialWarpId)) + if (warp_id == static_cast(PartialWarpId)) { return MatchAny(label); } @@ -155,7 +162,7 @@ struct warp_in_block_matcher_t * constexpr int block_threads = 2; * constexpr int radix_bits = 5; * - * // Specialize BlockRadixRank for a 1D block of 2 threads + * // Specialize BlockRadixRank for a 1D block of 2 threads * using block_radix_rank = cub::BlockRadixRank; * using storage_t = typename block_radix_rank::TempStorage; * @@ -172,7 +179,7 @@ struct warp_in_block_matcher_t * * ... * \endcode - * Suppose the set of input `keys` across the block of threads is `{ [16,10], [9,11] }`. + * Suppose the set of input `keys` across the block of threads is `{ [16,10], [9,11] }`. * The corresponding output `ranks` in those threads will be `{ [3,1], [0,2] }`. * * \par Re-using dynamically allocating shared memory @@ -758,8 +765,8 @@ public: // Mask of peers who have same digit as me uint32_t peer_mask = detail::warp_in_block_matcher_t< - RADIX_BITS, - PARTIAL_WARP_THREADS, + RADIX_BITS, + PARTIAL_WARP_THREADS, WARPS - 1>::match_any(digit, warp_id); // Pointer to smem digit counter for this key @@ -918,7 +925,7 @@ struct BlockRadixRankMatchEarlyCounts // types typedef cub::BlockScan BlockScan; - + // temporary storage struct TempStorage @@ -981,7 +988,7 @@ struct BlockRadixRankMatchEarlyCounts for (int bin = lane; bin < RADIX_DIGITS; bin += WARP_THREADS) { match_masks[bin] = 0; - } + } } WARP_SYNC(WARP_MASK); @@ -992,7 +999,7 @@ struct BlockRadixRankMatchEarlyCounts { atomicAdd(&warp_histograms[Digit(keys[u])][part], 1); } - + // sum different parts; // no extra work is necessary if NUM_PARTS == 1 if (NUM_PARTS > 1) @@ -1025,7 +1032,7 @@ struct BlockRadixRankMatchEarlyCounts { // sum up warp-private histograms #pragma unroll - for (int u = 0; u < BINS_PER_THREAD; ++u) + for (int u = 0; u < BINS_PER_THREAD; ++u) { bins[u] = 0; int bin = ThreadBin(u); @@ -1127,12 +1134,12 @@ struct BlockRadixRankMatchEarlyCounts int (&exclusive_digit_prefix)[BINS_PER_THREAD]) { ComputeHistogramsWarp(keys); - + CTA_SYNC(); int bins[BINS_PER_THREAD]; ComputeOffsetsWarpUpsweep(bins); callback(bins); - + BlockScan(s.prefix_tmp).ExclusiveSum(bins, exclusive_digit_prefix); ComputeOffsetsWarpDownsweep(exclusive_digit_prefix); @@ -1164,7 +1171,7 @@ struct BlockRadixRankMatchEarlyCounts { BlockRadixRankMatchInternal internal(temp_storage, digit_extractor, callback); - internal.RankKeys(keys, ranks, exclusive_digit_prefix); + internal.RankKeys(keys, ranks, exclusive_digit_prefix); } template @@ -1193,13 +1200,13 @@ struct BlockRadixRankMatchEarlyCounts #ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document -namespace detail +namespace detail { -// `BlockRadixRank` doesn't conform to the typical pattern, not exposing the algorithm -// template parameter. Other algorithms don't provide the same template parameters, not allowing -// multi-dimensional thread block specializations. -// +// `BlockRadixRank` doesn't conform to the typical pattern, not exposing the algorithm +// template parameter. Other algorithms don't provide the same template parameters, not allowing +// multi-dimensional thread block specializations. +// // TODO(senior-zero) for 3.0: // - Put existing implementations into the detail namespace // - Support multi-dimensional thread blocks in the rest of implementations diff --git a/cub/cub/block/block_radix_sort.cuh b/cub/cub/block/block_radix_sort.cuh index e275d6f611e..1a98a66f646 100644 --- a/cub/cub/block/block_radix_sort.cuh +++ b/cub/cub/block/block_radix_sort.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -34,18 +34,25 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "block_exchange.cuh" #include "block_radix_rank.cuh" #include "radix_rank_sort_operations.cuh" -#include "../config.cuh" #include "../util_ptx.cuh" #include "../util_type.cuh" CUB_NAMESPACE_BEGIN //! @rst -//! BlockRadixSort class provides :ref:`collective ` methods for sorting -//! items partitioned across a CUDA thread block using a radix sorting method. +//! BlockRadixSort class provides :ref:`collective ` methods for sorting +//! items partitioned across a CUDA thread block using a radix sorting method. //! //! .. image:: ../img/sorting_logo.png //! :align: center @@ -156,7 +163,7 @@ CUB_NAMESPACE_BEGIN //! ... //! //! Suppose the set of input ``thread_keys`` across the block of threads is -//! ``{ [0,511,1,510], [2,509,3,508], [4,507,5,506], ..., [254,257,255,256] }``. +//! ``{ [0,511,1,510], [2,509,3,508], [4,507,5,506], ..., [254,257,255,256] }``. //! The corresponding output ``thread_keys`` in those threads will be //! ``{ [0,1,2,3], [4,5,6,7], [8,9,10,11], ..., [508,509,510,511] }``. //! @@ -173,40 +180,40 @@ CUB_NAMESPACE_BEGIN //! //! @ingroup BlockModule //! -//! @tparam KeyT +//! @tparam KeyT //! KeyT type //! -//! @tparam BLOCK_DIM_X +//! @tparam BLOCK_DIM_X //! The thread block length in threads along the X dimension //! -//! @tparam ITEMS_PER_THREAD +//! @tparam ITEMS_PER_THREAD //! The number of items per thread //! -//! @tparam ValueT +//! @tparam ValueT //! **[optional]** ValueT type (default: cub::NullType, which indicates a keys-only sort) //! -//! @tparam RADIX_BITS +//! @tparam RADIX_BITS //! **[optional]** The number of radix bits per digit place (default: 4 bits) //! -//! @tparam MEMOIZE_OUTER_SCAN -//! **[optional]** Whether or not to buffer outer raking scan partials to incur fewer shared memory -//! reads at the expense of higher register pressure (default: true for architectures SM35 and +//! @tparam MEMOIZE_OUTER_SCAN +//! **[optional]** Whether or not to buffer outer raking scan partials to incur fewer shared memory +//! reads at the expense of higher register pressure (default: true for architectures SM35 and //! newer, false otherwise). //! -//! @tparam INNER_SCAN_ALGORITHM -//! **[optional]** The cub::BlockScanAlgorithm algorithm to use +//! @tparam INNER_SCAN_ALGORITHM +//! **[optional]** The cub::BlockScanAlgorithm algorithm to use //! (default: cub::BLOCK_SCAN_WARP_SCANS) //! -//! @tparam SMEM_CONFIG +//! @tparam SMEM_CONFIG //! **[optional]*8 Shared memory bank mode (default: `cudaSharedMemBankSizeFourByte`) //! -//! @tparam BLOCK_DIM_Y +//! @tparam BLOCK_DIM_Y //! **[optional]** The thread block length in threads along the Y dimension (default: 1) //! -//! @tparam BLOCK_DIM_Z +//! @tparam BLOCK_DIM_Z //! **[optional]** The thread block length in threads along the Z dimension (default: 1) //! -//! @tparam LEGACY_PTX_ARCH +//! @tparam LEGACY_PTX_ARCH //! **[optional]** Unused template < typename KeyT, @@ -575,7 +582,7 @@ public: } //! @rst - //! Performs an ascending block-wide radix sort over a + //! Performs an ascending block-wide radix sort over a //! :ref:`blocked arrangement ` of keys. //! //! * @granularity @@ -608,27 +615,27 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template __device__ __forceinline__ // @@ -648,7 +655,7 @@ public: } //! @rst - //! Performs an ascending block-wide radix sort over a + //! Performs an ascending block-wide radix sort over a //! :ref:`blocked arrangement ` of keys. //! //! * @granularity @@ -681,19 +688,19 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. template __device__ __forceinline__ // @@ -758,7 +765,7 @@ public: } //! @rst - //! Performs an ascending block-wide radix sort over a + //! Performs an ascending block-wide radix sort over a //! :ref:`blocked arrangement ` of keys and values. //! //! * BlockRadixSort can only accommodate one associated tile of values. To "truck along" @@ -796,13 +803,13 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param[in,out] values @@ -810,16 +817,16 @@ public: //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template __device__ __forceinline__ // @@ -841,7 +848,7 @@ public: } //! @rst - //! Performs an ascending block-wide radix sort over a + //! Performs an ascending block-wide radix sort over a //! :ref:`blocked arrangement ` of keys and values. //! //! * BlockRadixSort can only accommodate one associated tile of values. To "truck along" @@ -879,13 +886,13 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param[in,out] values @@ -893,8 +900,8 @@ public: //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. template __device__ __forceinline__ // @@ -959,7 +966,7 @@ public: } //! @rst - //! Performs a descending block-wide radix sort over a + //! Performs a descending block-wide radix sort over a //! :ref:`blocked arrangement ` of keys. //! //! * @granularity @@ -992,27 +999,27 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template __device__ __forceinline__ // @@ -1035,7 +1042,7 @@ public: } //! @rst - //! Performs a descending block-wide radix sort over a + //! Performs a descending block-wide radix sort over a //! :ref:`blocked arrangement ` of keys. //! //! * @granularity @@ -1068,19 +1075,19 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. template __device__ __forceinline__ // @@ -1153,7 +1160,7 @@ public: } //! @rst - //! Performs a descending block-wide radix sort over a + //! Performs a descending block-wide radix sort over a //! :ref:`blocked arrangement ` of keys and values. //! //! * BlockRadixSort can only accommodate one associated tile of values. To "truck along" @@ -1191,13 +1198,13 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param[in,out] values @@ -1205,16 +1212,16 @@ public: //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template __device__ __forceinline__ // @@ -1236,7 +1243,7 @@ public: } //! @rst - //! Performs a descending block-wide radix sort over a + //! Performs a descending block-wide radix sort over a //! :ref:`blocked arrangement ` of keys and values. //! //! * BlockRadixSort can only accommodate one associated tile of values. To "truck along" @@ -1274,13 +1281,13 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param[in,out] values @@ -1288,8 +1295,8 @@ public: //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. template __device__ __forceinline__ // @@ -1364,8 +1371,8 @@ public: } //! @rst - //! Performs an ascending block-wide radix sort over a - //! :ref:`blocked arrangement ` of keys, leaving them in a + //! Performs an ascending block-wide radix sort over a + //! :ref:`blocked arrangement ` of keys, leaving them in a //! :ref:`striped arrangement `. //! //! * @granularity @@ -1377,7 +1384,7 @@ public: //! Let's consider a user-defined ``custom_t`` type below. To sort an array of //! ``custom_t`` objects, we have to tell CUB about relevant members of the //! ``custom_t`` type. We do this by providing a decomposer that returns a - //! tuple of references to relevant members of the key. + //! tuple of references to relevant members of the key. //! //! .. literalinclude:: ../../test/catch2_test_block_radix_sort_custom.cu //! :language: c++ @@ -1398,27 +1405,27 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template __device__ __forceinline__ // @@ -1441,8 +1448,8 @@ public: } //! @rst - //! Performs an ascending block-wide radix sort over a - //! :ref:`blocked arrangement ` of keys, leaving them in a + //! Performs an ascending block-wide radix sort over a + //! :ref:`blocked arrangement ` of keys, leaving them in a //! :ref:`striped arrangement `. //! //! * @granularity @@ -1454,7 +1461,7 @@ public: //! Let's consider a user-defined ``custom_t`` type below. To sort an array of //! ``custom_t`` objects, we have to tell CUB about relevant members of the //! ``custom_t`` type. We do this by providing a decomposer that returns a - //! tuple of references to relevant members of the key. + //! tuple of references to relevant members of the key. //! //! .. literalinclude:: ../../test/catch2_test_block_radix_sort_custom.cu //! :language: c++ @@ -1475,19 +1482,19 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. template __device__ __forceinline__ // @@ -1560,8 +1567,8 @@ public: } //! @rst - //! Performs an ascending block-wide radix sort over a - //! :ref:`blocked arrangement ` of keys and values, leaving them in a + //! Performs an ascending block-wide radix sort over a + //! :ref:`blocked arrangement ` of keys and values, leaving them in a //! :ref:`striped arrangement `. //! //! * @granularity @@ -1573,7 +1580,7 @@ public: //! Let's consider a user-defined ``custom_t`` type below. To sort an array of //! ``custom_t`` objects, we have to tell CUB about relevant members of the //! ``custom_t`` type. We do this by providing a decomposer that returns a - //! tuple of references to relevant members of the key. + //! tuple of references to relevant members of the key. //! //! .. literalinclude:: ../../test/catch2_test_block_radix_sort_custom.cu //! :language: c++ @@ -1594,13 +1601,13 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param[in,out] values @@ -1608,16 +1615,16 @@ public: //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template __device__ __forceinline__ // @@ -1639,8 +1646,8 @@ public: } //! @rst - //! Performs an ascending block-wide radix sort over a - //! :ref:`blocked arrangement ` of keys and values, leaving them in a + //! Performs an ascending block-wide radix sort over a + //! :ref:`blocked arrangement ` of keys and values, leaving them in a //! :ref:`striped arrangement `. //! //! * @granularity @@ -1652,7 +1659,7 @@ public: //! Let's consider a user-defined ``custom_t`` type below. To sort an array of //! ``custom_t`` objects, we have to tell CUB about relevant members of the //! ``custom_t`` type. We do this by providing a decomposer that returns a - //! tuple of references to relevant members of the key. + //! tuple of references to relevant members of the key. //! //! .. literalinclude:: ../../test/catch2_test_block_radix_sort_custom.cu //! :language: c++ @@ -1673,13 +1680,13 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param[in,out] values @@ -1687,8 +1694,8 @@ public: //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. template __device__ __forceinline__ // @@ -1756,8 +1763,8 @@ public: } //! @rst - //! Performs a descending block-wide radix sort over a - //! :ref:`blocked arrangement ` of keys, leaving them in a + //! Performs a descending block-wide radix sort over a + //! :ref:`blocked arrangement ` of keys, leaving them in a //! :ref:`striped arrangement `. //! //! * @granularity @@ -1769,7 +1776,7 @@ public: //! Let's consider a user-defined ``custom_t`` type below. To sort an array of //! ``custom_t`` objects, we have to tell CUB about relevant members of the //! ``custom_t`` type. We do this by providing a decomposer that returns a - //! tuple of references to relevant members of the key. + //! tuple of references to relevant members of the key. //! //! .. literalinclude:: ../../test/catch2_test_block_radix_sort_custom.cu //! :language: c++ @@ -1790,27 +1797,27 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template __device__ __forceinline__ // @@ -1833,8 +1840,8 @@ public: } //! @rst - //! Performs a descending block-wide radix sort over a - //! :ref:`blocked arrangement ` of keys, leaving them in a + //! Performs a descending block-wide radix sort over a + //! :ref:`blocked arrangement ` of keys, leaving them in a //! :ref:`striped arrangement `. //! //! * @granularity @@ -1846,7 +1853,7 @@ public: //! Let's consider a user-defined ``custom_t`` type below. To sort an array of //! ``custom_t`` objects, we have to tell CUB about relevant members of the //! ``custom_t`` type. We do this by providing a decomposer that returns a - //! tuple of references to relevant members of the key. + //! tuple of references to relevant members of the key. //! //! .. literalinclude:: ../../test/catch2_test_block_radix_sort_custom.cu //! :language: c++ @@ -1867,19 +1874,19 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. template __device__ __forceinline__ // @@ -1952,8 +1959,8 @@ public: } //! @rst - //! Performs a descending block-wide radix sort over a - //! :ref:`blocked arrangement ` of keys and values, leaving them in a + //! Performs a descending block-wide radix sort over a + //! :ref:`blocked arrangement ` of keys and values, leaving them in a //! :ref:`striped arrangement `. //! //! * @granularity @@ -1965,7 +1972,7 @@ public: //! Let's consider a user-defined ``custom_t`` type below. To sort an array of //! ``custom_t`` objects, we have to tell CUB about relevant members of the //! ``custom_t`` type. We do this by providing a decomposer that returns a - //! tuple of references to relevant members of the key. + //! tuple of references to relevant members of the key. //! //! .. literalinclude:: ../../test/catch2_test_block_radix_sort_custom.cu //! :language: c++ @@ -1986,13 +1993,13 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param[in,out] values @@ -2000,16 +2007,16 @@ public: //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template __device__ __forceinline__ // @@ -2031,8 +2038,8 @@ public: } //! @rst - //! Performs a descending block-wide radix sort over a - //! :ref:`blocked arrangement ` of keys and values, leaving them in a + //! Performs a descending block-wide radix sort over a + //! :ref:`blocked arrangement ` of keys and values, leaving them in a //! :ref:`striped arrangement `. //! //! * @granularity @@ -2044,7 +2051,7 @@ public: //! Let's consider a user-defined ``custom_t`` type below. To sort an array of //! ``custom_t`` objects, we have to tell CUB about relevant members of the //! ``custom_t`` type. We do this by providing a decomposer that returns a - //! tuple of references to relevant members of the key. + //! tuple of references to relevant members of the key. //! //! .. literalinclude:: ../../test/catch2_test_block_radix_sort_custom.cu //! :language: c++ @@ -2065,13 +2072,13 @@ public: //! @endrst //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in,out] keys + //! @param[in,out] keys //! Keys to sort //! //! @param[in,out] values @@ -2079,8 +2086,8 @@ public: //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. template __device__ __forceinline__ // diff --git a/cub/cub/block/block_raking_layout.cuh b/cub/cub/block/block_raking_layout.cuh index 4d49f54f2c8..fbe332c9e07 100644 --- a/cub/cub/block/block_raking_layout.cuh +++ b/cub/cub/block/block_raking_layout.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -35,6 +35,13 @@ #pragma once #include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../util_type.cuh" CUB_NAMESPACE_BEGIN diff --git a/cub/cub/block/block_reduce.cuh b/cub/cub/block/block_reduce.cuh index 5a9db703db9..8e0814604e0 100644 --- a/cub/cub/block/block_reduce.cuh +++ b/cub/cub/block/block_reduce.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,10 +33,17 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "specializations/block_reduce_raking.cuh" #include "specializations/block_reduce_raking_commutative_only.cuh" #include "specializations/block_reduce_warp_reductions.cuh" -#include "../config.cuh" #include "../util_ptx.cuh" #include "../util_type.cuh" #include "../thread/thread_operators.cuh" @@ -349,7 +356,7 @@ public: template __device__ __forceinline__ T Reduce( T input, ///< [in] Calling thread's input - ReductionOp reduction_op) ///< [in] Binary reduction functor + ReductionOp reduction_op) ///< [in] Binary reduction functor { return InternalBlockReduce(temp_storage).template Reduce(input, BLOCK_THREADS, reduction_op); } @@ -396,7 +403,7 @@ public: typename ReductionOp> __device__ __forceinline__ T Reduce( T (&inputs)[ITEMS_PER_THREAD], ///< [in] Calling thread's input segment - ReductionOp reduction_op) ///< [in] Binary reduction functor + ReductionOp reduction_op) ///< [in] Binary reduction functor { // Reduce partials T partial = internal::ThreadReduce(inputs, reduction_op); @@ -441,7 +448,7 @@ public: template __device__ __forceinline__ T Reduce( T input, ///< [in] Calling thread's input - ReductionOp reduction_op, ///< [in] Binary reduction functor + ReductionOp reduction_op, ///< [in] Binary reduction functor int num_valid) ///< [in] Number of threads containing valid elements (may be less than BLOCK_THREADS) { // Determine if we skip bounds checking diff --git a/cub/cub/block/block_run_length_decode.cuh b/cub/cub/block/block_run_length_decode.cuh index 41a3ab22b15..c14d36fa015 100644 --- a/cub/cub/block/block_run_length_decode.cuh +++ b/cub/cub/block/block_run_length_decode.cuh @@ -28,6 +28,13 @@ #pragma once #include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../thread/thread_search.cuh" #include "../util_math.cuh" #include "../util_namespace.cuh" diff --git a/cub/cub/block/block_scan.cuh b/cub/cub/block/block_scan.cuh index 544c15f0dbb..6629fc8b087 100644 --- a/cub/cub/block/block_scan.cuh +++ b/cub/cub/block/block_scan.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,9 +33,16 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "specializations/block_scan_raking.cuh" #include "specializations/block_scan_warp_scans.cuh" -#include "../config.cuh" #include "../util_type.cuh" #include "../util_ptx.cuh" @@ -735,7 +742,7 @@ public: T input, ///< [in] Calling thread's input item T &output, ///< [out] Calling thread's output item (may be aliased to \p input) T initial_value, ///< [in] Initial value to seed the exclusive scan (and is assigned to \p output[0] in thread0) - ScanOp scan_op) ///< [in] Binary scan functor + ScanOp scan_op) ///< [in] Binary scan functor { InternalBlockScan(temp_storage).ExclusiveScan(input, output, initial_value, scan_op); } @@ -785,7 +792,7 @@ public: T input, ///< [in] Calling thread's input items T &output, ///< [out] Calling thread's output items (may be aliased to \p input) T initial_value, ///< [in] Initial value to seed the exclusive scan (and is assigned to \p output[0] in thread0) - ScanOp scan_op, ///< [in] Binary scan functor + ScanOp scan_op, ///< [in] Binary scan functor T &block_aggregate) ///< [out] block-wide aggregate reduction of input items { InternalBlockScan(temp_storage).ExclusiveScan(input, output, initial_value, scan_op, block_aggregate); @@ -873,7 +880,7 @@ public: __device__ __forceinline__ void ExclusiveScan( T input, ///< [in] Calling thread's input item T &output, ///< [out] Calling thread's output item (may be aliased to \p input) - ScanOp scan_op, ///< [in] Binary scan functor + ScanOp scan_op, ///< [in] Binary scan functor BlockPrefixCallbackOp &block_prefix_callback_op) ///< [in-out] [warp0 only] Call-back functor for specifying a block-wide prefix to be applied to the logical input sequence. { InternalBlockScan(temp_storage).ExclusiveScan(input, output, scan_op, block_prefix_callback_op); @@ -1717,7 +1724,7 @@ public: __device__ __forceinline__ void InclusiveScan( T input, ///< [in] Calling thread's input item T &output, ///< [out] Calling thread's output item (may be aliased to \p input) - ScanOp scan_op) ///< [in] Binary scan functor + ScanOp scan_op) ///< [in] Binary scan functor { InternalBlockScan(temp_storage).InclusiveScan(input, output, scan_op); } @@ -1766,7 +1773,7 @@ public: __device__ __forceinline__ void InclusiveScan( T input, ///< [in] Calling thread's input item T &output, ///< [out] Calling thread's output item (may be aliased to \p input) - ScanOp scan_op, ///< [in] Binary scan functor + ScanOp scan_op, ///< [in] Binary scan functor T &block_aggregate) ///< [out] block-wide aggregate reduction of input items { InternalBlockScan(temp_storage).InclusiveScan(input, output, scan_op, block_aggregate); @@ -1854,7 +1861,7 @@ public: __device__ __forceinline__ void InclusiveScan( T input, ///< [in] Calling thread's input item T &output, ///< [out] Calling thread's output item (may be aliased to \p input) - ScanOp scan_op, ///< [in] Binary scan functor + ScanOp scan_op, ///< [in] Binary scan functor BlockPrefixCallbackOp &block_prefix_callback_op) ///< [in-out] [warp0 only] Call-back functor for specifying a block-wide prefix to be applied to the logical input sequence. { InternalBlockScan(temp_storage).InclusiveScan(input, output, scan_op, block_prefix_callback_op); @@ -1914,7 +1921,7 @@ public: __device__ __forceinline__ void InclusiveScan( T (&input)[ITEMS_PER_THREAD], ///< [in] Calling thread's input items T (&output)[ITEMS_PER_THREAD], ///< [out] Calling thread's output items (may be aliased to \p input) - ScanOp scan_op) ///< [in] Binary scan functor + ScanOp scan_op) ///< [in] Binary scan functor { if (ITEMS_PER_THREAD == 1) { @@ -1984,7 +1991,7 @@ public: __device__ __forceinline__ void InclusiveScan( T (&input)[ITEMS_PER_THREAD], ///< [in] Calling thread's input items T (&output)[ITEMS_PER_THREAD], ///< [out] Calling thread's output items (may be aliased to \p input) - ScanOp scan_op, ///< [in] Binary scan functor + ScanOp scan_op, ///< [in] Binary scan functor T &block_aggregate) ///< [out] block-wide aggregate reduction of input items { if (ITEMS_PER_THREAD == 1) @@ -2098,7 +2105,7 @@ public: __device__ __forceinline__ void InclusiveScan( T (&input)[ITEMS_PER_THREAD], ///< [in] Calling thread's input items T (&output)[ITEMS_PER_THREAD], ///< [out] Calling thread's output items (may be aliased to \p input) - ScanOp scan_op, ///< [in] Binary scan functor + ScanOp scan_op, ///< [in] Binary scan functor BlockPrefixCallbackOp &block_prefix_callback_op) ///< [in-out] [warp0 only] Call-back functor for specifying a block-wide prefix to be applied to the logical input sequence. { if (ITEMS_PER_THREAD == 1) diff --git a/cub/cub/block/block_shuffle.cuh b/cub/cub/block/block_shuffle.cuh index 58938301c11..4118344df7a 100644 --- a/cub/cub/block/block_shuffle.cuh +++ b/cub/cub/block/block_shuffle.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -34,6 +34,13 @@ #pragma once #include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../util_ptx.cuh" #include "../util_type.cuh" diff --git a/cub/cub/block/block_store.cuh b/cub/cub/block/block_store.cuh index 2cb6bee4337..2c7c93347ea 100644 --- a/cub/cub/block/block_store.cuh +++ b/cub/cub/block/block_store.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,11 +33,18 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include "block_exchange.cuh" -#include "../config.cuh" #include "../util_ptx.cuh" #include "../util_type.cuh" @@ -878,7 +885,7 @@ private: StoreDirectWarpStriped(linear_tid, block_itr, items, temp_storage.valid_items); } }; - + /****************************************************************************** * Type definitions diff --git a/cub/cub/block/radix_rank_sort_operations.cuh b/cub/cub/block/radix_rank_sort_operations.cuh index 679dfd4230e..6567cbfac0f 100644 --- a/cub/cub/block/radix_rank_sort_operations.cuh +++ b/cub/cub/block/radix_rank_sort_operations.cuh @@ -33,6 +33,14 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include @@ -40,7 +48,6 @@ #include -#include "../config.cuh" #include "../util_ptx.cuh" #include "../util_type.cuh" #include "cub/detail/cpp_compatibility.cuh" @@ -96,14 +103,14 @@ struct BaseDigitExtractor * key from a digit. */ template struct BFEDigitExtractor : BaseDigitExtractor -{ +{ using typename BaseDigitExtractor::UnsignedBits; - std::uint32_t bit_start; + std::uint32_t bit_start; std::uint32_t num_bits; explicit __device__ __forceinline__ BFEDigitExtractor( - std::uint32_t bit_start = 0, + std::uint32_t bit_start = 0, std::uint32_t num_bits = 0) : bit_start(bit_start) , num_bits(num_bits) @@ -139,14 +146,14 @@ struct ShiftDigitExtractor : BaseDigitExtractor #ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document -namespace detail +namespace detail { template struct logic_helper_t; template -struct true_t +struct true_t { static constexpr bool value = true; }; @@ -181,9 +188,9 @@ for_each_member_impl(F f, const ::cuda::std::tuple& tpl) static_assert(sizeof...(Ts), "Empty aggregates are not supported"); // Most radix operations are indifferent to the order of operations. - // Conversely, the digit extractor traverses fields from the least significant - // to the most significant to imitate bitset printing where higher bits are on - // the left. It also maps to intuition, where something coming first is more + // Conversely, the digit extractor traverses fields from the least significant + // to the most significant to imitate bitset printing where higher bits are on + // the left. It also maps to intuition, where something coming first is more // important. Therefore, we traverse fields on the opposite order. for_each_member_impl_helper(f, tpl, THRUST_NS_QUALIFIER::make_reversed_index_sequence{}); } @@ -578,7 +585,7 @@ struct traits_t } // namespace detail #endif // DOXYGEN_SHOULD_SKIP_THIS -//! Twiddling keys for radix sort +//! Twiddling keys for radix sort template struct RadixSortTwiddle { diff --git a/cub/cub/block/specializations/block_histogram_atomic.cuh b/cub/cub/block/specializations/block_histogram_atomic.cuh index 93299fa7192..367599b3dc2 100644 --- a/cub/cub/block/specializations/block_histogram_atomic.cuh +++ b/cub/cub/block/specializations/block_histogram_atomic.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -35,6 +35,12 @@ #include "../../config.cuh" +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + CUB_NAMESPACE_BEGIN @@ -57,7 +63,7 @@ struct BlockHistogramAtomic /// Composite data onto an existing histogram template < typename T, - typename CounterT, + typename CounterT, int ITEMS_PER_THREAD> __device__ __forceinline__ void Composite( T (&items)[ITEMS_PER_THREAD], ///< [in] Calling thread's input values to histogram diff --git a/cub/cub/block/specializations/block_histogram_sort.cuh b/cub/cub/block/specializations/block_histogram_sort.cuh index 79659ae106d..4ae46fc9af4 100644 --- a/cub/cub/block/specializations/block_histogram_sort.cuh +++ b/cub/cub/block/specializations/block_histogram_sort.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,9 +33,16 @@ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../../block/block_radix_sort.cuh" #include "../../block/block_discontinuity.cuh" -#include "../../config.cuh" #include "../../util_ptx.cuh" CUB_NAMESPACE_BEGIN diff --git a/cub/cub/block/specializations/block_reduce_raking.cuh b/cub/cub/block/specializations/block_reduce_raking.cuh index 423f18f8679..98ab45c794d 100644 --- a/cub/cub/block/specializations/block_reduce_raking.cuh +++ b/cub/cub/block/specializations/block_reduce_raking.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,10 +33,17 @@ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../../block/block_raking_layout.cuh" #include "../../warp/warp_reduce.cuh" #include "../../thread/thread_reduce.cuh" -#include "../../config.cuh" #include "../../util_ptx.cuh" CUB_NAMESPACE_BEGIN diff --git a/cub/cub/block/specializations/block_reduce_raking_commutative_only.cuh b/cub/cub/block/specializations/block_reduce_raking_commutative_only.cuh index 1fc1caab15a..f4178f31edd 100644 --- a/cub/cub/block/specializations/block_reduce_raking_commutative_only.cuh +++ b/cub/cub/block/specializations/block_reduce_raking_commutative_only.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,10 +33,17 @@ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "block_reduce_raking.cuh" #include "../../warp/warp_reduce.cuh" #include "../../thread/thread_reduce.cuh" -#include "../../config.cuh" #include "../../util_ptx.cuh" CUB_NAMESPACE_BEGIN diff --git a/cub/cub/block/specializations/block_reduce_warp_reductions.cuh b/cub/cub/block/specializations/block_reduce_warp_reductions.cuh index 1e51a9fcfe1..3b68a283bcb 100644 --- a/cub/cub/block/specializations/block_reduce_warp_reductions.cuh +++ b/cub/cub/block/specializations/block_reduce_warp_reductions.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,7 +33,14 @@ #pragma once -#include +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/block/specializations/block_scan_raking.cuh b/cub/cub/block/specializations/block_scan_raking.cuh index 4891dad141d..b1aad44e04e 100644 --- a/cub/cub/block/specializations/block_scan_raking.cuh +++ b/cub/cub/block/specializations/block_scan_raking.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -34,7 +34,13 @@ #pragma once -#include +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -156,7 +162,7 @@ struct BlockScanRaking CopySegment(out, in, Int2Type()); } - + /// Templated copy (base case) __device__ __forceinline__ void CopySegment( T* /*out*/, ///< [out] Out array diff --git a/cub/cub/block/specializations/block_scan_warp_scans.cuh b/cub/cub/block/specializations/block_scan_warp_scans.cuh index f76131a7856..f48b6dec0a4 100644 --- a/cub/cub/block/specializations/block_scan_warp_scans.cuh +++ b/cub/cub/block/specializations/block_scan_warp_scans.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,7 +33,14 @@ #pragma once -#include +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/config.cuh b/cub/cub/config.cuh index b909bbf7237..ea2591b4447 100644 --- a/cub/cub/config.cuh +++ b/cub/cub/config.cuh @@ -32,6 +32,15 @@ #pragma once +// For _CCCL_IMPLICIT_SYSTEM_HEADER +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "util_arch.cuh" #include "util_compiler.cuh" #include "util_cpp_dialect.cuh" diff --git a/cub/cub/cub.cuh b/cub/cub/cub.cuh index c5cac22cf14..edb7ea0b256 100644 --- a/cub/cub/cub.cuh +++ b/cub/cub/cub.cuh @@ -36,6 +36,12 @@ // Static configuration #include "config.cuh" +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // Block #include "block/block_adjacent_difference.cuh" #include "block/block_discontinuity.cuh" @@ -101,10 +107,8 @@ // Util #include "util_allocator.cuh" -#include "util_arch.cuh" #include "util_debug.cuh" #include "util_device.cuh" -#include "util_macro.cuh" #include "util_ptx.cuh" #include "util_temporary_storage.cuh" #include "util_type.cuh" diff --git a/cub/cub/detail/choose_offset.cuh b/cub/cub/detail/choose_offset.cuh index 4154123973a..2894abe01e7 100644 --- a/cub/cub/detail/choose_offset.cuh +++ b/cub/cub/detail/choose_offset.cuh @@ -27,7 +27,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/cub/cub/detail/cpp_compatibility.cuh b/cub/cub/detail/cpp_compatibility.cuh index c4fbe649692..ce29f92fa31 100644 --- a/cub/cub/detail/cpp_compatibility.cuh +++ b/cub/cub/detail/cpp_compatibility.cuh @@ -17,7 +17,13 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if CUB_CPP_DIALECT >= 2017 && __cpp_if_constexpr # define CUB_IF_CONSTEXPR if constexpr diff --git a/cub/cub/detail/detect_cuda_runtime.cuh b/cub/cub/detail/detect_cuda_runtime.cuh index b8e776db748..0707182bb96 100644 --- a/cub/cub/detail/detect_cuda_runtime.cuh +++ b/cub/cub/detail/detect_cuda_runtime.cuh @@ -33,6 +33,15 @@ #pragma once +// We cannot use `cub/config.cuh` here due to circular dependencies +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #ifdef DOXYGEN_SHOULD_SKIP_THIS // Only parse this during doxygen passes: diff --git a/cub/cub/detail/device_double_buffer.cuh b/cub/cub/detail/device_double_buffer.cuh index c427dcb438b..382d0c7bf02 100644 --- a/cub/cub/detail/device_double_buffer.cuh +++ b/cub/cub/detail/device_double_buffer.cuh @@ -16,6 +16,14 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include diff --git a/cub/cub/detail/device_synchronize.cuh b/cub/cub/detail/device_synchronize.cuh index 9da0a361aff..8f015f7a41e 100644 --- a/cub/cub/detail/device_synchronize.cuh +++ b/cub/cub/detail/device_synchronize.cuh @@ -16,10 +16,16 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include -#include #include diff --git a/cub/cub/detail/exec_check_disable.cuh b/cub/cub/detail/exec_check_disable.cuh index c5f4b4572c7..bd7d6704d66 100644 --- a/cub/cub/detail/exec_check_disable.cuh +++ b/cub/cub/detail/exec_check_disable.cuh @@ -16,7 +16,13 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC /** * @def CUB_EXEC_CHECK_DISABLE diff --git a/cub/cub/detail/strong_load.cuh b/cub/cub/detail/strong_load.cuh index 12e6672b9eb..8d80eaa3466 100644 --- a/cub/cub/detail/strong_load.cuh +++ b/cub/cub/detail/strong_load.cuh @@ -32,7 +32,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/cub/cub/detail/strong_store.cuh b/cub/cub/detail/strong_store.cuh index fd293519a38..59530983726 100644 --- a/cub/cub/detail/strong_store.cuh +++ b/cub/cub/detail/strong_store.cuh @@ -32,7 +32,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/detail/temporary_storage.cuh b/cub/cub/detail/temporary_storage.cuh index 51cb3cc855c..22696beb46f 100644 --- a/cub/cub/detail/temporary_storage.cuh +++ b/cub/cub/detail/temporary_storage.cuh @@ -16,6 +16,14 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/cub/cub/detail/type_traits.cuh b/cub/cub/detail/type_traits.cuh index 77903306250..cc0722c81ae 100644 --- a/cub/cub/detail/type_traits.cuh +++ b/cub/cub/detail/type_traits.cuh @@ -32,6 +32,14 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include @@ -51,7 +59,7 @@ using invoke_result_t = /// The type of intermediate accumulator (according to P2322R6) template -using accumulator_t = +using accumulator_t = typename ::cuda::std::decay>::type; } // namespace detail diff --git a/cub/cub/detail/uninitialized_copy.cuh b/cub/cub/detail/uninitialized_copy.cuh index 2b3e4b1da26..257e5d38639 100644 --- a/cub/cub/detail/uninitialized_copy.cuh +++ b/cub/cub/detail/uninitialized_copy.cuh @@ -12,9 +12,9 @@ * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; @@ -27,7 +27,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include @@ -48,7 +55,7 @@ __host__ __device__ void uninitialized_copy(T *ptr, U &&val) template ::value, + ::cuda::std::is_trivially_copyable::value, int >::type = 0> __host__ __device__ void uninitialized_copy(T *ptr, U &&val) @@ -56,7 +63,7 @@ __host__ __device__ void uninitialized_copy(T *ptr, U &&val) *ptr = ::cuda::std::forward(val); } -template ::value, diff --git a/cub/cub/device/device_adjacent_difference.cuh b/cub/cub/device/device_adjacent_difference.cuh index 0f614d1876d..e007e3bc9ae 100644 --- a/cub/cub/device/device_adjacent_difference.cuh +++ b/cub/cub/device/device_adjacent_difference.cuh @@ -27,7 +27,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/device/device_copy.cuh b/cub/cub/device/device_copy.cuh index 445f5d862bc..d3d67b5bc5d 100644 --- a/cub/cub/device/device_copy.cuh +++ b/cub/cub/device/device_copy.cuh @@ -32,7 +32,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/cub/cub/device/device_histogram.cuh b/cub/cub/device/device_histogram.cuh index 4e71c04ed82..6a8e7323370 100644 --- a/cub/cub/device/device_histogram.cuh +++ b/cub/cub/device/device_histogram.cuh @@ -13,9 +13,9 @@ * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; @@ -27,18 +27,25 @@ ******************************************************************************/ /** - * @file cub::DeviceHistogram provides device-wide parallel operations for - * constructing histogram(s) from a sequence of samples data residing + * @file cub::DeviceHistogram provides device-wide parallel operations for + * constructing histogram(s) from a sequence of samples data residing * within device-accessible memory. */ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include -#include #include #include @@ -46,8 +53,8 @@ CUB_NAMESPACE_BEGIN /** - * @brief DeviceHistogram provides device-wide parallel operations for - * constructing histogram(s) from a sequence of samples data residing + * @brief DeviceHistogram provides device-wide parallel operations for + * constructing histogram(s) from a sequence of samples data residing * within device-accessible memory. ![](histogram_logo.png) * @ingroup SingleModule * @@ -67,7 +74,7 @@ struct DeviceHistogram //@{ /** - * @brief Computes an intensity histogram from a sequence of data samples + * @brief Computes an intensity histogram from a sequence of data samples * using equal-width bins. * * @par @@ -97,7 +104,7 @@ struct DeviceHistogram * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input samples and output histogram * int num_samples; // e.g., 10 * float* d_samples; // e.g., [2.2, 6.1, 7.1, 2.9, 3.5, 0.3, 2.9, 2.1, 6.1, 999.5] @@ -112,7 +119,7 @@ struct DeviceHistogram * size_t temp_storage_bytes = 0; * cub::DeviceHistogram::HistogramEven( * d_temp_storage, temp_storage_bytes, - * d_samples, d_histogram, num_levels, + * d_samples, d_histogram, num_levels, * lower_level, upper_level, num_samples); * * // Allocate temporary storage @@ -121,56 +128,56 @@ struct DeviceHistogram * // Compute histograms * cub::DeviceHistogram::HistogramEven( * d_temp_storage, temp_storage_bytes, - * d_samples, d_histogram, num_levels, + * d_samples, d_histogram, num_levels, * lower_level, upper_level, num_samples); * * // d_histogram <-- [1, 5, 0, 3, 0, 0]; * @endcode * - * @tparam SampleIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam SampleIteratorT + * **[inferred]** Random-access input iterator type for reading input * samples \iterator * - * @tparam CounterT + * @tparam CounterT * **[inferred]** Integer type for histogram bin counters * - * @tparam LevelT + * @tparam LevelT * **[inferred]** Type for specifying boundaries (levels) * - * @tparam OffsetT - * **[inferred]** Signed integer type for sequence offsets, list lengths, + * @tparam OffsetT + * **[inferred]** Signed integer type for sequence offsets, list lengths, * pointer differences, etc. \offset_size1 * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_samples + * @param[in] d_samples * The pointer to the input sequence of data samples. * - * @param[out] d_histogram - * The pointer to the histogram counter output array of length + * @param[out] d_histogram + * The pointer to the histogram counter output array of length * `num_levels - 1`. * - * @param[in] num_levels - * The number of boundaries (levels) for delineating histogram samples. + * @param[in] num_levels + * The number of boundaries (levels) for delineating histogram samples. * Implies that the number of bins is `num_levels - 1`. * - * @param[in] lower_level + * @param[in] lower_level * The lower sample value bound (inclusive) for the lowest histogram bin. * - * @param[in] upper_level + * @param[in] upper_level * The upper sample value bound (exclusive) for the highest histogram bin. * - * @param[in] num_samples + * @param[in] num_samples * The number of input samples (i.e., the length of `d_samples`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template ` must be valid, and both LevelT * and SampleT must be valid arithmetic types. The common type must be @@ -277,7 +284,7 @@ struct DeviceHistogram * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input samples and output histogram * int num_row_samples; // e.g., 5 * int num_rows; // e.g., 2; @@ -310,57 +317,57 @@ struct DeviceHistogram * // d_histogram <-- [1, 5, 0, 3, 0, 0]; * @endcode * - * @tparam SampleIteratorT - * **[inferred]** Random-access input iterator type for reading + * @tparam SampleIteratorT + * **[inferred]** Random-access input iterator type for reading * input samples. \iterator * - * @tparam CounterT + * @tparam CounterT * **[inferred]** Integer type for histogram bin counters * - * @tparam LevelT + * @tparam LevelT * **[inferred]** Type for specifying boundaries (levels) * - * @tparam OffsetT + * @tparam OffsetT * **[inferred]** Signed integer type for sequence offsets, list lengths, * pointer differences, etc. \offset_size1 - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_samples + * @param[in] d_samples * The pointer to the input sequence of data samples. * - * @param[out] d_histogram - * The pointer to the histogram counter output array of + * @param[out] d_histogram + * The pointer to the histogram counter output array of * length `num_levels - 1`. * - * @param[in] num_levels - * The number of boundaries (levels) for delineating histogram samples. + * @param[in] num_levels + * The number of boundaries (levels) for delineating histogram samples. * Implies that the number of bins is `num_levels - 1`. * - * @param[in] lower_level + * @param[in] lower_level * The lower sample value bound (inclusive) for the lowest histogram bin. * - * @param[in] upper_level + * @param[in] upper_level * The upper sample value bound (exclusive) for the highest histogram bin. * - * @param[in] num_row_samples + * @param[in] num_row_samples * The number of data samples per row in the region of interest * - * @param[in] num_rows + * @param[in] num_rows * The number of rows in the region of interest * - * @param[in] row_stride_bytes - * The number of bytes between starts of consecutive rows in + * @param[in] row_stride_bytes + * The number of bytes between starts of consecutive rows in * the region of interest * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template i is + * - The number of histogram bins for channeli is * `num_levels[i] - 1`. * - For channeli, the range of values for all histogram bins - * have the same width: + * have the same width: * `(upper_level[i] - lower_level[i]) / (num_levels[i] - 1)` * - If the common type of sample and level is of integral type, the bin for a sample is * computed as `(sample - lower_level[i]) * (num_levels - 1) / (upper_level[i] - @@ -473,7 +480,7 @@ struct DeviceHistogram * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input samples and output histograms * int num_pixels; // e.g., 5 * unsigned char* d_samples; // e.g., [(2, 6, 7, 5), (3, 0, 2, 1), (7, 0, 6, 2), @@ -490,7 +497,7 @@ struct DeviceHistogram * size_t temp_storage_bytes = 0; * cub::DeviceHistogram::MultiHistogramEven<4, 3>( * d_temp_storage, temp_storage_bytes, - * d_samples, d_histogram, num_levels, + * d_samples, d_histogram, num_levels, * lower_level, upper_level, num_pixels); * * // Allocate temporary storage @@ -499,7 +506,7 @@ struct DeviceHistogram * // Compute histograms * cub::DeviceHistogram::MultiHistogramEven<4, 3>( * d_temp_storage, temp_storage_bytes, - * d_samples, d_histogram, num_levels, + * d_samples, d_histogram, num_levels, * lower_level, upper_level, num_pixels); * * // d_histogram <-- [ [1, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, ..., 0], @@ -507,65 +514,65 @@ struct DeviceHistogram * // [0, 0, 2, 0, 0, 0, 1, 2, 0, 0, 0, ..., 0] ] * @endcode * - * @tparam NUM_CHANNELS - * Number of channels interleaved in the input data (may be greater than + * @tparam NUM_CHANNELS + * Number of channels interleaved in the input data (may be greater than * the number of channels being actively histogrammed) * - * @tparam NUM_ACTIVE_CHANNELS + * @tparam NUM_ACTIVE_CHANNELS * **[inferred]** Number of channels actively being histogrammed * - * @tparam SampleIteratorT - * **[inferred]** Random-access input iterator type for reading + * @tparam SampleIteratorT + * **[inferred]** Random-access input iterator type for reading * input samples. \iterator * - * @tparam CounterT + * @tparam CounterT * **[inferred]** Integer type for histogram bin counters * - * @tparam LevelT + * @tparam LevelT * **[inferred]** Type for specifying boundaries (levels) * - * @tparam OffsetT - * **[inferred]** Signed integer type for sequence offsets, list lengths, + * @tparam OffsetT + * **[inferred]** Signed integer type for sequence offsets, list lengths, * pointer differences, etc. \offset_size1 * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_samples - * The pointer to the multi-channel input sequence of data samples. - * The samples from different channels are assumed to be interleaved - * (e.g., an array of 32-bit pixels where each pixel consists of four + * @param[in] d_samples + * The pointer to the multi-channel input sequence of data samples. + * The samples from different channels are assumed to be interleaved + * (e.g., an array of 32-bit pixels where each pixel consists of four * *RGBA* 8-bit samples). * * @param[out] d_histogram - * The pointers to the histogram counter output arrays, one for each active - * channel. For channeli, the allocation length of + * The pointers to the histogram counter output arrays, one for each active + * channel. For channeli, the allocation length of * `d_histogram[i]` should be `num_levels[i] - 1`. * * @param[in] num_levels - * The number of boundaries (levels) for delineating histogram samples in - * each active channel. Implies that the number of bins for + * The number of boundaries (levels) for delineating histogram samples in + * each active channel. Implies that the number of bins for * channeli is `num_levels[i] - 1`. * * @param[in] lower_level - * The lower sample value bound (inclusive) for the lowest histogram bin in + * The lower sample value bound (inclusive) for the lowest histogram bin in * each active channel. * * @param[in] upper_level - * The upper sample value bound (exclusive) for the highest histogram bin + * The upper sample value bound (exclusive) for the highest histogram bin * in each active channel. * - * @param[in] num_pixels - * The number of multi-channel pixels + * @param[in] num_pixels + * The number of multi-channel pixels * (i.e., the length of `d_samples / NUM_CHANNELS`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template i is + * - The number of histogram bins for channeli is * `num_levels[i] - 1`. - * - For channeli, the range of values for all histogram - * bins have the same width: + * - For channeli, the range of values for all histogram + * bins have the same width: * `(upper_level[i] - lower_level[i]) / (num_levels[i] - 1)` * - If the common type of sample and level is of integral type, the bin for a sample is * computed as `(sample - lower_level[i]) * (num_levels - 1) / (upper_level[i] - @@ -663,14 +670,14 @@ struct DeviceHistogram * `cudaErrorInvalidValue` is returned. If the common type is 128 bits wide, bin computation * will use 128-bit arithmetic and `cudaErrorInvalidValue` will only be returned if bin * computation would overflow for 128-bit arithmetic. - * - For a given row `r` in `[0, num_rows)`, and sample `s` in - * `[0, num_row_pixels)`, let - * `row_begin = d_samples + r * row_stride_bytes / sizeof(SampleT)`, + * - For a given row `r` in `[0, num_rows)`, and sample `s` in + * `[0, num_row_pixels)`, let + * `row_begin = d_samples + r * row_stride_bytes / sizeof(SampleT)`, * `sample_begin = row_begin + s * NUM_CHANNELS`, and * `sample_end = sample_begin + NUM_ACTIVE_CHANNELS`. For a given channel - * `c` in `[0, NUM_ACTIVE_CHANNELS)`, the ranges - * `[sample_begin, sample_end)` and - * `[d_histogram[c], d_histogram[c] + num_levels[c] - 1)` shall not overlap + * `c` in `[0, NUM_ACTIVE_CHANNELS)`, the ranges + * `[sample_begin, sample_end)` and + * `[d_histogram[c], d_histogram[c] + num_levels[c] - 1)` shall not overlap * in any way. * - `cuda::std::common_type` must be valid, and both LevelT * and SampleT must be valid arithmetic types. The common type must be @@ -678,15 +685,15 @@ struct DeviceHistogram * - @devicestorage * * @par Snippet - * The code snippet below illustrates the computation of three 256-bin - * *RGB* histograms from a 2x3 region of interest of within a flattened 2x4 + * The code snippet below illustrates the computation of three 256-bin + * *RGB* histograms from a 2x3 region of interest of within a flattened 2x4 * array of quad-channel *RGBA* pixels (8 bits per channel per pixel). * * @par * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for input + * // Declare, allocate, and initialize device-accessible pointers for input * // samples and output histograms * int num_row_pixels; // e.g., 3 * int num_rows; // e.g., 2 @@ -722,71 +729,71 @@ struct DeviceHistogram * // [0, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, ..., 0] ] * @endcode * - * @tparam NUM_CHANNELS - * Number of channels interleaved in the input data (may be greater than + * @tparam NUM_CHANNELS + * Number of channels interleaved in the input data (may be greater than * the number of channels being actively histogrammed) * - * @tparam NUM_ACTIVE_CHANNELS + * @tparam NUM_ACTIVE_CHANNELS * **[inferred]** Number of channels actively being histogrammed * - * @tparam SampleIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam SampleIteratorT + * **[inferred]** Random-access input iterator type for reading input * samples. \iterator * - * @tparam CounterT + * @tparam CounterT * **[inferred]** Integer type for histogram bin counters * - * @tparam LevelT + * @tparam LevelT * **[inferred]** Type for specifying boundaries (levels) * - * @tparam OffsetT - * **[inferred]** Signed integer type for sequence offsets, list lengths, + * @tparam OffsetT + * **[inferred]** Signed integer type for sequence offsets, list lengths, * pointer differences, etc. \offset_size1 * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_samples - * The pointer to the multi-channel input sequence of data samples. The - * samples from different channels are assumed to be interleaved (e.g., - * an array of 32-bit pixels where each pixel consists of four + * @param[in] d_samples + * The pointer to the multi-channel input sequence of data samples. The + * samples from different channels are assumed to be interleaved (e.g., + * an array of 32-bit pixels where each pixel consists of four * *RGBA* 8-bit samples). * - * @param[out] d_histogram - * The pointers to the histogram counter output arrays, one for each - * active channel. For channeli, the allocation length + * @param[out] d_histogram + * The pointers to the histogram counter output arrays, one for each + * active channel. For channeli, the allocation length * of `d_histogram[i]` should be `num_levels[i] - 1`. * - * @param[in] num_levels - * The number of boundaries (levels) for delineating histogram samples in - * each active channel. Implies that the number of bins for + * @param[in] num_levels + * The number of boundaries (levels) for delineating histogram samples in + * each active channel. Implies that the number of bins for * channeli is `num_levels[i] - 1`. * - * @param[in] lower_level - * The lower sample value bound (inclusive) for the lowest histogram bin in + * @param[in] lower_level + * The lower sample value bound (inclusive) for the lowest histogram bin in * each active channel. * - * @param[in] upper_level - * The upper sample value bound (exclusive) for the highest histogram bin + * @param[in] upper_level + * The upper sample value bound (exclusive) for the highest histogram bin * in each active channel. * - * @param[in] num_row_pixels + * @param[in] num_row_pixels * The number of multi-channel pixels per row in the region of interest * - * @param[in] num_rows + * @param[in] num_rows * The number of rows in the region of interest * - * @param[in] row_stride_bytes - * The number of bytes between starts of consecutive rows in the region of + * @param[in] row_stride_bytes + * The number of bytes between starts of consecutive rows in the region of * interest * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template i is `[level[i], level[i+1])` - * - The range `[d_histogram, d_histogram + num_levels - 1)` shall not - * overlap `[d_samples, d_samples + num_samples)` nor - * `[d_levels, d_levels + num_levels)` in any way. The ranges - * `[d_levels, d_levels + num_levels)` and + * - The range `[d_histogram, d_histogram + num_levels - 1)` shall not + * overlap `[d_samples, d_samples + num_samples)` nor + * `[d_levels, d_levels + num_levels)` in any way. The ranges + * `[d_levels, d_levels + num_levels)` and * `[d_samples, d_samples + num_samples)` may overlap. * - @devicestorage * @@ -921,7 +928,7 @@ struct DeviceHistogram * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for input + * // Declare, allocate, and initialize device-accessible pointers for input * // samples and output histogram * int num_samples; // e.g., 10 * float* d_samples; // e.g., [2.2, 6.0, 7.1, 2.9, 3.5, 0.3, 2.9, 2.0, 6.1, 999.5] @@ -949,49 +956,49 @@ struct DeviceHistogram * * @endcode * - * @tparam SampleIteratorT - * **[inferred]** Random-access input iterator type for reading + * @tparam SampleIteratorT + * **[inferred]** Random-access input iterator type for reading * input samples.\iterator * - * @tparam CounterT + * @tparam CounterT * **[inferred]** Integer type for histogram bin counters * - * @tparam LevelT + * @tparam LevelT * **[inferred]** Type for specifying boundaries (levels) * - * @tparam OffsetT - * **[inferred]** Signed integer type for sequence offsets, list lengths, + * @tparam OffsetT + * **[inferred]** Signed integer type for sequence offsets, list lengths, * pointer differences, etc. \offset_size1 * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_samples + * @param[in] d_samples * The pointer to the input sequence of data samples. * - * @param[out] d_histogram - * The pointer to the histogram counter output array of length + * @param[out] d_histogram + * The pointer to the histogram counter output array of length * `num_levels - 1`. * - * @param[in] num_levels - * The number of boundaries (levels) for delineating histogram samples. + * @param[in] num_levels + * The number of boundaries (levels) for delineating histogram samples. * Implies that the number of bins is `num_levels - 1`. * - * @param[in] d_levels - * The pointer to the array of boundaries (levels). Bin ranges are defined - * by consecutive boundary pairings: lower sample value boundaries are + * @param[in] d_levels + * The pointer to the array of boundaries (levels). Bin ranges are defined + * by consecutive boundary pairings: lower sample value boundaries are * inclusive and upper sample value boundaries are exclusive. * - * @param[in] num_samples + * @param[in] num_samples * The number of data samples per row in the region of interest * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template i is `[level[i], level[i+1])` - * - For a given row `r` in `[0, num_rows)`, let - * `row_begin = d_samples + r * row_stride_bytes / sizeof(SampleT)` and + * - For a given row `r` in `[0, num_rows)`, let + * `row_begin = d_samples + r * row_stride_bytes / sizeof(SampleT)` and * `row_end = row_begin + num_row_samples`. The range * `[d_histogram, d_histogram + num_levels - 1)` shall not overlap * `[row_begin, row_end)` nor `[d_levels, d_levels + num_levels)`. @@ -1116,55 +1123,55 @@ struct DeviceHistogram * // d_histogram <-- [1, 5, 0, 3, 0, 0]; * @endcode * - * @tparam SampleIteratorT - * **[inferred]** Random-access input iterator type for reading + * @tparam SampleIteratorT + * **[inferred]** Random-access input iterator type for reading * input samples. \iterator - * - * @tparam CounterT + * + * @tparam CounterT * **[inferred]** Integer type for histogram bin counters - * - * @tparam LevelT + * + * @tparam LevelT * **[inferred]** Type for specifying boundaries (levels) - * - * @tparam OffsetT - * **[inferred]** Signed integer type for sequence offsets, list lengths, + * + * @tparam OffsetT + * **[inferred]** Signed integer type for sequence offsets, list lengths, * pointer differences, etc. \offset_size1 * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_samples + * @param[in] d_samples * The pointer to the input sequence of data samples. * - * @param[out] d_histogram - * The pointer to the histogram counter output array of length + * @param[out] d_histogram + * The pointer to the histogram counter output array of length * `num_levels - 1`. * - * @param[in] num_levels - * The number of boundaries (levels) for delineating histogram samples. + * @param[in] num_levels + * The number of boundaries (levels) for delineating histogram samples. * Implies that the number of bins is `num_levels - 1`. * - * @param[in] d_levels - * The pointer to the array of boundaries (levels). Bin ranges are defined - * by consecutive boundary pairings: lower sample value boundaries are + * @param[in] d_levels + * The pointer to the array of boundaries (levels). Bin ranges are defined + * by consecutive boundary pairings: lower sample value boundaries are * inclusive and upper sample value boundaries are exclusive. * - * @param[in] num_row_samples + * @param[in] num_row_samples * The number of data samples per row in the region of interest * - * @param[in] num_rows + * @param[in] num_rows * The number of rows in the region of interest * - * @param[in] row_stride_bytes - * The number of bytes between starts of consecutive rows in the region + * @param[in] row_stride_bytes + * The number of bytes between starts of consecutive rows in the region * of interest * - * @param[in] stream + * @param[in] stream * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ @@ -1233,24 +1240,24 @@ struct DeviceHistogram } /** - * @brief Computes per-channel intensity histograms from a sequence of - * multi-channel "pixel" data samples using the specified bin + * @brief Computes per-channel intensity histograms from a sequence of + * multi-channel "pixel" data samples using the specified bin * boundary levels. * * @par - * - The input is a sequence of *pixel* structures, where each pixel - * comprises a record of `NUM_CHANNELS` consecutive data samples + * - The input is a sequence of *pixel* structures, where each pixel + * comprises a record of `NUM_CHANNELS` consecutive data samples * (e.g., an *RGBA* pixel). - * - Of the `NUM_CHANNELS` specified, the function will only compute - * histograms for the first `NUM_ACTIVE_CHANNELS` (e.g., *RGB* histograms + * - Of the `NUM_CHANNELS` specified, the function will only compute + * histograms for the first `NUM_ACTIVE_CHANNELS` (e.g., *RGB* histograms * from *RGBA* pixel samples). - * - The number of histogram bins for channeli is + * - The number of histogram bins for channeli is * `num_levels[i] - 1`. - * - For channeli, the range of values for all histogram - * bins have the same width: + * - For channeli, the range of values for all histogram + * bins have the same width: * `(upper_level[i] - lower_level[i]) / (num_levels[i] - 1)` - * - For given channels `c1` and `c2` in `[0, NUM_ACTIVE_CHANNELS)`, the - * range `[d_histogram[c1], d_histogram[c1] + num_levels[c1] - 1)` shall + * - For given channels `c1` and `c2` in `[0, NUM_ACTIVE_CHANNELS)`, the + * range `[d_histogram[c1], d_histogram[c1] + num_levels[c1] - 1)` shall * not overlap `[d_samples, d_samples + NUM_CHANNELS * num_pixels)` nor * `[d_levels[c2], d_levels[c2] + num_levels[c2])` in any way. * The ranges `[d_levels[c2], d_levels[c2] + num_levels[c2])` and @@ -1258,15 +1265,15 @@ struct DeviceHistogram * - @devicestorage * * @par Snippet - * The code snippet below illustrates the computation of three 4-bin *RGB* - * histograms from a quad-channel sequence of *RGBA* pixels + * The code snippet below illustrates the computation of three 4-bin *RGB* + * histograms from a quad-channel sequence of *RGBA* pixels * (8 bits per channel per pixel) * * @par * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input samples and output histograms * int num_pixels; // e.g., 5 * unsigned char *d_samples; // e.g., [(2, 6, 7, 5),(3, 0, 2, 1),(7, 0, 6, 2), @@ -1299,63 +1306,63 @@ struct DeviceHistogram * * @endcode * - * @tparam NUM_CHANNELS - * Number of channels interleaved in the input data (may be greater than + * @tparam NUM_CHANNELS + * Number of channels interleaved in the input data (may be greater than * the number of channels being actively histogrammed) - * - * @tparam NUM_ACTIVE_CHANNELS + * + * @tparam NUM_ACTIVE_CHANNELS * **[inferred]** Number of channels actively being histogrammed - * - * @tparam SampleIteratorT - * **[inferred]** Random-access input iterator type for reading + * + * @tparam SampleIteratorT + * **[inferred]** Random-access input iterator type for reading * input samples. \iterator - * - * @tparam CounterT + * + * @tparam CounterT * **[inferred]** Integer type for histogram bin counters - * - * @tparam LevelT + * + * @tparam LevelT * **[inferred]** Type for specifying boundaries (levels) - * - * @tparam OffsetT - * **[inferred]** Signed integer type for sequence offsets, list lengths, + * + * @tparam OffsetT + * **[inferred]** Signed integer type for sequence offsets, list lengths, * pointer differences, etc. \offset_size1 * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_samples - * The pointer to the multi-channel input sequence of data samples. - * The samples from different channels are assumed to be interleaved (e.g., - * an array of 32-bit pixels where each pixel consists of four *RGBA* + * @param[in] d_samples + * The pointer to the multi-channel input sequence of data samples. + * The samples from different channels are assumed to be interleaved (e.g., + * an array of 32-bit pixels where each pixel consists of four *RGBA* * 8-bit samples). * - * @param[out] d_histogram - * The pointers to the histogram counter output arrays, one for each active - * channel. For channeli, the allocation length of + * @param[out] d_histogram + * The pointers to the histogram counter output arrays, one for each active + * channel. For channeli, the allocation length of * `d_histogram[i]` should be `num_levels[i] - 1`. * - * @param[in] num_levels - * The number of boundaries (levels) for delineating histogram samples in - * each active channel. Implies that the number of bins for + * @param[in] num_levels + * The number of boundaries (levels) for delineating histogram samples in + * each active channel. Implies that the number of bins for * channeli is `num_levels[i] - 1`. * - * @param[in] d_levels - * The pointers to the arrays of boundaries (levels), one for each active - * channel. Bin ranges are defined by consecutive boundary pairings: lower - * sample value boundaries are inclusive and upper sample value boundaries + * @param[in] d_levels + * The pointers to the arrays of boundaries (levels), one for each active + * channel. Bin ranges are defined by consecutive boundary pairings: lower + * sample value boundaries are inclusive and upper sample value boundaries * are exclusive. * - * @param[in] num_pixels - * The number of multi-channel pixels + * @param[in] num_pixels + * The number of multi-channel pixels * (i.e., the length of `d_samples / NUM_CHANNELS`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template i is + * - The number of histogram bins for channeli is * `num_levels[i] - 1`. - * - For channeli, the range of values for all histogram - * bins have the same width: + * - For channeli, the range of values for all histogram + * bins have the same width: * `(upper_level[i] - lower_level[i]) / (num_levels[i] - 1)` - * - For a given row `r` in `[0, num_rows)`, and sample `s` in - * `[0, num_row_pixels)`, let - * `row_begin = d_samples + r * row_stride_bytes / sizeof(SampleT)`, + * - For a given row `r` in `[0, num_rows)`, and sample `s` in + * `[0, num_row_pixels)`, let + * `row_begin = d_samples + r * row_stride_bytes / sizeof(SampleT)`, * `sample_begin = row_begin + s * NUM_CHANNELS`, and * `sample_end = sample_begin + NUM_ACTIVE_CHANNELS`. For given channels * `c1` and `c2` in `[0, NUM_ACTIVE_CHANNELS)`, the range - * `[d_histogram[c1], d_histogram[c1] + num_levels[c1] - 1)` shall not + * `[d_histogram[c1], d_histogram[c1] + num_levels[c1] - 1)` shall not * overlap `[sample_begin, sample_end)` nor * `[d_levels[c2], d_levels[c2] + num_levels[c2])` in any way. The ranges - * `[d_levels[c2], d_levels[c2] + num_levels[c2])` and + * `[d_levels[c2], d_levels[c2] + num_levels[c2])` and * `[sample_begin, sample_end)` may overlap. * - @devicestorage * * @par Snippet - * The code snippet below illustrates the computation of three 4-bin *RGB* - * histograms from a 2x3 region of interest of within a flattened 2x4 array + * The code snippet below illustrates the computation of three 4-bin *RGB* + * histograms from a 2x3 region of interest of within a flattened 2x4 array * of quad-channel *RGBA* pixels (8 bits per channel per pixel). * * @par * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for input + * // Declare, allocate, and initialize device-accessible pointers for input * // samples and output histograms * int num_row_pixels; // e.g., 3 * int num_rows; // e.g., 2 @@ -1483,7 +1490,7 @@ struct DeviceHistogram * size_t temp_storage_bytes = 0; * cub::DeviceHistogram::MultiHistogramRange<4, 3>( * d_temp_storage, temp_storage_bytes, - * d_samples, d_histogram, num_levels, d_levels, + * d_samples, d_histogram, num_levels, d_levels, * num_row_pixels, num_rows, row_stride_bytes); * * // Allocate temporary storage @@ -1492,7 +1499,7 @@ struct DeviceHistogram * // Compute histograms * cub::DeviceHistogram::MultiHistogramRange<4, 3>( * d_temp_storage, temp_storage_bytes, - * d_samples, d_histogram, num_levels, + * d_samples, d_histogram, num_levels, * d_levels, num_row_pixels, num_rows, row_stride_bytes); * * // d_histogram <-- [ [2, 3, 0, 1], @@ -1501,68 +1508,68 @@ struct DeviceHistogram * * @endcode * - * @tparam NUM_CHANNELS - * Number of channels interleaved in the input data (may be greater than + * @tparam NUM_CHANNELS + * Number of channels interleaved in the input data (may be greater than * the number of channels being actively histogrammed) - * - * @tparam NUM_ACTIVE_CHANNELS + * + * @tparam NUM_ACTIVE_CHANNELS * **[inferred]** Number of channels actively being histogrammed - * - * @tparam SampleIteratorT - * **[inferred]** Random-access input iterator type for reading input + * + * @tparam SampleIteratorT + * **[inferred]** Random-access input iterator type for reading input * samples. \iterator - * - * @tparam CounterT + * + * @tparam CounterT * **[inferred]** Integer type for histogram bin counters - * - * @tparam LevelT + * + * @tparam LevelT * **[inferred]** Type for specifying boundaries (levels) - * - * @tparam OffsetT - * **[inferred]** Signed integer type for sequence offsets, list lengths, + * + * @tparam OffsetT + * **[inferred]** Signed integer type for sequence offsets, list lengths, * pointer differences, etc. \offset_size1 * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the * required allocation size is written to \p temp_storage_bytes and no work is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_samples - * The pointer to the multi-channel input sequence of data samples. The - * samples from different channels are assumed to be interleaved (e.g., an - * array of 32-bit pixels where each pixel consists of four + * @param[in] d_samples + * The pointer to the multi-channel input sequence of data samples. The + * samples from different channels are assumed to be interleaved (e.g., an + * array of 32-bit pixels where each pixel consists of four * *RGBA* 8-bit samples). * - * @param[out] d_histogram - * The pointers to the histogram counter output arrays, one for each active - * channel. For channeli, the allocation length of + * @param[out] d_histogram + * The pointers to the histogram counter output arrays, one for each active + * channel. For channeli, the allocation length of * `d_histogram[i]` should be `num_levels[i] - 1`. * - * @param[in] num_levels - * The number of boundaries (levels) for delineating histogram samples in - * each active channel. Implies that the number of bins for + * @param[in] num_levels + * The number of boundaries (levels) for delineating histogram samples in + * each active channel. Implies that the number of bins for * channeli is `num_levels[i] - 1`. * - * @param[in] d_levels - * The pointers to the arrays of boundaries (levels), one for each active - * channel. Bin ranges are defined by consecutive boundary pairings: lower - * sample value boundaries are inclusive and upper sample value boundaries + * @param[in] d_levels + * The pointers to the arrays of boundaries (levels), one for each active + * channel. Bin ranges are defined by consecutive boundary pairings: lower + * sample value boundaries are inclusive and upper sample value boundaries * are exclusive. * - * @param[in] num_row_pixels + * @param[in] num_row_pixels * The number of multi-channel pixels per row in the region of interest * - * @param[in] num_rows + * @param[in] num_rows * The number of rows in the region of interest * - * @param[in] row_stride_bytes - * The number of bytes between starts of consecutive rows in the + * @param[in] row_stride_bytes + * The number of bytes between starts of consecutive rows in the * region of interest * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/cub/cub/device/device_merge_sort.cuh b/cub/cub/device/device_merge_sort.cuh index 9b17ac39125..cc9865bce9b 100644 --- a/cub/cub/device/device_merge_sort.cuh +++ b/cub/cub/device/device_merge_sort.cuh @@ -27,7 +27,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/device/device_partition.cuh b/cub/cub/device/device_partition.cuh index 6692a489b20..4c311d39e3f 100644 --- a/cub/cub/device/device_partition.cuh +++ b/cub/cub/device/device_partition.cuh @@ -34,10 +34,17 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include #include #include #include @@ -85,9 +92,9 @@ struct DevicePartition * - Copies of the selected items are compacted into @p d_out and maintain * their original relative ordering, however copies of the unselected * items are compacted into the rear of @p d_out in reverse order. - * - The range `[d_out, d_out + num_items)` shall not overlap - * `[d_in, d_in + num_items)` nor `[d_flags, d_flags + num_items)` in any - * way. The range `[d_in, d_in + num_items)` may overlap + * - The range `[d_out, d_out + num_items)` shall not overlap + * `[d_in, d_in + num_items)` nor `[d_flags, d_flags + num_items)` in any + * way. The range `[d_in, d_in + num_items)` may overlap * `[d_flags, d_flags + num_items)`. * - \devicestorage * @@ -251,8 +258,8 @@ struct DevicePartition * - Copies of the selected items are compacted into @p d_out and maintain * their original relative ordering, however copies of the unselected * items are compacted into the rear of @p d_out in reverse order. - * - The range `[d_out, d_out + num_items)` shall not overlap - * `[d_in, d_in + num_items)` in any way. + * - The range `[d_out, d_out + num_items)` shall not overlap + * `[d_in, d_in + num_items)` in any way. * - \devicestorage * * @par Performance @@ -451,10 +458,10 @@ struct DevicePartition * - Copies of the unselected items are compacted into the * @p d_unselected_out in reverse order. * - The ranges `[d_out, d_out + num_items)`, - * `[d_first_part_out, d_first_part_out + d_num_selected_out[0])`, - * `[d_second_part_out, d_second_part_out + d_num_selected_out[1])`, - * `[d_unselected_out, d_unselected_out + num_items - d_num_selected_out[0] - d_num_selected_out[1])`, - * shall not overlap in any way. + * `[d_first_part_out, d_first_part_out + d_num_selected_out[0])`, + * `[d_second_part_out, d_second_part_out + d_num_selected_out[1])`, + * `[d_unselected_out, d_unselected_out + num_items - d_num_selected_out[0] - d_num_selected_out[1])`, + * shall not overlap in any way. * * @par Snippet * The code snippet below illustrates how this algorithm can partition an diff --git a/cub/cub/device/device_radix_sort.cuh b/cub/cub/device/device_radix_sort.cuh index e9d1b4d1d91..adf2385ab6d 100644 --- a/cub/cub/device/device_radix_sort.cuh +++ b/cub/cub/device/device_radix_sort.cuh @@ -13,9 +13,9 @@ * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; @@ -26,13 +26,20 @@ * ******************************************************************************/ -//! @file cub::DeviceRadixSort provides device-wide, parallel operations for -//! computing a radix sort across a sequence of data items residing within +//! @file cub::DeviceRadixSort provides device-wide, parallel operations for +//! computing a radix sort across a sequence of data items residing within //! device-accessible memory. #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include @@ -43,33 +50,33 @@ CUB_NAMESPACE_BEGIN -//! @brief DeviceRadixSort provides device-wide, parallel operations for -//! computing a radix sort across a sequence of data items residing +//! @brief DeviceRadixSort provides device-wide, parallel operations for +//! computing a radix sort across a sequence of data items residing //! within device-accessible memory. ![](sorting_logo.png) //! @ingroup SingleModule -//! +//! //! @par Overview -//! The [*radix sorting method*](http://en.wikipedia.org/wiki/Radix_sort) -//! arranges items into ascending (or descending) order. The algorithm relies -//! upon a positional representation for keys, i.e., each key is comprised of an -//! ordered sequence of symbols (e.g., digits, characters, etc.) specified from -//! least-significant to most-significant. For a given input sequence of keys -//! and a set of rules specifying a total ordering of the symbolic alphabet, the +//! The [*radix sorting method*](http://en.wikipedia.org/wiki/Radix_sort) +//! arranges items into ascending (or descending) order. The algorithm relies +//! upon a positional representation for keys, i.e., each key is comprised of an +//! ordered sequence of symbols (e.g., digits, characters, etc.) specified from +//! least-significant to most-significant. For a given input sequence of keys +//! and a set of rules specifying a total ordering of the symbolic alphabet, the //! radix sorting method produces a lexicographic ordering of those keys. -//! +//! //! @par Supported Types //! DeviceRadixSort can sort all of the built-in C++ numeric primitive types //! (`unsigned char`, `int`, `double`, etc.) as well as CUDA's `__half` -//! and `__nv_bfloat16` 16-bit floating-point types. User-defined types are +//! and `__nv_bfloat16` 16-bit floating-point types. User-defined types are //! supported as long as decomposer object is provided. -//! +//! //! @par Floating-Point Special Cases -//! +//! //! - Positive and negative zeros are considered equivalent, and will be treated //! as such in the output. //! - No special handling is implemented for NaN values; these are sorted //! according to their bit representations after any transformations. -//! +//! //! @par Transformations //! Although the direct radix sorting method can only be applied to unsigned //! integral types, DeviceRadixSort is able to sort signed and floating-point @@ -78,41 +85,41 @@ CUB_NAMESPACE_BEGIN //! transformations must be considered when restricting the //! `[begin_bit, end_bit)` range, as the bitwise transformations will occur //! before the bit-range truncation. -//! +//! //! Any transformations applied to the keys prior to sorting are reversed //! while writing to the final output buffer. -//! +//! //! @par Type Specific Bitwise Transformations //! To convert the input values into a radix-sortable bitwise representation, //! the following transformations take place prior to sorting: -//! +//! //! - For unsigned integral values, the keys are used directly. //! - For signed integral values, the sign bit is inverted. //! - For positive floating point values, the sign bit is inverted. //! - For negative floating point values, the full key is inverted. -//! +//! //! For floating point types, positive and negative zero are a special case and //! will be considered equivalent during sorting. -//! +//! //! @par Descending Sort Bitwise Transformations //! If descending sort is used, the keys are inverted after performing any //! type-specific transformations, and the resulting keys are sorted in ascending //! order. -//! +//! //! @par Stability //! DeviceRadixSort is stable. For floating-point types, `-0.0` and `+0.0` are //! considered equal and appear in the result in the same order as they appear in //! the input. -//! +//! //! @par Usage Considerations //! @cdp_class{DeviceRadixSort} -//! +//! //! @par Performance -//! @linear_performance{radix sort} The following chart illustrates -//! DeviceRadixSort::SortKeys performance across different CUDA architectures +//! @linear_performance{radix sort} The following chart illustrates +//! DeviceRadixSort::SortKeys performance across different CUDA architectures //! for uniform-random `uint32` keys. //! @plots_below -//! +//! //! @image html lsb_radix_sort_int32_keys.png struct DeviceRadixSort { @@ -203,7 +210,7 @@ public: //! @name KeyT-value pairs //@{ - //! @brief Sorts key-value pairs into ascending order. + //! @brief Sorts key-value pairs into ascending order. //! (`~2N` auxiliary storage required) //! //! @par @@ -216,15 +223,15 @@ public: //! - `[d_keys_out, d_keys_out + num_items)` //! - `[d_values_in, d_values_in + num_items)` //! - `[d_values_out, d_values_out + num_items)` - //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key - //! bits can be specified. This can reduce overall sorting overhead and + //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key + //! bits can be specified. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. - //! - @devicestorageNP For sorting using only `O(P)` temporary storage, see + //! - @devicestorageNP For sorting using only `O(P)` temporary storage, see //! the sorting interface using DoubleBuffer wrappers below. //! - @devicestorage //! //! @par Performance - //! The following charts illustrate saturated sorting performance across + //! The following charts illustrate saturated sorting performance across //! different CUDA architectures for uniform-random `uint32, uint32` and //! `uint64, uint64` pairs, respectively. //! @@ -236,10 +243,10 @@ public: //! keys with associated vector of `int` values. //! @par //! @code - //! #include + //! #include //! // or equivalently //! - //! // Declare, allocate, and initialize device-accessible pointers + //! // Declare, allocate, and initialize device-accessible pointers //! // for sorting data //! int num_items; // e.g., 7 //! int *d_keys_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -265,49 +272,49 @@ public: //! // d_values_out <-- [5, 4, 3, 1, 2, 0, 6] //! @endcode //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam ValueT + //! @tparam ValueT //! **[inferred]** ValueT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in] d_keys_in + //! @param[in] d_keys_in //! Pointer to the input data of key data to sort //! - //! @param[out] d_keys_out + //! @param[out] d_keys_out //! Pointer to the sorted output sequence of key data //! - //! @param[in] d_values_in + //! @param[in] d_values_in //! Pointer to the corresponding input sequence of associated value items //! - //! @param[out] d_values_out - //! Pointer to the correspondingly-reordered output sequence of associated + //! @param[out] d_values_out + //! Pointer to the correspondingly-reordered output sequence of associated //! value items //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., sizeof(unsigned int) * 8) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static cudaError_t @@ -380,9 +387,9 @@ public: } #endif - //! @rst + //! @rst //! Sorts key-value pairs into ascending order using :math:`\approx 2N` auxiliary storage. - //! + //! //! * The contents of the input data are not altered by the sorting operation. //! * Pointers to contiguous memory must be used; iterators are not currently //! supported. @@ -394,10 +401,10 @@ public: //! * ``[d_values_in, d_values_in + num_items)`` //! * ``[d_values_out, d_values_out + num_items)`` //! - //! * A bit subrange ``[begin_bit, end_bit)`` is provided to specify - //! differentiating key bits. This can reduce overall sorting overhead and + //! * A bit subrange ``[begin_bit, end_bit)`` is provided to specify + //! differentiating key bits. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. - //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see + //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see //! the sorting interface using DoubleBuffer wrappers below. //! * @devicestorage //! @@ -417,7 +424,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortPairs``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -426,62 +433,62 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam ValueT + //! @tparam ValueT //! **[inferred]** ValueT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in] d_keys_in + //! @param[in] d_keys_in //! Pointer to the input data of key data to sort //! - //! @param[out] d_keys_out + //! @param[out] d_keys_out //! Pointer to the sorted output sequence of key data //! - //! @param[in] d_values_in + //! @param[in] d_values_in //! Pointer to the corresponding input sequence of associated value items //! - //! @param[out] d_values_out - //! Pointer to the correspondingly-reordered output sequence of associated + //! @param[out] d_values_out + //! Pointer to the correspondingly-reordered output sequence of associated //! value items //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -530,9 +537,9 @@ public: stream); } - //! @rst + //! @rst //! Sorts key-value pairs into ascending order using :math:`\approx 2N` auxiliary storage. - //! + //! //! * The contents of the input data are not altered by the sorting operation. //! * Pointers to contiguous memory must be used; iterators are not currently //! supported. @@ -544,7 +551,7 @@ public: //! * ``[d_values_in, d_values_in + num_items)`` //! * ``[d_values_out, d_values_out + num_items)`` //! - //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see + //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see //! the sorting interface using DoubleBuffer wrappers below. //! * @devicestorage //! @@ -564,7 +571,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortPairs``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -573,54 +580,54 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam ValueT + //! @tparam ValueT //! **[inferred]** ValueT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in] d_keys_in + //! @param[in] d_keys_in //! Pointer to the input data of key data to sort //! - //! @param[out] d_keys_out + //! @param[out] d_keys_out //! Pointer to the sorted output sequence of key data //! - //! @param[in] d_values_in + //! @param[in] d_values_in //! Pointer to the corresponding input sequence of associated value items //! - //! @param[out] d_values_out - //! Pointer to the correspondingly-reordered output sequence of associated + //! @param[out] d_values_out + //! Pointer to the correspondingly-reordered output sequence of associated //! value items //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -665,7 +672,7 @@ public: stream); } - //! @brief Sorts key-value pairs into ascending order. + //! @brief Sorts key-value pairs into ascending order. //! (`~N` auxiliary storage required) //! //! @par @@ -673,7 +680,7 @@ public: //! pair of associated value buffers. Each pair is managed by a DoubleBuffer //! structure that indicates which of the two buffers is "current" (and thus //! contains the input data to be sorted). - //! - The contents of both buffers within each pair may be altered by the + //! - The contents of both buffers within each pair may be altered by the //! sorting operation. //! - In-place operations are not supported. There must be no overlap between //! any of the provided ranges: @@ -681,18 +688,18 @@ public: //! - `[d_keys.Alternate(), d_keys.Alternate() + num_items)` //! - `[d_values.Current(), d_values.Current() + num_items)` //! - `[d_values.Alternate(), d_values.Alternate() + num_items)` - //! - Upon completion, the sorting operation will update the "current" - //! indicator within each DoubleBuffer wrapper to reference which of the two - //! buffers now contains the sorted output sequence (a function of the + //! - Upon completion, the sorting operation will update the "current" + //! indicator within each DoubleBuffer wrapper to reference which of the two + //! buffers now contains the sorted output sequence (a function of the //! number of key bits specified and the targeted device architecture). - //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key - //! bits can be specified. This can reduce overall sorting overhead and + //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key + //! bits can be specified. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. //! - @devicestorageP //! - @devicestorage //! //! @par Performance - //! The following charts illustrate saturated sorting performance across + //! The following charts illustrate saturated sorting performance across //! different CUDA architectures for uniform-random `uint32, uint32` and //! `uint64, uint64` pairs, respectively. //! @@ -700,14 +707,14 @@ public: //! @image html lsb_radix_sort_int64_pairs.png //! //! @par Snippet - //! The code snippet below illustrates the sorting of a device vector of `int` + //! The code snippet below illustrates the sorting of a device vector of `int` //! keys with associated vector of `int` values. //! @par //! @code - //! #include + //! #include //! // or equivalently //! - //! // Declare, allocate, and initialize device-accessible pointers for + //! // Declare, allocate, and initialize device-accessible pointers for //! // sorting data //! int num_items; // e.g., 7 //! int *d_key_buf; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -738,45 +745,45 @@ public: //! //! @endcode //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam ValueT + //! @tparam ValueT //! **[inferred]** ValueT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the //! required allocation size is written to @p temp_storage_bytes and no work is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in,out] d_keys - //! Reference to the double-buffer of keys whose "current" device-accessible - //! buffer contains the unsorted input keys and, upon return, is updated to + //! @param[in,out] d_keys + //! Reference to the double-buffer of keys whose "current" device-accessible + //! buffer contains the unsorted input keys and, upon return, is updated to //! point to the sorted output keys //! - //! @param[in,out] d_values - //! Double-buffer of values whose "current" device-accessible buffer - //! contains the unsorted input values and, upon return, is updated to point + //! @param[in,out] d_values + //! Double-buffer of values whose "current" device-accessible buffer + //! contains the unsorted input values and, upon return, is updated to point //! to the sorted output values //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `sizeof(unsigned int) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static cudaError_t @@ -833,14 +840,14 @@ public: } #endif - //! @rst + //! @rst //! Sorts key-value pairs into ascending order using :math:`\approx N` auxiliary storage. - //! + //! //! * The sorting operation is given a pair of key buffers and a corresponding //! pair of associated value buffers. Each pair is managed by a DoubleBuffer //! structure that indicates which of the two buffers is "current" (and thus //! contains the input data to be sorted). - //! * The contents of both buffers within each pair may be altered by the + //! * The contents of both buffers within each pair may be altered by the //! sorting operation. //! * In-place operations are not supported. There must be no overlap between //! any of the provided ranges: @@ -850,9 +857,9 @@ public: //! - ``[d_values.Current(), d_values.Current() + num_items)`` //! - ``[d_values.Alternate(), d_values.Alternate() + num_items)`` //! - //! - Upon completion, the sorting operation will update the "current" - //! indicator within each DoubleBuffer wrapper to reference which of the two - //! buffers now contains the sorted output sequence (a function of the + //! - Upon completion, the sorting operation will update the "current" + //! indicator within each DoubleBuffer wrapper to reference which of the two + //! buffers now contains the sorted output sequence (a function of the //! number of key bits specified and the targeted device architecture). //! - @devicestorageP //! - @devicestorage @@ -873,7 +880,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortPairs``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -882,51 +889,51 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam ValueT + //! @tparam ValueT //! **[inferred]** ValueT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in,out] d_keys - //! Reference to the double-buffer of keys whose "current" device-accessible - //! buffer contains the unsorted input keys and, upon return, is updated to + //! @param[in,out] d_keys + //! Reference to the double-buffer of keys whose "current" device-accessible + //! buffer contains the unsorted input keys and, upon return, is updated to //! point to the sorted output keys //! - //! @param[in,out] d_values - //! Double-buffer of values whose "current" device-accessible buffer - //! contains the unsorted input values and, upon return, is updated to point + //! @param[in,out] d_values + //! Double-buffer of values whose "current" device-accessible buffer + //! contains the unsorted input values and, upon return, is updated to point //! to the sorted output values //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -963,14 +970,14 @@ public: stream); } - //! @rst + //! @rst //! Sorts key-value pairs into ascending order using :math:`\approx N` auxiliary storage. - //! + //! //! * The sorting operation is given a pair of key buffers and a corresponding //! pair of associated value buffers. Each pair is managed by a DoubleBuffer //! structure that indicates which of the two buffers is "current" (and thus //! contains the input data to be sorted). - //! * The contents of both buffers within each pair may be altered by the + //! * The contents of both buffers within each pair may be altered by the //! sorting operation. //! * In-place operations are not supported. There must be no overlap between //! any of the provided ranges: @@ -980,12 +987,12 @@ public: //! - ``[d_values.Current(), d_values.Current() + num_items)`` //! - ``[d_values.Alternate(), d_values.Alternate() + num_items)`` //! - //! - Upon completion, the sorting operation will update the "current" - //! indicator within each DoubleBuffer wrapper to reference which of the two - //! buffers now contains the sorted output sequence (a function of the + //! - Upon completion, the sorting operation will update the "current" + //! indicator within each DoubleBuffer wrapper to reference which of the two + //! buffers now contains the sorted output sequence (a function of the //! number of key bits specified and the targeted device architecture). - //! - An optional bit subrange ``[begin_bit, end_bit)`` of differentiating key - //! bits can be specified. This can reduce overall sorting overhead and + //! - An optional bit subrange ``[begin_bit, end_bit)`` of differentiating key + //! bits can be specified. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. //! - @devicestorageP //! - @devicestorage @@ -1006,7 +1013,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortPairs``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -1015,59 +1022,59 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam ValueT + //! @tparam ValueT //! **[inferred]** ValueT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in,out] d_keys - //! Reference to the double-buffer of keys whose "current" device-accessible - //! buffer contains the unsorted input keys and, upon return, is updated to + //! @param[in,out] d_keys + //! Reference to the double-buffer of keys whose "current" device-accessible + //! buffer contains the unsorted input keys and, upon return, is updated to //! point to the sorted output keys //! - //! @param[in,out] d_values - //! Double-buffer of values whose "current" device-accessible buffer - //! contains the unsorted input values and, upon return, is updated to point + //! @param[in,out] d_values + //! Double-buffer of values whose "current" device-accessible buffer + //! contains the unsorted input values and, upon return, is updated to point //! to the sorted output values //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -1108,7 +1115,7 @@ public: stream); } - //! @brief Sorts key-value pairs into descending order. + //! @brief Sorts key-value pairs into descending order. //! (`~2N` auxiliary storage required). //! //! @par @@ -1121,10 +1128,10 @@ public: //! - `[d_keys_out, d_keys_out + num_items)` //! - `[d_values_in, d_values_in + num_items)` //! - `[d_values_out, d_values_out + num_items)` - //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key - //! bits can be specified. This can reduce overall sorting overhead and + //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key + //! bits can be specified. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. - //! - @devicestorageNP For sorting using only `O(P)` temporary storage, see + //! - @devicestorageNP For sorting using only `O(P)` temporary storage, see //! the sorting interface using DoubleBuffer wrappers below. //! - @devicestorage //! @@ -1132,14 +1139,14 @@ public: //! Performance is similar to DeviceRadixSort::SortPairs. //! //! @par Snippet - //! The code snippet below illustrates the sorting of a device vector of `int` + //! The code snippet below illustrates the sorting of a device vector of `int` //! keys with associated vector of `int` values. //! @par //! @code - //! #include + //! #include //! // or equivalently //! - //! // Declare, allocate, and initialize device-accessible pointers + //! // Declare, allocate, and initialize device-accessible pointers //! // for sorting data //! int num_items; // e.g., 7 //! int *d_keys_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -1167,49 +1174,49 @@ public: //! // d_values_out <-- [6, 0, 2, 1, 3, 4, 5] //! @endcode //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam ValueT + //! @tparam ValueT //! **[inferred]** ValueT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of @p d_temp_storage allocation //! - //! @param[in] d_keys_in + //! @param[in] d_keys_in //! Pointer to the input data of key data to sort //! - //! @param[out] d_keys_out + //! @param[out] d_keys_out //! Pointer to the sorted output sequence of key data //! - //! @param[in] d_values_in + //! @param[in] d_values_in //! Pointer to the corresponding input sequence of associated value items //! - //! @param[out] d_values_out - //! Pointer to the correspondingly-reordered output sequence of associated + //! @param[out] d_values_out + //! Pointer to the correspondingly-reordered output sequence of associated //! value items //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `sizeof(unsigned int) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static cudaError_t @@ -1279,9 +1286,9 @@ public: } #endif - //! @rst + //! @rst //! Sorts key-value pairs into descending order using :math:`\approx 2N` auxiliary storage. - //! + //! //! * The contents of the input data are not altered by the sorting operation. //! * Pointers to contiguous memory must be used; iterators are not currently //! supported. @@ -1293,10 +1300,10 @@ public: //! * ``[d_values_in, d_values_in + num_items)`` //! * ``[d_values_out, d_values_out + num_items)`` //! - //! * A bit subrange ``[begin_bit, end_bit)`` is provided to specify - //! differentiating key bits. This can reduce overall sorting overhead and + //! * A bit subrange ``[begin_bit, end_bit)`` is provided to specify + //! differentiating key bits. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. - //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see + //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see //! the sorting interface using DoubleBuffer wrappers below. //! * @devicestorage //! @@ -1316,7 +1323,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortPairsDescending``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -1325,62 +1332,62 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam ValueT + //! @tparam ValueT //! **[inferred]** ValueT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in] d_keys_in + //! @param[in] d_keys_in //! Pointer to the input data of key data to sort //! - //! @param[out] d_keys_out + //! @param[out] d_keys_out //! Pointer to the sorted output sequence of key data //! - //! @param[in] d_values_in + //! @param[in] d_values_in //! Pointer to the corresponding input sequence of associated value items //! - //! @param[out] d_values_out - //! Pointer to the correspondingly-reordered output sequence of associated + //! @param[out] d_values_out + //! Pointer to the correspondingly-reordered output sequence of associated //! value items //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -1429,9 +1436,9 @@ public: stream); } - //! @rst + //! @rst //! Sorts key-value pairs into descending order using :math:`\approx 2N` auxiliary storage. - //! + //! //! * The contents of the input data are not altered by the sorting operation. //! * Pointers to contiguous memory must be used; iterators are not currently //! supported. @@ -1443,7 +1450,7 @@ public: //! * ``[d_values_in, d_values_in + num_items)`` //! * ``[d_values_out, d_values_out + num_items)`` //! - //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see + //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see //! the sorting interface using DoubleBuffer wrappers below. //! * @devicestorage //! @@ -1463,7 +1470,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortPairsDescending``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -1472,54 +1479,54 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam ValueT + //! @tparam ValueT //! **[inferred]** ValueT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in] d_keys_in + //! @param[in] d_keys_in //! Pointer to the input data of key data to sort //! - //! @param[out] d_keys_out + //! @param[out] d_keys_out //! Pointer to the sorted output sequence of key data //! - //! @param[in] d_values_in + //! @param[in] d_values_in //! Pointer to the corresponding input sequence of associated value items //! - //! @param[out] d_values_out - //! Pointer to the correspondingly-reordered output sequence of associated + //! @param[out] d_values_out + //! Pointer to the correspondingly-reordered output sequence of associated //! value items //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -1564,7 +1571,7 @@ public: stream); } - //! @brief Sorts key-value pairs into descending order. + //! @brief Sorts key-value pairs into descending order. //! (`~N` auxiliary storage required). //! //! @par @@ -1572,7 +1579,7 @@ public: //! pair of associated value buffers. Each pair is managed by a DoubleBuffer //! structure that indicates which of the two buffers is "current" (and thus //! contains the input data to be sorted). - //! - The contents of both buffers within each pair may be altered by the + //! - The contents of both buffers within each pair may be altered by the //! sorting operation. //! - In-place operations are not supported. There must be no overlap between //! any of the provided ranges: @@ -1580,12 +1587,12 @@ public: //! - `[d_keys.Alternate(), d_keys.Alternate() + num_items)` //! - `[d_values.Current(), d_values.Current() + num_items)` //! - `[d_values.Alternate(), d_values.Alternate() + num_items)` - //! - Upon completion, the sorting operation will update the "current" - //! indicator within each DoubleBuffer wrapper to reference which of the two - //! buffers now contains the sorted output sequence (a function of the number + //! - Upon completion, the sorting operation will update the "current" + //! indicator within each DoubleBuffer wrapper to reference which of the two + //! buffers now contains the sorted output sequence (a function of the number //! of key bits specified and the targeted device architecture). - //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key - //! bits can be specified. This can reduce overall sorting overhead and + //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key + //! bits can be specified. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. //! - @devicestorageP //! - @devicestorage @@ -1594,14 +1601,14 @@ public: //! Performance is similar to DeviceRadixSort::SortPairs. //! //! @par Snippet - //! The code snippet below illustrates the sorting of a device vector of `int` + //! The code snippet below illustrates the sorting of a device vector of `int` //! keys with associated vector of `int` values. //! @par //! @code - //! #include + //! #include //! // or equivalently //! - //! // Declare, allocate, and initialize device-accessible pointers + //! // Declare, allocate, and initialize device-accessible pointers //! // for sorting data //! int num_items; // e.g., 7 //! int *d_key_buf; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -1631,46 +1638,46 @@ public: //! // d_values.Current() <-- [6, 0, 2, 1, 3, 4, 5] //! @endcode //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam ValueT + //! @tparam ValueT //! **[inferred]** ValueT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in,out] d_keys - //! Reference to the double-buffer of keys whose "current" device-accessible - //! buffer contains the unsorted input keys and, upon return, is updated to + //! @param[in,out] d_keys + //! Reference to the double-buffer of keys whose "current" device-accessible + //! buffer contains the unsorted input keys and, upon return, is updated to //! point to the sorted output keys //! - //! @param[in,out] d_values - //! Double-buffer of values whose "current" device-accessible buffer - //! contains the unsorted input values and, upon return, is updated to point + //! @param[in,out] d_values + //! Double-buffer of values whose "current" device-accessible buffer + //! contains the unsorted input values and, upon return, is updated to point //! to the sorted output values //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `sizeof(unsigned int) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static cudaError_t @@ -1727,14 +1734,14 @@ public: } #endif - //! @rst + //! @rst //! Sorts key-value pairs into descending order using :math:`\approx N` auxiliary storage. - //! + //! //! * The sorting operation is given a pair of key buffers and a corresponding //! pair of associated value buffers. Each pair is managed by a DoubleBuffer //! structure that indicates which of the two buffers is "current" (and thus //! contains the input data to be sorted). - //! * The contents of both buffers within each pair may be altered by the + //! * The contents of both buffers within each pair may be altered by the //! sorting operation. //! * In-place operations are not supported. There must be no overlap between //! any of the provided ranges: @@ -1744,9 +1751,9 @@ public: //! - ``[d_values.Current(), d_values.Current() + num_items)`` //! - ``[d_values.Alternate(), d_values.Alternate() + num_items)`` //! - //! - Upon completion, the sorting operation will update the "current" - //! indicator within each DoubleBuffer wrapper to reference which of the two - //! buffers now contains the sorted output sequence (a function of the + //! - Upon completion, the sorting operation will update the "current" + //! indicator within each DoubleBuffer wrapper to reference which of the two + //! buffers now contains the sorted output sequence (a function of the //! number of key bits specified and the targeted device architecture). //! - @devicestorageP //! - @devicestorage @@ -1767,7 +1774,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortPairsDescending``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -1776,51 +1783,51 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam ValueT + //! @tparam ValueT //! **[inferred]** ValueT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in,out] d_keys - //! Reference to the double-buffer of keys whose "current" device-accessible - //! buffer contains the unsorted input keys and, upon return, is updated to + //! @param[in,out] d_keys + //! Reference to the double-buffer of keys whose "current" device-accessible + //! buffer contains the unsorted input keys and, upon return, is updated to //! point to the sorted output keys //! - //! @param[in,out] d_values - //! Double-buffer of values whose "current" device-accessible buffer - //! contains the unsorted input values and, upon return, is updated to point + //! @param[in,out] d_values + //! Double-buffer of values whose "current" device-accessible buffer + //! contains the unsorted input values and, upon return, is updated to point //! to the sorted output values //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -1857,14 +1864,14 @@ public: stream); } - //! @rst + //! @rst //! Sorts key-value pairs into descending order using :math:`\approx N` auxiliary storage. - //! + //! //! * The sorting operation is given a pair of key buffers and a corresponding //! pair of associated value buffers. Each pair is managed by a DoubleBuffer //! structure that indicates which of the two buffers is "current" (and thus //! contains the input data to be sorted). - //! * The contents of both buffers within each pair may be altered by the + //! * The contents of both buffers within each pair may be altered by the //! sorting operation. //! * In-place operations are not supported. There must be no overlap between //! any of the provided ranges: @@ -1874,12 +1881,12 @@ public: //! - ``[d_values.Current(), d_values.Current() + num_items)`` //! - ``[d_values.Alternate(), d_values.Alternate() + num_items)`` //! - //! - Upon completion, the sorting operation will update the "current" - //! indicator within each DoubleBuffer wrapper to reference which of the two - //! buffers now contains the sorted output sequence (a function of the + //! - Upon completion, the sorting operation will update the "current" + //! indicator within each DoubleBuffer wrapper to reference which of the two + //! buffers now contains the sorted output sequence (a function of the //! number of key bits specified and the targeted device architecture). - //! - An optional bit subrange ``[begin_bit, end_bit)`` of differentiating key - //! bits can be specified. This can reduce overall sorting overhead and + //! - An optional bit subrange ``[begin_bit, end_bit)`` of differentiating key + //! bits can be specified. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. //! - @devicestorageP //! - @devicestorage @@ -1900,7 +1907,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortPairsDescending``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -1909,59 +1916,59 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam ValueT + //! @tparam ValueT //! **[inferred]** ValueT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in,out] d_keys - //! Reference to the double-buffer of keys whose "current" device-accessible - //! buffer contains the unsorted input keys and, upon return, is updated to + //! @param[in,out] d_keys + //! Reference to the double-buffer of keys whose "current" device-accessible + //! buffer contains the unsorted input keys and, upon return, is updated to //! point to the sorted output keys //! - //! @param[in,out] d_values - //! Double-buffer of values whose "current" device-accessible buffer - //! contains the unsorted input values and, upon return, is updated to point + //! @param[in,out] d_values + //! Double-buffer of values whose "current" device-accessible buffer + //! contains the unsorted input values and, upon return, is updated to point //! to the sorted output values //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -2009,7 +2016,7 @@ public: //@{ - //! @brief Sorts keys into ascending order. + //! @brief Sorts keys into ascending order. //! (`~2N` auxiliary storage required) //! //! @par @@ -2020,30 +2027,30 @@ public: //! any of the provided ranges: //! - `[d_keys_in, d_keys_in + num_items)` //! - `[d_keys_out, d_keys_out + num_items)` - //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key - //! bits can be specified. This can reduce overall sorting overhead and + //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key + //! bits can be specified. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. - //! - @devicestorageNP For sorting using only `O(P)` temporary storage, see + //! - @devicestorageNP For sorting using only `O(P)` temporary storage, see //! the sorting interface using DoubleBuffer wrappers below. //! - @devicestorage //! //! @par Performance - //! The following charts illustrate saturated sorting performance across - //! different CUDA architectures for uniform-random `uint32` and `uint64` + //! The following charts illustrate saturated sorting performance across + //! different CUDA architectures for uniform-random `uint32` and `uint64` //! keys, respectively. //! //! @image html lsb_radix_sort_int32_keys.png //! @image html lsb_radix_sort_int64_keys.png //! //! @par Snippet - //! The code snippet below illustrates the sorting of a device vector of + //! The code snippet below illustrates the sorting of a device vector of //! `int` keys. //! @par //! @code - //! #include + //! #include //! // or equivalently //! - //! // Declare, allocate, and initialize device-accessible pointers + //! // Declare, allocate, and initialize device-accessible pointers //! // for sorting data //! int num_items; // e.g., 7 //! int *d_keys_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -2066,42 +2073,42 @@ public: //! // d_keys_out <-- [0, 3, 5, 6, 7, 8, 9] //! @endcode //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in] d_keys_in + //! @param[in] d_keys_in //! Pointer to the input data of key data to sort //! - //! @param[out] d_keys_out + //! @param[out] d_keys_out //! Pointer to the sorted output sequence of key data //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `sizeof(unsigned int) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static cudaError_t @@ -2138,9 +2145,9 @@ public: stream); } - //! @rst + //! @rst //! Sorts keys into ascending order using :math:`\approx 2N` auxiliary storage. - //! + //! //! * The contents of the input data are not altered by the sorting operation. //! * Pointers to contiguous memory must be used; iterators are not currently //! supported. @@ -2150,10 +2157,10 @@ public: //! * ``[d_keys_in, d_keys_in + num_items)`` //! * ``[d_keys_out, d_keys_out + num_items)`` //! - //! * A bit subrange ``[begin_bit, end_bit)`` is provided to specify - //! differentiating key bits. This can reduce overall sorting overhead and + //! * A bit subrange ``[begin_bit, end_bit)`` is provided to specify + //! differentiating key bits. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. - //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see + //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see //! the sorting interface using DoubleBuffer wrappers below. //! * @devicestorage //! @@ -2173,7 +2180,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortKeys``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -2182,52 +2189,52 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in] d_keys_in + //! @param[in] d_keys_in //! Pointer to the input data of key data to sort //! - //! @param[out] d_keys_out + //! @param[out] d_keys_out //! Pointer to the sorted output sequence of key data //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -2274,9 +2281,9 @@ public: stream); } - //! @rst + //! @rst //! Sorts keys into ascending order using :math:`\approx 2N` auxiliary storage. - //! + //! //! * The contents of the input data are not altered by the sorting operation. //! * Pointers to contiguous memory must be used; iterators are not currently //! supported. @@ -2286,10 +2293,10 @@ public: //! * ``[d_keys_in, d_keys_in + num_items)`` //! * ``[d_keys_out, d_keys_out + num_items)`` //! - //! * An optional bit subrange ``[begin_bit, end_bit)`` of differentiating key - //! bits can be specified. This can reduce overall sorting overhead and + //! * An optional bit subrange ``[begin_bit, end_bit)`` of differentiating key + //! bits can be specified. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. - //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see + //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see //! the sorting interface using DoubleBuffer wrappers below. //! * @devicestorage //! @@ -2309,7 +2316,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortKeys``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -2318,44 +2325,44 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in] d_keys_in + //! @param[in] d_keys_in //! Pointer to the input data of key data to sort //! - //! @param[out] d_keys_out + //! @param[out] d_keys_out //! Pointer to the sorted output sequence of key data //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -2437,33 +2444,33 @@ public: //! any of the provided ranges: //! - `[d_keys.Current(), d_keys.Current() + num_items)` //! - `[d_keys.Alternate(), d_keys.Alternate() + num_items)` - //! - Upon completion, the sorting operation will update the "current" - //! indicator within the DoubleBuffer wrapper to reference which of the two - //! buffers now contains the sorted output sequence (a function of the + //! - Upon completion, the sorting operation will update the "current" + //! indicator within the DoubleBuffer wrapper to reference which of the two + //! buffers now contains the sorted output sequence (a function of the //! number of key bits specified and the targeted device architecture). - //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key - //! bits can be specified. This can reduce overall sorting overhead and + //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key + //! bits can be specified. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. //! - @devicestorageP //! - @devicestorage //! //! @par Performance - //! The following charts illustrate saturated sorting performance across - //! different CUDA architectures for uniform-random `uint32` and `uint64` + //! The following charts illustrate saturated sorting performance across + //! different CUDA architectures for uniform-random `uint32` and `uint64` //! keys, respectively. //! //! @image html lsb_radix_sort_int32_keys.png //! @image html lsb_radix_sort_int64_keys.png //! //! @par Snippet - //! The code snippet below illustrates the sorting of a device vector of + //! The code snippet below illustrates the sorting of a device vector of //! `int` keys. //! @par //! @code - //! #include + //! #include //! // or equivalently //! - //! // Declare, allocate, and initialize device-accessible pointers + //! // Declare, allocate, and initialize device-accessible pointers //! // for sorting data //! int num_items; // e.g., 7 //! int *d_key_buf; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -2489,38 +2496,38 @@ public: //! // d_keys.Current() <-- [0, 3, 5, 6, 7, 8, 9] //! @endcode //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in,out] d_keys - //! Reference to the double-buffer of keys whose "current" device-accessible - //! buffer contains the unsorted input keys and, upon return, is updated to + //! @param[in,out] d_keys + //! Reference to the double-buffer of keys whose "current" device-accessible + //! buffer contains the unsorted input keys and, upon return, is updated to //! point to the sorted output keys //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `sizeof(unsigned int) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static cudaError_t @@ -2577,9 +2584,9 @@ public: } #endif - //! @rst + //! @rst //! Sorts keys into ascending order using :math:`\approx N` auxiliary storage. - //! + //! //! * The sorting operation is given a pair of key buffers managed by a //! DoubleBuffer structure that indicates which of the two buffers is //! "current" (and thus contains the input data to be sorted). @@ -2590,9 +2597,9 @@ public: //! * ``[d_keys.Current(), d_keys.Current() + num_items)`` //! * ``[d_keys.Alternate(), d_keys.Alternate() + num_items)` //! - //! * Upon completion, the sorting operation will update the "current" - //! indicator within the DoubleBuffer wrapper to reference which of the two - //! buffers now contains the sorted output sequence (a function of the + //! * Upon completion, the sorting operation will update the "current" + //! indicator within the DoubleBuffer wrapper to reference which of the two + //! buffers now contains the sorted output sequence (a function of the //! number of key bits specified and the targeted device architecture). //! * @devicestorageP //! * @devicestorage @@ -2613,7 +2620,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortKeys``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -2622,43 +2629,43 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in,out] d_keys - //! Reference to the double-buffer of keys whose "current" device-accessible - //! buffer contains the unsorted input keys and, upon return, is updated to + //! @param[in,out] d_keys + //! Reference to the double-buffer of keys whose "current" device-accessible + //! buffer contains the unsorted input keys and, upon return, is updated to //! point to the sorted output keys //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -2695,9 +2702,9 @@ public: stream); } - //! @rst + //! @rst //! Sorts keys into ascending order using :math:`\approx N` auxiliary storage. - //! + //! //! * The sorting operation is given a pair of key buffers managed by a //! DoubleBuffer structure that indicates which of the two buffers is //! "current" (and thus contains the input data to be sorted). @@ -2708,12 +2715,12 @@ public: //! * ``[d_keys.Current(), d_keys.Current() + num_items)`` //! * ``[d_keys.Alternate(), d_keys.Alternate() + num_items)` //! - //! * A bit subrange ``[begin_bit, end_bit)`` is provided to specify - //! differentiating key bits. This can reduce overall sorting overhead and + //! * A bit subrange ``[begin_bit, end_bit)`` is provided to specify + //! differentiating key bits. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. - //! * Upon completion, the sorting operation will update the "current" - //! indicator within the DoubleBuffer wrapper to reference which of the two - //! buffers now contains the sorted output sequence (a function of the + //! * Upon completion, the sorting operation will update the "current" + //! indicator within the DoubleBuffer wrapper to reference which of the two + //! buffers now contains the sorted output sequence (a function of the //! number of key bits specified and the targeted device architecture). //! * @devicestorageP //! * @devicestorage @@ -2734,7 +2741,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortKeys``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -2743,51 +2750,51 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in,out] d_keys - //! Reference to the double-buffer of keys whose "current" device-accessible - //! buffer contains the unsorted input keys and, upon return, is updated to + //! @param[in,out] d_keys + //! Reference to the double-buffer of keys whose "current" device-accessible + //! buffer contains the unsorted input keys and, upon return, is updated to //! point to the sorted output keys //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -2827,8 +2834,8 @@ public: end_bit, stream); } - - //! @brief Sorts keys into descending order. + + //! @brief Sorts keys into descending order. //! (`~2N` auxiliary storage required). //! //! @par @@ -2839,10 +2846,10 @@ public: //! any of the provided ranges: //! - `[d_keys_in, d_keys_in + num_items)` //! - `[d_keys_out, d_keys_out + num_items)` - //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key - //! bits can be specified. This can reduce overall sorting overhead and + //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key + //! bits can be specified. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. - //! - @devicestorageNP For sorting using only `O(P)` temporary storage, see + //! - @devicestorageNP For sorting using only `O(P)` temporary storage, see //! the sorting interface using DoubleBuffer wrappers below. //! - @devicestorage //! @@ -2850,14 +2857,14 @@ public: //! Performance is similar to DeviceRadixSort::SortKeys. //! //! @par Snippet - //! The code snippet below illustrates the sorting of a device vector of + //! The code snippet below illustrates the sorting of a device vector of //! `int` keys. //! @par //! @code - //! #include + //! #include //! // or equivalently //! - //! // Declare, allocate, and initialize device-accessible pointers + //! // Declare, allocate, and initialize device-accessible pointers //! // for sorting data //! int num_items; // e.g., 7 //! int *d_keys_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -2870,7 +2877,7 @@ public: //! // Determine temporary device storage requirements //! void *d_temp_storage = NULL; //! size_t temp_storage_bytes = 0; - //! cub::DeviceRadixSort::SortKeysDescending( + //! cub::DeviceRadixSort::SortKeysDescending( //! d_temp_storage, temp_storage_bytes, d_keys_in, d_keys_out, num_items); //! //! // Allocate temporary storage @@ -2884,39 +2891,39 @@ public: //! //! @endcode //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in] d_keys_in + //! @param[in] d_keys_in //! Pointer to the input data of key data to sort //! - //! @param[out] d_keys_out + //! @param[out] d_keys_out //! Pointer to the sorted output sequence of key data //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `sizeof(unsigned int) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static cudaError_t @@ -2979,9 +2986,9 @@ public: } #endif - //! @rst + //! @rst //! Sorts keys into descending order using :math:`\approx 2N` auxiliary storage. - //! + //! //! * The contents of the input data are not altered by the sorting operation. //! * Pointers to contiguous memory must be used; iterators are not currently //! supported. @@ -2991,10 +2998,10 @@ public: //! * ``[d_keys_in, d_keys_in + num_items)`` //! * ``[d_keys_out, d_keys_out + num_items)`` //! - //! * An optional bit subrange ``[begin_bit, end_bit)`` of differentiating key - //! bits can be specified. This can reduce overall sorting overhead and + //! * An optional bit subrange ``[begin_bit, end_bit)`` of differentiating key + //! bits can be specified. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. - //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see + //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see //! the sorting interface using DoubleBuffer wrappers below. //! * @devicestorage //! @@ -3014,7 +3021,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortKeysDescending``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -3023,52 +3030,52 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in] d_keys_in + //! @param[in] d_keys_in //! Pointer to the input data of key data to sort //! - //! @param[out] d_keys_out + //! @param[out] d_keys_out //! Pointer to the sorted output sequence of key data //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -3115,9 +3122,9 @@ public: stream); } - //! @rst + //! @rst //! Sorts keys into descending order using :math:`\approx 2N` auxiliary storage. - //! + //! //! * The contents of the input data are not altered by the sorting operation. //! * Pointers to contiguous memory must be used; iterators are not currently //! supported. @@ -3127,7 +3134,7 @@ public: //! * ``[d_keys_in, d_keys_in + num_items)`` //! * ``[d_keys_out, d_keys_out + num_items)`` //! - //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see + //! * @devicestorageNP For sorting using only :math:`O(P)` temporary storage, see //! the sorting interface using DoubleBuffer wrappers below. //! * @devicestorage //! @@ -3147,7 +3154,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortKeysDescending``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -3156,44 +3163,44 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in] d_keys_in + //! @param[in] d_keys_in //! Pointer to the input data of key data to sort //! - //! @param[out] d_keys_out + //! @param[out] d_keys_out //! Pointer to the sorted output sequence of key data //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -3236,7 +3243,7 @@ public: stream); } - //! @brief Sorts keys into descending order. + //! @brief Sorts keys into descending order. //! (`~N` auxiliary storage required). //! //! @par @@ -3248,12 +3255,12 @@ public: //! any of the provided ranges: //! - `[d_keys.Current(), d_keys.Current() + num_items)` //! - `[d_keys.Alternate(), d_keys.Alternate() + num_items)` - //! - Upon completion, the sorting operation will update the "current" - //! indicator within the DoubleBuffer wrapper to reference which of the two - //! buffers now contains the sorted output sequence (a function of the + //! - Upon completion, the sorting operation will update the "current" + //! indicator within the DoubleBuffer wrapper to reference which of the two + //! buffers now contains the sorted output sequence (a function of the //! number of key bits specified and the targeted device architecture). - //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key - //! bits can be specified. This can reduce overall sorting overhead and + //! - An optional bit subrange `[begin_bit, end_bit)` of differentiating key + //! bits can be specified. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. //! - @devicestorageP //! - @devicestorage @@ -3265,10 +3272,10 @@ public: //! The code snippet below illustrates the sorting of a device vector of @p int keys. //! @par //! @code - //! #include + //! #include //! // or equivalently //! - //! // Declare, allocate, and initialize device-accessible pointers + //! // Declare, allocate, and initialize device-accessible pointers //! // for sorting data //! int num_items; // e.g., 7 //! int *d_key_buf; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -3294,38 +3301,38 @@ public: //! // d_keys.Current() <-- [9, 8, 7, 6, 5, 3, 0] //! @endcode //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in,out] d_keys - //! Reference to the double-buffer of keys whose "current" device-accessible - //! buffer contains the unsorted input keys and, upon return, is updated to + //! @param[in,out] d_keys + //! Reference to the double-buffer of keys whose "current" device-accessible + //! buffer contains the unsorted input keys and, upon return, is updated to //! point to the sorted output keys //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `sizeof(unsigned int) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static cudaError_t @@ -3382,9 +3389,9 @@ public: } #endif - //! @rst + //! @rst //! Sorts keys into descending order using :math:`\approx N` auxiliary storage. - //! + //! //! * The sorting operation is given a pair of key buffers managed by a //! DoubleBuffer structure that indicates which of the two buffers is //! "current" (and thus contains the input data to be sorted). @@ -3395,9 +3402,9 @@ public: //! * ``[d_keys.Current(), d_keys.Current() + num_items)`` //! * ``[d_keys.Alternate(), d_keys.Alternate() + num_items)` //! - //! * Upon completion, the sorting operation will update the "current" - //! indicator within the DoubleBuffer wrapper to reference which of the two - //! buffers now contains the sorted output sequence (a function of the + //! * Upon completion, the sorting operation will update the "current" + //! indicator within the DoubleBuffer wrapper to reference which of the two + //! buffers now contains the sorted output sequence (a function of the //! number of key bits specified and the targeted device architecture). //! * @devicestorageP //! * @devicestorage @@ -3418,7 +3425,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortKeysDescending``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -3427,43 +3434,43 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in,out] d_keys - //! Reference to the double-buffer of keys whose "current" device-accessible - //! buffer contains the unsorted input keys and, upon return, is updated to + //! @param[in,out] d_keys + //! Reference to the double-buffer of keys whose "current" device-accessible + //! buffer contains the unsorted input keys and, upon return, is updated to //! point to the sorted output keys //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // @@ -3500,9 +3507,9 @@ public: stream); } - //! @rst + //! @rst //! Sorts keys into descending order using :math:`\approx N` auxiliary storage. - //! + //! //! * The sorting operation is given a pair of key buffers managed by a //! DoubleBuffer structure that indicates which of the two buffers is //! "current" (and thus contains the input data to be sorted). @@ -3513,12 +3520,12 @@ public: //! * ``[d_keys.Current(), d_keys.Current() + num_items)`` //! * ``[d_keys.Alternate(), d_keys.Alternate() + num_items)` //! - //! * A bit subrange ``[begin_bit, end_bit)`` is provided to specify - //! differentiating key bits. This can reduce overall sorting overhead and + //! * A bit subrange ``[begin_bit, end_bit)`` is provided to specify + //! differentiating key bits. This can reduce overall sorting overhead and //! yield a corresponding performance improvement. - //! * Upon completion, the sorting operation will update the "current" - //! indicator within the DoubleBuffer wrapper to reference which of the two - //! buffers now contains the sorted output sequence (a function of the + //! * Upon completion, the sorting operation will update the "current" + //! indicator within the DoubleBuffer wrapper to reference which of the two + //! buffers now contains the sorted output sequence (a function of the //! number of key bits specified and the targeted device architecture). //! * @devicestorageP //! * @devicestorage @@ -3539,7 +3546,7 @@ public: //! //! The following snippet shows how to sort an array of ``custom_t`` objects //! using ``cub::DeviceRadixSort::SortKeysDescending``: - //! + //! //! .. literalinclude:: ../../test/catch2_test_device_radix_sort_custom.cu //! :language: c++ //! :dedent: @@ -3548,51 +3555,51 @@ public: //! //! @endrst //! - //! @tparam KeyT + //! @tparam KeyT //! **[inferred]** KeyT type //! - //! @tparam NumItemsT + //! @tparam NumItemsT //! **[inferred]** Type of num_items //! //! @tparam DecomposerT - //! **[inferred]** Type of a callable object responsible for decomposing a + //! **[inferred]** Type of a callable object responsible for decomposing a //! ``KeyT`` into a tuple of references to its constituent arithmetic types: - //! ``::cuda::std::tuple operator()(KeyT &key)``. - //! The leftmost element of the tuple is considered the most significant. + //! ``::cuda::std::tuple operator()(KeyT &key)``. + //! The leftmost element of the tuple is considered the most significant. //! The call operator must not modify members of the key. //! - //! @param[in] d_temp_storage - //! Device-accessible allocation of temporary storage. When `nullptr`, the - //! required allocation size is written to `temp_storage_bytes` and no work + //! @param[in] d_temp_storage + //! Device-accessible allocation of temporary storage. When `nullptr`, the + //! required allocation size is written to `temp_storage_bytes` and no work //! is done. //! - //! @param[in,out] temp_storage_bytes + //! @param[in,out] temp_storage_bytes //! Reference to size in bytes of `d_temp_storage` allocation //! - //! @param[in,out] d_keys - //! Reference to the double-buffer of keys whose "current" device-accessible - //! buffer contains the unsorted input keys and, upon return, is updated to + //! @param[in,out] d_keys + //! Reference to the double-buffer of keys whose "current" device-accessible + //! buffer contains the unsorted input keys and, upon return, is updated to //! point to the sorted output keys //! - //! @param[in] num_items + //! @param[in] num_items //! Number of items to sort //! //! @param decomposer //! Callable object responsible for decomposing a ``KeyT`` into a tuple of - //! references to its constituent arithmetic types. The leftmost element of - //! the tuple is considered the most significant. The call operator must not + //! references to its constituent arithmetic types. The leftmost element of + //! the tuple is considered the most significant. The call operator must not //! modify members of the key. //! - //! @param[in] begin_bit - //! **[optional]** The least-significant bit index (inclusive) needed for + //! @param[in] begin_bit + //! **[optional]** The least-significant bit index (inclusive) needed for //! key comparison //! - //! @param[in] end_bit - //! **[optional]** The most-significant bit index (exclusive) needed for key + //! @param[in] end_bit + //! **[optional]** The most-significant bit index (exclusive) needed for key //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) //! - //! @param[in] stream - //! **[optional]** CUDA stream to launch kernels within. + //! @param[in] stream + //! **[optional]** CUDA stream to launch kernels within. //! Default is stream0. template CUB_RUNTIME_FUNCTION static // diff --git a/cub/cub/device/device_reduce.cuh b/cub/cub/device/device_reduce.cuh index f2c4090f8b5..5bd12bc3c28 100644 --- a/cub/cub/device/device_reduce.cuh +++ b/cub/cub/device/device_reduce.cuh @@ -13,9 +13,9 @@ * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; @@ -27,17 +27,24 @@ ******************************************************************************/ /** - * @file cub::DeviceReduce provides device-wide, parallel operations for - * computing a reduction across a sequence of data items residing within + * @file cub::DeviceReduce provides device-wide, parallel operations for + * computing a reduction across a sequence of data items residing within * device-accessible memory. */ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include #include #include #include @@ -50,9 +57,9 @@ CUB_NAMESPACE_BEGIN //! @ingroup SingleModule //! //! @rst -//! DeviceReduce provides device-wide, parallel operations for computing -//! a reduction across a sequence of data items residing within -//! device-accessible memory. +//! DeviceReduce provides device-wide, parallel operations for computing +//! a reduction across a sequence of data items residing within +//! device-accessible memory. //! //! .. image:: ../img/reduce_logo.png //! :align: center @@ -60,7 +67,7 @@ CUB_NAMESPACE_BEGIN //! Overview //! ==================================== //! A `reduction `_ -//! (or *fold*) uses a binary combining operator to compute a single aggregate +//! (or *fold*) uses a binary combining operator to compute a single aggregate //! from a sequence of input elements. //! //! Usage Considerations @@ -79,8 +86,8 @@ CUB_NAMESPACE_BEGIN //! //! @par //! The following chart illustrates DeviceReduce::ReduceByKey (summation) -//! performance across different CUDA architectures for `fp32` values. Segments -//! are identified by `int32` keys, and have lengths uniformly sampled +//! performance across different CUDA architectures for `fp32` values. Segments +//! are identified by `int32` keys, and have lengths uniformly sampled //! from `[1, 1000]`. //! //! .. image:: ../img/reduce_by_key_fp32_len_500.png @@ -90,7 +97,7 @@ CUB_NAMESPACE_BEGIN struct DeviceReduce { /** - * @brief Computes a device-wide reduction using the specified binary + * @brief Computes a device-wide reduction using the specified binary * `reduction_op` functor and initial value `init`. * * @par @@ -104,11 +111,11 @@ struct DeviceReduce * - @devicestorage * * @par Snippet - * The code snippet below illustrates a user-defined min-reduction of a + * The code snippet below illustrates a user-defined min-reduction of a * device vector of `int` data elements. * @par * @code - * #include + * #include * // or equivalently * * // CustomMin functor @@ -121,7 +128,7 @@ struct DeviceReduce * } * }; * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -134,7 +141,7 @@ struct DeviceReduce * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceReduce::Reduce( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, num_items, min_op, init); * * // Allocate temporary storage @@ -142,55 +149,55 @@ struct DeviceReduce * * // Run reduction * cub::DeviceReduce::Reduce( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, num_items, min_op, init); * * // d_out <-- [0] * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading input * items \iterator * - * @tparam OutputIteratorT - * **[inferred]** Output iterator type for recording the reduced + * @tparam OutputIteratorT + * **[inferred]** Output iterator type for recording the reduced * aggregate \iterator * - * @tparam ReductionOpT - * **[inferred]** Binary reduction functor type having member + * @tparam ReductionOpT + * **[inferred]** Binary reduction functor type having member * `T operator()(const T &a, const T &b)` * - * @tparam T - * **[inferred]** Data element type that is convertible to the `value` type + * @tparam T + * **[inferred]** Data element type that is convertible to the `value` type * of `InputIteratorT` * * @tparam NumItemsT **[inferred]** Type of num_items * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param d_in[in] + * @param d_in[in] * Pointer to the input sequence of data items * - * @param d_out[out] + * @param d_out[out] * Pointer to the output aggregate * - * @param num_items[in] + * @param num_items[in] * Total number of input items (i.e., length of `d_in`) * - * @param reduction_op[in] + * @param reduction_op[in] * Binary reduction functor * - * @param[in] init + * @param[in] init * Initial value of the reduction * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for input and output * int num_items; // e.g., 7 * int *d_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -304,39 +311,39 @@ struct DeviceReduce * // d_out <-- [38] * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading input * items \iterator * - * @tparam OutputIteratorT - * **[inferred]** Output iterator type for recording the reduced + * @tparam OutputIteratorT + * **[inferred]** Output iterator type for recording the reduced * aggregate \iterator * * @tparam NumItemsT **[inferred]** Type of num_items * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_in + * @param[in] d_in * Pointer to the input sequence of data items * - * @param[out] d_out + * @param[out] d_out * Pointer to the output aggregate * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., length of `d_in`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ - template CUB_RUNTIME_FUNCTION static cudaError_t Sum(void *d_temp_storage, size_t &temp_storage_bytes, @@ -353,12 +360,12 @@ struct DeviceReduce cub::detail::non_void_value_t>; - using InitT = OutputT; + using InitT = OutputT; - return DispatchReduce::Dispatch(d_temp_storage, temp_storage_bytes, d_in, @@ -404,14 +411,14 @@ struct DeviceReduce * - @devicestorage * * @par Snippet - * The code snippet below illustrates the min-reduction of a device vector of + * The code snippet below illustrates the min-reduction of a device vector of * `int` data elements. * @par * @code - * #include + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for input and output * int num_items; // e.g., 7 * int *d_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -434,35 +441,35 @@ struct DeviceReduce * // d_out <-- [0] * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading input * items \iterator * - * @tparam OutputIteratorT - * **[inferred]** Output iterator type for recording the reduced + * @tparam OutputIteratorT + * **[inferred]** Output iterator type for recording the reduced * aggregate \iterator * * @tparam NumItemsT **[inferred]** Type of num_items * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_in + * @param[in] d_in * Pointer to the input sequence of data items * - * @param[out] d_out + * @param[out] d_out * Pointer to the output aggregate * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., length of `d_in`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template ::Dispatch(d_temp_storage, temp_storage_bytes, @@ -493,10 +500,10 @@ struct DeviceReduce d_out, static_cast(num_items), cub::Min(), - // replace with + // replace with // std::numeric_limits::max() when // C++11 support is more prevalent - Traits::Max(), + Traits::Max(), stream); } @@ -521,15 +528,15 @@ struct DeviceReduce } /** - * @brief Finds the first device-wide minimum using the less-than ('<') + * @brief Finds the first device-wide minimum using the less-than ('<') * operator, also returning the index of that item. * * @par - * - The output value type of `d_out` is cub::KeyValuePair `` + * - The output value type of `d_out` is cub::KeyValuePair `` * (assuming the value type of `d_in` is `T`) - * - The minimum is written to `d_out.value` and its offset in the input + * - The minimum is written to `d_out.value` and its offset in the input * array is written to `d_out.key`. - * - The `{1, std::numeric_limits::max()}` tuple is produced for + * - The `{1, std::numeric_limits::max()}` tuple is produced for * zero-length inputs * - Does not support `<` operators that are non-commutative. * - Provides "run-to-run" determinism for pseudo-associative reduction @@ -541,14 +548,14 @@ struct DeviceReduce * - @devicestorage * * @par Snippet - * The code snippet below illustrates the argmin-reduction of a device vector + * The code snippet below illustrates the argmin-reduction of a device vector * of `int` data elements. * @par * @code - * #include + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for input and output * int num_items; // e.g., 7 * int *d_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -572,35 +579,35 @@ struct DeviceReduce * * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading input items + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading input items * (of some type `T`) \iterator * - * @tparam OutputIteratorT - * **[inferred]** Output iterator type for recording the reduced aggregate + * @tparam OutputIteratorT + * **[inferred]** Output iterator type for recording the reduced aggregate * (having value type `cub::KeyValuePair`) \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the * required allocation size is written to \p temp_storage_bytes and no work is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_in + * @param[in] d_in * Pointer to the input sequence of data items * - * @param[out] d_out + * @param[out] d_out * Pointer to the output aggregate * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., length of `d_in`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ - template CUB_RUNTIME_FUNCTION static cudaError_t ArgMin(void *d_temp_storage, size_t &temp_storage_bytes, @@ -620,7 +627,7 @@ struct DeviceReduce cub::detail::non_void_value_t>; using AccumT = OutputTupleT; - + using InitT = detail::reduce::empty_problem_init_t; // The output value type @@ -634,7 +641,7 @@ struct DeviceReduce // Initial value // TODO Address https://github.com/NVIDIA/cub/issues/651 - InitT initial_value{AccumT(1, Traits::Max())}; + InitT initial_value{AccumT(1, Traits::Max())}; return DispatchReduce') operator. * * @par - * - Uses `std::numeric_limits::lowest()` as the initial value of the + * - Uses `std::numeric_limits::lowest()` as the initial value of the * reduction. * - Does not support `>` operators that are non-commutative. * - Provides "run-to-run" determinism for pseudo-associative reduction @@ -687,14 +694,14 @@ struct DeviceReduce * - @devicestorage * * @par Snippet - * The code snippet below illustrates the max-reduction of a device vector of + * The code snippet below illustrates the max-reduction of a device vector of * `int` data elements. * @par * @code - * #include + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for input and output * int num_items; // e.g., 7 * int *d_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -717,38 +724,38 @@ struct DeviceReduce * // d_out <-- [9] * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading input * items \iterator * - * @tparam OutputIteratorT - * **[inferred]** Output iterator type for recording the reduced + * @tparam OutputIteratorT + * **[inferred]** Output iterator type for recording the reduced * aggregate \iterator * * @tparam NumItemsT **[inferred]** Type of num_items * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_in + * @param[in] d_in * Pointer to the input sequence of data items * - * @param[out] d_out + * @param[out] d_out * Pointer to the output aggregate * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., length of `d_in`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ - template CUB_RUNTIME_FUNCTION static cudaError_t Max(void *d_temp_storage, @@ -766,9 +773,9 @@ struct DeviceReduce using InitT = InputT; - return DispatchReduce::Dispatch(d_temp_storage, temp_storage_bytes, @@ -776,11 +783,11 @@ struct DeviceReduce d_out, static_cast(num_items), cub::Max(), - // replace with + // replace with // std::numeric_limits::lowest() - // when C++11 support is more + // when C++11 support is more // prevalent - Traits::Lowest(), + Traits::Lowest(), stream); } @@ -805,15 +812,15 @@ struct DeviceReduce } /** - * @brief Finds the first device-wide maximum using the greater-than ('>') + * @brief Finds the first device-wide maximum using the greater-than ('>') * operator, also returning the index of that item * * @par - * - The output value type of `d_out` is cub::KeyValuePair `` + * - The output value type of `d_out` is cub::KeyValuePair `` * (assuming the value type of `d_in` is `T`) - * - The maximum is written to `d_out.value` and its offset in the input + * - The maximum is written to `d_out.value` and its offset in the input * array is written to `d_out.key`. - * - The `{1, std::numeric_limits::lowest()}` tuple is produced for + * - The `{1, std::numeric_limits::lowest()}` tuple is produced for * zero-length inputs * - Does not support `>` operators that are non-commutative. * - Provides "run-to-run" determinism for pseudo-associative reduction @@ -825,14 +832,14 @@ struct DeviceReduce * - @devicestorage * * @par Snippet - * The code snippet below illustrates the argmax-reduction of a device vector + * The code snippet below illustrates the argmax-reduction of a device vector * of `int` data elements. * @par * @code - * #include + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for input and output * int num_items; // e.g., 7 * int *d_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -856,36 +863,36 @@ struct DeviceReduce * * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading input items + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading input items * (of some type \p T) \iterator * - * @tparam OutputIteratorT - * **[inferred]** Output iterator type for recording the reduced aggregate + * @tparam OutputIteratorT + * **[inferred]** Output iterator type for recording the reduced aggregate * (having value type `cub::KeyValuePair`) \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_in + * @param[in] d_in * Pointer to the input sequence of data items * - * @param[out] d_out + * @param[out] d_out * Pointer to the output aggregate * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., length of `d_in`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ - template CUB_RUNTIME_FUNCTION static cudaError_t ArgMax(void *d_temp_storage, size_t &temp_storage_bytes, @@ -920,7 +927,7 @@ struct DeviceReduce // Initial value // TODO Address https://github.com/NVIDIA/cub/issues/651 - InitT initial_value{AccumT(1, Traits::Lowest())}; + InitT initial_value{AccumT(1, Traits::Lowest())}; return DispatchReduceth run - * encountered, the first key of the run and the corresponding value - * aggregate of that run are written to `d_unique_out[i] and - * `d_aggregates_out[i]`, respectively. The total number of runs encountered + * the specified binary `reduction_op` functor. The segments are identified + * by "runs" of corresponding keys in `d_keys_in`, where runs are maximal + * ranges of consecutive, identical keys. For the *i*th run + * encountered, the first key of the run and the corresponding value + * aggregate of that run are written to `d_unique_out[i] and + * `d_aggregates_out[i]`, respectively. The total number of runs encountered * is written to `d_num_runs_out`. * * @par - * - The `==` equality operator is used to determine whether keys are + * - The `==` equality operator is used to determine whether keys are * equivalent * - Provides "run-to-run" determinism for pseudo-associative reduction * (e.g., addition of floating point types) on the same GPU device. * However, results for pseudo-associative reduction may be inconsistent * from one device to a another device of a different compute-capability * because CUB can employ different tile-sizing for different architectures. - * - Let `out` be any of + * - Let `out` be any of * `[d_unique_out, d_unique_out + *d_num_runs_out)` * `[d_aggregates_out, d_aggregates_out + *d_num_runs_out)` - * `d_num_runs_out`. The ranges represented by `out` shall not overlap + * `d_num_runs_out`. The ranges represented by `out` shall not overlap * `[d_keys_in, d_keys_in + num_items)`, * `[d_values_in, d_values_in + num_items)` nor `out` in any way. * - @devicestorage * * @par Performance * The following chart illustrates reduction-by-key (sum) performance across - * different CUDA architectures for `fp32` and `fp64` values, respectively. - * Segments are identified by `int32` keys, and have lengths uniformly + * different CUDA architectures for `fp32` and `fp64` values, respectively. + * Segments are identified by `int32` keys, and have lengths uniformly * sampled from `[1, 1000]`. * * @image html reduce_by_key_fp32_len_500.png * @image html reduce_by_key_fp64_len_500.png * * @par - * The following charts are similar, but with segment lengths uniformly + * The following charts are similar, but with segment lengths uniformly * sampled from [1,10]: * * @image html reduce_by_key_fp32_len_5.png * @image html reduce_by_key_fp64_len_5.png * * @par Snippet - * The code snippet below illustrates the segmented reduction of `int` values + * The code snippet below illustrates the segmented reduction of `int` values * grouped by runs of associated `int` keys. * @par * @code - * #include + * #include * // or equivalently * * // CustomMin functor @@ -1021,7 +1028,7 @@ struct DeviceReduce * } * }; * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for input and output * int num_items; // e.g., 8 * int *d_keys_in; // e.g., [0, 2, 2, 9, 5, 5, 5, 8] @@ -1036,8 +1043,8 @@ struct DeviceReduce * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceReduce::ReduceByKey( - * d_temp_storage, temp_storage_bytes, - * d_keys_in, d_unique_out, d_values_in, + * d_temp_storage, temp_storage_bytes, + * d_keys_in, d_unique_out, d_values_in, * d_aggregates_out, d_num_runs_out, reduction_op, num_items); * * // Allocate temporary storage @@ -1045,8 +1052,8 @@ struct DeviceReduce * * // Run reduce-by-key * cub::DeviceReduce::ReduceByKey( - * d_temp_storage, temp_storage_bytes, - * d_keys_in, d_unique_out, d_values_in, + * d_temp_storage, temp_storage_bytes, + * d_keys_in, d_unique_out, d_values_in, * d_aggregates_out, d_num_runs_out, reduction_op, num_items); * * // d_unique_out <-- [0, 2, 9, 5, 8] @@ -1054,66 +1061,66 @@ struct DeviceReduce * // d_num_runs_out <-- [5] * @endcode * - * @tparam KeysInputIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam KeysInputIteratorT + * **[inferred]** Random-access input iterator type for reading input * keys \iterator * - * @tparam UniqueOutputIteratorT - * **[inferred]** Random-access output iterator type for writing unique + * @tparam UniqueOutputIteratorT + * **[inferred]** Random-access output iterator type for writing unique * output keys \iterator * - * @tparam ValuesInputIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam ValuesInputIteratorT + * **[inferred]** Random-access input iterator type for reading input * values \iterator * - * @tparam AggregatesOutputIterator - * **[inferred]** Random-access output iterator type for writing output + * @tparam AggregatesOutputIterator + * **[inferred]** Random-access output iterator type for writing output * value aggregates \iterator * - * @tparam NumRunsOutputIteratorT - * **[inferred]** Output iterator type for recording the number of runs + * @tparam NumRunsOutputIteratorT + * **[inferred]** Output iterator type for recording the number of runs * encountered \iterator * - * @tparam ReductionOpT - * **[inferred]*8 Binary reduction functor type having member + * @tparam ReductionOpT + * **[inferred]*8 Binary reduction functor type having member * `T operator()(const T &a, const T &b)` * * @tparam NumItemsT **[inferred]** Type of num_items * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_keys_in + * @param[in] d_keys_in * Pointer to the input sequence of keys * - * @param[out] d_unique_out + * @param[out] d_unique_out * Pointer to the output sequence of unique keys (one key per run) * - * @param[in] d_values_in + * @param[in] d_values_in * Pointer to the input sequence of corresponding values * - * @param[out] d_aggregates_out - * Pointer to the output sequence of value aggregates + * @param[out] d_aggregates_out + * Pointer to the output sequence of value aggregates * (one aggregate per run) * - * @param[out] d_num_runs_out - * Pointer to total number of runs encountered + * @param[out] d_num_runs_out + * Pointer to total number of runs encountered * (i.e., the length of `d_unique_out`) * - * @param[in] reduction_op + * @param[in] reduction_op * Binary reduction functor * - * @param[in] num_items - * Total number of associated key+value pairs + * @param[in] num_items + * Total number of associated key+value pairs * (i.e., the length of `d_in_keys` and `d_in_values`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/device/device_scan.cuh b/cub/cub/device/device_scan.cuh index 20cb8ba872f..9f7fd725f49 100644 --- a/cub/cub/device/device_scan.cuh +++ b/cub/cub/device/device_scan.cuh @@ -13,9 +13,9 @@ * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; @@ -27,14 +27,21 @@ ******************************************************************************/ /** - * @file cub::DeviceScan provides device-wide, parallel operations for - * computing a prefix scan across a sequence of data items residing + * @file cub::DeviceScan provides device-wide, parallel operations for + * computing a prefix scan across a sequence of data items residing * within device-accessible memory. */ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include @@ -44,32 +51,32 @@ CUB_NAMESPACE_BEGIN /** - * @brief DeviceScan provides device-wide, parallel operations for computing a - * prefix scan across a sequence of data items residing within + * @brief DeviceScan provides device-wide, parallel operations for computing a + * prefix scan across a sequence of data items residing within * device-accessible memory. ![](device_scan.png) * * @ingroup SingleModule * * @par Overview - * Given a sequence of input elements and a binary reduction operator, a - * [*prefix scan*](http://en.wikipedia.org/wiki/Prefix_sum) produces an output - * sequence where each element is computed to be the reduction of the elements - * occurring earlier in the input sequence. *Prefix sum* connotes a prefix scan - * with the addition operator. The term *inclusive* indicates that the + * Given a sequence of input elements and a binary reduction operator, a + * [*prefix scan*](http://en.wikipedia.org/wiki/Prefix_sum) produces an output + * sequence where each element is computed to be the reduction of the elements + * occurring earlier in the input sequence. *Prefix sum* connotes a prefix scan + * with the addition operator. The term *inclusive* indicates that the * *i*th output reduction incorporates the *i*th input. - * The term *exclusive* indicates the *i*th input is not - * incorporated into the *i*th output reduction. When the input and + * The term *exclusive* indicates the *i*th input is not + * incorporated into the *i*th output reduction. When the input and * output sequences are the same, the scan is performed in-place. * * @par - * As of CUB 1.0.1 (2013), CUB's device-wide scan APIs have implemented our - * *"decoupled look-back"* algorithm for performing global prefix scan with - * only a single pass through the input data, as described in our 2016 technical - * report [1]. The central idea is to leverage a small, constant factor of - * redundant work in order to overlap the latencies of global prefix + * As of CUB 1.0.1 (2013), CUB's device-wide scan APIs have implemented our + * *"decoupled look-back"* algorithm for performing global prefix scan with + * only a single pass through the input data, as described in our 2016 technical + * report [1]. The central idea is to leverage a small, constant factor of + * redundant work in order to overlap the latencies of global prefix * propagation with local computation. As such, our algorithm requires only - * ~2*n* data movement (*n* inputs are read, *n* outputs are written), and - * typically proceeds at "memcpy" speeds. Our algorithm supports inplace + * ~2*n* data movement (*n* inputs are read, *n* outputs are written), and + * typically proceeds at "memcpy" speeds. Our algorithm supports inplace * operations. * * @par @@ -82,7 +89,7 @@ CUB_NAMESPACE_BEGIN * @linear_performance{prefix scan} * * @par - * The following chart illustrates DeviceScan::ExclusiveSum performance across + * The following chart illustrates DeviceScan::ExclusiveSum performance across * different CUDA architectures for `int32` keys. * @plots_below * @@ -97,7 +104,7 @@ struct DeviceScan //@{ /** - * @brief Computes a device-wide exclusive prefix sum. The value of `0` is + * @brief Computes a device-wide exclusive prefix sum. The value of `0` is * applied as the initial value, and is assigned to `*d_out`. * * @par @@ -106,13 +113,13 @@ struct DeviceScan * addition of floating-point types). Results for pseudo-associative * operators may vary from run to run. Additional details can be found in * the [decoupled look-back] description. - * - When `d_in` and `d_out` are equal, the scan is performed in-place. The - * range `[d_in, d_in + num_items)` and `[d_out, d_out + num_items)` + * - When `d_in` and `d_out` are equal, the scan is performed in-place. The + * range `[d_in, d_in + num_items)` and `[d_out, d_out + num_items)` * shall not overlap in any other way. * - @devicestorage * * @par Performance - * The following charts illustrate saturated exclusive sum performance across + * The following charts illustrate saturated exclusive sum performance across * different CUDA architectures for `int32` and `int64` items, respectively. * * @image html scan_int32.png @@ -125,7 +132,7 @@ struct DeviceScan * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -136,7 +143,7 @@ struct DeviceScan * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceScan::ExclusiveSum( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, num_items); * * // Allocate temporary storage @@ -144,24 +151,24 @@ struct DeviceScan * * // Run exclusive prefix sum * cub::DeviceScan::ExclusiveSum( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, num_items); * * // d_out <-- [0, 8, 14, 21, 26, 29, 29] * * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading scan + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading scan * inputs \iterator * - * @tparam OutputIteratorT - * **[inferred]** Random-access output iterator type for writing scan + * @tparam OutputIteratorT + * **[inferred]** Random-access output iterator type for writing scan * outputs \iterator * * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * * @param[in,out] temp_storage_bytes @@ -177,7 +184,7 @@ struct DeviceScan * Total number of input items (i.e., the length of `d_in`) * * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back @@ -227,7 +234,7 @@ struct DeviceScan } /** - * @brief Computes a device-wide exclusive prefix sum in-place. The value of + * @brief Computes a device-wide exclusive prefix sum in-place. The value of * `0` is applied as the initial value, and is assigned to `*d_data`. * * @par @@ -239,7 +246,7 @@ struct DeviceScan * - @devicestorage * * @par Performance - * The following charts illustrate saturated exclusive sum performance across + * The following charts illustrate saturated exclusive sum performance across * different CUDA architectures for `int32` and `int64` items, respectively. * * @image html scan_int32.png @@ -252,7 +259,7 @@ struct DeviceScan * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_data; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -262,7 +269,7 @@ struct DeviceScan * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceScan::ExclusiveSum( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_data, num_items); * * // Allocate temporary storage @@ -270,20 +277,20 @@ struct DeviceScan * * // Run exclusive prefix sum * cub::DeviceScan::ExclusiveSum( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_data, num_items); * * // d_data <-- [0, 8, 14, 21, 26, 29, 29] * * @endcode * - * @tparam IteratorT - * **[inferred]** Random-access iterator type for reading scan + * @tparam IteratorT + * **[inferred]** Random-access iterator type for reading scan * inputs and wrigin scan outputs * * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * * @param[in,out] temp_storage_bytes @@ -296,7 +303,7 @@ struct DeviceScan * Total number of input items (i.e., the length of `d_in`) * * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back @@ -337,8 +344,8 @@ struct DeviceScan } /** - * @brief Computes a device-wide exclusive prefix scan using the specified - * binary `scan_op` functor. The `init_value` value is applied as + * @brief Computes a device-wide exclusive prefix scan using the specified + * binary `scan_op` functor. The `init_value` value is applied as * the initial value, and is assigned to `*d_out`. * * @par @@ -347,13 +354,13 @@ struct DeviceScan * addition of floating-point types). Results for pseudo-associative * operators may vary from run to run. Additional details can be found in * the [decoupled look-back] description. - * - When `d_in` and `d_out` are equal, the scan is performed in-place. The - * range `[d_in, d_in + num_items)` and `[d_out, d_out + num_items)` + * - When `d_in` and `d_out` are equal, the scan is performed in-place. The + * range `[d_in, d_in + num_items)` and `[d_out, d_out + num_items)` * shall not overlap in any other way. * - @devicestorage * * @par Snippet - * The code snippet below illustrates the exclusive prefix min-scan of an + * The code snippet below illustrates the exclusive prefix min-scan of an * `int` device vector * @par * @code @@ -370,7 +377,7 @@ struct DeviceScan * } * }; * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -378,12 +385,12 @@ struct DeviceScan * CustomMin min_op; * ... * - * // Determine temporary device storage requirements for exclusive + * // Determine temporary device storage requirements for exclusive * // prefix scan * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceScan::ExclusiveScan( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, min_op, (int) INT_MAX, num_items); * * // Allocate temporary storage for exclusive prefix scan @@ -391,32 +398,32 @@ struct DeviceScan * * // Run exclusive prefix min-scan * cub::DeviceScan::ExclusiveScan( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, min_op, (int) INT_MAX, num_items); * * // d_out <-- [2147483647, 8, 6, 6, 5, 3, 0] * * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading scan + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading scan * inputs \iterator * - * @tparam OutputIteratorT - * **[inferred]** Random-access output iterator type for writing scan + * @tparam OutputIteratorT + * **[inferred]** Random-access output iterator type for writing scan * outputs \iterator * - * @tparam ScanOp - * **[inferred]** Binary scan functor type having member + * @tparam ScanOp + * **[inferred]** Binary scan functor type having member * `T operator()(const T &a, const T &b)` - * - * @tparam InitValueT - * **[inferred]** Type of the `init_value` used Binary scan functor type + * + * @tparam InitValueT + * **[inferred]** Type of the `init_value` used Binary scan functor type * having member `T operator()(const T &a, const T &b)` * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * * @param[in,out] temp_storage_bytes @@ -438,7 +445,7 @@ struct DeviceScan * Total number of input items (i.e., the length of \p d_in) * * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. Default is + * **[optional]** CUDA stream to launch kernels within. Default is * stream0. * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back @@ -505,8 +512,8 @@ struct DeviceScan } /** - * @brief Computes a device-wide exclusive prefix scan using the specified - * binary `scan_op` functor. The `init_value` value is applied as + * @brief Computes a device-wide exclusive prefix scan using the specified + * binary `scan_op` functor. The `init_value` value is applied as * the initial value, and is assigned to `*d_data`. * * @par @@ -518,7 +525,7 @@ struct DeviceScan * - @devicestorage * * @par Snippet - * The code snippet below illustrates the exclusive prefix min-scan of an + * The code snippet below illustrates the exclusive prefix min-scan of an * `int` device vector * @par * @code @@ -535,19 +542,19 @@ struct DeviceScan * } * }; * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_data; // e.g., [8, 6, 7, 5, 3, 0, 9] * CustomMin min_op; * ... * - * // Determine temporary device storage requirements for exclusive + * // Determine temporary device storage requirements for exclusive * // prefix scan * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceScan::ExclusiveScan( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_data, min_op, (int) INT_MAX, num_items); * * // Allocate temporary storage for exclusive prefix scan @@ -555,28 +562,28 @@ struct DeviceScan * * // Run exclusive prefix min-scan * cub::DeviceScan::ExclusiveScan( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_data, min_op, (int) INT_MAX, num_items); * * // d_data <-- [2147483647, 8, 6, 6, 5, 3, 0] * * @endcode * - * @tparam IteratorT - * **[inferred]** Random-access input iterator type for reading scan + * @tparam IteratorT + * **[inferred]** Random-access input iterator type for reading scan * inputs and writing scan outputs * - * @tparam ScanOp - * **[inferred]** Binary scan functor type having member + * @tparam ScanOp + * **[inferred]** Binary scan functor type having member * `T operator()(const T &a, const T &b)` - * - * @tparam InitValueT - * **[inferred]** Type of the `init_value` used Binary scan functor type + * + * @tparam InitValueT + * **[inferred]** Type of the `init_value` used Binary scan functor type * having member `T operator()(const T &a, const T &b)` * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * * @param[in,out] temp_storage_bytes @@ -595,7 +602,7 @@ struct DeviceScan * Total number of input items (i.e., the length of \p d_in) * * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. Default is + * **[optional]** CUDA stream to launch kernels within. Default is * stream0. * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back @@ -648,8 +655,8 @@ struct DeviceScan } /** - * @brief Computes a device-wide exclusive prefix scan using the specified - * binary `scan_op` functor. The `init_value` value is provided as + * @brief Computes a device-wide exclusive prefix scan using the specified + * binary `scan_op` functor. The `init_value` value is provided as * a future value. * * @par @@ -658,13 +665,13 @@ struct DeviceScan * addition of floating-point types). Results for pseudo-associative * operators may vary from run to run. Additional details can be found in * the [decoupled look-back] description. - * - When `d_in` and `d_out` are equal, the scan is performed in-place. The - * range `[d_in, d_in + num_items)` and `[d_out, d_out + num_items)` + * - When `d_in` and `d_out` are equal, the scan is performed in-place. The + * range `[d_in, d_in + num_items)` and `[d_out, d_out + num_items)` * shall not overlap in any other way. * - @devicestorage * * @par Snippet - * The code snippet below illustrates the exclusive prefix min-scan of an + * The code snippet below illustrates the exclusive prefix min-scan of an * `int` device vector * @par * @code @@ -681,7 +688,7 @@ struct DeviceScan * } * }; * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -689,17 +696,17 @@ struct DeviceScan * int *d_init_iter; // e.g., INT_MAX * CustomMin min_op; * - * auto future_init_value = + * auto future_init_value = * cub::FutureValue(d_init_iter); * * ... * - * // Determine temporary device storage requirements for exclusive + * // Determine temporary device storage requirements for exclusive * // prefix scan * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceScan::ExclusiveScan( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, min_op, future_init_value, num_items); * * // Allocate temporary storage for exclusive prefix scan @@ -707,54 +714,54 @@ struct DeviceScan * * // Run exclusive prefix min-scan * cub::DeviceScan::ExclusiveScan( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, min_op, future_init_value, num_items); * * // d_out <-- [2147483647, 8, 6, 6, 5, 3, 0] * * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading scan + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading scan * inputs \iterator * - * @tparam OutputIteratorT - * **[inferred]** Random-access output iterator type for writing scan + * @tparam OutputIteratorT + * **[inferred]** Random-access output iterator type for writing scan * outputs \iterator * - * @tparam ScanOp - * **[inferred]** Binary scan functor type having member + * @tparam ScanOp + * **[inferred]** Binary scan functor type having member * `T operator()(const T &a, const T &b)` - * - * @tparam InitValueT - * **[inferred]** Type of the `init_value` used Binary scan functor type + * + * @tparam InitValueT + * **[inferred]** Type of the `init_value` used Binary scan functor type * having member `T operator()(const T &a, const T &b)` * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of \p d_temp_storage allocation * - * @param[in] d_in + * @param[in] d_in * Pointer to the input sequence of data items * - * @param[out] d_out + * @param[out] d_out * Pointer to the output sequence of data items * - * @param[in] scan_op + * @param[in] scan_op * Binary scan functor * - * @param[in] init_value + * @param[in] init_value * Initial value to seed the exclusive scan (and is assigned to `*d_out`) * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., the length of `d_in`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back @@ -826,8 +833,8 @@ struct DeviceScan } /** - * @brief Computes a device-wide exclusive prefix scan using the specified - * binary `scan_op` functor. The `init_value` value is provided as + * @brief Computes a device-wide exclusive prefix scan using the specified + * binary `scan_op` functor. The `init_value` value is provided as * a future value. * * @par @@ -839,7 +846,7 @@ struct DeviceScan * - @devicestorage * * @par Snippet - * The code snippet below illustrates the exclusive prefix min-scan of an + * The code snippet below illustrates the exclusive prefix min-scan of an * `int` device vector * @par * @code @@ -856,24 +863,24 @@ struct DeviceScan * } * }; * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_data; // e.g., [8, 6, 7, 5, 3, 0, 9] * int *d_init_iter; // e.g., INT_MAX * CustomMin min_op; * - * auto future_init_value = + * auto future_init_value = * cub::FutureValue(d_init_iter); * * ... * - * // Determine temporary device storage requirements for exclusive + * // Determine temporary device storage requirements for exclusive * // prefix scan * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceScan::ExclusiveScan( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_data, min_op, future_init_value, num_items); * * // Allocate temporary storage for exclusive prefix scan @@ -881,47 +888,47 @@ struct DeviceScan * * // Run exclusive prefix min-scan * cub::DeviceScan::ExclusiveScan( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_data, min_op, future_init_value, num_items); * * // d_data <-- [2147483647, 8, 6, 6, 5, 3, 0] * * @endcode * - * @tparam IteratorT - * **[inferred]** Random-access input iterator type for reading scan + * @tparam IteratorT + * **[inferred]** Random-access input iterator type for reading scan * inputs and writing scan outputs * - * @tparam ScanOp - * **[inferred]** Binary scan functor type having member + * @tparam ScanOp + * **[inferred]** Binary scan functor type having member * `T operator()(const T &a, const T &b)` - * - * @tparam InitValueT - * **[inferred]** Type of the `init_value` used Binary scan functor type + * + * @tparam InitValueT + * **[inferred]** Type of the `init_value` used Binary scan functor type * having member `T operator()(const T &a, const T &b)` * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of \p d_temp_storage allocation * * @param[in,out] d_data * Pointer to the sequence of data items * - * @param[in] scan_op + * @param[in] scan_op * Binary scan functor * - * @param[in] init_value + * @param[in] init_value * Initial value to seed the exclusive scan (and is assigned to `*d_out`) * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., the length of `d_in`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back @@ -992,8 +999,8 @@ struct DeviceScan * addition of floating-point types). Results for pseudo-associative * operators may vary from run to run. Additional details can be found in * the [decoupled look-back] description. - * - When `d_in` and `d_out` are equal, the scan is performed in-place. The - * range `[d_in, d_in + num_items)` and `[d_out, d_out + num_items)` + * - When `d_in` and `d_out` are equal, the scan is performed in-place. The + * range `[d_in, d_in + num_items)` and `[d_out, d_out + num_items)` * shall not overlap in any other way. * - @devicestorage * @@ -1005,19 +1012,19 @@ struct DeviceScan * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_in; // e.g., [8, 6, 7, 5, 3, 0, 9] * int *d_out; // e.g., [ , , , , , , ] * ... * - * // Determine temporary device storage requirements for inclusive + * // Determine temporary device storage requirements for inclusive * // prefix sum * void *d_temp_storage = nullptr; * size_t temp_storage_bytes = 0; * cub::DeviceScan::InclusiveSum( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, num_items); * * // Allocate temporary storage for inclusive prefix sum @@ -1025,40 +1032,40 @@ struct DeviceScan * * // Run inclusive prefix sum * cub::DeviceScan::InclusiveSum( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, num_items); * * // d_out <-- [8, 14, 21, 26, 29, 29, 38] * * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading scan + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading scan * inputs \iterator * - * @tparam OutputIteratorT - * **[inferred]** Random-access output iterator type for writing scan + * @tparam OutputIteratorT + * **[inferred]** Random-access output iterator type for writing scan * outputs \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_in + * @param[in] d_in * Random-access iterator to the input sequence of data items * - * @param[out] d_out + * @param[out] d_out * Random-access iterator to the output sequence of data items * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., the length of `d_in`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back @@ -1129,18 +1136,18 @@ struct DeviceScan * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_data; // e.g., [8, 6, 7, 5, 3, 0, 9] * ... * - * // Determine temporary device storage requirements for inclusive + * // Determine temporary device storage requirements for inclusive * // prefix sum * void *d_temp_storage = nullptr; * size_t temp_storage_bytes = 0; * cub::DeviceScan::InclusiveSum( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_data, num_items); * * // Allocate temporary storage for inclusive prefix sum @@ -1148,33 +1155,33 @@ struct DeviceScan * * // Run inclusive prefix sum * cub::DeviceScan::InclusiveSum( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_data, num_items); * * // d_data <-- [8, 14, 21, 26, 29, 29, 38] * * @endcode * - * @tparam IteratorT - * **[inferred]** Random-access input iterator type for reading scan + * @tparam IteratorT + * **[inferred]** Random-access input iterator type for reading scan * inputs and writing scan outputs * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * * @param[in,out] d_data * Random-access iterator to the sequence of data items * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., the length of `d_in`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back @@ -1215,7 +1222,7 @@ struct DeviceScan } /** - * @brief Computes a device-wide inclusive prefix scan using the specified + * @brief Computes a device-wide inclusive prefix scan using the specified * binary `scan_op` functor. * * @par @@ -1224,13 +1231,13 @@ struct DeviceScan * addition of floating-point types). Results for pseudo-associative * operators may vary from run to run. Additional details can be found in * the [decoupled look-back] description. - * - When `d_in` and `d_out` are equal, the scan is performed in-place. The - * range `[d_in, d_in + num_items)` and `[d_out, d_out + num_items)` + * - When `d_in` and `d_out` are equal, the scan is performed in-place. The + * range `[d_in, d_in + num_items)` and `[d_out, d_out + num_items)` * shall not overlap in any other way. * - @devicestorage * * @par Snippet - * The code snippet below illustrates the inclusive prefix min-scan of an + * The code snippet below illustrates the inclusive prefix min-scan of an * `int` device vector. * * @par @@ -1248,7 +1255,7 @@ struct DeviceScan * } * }; * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_in; // e.g., [8, 6, 7, 5, 3, 0, 9] @@ -1256,12 +1263,12 @@ struct DeviceScan * CustomMin min_op; * ... * - * // Determine temporary device storage requirements for inclusive + * // Determine temporary device storage requirements for inclusive * // prefix scan * void *d_temp_storage = nullptr; * size_t temp_storage_bytes = 0; * cub::DeviceScan::InclusiveScan( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, min_op, num_items); * * // Allocate temporary storage for inclusive prefix scan @@ -1269,28 +1276,28 @@ struct DeviceScan * * // Run inclusive prefix min-scan * cub::DeviceScan::InclusiveScan( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, min_op, num_items); * * // d_out <-- [8, 6, 6, 5, 3, 0, 0] * * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading scan + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading scan * inputs \iterator * - * @tparam OutputIteratorT - * **[inferred]** Random-access output iterator type for writing scan + * @tparam OutputIteratorT + * **[inferred]** Random-access output iterator type for writing scan * outputs \iterator * - * @tparam ScanOp - * **[inferred]** Binary scan functor type having member + * @tparam ScanOp + * **[inferred]** Binary scan functor type having member * `T operator()(const T &a, const T &b)` * - * @param[in] - * d_temp_storage Device-accessible allocation of temporary storage. - * When `nullptr`, the required allocation size is written to + * @param[in] + * d_temp_storage Device-accessible allocation of temporary storage. + * When `nullptr`, the required allocation size is written to * `temp_storage_bytes` and no work is done. * * @param[in,out] temp_storage_bytes @@ -1309,7 +1316,7 @@ struct DeviceScan * Total number of input items (i.e., the length of `d_in`) * * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back @@ -1366,7 +1373,7 @@ struct DeviceScan } /** - * @brief Computes a device-wide inclusive prefix scan using the specified + * @brief Computes a device-wide inclusive prefix scan using the specified * binary `scan_op` functor. * * @par @@ -1378,7 +1385,7 @@ struct DeviceScan * - @devicestorage * * @par Snippet - * The code snippet below illustrates the inclusive prefix min-scan of an + * The code snippet below illustrates the inclusive prefix min-scan of an * `int` device vector. * * @par @@ -1396,19 +1403,19 @@ struct DeviceScan * } * }; * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_data; // e.g., [8, 6, 7, 5, 3, 0, 9] * CustomMin min_op; * ... * - * // Determine temporary device storage requirements for inclusive + * // Determine temporary device storage requirements for inclusive * // prefix scan * void *d_temp_storage = nullptr; * size_t temp_storage_bytes = 0; * cub::DeviceScan::InclusiveScan( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_data, min_op, num_items); * * // Allocate temporary storage for inclusive prefix scan @@ -1416,24 +1423,24 @@ struct DeviceScan * * // Run inclusive prefix min-scan * cub::DeviceScan::InclusiveScan( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, min_op, num_items); * * // d_data <-- [8, 6, 6, 5, 3, 0, 0] * * @endcode * - * @tparam IteratorT - * **[inferred]** Random-access input iterator type for reading scan + * @tparam IteratorT + * **[inferred]** Random-access input iterator type for reading scan * inputs and writing scan outputs * - * @tparam ScanOp - * **[inferred]** Binary scan functor type having member + * @tparam ScanOp + * **[inferred]** Binary scan functor type having member * `T operator()(const T &a, const T &b)` * - * @param[in] - * d_temp_storage Device-accessible allocation of temporary storage. - * When `nullptr`, the required allocation size is written to + * @param[in] + * d_temp_storage Device-accessible allocation of temporary storage. + * When `nullptr`, the required allocation size is written to * `temp_storage_bytes` and no work is done. * * @param[in,out] temp_storage_bytes @@ -1449,7 +1456,7 @@ struct DeviceScan * Total number of input items (i.e., the length of `d_in`) * * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back @@ -1495,8 +1502,8 @@ struct DeviceScan /** * @brief Computes a device-wide exclusive prefix sum-by-key with key equality - * defined by `equality_op`. The value of `0` is applied as the initial - * value, and is assigned to the beginning of each segment in + * defined by `equality_op`. The value of `0` is applied as the initial + * value, and is assigned to the beginning of each segment in * `d_values_out`. * * @par @@ -1505,22 +1512,22 @@ struct DeviceScan * addition of floating-point types). Results for pseudo-associative * operators may vary from run to run. Additional details can be found in * the [decoupled look-back] description. - * - `d_keys_in` may equal `d_values_out` but the range - * `[d_keys_in, d_keys_in + num_items)` and the range + * - `d_keys_in` may equal `d_values_out` but the range + * `[d_keys_in, d_keys_in + num_items)` and the range * `[d_values_out, d_values_out + num_items)` shall not overlap otherwise. - * - `d_values_in` may equal `d_values_out` but the range - * `[d_values_in, d_values_in + num_items)` and the range + * - `d_values_in` may equal `d_values_out` but the range + * `[d_values_in, d_values_in + num_items)` and the range * `[d_values_out, d_values_out + num_items)` shall not overlap otherwise. * - @devicestorage * * @par Snippet - * The code snippet below illustrates the exclusive prefix sum-by-key of an + * The code snippet below illustrates the exclusive prefix sum-by-key of an * `int` device vector. * @par * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_keys_in; // e.g., [0, 0, 1, 1, 1, 2, 2] @@ -1532,7 +1539,7 @@ struct DeviceScan * void *d_temp_storage = nullptr; * size_t temp_storage_bytes = 0; * cub::DeviceScan::ExclusiveSumByKey( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_keys_in, d_values_in, d_values_out, num_items); * * // Allocate temporary storage @@ -1540,57 +1547,57 @@ struct DeviceScan * * // Run exclusive prefix sum * cub::DeviceScan::ExclusiveSumByKey( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_keys_in, d_values_in, d_values_out, num_items); * * // d_values_out <-- [0, 8, 0, 7, 12, 0, 0] * * @endcode * - * @tparam KeysInputIteratorT - * **[inferred]** Random-access input iterator type for reading scan keys + * @tparam KeysInputIteratorT + * **[inferred]** Random-access input iterator type for reading scan keys * inputs \iterator - * - * @tparam ValuesInputIteratorT - * **[inferred]** Random-access input iterator type for reading scan + * + * @tparam ValuesInputIteratorT + * **[inferred]** Random-access input iterator type for reading scan * values inputs \iterator * - * @tparam ValuesOutputIteratorT - * **[inferred]** Random-access output iterator type for writing scan + * @tparam ValuesOutputIteratorT + * **[inferred]** Random-access output iterator type for writing scan * values outputs \iterator * - * @tparam EqualityOpT - * **[inferred]** Functor type having member - * `T operator()(const T &a, const T &b)` for binary operations that + * @tparam EqualityOpT + * **[inferred]** Functor type having member + * `T operator()(const T &a, const T &b)` for binary operations that * defines the equality of keys * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no * work is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_keys_in + * @param[in] d_keys_in * Random-access input iterator to the input sequence of key items * - * @param[in] d_values_in + * @param[in] d_values_in * Random-access input iterator to the input sequence of value items * - * @param[out] d_values_out + * @param[out] d_values_out * Random-access output iterator to the output sequence of value items * - * @param[in] num_items - * Total number of input items (i.e., the length of `d_keys_in` and + * @param[in] num_items + * Total number of input items (i.e., the length of `d_keys_in` and * `d_values_in`) * - * @param[in] equality_op - * Binary functor that defines the equality of keys. + * @param[in] equality_op + * Binary functor that defines the equality of keys. * Default is cub::Equality(). * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back @@ -1614,7 +1621,7 @@ struct DeviceScan using InitT = cub::detail::value_t; // Initial value - InitT init_value{}; + InitT init_value{}; return DispatchScanByKey0. * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back @@ -1888,7 +1895,7 @@ struct DeviceScan } /** - * @brief Computes a device-wide inclusive prefix sum-by-key with key + * @brief Computes a device-wide inclusive prefix sum-by-key with key * equality defined by `equality_op`. * * @par @@ -1897,22 +1904,22 @@ struct DeviceScan * addition of floating-point types). Results for pseudo-associative * operators may vary from run to run. Additional details can be found in * the [decoupled look-back] description. - * - `d_keys_in` may equal `d_values_out` but the range - * `[d_keys_in, d_keys_in + num_items)` and the range + * - `d_keys_in` may equal `d_values_out` but the range + * `[d_keys_in, d_keys_in + num_items)` and the range * `[d_values_out, d_values_out + num_items)` shall not overlap otherwise. - * - `d_values_in` may equal `d_values_out` but the range - * `[d_values_in, d_values_in + num_items)` and the range + * - `d_values_in` may equal `d_values_out` but the range + * `[d_values_in, d_values_in + num_items)` and the range * `[d_values_out, d_values_out + num_items)` shall not overlap otherwise. * - @devicestorage * * @par Snippet - * The code snippet below illustrates the inclusive prefix sum-by-key of an + * The code snippet below illustrates the inclusive prefix sum-by-key of an * `int` device vector. * @par * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // input and output * int num_items; // e.g., 7 * int *d_keys_in; // e.g., [0, 0, 1, 1, 1, 2, 2] @@ -1924,7 +1931,7 @@ struct DeviceScan * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceScan::InclusiveSumByKey( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_keys_in, d_values_in, d_values_out, num_items); * * // Allocate temporary storage for inclusive prefix sum @@ -1932,59 +1939,59 @@ struct DeviceScan * * // Run inclusive prefix sum * cub::DeviceScan::InclusiveSumByKey( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_keys_in, d_values_in, d_values_out, num_items); * * // d_out <-- [8, 14, 7, 12, 15, 0, 9] * * @endcode * - * @tparam KeysInputIteratorT - * **[inferred]** Random-access input iterator type for reading scan + * @tparam KeysInputIteratorT + * **[inferred]** Random-access input iterator type for reading scan * keys inputs \iterator - * - * @tparam ValuesInputIteratorT - * **[inferred]** Random-access input iterator type for reading scan + * + * @tparam ValuesInputIteratorT + * **[inferred]** Random-access input iterator type for reading scan * values inputs \iterator - * - * @tparam ValuesOutputIteratorT - * **[inferred]** Random-access output iterator type for writing scan + * + * @tparam ValuesOutputIteratorT + * **[inferred]** Random-access output iterator type for writing scan * values outputs \iterator - * - * @tparam EqualityOpT - * **[inferred]** Functor type having member - * `T operator()(const T &a, const T &b)` for binary operations that + * + * @tparam EqualityOpT + * **[inferred]** Functor type having member + * `T operator()(const T &a, const T &b)` for binary operations that * defines the equality of keys * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. - * When `nullptr`, the required allocation size is written to + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. + * When `nullptr`, the required allocation size is written to * `temp_storage_bytes` and no work is done. - * - * @param[in,out] temp_storage_bytes + * + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation - * - * @param[in] d_keys_in + * + * @param[in] d_keys_in * Random-access input iterator to the input sequence of key items - * - * @param[in] d_values_in + * + * @param[in] d_values_in * Random-access input iterator to the input sequence of value items - * - * @param[out] d_values_out + * + * @param[out] d_values_out * Random-access output iterator to the output sequence of value items - * - * @param[in] num_items - * Total number of input items (i.e., the length of `d_keys_in` and + * + * @param[in] num_items + * Total number of input items (i.e., the length of `d_keys_in` and * `d_values_in`) - * - * @param[in] equality_op - * Binary functor that defines the equality of keys. + * + * @param[in] equality_op + * Binary functor that defines the equality of keys. * Default is cub::Equality(). - * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. - * + * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back */ template 0. - * + * * [decoupled look-back]: https://research.nvidia.com/publication/single-pass-parallel-prefix-scan-decoupled-look-back */ template #include -#include #include #include @@ -46,27 +53,27 @@ CUB_NAMESPACE_BEGIN /** - * @brief DeviceSegmentedRadixSort provides device-wide, parallel operations - * for computing a batched radix sort across multiple, non-overlapping - * sequences of data items residing within device-accessible memory. + * @brief DeviceSegmentedRadixSort provides device-wide, parallel operations + * for computing a batched radix sort across multiple, non-overlapping + * sequences of data items residing within device-accessible memory. * ![](segmented_sorting_logo.png) * @ingroup SegmentedModule * * @par Overview - * The [*radix sorting method*](http://en.wikipedia.org/wiki/Radix_sort) - * arranges items into ascending (or descending) order. The algorithm relies - * upon a positional representation for keys, i.e., each key is comprised of an - * ordered sequence of symbols (e.g., digits, characters, etc.) specified from - * least-significant to most-significant. For a given input sequence of keys - * and a set of rules specifying a total ordering of the symbolic alphabet, the + * The [*radix sorting method*](http://en.wikipedia.org/wiki/Radix_sort) + * arranges items into ascending (or descending) order. The algorithm relies + * upon a positional representation for keys, i.e., each key is comprised of an + * ordered sequence of symbols (e.g., digits, characters, etc.) specified from + * least-significant to most-significant. For a given input sequence of keys + * and a set of rules specifying a total ordering of the symbolic alphabet, the * radix sorting method produces a lexicographic ordering of those keys. * * @par See Also * DeviceSegmentedRadixSort shares its implementation with DeviceRadixSort. See * that algorithm's documentation for more information. * - * @par Segments are not required to be contiguous. Any element of input(s) or - * output(s) outside the specified segments will not be accessed nor modified. + * @par Segments are not required to be contiguous. Any element of input(s) or + * output(s) outside the specified segments will not be accessed nor modified. * * @par Usage Considerations * @cdp_class{DeviceSegmentedRadixSort} @@ -80,7 +87,7 @@ struct DeviceSegmentedRadixSort //@{ /** - * @brief Sorts segments of key-value pairs into ascending order. + * @brief Sorts segments of key-value pairs into ascending order. * (`~2N` auxiliary storage required) * * @par @@ -89,31 +96,31 @@ struct DeviceSegmentedRadixSort * `segment_offsets` (of length `num_segments + 1`) can be aliased * for both the `d_begin_offsets` and `d_end_offsets` parameters (where * the latter is specified as `segment_offsets + 1`). - * - An optional bit subrange `[begin_bit, end_bit)` of differentiating key - * bits can be specified. This can reduce overall sorting overhead and + * - An optional bit subrange `[begin_bit, end_bit)` of differentiating key + * bits can be specified. This can reduce overall sorting overhead and * yield a corresponding performance improvement. * - Let `in` be one of `{d_keys_in, d_values_in}` and `out` be any of - * `{d_keys_out, d_values_out}`. The range `[out, out + num_items)` shall - * not overlap `[in, in + num_items)`, + * `{d_keys_out, d_values_out}`. The range `[out, out + num_items)` shall + * not overlap `[in, in + num_items)`, * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - @devicestorageNP For sorting using only `O(P)` temporary storage, see + * - @devicestorageNP For sorting using only `O(P)` temporary storage, see * the sorting interface using DoubleBuffer wrappers below. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys_in[i]`, `d_values_in[i]`, - * `d_keys_out[i]`, `d_values_out[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys_in[i]`, `d_values_in[i]`, + * `d_keys_out[i]`, `d_values_out[i]` will not be accessed nor modified. * - @devicestorage * * @par Snippet - * The code snippet below illustrates the batched sorting of three segments - * (with one zero-length segment) of `int` keys with associated vector of + * The code snippet below illustrates the batched sorting of three segments + * (with one zero-length segment) of `int` keys with associated vector of * `int` values. * @par * @code - * #include + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for sorting data * int num_items; // e.g., 7 * int num_segments; // e.g., 3 @@ -145,72 +152,72 @@ struct DeviceSegmentedRadixSort * // d_values_out <-- [1, 2, 0, 5, 4, 3, 6] * @endcode * - * @tparam KeyT + * @tparam KeyT * **[inferred]** Key type * - * @tparam ValueT + * @tparam ValueT * **[inferred]** Value type * - * @tparam BeginOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam BeginOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * beginning offsets \iterator * - * @tparam EndOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam EndOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * ending offsets \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_keys_in + * @param[in] d_keys_in * Device-accessible pointer to the input data of key data to sort * - * @param[out] d_keys_out + * @param[out] d_keys_out * Device-accessible pointer to the sorted output sequence of key data * - * @param[in] d_values_in - * Device-accessible pointer to the corresponding input sequence of + * @param[in] d_values_in + * Device-accessible pointer to the corresponding input sequence of * associated value items * - * @param[out] d_values_out - * Device-accessible pointer to the correspondingly-reordered output + * @param[out] d_values_out + * Device-accessible pointer to the correspondingly-reordered output * sequence of associated value items * - * @param[in] num_items + * @param[in] num_items * The total number of items within the segmented array, including items not * covered by segments. `num_items` should match the largest element within * the range `[d_end_offsets, d_end_offsets + num_segments)`. * - * @param[in] num_segments + * @param[in] num_segments * The number of segments that comprise the sorting data * - * @param[in] d_begin_offsets - * Random-access input iterator to the sequence of beginning offsets of - * length `num_segments`, such that `d_begin_offsets[i]` is the first - * element of the *i*th data segment in `d_keys_*` and + * @param[in] d_begin_offsets + * Random-access input iterator to the sequence of beginning offsets of + * length `num_segments`, such that `d_begin_offsets[i]` is the first + * element of the *i*th data segment in `d_keys_*` and * `d_values_*` * - * @param[in] d_end_offsets - * Random-access input iterator to the sequence of ending offsets of length - * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of - * the *i*th data segment in `d_keys_*` and `d_values_*`. If - * `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th is + * @param[in] d_end_offsets + * Random-access input iterator to the sequence of ending offsets of length + * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of + * the *i*th data segment in `d_keys_*` and `d_values_*`. If + * `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th is * considered empty. * - * @param[in] begin_bit - * **[optional]** The least-significant bit index (inclusive) needed for + * @param[in] begin_bit + * **[optional]** The least-significant bit index (inclusive) needed for * key comparison * - * @param[in] end_bit - * **[optional]** The most-significant bit index (exclusive) needed for key + * @param[in] end_bit + * **[optional]** The most-significant bit index (exclusive) needed for key * comparison (e.g., `sizeof(unsigned int) * 8`) * - * @param[in] stream + * @param[in] stream * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ @@ -299,7 +306,7 @@ struct DeviceSegmentedRadixSort } /** - * @brief Sorts segments of key-value pairs into ascending order. + * @brief Sorts segments of key-value pairs into ascending order. * (`~N` auxiliary storage required) * * @par @@ -307,42 +314,42 @@ struct DeviceSegmentedRadixSort * pair of associated value buffers. Each pair is managed by a DoubleBuffer * structure that indicates which of the two buffers is "current" (and thus * contains the input data to be sorted). - * - The contents of both buffers within each pair may be altered by the + * - The contents of both buffers within each pair may be altered by the * sorting operation. - * - Upon completion, the sorting operation will update the "current" - * indicator within each DoubleBuffer wrapper to reference which of the two - * buffers now contains the sorted output sequence (a function of the number + * - Upon completion, the sorting operation will update the "current" + * indicator within each DoubleBuffer wrapper to reference which of the two + * buffers now contains the sorted output sequence (a function of the number * of key bits specified and the targeted device architecture). * - When input a contiguous sequence of segments, a single sequence - * `segment_offsets` (of length `num_segments + 1`) can be aliased for both - * the `d_begin_offsets` and `d_end_offsets` parameters (where the latter is + * `segment_offsets` (of length `num_segments + 1`) can be aliased for both + * the `d_begin_offsets` and `d_end_offsets` parameters (where the latter is * specified as `segment_offsets + 1`). - * - An optional bit subrange `[begin_bit, end_bit)` of differentiating key - * bits can be specified. This can reduce overall sorting overhead and yield + * - An optional bit subrange `[begin_bit, end_bit)` of differentiating key + * bits can be specified. This can reduce overall sorting overhead and yield * a corresponding performance improvement. - * - Let `cur` be one of `{d_keys.Current(), d_values.Current()}` and `alt` - * be any of `{d_keys.Alternate(), d_values.Alternate()}`. The range - * `[cur, cur + num_items)` shall not overlap + * - Let `cur` be one of `{d_keys.Current(), d_values.Current()}` and `alt` + * be any of `{d_keys.Alternate(), d_values.Alternate()}`. The range + * `[cur, cur + num_items)` shall not overlap * `[alt, alt + num_items)`. Both ranges shall not overlap * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys.Current()[i]`, - * `d_values.Current()[i]`, `d_keys.Alternate()[i]`, - * `d_values.Alternate()[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys.Current()[i]`, + * `d_values.Current()[i]`, `d_keys.Alternate()[i]`, + * `d_values.Alternate()[i]` will not be accessed nor modified. * - @devicestorageP * - @devicestorage * * @par Snippet - * The code snippet below illustrates the batched sorting of three segments - * (with one zero-length segment) of `int` keys with associated vector of + * The code snippet below illustrates the batched sorting of three segments + * (with one zero-length segment) of `int` keys with associated vector of * `int` values. * @par * @code - * #include + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for sorting data * int num_items; // e.g., 7 * int num_segments; // e.g., 3 @@ -377,69 +384,69 @@ struct DeviceSegmentedRadixSort * * @endcode * - * @tparam KeyT + * @tparam KeyT * **[inferred]** Key type * - * @tparam ValueT + * @tparam ValueT * **[inferred]** Value type * - * @tparam BeginOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam BeginOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * beginning offsets \iterator * - * @tparam EndOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam EndOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * ending offsets \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in,out] d_keys - * Reference to the double-buffer of keys whose "current" device-accessible - * buffer contains the unsorted input keys and, upon return, is updated to + * @param[in,out] d_keys + * Reference to the double-buffer of keys whose "current" device-accessible + * buffer contains the unsorted input keys and, upon return, is updated to * point to the sorted output keys * - * @param[in,out] d_values - * Double-buffer of values whose "current" device-accessible buffer - * contains the unsorted input values and, upon return, is updated to point + * @param[in,out] d_values + * Double-buffer of values whose "current" device-accessible buffer + * contains the unsorted input values and, upon return, is updated to point * to the sorted output values * - * @param[in] num_items + * @param[in] num_items * The total number of items within the segmented array, including items not * covered by segments. `num_items` should match the largest element within * the range `[d_end_offsets, d_end_offsets + num_segments)`. * - * @param[in] num_segments + * @param[in] num_segments * The number of segments that comprise the sorting data * - * @param[in] d_begin_offsets - * Random-access input iterator to the sequence of beginning offsets of - * length `num_segments`, such that `d_begin_offsets[i]` is the first - * element of the *i*th data segment in `d_keys_*` and + * @param[in] d_begin_offsets + * Random-access input iterator to the sequence of beginning offsets of + * length `num_segments`, such that `d_begin_offsets[i]` is the first + * element of the *i*th data segment in `d_keys_*` and * `d_values_*` * - * @param[in] d_end_offsets - * Random-access input iterator to the sequence of ending offsets of length - * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of - * the *i*th data segment in `d_keys_*` and `d_values_*`. - * If `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th is + * @param[in] d_end_offsets + * Random-access input iterator to the sequence of ending offsets of length + * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of + * the *i*th data segment in `d_keys_*` and `d_values_*`. + * If `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th is * considered empty. * - * @param[in] begin_bit - * **[optional]** The least-significant bit index (inclusive) needed for + * @param[in] begin_bit + * **[optional]** The least-significant bit index (inclusive) needed for * key comparison * - * @param[in] end_bit - * **[optional]** The most-significant bit index (exclusive) needed for key + * @param[in] end_bit + * **[optional]** The most-significant bit index (exclusive) needed for key * comparison (e.g., `sizeof(unsigned int) * 8`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for sorting data * int num_items; // e.g., 7 * int num_segments; // e.g., 3 @@ -582,73 +589,73 @@ struct DeviceSegmentedRadixSort * // d_values_out <-- [0, 2, 1, 6, 3, 4, 5] * @endcode * - * @tparam KeyT + * @tparam KeyT * **[inferred]** Key type * - * @tparam ValueT + * @tparam ValueT * **[inferred]** Value type * - * @tparam BeginOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam BeginOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * beginning offsets \iterator * - * @tparam EndOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam EndOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * ending offsets \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_keys_in + * @param[in] d_keys_in * Device-accessible pointer to the input data of key data to sort * - * @param[out] d_keys_out + * @param[out] d_keys_out * Device-accessible pointer to the sorted output sequence of key data * - * @param[in] d_values_in - * Device-accessible pointer to the corresponding input sequence of + * @param[in] d_values_in + * Device-accessible pointer to the corresponding input sequence of * associated value items * - * @param[out] d_values_out - * Device-accessible pointer to the correspondingly-reordered output + * @param[out] d_values_out + * Device-accessible pointer to the correspondingly-reordered output * sequence of associated value items * - * @param[in] num_items + * @param[in] num_items * The total number of items within the segmented array, including items not * covered by segments. `num_items` should match the largest element within * the range `[d_end_offsets, d_end_offsets + num_segments)`. * - * @param[in] num_segments + * @param[in] num_segments * The number of segments that comprise the sorting data * - * @param[in] d_begin_offsets - * Random-access input iterator to the sequence of beginning offsets of - * length `num_segments`, such that `d_begin_offsets[i]` is the first - * element of the *i*th data segment in `d_keys_*` and + * @param[in] d_begin_offsets + * Random-access input iterator to the sequence of beginning offsets of + * length `num_segments`, such that `d_begin_offsets[i]` is the first + * element of the *i*th data segment in `d_keys_*` and * `d_values_*` * - * @param[in] d_end_offsets - * Random-access input iterator to the sequence of ending offsets of length - * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of - * the *i*th data segment in `d_keys_*` and `d_values_*`. - * If `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th + * @param[in] d_end_offsets + * Random-access input iterator to the sequence of ending offsets of length + * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of + * the *i*th data segment in `d_keys_*` and `d_values_*`. + * If `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th * is considered empty. * - * @param[in] begin_bit - * **[optional]** The least-significant bit index (inclusive) needed for + * @param[in] begin_bit + * **[optional]** The least-significant bit index (inclusive) needed for * key comparison * - * @param[in] end_bit - * **[optional]** The most-significant bit index (exclusive) needed for key + * @param[in] end_bit + * **[optional]** The most-significant bit index (exclusive) needed for key * comparison (e.g., `sizeof(unsigned int) * 8`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for sorting data * int num_items; // e.g., 7 * int num_segments; // e.g., 3 @@ -816,69 +823,69 @@ struct DeviceSegmentedRadixSort * // d_values.Current() <-- [0, 2, 1, 6, 3, 4, 5] * @endcode * - * @tparam KeyT + * @tparam KeyT * **[inferred]** Key type * - * @tparam ValueT + * @tparam ValueT * **[inferred]** Value type * - * @tparam BeginOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam BeginOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * beginning offsets \iterator * - * @tparam EndOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam EndOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * ending offsets \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in,out] d_keys - * Reference to the double-buffer of keys whose "current" device-accessible - * buffer contains the unsorted input keys and, upon return, is updated to + * @param[in,out] d_keys + * Reference to the double-buffer of keys whose "current" device-accessible + * buffer contains the unsorted input keys and, upon return, is updated to * point to the sorted output keys * - * @param[in,out] d_values - * Double-buffer of values whose "current" device-accessible buffer - * contains the unsorted input values and, upon return, is updated to point + * @param[in,out] d_values + * Double-buffer of values whose "current" device-accessible buffer + * contains the unsorted input values and, upon return, is updated to point * to the sorted output values * - * @param[in] num_items + * @param[in] num_items * The total number of items within the segmented array, including items not * covered by segments. `num_items` should match the largest element within * the range `[d_end_offsets, d_end_offsets + num_segments)`. * - * @param[in] num_segments + * @param[in] num_segments * The number of segments that comprise the sorting data * - * @param[in] d_begin_offsets - * Random-access input iterator to the sequence of beginning offsets of - * length `num_segments`, such that `d_begin_offsets[i]` is the first - * element of the *i*th data segment in `d_keys_*` and + * @param[in] d_begin_offsets + * Random-access input iterator to the sequence of beginning offsets of + * length `num_segments`, such that `d_begin_offsets[i]` is the first + * element of the *i*th data segment in `d_keys_*` and * `d_values_*` * - * @param[in] d_end_offsets - * Random-access input iterator to the sequence of ending offsets of length - * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of - * the *i*th data segment in `d_keys_*` and `d_values_*`. - * If `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th + * @param[in] d_end_offsets + * Random-access input iterator to the sequence of ending offsets of length + * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of + * the *i*th data segment in `d_keys_*` and `d_values_*`. + * If `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th * is considered empty. * - * @param[in] begin_bit - * **[optional]** The least-significant bit index (inclusive) needed for + * @param[in] begin_bit + * **[optional]** The least-significant bit index (inclusive) needed for * key comparison * - * @param[in] end_bit - * **[optional]** The most-significant bit index (exclusive) needed for key + * @param[in] end_bit + * **[optional]** The most-significant bit index (exclusive) needed for key * comparison (e.g., `sizeof(unsigned int) * 8`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for sorting data * int num_items; // e.g., 7 * int num_segments; // e.g., 3 @@ -1008,7 +1015,7 @@ struct DeviceSegmentedRadixSort * // Determine temporary device storage requirements * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; - * cub::DeviceSegmentedRadixSort::SortKeys( + * cub::DeviceSegmentedRadixSort::SortKeys( * d_temp_storage, temp_storage_bytes, d_keys_in, d_keys_out, * num_items, num_segments, d_offsets, d_offsets + 1); * @@ -1016,7 +1023,7 @@ struct DeviceSegmentedRadixSort * cudaMalloc(&d_temp_storage, temp_storage_bytes); * * // Run sorting operation - * cub::DeviceSegmentedRadixSort::SortKeys( + * cub::DeviceSegmentedRadixSort::SortKeys( * d_temp_storage, temp_storage_bytes, d_keys_in, d_keys_out, * num_items, num_segments, d_offsets, d_offsets + 1); * @@ -1024,60 +1031,60 @@ struct DeviceSegmentedRadixSort * * @endcode * - * @tparam KeyT + * @tparam KeyT * **[inferred]** Key type * - * @tparam BeginOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam BeginOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * beginning offsets \iterator * - * @tparam EndOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam EndOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * ending offsets \iterator * - * @param[in] d_temp_storage + * @param[in] d_temp_storage * Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to \p temp_storage_bytes and no work is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of \p d_temp_storage allocation * - * @param[in] d_keys_in + * @param[in] d_keys_in * Device-accessible pointer to the input data of key data to sort * - * @param[out] d_keys_out + * @param[out] d_keys_out * Device-accessible pointer to the sorted output sequence of key data * - * @param[in] num_items + * @param[in] num_items * The total number of items within the segmented array, including items not * covered by segments. `num_items` should match the largest element within * the range `[d_end_offsets, d_end_offsets + num_segments)`. * - * @param[in] num_segments + * @param[in] num_segments * The number of segments that comprise the sorting data * - * @param[in] d_begin_offsets - * Random-access input iterator to the sequence of beginning offsets of - * length `num_segments`, such that `d_begin_offsets[i]` is the first - * element of the *i*th data segment in `d_keys_*` and + * @param[in] d_begin_offsets + * Random-access input iterator to the sequence of beginning offsets of + * length `num_segments`, such that `d_begin_offsets[i]` is the first + * element of the *i*th data segment in `d_keys_*` and * `d_values_*` * - * @param[in] d_end_offsets - * Random-access input iterator to the sequence of ending offsets of length - * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of - * the *i*th data segment in `d_keys_*` and `d_values_*`. - * If `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th is + * @param[in] d_end_offsets + * Random-access input iterator to the sequence of ending offsets of length + * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of + * the *i*th data segment in `d_keys_*` and `d_values_*`. + * If `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th is * considered empty. * - * @param[in] begin_bit - * **[optional]** The least-significant bit index (inclusive) needed for + * @param[in] begin_bit + * **[optional]** The least-significant bit index (inclusive) needed for * key comparison * - * @param[in] end_bit - * **[optional]** The most-significant bit index (exclusive) needed for key + * @param[in] end_bit + * **[optional]** The most-significant bit index (exclusive) needed for key * comparison (e.g., `sizeof(unsigned int) * 8`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template N auxiliary storage required). * * @par - * - The sorting operation is given a pair of key buffers managed by a + * - The sorting operation is given a pair of key buffers managed by a * DoubleBuffer structure that indicates which of the two buffers is * "current" (and thus contains the input data to be sorted). * - The contents of both buffers may be altered by the sorting operation. - * - Upon completion, the sorting operation will update the "current" - * indicator within the DoubleBuffer wrapper to reference which of the two - * buffers now contains the sorted output sequence (a function of the + * - Upon completion, the sorting operation will update the "current" + * indicator within the DoubleBuffer wrapper to reference which of the two + * buffers now contains the sorted output sequence (a function of the * number of key bits specified and the targeted device architecture). * - When input a contiguous sequence of segments, a single sequence - * `segment_offsets` (of length `num_segments + 1`) can be aliased for both - * the `d_begin_offsets` and `d_end_offsets` parameters (where the latter + * `segment_offsets` (of length `num_segments + 1`) can be aliased for both + * the `d_begin_offsets` and `d_end_offsets` parameters (where the latter * is specified as `segment_offsets + 1`). - * - An optional bit subrange `[begin_bit, end_bit)` of differentiating key - * bits can be specified. This can reduce overall sorting overhead and + * - An optional bit subrange `[begin_bit, end_bit)` of differentiating key + * bits can be specified. This can reduce overall sorting overhead and * yield a corresponding performance improvement. * - Let `cur = d_keys.Current()` and `alt = d_keys.Alternate()`. - * The range `[cur, cur + num_items)` shall not overlap + * The range `[cur, cur + num_items)` shall not overlap * `[alt, alt + num_items)`. Both ranges shall not overlap * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys.Current()[i]`, - * `d_keys[i].Alternate()[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys.Current()[i]`, + * `d_keys[i].Alternate()[i]` will not be accessed nor modified. * - @devicestorageP * - @devicestorage * * @par Snippet - * The code snippet below illustrates the batched sorting of three segments + * The code snippet below illustrates the batched sorting of three segments * (with one zero-length segment) of `int` keys. * @par * @code - * #include + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for + * // Declare, allocate, and initialize device-accessible pointers for * // sorting data * int num_items; // e.g., 7 * int num_segments; // e.g., 3 @@ -1225,61 +1232,61 @@ struct DeviceSegmentedRadixSort * * @endcode * - * @tparam KeyT + * @tparam KeyT * **[inferred]** Key type * - * @tparam BeginOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam BeginOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * beginning offsets \iterator * - * @tparam EndOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam EndOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * ending offsets \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in,out] d_keys - * Reference to the double-buffer of keys whose "current" device-accessible - * buffer contains the unsorted input keys and, upon return, is updated to + * @param[in,out] d_keys + * Reference to the double-buffer of keys whose "current" device-accessible + * buffer contains the unsorted input keys and, upon return, is updated to * point to the sorted output keys * - * @param[in] num_items + * @param[in] num_items * The total number of items within the segmented array, including items not * covered by segments. `num_items` should match the largest element within * the range `[d_end_offsets, d_end_offsets + num_segments)`. * - * @param[in] num_segments + * @param[in] num_segments * The number of segments that comprise the sorting data * - * @param[in] d_begin_offsets - * Random-access input iterator to the sequence of beginning offsets of - * length `num_segments`, such that `d_begin_offsets[i]` is the first - * element of the *i*th data segment in `d_keys_*` and + * @param[in] d_begin_offsets + * Random-access input iterator to the sequence of beginning offsets of + * length `num_segments`, such that `d_begin_offsets[i]` is the first + * element of the *i*th data segment in `d_keys_*` and * `d_values_*` * - * @param[in] d_end_offsets - * Random-access input iterator to the sequence of ending offsets of length - * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of - * the *i*th data segment in `d_keys_*` and `d_values_*`. + * @param[in] d_end_offsets + * Random-access input iterator to the sequence of ending offsets of length + * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of + * the *i*th data segment in `d_keys_*` and `d_values_*`. * If `d_end_offsets[i] - 1` <= d_begin_offsets[i]`, the *i*th * is considered empty. * - * @param[in] begin_bit - * **[optional]** The least-significant bit index (inclusive) + * @param[in] begin_bit + * **[optional]** The least-significant bit index (inclusive) * needed for key comparison * - * @param[in] end_bit - * **[optional]** The most-significant bit index (exclusive) needed for key + * @param[in] end_bit + * **[optional]** The most-significant bit index (exclusive) needed for key * comparison (e.g., `sizeof(unsigned int) * 8`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for sorting data * int num_items; // e.g., 7 * int num_segments; // e.g., 3 @@ -1417,62 +1424,62 @@ struct DeviceSegmentedRadixSort * * @endcode * - * @tparam KeyT + * @tparam KeyT * **[inferred]** Key type * - * @tparam BeginOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam BeginOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * beginning offsets \iterator * - * @tparam EndOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam EndOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * ending offsets \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_keys_in + * @param[in] d_keys_in * Device-accessible pointer to the input data of key data to sort * - * @param[out] d_keys_out + * @param[out] d_keys_out * Device-accessible pointer to the sorted output sequence of key data * - * @param[in] num_items + * @param[in] num_items * The total number of items within the segmented array, including items not * covered by segments. `num_items` should match the largest element within * the range `[d_end_offsets, d_end_offsets + num_segments)`. * - * @param[in] num_segments + * @param[in] num_segments * The number of segments that comprise the sorting data * - * @param[in] d_begin_offsets - * Random-access input iterator to the sequence of beginning offsets of - * length `num_segments`, such that `d_begin_offsets[i]` is the first - * element of the *i*th data segment in `d_keys_*` and + * @param[in] d_begin_offsets + * Random-access input iterator to the sequence of beginning offsets of + * length `num_segments`, such that `d_begin_offsets[i]` is the first + * element of the *i*th data segment in `d_keys_*` and * `d_values_*` * - * @param[in] d_end_offsets - * Random-access input iterator to the sequence of ending offsets of length - * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of - * the *i*th data segment in `d_keys_*` and `d_values_*`. - * If `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th is + * @param[in] d_end_offsets + * Random-access input iterator to the sequence of ending offsets of length + * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of + * the *i*th data segment in `d_keys_*` and `d_values_*`. + * If `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th is * considered empty. * - * @param[in] begin_bit - * **[optional]** The least-significant bit index (inclusive) needed for + * @param[in] begin_bit + * **[optional]** The least-significant bit index (inclusive) needed for * key comparison * - * @param[in] end_bit - * **[optional]** The most-significant bit index (exclusive) needed for key + * @param[in] end_bit + * **[optional]** The most-significant bit index (exclusive) needed for key * comparison (e.g., sizeof(unsigned int) * 8) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template + * #include * // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for sorting data * int num_items; // e.g., 7 * int num_segments; // e.g., 3 @@ -1619,61 +1626,61 @@ struct DeviceSegmentedRadixSort * // d_keys.Current() <-- [8, 7, 6, 9, 5, 3, 0] * @endcode * - * @tparam KeyT + * @tparam KeyT * **[inferred]** Key type * - * @tparam BeginOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam BeginOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * beginning offsets \iterator * - * @tparam EndOffsetIteratorT - * **[inferred]** Random-access input iterator type for reading segment + * @tparam EndOffsetIteratorT + * **[inferred]** Random-access input iterator type for reading segment * ending offsets \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in,out] d_keys - * Reference to the double-buffer of keys whose "current" device-accessible - * buffer contains the unsorted input keys and, upon return, is updated to + * @param[in,out] d_keys + * Reference to the double-buffer of keys whose "current" device-accessible + * buffer contains the unsorted input keys and, upon return, is updated to * point to the sorted output keys * - * @param[in] num_items + * @param[in] num_items * The total number of items within the segmented array, including items not * covered by segments. `num_items` should match the largest element within * the range `[d_end_offsets, d_end_offsets + num_segments)`. * - * @param[in] num_segments + * @param[in] num_segments * The number of segments that comprise the sorting data * - * @param[in] d_begin_offsets - * Random-access input iterator to the sequence of beginning offsets of - * length `num_segments`, such that `d_begin_offsets[i]` is the first - * element of the *i*th data segment in `d_keys_*` and + * @param[in] d_begin_offsets + * Random-access input iterator to the sequence of beginning offsets of + * length `num_segments`, such that `d_begin_offsets[i]` is the first + * element of the *i*th data segment in `d_keys_*` and * `d_values_*` * - * @param[in] d_end_offsets - * Random-access input iterator to the sequence of ending offsets of length - * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of - * the *i*th data segment in `d_keys_*` and `d_values_*`. - * If `d_end_offsets[i] - 1 <= d_begin_offsets[i], the *i*th is + * @param[in] d_end_offsets + * Random-access input iterator to the sequence of ending offsets of length + * `num_segments`, such that `d_end_offsets[i] - 1` is the last element of + * the *i*th data segment in `d_keys_*` and `d_values_*`. + * If `d_end_offsets[i] - 1 <= d_begin_offsets[i], the *i*th is * considered empty. * - * @param[in] begin_bit - * **[optional]** The least-significant bit index (inclusive) needed for + * @param[in] begin_bit + * **[optional]** The least-significant bit index (inclusive) needed for * key comparison * - * @param[in] end_bit - * **[optional]** The most-significant bit index (exclusive) needed for key + * @param[in] end_bit + * **[optional]** The most-significant bit index (exclusive) needed for key * comparison (e.g., `sizeof(unsigned int) * 8`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/device/device_segmented_sort.cuh b/cub/cub/device/device_segmented_sort.cuh index 2b86da95078..823df17e249 100644 --- a/cub/cub/device/device_segmented_sort.cuh +++ b/cub/cub/device/device_segmented_sort.cuh @@ -34,7 +34,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include @@ -72,8 +79,8 @@ CUB_NAMESPACE_BEGIN * (`unsigned char`, `int`, `double`, etc.) as well as CUDA's `__half` and * `__nv_bfloat16` 16-bit floating-point types. * - * @par Segments are not required to be contiguous. Any element of input(s) or - * output(s) outside the specified segments will not be accessed nor modified. + * @par Segments are not required to be contiguous. Any element of input(s) or + * output(s) outside the specified segments will not be accessed nor modified. * * @par A simple example * @code @@ -135,12 +142,12 @@ struct DeviceSegmentedSort * guaranteed that the relative order of these two elements will be * preserved by sort. * - The range `[d_keys_out, d_keys_out + num_items)` shall not overlap - * `[d_keys_in, d_keys_in + num_items)`, + * `[d_keys_in, d_keys_in + num_items)`, * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys_in[i]`, `d_keys_out[i]` will not - * be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys_in[i]`, `d_keys_out[i]` will not + * be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -309,12 +316,12 @@ struct DeviceSegmentedSort * not guaranteed that the relative order of these two elements will be * preserved by sort. * - The range `[d_keys_out, d_keys_out + num_items)` shall not overlap - * `[d_keys_in, d_keys_in + num_items)`, + * `[d_keys_in, d_keys_in + num_items)`, * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys_in[i]`, `d_keys_out[i]` will not - * be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys_in[i]`, `d_keys_out[i]` will not + * be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -490,13 +497,13 @@ struct DeviceSegmentedSort * not guaranteed that the relative order of these two elements will be * preserved by sort. * - Let `cur = d_keys.Current()` and `alt = d_keys.Alternate()`. - * The range `[cur, cur + num_items)` shall not overlap + * The range `[cur, cur + num_items)` shall not overlap * `[alt, alt + num_items)`. Both ranges shall not overlap * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys.Current()[i]`, - * `d_keys[i].Alternate()[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys.Current()[i]`, + * `d_keys[i].Alternate()[i]` will not be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -671,13 +678,13 @@ struct DeviceSegmentedSort * not guaranteed that the relative order of these two elements will be * preserved by sort. * - Let `cur = d_keys.Current()` and `alt = d_keys.Alternate()`. - * The range `[cur, cur + num_items)` shall not overlap + * The range `[cur, cur + num_items)` shall not overlap * `[alt, alt + num_items)`. Both ranges shall not overlap * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys.Current()[i]`, - * `d_keys[i].Alternate()[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys.Current()[i]`, + * `d_keys[i].Alternate()[i]` will not be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -846,12 +853,12 @@ struct DeviceSegmentedSort * @p x < @p y nor @p y < @p x) then a postcondition of stable sort is that * @p x still precedes @p y. * - The range `[d_keys_out, d_keys_out + num_items)` shall not overlap - * `[d_keys_in, d_keys_in + num_items)`, + * `[d_keys_in, d_keys_in + num_items)`, * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys_in[i]`, `d_keys_out[i]` will not - * be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys_in[i]`, `d_keys_out[i]` will not + * be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -1009,12 +1016,12 @@ struct DeviceSegmentedSort * @p x < @p y nor @p y < @p x) then a postcondition of stable sort is that * @p x still precedes @p y. * - The range `[d_keys_out, d_keys_out + num_items)` shall not overlap - * `[d_keys_in, d_keys_in + num_items)`, + * `[d_keys_in, d_keys_in + num_items)`, * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys_in[i]`, `d_keys_out[i]` will not - * be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys_in[i]`, `d_keys_out[i]` will not + * be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -1181,13 +1188,13 @@ struct DeviceSegmentedSort * @p x < @p y nor @p y < @p x) then a postcondition of stable sort is that * @p x still precedes @p y. * - Let `cur = d_keys.Current()` and `alt = d_keys.Alternate()`. - * The range `[cur, cur + num_items)` shall not overlap + * The range `[cur, cur + num_items)` shall not overlap * `[alt, alt + num_items)`. Both ranges shall not overlap * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys.Current()[i]`, - * `d_keys[i].Alternate()[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys.Current()[i]`, + * `d_keys[i].Alternate()[i]` will not be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -1350,13 +1357,13 @@ struct DeviceSegmentedSort * @p x < @p y nor @p y < @p x) then a postcondition of stable sort is that * @p x still precedes @p y. * - Let `cur = d_keys.Current()` and `alt = d_keys.Alternate()`. - * The range `[cur, cur + num_items)` shall not overlap + * The range `[cur, cur + num_items)` shall not overlap * `[alt, alt + num_items)`. Both ranges shall not overlap * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys.Current()[i]`, - * `d_keys[i].Alternate()[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys.Current()[i]`, + * `d_keys[i].Alternate()[i]` will not be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -1520,13 +1527,13 @@ struct DeviceSegmentedSort * guaranteed that the relative order of these two elements will be * preserved by sort. * - Let `in` be one of `{d_keys_in, d_values_in}` and `out` be any of - * `{d_keys_out, d_values_out}`. The range `[out, out + num_items)` shall - * not overlap `[in, in + num_items)`, + * `{d_keys_out, d_values_out}`. The range `[out, out + num_items)` shall + * not overlap `[in, in + num_items)`, * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys_in[i]`, `d_values_in[i]`, - * `d_keys_out[i]`, `d_values_out[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys_in[i]`, `d_values_in[i]`, + * `d_keys_out[i]`, `d_values_out[i]` will not be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -1720,13 +1727,13 @@ struct DeviceSegmentedSort * guaranteed that the relative order of these two elements will be * preserved by sort. * - Let `in` be one of `{d_keys_in, d_values_in}` and `out` be any of - * `{d_keys_out, d_values_out}`. The range `[out, out + num_items)` shall - * not overlap `[in, in + num_items)`, + * `{d_keys_out, d_values_out}`. The range `[out, out + num_items)` shall + * not overlap `[in, in + num_items)`, * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys_in[i]`, `d_values_in[i]`, - * `d_keys_out[i]`, `d_values_out[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys_in[i]`, `d_values_in[i]`, + * `d_keys_out[i]`, `d_values_out[i]` will not be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -1930,16 +1937,16 @@ struct DeviceSegmentedSort * @p j are equivalent: neither one is less than the other. It is not * guaranteed that the relative order of these two elements will be * preserved by sort. - * - Let `cur` be one of `{d_keys.Current(), d_values.Current()}` and `alt` - * be any of `{d_keys.Alternate(), d_values.Alternate()}`. The range - * `[cur, cur + num_items)` shall not overlap + * - Let `cur` be one of `{d_keys.Current(), d_values.Current()}` and `alt` + * be any of `{d_keys.Alternate(), d_values.Alternate()}`. The range + * `[cur, cur + num_items)` shall not overlap * `[alt, alt + num_items)`. Both ranges shall not overlap * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys.Current()[i]`, - * `d_values.Current()[i]`, `d_keys.Alternate()[i]`, - * `d_values.Alternate()[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys.Current()[i]`, + * `d_values.Current()[i]`, `d_keys.Alternate()[i]`, + * `d_values.Alternate()[i]` will not be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -2131,16 +2138,16 @@ struct DeviceSegmentedSort * @p i and @p j are equivalent: neither one is less than the other. It is * not guaranteed that the relative order of these two elements will be * preserved by sort. - * - Let `cur` be one of `{d_keys.Current(), d_values.Current()}` and `alt` - * be any of `{d_keys.Alternate(), d_values.Alternate()}`. The range - * `[cur, cur + num_items)` shall not overlap + * - Let `cur` be one of `{d_keys.Current(), d_values.Current()}` and `alt` + * be any of `{d_keys.Alternate(), d_values.Alternate()}`. The range + * `[cur, cur + num_items)` shall not overlap * `[alt, alt + num_items)`. Both ranges shall not overlap * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys.Current()[i]`, - * `d_values.Current()[i]`, `d_keys.Alternate()[i]`, - * `d_values.Alternate()[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys.Current()[i]`, + * `d_values.Current()[i]`, `d_keys.Alternate()[i]`, + * `d_values.Alternate()[i]` will not be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -2327,13 +2334,13 @@ struct DeviceSegmentedSort * @p x < @p y nor @p y < @p x) then a postcondition of stable sort is that * @p x still precedes @p y. * - Let `in` be one of `{d_keys_in, d_values_in}` and `out` be any of - * `{d_keys_out, d_values_out}`. The range `[out, out + num_items)` shall - * not overlap `[in, in + num_items)`, + * `{d_keys_out, d_values_out}`. The range `[out, out + num_items)` shall + * not overlap `[in, in + num_items)`, * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys_in[i]`, `d_values_in[i]`, - * `d_keys_out[i]`, `d_values_out[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys_in[i]`, `d_values_in[i]`, + * `d_keys_out[i]`, `d_values_out[i]` will not be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -2520,13 +2527,13 @@ struct DeviceSegmentedSort * @p x < @p y nor @p y < @p x) then a postcondition of stable sort is that * @p x still precedes @p y. * - Let `in` be one of `{d_keys_in, d_values_in}` and `out` be any of - * `{d_keys_out, d_values_out}`. The range `[out, out + num_items)` shall - * not overlap `[in, in + num_items)`, + * `{d_keys_out, d_values_out}`. The range `[out, out + num_items)` shall + * not overlap `[in, in + num_items)`, * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys_in[i]`, `d_values_in[i]`, - * `d_keys_out[i]`, `d_values_out[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys_in[i]`, `d_values_in[i]`, + * `d_keys_out[i]`, `d_values_out[i]` will not be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -2723,16 +2730,16 @@ struct DeviceSegmentedSort * @p x precedes @p y, and if the two elements are equivalent (neither * @p x < @p y nor @p y < @p x) then a postcondition of stable sort is that * @p x still precedes @p y. - * - Let `cur` be one of `{d_keys.Current(), d_values.Current()}` and `alt` - * be any of `{d_keys.Alternate(), d_values.Alternate()}`. The range - * `[cur, cur + num_items)` shall not overlap + * - Let `cur` be one of `{d_keys.Current(), d_values.Current()}` and `alt` + * be any of `{d_keys.Alternate(), d_values.Alternate()}`. The range + * `[cur, cur + num_items)` shall not overlap * `[alt, alt + num_items)`. Both ranges shall not overlap * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys.Current()[i]`, - * `d_values.Current()[i]`, `d_keys.Alternate()[i]`, - * `d_values.Alternate()[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys.Current()[i]`, + * `d_values.Current()[i]`, `d_keys.Alternate()[i]`, + * `d_values.Alternate()[i]` will not be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments @@ -2918,16 +2925,16 @@ struct DeviceSegmentedSort * @p x precedes @p y, and if the two elements are equivalent (neither * @p x < @p y nor @p y < @p x) then a postcondition of stable sort is that * @p x still precedes @p y. - * - Let `cur` be one of `{d_keys.Current(), d_values.Current()}` and `alt` - * be any of `{d_keys.Alternate(), d_values.Alternate()}`. The range - * `[cur, cur + num_items)` shall not overlap + * - Let `cur` be one of `{d_keys.Current(), d_values.Current()}` and `alt` + * be any of `{d_keys.Alternate(), d_values.Alternate()}`. The range + * `[cur, cur + num_items)` shall not overlap * `[alt, alt + num_items)`. Both ranges shall not overlap * `[d_begin_offsets, d_begin_offsets + num_segments)` nor * `[d_end_offsets, d_end_offsets + num_segments)` in any way. - * - Segments are not required to be contiguous. For all index values `i` - * outside the specified segments `d_keys.Current()[i]`, - * `d_values.Current()[i]`, `d_keys.Alternate()[i]`, - * `d_values.Alternate()[i]` will not be accessed nor modified. + * - Segments are not required to be contiguous. For all index values `i` + * outside the specified segments `d_keys.Current()[i]`, + * `d_values.Current()[i]`, `d_keys.Alternate()[i]`, + * `d_values.Alternate()[i]` will not be accessed nor modified. * * @par Snippet * The code snippet below illustrates the batched sorting of three segments diff --git a/cub/cub/device/device_select.cuh b/cub/cub/device/device_select.cuh index f21431391ab..22599ea82b1 100644 --- a/cub/cub/device/device_select.cuh +++ b/cub/cub/device/device_select.cuh @@ -13,9 +13,9 @@ * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; @@ -27,17 +27,24 @@ ******************************************************************************/ /** - * @file cub::DeviceSelect provides device-wide, parallel operations for - * compacting selected items from sequences of data items residing within + * @file cub::DeviceSelect provides device-wide, parallel operations for + * compacting selected items from sequences of data items residing within * device-accessible memory. */ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include #include #include #include @@ -46,8 +53,8 @@ CUB_NAMESPACE_BEGIN /** - * @brief DeviceSelect provides device-wide, parallel operations for compacting - * selected items from sequences of data items residing within + * @brief DeviceSelect provides device-wide, parallel operations for compacting + * selected items from sequences of data items residing within * device-accessible memory. ![](select_logo.png) * @ingroup SingleModule * @@ -62,15 +69,15 @@ CUB_NAMESPACE_BEGIN * @linear_performance{select-flagged, select-if, and select-unique} * * @par - * The following chart illustrates DeviceSelect::If performance across - * different CUDA architectures for `int32` items, where 50% of the items are + * The following chart illustrates DeviceSelect::If performance across + * different CUDA architectures for `int32` items, where 50% of the items are * randomly selected. * * @image html select_if_int32_50_percent.png * * @par - * The following chart illustrates DeviceSelect::Unique performance across - * different CUDA architectures for `int32` items where segments have lengths + * The following chart illustrates DeviceSelect::Unique performance across + * different CUDA architectures for `int32` items where segments have lengths * uniformly sampled from `[1, 1000]`. * * @image html select_unique_int32_len_500.png @@ -82,28 +89,28 @@ CUB_NAMESPACE_BEGIN struct DeviceSelect { /** - * @brief Uses the `d_flags` sequence to selectively copy the corresponding - * items from `d_in` into `d_out`. The total number of items selected + * @brief Uses the `d_flags` sequence to selectively copy the corresponding + * items from `d_in` into `d_out`. The total number of items selected * is written to `d_num_selected_out`. ![](select_flags_logo.png) * * @par - * - The value type of `d_flags` must be castable to `bool` (e.g., `bool`, + * - The value type of `d_flags` must be castable to `bool` (e.g., `bool`, * `char`, `int`, etc.). - * - Copies of the selected items are compacted into `d_out` and maintain + * - Copies of the selected items are compacted into `d_out` and maintain * their original relative ordering. - * - The range `[d_out, d_out + *d_num_selected_out)` shall not overlap + * - The range `[d_out, d_out + *d_num_selected_out)` shall not overlap * `[d_in, d_in + num_items)`, `[d_flags, d_flags + num_items)` nor * `d_num_selected_out` in any way. * - @devicestorage * * @par Snippet - * The code snippet below illustrates the compaction of items selected from + * The code snippet below illustrates the compaction of items selected from * an `int` device vector. * @par * @code * #include // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for input, + * // Declare, allocate, and initialize device-accessible pointers for input, * // flags, and output * int num_items; // e.g., 8 * int *d_in; // e.g., [1, 2, 3, 4, 5, 6, 7, 8] @@ -116,7 +123,7 @@ struct DeviceSelect * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceSelect::Flagged( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_flags, d_out, d_num_selected_out, num_items); * * // Allocate temporary storage @@ -124,7 +131,7 @@ struct DeviceSelect * * // Run selection * cub::DeviceSelect::Flagged( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_flags, d_out, d_num_selected_out, num_items); * * // d_out <-- [1, 4, 6, 7] @@ -132,48 +139,48 @@ struct DeviceSelect * * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading input * items \iterator * - * @tparam FlagIterator - * **[inferred]** Random-access input iterator type for reading selection + * @tparam FlagIterator + * **[inferred]** Random-access input iterator type for reading selection * flags \iterator * - * @tparam OutputIteratorT - * **[inferred]** Random-access output iterator type for writing selected + * @tparam OutputIteratorT + * **[inferred]** Random-access output iterator type for writing selected * items \iterator * - * @tparam NumSelectedIteratorT - * **[inferred]** Output iterator type for recording the number of items + * @tparam NumSelectedIteratorT + * **[inferred]** Output iterator type for recording the number of items * selected \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_in + * @param[in] d_in * Pointer to the input sequence of data items * - * @param[in] d_flags + * @param[in] d_flags * Pointer to the input sequence of selection flags * - * @param[out] d_out + * @param[out] d_out * Pointer to the output sequence of selected data items * - * @param[out] d_num_selected_out - * Pointer to the output total number of items selected + * @param[out] d_num_selected_out + * Pointer to the output total number of items selected * (i.e., length of `d_out`) * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., length of `d_in`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers for input, + * // Declare, allocate, and initialize device-accessible pointers for input, * // flags, and output * int num_items; // e.g., 8 * int *d_data; // e.g., [1, 2, 3, 4, 5, 6, 7, 8] @@ -278,7 +285,7 @@ struct DeviceSelect * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceSelect::Flagged( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_flags, d_num_selected_out, num_items); * * // Allocate temporary storage @@ -286,7 +293,7 @@ struct DeviceSelect * * // Run selection * cub::DeviceSelect::Flagged( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_flags, d_num_selected_out, num_items); * * // d_data <-- [1, 4, 6, 7] @@ -294,40 +301,40 @@ struct DeviceSelect * * @endcode * - * @tparam IteratorT - * **[inferred]** Random-access iterator type for reading and writing + * @tparam IteratorT + * **[inferred]** Random-access iterator type for reading and writing * selected items \iterator * - * @tparam FlagIterator - * **[inferred]** Random-access input iterator type for reading selection + * @tparam FlagIterator + * **[inferred]** Random-access input iterator type for reading selection * flags \iterator * - * @tparam NumSelectedIteratorT - * **[inferred]** Output iterator type for recording the number of items + * @tparam NumSelectedIteratorT + * **[inferred]** Output iterator type for recording the number of items * selected \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * * @param[in,out] d_data * Pointer to the sequence of data items * - * @param[in] d_flags + * @param[in] d_flags * Pointer to the input sequence of selection flags * - * @param[out] d_num_selected_out - * Pointer to the output total number of items selected + * @param[out] d_num_selected_out + * Pointer to the output total number of items selected * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., length of `d_data`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template ::Dispatch(d_temp_storage, temp_storage_bytes, d_data, // in @@ -395,20 +402,20 @@ struct DeviceSelect } /** - * @brief Uses the `select_op` functor to selectively copy items from `d_in` - * into `d_out`. The total number of items selected is written to + * @brief Uses the `select_op` functor to selectively copy items from `d_in` + * into `d_out`. The total number of items selected is written to * `d_num_selected_out`. ![](select_logo.png) * * @par - * - Copies of the selected items are compacted into `d_out` and maintain + * - Copies of the selected items are compacted into `d_out` and maintain * their original relative ordering. - * - The range `[d_out, d_out + *d_num_selected_out)` shall not overlap + * - The range `[d_out, d_out + *d_num_selected_out)` shall not overlap * `[d_in, d_in + num_items)` nor `d_num_selected_out` in any way. * - @devicestorage * * @par Performance - * The following charts illustrate saturated select-if performance across - * different CUDA architectures for `int32` and `int64` items, respectively. + * The following charts illustrate saturated select-if performance across + * different CUDA architectures for `int32` and `int64` items, respectively. * Items are selected with 50% probability. * * @image html select_if_int32_50_percent.png @@ -421,7 +428,7 @@ struct DeviceSelect * @image html select_if_int64_5_percent.png * * @par Snippet - * The code snippet below illustrates the compaction of items selected from + * The code snippet below illustrates the compaction of items selected from * an `int` device vector. * @par * @code @@ -441,7 +448,7 @@ struct DeviceSelect * } * }; * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for input and output * int num_items; // e.g., 8 * int *d_in; // e.g., [0, 2, 3, 9, 5, 2, 81, 8] @@ -454,7 +461,7 @@ struct DeviceSelect * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceSelect::If( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, d_num_selected_out, num_items, select_op); * * // Allocate temporary storage @@ -462,55 +469,55 @@ struct DeviceSelect * * // Run selection * cub::DeviceSelect::If( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, d_num_selected_out, num_items, select_op); * * // d_out <-- [0, 2, 3, 5, 2] * // d_num_selected_out <-- [5] * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading input * items \iterator * - * @tparam OutputIteratorT - * **[inferred]** Random-access output iterator type for writing selected + * @tparam OutputIteratorT + * **[inferred]** Random-access output iterator type for writing selected * items \iterator * - * @tparam NumSelectedIteratorT - * **[inferred]** Output iterator type for recording the number of items + * @tparam NumSelectedIteratorT + * **[inferred]** Output iterator type for recording the number of items * selected \iterator * - * @tparam SelectOp - * **[inferred]** Selection operator type having member + * @tparam SelectOp + * **[inferred]** Selection operator type having member * `bool operator()(const T &a)` * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_in + * @param[in] d_in * Pointer to the input sequence of data items * - * @param[out] d_out + * @param[out] d_out * Pointer to the output sequence of selected data items * - * @param[out] d_num_selected_out - * Pointer to the output total number of items selected + * @param[out] d_num_selected_out + * Pointer to the output total number of items selected * (i.e., length of `d_out`) * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., length of `d_in`) * - * @param[in] select_op + * @param[in] select_op * Unary selection operator * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template 0. */ template // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for input and output * int num_items; // e.g., 8 * int *d_in; // e.g., [0, 2, 2, 9, 5, 5, 5, 8] @@ -785,7 +792,7 @@ struct DeviceSelect * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceSelect::Unique( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, d_num_selected_out, num_items); * * // Allocate temporary storage @@ -793,48 +800,48 @@ struct DeviceSelect * * // Run selection * cub::DeviceSelect::Unique( - * d_temp_storage, temp_storage_bytes, + * d_temp_storage, temp_storage_bytes, * d_in, d_out, d_num_selected_out, num_items); * * // d_out <-- [0, 2, 9, 5, 8] * // d_num_selected_out <-- [5] * @endcode * - * @tparam InputIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam InputIteratorT + * **[inferred]** Random-access input iterator type for reading input * items \iterator * - * @tparam OutputIteratorT - * **[inferred]** Random-access output iterator type for writing selected + * @tparam OutputIteratorT + * **[inferred]** Random-access output iterator type for writing selected * items \iterator * - * @tparam NumSelectedIteratorT - * **[inferred]** Output iterator type for recording the number of items + * @tparam NumSelectedIteratorT + * **[inferred]** Output iterator type for recording the number of items * selected \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_in + * @param[in] d_in * Pointer to the input sequence of data items * - * @param[out] d_out + * @param[out] d_out * Pointer to the output sequence of selected data items * - * @param[out] d_num_selected_out - * Pointer to the output total number of items selected + * @param[out] d_num_selected_out + * Pointer to the output total number of items selected * (i.e., length of `d_out`) * - * @param[in] num_items + * @param[in] num_items * Total number of input items (i.e., length of `d_in`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template // or equivalently * - * // Declare, allocate, and initialize device-accessible pointers + * // Declare, allocate, and initialize device-accessible pointers * // for input and output * int num_items; // e.g., 8 * int *d_keys_in; // e.g., [0, 2, 2, 9, 5, 5, 5, 8] @@ -941,8 +948,8 @@ struct DeviceSelect * void *d_temp_storage = NULL; * size_t temp_storage_bytes = 0; * cub::DeviceSelect::UniqueByKey( - * d_temp_storage, temp_storage_bytes, - * d_keys_in, d_values_in, + * d_temp_storage, temp_storage_bytes, + * d_keys_in, d_values_in, * d_keys_out, d_values_out, d_num_selected_out, num_items); * * // Allocate temporary storage @@ -950,8 +957,8 @@ struct DeviceSelect * * // Run selection * cub::DeviceSelect::UniqueByKey( - * d_temp_storage, temp_storage_bytes, - * d_keys_in, d_values_in, + * d_temp_storage, temp_storage_bytes, + * d_keys_in, d_values_in, * d_keys_out, d_values_out, d_num_selected_out, num_items); * * // d_keys_out <-- [0, 2, 9, 5, 8] @@ -959,56 +966,56 @@ struct DeviceSelect * // d_num_selected_out <-- [5] * @endcode * - * @tparam KeyInputIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam KeyInputIteratorT + * **[inferred]** Random-access input iterator type for reading input * keys \iterator * - * @tparam ValueInputIteratorT - * **[inferred]** Random-access input iterator type for reading input + * @tparam ValueInputIteratorT + * **[inferred]** Random-access input iterator type for reading input * values \iterator * - * @tparam KeyOutputIteratorT - * **[inferred]** Random-access output iterator type for writing selected + * @tparam KeyOutputIteratorT + * **[inferred]** Random-access output iterator type for writing selected * keys \iterator * - * @tparam ValueOutputIteratorT - * **[inferred]** Random-access output iterator type for writing selected + * @tparam ValueOutputIteratorT + * **[inferred]** Random-access output iterator type for writing selected * values \iterator * - * @tparam NumSelectedIteratorT - * **[inferred]** Output iterator type for recording the number of items + * @tparam NumSelectedIteratorT + * **[inferred]** Output iterator type for recording the number of items * selected \iterator * - * @param[in] d_temp_storage - * Device-accessible allocation of temporary storage. When `nullptr`, the - * required allocation size is written to `temp_storage_bytes` and no work + * @param[in] d_temp_storage + * Device-accessible allocation of temporary storage. When `nullptr`, the + * required allocation size is written to `temp_storage_bytes` and no work * is done. * - * @param[in,out] temp_storage_bytes + * @param[in,out] temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * - * @param[in] d_keys_in + * @param[in] d_keys_in * Pointer to the input sequence of keys * - * @param[in] d_values_in + * @param[in] d_values_in * Pointer to the input sequence of values * - * @param[out] d_keys_out + * @param[out] d_keys_out * Pointer to the output sequence of selected keys * - * @param[out] d_values_out + * @param[out] d_values_out * Pointer to the output sequence of selected values * - * @param[out] d_num_selected_out - * Pointer to the total number of items selected (i.e., length of + * @param[out] d_num_selected_out + * Pointer to the total number of items selected (i.e., length of * `d_keys_out` or `d_values_out`) * - * @param[in] num_items - * Total number of input items (i.e., length of `d_keys_in` or + * @param[in] num_items + * Total number of input items (i.e., length of `d_keys_in` or * `d_values_in`) * - * @param[in] stream - * **[optional]** CUDA stream to launch kernels within. + * @param[in] stream + * **[optional]** CUDA stream to launch kernels within. * Default is stream0. */ template #include #include diff --git a/cub/cub/device/dispatch/dispatch_adjacent_difference.cuh b/cub/cub/device/dispatch/dispatch_adjacent_difference.cuh index 6328e7d787b..a7fcc713ea7 100644 --- a/cub/cub/device/dispatch/dispatch_adjacent_difference.cuh +++ b/cub/cub/device/dispatch/dispatch_adjacent_difference.cuh @@ -27,8 +27,15 @@ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include #include @@ -67,10 +74,10 @@ DeviceAdjacentDifferenceDifferenceKernel(InputIteratorT input, DifferenceOpT difference_op, OffsetT num_items) { - using ActivePolicyT = + using ActivePolicyT = typename ChainedPolicyT::ActivePolicy::AdjacentDifferencePolicy; - // It is OK to introspect the return type or parameter types of the + // It is OK to introspect the return type or parameter types of the // `operator()` function of `__device__` extended lambda within device code. using OutputT = detail::invoke_result_t; @@ -94,7 +101,7 @@ DeviceAdjacentDifferenceDifferenceKernel(InputIteratorT input, num_items); int tile_idx = static_cast(blockIdx.x); - OffsetT tile_base = static_cast(tile_idx) + OffsetT tile_base = static_cast(tile_idx) * ActivePolicyT::ITEMS_PER_TILE; agent.Process(tile_idx, tile_base); @@ -313,7 +320,7 @@ struct DispatchAdjacentDifference : public SelectedPolicy num_items); error = CubDebug(detail::DebugSyncStream(stream)); - + if (cudaSuccess != error) { break; diff --git a/cub/cub/device/dispatch/dispatch_batch_memcpy.cuh b/cub/cub/device/dispatch/dispatch_batch_memcpy.cuh index 04384ae0451..ae9026df3a7 100644 --- a/cub/cub/device/dispatch/dispatch_batch_memcpy.cuh +++ b/cub/cub/device/dispatch/dispatch_batch_memcpy.cuh @@ -33,9 +33,16 @@ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include #include #include #include diff --git a/cub/cub/device/dispatch/dispatch_histogram.cuh b/cub/cub/device/dispatch/dispatch_histogram.cuh index 5c9aab47a85..aa6bc4b23e6 100644 --- a/cub/cub/device/dispatch/dispatch_histogram.cuh +++ b/cub/cub/device/dispatch/dispatch_histogram.cuh @@ -35,8 +35,15 @@ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include #include @@ -567,8 +574,8 @@ struct dispatch_histogram * @tparam OffsetT * Signed integer type for global offsets * - * @tparam SelectedPolicy - * Implementation detail, do not specify directly, requirements on the + * @tparam SelectedPolicy + * Implementation detail, do not specify directly, requirements on the * content of this type are subject to breaking change. */ template #include #include diff --git a/cub/cub/device/dispatch/dispatch_radix_sort.cuh b/cub/cub/device/dispatch/dispatch_radix_sort.cuh index b57ccaace88..aef8df7a8da 100644 --- a/cub/cub/device/dispatch/dispatch_radix_sort.cuh +++ b/cub/cub/device/dispatch/dispatch_radix_sort.cuh @@ -33,13 +33,20 @@ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include #include #include #include -#include #include #include #include @@ -75,7 +82,7 @@ template < bool IS_DESCENDING, ///< Whether or not the sorted-order is high-to-low typename KeyT, ///< Key type typename OffsetT, ///< Signed integer type for global offsets - typename DecomposerT = detail::identity_decomposer_t> + typename DecomposerT = detail::identity_decomposer_t> __launch_bounds__ (int((ALT_DIGIT_BITS) ? int(ChainedPolicyT::ActivePolicy::AltUpsweepPolicy::BLOCK_THREADS) : int(ChainedPolicyT::ActivePolicy::UpsweepPolicy::BLOCK_THREADS))) @@ -316,7 +323,7 @@ CUB_DETAIL_KERNEL_ATTRIBUTES void DeviceRadixSortSingleTileKernel( ValueT values[ITEMS_PER_THREAD]; // Get default (min/max) value for out-of-bounds keys - bit_ordered_type default_key_bits = IS_DESCENDING + bit_ordered_type default_key_bits = IS_DESCENDING ? traits::min_raw_binary_key(decomposer) : traits::max_raw_binary_key(decomposer); @@ -540,7 +547,7 @@ CUB_DETAIL_KERNEL_ATTRIBUTES void DeviceSegmentedRadixSortKernel( * Onesweep kernels ******************************************************************************/ -/** +/** * Kernel for computing multiple histograms */ @@ -552,7 +559,7 @@ template -CUB_DETAIL_KERNEL_ATTRIBUTES __launch_bounds__(ChainedPolicyT::ActivePolicy::HistogramPolicy::BLOCK_THREADS) +CUB_DETAIL_KERNEL_ATTRIBUTES __launch_bounds__(ChainedPolicyT::ActivePolicy::HistogramPolicy::BLOCK_THREADS) void DeviceRadixSortHistogramKernel(OffsetT *d_bins_out, const KeyT *d_keys_in, OffsetT num_items, @@ -594,7 +601,7 @@ DeviceRadixSortOnesweepKernel } -/** +/** * Exclusive sum kernel */ template < @@ -722,10 +729,10 @@ struct DeviceRadixSortPolicy // Histogram policy typedef AgentRadixSortHistogramPolicy <256, 8, 1, KeyT, ONESWEEP_RADIX_BITS> HistogramPolicy; - + // Exclusive sum policy typedef AgentRadixSortExclusiveSumPolicy <256, ONESWEEP_RADIX_BITS> ExclusiveSumPolicy; - + // Onesweep policy typedef AgentRadixSortOnesweepPolicy <256, 21, DominantT, 1, RADIX_RANK_MATCH_EARLY_COUNTS_ANY, BLOCK_SCAN_WARP_SCANS, RADIX_SORT_STORE_DIRECT, @@ -778,10 +785,10 @@ struct DeviceRadixSortPolicy // Histogram policy typedef AgentRadixSortHistogramPolicy <256, 8, 1, KeyT, ONESWEEP_RADIX_BITS> HistogramPolicy; - + // Exclusive sum policy typedef AgentRadixSortExclusiveSumPolicy <256, ONESWEEP_RADIX_BITS> ExclusiveSumPolicy; - + // Onesweep policy typedef AgentRadixSortOnesweepPolicy <256, 21, DominantT, 1, RADIX_RANK_MATCH_EARLY_COUNTS_ANY, BLOCK_SCAN_WARP_SCANS, RADIX_SORT_STORE_DIRECT, @@ -821,10 +828,10 @@ struct DeviceRadixSortPolicy // Histogram policy typedef AgentRadixSortHistogramPolicy <256, 8, 8, KeyT, ONESWEEP_RADIX_BITS> HistogramPolicy; - + // Exclusive sum policy typedef AgentRadixSortExclusiveSumPolicy <256, ONESWEEP_RADIX_BITS> ExclusiveSumPolicy; - + // Onesweep policy typedef AgentRadixSortOnesweepPolicy <256, OFFSET_64BIT ? 29 : 30, DominantT, 2, RADIX_RANK_MATCH_EARLY_COUNTS_ANY, BLOCK_SCAN_WARP_SCANS, @@ -864,10 +871,10 @@ struct DeviceRadixSortPolicy // Histogram policy typedef AgentRadixSortHistogramPolicy <256, 8, 8, KeyT, ONESWEEP_RADIX_BITS> HistogramPolicy; - + // Exclusive sum policy typedef AgentRadixSortExclusiveSumPolicy <256, ONESWEEP_RADIX_BITS> ExclusiveSumPolicy; - + // Onesweep policy typedef AgentRadixSortOnesweepPolicy <256, 30, DominantT, 2, RADIX_RANK_MATCH_EARLY_COUNTS_ANY, BLOCK_SCAN_WARP_SCANS, @@ -905,10 +912,10 @@ struct DeviceRadixSortPolicy // Histogram policy typedef AgentRadixSortHistogramPolicy <256, 8, 8, KeyT, ONESWEEP_RADIX_BITS> HistogramPolicy; - + // Exclusive sum policy typedef AgentRadixSortExclusiveSumPolicy <256, ONESWEEP_RADIX_BITS> ExclusiveSumPolicy; - + // Onesweep policy typedef AgentRadixSortOnesweepPolicy <256, 30, DominantT, 2, RADIX_RANK_MATCH_EARLY_COUNTS_ANY, BLOCK_SCAN_WARP_SCANS, @@ -948,10 +955,10 @@ struct DeviceRadixSortPolicy // Histogram policy typedef AgentRadixSortHistogramPolicy <256, 8, 8, KeyT, ONESWEEP_RADIX_BITS> HistogramPolicy; - + // Exclusive sum policy typedef AgentRadixSortExclusiveSumPolicy <256, ONESWEEP_RADIX_BITS> ExclusiveSumPolicy; - + // Onesweep policy typedef AgentRadixSortOnesweepPolicy <256, sizeof(KeyT) == 4 && sizeof(ValueT) == 4 ? 46 : 23, DominantT, 4, @@ -993,10 +1000,10 @@ struct DeviceRadixSortPolicy // Histogram policy typedef AgentRadixSortHistogramPolicy <128, 16, 1, KeyT, ONESWEEP_RADIX_BITS> HistogramPolicy; - + // Exclusive sum policy typedef AgentRadixSortExclusiveSumPolicy <256, ONESWEEP_RADIX_BITS> ExclusiveSumPolicy; - + // Onesweep policy typedef AgentRadixSortOnesweepPolicy <384, OFFSET_64BIT && sizeof(KeyT) == 4 && !KEYS_ONLY ? 17 : 21, DominantT, 1, @@ -1162,8 +1169,8 @@ struct DeviceRadixSortPolicy * @tparam OffsetT * Signed integer type for global offsets * - * @tparam DecomposerT - * Implementation detail, do not specify directly, requirements on the + * @tparam DecomposerT + * Implementation detail, do not specify directly, requirements on the * content of this type are subject to breaking change. */ template (upsweep_kernel)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } error = CubDebug(scan_config.Init(scan_kernel)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } error = CubDebug(downsweep_config.Init(downsweep_kernel)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -1629,7 +1636,7 @@ struct DispatchRadixSort : SelectedPolicy histogram_kernel, HISTO_BLOCK_THREADS, 0)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -1713,7 +1720,7 @@ struct DispatchRadixSort : SelectedPolicy 0, num_blocks * RADIX_DIGITS * sizeof(AtomicOffsetT), stream)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -1760,7 +1767,7 @@ struct DispatchRadixSort : SelectedPolicy { break; } - + // use the temporary buffers if no overwrite is allowed if (!is_overwrite_okay && pass == 0) { @@ -1775,7 +1782,7 @@ struct DispatchRadixSort : SelectedPolicy d_values.selector ^= 1; } } while (0); - + return error; } @@ -1799,7 +1806,7 @@ struct DispatchRadixSort : SelectedPolicy // Get device ordinal int device_ordinal; error = CubDebug(cudaGetDevice(&device_ordinal)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -1808,7 +1815,7 @@ struct DispatchRadixSort : SelectedPolicy int sm_count; error = CubDebug( cudaDeviceGetAttribute(&sm_count, cudaDevAttrMultiProcessorCount, device_ordinal)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -1899,7 +1906,7 @@ struct DispatchRadixSort : SelectedPolicy spine_length, current_bit, (current_bit < alt_end_bit) ? alt_pass_config : pass_config)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -1917,7 +1924,7 @@ struct DispatchRadixSort : SelectedPolicy current_bit, (current_bit < alt_end_bit) ? alt_pass_config : pass_config)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -1956,7 +1963,7 @@ struct DispatchRadixSort : SelectedPolicy DeviceRadixSortUpsweepKernel< MaxPolicyT, true, IS_DESCENDING, KeyT, OffsetT, DecomposerT>, RadixSortScanBinsKernel< MaxPolicyT, OffsetT>, DeviceRadixSortDownsweepKernel< MaxPolicyT, false, IS_DESCENDING, KeyT, ValueT, OffsetT, DecomposerT>, - DeviceRadixSortDownsweepKernel< MaxPolicyT, true, IS_DESCENDING, KeyT, ValueT, OffsetT, DecomposerT>); + DeviceRadixSortDownsweepKernel< MaxPolicyT, true, IS_DESCENDING, KeyT, ValueT, OffsetT, DecomposerT>); } template @@ -1977,7 +1984,7 @@ struct DispatchRadixSort : SelectedPolicy temp_storage_bytes = 1; return cudaSuccess; } - + // Copy keys #ifdef CUB_DETAIL_DEBUG_ENABLE_LOG _CubLog("Invoking async copy of %lld keys on stream %lld\n", (long long)num_items, @@ -2103,7 +2110,7 @@ struct DispatchRadixSort : SelectedPolicy int ptx_version = 0; error = CubDebug(PtxVersion(ptx_version)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -2397,7 +2404,7 @@ struct DispatchSegmentedRadixSort : SelectedPolicy // Alias the temporary allocations from the single storage blob (or compute the necessary size of the blob) error = CubDebug(AliasTemporaries(d_temp_storage, temp_storage_bytes, allocations, allocation_sizes)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -2437,7 +2444,7 @@ struct DispatchSegmentedRadixSort : SelectedPolicy d_values_remaining_passes.Current(), current_bit, (current_bit < alt_end_bit) ? alt_pass_config : pass_config)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -2452,7 +2459,7 @@ struct DispatchSegmentedRadixSort : SelectedPolicy d_values_remaining_passes.d_buffers[d_keys_remaining_passes.selector ^ 1], current_bit, (current_bit < alt_end_bit) ? alt_pass_config : pass_config)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -2533,7 +2540,7 @@ struct DispatchSegmentedRadixSort : SelectedPolicy int ptx_version = 0; error = CubDebug(PtxVersion(ptx_version)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -2548,7 +2555,7 @@ struct DispatchSegmentedRadixSort : SelectedPolicy // Dispatch to chained policy error = CubDebug(MaxPolicyT::Invoke(ptx_version, dispatch)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } diff --git a/cub/cub/device/dispatch/dispatch_reduce.cuh b/cub/cub/device/dispatch/dispatch_reduce.cuh index 39a777c8e3d..ca4f1ee5b05 100644 --- a/cub/cub/device/dispatch/dispatch_reduce.cuh +++ b/cub/cub/device/dispatch/dispatch_reduce.cuh @@ -34,8 +34,15 @@ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include #include diff --git a/cub/cub/device/dispatch/dispatch_reduce_by_key.cuh b/cub/cub/device/dispatch/dispatch_reduce_by_key.cuh index a758fa60992..3ff8b936821 100644 --- a/cub/cub/device/dispatch/dispatch_reduce_by_key.cuh +++ b/cub/cub/device/dispatch/dispatch_reduce_by_key.cuh @@ -33,8 +33,15 @@ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include #include @@ -205,8 +212,8 @@ __launch_bounds__(int(ChainedPolicyT::ActivePolicy::ReduceByKeyPolicyT::BLOCK_TH * @tparam OffsetT * Signed integer type for global offsets * - * @tparam SelectedPolicy - * Implementation detail, do not specify directly, requirements on the + * @tparam SelectedPolicy + * Implementation detail, do not specify directly, requirements on the * content of this type are subject to breaking change. */ template -#include #include #include #include @@ -172,8 +179,8 @@ __launch_bounds__(int(ChainedPolicyT::ActivePolicy::RleSweepPolicyT::BLOCK_THREA * @tparam OffsetT * Signed integer type for global offsets * - * @tparam SelectedPolicy - * Implementation detail, do not specify directly, requirements on the + * @tparam SelectedPolicy + * Implementation detail, do not specify directly, requirements on the * content of this type are subject to breaking change. */ template -#include #include #include #include @@ -211,7 +218,7 @@ __launch_bounds__(int(ChainedPolicyT::ActivePolicy::ScanPolicyT::BLOCK_THREADS)) * Random-access output iterator type for writing scan outputs \iterator * * @tparam ScanOpT - * Binary scan functor type having member + * Binary scan functor type having member * `auto operator()(const T &a, const U &b)` * * @tparam InitValueT @@ -226,9 +233,9 @@ template ::value, cub::detail::value_t, diff --git a/cub/cub/device/dispatch/dispatch_scan_by_key.cuh b/cub/cub/device/dispatch/dispatch_scan_by_key.cuh index 62df5c6b913..75cb2829bc4 100644 --- a/cub/cub/device/dispatch/dispatch_scan_by_key.cuh +++ b/cub/cub/device/dispatch/dispatch_scan_by_key.cuh @@ -12,9 +12,9 @@ * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; @@ -26,15 +26,22 @@ ******************************************************************************/ /** - * @file DeviceScan provides device-wide, parallel operations for computing a - * prefix scan across a sequence of data items residing within + * @file DeviceScan provides device-wide, parallel operations for computing a + * prefix scan across a sequence of data items residing within * device-accessible memory. */ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include #include @@ -465,7 +472,7 @@ struct DispatchScanByKey : SelectedPolicy } // Sync the stream if specified to flush runtime errors - + error = CubDebug(detail::DebugSyncStream(stream)); if (cudaSuccess != error) { diff --git a/cub/cub/device/dispatch/dispatch_segmented_sort.cuh b/cub/cub/device/dispatch/dispatch_segmented_sort.cuh index e2d5da09669..e31fcebe321 100644 --- a/cub/cub/device/dispatch/dispatch_segmented_sort.cuh +++ b/cub/cub/device/dispatch/dispatch_segmented_sort.cuh @@ -27,6 +27,14 @@ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/device/dispatch/dispatch_select_if.cuh b/cub/cub/device/dispatch/dispatch_select_if.cuh index bb9fe685768..32fe0a153a2 100644 --- a/cub/cub/device/dispatch/dispatch_select_if.cuh +++ b/cub/cub/device/dispatch/dispatch_select_if.cuh @@ -28,14 +28,21 @@ /** * @file - * cub::DeviceSelect provides device-wide, parallel operations for selecting items from sequences + * cub::DeviceSelect provides device-wide, parallel operations for selecting items from sequences * of data items residing within device-accessible memory. */ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include #include @@ -64,39 +71,39 @@ CUB_NAMESPACE_BEGIN * Otherwise performs flag-based selection if FlagsInputIterator's value type != NullType * Otherwise performs discontinuity selection (keep unique) * - * @tparam InputIteratorT + * @tparam InputIteratorT * Random-access input iterator type for reading input items * - * @tparam FlagsInputIteratorT - * Random-access input iterator type for reading selection flags (NullType* if a selection functor + * @tparam FlagsInputIteratorT + * Random-access input iterator type for reading selection flags (NullType* if a selection functor * or discontinuity flagging is to be used for selection) * - * @tparam SelectedOutputIteratorT + * @tparam SelectedOutputIteratorT * Random-access output iterator type for writing selected items * - * @tparam NumSelectedIteratorT + * @tparam NumSelectedIteratorT * Output iterator type for recording the number of items selected * - * @tparam ScanTileStateT + * @tparam ScanTileStateT * Tile status interface type * - * @tparam SelectOpT - * Selection operator type (NullType if selection flags or discontinuity flagging is + * @tparam SelectOpT + * Selection operator type (NullType if selection flags or discontinuity flagging is * to be used for selection) * - * @tparam EqualityOpT - * Equality operator type (NullType if selection functor or selection flags is + * @tparam EqualityOpT + * Equality operator type (NullType if selection functor or selection flags is * to be used for selection) * - * @tparam OffsetT + * @tparam OffsetT * Signed integer type for global offsets * - * @tparam KEEP_REJECTS + * @tparam KEEP_REJECTS * Whether or not we push rejected items to the back of the output * * @param[in] d_in * Pointer to the input sequence of data items - * + * * @param[in] d_flags * Pointer to the input sequence of selection flags (if applicable) * @@ -106,18 +113,18 @@ CUB_NAMESPACE_BEGIN * @param[out] d_num_selected_out * Pointer to the total number of items selected (i.e., length of \p d_selected_out) * - * @param[in] tile_status + * @param[in] tile_status * Tile status interface * * @param[in] select_op * Selection operator - * + * * @param[in] equality_op * Equality operator - * + * * @param[in] num_items * Total number of input items (i.e., length of \p d_in) - * + * * @param[in] num_tiles * Total number of tiles for the entire problem */ @@ -176,7 +183,7 @@ __launch_bounds__(int(ChainedPolicyT::ActivePolicy::SelectIfPolicyT::BLOCK_THREA * Random-access input iterator type for reading input items * * @tparam FlagsInputIteratorT - * Random-access input iterator type for reading selection flags + * Random-access input iterator type for reading selection flags * (NullType* if a selection functor or discontinuity flagging is to be used for selection) * * @tparam SelectedOutputIteratorT @@ -186,11 +193,11 @@ __launch_bounds__(int(ChainedPolicyT::ActivePolicy::SelectIfPolicyT::BLOCK_THREA * Output iterator type for recording the number of items selected * * @tparam SelectOpT - * Selection operator type (NullType if selection flags or discontinuity flagging is + * Selection operator type (NullType if selection flags or discontinuity flagging is * to be used for selection) * * @tparam EqualityOpT - * Equality operator type (NullType if selection functor or selection flags is to + * Equality operator type (NullType if selection functor or selection flags is to * be used for selection) * * @tparam OffsetT @@ -225,13 +232,13 @@ struct DispatchSelectIf : SelectedPolicy static constexpr int INIT_KERNEL_THREADS = 128; - /// Device-accessible allocation of temporary storage. - /// When `nullptr`, the required allocation size is written to `temp_storage_bytes` + /// Device-accessible allocation of temporary storage. + /// When `nullptr`, the required allocation size is written to `temp_storage_bytes` /// and no work is done. void* d_temp_storage; /// Reference to size in bytes of `d_temp_storage` allocation - size_t& temp_storage_bytes; + size_t& temp_storage_bytes; /// Pointer to the input sequence of data items InputIteratorT d_in; @@ -261,11 +268,11 @@ struct DispatchSelectIf : SelectedPolicy /** * @param d_temp_storage - * Device-accessible allocation of temporary storage. - * When `nullptr`, the required allocation size is written to `temp_storage_bytes` + * Device-accessible allocation of temporary storage. + * When `nullptr`, the required allocation size is written to `temp_storage_bytes` * and no work is done. - * - * @param temp_storage_bytes + * + * @param temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * * @param d_in @@ -339,7 +346,7 @@ struct DispatchSelectIf : SelectedPolicy // Get device ordinal int device_ordinal; error = CubDebug(cudaGetDevice(&device_ordinal)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -352,7 +359,7 @@ struct DispatchSelectIf : SelectedPolicy // bytes needed for tile status descriptors error = CubDebug(ScanTileStateT::AllocationSize(num_tiles, allocation_sizes[0])); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -361,7 +368,7 @@ struct DispatchSelectIf : SelectedPolicy void* allocations[1] = {}; error = CubDebug(AliasTemporaries(d_temp_storage, temp_storage_bytes, allocations, allocation_sizes)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -375,7 +382,7 @@ struct DispatchSelectIf : SelectedPolicy // Construct the tile status interface ScanTileStateT tile_status; error = CubDebug(tile_status.Init(num_tiles, allocations[0], allocation_sizes[0])); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -418,7 +425,7 @@ struct DispatchSelectIf : SelectedPolicy // Get max x-dimension of grid int max_dim_x; error = CubDebug(cudaDeviceGetAttribute(&max_dim_x, cudaDevAttrMaxGridDimX, device_ordinal)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -509,11 +516,11 @@ struct DispatchSelectIf : SelectedPolicy * Internal dispatch routine * * @param d_temp_storage - * Device-accessible allocation of temporary storage. - * When `nullptr`, the required allocation size is written to `temp_storage_bytes` + * Device-accessible allocation of temporary storage. + * When `nullptr`, the required allocation size is written to `temp_storage_bytes` * and no work is done. - * - * @param temp_storage_bytes + * + * @param temp_storage_bytes * Reference to size in bytes of `d_temp_storage` allocation * * @param d_in @@ -555,7 +562,7 @@ struct DispatchSelectIf : SelectedPolicy using MaxPolicyT = typename SelectedPolicy::MaxPolicy; int ptx_version = 0; - if (cudaError_t error = CubDebug(PtxVersion(ptx_version))) + if (cudaError_t error = CubDebug(PtxVersion(ptx_version))) { return error; } @@ -571,23 +578,23 @@ struct DispatchSelectIf : SelectedPolicy num_items, stream, ptx_version); - + return CubDebug(MaxPolicyT::Invoke(ptx_version, dispatch)); } CUB_DETAIL_RUNTIME_DEBUG_SYNC_IS_NOT_SUPPORTED CUB_RUNTIME_FUNCTION __forceinline__ static cudaError_t Dispatch( - void* d_temp_storage, - size_t& temp_storage_bytes, - InputIteratorT d_in, - FlagsInputIteratorT d_flags, - SelectedOutputIteratorT d_selected_out, - NumSelectedIteratorT d_num_selected_out, - SelectOpT select_op, - EqualityOpT equality_op, - OffsetT num_items, - cudaStream_t stream, + void* d_temp_storage, + size_t& temp_storage_bytes, + InputIteratorT d_in, + FlagsInputIteratorT d_flags, + SelectedOutputIteratorT d_selected_out, + NumSelectedIteratorT d_num_selected_out, + SelectOpT select_op, + EqualityOpT equality_op, + OffsetT num_items, + cudaStream_t stream, bool debug_synchronous) { CUB_DETAIL_RUNTIME_DEBUG_SYNC_USAGE_LOG diff --git a/cub/cub/device/dispatch/dispatch_spmv_orig.cuh b/cub/cub/device/dispatch/dispatch_spmv_orig.cuh index 8f2a68f967c..fda0d518d58 100644 --- a/cub/cub/device/dispatch/dispatch_spmv_orig.cuh +++ b/cub/cub/device/dispatch/dispatch_spmv_orig.cuh @@ -34,10 +34,17 @@ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include -#include #include #include #include @@ -196,9 +203,9 @@ DeviceSpmvEmptyMatrixKernel(SpmvParams spmv_params) { ValueT result = 0.0; - CUB_IF_CONSTEXPR(HAS_BETA) + CUB_IF_CONSTEXPR(HAS_BETA) { - result += spmv_params.beta * spmv_params.d_vector_y[row]; + result += spmv_params.beta * spmv_params.d_vector_y[row]; } spmv_params.d_vector_y[row] = result; @@ -838,7 +845,7 @@ struct DispatchSpmv constexpr bool has_beta = false; if (CubDebug(error = Dispatch( - d_temp_storage, temp_storage_bytes, spmv_params, stream, + d_temp_storage, temp_storage_bytes, spmv_params, stream, DeviceSpmv1ColKernel, DeviceSpmvSearchKernel, DeviceSpmvKernel, diff --git a/cub/cub/device/dispatch/dispatch_three_way_partition.cuh b/cub/cub/device/dispatch/dispatch_three_way_partition.cuh index 8b1849fa24c..083c84f6274 100644 --- a/cub/cub/device/dispatch/dispatch_three_way_partition.cuh +++ b/cub/cub/device/dispatch/dispatch_three_way_partition.cuh @@ -27,8 +27,15 @@ #pragma once +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include #include diff --git a/cub/cub/device/dispatch/dispatch_unique_by_key.cuh b/cub/cub/device/dispatch/dispatch_unique_by_key.cuh index c924e71ef7e..36ab55be61c 100644 --- a/cub/cub/device/dispatch/dispatch_unique_by_key.cuh +++ b/cub/cub/device/dispatch/dispatch_unique_by_key.cuh @@ -34,8 +34,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/cub/cub/device/dispatch/tuning/tuning_histogram.cuh b/cub/cub/device/dispatch/tuning/tuning_histogram.cuh index 2b595e91e79..eca09e9b4cf 100644 --- a/cub/cub/device/dispatch/tuning/tuning_histogram.cuh +++ b/cub/cub/device/dispatch/tuning/tuning_histogram.cuh @@ -27,9 +27,16 @@ #pragma once +#include "../../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include #include #include diff --git a/cub/cub/device/dispatch/tuning/tuning_reduce_by_key.cuh b/cub/cub/device/dispatch/tuning/tuning_reduce_by_key.cuh index e06ddb5019e..38900bdee60 100644 --- a/cub/cub/device/dispatch/tuning/tuning_reduce_by_key.cuh +++ b/cub/cub/device/dispatch/tuning/tuning_reduce_by_key.cuh @@ -27,12 +27,19 @@ #pragma once +#include "../../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include #include #include -#include #include #include diff --git a/cub/cub/device/dispatch/tuning/tuning_run_length_encode.cuh b/cub/cub/device/dispatch/tuning/tuning_run_length_encode.cuh index d7ad21c808f..c057d31c60c 100644 --- a/cub/cub/device/dispatch/tuning/tuning_run_length_encode.cuh +++ b/cub/cub/device/dispatch/tuning/tuning_run_length_encode.cuh @@ -27,13 +27,20 @@ #pragma once +#include "../../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include #include #include #include -#include #include #include @@ -157,7 +164,7 @@ struct sm90_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm90_tuning { @@ -259,7 +266,7 @@ struct sm80_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm80_tuning { @@ -287,7 +294,7 @@ struct sm80_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm90_tuning { @@ -412,7 +419,7 @@ struct sm80_tuning static constexpr int items = CUB_MIN(nominal_4b_items_per_thread, CUB_MAX(1, (nominal_4b_items_per_thread * 4 / sizeof(KeyT)))); - + static constexpr BlockLoadAlgorithm load_algorithm = BLOCK_LOAD_WARP_TRANSPOSE; static constexpr bool store_with_time_slicing = true; @@ -476,7 +483,7 @@ struct sm80_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm80_tuning { diff --git a/cub/cub/device/dispatch/tuning/tuning_scan.cuh b/cub/cub/device/dispatch/tuning/tuning_scan.cuh index eff4f29fcd2..dae9ce4c9c2 100644 --- a/cub/cub/device/dispatch/tuning/tuning_scan.cuh +++ b/cub/cub/device/dispatch/tuning/tuning_scan.cuh @@ -27,12 +27,19 @@ #pragma once +#include "../../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include #include #include -#include #include #include @@ -102,7 +109,7 @@ template struct sm90_tuning struct sm90_tuning : tuning<128, 24, 688, 1140> {}; template <> struct sm90_tuning : tuning<224, 24, 576, 1215> {}; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template <> struct sm90_tuning< __int128_t, primitive_op::yes, primitive_accum::no, accum_size::_16> : tuning<576, 21, 860, 630> {}; template <> struct sm90_tuning<__uint128_t, primitive_op::yes, primitive_accum::no, accum_size::_16> : tuning<576, 21, 860, 630> {}; #endif @@ -229,7 +236,7 @@ struct sm80_tuning<__uint128_t, primitive_op::yes, primitive_accum::no, accum_si } // namespace detail -template +template struct DeviceScanPolicy { // For large values, use timesliced loads/stores to fit shared memory. diff --git a/cub/cub/device/dispatch/tuning/tuning_scan_by_key.cuh b/cub/cub/device/dispatch/tuning/tuning_scan_by_key.cuh index 92e4931fe81..b6756c92a3d 100644 --- a/cub/cub/device/dispatch/tuning/tuning_scan_by_key.cuh +++ b/cub/cub/device/dispatch/tuning/tuning_scan_by_key.cuh @@ -27,12 +27,19 @@ #pragma once +#include "../../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include #include #include -#include #include #include #include @@ -169,7 +176,7 @@ struct sm90_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm90_tuning { @@ -255,7 +262,7 @@ struct sm90_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm90_tuning { @@ -341,7 +348,7 @@ struct sm90_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm90_tuning { @@ -427,7 +434,7 @@ struct sm90_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm90_tuning { @@ -513,7 +520,7 @@ struct sm90_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm90_tuning { @@ -627,7 +634,7 @@ struct sm80_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm80_tuning { @@ -713,7 +720,7 @@ struct sm80_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm80_tuning { @@ -799,7 +806,7 @@ struct sm80_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm80_tuning { @@ -885,7 +892,7 @@ struct sm80_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm80_tuning { @@ -971,7 +978,7 @@ struct sm80_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template struct sm80_tuning { diff --git a/cub/cub/device/dispatch/tuning/tuning_select_if.cuh b/cub/cub/device/dispatch/tuning/tuning_select_if.cuh index 41e5b34f5ae..865c376b739 100644 --- a/cub/cub/device/dispatch/tuning/tuning_select_if.cuh +++ b/cub/cub/device/dispatch/tuning/tuning_select_if.cuh @@ -27,20 +27,27 @@ #pragma once +#include "../../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include #include -#include #include #include CUB_NAMESPACE_BEGIN -namespace detail +namespace detail { -namespace select +namespace select { enum class flagged { no, yes }; @@ -152,7 +159,7 @@ struct sm90_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template <> struct sm90_tuning<__int128_t, flagged::no, keep_rejects::no, offset_size::_4, primitive::no, input_size::_16> { @@ -221,7 +228,7 @@ struct sm90_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template <> struct sm90_tuning<__int128_t, flagged::yes, keep_rejects::no, offset_size::_4, primitive::no, input_size::_16> { @@ -290,7 +297,7 @@ struct sm90_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template <> struct sm90_tuning<__int128_t, flagged::no, keep_rejects::yes, offset_size::_4, primitive::no, input_size::_16> { @@ -359,7 +366,7 @@ struct sm90_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template <> struct sm90_tuning<__int128_t, flagged::yes, keep_rejects::yes, offset_size::_4, primitive::no, input_size::_16> { @@ -450,7 +457,7 @@ struct sm80_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template <> struct sm80_tuning<__int128_t, flagged::no, keep_rejects::no, offset_size::_4, primitive::no, input_size::_16> { @@ -519,7 +526,7 @@ struct sm80_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template <> struct sm80_tuning<__int128_t, flagged::yes, keep_rejects::no, offset_size::_4, primitive::no, input_size::_16> { @@ -588,7 +595,7 @@ struct sm80_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template <> struct sm80_tuning<__int128_t, flagged::no, keep_rejects::yes, offset_size::_4, primitive::no, input_size::_16> { @@ -657,7 +664,7 @@ struct sm80_tuning; }; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template <> struct sm80_tuning<__int128_t, flagged::yes, keep_rejects::yes, offset_size::_4, primitive::no, input_size::_16> { diff --git a/cub/cub/device/dispatch/tuning/tuning_three_way_partition.cuh b/cub/cub/device/dispatch/tuning/tuning_three_way_partition.cuh index c4b09d8495f..0144c9c8f9d 100644 --- a/cub/cub/device/dispatch/tuning/tuning_three_way_partition.cuh +++ b/cub/cub/device/dispatch/tuning/tuning_three_way_partition.cuh @@ -27,11 +27,18 @@ #pragma once +#include "../../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include #include -#include #include #include #include diff --git a/cub/cub/device/dispatch/tuning/tuning_unique_by_key.cuh b/cub/cub/device/dispatch/tuning/tuning_unique_by_key.cuh index d16f770965b..32c9b05c3bd 100644 --- a/cub/cub/device/dispatch/tuning/tuning_unique_by_key.cuh +++ b/cub/cub/device/dispatch/tuning/tuning_unique_by_key.cuh @@ -27,11 +27,18 @@ #pragma once +#include "../../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include #include -#include #include #include #include @@ -716,7 +723,7 @@ struct DeviceUniqueByKeyPolicy detail::default_delay_constructor_t>; }; - struct DefaultTuning + struct DefaultTuning { static constexpr int INPUT_SIZE = sizeof(KeyT); enum diff --git a/cub/cub/grid/grid_barrier.cuh b/cub/cub/grid/grid_barrier.cuh index 063a2c395cd..516703cdbdb 100644 --- a/cub/cub/grid/grid_barrier.cuh +++ b/cub/cub/grid/grid_barrier.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,8 +33,15 @@ #pragma once -#include "../util_debug.cuh" #include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +#include "../util_debug.cuh" #include "../thread/thread_load.cuh" CUB_NAMESPACE_BEGIN @@ -195,13 +202,13 @@ public: // Allocate and initialize to zero retval = CubDebug(cudaMalloc((void**) &d_sync, sync_bytes)); - if (cudaSuccess != retval) + if (cudaSuccess != retval) { break; } retval = CubDebug(cudaMemset(d_sync, 0, new_sync_bytes)); - if (cudaSuccess != retval) + if (cudaSuccess != retval) { break; } diff --git a/cub/cub/grid/grid_even_share.cuh b/cub/cub/grid/grid_even_share.cuh index d2150511321..f86b885a5c8 100644 --- a/cub/cub/grid/grid_even_share.cuh +++ b/cub/cub/grid/grid_even_share.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -35,8 +35,13 @@ #pragma once #include "../config.cuh" -#include "../util_namespace.cuh" -#include "../util_macro.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../util_math.cuh" #include "../util_type.cuh" #include "grid_mapping.cuh" diff --git a/cub/cub/grid/grid_mapping.cuh b/cub/cub/grid/grid_mapping.cuh index b57f193deb8..3b4abf41bff 100644 --- a/cub/cub/grid/grid_mapping.cuh +++ b/cub/cub/grid/grid_mapping.cuh @@ -35,6 +35,13 @@ #include "../config.cuh" +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + + CUB_NAMESPACE_BEGIN diff --git a/cub/cub/grid/grid_queue.cuh b/cub/cub/grid/grid_queue.cuh index e1933e3d381..7a8f2887cce 100644 --- a/cub/cub/grid/grid_queue.cuh +++ b/cub/cub/grid/grid_queue.cuh @@ -33,7 +33,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/cub/cub/host/mutex.cuh b/cub/cub/host/mutex.cuh index 4ee40288452..22773be0014 100644 --- a/cub/cub/host/mutex.cuh +++ b/cub/cub/host/mutex.cuh @@ -33,9 +33,16 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include @@ -43,8 +50,8 @@ CUB_NAMESPACE_BEGIN /** - * Wraps std::mutex - * @deprecated [Since CUB 2.1.0] The `cub::Mutex` is deprecated and will be removed + * Wraps std::mutex + * @deprecated [Since CUB 2.1.0] The `cub::Mutex` is deprecated and will be removed * in a future release. Use `std::mutex` instead. */ struct CUB_DEPRECATED Mutex diff --git a/cub/cub/iterator/arg_index_input_iterator.cuh b/cub/cub/iterator/arg_index_input_iterator.cuh index 7ea860981e6..d895a53e72f 100644 --- a/cub/cub/iterator/arg_index_input_iterator.cuh +++ b/cub/cub/iterator/arg_index_input_iterator.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,10 +33,17 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include "../config.cuh" #include "../thread/thread_load.cuh" #include "../thread/thread_store.cuh" diff --git a/cub/cub/iterator/cache_modified_input_iterator.cuh b/cub/cub/iterator/cache_modified_input_iterator.cuh index 9a5936d5ac6..b42e5b3cb49 100644 --- a/cub/cub/iterator/cache_modified_input_iterator.cuh +++ b/cub/cub/iterator/cache_modified_input_iterator.cuh @@ -33,10 +33,17 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include "../config.cuh" #include "../thread/thread_load.cuh" #include "../thread/thread_store.cuh" diff --git a/cub/cub/iterator/cache_modified_output_iterator.cuh b/cub/cub/iterator/cache_modified_output_iterator.cuh index 91d4fc91a7e..92024af04d8 100644 --- a/cub/cub/iterator/cache_modified_output_iterator.cuh +++ b/cub/cub/iterator/cache_modified_output_iterator.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,12 +33,19 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include "../thread/thread_load.cuh" #include "../thread/thread_store.cuh" -#include "../config.cuh" #if (THRUST_VERSION >= 100700) // This iterator is compatible with Thrust API 1.7 and newer diff --git a/cub/cub/iterator/constant_input_iterator.cuh b/cub/cub/iterator/constant_input_iterator.cuh index 3de5123df34..38816f5cbe1 100644 --- a/cub/cub/iterator/constant_input_iterator.cuh +++ b/cub/cub/iterator/constant_input_iterator.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,12 +33,19 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include "../thread/thread_load.cuh" #include "../thread/thread_store.cuh" -#include "../config.cuh" #if (THRUST_VERSION >= 100700) // This iterator is compatible with Thrust API 1.7 and newer diff --git a/cub/cub/iterator/counting_input_iterator.cuh b/cub/cub/iterator/counting_input_iterator.cuh index 700455f420c..dc0108ac6f8 100644 --- a/cub/cub/iterator/counting_input_iterator.cuh +++ b/cub/cub/iterator/counting_input_iterator.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,12 +33,19 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include "../thread/thread_load.cuh" #include "../thread/thread_store.cuh" -#include "../config.cuh" #if (THRUST_VERSION >= 100700) // This iterator is compatible with Thrust API 1.7 and newer diff --git a/cub/cub/iterator/discard_output_iterator.cuh b/cub/cub/iterator/discard_output_iterator.cuh index ac47a3ff344..66e764412b5 100644 --- a/cub/cub/iterator/discard_output_iterator.cuh +++ b/cub/cub/iterator/discard_output_iterator.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,11 +33,17 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include "../config.cuh" - #if (THRUST_VERSION >= 100700) // This iterator is compatible with Thrust API 1.7 and newer #include diff --git a/cub/cub/iterator/tex_obj_input_iterator.cuh b/cub/cub/iterator/tex_obj_input_iterator.cuh index cd3d015aab8..24cdd165a34 100644 --- a/cub/cub/iterator/tex_obj_input_iterator.cuh +++ b/cub/cub/iterator/tex_obj_input_iterator.cuh @@ -33,7 +33,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/iterator/tex_ref_input_iterator.cuh b/cub/cub/iterator/tex_ref_input_iterator.cuh index 0d877e1db49..67217a0f803 100644 --- a/cub/cub/iterator/tex_ref_input_iterator.cuh +++ b/cub/cub/iterator/tex_ref_input_iterator.cuh @@ -33,7 +33,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/cub/cub/iterator/transform_input_iterator.cuh b/cub/cub/iterator/transform_input_iterator.cuh index 0b3350e88a4..de69a64ae76 100644 --- a/cub/cub/iterator/transform_input_iterator.cuh +++ b/cub/cub/iterator/transform_input_iterator.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,12 +33,19 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include "../thread/thread_load.cuh" #include "../thread/thread_store.cuh" -#include "../config.cuh" #if (THRUST_VERSION >= 100700) // This iterator is compatible with Thrust API 1.7 and newer diff --git a/cub/cub/thread/thread_load.cuh b/cub/cub/thread/thread_load.cuh index 0a8456898ec..fc83bbe8c3a 100644 --- a/cub/cub/thread/thread_load.cuh +++ b/cub/cub/thread/thread_load.cuh @@ -33,9 +33,16 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include "../config.cuh" #include "../util_ptx.cuh" #include "../util_type.cuh" diff --git a/cub/cub/thread/thread_operators.cuh b/cub/cub/thread/thread_operators.cuh index c6b097ea354..af1fe845b71 100644 --- a/cub/cub/thread/thread_operators.cuh +++ b/cub/cub/thread/thread_operators.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2022, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,10 +12,10 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; @@ -37,11 +37,20 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include +_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH #include +_CCCL_DIAG_SUPPRESS_DEPRECATED_POP #include #include @@ -164,8 +173,8 @@ struct ArgMax const KeyValuePair &b) const { // Mooch BUG (device reduce argmax gk110 3.2 million random fp32) - // return ((b.value > a.value) || - // ((a.value == b.value) && (b.key < a.key))) + // return ((b.value > a.value) || + // ((a.value == b.value) && (b.key < a.key))) // ? b : a; if ((b.value > a.value) || ((a.value == b.value) && (b.key < a.key))) @@ -282,14 +291,14 @@ public: /** * @brief Reduce-by-segment functor. * - * Given two cub::KeyValuePair inputs `a` and `b` and a binary associative - * combining operator `f(const T &x, const T &y)`, an instance of this functor - * returns a cub::KeyValuePair whose `key` field is `a.key + b.key`, and whose - * `value` field is either `b.value` if `b.key` is non-zero, or + * Given two cub::KeyValuePair inputs `a` and `b` and a binary associative + * combining operator `f(const T &x, const T &y)`, an instance of this functor + * returns a cub::KeyValuePair whose `key` field is `a.key + b.key`, and whose + * `value` field is either `b.value` if `b.key` is non-zero, or * `f(a.value, b.value)` otherwise. * - * ReduceBySegmentOp is an associative, non-commutative binary combining - * operator for input sequences of cub::KeyValuePair pairings. Such sequences + * ReduceBySegmentOp is an associative, non-commutative binary combining + * operator for input sequences of cub::KeyValuePair pairings. Such sequences * are typically used to represent a segmented set of values to be reduced * and a corresponding set of {0,1}-valued integer "head flags" demarcating the * first value of each segment. @@ -348,7 +357,7 @@ struct ReduceBySegmentOp // else { // The second partial reduction does not span a reset, so accumulate both // into the running aggregate - // } + // } retval.value = (second.key) ? second.value : op(first.value, second.value); #endif return retval; diff --git a/cub/cub/thread/thread_reduce.cuh b/cub/cub/thread/thread_reduce.cuh index 82042a17667..8384b0cc401 100644 --- a/cub/cub/thread/thread_reduce.cuh +++ b/cub/cub/thread/thread_reduce.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,9 +33,16 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../thread/thread_operators.cuh" #include "../detail/type_traits.cuh" -#include "../config.cuh" CUB_NAMESPACE_BEGIN @@ -50,7 +57,7 @@ template < typename T, typename ReductionOp, typename PrefixT, - typename AccumT = detail::accumulator_t> + typename AccumT = detail::accumulator_t> __device__ __forceinline__ AccumT ThreadReduce( T* input, ///< [in] Input array ReductionOp reduction_op, ///< [in] Binary reduction operator @@ -79,7 +86,7 @@ template < typename T, typename ReductionOp, typename PrefixT, - typename AccumT = detail::accumulator_t> + typename AccumT = detail::accumulator_t> __device__ __forceinline__ AccumT ThreadReduce( T* input, ///< [in] Input array ReductionOp reduction_op, ///< [in] Binary reduction operator @@ -121,7 +128,7 @@ template < typename T, typename ReductionOp, typename PrefixT, - typename AccumT = detail::accumulator_t> + typename AccumT = detail::accumulator_t> __device__ __forceinline__ AccumT ThreadReduce( T (&input)[LENGTH], ///< [in] Input array ReductionOp reduction_op, ///< [in] Binary reduction operator diff --git a/cub/cub/thread/thread_scan.cuh b/cub/cub/thread/thread_scan.cuh index b5e42710fcd..bc3840ec9c8 100644 --- a/cub/cub/thread/thread_scan.cuh +++ b/cub/cub/thread/thread_scan.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -34,6 +34,13 @@ #pragma once #include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../thread/thread_operators.cuh" CUB_NAMESPACE_BEGIN diff --git a/cub/cub/thread/thread_search.cuh b/cub/cub/thread/thread_search.cuh index 62b3cdb4e5d..e18caf09a09 100644 --- a/cub/cub/thread/thread_search.cuh +++ b/cub/cub/thread/thread_search.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,10 +33,17 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include -#include #include diff --git a/cub/cub/thread/thread_sort.cuh b/cub/cub/thread/thread_sort.cuh index 5d486789684..caeb22e7801 100644 --- a/cub/cub/thread/thread_sort.cuh +++ b/cub/cub/thread/thread_sort.cuh @@ -28,6 +28,13 @@ #pragma once #include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../util_ptx.cuh" #include "../util_type.cuh" diff --git a/cub/cub/thread/thread_store.cuh b/cub/cub/thread/thread_store.cuh index d1f055df158..9d24aa54ad9 100644 --- a/cub/cub/thread/thread_store.cuh +++ b/cub/cub/thread/thread_store.cuh @@ -33,7 +33,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/cub/cub/util_allocator.cuh b/cub/cub/util_allocator.cuh index 7dc12fb920e..8172dd919f8 100644 --- a/cub/cub/util_allocator.cuh +++ b/cub/cub/util_allocator.cuh @@ -33,6 +33,14 @@ #pragma once +#include "config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "util_namespace.cuh" #include "util_debug.cuh" @@ -453,13 +461,13 @@ struct CachingDeviceAllocator if (device != entrypoint_device) { error = CubDebug(cudaGetDevice(&entrypoint_device)); - if (cudaSuccess != error) + if (cudaSuccess != error) { return error; } error = CubDebug(cudaSetDevice(device)); - if (cudaSuccess != error) + if (cudaSuccess != error) { return error; } @@ -491,13 +499,13 @@ struct CachingDeviceAllocator // Free device memory and destroy stream event. error = CubDebug(cudaFree(block_itr->d_ptr)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } error = CubDebug(cudaEventDestroy(block_itr->ready_event)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -519,7 +527,7 @@ struct CachingDeviceAllocator // Try to allocate again error = CubDebug(cudaMalloc(&search_key.d_ptr, search_key.bytes)); - if (cudaSuccess != error) + if (cudaSuccess != error) { return error; } @@ -547,7 +555,7 @@ struct CachingDeviceAllocator if ((entrypoint_device != INVALID_DEVICE_ORDINAL) && (entrypoint_device != device)) { error = CubDebug(cudaSetDevice(entrypoint_device)); - if (cudaSuccess != error) + if (cudaSuccess != error) { return error; } @@ -639,13 +647,13 @@ struct CachingDeviceAllocator if (device != entrypoint_device) { error = CubDebug(cudaGetDevice(&entrypoint_device)); - if (cudaSuccess != error) + if (cudaSuccess != error) { return error; } error = CubDebug(cudaSetDevice(device)); - if (cudaSuccess != error) + if (cudaSuccess != error) { return error; } @@ -655,7 +663,7 @@ struct CachingDeviceAllocator { // Insert the ready event in the associated stream (must have current device set properly) error = CubDebug(cudaEventRecord(search_key.ready_event, search_key.associated_stream)); - if (cudaSuccess != error) + if (cudaSuccess != error) { return error; } @@ -665,13 +673,13 @@ struct CachingDeviceAllocator { // Free the allocation from the runtime and cleanup the event. error = CubDebug(cudaFree(d_ptr)); - if (cudaSuccess != error) + if (cudaSuccess != error) { return error; } error = CubDebug(cudaEventDestroy(search_key.ready_event)); - if (cudaSuccess != error) + if (cudaSuccess != error) { return error; } @@ -684,7 +692,7 @@ struct CachingDeviceAllocator if ((entrypoint_device != INVALID_DEVICE_ORDINAL) && (entrypoint_device != device)) { error = CubDebug(cudaSetDevice(entrypoint_device)); - if (cudaSuccess != error) + if (cudaSuccess != error) { return error; } @@ -728,7 +736,7 @@ struct CachingDeviceAllocator if (entrypoint_device == INVALID_DEVICE_ORDINAL) { error = CubDebug(cudaGetDevice(&entrypoint_device)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -738,7 +746,7 @@ struct CachingDeviceAllocator if (begin->device != current_device) { error = CubDebug(cudaSetDevice(begin->device)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -747,13 +755,13 @@ struct CachingDeviceAllocator // Free device memory error = CubDebug(cudaFree(begin->d_ptr)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } error = CubDebug(cudaEventDestroy(begin->ready_event)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } diff --git a/cub/cub/util_arch.cuh b/cub/cub/util_arch.cuh index d2506e93cfc..2a09635ac34 100644 --- a/cub/cub/util_arch.cuh +++ b/cub/cub/util_arch.cuh @@ -33,9 +33,17 @@ #pragma once -#include -#include -#include +#include "config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +#include "util_cpp_dialect.cuh" +#include "util_namespace.cuh" +#include "util_macro.cuh" // Legacy include; this functionality used to be defined in here. #include @@ -44,7 +52,7 @@ CUB_NAMESPACE_BEGIN #ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document -// \deprecated [Since 2.1.0] +// \deprecated [Since 2.1.0] #define CUB_USE_COOPERATIVE_GROUPS /// In device code, CUB_PTX_ARCH expands to the PTX version for which we are diff --git a/cub/cub/util_compiler.cuh b/cub/cub/util_compiler.cuh index 7cda3c44012..3286c07db43 100644 --- a/cub/cub/util_compiler.cuh +++ b/cub/cub/util_compiler.cuh @@ -32,6 +32,15 @@ #pragma once +// For _CCCL_IMPLICIT_SYSTEM_HEADER +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // enumerate host compilers we know about #define CUB_HOST_COMPILER_UNKNOWN 0 #define CUB_HOST_COMPILER_MSVC 1 diff --git a/cub/cub/util_cpp_dialect.cuh b/cub/cub/util_cpp_dialect.cuh index 693177974a2..81c01203fe0 100644 --- a/cub/cub/util_cpp_dialect.cuh +++ b/cub/cub/util_cpp_dialect.cuh @@ -31,6 +31,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "util_compiler.cuh" // Deprecation warnings may be silenced by defining the following macros. These diff --git a/cub/cub/util_debug.cuh b/cub/cub/util_debug.cuh index 5023524dd6e..4f7bdd86205 100644 --- a/cub/cub/util_debug.cuh +++ b/cub/cub/util_debug.cuh @@ -36,8 +36,13 @@ #pragma once -#include -#include +#include "config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include @@ -58,8 +63,8 @@ CUB_NAMESPACE_BEGIN /** * @def CUB_DEBUG_SYNC * - * Causes synchronization of the stream after every kernel launch to check - * for errors. Also causes kernel launch configurations to be printed to the + * Causes synchronization of the stream after every kernel launch to check + * for errors. Also causes kernel launch configurations to be printed to the * console. */ #define CUB_DEBUG_SYNC @@ -67,7 +72,7 @@ CUB_NAMESPACE_BEGIN /** * @def CUB_DEBUG_HOST_ASSERTIONS * - * Extends `CUB_DEBUG_SYNC` effects by checking host-side precondition + * Extends `CUB_DEBUG_SYNC` effects by checking host-side precondition * assertions. */ #define CUB_DEBUG_HOST_ASSERTIONS @@ -75,7 +80,7 @@ CUB_NAMESPACE_BEGIN /** * @def CUB_DEBUG_DEVICE_ASSERTIONS * - * Extends `CUB_DEBUG_HOST_ASSERTIONS` effects by checking device-side + * Extends `CUB_DEBUG_HOST_ASSERTIONS` effects by checking device-side * precondition assertions. */ #define CUB_DEBUG_DEVICE_ASSERTIONS @@ -83,14 +88,14 @@ CUB_NAMESPACE_BEGIN /** * @def CUB_DEBUG_ALL * - * Causes host and device-side precondition assertions to be checked. Apart - * from that, causes synchronization of the stream after every kernel launch to - * check for errors. Also causes kernel launch configurations to be printed to + * Causes host and device-side precondition assertions to be checked. Apart + * from that, causes synchronization of the stream after every kernel launch to + * check for errors. Also causes kernel launch configurations to be printed to * the console. */ #define CUB_DEBUG_ALL -#endif // DOXYGEN_SHOULD_SKIP_THIS +#endif // DOXYGEN_SHOULD_SKIP_THIS /** * \addtogroup UtilMgmt @@ -132,7 +137,7 @@ CUB_NAMESPACE_BEGIN // All #ifdef CUB_DEBUG_ALL -#define CUB_DETAIL_DEBUG_LEVEL CUB_DETAIL_DEBUG_LEVEL_ALL +#define CUB_DETAIL_DEBUG_LEVEL CUB_DETAIL_DEBUG_LEVEL_ALL #endif // Default case, no extra debugging: @@ -196,11 +201,11 @@ cudaError_t Debug(cudaError_t error, const char *filename, int line) cudaError_t last_error = cudaSuccess; NV_IF_TARGET( - NV_IS_HOST, + NV_IS_HOST, (last_error = cudaGetLastError();), (CUB_TEMP_DEVICE_CODE;) ); - + #undef CUB_TEMP_DEVICE_CODE // clang-format on diff --git a/cub/cub/util_deprecated.cuh b/cub/cub/util_deprecated.cuh index a988c9fca90..7b8834cc929 100644 --- a/cub/cub/util_deprecated.cuh +++ b/cub/cub/util_deprecated.cuh @@ -32,13 +32,17 @@ #pragma once +#include "config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include -#include -#include #include - #if defined(THRUST_IGNORE_DEPRECATED_API) && !defined(CUB_IGNORE_DEPRECATED_API) # define CUB_IGNORE_DEPRECATED_API #endif diff --git a/cub/cub/util_device.cuh b/cub/cub/util_device.cuh index c7e15cafe06..d8bb40cdcc4 100644 --- a/cub/cub/util_device.cuh +++ b/cub/cub/util_device.cuh @@ -37,14 +37,18 @@ #pragma once +#include "config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include -#include #include -#include -#include #include // for backward compatibility #include @@ -412,7 +416,7 @@ CUB_RUNTIME_FUNCTION inline cudaError_t SmVersionUncached(int& sm_version, int d { int major = 0, minor = 0; error = CubDebug(cudaDeviceGetAttribute(&major, cudaDevAttrComputeCapabilityMajor, device)); - if (cudaSuccess != error) + if (cudaSuccess != error) { break; } @@ -544,7 +548,7 @@ CUB_RUNTIME_FUNCTION inline cudaError_t HasUVA(bool& has_uva) cudaError_t error = cudaSuccess; int device = -1; error = CubDebug(cudaGetDevice(&device)); - if (cudaSuccess != error) + if (cudaSuccess != error) { return error; } diff --git a/cub/cub/util_macro.cuh b/cub/cub/util_macro.cuh index 73a97c44df4..99bd0165fe7 100644 --- a/cub/cub/util_macro.cuh +++ b/cub/cub/util_macro.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -32,15 +32,21 @@ #pragma once +#include "version.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include -#include // _LIBCUDACXX_HIDDEN, _LIBCUDACXX_{CLANG,GCC}_DIAGNOSTIC_IGNORED CUB_NAMESPACE_BEGIN - /** * \addtogroup UtilModule * @{ @@ -116,7 +122,7 @@ constexpr __host__ __device__ auto max CUB_PREVENT_MACRO_SUBSTITUTION(T &&t, #endif #ifndef CUB_DETAIL_KERNEL_ATTRIBUTES -#define CUB_DETAIL_KERNEL_ATTRIBUTES __global__ _LIBCUDACXX_HIDDEN +#define CUB_DETAIL_KERNEL_ATTRIBUTES CCCL_DETAIL_KERNEL_ATTRIBUTES #endif /** @@ -124,12 +130,12 @@ constexpr __host__ __device__ auto max CUB_PREVENT_MACRO_SUBSTITUTION(T &&t, * If defined, the default suppression of kernel visibility attribute warning is disabled. */ #if !defined(CUB_DISABLE_KERNEL_VISIBILITY_WARNING_SUPPRESSION) -_LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED("-Wattributes") -_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wattributes") -#if !defined(_LIBCUDACXX_COMPILER_NVHPC_CUDA) -_LIBCUDACXX_NVHPC_DIAGNOSTIC_IGNORED(attribute_requires_external_linkage) -#endif -#endif +_CCCL_DIAG_SUPPRESS_GCC("-Wattributes") +_CCCL_DIAG_SUPPRESS_CLANG("-Wattributes") +#if !defined(_CCCL_CUDA_COMPILER_NVHPC) +_CCCL_DIAG_SUPPRESS_NVHPC(attribute_requires_external_linkage) +#endif // !_CCCL_CUDA_COMPILER_NVHPC +#endif // !CUB_DISABLE_KERNEL_VISIBILITY_WARNING_SUPPRESSION /** @} */ // end group UtilModule diff --git a/cub/cub/util_math.cuh b/cub/cub/util_math.cuh index d69fc2ee2d5..018c2a615d5 100644 --- a/cub/cub/util_math.cuh +++ b/cub/cub/util_math.cuh @@ -32,10 +32,15 @@ #pragma once -#include +#include "config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC -#include "util_namespace.cuh" -#include "util_macro.cuh" +#include CUB_NAMESPACE_BEGIN diff --git a/cub/cub/util_namespace.cuh b/cub/cub/util_namespace.cuh index 27ff12dbbaa..5139c8a571b 100644 --- a/cub/cub/util_namespace.cuh +++ b/cub/cub/util_namespace.cuh @@ -38,7 +38,14 @@ // This is not used by this file; this is a hack so that we can detect the // CUB version from Thrust on older versions of CUB that did not have // version.cuh. -#include +#include "version.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include // Prior to 1.13.1, only the PREFIX/POSTFIX macros were used. Notify users diff --git a/cub/cub/util_ptx.cuh b/cub/cub/util_ptx.cuh index ff6fdb07f50..4c5d01e5e54 100644 --- a/cub/cub/util_ptx.cuh +++ b/cub/cub/util_ptx.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -34,14 +34,18 @@ #pragma once -#include "util_type.cuh" -#include "util_arch.cuh" -#include "util_namespace.cuh" -#include "util_debug.cuh" +#include "config.cuh" +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC -CUB_NAMESPACE_BEGIN +#include "util_debug.cuh" +#include "util_type.cuh" +CUB_NAMESPACE_BEGIN /** * \addtogroup UtilPtx @@ -163,7 +167,7 @@ __device__ __forceinline__ unsigned int BFE( return (source >> bit_start) & MASK; } -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED /** * Bitfield-extract for 128-bit types. */ @@ -328,7 +332,7 @@ __device__ __forceinline__ int WARP_BALLOT(int predicate, unsigned int member_m /** * Warp synchronous shfl_up */ -__device__ __forceinline__ +__device__ __forceinline__ unsigned int SHFL_UP_SYNC(unsigned int word, int src_offset, int flags, unsigned int member_mask) { asm volatile("shfl.sync.up.b32 %0, %1, %2, %3, %4;" @@ -339,7 +343,7 @@ unsigned int SHFL_UP_SYNC(unsigned int word, int src_offset, int flags, unsigned /** * Warp synchronous shfl_down */ -__device__ __forceinline__ +__device__ __forceinline__ unsigned int SHFL_DOWN_SYNC(unsigned int word, int src_offset, int flags, unsigned int member_mask) { asm volatile("shfl.sync.down.b32 %0, %1, %2, %3, %4;" @@ -350,7 +354,7 @@ unsigned int SHFL_DOWN_SYNC(unsigned int word, int src_offset, int flags, unsign /** * Warp synchronous shfl_idx */ -__device__ __forceinline__ +__device__ __forceinline__ unsigned int SHFL_IDX_SYNC(unsigned int word, int src_lane, int flags, unsigned int member_mask) { asm volatile("shfl.sync.idx.b32 %0, %1, %2, %3, %4;" @@ -361,7 +365,7 @@ unsigned int SHFL_IDX_SYNC(unsigned int word, int src_lane, int flags, unsigned /** * Warp synchronous shfl_idx */ -__device__ __forceinline__ +__device__ __forceinline__ unsigned int SHFL_IDX_SYNC(unsigned int word, int src_lane, unsigned int member_mask) { return __shfl_sync(member_mask, word, src_lane); @@ -395,7 +399,7 @@ __device__ __forceinline__ float FFMA_RZ(float a, float b, float c) */ __device__ __forceinline__ void ThreadExit() { asm volatile("exit;"); -} +} /** @@ -561,7 +565,7 @@ __device__ __forceinline__ T ShuffleUp( typedef typename UnitWord::ShuffleWord ShuffleWord; constexpr int WORDS = (sizeof(T) + sizeof(ShuffleWord) - 1) / sizeof(ShuffleWord); - + T output; ShuffleWord *output_alias = reinterpret_cast(&output); ShuffleWord *input_alias = reinterpret_cast(&input); @@ -728,26 +732,26 @@ __device__ __forceinline__ T ShuffleIndex( #ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document -namespace detail +namespace detail { -/** - * Implementation detail for `MatchAny`. It provides specializations for full and partial warps. - * For partial warps, inactive threads must be masked out. This is done in the partial warp - * specialization below. +/** + * Implementation detail for `MatchAny`. It provides specializations for full and partial warps. + * For partial warps, inactive threads must be masked out. This is done in the partial warp + * specialization below. * Usage: * ``` - * // returns a mask of threads with the same 4 least-significant bits of `label` + * // returns a mask of threads with the same 4 least-significant bits of `label` * // in a warp with 16 active threads - * warp_matcher_t<4, 16>::match_any(label); + * warp_matcher_t<4, 16>::match_any(label); * - * // returns a mask of threads with the same 4 least-significant bits of `label` + * // returns a mask of threads with the same 4 least-significant bits of `label` * // in a warp with 32 active threads (no extra work is done) - * warp_matcher_t<4, 32>::match_any(label); + * warp_matcher_t<4, 32>::match_any(label); * ``` */ template -struct warp_matcher_t +struct warp_matcher_t { static __device__ unsigned int match_any(unsigned int label) @@ -758,7 +762,7 @@ struct warp_matcher_t }; template -struct warp_matcher_t +struct warp_matcher_t { // match.any.sync.b32 is slower when matching a few bits diff --git a/cub/cub/util_temporary_storage.cuh b/cub/cub/util_temporary_storage.cuh index 588c554a32f..17548600a47 100644 --- a/cub/cub/util_temporary_storage.cuh +++ b/cub/cub/util_temporary_storage.cuh @@ -33,6 +33,14 @@ #pragma once +#include "config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/cub/cub/util_type.cuh b/cub/cub/util_type.cuh index 2beecbc892c..6fbe3413760 100644 --- a/cub/cub/util_type.cuh +++ b/cub/cub/util_type.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -33,6 +33,14 @@ #pragma once +#include "config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include @@ -48,11 +56,6 @@ #endif #include -#include -#include -#include -#include -#include #include @@ -1220,7 +1223,7 @@ template <> struct NumericTraits : BaseTraits struct NumericTraits : BaseTraits {}; -#if CUB_IS_INT128_ENABLED +#if CUB_IS_INT128_ENABLED template <> struct NumericTraits<__uint128_t> { diff --git a/cub/cub/version.cuh b/cub/cub/version.cuh index d51023912fa..9934b92eff9 100644 --- a/cub/cub/version.cuh +++ b/cub/cub/version.cuh @@ -35,6 +35,15 @@ #pragma once +// For _CCCL_IMPLICIT_SYSTEM_HEADER +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + /*! \def CUB_VERSION * \brief The preprocessor macro \p CUB_VERSION encodes the version * number of the CUB library. diff --git a/cub/cub/warp/specializations/warp_exchange_shfl.cuh b/cub/cub/warp/specializations/warp_exchange_shfl.cuh index fa73509b319..ae1327ee6c1 100644 --- a/cub/cub/warp/specializations/warp_exchange_shfl.cuh +++ b/cub/cub/warp/specializations/warp_exchange_shfl.cuh @@ -27,7 +27,14 @@ #pragma once -#include +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include @@ -51,7 +58,7 @@ class WarpExchangeShfl static constexpr bool IS_ARCH_WARP = LOGICAL_WARP_THREADS == CUB_WARP_THREADS(0); // concrete recursion class - template + template class CompileTimeArray : protected CompileTimeArray { protected: @@ -239,7 +246,7 @@ class WarpExchangeShfl }; // terminating partial specialization - template + template class CompileTimeArray { protected: diff --git a/cub/cub/warp/specializations/warp_exchange_smem.cuh b/cub/cub/warp/specializations/warp_exchange_smem.cuh index f1c2edce60f..fc9fcbc5939 100644 --- a/cub/cub/warp/specializations/warp_exchange_smem.cuh +++ b/cub/cub/warp/specializations/warp_exchange_smem.cuh @@ -33,7 +33,14 @@ #pragma once -#include +#include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/cub/cub/warp/specializations/warp_reduce_shfl.cuh b/cub/cub/warp/specializations/warp_reduce_shfl.cuh index ad6d2512f92..dd0e82bf0b2 100644 --- a/cub/cub/warp/specializations/warp_reduce_shfl.cuh +++ b/cub/cub/warp/specializations/warp_reduce_shfl.cuh @@ -34,6 +34,13 @@ #pragma once #include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../../thread/thread_operators.cuh" #include "../../util_ptx.cuh" #include "../../util_type.cuh" @@ -46,31 +53,31 @@ CUB_NAMESPACE_BEGIN -namespace detail +namespace detail { template -struct reduce_add_exists : ::cuda::std::false_type +struct reduce_add_exists : ::cuda::std::false_type {}; template -struct reduce_add_exists : ::cuda::std::true_type +struct reduce_add_exists : ::cuda::std::true_type {}; template -struct reduce_min_exists : ::cuda::std::false_type +struct reduce_min_exists : ::cuda::std::false_type {}; template -struct reduce_min_exists : ::cuda::std::true_type +struct reduce_min_exists : ::cuda::std::true_type {}; template -struct reduce_max_exists : ::cuda::std::false_type +struct reduce_max_exists : ::cuda::std::false_type {}; template -struct reduce_max_exists : ::cuda::std::true_type +struct reduce_max_exists : ::cuda::std::true_type {}; } @@ -419,7 +426,7 @@ struct WarpReduceShfl //--------------------------------------------------------------------- template __device__ __forceinline__ T ReduceImpl( - Int2Type<0> /* all_lanes_valid */, + Int2Type<0> /* all_lanes_valid */, T input, ///< [in] Calling thread's input int valid_items, ///< [in] Total number of valid items across the logical warp ReductionOp reduction_op) ///< [in] Binary reduction operator @@ -436,7 +443,7 @@ struct WarpReduceShfl template __device__ __forceinline__ T ReduceImpl( - Int2Type<1> /* all_lanes_valid */, + Int2Type<1> /* all_lanes_valid */, T input, ///< [in] Calling thread's input int /* valid_items */, ///< [in] Total number of valid items across the logical warp ReductionOp reduction_op) ///< [in] Binary reduction operator @@ -452,7 +459,7 @@ struct WarpReduceShfl } template - __device__ __forceinline__ + __device__ __forceinline__ typename std::enable_if< (std::is_same::value || std::is_same::value) && detail::reduce_add_exists<>::value, T>::type @@ -474,7 +481,7 @@ struct WarpReduceShfl } template - __device__ __forceinline__ + __device__ __forceinline__ typename std::enable_if< (std::is_same::value || std::is_same::value) && detail::reduce_min_exists<>::value, T>::type @@ -496,7 +503,7 @@ struct WarpReduceShfl } template - __device__ __forceinline__ + __device__ __forceinline__ typename std::enable_if< (std::is_same::value || std::is_same::value) && detail::reduce_max_exists<>::value, T>::type diff --git a/cub/cub/warp/specializations/warp_reduce_smem.cuh b/cub/cub/warp/specializations/warp_reduce_smem.cuh index 7ffb73a3c27..a2077940c7b 100644 --- a/cub/cub/warp/specializations/warp_reduce_smem.cuh +++ b/cub/cub/warp/specializations/warp_reduce_smem.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -34,6 +34,13 @@ #pragma once #include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../../thread/thread_operators.cuh" #include "../../thread/thread_load.cuh" #include "../../thread/thread_store.cuh" diff --git a/cub/cub/warp/specializations/warp_scan_shfl.cuh b/cub/cub/warp/specializations/warp_scan_shfl.cuh index c2988711c8d..81db566c184 100644 --- a/cub/cub/warp/specializations/warp_scan_shfl.cuh +++ b/cub/cub/warp/specializations/warp_scan_shfl.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -34,6 +34,13 @@ #pragma once #include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../../thread/thread_operators.cuh" #include "../../util_type.cuh" #include "../../util_ptx.cuh" diff --git a/cub/cub/warp/specializations/warp_scan_smem.cuh b/cub/cub/warp/specializations/warp_scan_smem.cuh index f5290e979a4..8f76b3c6253 100644 --- a/cub/cub/warp/specializations/warp_scan_smem.cuh +++ b/cub/cub/warp/specializations/warp_scan_smem.cuh @@ -1,7 +1,7 @@ /****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -12,7 +12,7 @@ * * Neither the name of the NVIDIA CORPORATION nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -34,6 +34,13 @@ #pragma once #include "../../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include "../../thread/thread_operators.cuh" #include "../../thread/thread_load.cuh" #include "../../thread/thread_store.cuh" diff --git a/cub/cub/warp/warp_exchange.cuh b/cub/cub/warp/warp_exchange.cuh index e863f67b103..9bb36bdfe6f 100644 --- a/cub/cub/warp/warp_exchange.cuh +++ b/cub/cub/warp/warp_exchange.cuh @@ -33,7 +33,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/warp/warp_load.cuh b/cub/cub/warp/warp_load.cuh index 424145588c2..4af6223c533 100644 --- a/cub/cub/warp/warp_load.cuh +++ b/cub/cub/warp/warp_load.cuh @@ -29,8 +29,15 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include #include diff --git a/cub/cub/warp/warp_merge_sort.cuh b/cub/cub/warp/warp_merge_sort.cuh index 3ad5dccd9c4..4da00d162c7 100644 --- a/cub/cub/warp/warp_merge_sort.cuh +++ b/cub/cub/warp/warp_merge_sort.cuh @@ -27,8 +27,15 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include diff --git a/cub/cub/warp/warp_reduce.cuh b/cub/cub/warp/warp_reduce.cuh index 2901f56bbcc..f00f13a5b06 100644 --- a/cub/cub/warp/warp_reduce.cuh +++ b/cub/cub/warp/warp_reduce.cuh @@ -34,7 +34,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/warp/warp_scan.cuh b/cub/cub/warp/warp_scan.cuh index feff7ffe69d..80df80a2356 100644 --- a/cub/cub/warp/warp_scan.cuh +++ b/cub/cub/warp/warp_scan.cuh @@ -34,7 +34,14 @@ #pragma once -#include +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/cub/cub/warp/warp_store.cuh b/cub/cub/warp/warp_store.cuh index d40e63e65ee..f3564e4315e 100644 --- a/cub/cub/warp/warp_store.cuh +++ b/cub/cub/warp/warp_store.cuh @@ -29,8 +29,15 @@ #pragma once +#include "../config.cuh" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include #include diff --git a/libcudacxx/.upstream-tests/utils/generate_feature_test_macro_components.py b/libcudacxx/.upstream-tests/utils/generate_feature_test_macro_components.py index 2f028627ac5..a0530a2de50 100755 --- a/libcudacxx/.upstream-tests/utils/generate_feature_test_macro_components.py +++ b/libcudacxx/.upstream-tests/utils/generate_feature_test_macro_components.py @@ -722,9 +722,11 @@ def produce_version_header(): #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if _LIBCUDACXX_STD_VER > 11 {cxx14_macros} diff --git a/libcudacxx/include/cuda/__cccl_config b/libcudacxx/include/cuda/__cccl_config new file mode 100644 index 00000000000..50c16356e10 --- /dev/null +++ b/libcudacxx/include/cuda/__cccl_config @@ -0,0 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _CUDA__CCCL_CONFIG +#define _CUDA__CCCL_CONFIG + +#include "std/detail/libcxx/include/__cccl_config" + +#endif // _CUDA__CCCL_CONFIG diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/CMakeLists.txt b/libcudacxx/include/cuda/std/detail/libcxx/include/CMakeLists.txt index 0cbf21f272a..bc2ba9881a2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/CMakeLists.txt +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/CMakeLists.txt @@ -6,6 +6,7 @@ set(files __bsd_locale_defaults.h __bsd_locale_fallbacks.h __errc + __cccl_config __concepts/__concept_macros.h __concepts/_One_of.h __concepts/arithmetic.h diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__algorithm/swap_ranges.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__algorithm/swap_ranges.h index fc315ba6285..52524acc387 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__algorithm/swap_ranges.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__algorithm/swap_ranges.h @@ -16,9 +16,11 @@ #include "../__utility/swap.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__assert b/libcudacxx/include/cuda/std/detail/libcxx/include/__assert index 1d3eea00d84..7d8d58f3eb2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__assert +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__assert @@ -17,9 +17,11 @@ #include "__verbose_abort" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC // This is for backwards compatibility with code that might have been enabling // assertions through the Debug mode previously. diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__availability b/libcudacxx/include/cuda/std/detail/libcxx/include/__availability index ef401c005c6..b90ebf1f278 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__availability +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__availability @@ -15,9 +15,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC // Libc++ is shipped by various vendors. In particular, it is used as a system // library on macOS, iOS and other Apple platforms. In order for users to be diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__bit_reference b/libcudacxx/include/cuda/std/detail/libcxx/include/__bit_reference index 6fe85cb956a..84411dfacda 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__bit_reference +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__bit_reference @@ -14,9 +14,11 @@ #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__bsd_locale_defaults.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__bsd_locale_defaults.h index 609865abd16..71ed40cff60 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__bsd_locale_defaults.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__bsd_locale_defaults.h @@ -14,9 +14,11 @@ #ifndef _LIBCUDACXX_BSD_LOCALE_DEFAULTS_H #define _LIBCUDACXX_BSD_LOCALE_DEFAULTS_H -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #define __libcpp_mb_cur_max_l(loc) MB_CUR_MAX_L(loc) #define __libcpp_btowc_l(ch, loc) btowc_l(ch, loc) diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__bsd_locale_fallbacks.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__bsd_locale_fallbacks.h index 58220977d76..128ced77337 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__bsd_locale_fallbacks.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__bsd_locale_fallbacks.h @@ -17,9 +17,11 @@ #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__cccl/visibility.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__cccl/visibility.h new file mode 100644 index 00000000000..b8e9d337414 --- /dev/null +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__cccl/visibility.h @@ -0,0 +1,46 @@ +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef __CCCL_VISIBILITY_H +#define __CCCL_VISIBILITY_H + +#ifndef __CCCL_CONFIG +#error "<__cccl/visibility.h> should only be included in from " +#endif // __CCCL_CONFIG + +// We want to ensure that all warning emmiting from this header are supressed +// We define cub and thrust kernels as hidden. However, this triggers errors about missing external linkage iff the +// definition of the _CCCL_ATTRIBUTE_HIDDEN macro is not in a system header :shrug: +#if defined(_CCCL_COMPILER_NVHPC) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_FORCE_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// For unknown reasons, nvc++ need to selectively disable this warning +// We do not want to use our usual macro because that would have push / pop semantics +#if defined(_CCCL_COMPILER_NVHPC) +#pragma nv_diag_suppress 1407 +#endif // _CCCL_COMPILER_NVHPC + +// Enable us to hide kernels +#if defined(_CCCL_COMPILER_MSVC) +# define _CCCL_ATTRIBUTE_HIDDEN +#elif defined(_CCCL_COMPILER_NVRTC) +# define _CCCL_ATTRIBUTE_HIDDEN +#else // ^^^ _CCCL_COMPILER_NVRTC ^^^ / vvv _CCCL_COMPILER_NVRTC vvv +# define _CCCL_ATTRIBUTE_HIDDEN __attribute__ ((__visibility__("hidden"))) +#endif // !_CCCL_COMPILER_NVRTC + +#if !defined(CCCL_DETAIL_KERNEL_ATTRIBUTES) +# define CCCL_DETAIL_KERNEL_ATTRIBUTES __global__ _CCCL_ATTRIBUTE_HIDDEN +#endif // !CCCL_DETAIL_KERNEL_ATTRIBUTES + +#endif // __CCCL_VISIBILITY_H diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__cccl_config b/libcudacxx/include/cuda/std/detail/libcxx/include/__cccl_config new file mode 100644 index 00000000000..49cafa2db2e --- /dev/null +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__cccl_config @@ -0,0 +1,166 @@ +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef __CCCL_CONFIG +#define __CCCL_CONFIG + +// Determine the host compiler +#if defined(__NVCOMPILER) +# define _CCCL_COMPILER_NVHPC +#elif defined(__clang__) +# define _CCCL_COMPILER_CLANG +#elif defined(__GNUC__) +# define _CCCL_COMPILER_GCC +#elif defined(_MSC_VER) +# define _CCCL_COMPILER_MSVC +#elif defined(__IBMCPP__) +# define _CCCL_COMPILER_IBM +#elif defined(__CUDACC_RTC__) +# define _CCCL_COMPILER_NVRTC +#endif + +// Convenient shortcut to determine which version of MSVC we are dealing with +#if defined(_CCCL_COMPILER_MSVC) +# if _MSC_VER < 1917 +# define _CCCL_COMPILER_MSVC_2017 +# elif _MSC_VER < 1930 +# define _CCCL_COMPILER_MSVC_2019 +# else // _MSC_VER < 1940 +# define _CCCL_COMPILER_MSVC_2022 +# endif // _MSC_VER < 1940 +#endif // _CCCL_COMPILER_MSVC + +// Determine the cuda compiler +#if defined(__NVCC__) +# define _CCCL_CUDA_COMPILER_NVCC +#elif defined(_NVHPC_CUDA) +# define _CCCL_CUDA_COMPILER_NVHPC +#elif defined(__CUDA__) && defined(_CCCL_COMPILER_CLANG) +# define _CCCL_CUDA_COMPILER_CLANG +#endif + +// Enforce that cccl headers are treated as system headers +#if defined(_CCCL_COMPILER_GCC) +# define _CCCL_FORCE_SYSTEM_HEADER _Pragma("GCC system_header") +#elif defined(_CCCL_COMPILER_CLANG) +# define _CCCL_FORCE_SYSTEM_HEADER _Pragma("clang system_header") +#elif defined(_CCCL_COMPILER_MSVC) +# define _CCCL_FORCE_SYSTEM_HEADER __pragma(system_header) +#elif defined(_CCCL_COMPILER_NVHPC) +# define _CCCL_FORCE_SYSTEM_HEADER _Pragma("GCC system_header") +#else +# define _CCCL_FORCE_SYSTEM_HEADER +#endif + +// Potentially enable that cccl headers are treated as system headers +#if defined(_CCCL_NO_SYSTEM_HEADER) +# define _CCCL_IMPLICIT_SYSTEM_HEADER +#elif defined(_CCCL_COMPILER_MSVC) \ + && defined(_LIBCUDACXX_DISABLE_PRAGMA_MSVC_WARNING) +# define _CCCL_IMPLICIT_SYSTEM_HEADER +#elif defined(_CCCL_COMPILER_NVRTC) +# define _CCCL_IMPLICIT_SYSTEM_HEADER +#elif defined(_LIBCUDACXX_DISABLE_PRAGMA_GCC_SYSTEM_HEADER) +# define _CCCL_IMPLICIT_SYSTEM_HEADER +#else +# define _CCCL_USE_IMPLICIT_SYSTEM_DEADER +# define _CCCL_IMPLICIT_SYSTEM_HEADER _CCCL_FORCE_SYSTEM_HEADER +#endif + +// We want to ensure that all warning emmiting from this header are supressed +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// Enable us to selectively silence host compiler warnings +#define _CCCL_TOSTRING2(_STR) #_STR +#define _CCCL_TOSTRING(_STR) _CCCL_TOSTRING2(_STR) +#ifdef _CCCL_COMPILER_CLANG +# define _CCCL_DIAG_PUSH _Pragma("clang diagnostic push") +# define _CCCL_DIAG_POP _Pragma("clang diagnostic pop") +# define _CCCL_DIAG_SUPPRESS_CLANG(str) _Pragma(_CCCL_TOSTRING(clang diagnostic ignored str)) +# define _CCCL_DIAG_SUPPRESS_GCC(str) +# define _CCCL_DIAG_SUPPRESS_NVHPC(str) +#elif defined(_CCCL_COMPILER_GCC) +# define _CCCL_DIAG_PUSH _Pragma("GCC diagnostic push") +# define _CCCL_DIAG_POP _Pragma("GCC diagnostic pop") +# define _CCCL_DIAG_SUPPRESS_CLANG(str) +# define _CCCL_DIAG_SUPPRESS_GCC(str) _Pragma(_CCCL_TOSTRING(GCC diagnostic ignored str)) +# define _CCCL_DIAG_SUPPRESS_NVHPC(str) +#elif defined(_CCCL_COMPILER_NVHPC) +# define _CCCL_DIAG_PUSH _Pragma("diagnostic push") +# define _CCCL_DIAG_POP _Pragma("diagnostic pop") +# define _CCCL_DIAG_SUPPRESS_CLANG(str) +# define _CCCL_DIAG_SUPPRESS_GCC(str) +# define _CCCL_DIAG_SUPPRESS_NVHPC(str) _Pragma(_LIBCUDACXX_TOSTRING(diag_suppress str)) +#else +# define _CCCL_DIAG_PUSH +# define _CCCL_DIAG_POP +# define _CCCL_DIAG_SUPPRESS_CLANG(str) +# define _CCCL_DIAG_SUPPRESS_GCC(str) +# define _CCCL_DIAG_SUPPRESS_NVHPC(str) +#endif + +// Convenient shortcuts to silence common warnings +#if defined(_CCCL_COMPILER_CLANG) +# define _CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH _CCCL_DIAG_PUSH \ + _CCCL_DIAG_SUPPRESS_CLANG("-Wdeprecated") \ + _CCCL_DIAG_SUPPRESS_CLANG("-Wdeprecated-declarations") +# define _CCCL_DIAG_SUPPRESS_DEPRECATED_POP _CCCL_DIAG_POP +#elif defined(_CCCL_COMPILER_GCC) +# define _CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH _CCCL_DIAG_PUSH \ + _CCCL_DIAG_SUPPRESS_GCC("-Wdeprecated") \ + _CCCL_DIAG_SUPPRESS_GCC("-Wdeprecated-declarations") +# define _CCCL_DIAG_SUPPRESS_DEPRECATED_POP _CCCL_DIAG_POP +#else // !_CCCL_COMPILER_CLANG && !_CCCL_COMPILER_GCC +# define _CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH +# define _CCCL_DIAG_SUPPRESS_DEPRECATED_POP +#endif // !_CCCL_COMPILER_CLANG && !_CCCL_COMPILER_GCC + +// Enable us to selectively silence cuda compiler warnings +#if defined(__CUDACC__) +# if !defined(_CCCL_CUDA_COMPILER_CLANG) +# define _CCCL_NV_DIAG_SUPPRESS(_WARNING) +# define _CCCL_NV_DIAG_DEFAULT(_WARNING) +# elif defined(__NVCC_DIAG_PRAGMA_SUPPORT__) +# if defined(_CCCL_COMPILER_MSVC) +# define _CCCL_NV_DIAG_SUPPRESS(_WARNING) __pragma(_CCCL_TOSTRING(nv_diag_suppress _WARNING)) +# define _CCCL_NV_DIAG_DEFAULT(_WARNING) __pragma(_CCCL_TOSTRING(nv_diag_default _WARNING)) +# else // ^^^ _CCCL_COMPILER_MSVC ^^^ / vvv !_CCCL_COMPILER_MSVC vvv +# define _CCCL_NV_DIAG_SUPPRESS(_WARNING) _Pragma(_CCCL_TOSTRING(nv_diagnostic push)) \ + _Pragma(_CCCL_TOSTRING(nv_diag_suppress _WARNING)) +# define _CCCL_NV_DIAG_DEFAULT(_WARNING) _Pragma(_CCCL_TOSTRING(nv_diagnostic pop)) +# endif // !_CCCL_COMPILER_MSVC +# elif defined(_CCCL_COMPILER_NVHPC) +# define _CCCL_NV_DIAG_SUPPRESS(_WARNING) _Pragma(_CCCL_TOSTRING(diagnostic push)) \ + _Pragma(_CCCL_TOSTRING(diag_suppress _WARNING)) +# define _CCCL_NV_DIAG_DEFAULT(_WARNING) _Pragma(_CCCL_TOSTRING(diagnostic pop)) +# else // ^^^ __NVCC_DIAG_PRAGMA_SUPPORT__ ^^^ / vvv !__NVCC_DIAG_PRAGMA_SUPPORT__ vvv +# if defined(_CCCL_COMPILER_MSVC_2017) // MSVC 2017 has issues with restoring the warning +# define _CCCL_NV_DIAG_SUPPRESS(_WARNING) __pragma(_CCCL_TOSTRING(diag_suppress _WARNING)) +# define _CCCL_NV_DIAG_DEFAULT(_WARNING) +# elif defined(_CCCL_COMPILER_MSVC) +# define _CCCL_NV_DIAG_SUPPRESS(_WARNING) __pragma(_CCCL_TOSTRING(diag_suppress _WARNING)) +# define _CCCL_NV_DIAG_DEFAULT(_WARNING) __pragma(_CCCL_TOSTRING(diag_default _WARNING)) +# else // ^^^ _CCCL_COMPILER_MSVC ^^^ / vvv !_CCCL_COMPILER_MSVC vvv +# define _CCCL_NV_DIAG_SUPPRESS(_WARNING) _Pragma(_CCCL_TOSTRING(diag_suppress _WARNING)) +# define _CCCL_NV_DIAG_DEFAULT(_WARNING) _Pragma(_CCCL_TOSTRING(diag_default _WARNING)) +# endif // !_CCCL_COMPILER_MSVC +# endif // !__NVCC_DIAG_PRAGMA_SUPPORT__ +#else // ^^^ __CUDACC__ ^^^ / vvv !__CUDACC__ vvv +# define _CCCL_NV_DIAG_SUPPRESS(_WARNING) +# define _CCCL_NV_DIAG_DEFAULT(_WARNING) +#endif // other compilers + +#include "__cccl/visibility.h" + +#endif // __CCCL_CONFIG diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/_One_of.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/_One_of.h index 3b9f9976017..aabfa399425 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/_One_of.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/_One_of.h @@ -18,9 +18,11 @@ #include "../__type_traits/disjunction.h" #include "../__type_traits/is_same.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/__concept_macros.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/__concept_macros.h index fb95cbf4552..347e2ae9b5a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/__concept_macros.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/__concept_macros.h @@ -18,6 +18,12 @@ #include <__config> #endif //__cuda_std__ +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if _LIBCUDACXX_STD_VER > 11 #define _LIBCUDACXX_PP_CAT_(_Xp, ...) _Xp##__VA_ARGS__ diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/arithmetic.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/arithmetic.h index eb0030bdf12..a05c05b0183 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/arithmetic.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/arithmetic.h @@ -22,9 +22,11 @@ #include "../__type_traits/is_signed.h" #include "../__type_traits/is_unsigned_integer.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/assignable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/assignable.h index b942a2bb0ef..bb5a0e3aadf 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/assignable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/assignable.h @@ -21,9 +21,11 @@ #include "../__type_traits/make_const_lvalue_ref.h" #include "../__utility/forward.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/boolean_testable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/boolean_testable.h index d1fa4ec7861..6ed6b8246c3 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/boolean_testable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/boolean_testable.h @@ -18,9 +18,11 @@ #include "../__concepts/convertible_to.h" #include "../__utility/forward.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/class_or_enum.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/class_or_enum.h index 6e6b2a5cc49..026e99af01e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/class_or_enum.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/class_or_enum.h @@ -20,9 +20,11 @@ #include "../__type_traits/is_union.h" #include "../__type_traits/remove_cvref.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/common_reference_with.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/common_reference_with.h index d0f8ef6d127..777a50f12ca 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/common_reference_with.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/common_reference_with.h @@ -21,9 +21,11 @@ #include "../__type_traits/copy_cv.h" #include "../__type_traits/copy_cvref.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/common_with.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/common_with.h index de51e0398dc..4ad58c4f20c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/common_with.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/common_with.h @@ -21,9 +21,11 @@ #include "../__type_traits/common_type.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/constructible.h index a0f33cb27d0..0443ebab28f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/constructible.h @@ -20,9 +20,11 @@ #include "../__type_traits/add_lvalue_reference.h" #include "../__type_traits/is_constructible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/convertible_to.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/convertible_to.h index b2a869dcd7c..85a1eea229d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/convertible_to.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/convertible_to.h @@ -18,9 +18,11 @@ #include "../__type_traits/is_convertible.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/copyable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/copyable.h index cd309f71e84..15ad7790030 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/copyable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/copyable.h @@ -19,9 +19,11 @@ #include "../__concepts/constructible.h" #include "../__concepts/movable.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/derived_from.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/derived_from.h index 1e92e5f2f13..571430b5341 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/derived_from.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/derived_from.h @@ -19,9 +19,11 @@ #include "../__type_traits/is_base_of.h" #include "../__type_traits/is_convertible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/destructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/destructible.h index 6a0ad1bff44..6e24a7bb899 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/destructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/destructible.h @@ -22,9 +22,11 @@ #include "../__type_traits/void_t.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/different_from.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/different_from.h index c4b146ded36..a99effd2e77 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/different_from.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/different_from.h @@ -18,9 +18,11 @@ #include "../__concepts/same_as.h" #include "../__type_traits/remove_cvref.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/equality_comparable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/equality_comparable.h index 821e6f4abcd..cfe374fce77 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/equality_comparable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/equality_comparable.h @@ -20,9 +20,11 @@ #include "../__type_traits/common_reference.h" #include "../__type_traits/make_const_lvalue_ref.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/invocable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/invocable.h index 44be8f5164d..227a9c2694b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/invocable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/invocable.h @@ -18,9 +18,11 @@ #include "../__functional/invoke.h" #include "../__utility/forward.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/movable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/movable.h index c72143f0c85..28d01625e4a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/movable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/movable.h @@ -20,9 +20,11 @@ #include "../__concepts/swappable.h" #include "../__type_traits/is_object.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/predicate.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/predicate.h index 946f7993d78..b88aab51641 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/predicate.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/predicate.h @@ -19,9 +19,11 @@ #include "../__concepts/invocable.h" #include "../__functional/invoke.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/regular.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/regular.h index 118e88c3018..05979362388 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/regular.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/regular.h @@ -18,9 +18,11 @@ #include "../__concepts/equality_comparable.h" #include "../__concepts/semiregular.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/relation.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/relation.h index 5e46686cdcb..c3ed2e90dc3 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/relation.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/relation.h @@ -17,9 +17,11 @@ #include "../__concepts/__concept_macros.h" #include "../__concepts/predicate.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/same_as.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/same_as.h index 039b09e2dad..0b4668a86a1 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/same_as.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/same_as.h @@ -17,9 +17,11 @@ #include "../__concepts/__concept_macros.h" #include "../__type_traits/is_same.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/semiregular.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/semiregular.h index 22663849435..46c3bca6d4d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/semiregular.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/semiregular.h @@ -18,9 +18,11 @@ #include "../__concepts/constructible.h" #include "../__concepts/copyable.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/swappable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/swappable.h index aa34fd55380..b5c1f1b666b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/swappable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/swappable.h @@ -31,9 +31,11 @@ #include "../__utility/forward.h" #include "../__utility/move.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if defined(_LIBCUDACXX_COMPILER_MSVC) _LIBCUDACXX_NV_DIAG_SUPPRESS(461) // nonstandard cast to array type ignored diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/totally_ordered.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/totally_ordered.h index 73b5e9991a8..d1973c7c80d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/totally_ordered.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__concepts/totally_ordered.h @@ -20,9 +20,11 @@ #include "../__type_traits/common_reference.h" #include "../__type_traits/make_const_lvalue_ref.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__config b/libcudacxx/include/cuda/std/detail/libcxx/include/__config index af8b95be7be..f71aa623243 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__config +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__config @@ -10,6 +10,14 @@ #ifndef _LIBCUDACXX_CONFIG #define _LIBCUDACXX_CONFIG +#include "__cccl_config" + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if defined(__NVCOMPILER) # define _LIBCUDACXX_COMPILER_NVHPC #elif defined(__clang__) @@ -76,20 +84,12 @@ #define _LIBCUDACXX_CUDACC_BELOW_12_3 #endif // defined(_LIBCUDACXX_CUDACC) && _LIBCUDACXX_CUDACC_VER < 1203000 -#if defined(_MSC_VER) && !defined(__clang__) +#if defined(_LIBCUDACXX_COMPILER_MSVC) # define _LIBCUDACXX_HAS_PRAGMA_MSVC_WARNING # if !defined(_LIBCUDACXX_DISABLE_PRAGMA_MSVC_WARNING) # define _LIBCUDACXX_USE_PRAGMA_MSVC_WARNING -# endif -#else -# if !defined(_LIBCUDACXX_DISABLE_PRAGMA_GCC_SYSTEM_HEADER) && !defined(_LIBCUDACXX_COMPILER_NVRTC) -# define _LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER -# endif -#endif - -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) -#pragma GCC system_header -#endif +# endif // !_LIBCUDACXX_DISABLE_PRAGMA_MSVC_WARNING +#endif // _LIBCUDACXX_COMPILER_MSVC #ifdef __cplusplus @@ -2245,7 +2245,7 @@ extern "C" _LIBCUDACXX_FUNC_VIS void __sanitizer_annotate_contiguous_container( #endif #if !defined(_LIBCUDACXX_DISABLE_EXEC_CHECK) -#if defined(_LIBCUDACXX_CUDACC) \ +#if defined(_LIBCUDACXX_CUDACC) \ && !defined(_LIBCUDACXX_COMPILER_NVRTC) \ && !defined(_LIBCUDACXX_COMPILER_NVHPC_CUDA) \ && !defined(_LIBCUDACXX_COMPILER_CLANG_CUDA) diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/atomic.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/atomic.h index 20249e8ffcd..9e53acce011 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/atomic.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/atomic.h @@ -15,9 +15,11 @@ #error "<__cuda/atomic> should only be included in from " #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_CUDA diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/barrier.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/barrier.h index bc7d992902f..115e57a27d9 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/barrier.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/barrier.h @@ -19,9 +19,11 @@ # error "CUDA synchronization primitives are only supported for sm_70 and up." #endif -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include "../cstdlib" // _LIBCUDACXX_UNREACHABLE #include "../__type_traits/void_t.h" // _CUDA_VSTD::__void_t diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/chrono.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/chrono.h index 346bf146edd..225123ff80c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/chrono.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/chrono.h @@ -17,9 +17,11 @@ #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/semaphore.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/semaphore.h index 25624f9ba74..0e7b9ae95c8 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/semaphore.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/semaphore.h @@ -15,9 +15,11 @@ #error "<__cuda/semaphore> should only be included in from " #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_CUDA diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__debug b/libcudacxx/include/cuda/std/detail/libcxx/include/__debug index 450ca1b2bc6..70f25f4241f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__debug +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__debug @@ -19,9 +19,11 @@ #include "__type_traits/is_constant_evaluated.h" #include "cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if defined(_LIBCUDACXX_ENABLE_DEBUG_MODE) && !defined(_LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY) # define _LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__errc b/libcudacxx/include/cuda/std/detail/libcxx/include/__errc index 03382fa8650..1143fcf7460 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__errc +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__errc @@ -103,9 +103,11 @@ enum class errc #include <__config> #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/bad_expected_access.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/bad_expected_access.h index fe5dc6e50b7..82880af230a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/bad_expected_access.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/bad_expected_access.h @@ -16,9 +16,11 @@ #include "../__utility/move.h" #include "../exception" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if _LIBCUDACXX_STD_VER > 11 diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/expected.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/expected.h index 07f11fc702b..39fce36d6da 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/expected.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/expected.h @@ -60,9 +60,11 @@ #include "../cstdlib" #include "../initializer_list" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if _LIBCUDACXX_STD_VER > 11 diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/expected_base.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/expected_base.h index b1744a258f9..26e911667d5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/expected_base.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/expected_base.h @@ -45,9 +45,11 @@ #include "../__utility/in_place.h" #include "../__utility/move.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if _LIBCUDACXX_STD_VER > 11 diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/unexpect.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/unexpect.h index 7dd8c52ebbc..f4a55f5bdd2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/unexpect.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/unexpect.h @@ -13,9 +13,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if _LIBCUDACXX_STD_VER > 11 diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/unexpected.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/unexpected.h index afefdb4ab51..d8529a04344 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/unexpected.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/unexpected.h @@ -31,9 +31,11 @@ #include "../initializer_list" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binary_function.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binary_function.h index e476e68c076..25751f5be0b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binary_function.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binary_function.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD @@ -43,6 +45,7 @@ template struct __binary_function_keep #if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) _LIBCUDACXX_DIAGNOSTIC_PUSH _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations") +_LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations") template using __binary_function = binary_function<_Arg1, _Arg2, _Result>; _LIBCUDACXX_DIAGNOSTIC_POP diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binary_negate.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binary_negate.h index 3adaaa2dd01..96d72a5515d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binary_negate.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binary_negate.h @@ -17,9 +17,11 @@ #include "../__functional/binary_function.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/bind.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/bind.h index c90edb81439..1d7f9d38125 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/bind.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/bind.h @@ -41,9 +41,11 @@ #include "../cstddef" #include "../tuple" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/bind_back.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/bind_back.h index a9a4a889664..9d7b7eddc1d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/bind_back.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/bind_back.h @@ -28,9 +28,11 @@ #include "../tuple" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/bind_front.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/bind_front.h index c73800b366e..0ee3921c118 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/bind_front.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/bind_front.h @@ -25,9 +25,11 @@ #include "../__type_traits/is_nothrow_constructible.h" #include "../__utility/forward.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binder1st.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binder1st.h index 094b92cd972..702187d0197 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binder1st.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binder1st.h @@ -17,9 +17,11 @@ #include "../__functional/unary_function.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binder2nd.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binder2nd.h index e02ce01a771..f8238309f7c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binder2nd.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/binder2nd.h @@ -17,9 +17,11 @@ #include "../__functional/unary_function.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/compose.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/compose.h index b1ab0445856..6a61be4e4ee 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/compose.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/compose.h @@ -20,9 +20,11 @@ #include "../__type_traits/decay.h" #include "../__utility/forward.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/default_searcher.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/default_searcher.h index 3b76674073f..1e7a5cd7b2b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/default_searcher.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/default_searcher.h @@ -21,9 +21,11 @@ #include "../__iterator/iterator_traits.h" #include "../__utility/pair.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/function.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/function.h index c031d7dd2e7..14707ceb605 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/function.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/function.h @@ -44,9 +44,11 @@ #include "../__utility/swap.h" #include "../tuple" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/hash.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/hash.h index fc9e1d66fe0..4ed859a0379 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/hash.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/hash.h @@ -31,9 +31,11 @@ #include "../__utility/swap.h" #include "../cstdint" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifndef __cuda_std__ diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/identity.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/identity.h index 9e2a532bb25..b1a2d4116ce 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/identity.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/identity.h @@ -17,9 +17,11 @@ #include "../__utility/forward.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/invoke.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/invoke.h index b4d327d924a..95ebdae81f6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/invoke.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/invoke.h @@ -33,9 +33,11 @@ #include "../__utility/declval.h" #include "../__utility/forward.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC // TODO: Disentangle the type traits and _CUDA_VSTD::invoke properly diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/is_transparent.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/is_transparent.h index 997718aa72f..42b512ef1ec 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/is_transparent.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/is_transparent.h @@ -18,9 +18,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/void_t.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/mem_fn.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/mem_fn.h index 6f51ca939f4..6f9674e5b1c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/mem_fn.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/mem_fn.h @@ -20,9 +20,11 @@ #include "../__functional/weak_result_type.h" #include "../__utility/forward.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/mem_fun_ref.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/mem_fun_ref.h index 105adbff6e4..ad2e6ec1146 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/mem_fun_ref.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/mem_fun_ref.h @@ -18,9 +18,11 @@ #include "../__functional/binary_function.h" #include "../__functional/unary_function.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/not_fn.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/not_fn.h index d36a7d6cb73..31e48c544ec 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/not_fn.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/not_fn.h @@ -23,9 +23,11 @@ #include "../__type_traits/is_move_constructible.h" #include "../__utility/forward.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/operations.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/operations.h index a4400bf43d1..5c35a84a307 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/operations.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/operations.h @@ -19,9 +19,11 @@ #include "../__functional/unary_function.h" #include "../__utility/forward.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/perfect_forward.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/perfect_forward.h index 6e20b2f79f7..a84212a0cb2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/perfect_forward.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/perfect_forward.h @@ -27,9 +27,11 @@ #include "../tuple" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/pointer_to_binary_function.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/pointer_to_binary_function.h index d76f447e4b4..72c46a411a4 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/pointer_to_binary_function.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/pointer_to_binary_function.h @@ -17,9 +17,11 @@ #include "../__functional/binary_function.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/pointer_to_unary_function.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/pointer_to_unary_function.h index eb87609f8b6..a528d8c5c2b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/pointer_to_unary_function.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/pointer_to_unary_function.h @@ -17,9 +17,11 @@ #include "../__functional/unary_function.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/ranges_operations.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/ranges_operations.h index 172522b891e..210ce402a3e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/ranges_operations.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/ranges_operations.h @@ -18,9 +18,11 @@ #include "../__concepts/totally_ordered.h" #include "../__utility/forward.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if _LIBCUDACXX_STD_VER > 14 diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/reference_wrapper.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/reference_wrapper.h index a9cb9a37da5..c8e3c0f7e7e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/reference_wrapper.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/reference_wrapper.h @@ -17,9 +17,11 @@ #include "../__functional/weak_result_type.h" #include "../__memory/addressof.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/unary_function.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/unary_function.h index f6b27e71a00..6545c451f33 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/unary_function.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/unary_function.h @@ -13,9 +13,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD @@ -40,6 +42,7 @@ template struct __unary_function_keep_layout_base { #if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) _LIBCUDACXX_DIAGNOSTIC_PUSH _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations") +_LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations") template using __unary_function = unary_function<_Arg, _Result>; _LIBCUDACXX_DIAGNOSTIC_POP diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/unary_negate.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/unary_negate.h index 601c2728229..2a6adfd5e97 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/unary_negate.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/unary_negate.h @@ -17,9 +17,11 @@ #include "../__functional/unary_function.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/unwrap_ref.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/unwrap_ref.h index 291de09f111..c0f522ede1a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/unwrap_ref.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/unwrap_ref.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/weak_result_type.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/weak_result_type.h index 1b131530677..911263b8331 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/weak_result_type.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional/weak_result_type.h @@ -21,9 +21,11 @@ #include "../__type_traits/is_same.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional_base b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional_base index 1c35dd55dfa..dc28633036e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__functional_base +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__functional_base @@ -32,9 +32,11 @@ #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/array.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/array.h index af3240d40bb..9161771b523 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/array.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/array.h @@ -16,9 +16,11 @@ #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/get.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/get.h index 69b3a53fe13..2d68f304009 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/get.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/get.h @@ -20,9 +20,11 @@ #include "../__tuple_dir/tuple_element.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) -# pragma GCC system_header -#endif +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/hash.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/hash.h index 67cef524e45..16df8ee9d6a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/hash.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/hash.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/memory_resource.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/memory_resource.h index fe6b74d38ac..130da942a52 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/memory_resource.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/memory_resource.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/pair.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/pair.h index eeb3b0a9bc2..7d19a66520e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/pair.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/pair.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/span.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/span.h index 10d19205499..06b3a667e98 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/span.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/span.h @@ -17,9 +17,11 @@ #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/string.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/string.h index a24c849692e..5a408b7df5f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/string.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/string.h @@ -16,9 +16,11 @@ #include "../__fwd/memory_resource.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/string_view.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/string_view.h index e82026ddd74..670de6771c2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/string_view.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/string_view.h @@ -17,9 +17,11 @@ #include "../__fwd/string.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/tuple.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/tuple.h index 981325e8a38..7fbf47e9174 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/tuple.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__fwd/tuple.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__hash_table b/libcudacxx/include/cuda/std/detail/libcxx/include/__hash_table index ce7c46cf6f6..899800339c5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__hash_table +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__hash_table @@ -22,9 +22,11 @@ #include "__assert" // all public C++ headers provide the assertion handler #include "__debug" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/access.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/access.h index 946b20e03e1..248ec11f575 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/access.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/access.h @@ -17,9 +17,11 @@ #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/advance.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/advance.h index e8e52742cb0..a9257b833a9 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/advance.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/advance.h @@ -19,9 +19,11 @@ #include "../__iterator/iterator_traits.h" #include "../cstdlib" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/back_insert_iterator.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/back_insert_iterator.h index 455a344305b..8d62a4e9b32 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/back_insert_iterator.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/back_insert_iterator.h @@ -21,9 +21,11 @@ #include "../__utility/move.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/bounded_iter.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/bounded_iter.h index 924279e4c96..adb69566e8e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/bounded_iter.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/bounded_iter.h @@ -22,9 +22,11 @@ #include "../__type_traits/is_convertible.h" #include "../__utility/move.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/concepts.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/concepts.h index 2cf3bd4fdd6..7b0cee8406c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/concepts.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/concepts.h @@ -45,9 +45,11 @@ #include "../__type_traits/remove_cvref.h" #include "../__type_traits/void_t.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/data.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/data.h index 433a56478a8..4d2bda2bed7 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/data.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/data.h @@ -18,9 +18,11 @@ #include "../cstddef" #include "../initializer_list" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/default_sentinel.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/default_sentinel.h index 0ee17a956c3..f1859e1a413 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/default_sentinel.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/default_sentinel.h @@ -15,9 +15,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/distance.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/distance.h index e0b0cad4a79..d4cd2de3128 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/distance.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/distance.h @@ -17,9 +17,11 @@ #include "../__iterator/iterator_traits.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/empty.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/empty.h index 3aebeafafb5..7a2a655f80d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/empty.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/empty.h @@ -18,9 +18,11 @@ #include "../cstddef" #include "../initializer_list" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/erase_if_container.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/erase_if_container.h index ec26718362c..31160203a6c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/erase_if_container.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/erase_if_container.h @@ -15,9 +15,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/front_insert_iterator.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/front_insert_iterator.h index 873ae3686aa..0fdde41a2db 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/front_insert_iterator.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/front_insert_iterator.h @@ -21,9 +21,11 @@ #include "../__utility/move.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/incrementable_traits.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/incrementable_traits.h index f935531c907..be3c3488923 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/incrementable_traits.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/incrementable_traits.h @@ -27,9 +27,11 @@ #include "../__utility/declval.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/indirectly_comparable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/indirectly_comparable.h index ce0f4626a17..f787950ca67 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/indirectly_comparable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/indirectly_comparable.h @@ -19,9 +19,11 @@ #include "../__iterator/concepts.h" #include "../__iterator/projected.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/insert_iterator.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/insert_iterator.h index da3d7bac8e7..f0b3716a96f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/insert_iterator.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/insert_iterator.h @@ -21,9 +21,11 @@ #include "../__utility/move.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/istream_iterator.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/istream_iterator.h index 62e48d19c09..6e97e0aa71b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/istream_iterator.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/istream_iterator.h @@ -20,9 +20,11 @@ #include "../cstddef" #include "../iosfwd" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/istreambuf_iterator.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/istreambuf_iterator.h index 9a9695490ec..63a4845b9b3 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/istreambuf_iterator.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/istreambuf_iterator.h @@ -19,9 +19,11 @@ #include "../__iterator/iterator_traits.h" #include "../iosfwd" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iter_move.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iter_move.h index dfed7fd63b6..6b326cf8c3e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iter_move.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iter_move.h @@ -24,9 +24,11 @@ #include "../__utility/forward.h" #include "../__utility/move.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if defined(__clang__) #pragma clang diagnostic push diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iter_swap.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iter_swap.h index c4ca7624cc0..8bc0c8dbe05 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iter_swap.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iter_swap.h @@ -24,9 +24,11 @@ #include "../__utility/forward.h" #include "../__utility/move.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if _LIBCUDACXX_STD_VER > 14 diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iterator.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iterator.h index a22b37161c8..f9289e79da6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iterator.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iterator.h @@ -17,9 +17,11 @@ #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iterator_traits.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iterator_traits.h index 64851ce5403..4b5340d0353 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iterator_traits.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/iterator_traits.h @@ -32,9 +32,11 @@ #include "../__type_traits/void_t.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/mergeable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/mergeable.h index 069d3fd0f2d..1af14cf573a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/mergeable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/mergeable.h @@ -20,9 +20,11 @@ #include "../__iterator/concepts.h" #include "../__iterator/projected.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/move_iterator.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/move_iterator.h index 989cba4bcb5..91813072c13 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/move_iterator.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/move_iterator.h @@ -22,9 +22,11 @@ #include "../__type_traits/remove_reference.h" #include "../__utility/move.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/move_sentinel.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/move_sentinel.h index c8f3f16a521..56530cdce9b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/move_sentinel.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/move_sentinel.h @@ -19,9 +19,11 @@ #include "../__concepts/semiregular.h" #include "../__utility/move.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if _LIBCUDACXX_STD_VER > 14 diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/next.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/next.h index 3ea7022f82e..ef24e788a0f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/next.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/next.h @@ -20,9 +20,11 @@ #include "../__iterator/iterator_traits.h" #include "../__type_traits/enable_if.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/ostream_iterator.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/ostream_iterator.h index 4e2e3bf89e7..6bd59d3ce5e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/ostream_iterator.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/ostream_iterator.h @@ -21,9 +21,11 @@ #include "../cstddef" #include "../iosfwd" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/ostreambuf_iterator.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/ostreambuf_iterator.h index 3e284ad919a..99d2222de7a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/ostreambuf_iterator.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/ostreambuf_iterator.h @@ -20,9 +20,11 @@ #include "../cstddef" #include "../iosfwd" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/permutable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/permutable.h index 2c751c6d0e3..3c5a0eb4ff5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/permutable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/permutable.h @@ -18,9 +18,11 @@ #include "../__iterator/concepts.h" #include "../__iterator/iter_swap.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/prev.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/prev.h index 2a429366222..63deb9faa76 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/prev.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/prev.h @@ -20,9 +20,11 @@ #include "../__iterator/iterator_traits.h" #include "../__type_traits/enable_if.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/projected.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/projected.h index bb872119bb9..c19a22405a4 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/projected.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/projected.h @@ -19,9 +19,11 @@ #include "../__type_traits/enable_if.h" #include "../__type_traits/remove_cvref.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/readable_traits.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/readable_traits.h index d6679c41d86..fb540ace1c9 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/readable_traits.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/readable_traits.h @@ -27,9 +27,11 @@ #include "../__type_traits/remove_extent.h" #include "../__type_traits/void_t.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/reverse_access.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/reverse_access.h index 6b9140a3609..d68adaed755 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/reverse_access.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/reverse_access.h @@ -19,9 +19,11 @@ #include "../cstddef" #include "../initializer_list" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/reverse_iterator.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/reverse_iterator.h index dfcfaa36e0b..ba68afb5215 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/reverse_iterator.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/reverse_iterator.h @@ -20,9 +20,11 @@ #include "../__memory/addressof.h" #include "../__type_traits/void_t.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/size.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/size.h index ed52da48aca..aca8f78ac95 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/size.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/size.h @@ -19,9 +19,11 @@ #include "../__type_traits/make_signed.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/sortable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/sortable.h index 42d4c1ac078..135954960f3 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/sortable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/sortable.h @@ -21,9 +21,11 @@ #include "../__iterator/permutable.h" #include "../__iterator/projected.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/unreachable_sentinel.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/unreachable_sentinel.h index a10ccb4719a..46cb67acd2c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/unreachable_sentinel.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/unreachable_sentinel.h @@ -18,9 +18,11 @@ #include "../__iterator/concepts.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if _LIBCUDACXX_STD_VER > 14 diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/wrap_iter.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/wrap_iter.h index 63dec48fa7e..5375661e814 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/wrap_iter.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/wrap_iter.h @@ -23,9 +23,11 @@ #include "../__type_traits/is_convertible.h" #include "../__type_traits/is_trivially_copy_assignable.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__locale b/libcudacxx/include/cuda/std/detail/libcxx/include/__locale index 749a25ce19e..c8fc12ba5ec 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__locale +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__locale @@ -42,9 +42,11 @@ # include #endif -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/compressed_pair.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/compressed_pair.h index 07fe2bdd55e..6c7cb6fa976 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/compressed_pair.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/compressed_pair.h @@ -55,9 +55,11 @@ #include "../__type_traits/enable_if.h" #include "../__type_traits/is_empty.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/default_accessor.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/default_accessor.h index 45f87823de1..52a3a88a93b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/default_accessor.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/default_accessor.h @@ -52,9 +52,11 @@ #include "../__type_traits/is_convertible.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/dynamic_extent.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/dynamic_extent.h index 0fb760c9f2d..bcfb9b24273 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/dynamic_extent.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/dynamic_extent.h @@ -53,7 +53,7 @@ #include "../cstddef" #include "../limits" // numeric_limits -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#ifdef _LIBCUDACXX_IMPLICIT_SYSTEM_HEADER #endif _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/extents.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/extents.h index a827c49ce5a..707438e643c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/extents.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/extents.h @@ -64,9 +64,11 @@ #include "../cstddef" #include "../span" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if defined(_LIBCUDACXX_PUSH_MACROS) _LIBCUDACXX_PUSH_MACROS diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/full_extent_t.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/full_extent_t.h index 294ba6c6af8..45d9b45e179 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/full_extent_t.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/full_extent_t.h @@ -50,9 +50,11 @@ #include "../__mdspan/macros.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/layout_left.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/layout_left.h index febe3f86ec5..cc70c3d9634 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/layout_left.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/layout_left.h @@ -58,9 +58,11 @@ #include "../__utility/integer_sequence.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/layout_right.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/layout_right.h index 74ad81f92fa..a7c037b317f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/layout_right.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/layout_right.h @@ -58,9 +58,11 @@ #include "../__utility/integer_sequence.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/layout_stride.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/layout_stride.h index b5ef97af4db..f7ab6b88546 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/layout_stride.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/layout_stride.h @@ -70,9 +70,11 @@ #include "../numeric" #include "../span" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/macros.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/macros.h index 0a14f21debf..7bad432c40f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/macros.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/macros.h @@ -55,9 +55,11 @@ #include "../__type_traits/remove_reference.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if _LIBCUDACXX_STD_VER > 11 diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/maybe_static_value.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/maybe_static_value.h index a6a41aca872..0070e063a35 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/maybe_static_value.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/maybe_static_value.h @@ -54,9 +54,11 @@ #include "../__mdspan/no_unique_address.h" #endif -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC // This is only needed for the non-standard-layout version of partially // static array. diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/mdspan.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/mdspan.h index 37cc94c732c..19f84739cd7 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/mdspan.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/mdspan.h @@ -69,9 +69,11 @@ #include "../array" #include "../span" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/no_unique_address.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/no_unique_address.h index c26892f031c..4d071531b89 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/no_unique_address.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/no_unique_address.h @@ -54,9 +54,11 @@ #include "../__type_traits/is_trivially_destructible.h" #include "../__utility/move.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/standard_layout_static_array.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/standard_layout_static_array.h index 13d9c89f0ec..f58f2dfa394 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/standard_layout_static_array.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/standard_layout_static_array.h @@ -60,9 +60,11 @@ #include "../cstddef" #include "../span" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/static_array.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/static_array.h index 84df90d64c1..ed707f69d12 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/static_array.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/static_array.h @@ -58,9 +58,11 @@ #include "../array" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if !__MDSPAN_PRESERVE_STANDARD_LAYOUT diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/submdspan.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/submdspan.h index b551fab61a8..60071147ba2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/submdspan.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/submdspan.h @@ -67,9 +67,11 @@ #include "../__utility/pair.h" #include "../tuple" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/type_list.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/type_list.h index 95fb3a3c6c1..10ca0c3bc73 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/type_list.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/type_list.h @@ -51,9 +51,11 @@ #include "../__mdspan/macros.h" #include "../__utility/integer_sequence.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/addressof.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/addressof.h index 758bf1fe090..93e6b0c8971 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/addressof.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/addressof.h @@ -15,9 +15,11 @@ #include <__config> #endif //__cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/construct_at.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/construct_at.h index a0577fac227..9171ba2fffe 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/construct_at.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/construct_at.h @@ -27,14 +27,16 @@ #include "../__utility/forward.h" #include "../__utility/move.h" +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #ifdef _LIBCUDACXX_COMPILER_CLANG_CUDA #include #endif // _LIBCUDACXX_COMPILER_CLANG_CUDA -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) -#pragma GCC system_header -#endif - #if defined(__cuda_std__) && _LIBCUDACXX_STD_VER > 17 // need to backfill ::std::construct_at #ifndef _LIBCUDACXX_COMPILER_NVRTC #include diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/pointer_traits.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/pointer_traits.h index eed321f7432..781c629ef71 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/pointer_traits.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/pointer_traits.h @@ -27,9 +27,11 @@ #include "../__utility/declval.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/voidify.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/voidify.h index e487b3f3af7..9b7ffb135f8 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/voidify.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__memory/voidify.h @@ -17,9 +17,11 @@ #include "../__memory/addressof.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mutex_base b/libcudacxx/include/cuda/std/detail/libcxx/include/__mutex_base index 9208ca23c0a..e09afba6848 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mutex_base +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mutex_base @@ -17,9 +17,11 @@ #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__node_handle b/libcudacxx/include/cuda/std/detail/libcxx/include/__node_handle index 63791cdafa3..d6c3c35ec0b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__node_handle +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__node_handle @@ -15,9 +15,11 @@ #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__nullptr b/libcudacxx/include/cuda/std/detail/libcxx/include/__nullptr index 153f88f1cf6..0fe93766dcc 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__nullptr +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__nullptr @@ -12,9 +12,11 @@ #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifdef _LIBCUDACXX_HAS_NO_NULLPTR diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__pragma_push b/libcudacxx/include/cuda/std/detail/libcxx/include/__pragma_push index ad34a38d936..9b4ee961937 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__pragma_push +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__pragma_push @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#ifdef _LIBCUDACXX_IMPLICIT_SYSTEM_HEADER #pragma GCC system_header #endif diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__split_buffer b/libcudacxx/include/cuda/std/detail/libcxx/include/__split_buffer index 3f5757ab82c..b4d861cd3b4 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__split_buffer +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__split_buffer @@ -6,9 +6,11 @@ #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__sso_allocator b/libcudacxx/include/cuda/std/detail/libcxx/include/__sso_allocator index 94f774df415..05479a6807f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__sso_allocator +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__sso_allocator @@ -14,9 +14,11 @@ #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__std_stream b/libcudacxx/include/cuda/std/detail/libcxx/include/__std_stream index 996db038734..603051531f9 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__std_stream +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__std_stream @@ -16,9 +16,11 @@ #include <__locale> #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__string b/libcudacxx/include/cuda/std/detail/libcxx/include/__string index 972355e8bd8..558dd690d80 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__string +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__string @@ -60,9 +60,11 @@ template <> struct char_traits; // c++20 #include "__assert" // all public C++ headers provide the assertion handler #include <__debug> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__threading_support b/libcudacxx/include/cuda/std/detail/libcxx/include/__threading_support index c383adcfb4f..8a5b2c98af3 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__threading_support +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__threading_support @@ -27,9 +27,11 @@ #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if defined(_LIBCUDACXX_HAS_THREAD_API_EXTERNAL) # ifndef __cuda_std__ diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__tree b/libcudacxx/include/cuda/std/detail/libcxx/include/__tree index af65a06a04d..63b9963eeec 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__tree +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__tree @@ -16,9 +16,11 @@ #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/apply_cv.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/apply_cv.h index ff670542dda..48292d4bb27 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/apply_cv.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/apply_cv.h @@ -19,9 +19,11 @@ #include "../__type_traits/is_volatile.h" #include "../__type_traits/remove_reference.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) -# pragma GCC system_header -#endif +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/make_tuple_types.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/make_tuple_types.h index 6c3a4d1482f..e119fab819f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/make_tuple_types.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/make_tuple_types.h @@ -25,9 +25,11 @@ #include "../__type_traits/remove_reference.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) -# pragma GCC system_header -#endif +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/sfinae_helpers.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/sfinae_helpers.h index 77993f05b57..c22f2065b55 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/sfinae_helpers.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/sfinae_helpers.h @@ -30,9 +30,11 @@ #include "../__type_traits/remove_reference.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) -# pragma GCC system_header -#endif +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_element.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_element.h index d2b3bdd4f67..a0c64d9cd15 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_element.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_element.h @@ -21,9 +21,11 @@ #include "../__type_traits/add_volatile.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) -# pragma GCC system_header -#endif +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_indices.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_indices.h index 67787321c90..350e8df0a65 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_indices.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_indices.h @@ -17,9 +17,11 @@ #include "../__utility/integer_sequence.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) -# pragma GCC system_header -#endif +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_like.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_like.h index 8557bd56162..566d49ada3d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_like.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_like.h @@ -21,9 +21,11 @@ #include "../__type_traits/integral_constant.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) -# pragma GCC system_header -#endif +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_size.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_size.h index 74c8ebd1bcc..85bf46d1945 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_size.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_size.h @@ -22,9 +22,11 @@ #include "../__type_traits/is_volatile.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) -# pragma GCC system_header -#endif +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_types.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_types.h index c98f7f23c35..389cf889126 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_types.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__tuple_dir/tuple_types.h @@ -14,9 +14,11 @@ # include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) -# pragma GCC system_header -#endif +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_const.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_const.h index 0c97b01dad9..ab3dc037d62 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_const.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_const.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_cv.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_cv.h index 3836cd4985d..24cf172c531 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_cv.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_cv.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_lvalue_reference.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_lvalue_reference.h index 404fdba123b..10fc9c2878e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_lvalue_reference.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_lvalue_reference.h @@ -16,9 +16,11 @@ #include "../__type_traits/is_referenceable.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_pointer.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_pointer.h index dc5f7b1e7ab..fba8cbb8425 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_pointer.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_pointer.h @@ -20,9 +20,11 @@ #include "../__type_traits/remove_cv.h" #include "../__type_traits/remove_reference.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_rvalue_reference.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_rvalue_reference.h index 18ee9487f78..d4273a04323 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_rvalue_reference.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_rvalue_reference.h @@ -16,9 +16,11 @@ #include "../__type_traits/is_referenceable.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_volatile.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_volatile.h index 28c89838c72..438806a1af2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_volatile.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/add_volatile.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/aligned_storage.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/aligned_storage.h index 07f874edc06..dceabc43ec5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/aligned_storage.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/aligned_storage.h @@ -19,9 +19,11 @@ #include "../__type_traits/type_list.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/aligned_union.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/aligned_union.h index d441ada18a4..f216765c95e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/aligned_union.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/aligned_union.h @@ -18,9 +18,11 @@ #include "../__type_traits/integral_constant.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/alignment_of.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/alignment_of.h index 7838428480e..16b8e36cbbc 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/alignment_of.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/alignment_of.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/apply_cv.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/apply_cv.h index ec25ca1841b..14ca61f6433 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/apply_cv.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/apply_cv.h @@ -19,9 +19,11 @@ #include "../__type_traits/remove_reference.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/can_extract_key.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/can_extract_key.h index 1f8aab7858d..e0789f42a6b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/can_extract_key.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/can_extract_key.h @@ -21,9 +21,11 @@ #include "../__type_traits/remove_const.h" #include "../__type_traits/remove_const_ref.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/common_reference.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/common_reference.h index 42833313f07..812a21fbafb 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/common_reference.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/common_reference.h @@ -31,9 +31,11 @@ #include "../__type_traits/void_t.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/common_type.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/common_type.h index e52e77d09eb..270b411f9f4 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/common_type.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/common_type.h @@ -20,9 +20,11 @@ #include "../__type_traits/void_t.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/conditional.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/conditional.h index 8419631b483..aa776667203 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/conditional.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/conditional.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/conjunction.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/conjunction.h index 9bfb91f00a7..8c602450d37 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/conjunction.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/conjunction.h @@ -18,9 +18,11 @@ #include "../__type_traits/enable_if.h" #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/copy_cv.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/copy_cv.h index 4b6b4b97402..75eb8644fcb 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/copy_cv.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/copy_cv.h @@ -18,9 +18,11 @@ #include "../__type_traits/add_cv.h" #include "../__type_traits/add_volatile.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/copy_cvref.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/copy_cvref.h index d75a0e9043d..8205dc3fe85 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/copy_cvref.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/copy_cvref.h @@ -18,9 +18,11 @@ #include "../__type_traits/add_rvalue_reference.h" #include "../__type_traits/copy_cv.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/decay.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/decay.h index c5ef28403be..bb8d449a26d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/decay.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/decay.h @@ -23,9 +23,11 @@ #include "../__type_traits/remove_extent.h" #include "../__type_traits/remove_reference.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/dependent_type.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/dependent_type.h index a1b04a1c470..faca9d784f6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/dependent_type.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/dependent_type.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/disjunction.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/disjunction.h index 931763c6f92..8cff53cf9a6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/disjunction.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/disjunction.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/enable_if.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/enable_if.h index 3b41a8474da..e3fe02bb277 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/enable_if.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/enable_if.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/extent.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/extent.h index 1fc4d8b9727..7bbf6a9d42b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/extent.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/extent.h @@ -18,9 +18,11 @@ #include "../__type_traits/integral_constant.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/has_unique_object_representation.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/has_unique_object_representation.h index be8dd4c0d29..5f21ebd4b97 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/has_unique_object_representation.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/has_unique_object_representation.h @@ -18,9 +18,11 @@ #include "../__type_traits/remove_all_extents.h" #include "../__type_traits/remove_cv.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/has_virtual_destructor.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/has_virtual_destructor.h index 776d3a4747d..9f62201263c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/has_virtual_destructor.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/has_virtual_destructor.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/integral_constant.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/integral_constant.h index 79d27bbae78..a008ca9642e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/integral_constant.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/integral_constant.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_abstract.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_abstract.h index 503f0366976..53ee5a68238 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_abstract.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_abstract.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_aggregate.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_aggregate.h index cfd9731c6cc..84b515e80b1 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_aggregate.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_aggregate.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_allocator.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_allocator.h index 130578d8eea..9e9cb2bf32b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_allocator.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_allocator.h @@ -19,9 +19,11 @@ #include "../__utility/declval.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_arithmetic.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_arithmetic.h index c30c89c9e17..9e84dab5c19 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_arithmetic.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_arithmetic.h @@ -18,9 +18,11 @@ #include "../__type_traits/is_floating_point.h" #include "../__type_traits/is_integral.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_array.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_array.h index d290a77159d..82b24fe3c3a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_array.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_array.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_assignable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_assignable.h index d2486b38b90..ba577332a45 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_assignable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_assignable.h @@ -18,9 +18,11 @@ #include "../__type_traits/is_void.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_base_of.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_base_of.h index 7726973421a..a6857826424 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_base_of.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_base_of.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_bounded_array.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_bounded_array.h index 45ac57dab12..694063647ef 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_bounded_array.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_bounded_array.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_callable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_callable.h index 173d84b520e..6d03b6d2a98 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_callable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_callable.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_char_like_type.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_char_like_type.h index cacc3383046..d49b17a5d42 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_char_like_type.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_char_like_type.h @@ -18,9 +18,11 @@ #include "../__type_traits/is_standard_layout.h" #include "../__type_traits/is_trivial.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_class.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_class.h index 1e08722cfa9..703fc9c3bb0 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_class.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_class.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/is_union.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_compound.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_compound.h index 44dd92282a9..d1e20ba3374 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_compound.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_compound.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/is_fundamental.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_const.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_const.h index fd695a83ca6..24f4687bd2e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_const.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_const.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_constant_evaluated.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_constant_evaluated.h index 2744c851bf5..3b91dabd176 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_constant_evaluated.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_constant_evaluated.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h index 599fd644609..0f3b41dac1b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h @@ -26,9 +26,11 @@ #include "../__type_traits/remove_cvref.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_convertible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_convertible.h index 9506d86c4c8..080928beefc 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_convertible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_convertible.h @@ -23,9 +23,11 @@ #include "../__utility/declval.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_copy_assignable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_copy_assignable.h index 09739c1f563..4acf903e415 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_copy_assignable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_copy_assignable.h @@ -18,9 +18,11 @@ #include "../__type_traits/add_lvalue_reference.h" #include "../__type_traits/is_assignable.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_copy_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_copy_constructible.h index 470c88e4ed1..37cb709f50d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_copy_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_copy_constructible.h @@ -18,9 +18,11 @@ #include "../__type_traits/add_lvalue_reference.h" #include "../__type_traits/is_constructible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_core_convertible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_core_convertible.h index 7f63d93dfb0..f4ab6b26c27 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_core_convertible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_core_convertible.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_default_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_default_constructible.h index 4dd528d0df0..988b1f9b6ae 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_default_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_default_constructible.h @@ -16,9 +16,11 @@ #include "../__type_traits/is_constructible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_destructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_destructible.h index b5bdede7426..59af3f3ab6e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_destructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_destructible.h @@ -20,9 +20,11 @@ #include "../__type_traits/remove_all_extents.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_empty.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_empty.h index ac334191a79..54f99c4f5f1 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_empty.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_empty.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_enum.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_enum.h index 979815395a2..9e7f1482311 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_enum.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_enum.h @@ -26,9 +26,11 @@ #include "../__type_traits/is_union.h" #include "../__type_traits/is_void.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_final.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_final.h index 6d9ff1781d0..42056c53fff 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_final.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_final.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_floating_point.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_floating_point.h index 430c18326a2..fee4d040d69 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_floating_point.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_floating_point.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/remove_cv.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_function.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_function.h index b52d8cfabc3..17de151f89f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_function.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_function.h @@ -18,9 +18,11 @@ #include "../__type_traits/is_const.h" #include "../__type_traits/is_reference.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_fundamental.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_fundamental.h index 08006183b0f..c2ff42c8ab6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_fundamental.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_fundamental.h @@ -19,9 +19,11 @@ #include "../__type_traits/is_null_pointer.h" #include "../__type_traits/is_void.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_implicitly_default_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_implicitly_default_constructible.h index 7f314ab586c..0564e5b05e4 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_implicitly_default_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_implicitly_default_constructible.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/is_default_constructible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_integral.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_integral.h index b03da44a648..0c5303be6f6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_integral.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_integral.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/remove_cv.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_literal_type.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_literal_type.h index 3f74f164f20..25f1675d5b8 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_literal_type.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_literal_type.h @@ -19,9 +19,11 @@ #include "../__type_traits/is_scalar.h" #include "../__type_traits/remove_all_extents.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_member_function_pointer.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_member_function_pointer.h index 95c7fb1253d..eee3802f843 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_member_function_pointer.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_member_function_pointer.h @@ -19,9 +19,11 @@ #include "../__type_traits/remove_cv.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_member_object_pointer.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_member_object_pointer.h index 40055e9caf2..642df0fe977 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_member_object_pointer.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_member_object_pointer.h @@ -18,9 +18,11 @@ #include "../__type_traits/is_member_function_pointer.h" #include "../__type_traits/remove_cv.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_member_pointer.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_member_pointer.h index 00d3c74b8c9..7023e637cb7 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_member_pointer.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_member_pointer.h @@ -18,9 +18,11 @@ #include "../__type_traits/is_member_function_pointer.h" #include "../__type_traits/remove_cv.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_move_assignable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_move_assignable.h index 5d7697c34f4..5b049e5c601 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_move_assignable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_move_assignable.h @@ -18,9 +18,11 @@ #include "../__type_traits/add_rvalue_reference.h" #include "../__type_traits/is_assignable.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_move_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_move_constructible.h index 4a976a6c951..6d58e0b82bf 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_move_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_move_constructible.h @@ -18,9 +18,11 @@ #include "../__type_traits/add_rvalue_reference.h" #include "../__type_traits/is_constructible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_assignable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_assignable.h index e1d8e030f29..97a5f766a45 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_assignable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_assignable.h @@ -19,9 +19,11 @@ #include "../__type_traits/is_scalar.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_constructible.h index 6a2e3b3c21b..8541a4bef91 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_constructible.h @@ -19,9 +19,11 @@ #include "../__type_traits/is_scalar.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_convertible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_convertible.h index 660a73ac450..bbd398dad7b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_convertible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_convertible.h @@ -22,9 +22,11 @@ #include "../__type_traits/lazy.h" #include "../__utility/declval.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_copy_assignable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_copy_assignable.h index 36eacc318d8..68bf4cef285 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_copy_assignable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_copy_assignable.h @@ -18,9 +18,11 @@ #include "../__type_traits/add_lvalue_reference.h" #include "../__type_traits/is_nothrow_assignable.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_copy_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_copy_constructible.h index b0421b5533f..3f5302834fc 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_copy_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_copy_constructible.h @@ -18,9 +18,11 @@ #include "../__type_traits/add_lvalue_reference.h" #include "../__type_traits/is_nothrow_constructible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_default_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_default_constructible.h index 8543041c3ac..9d407025adf 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_default_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_default_constructible.h @@ -16,9 +16,11 @@ #include "../__type_traits/is_nothrow_constructible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_destructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_destructible.h index 760151584a5..e8f843181dd 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_destructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_destructible.h @@ -22,9 +22,11 @@ #include "../__utility/declval.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_move_assignable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_move_assignable.h index 834d3bf99bd..a2d3caaf934 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_move_assignable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_move_assignable.h @@ -18,9 +18,11 @@ #include "../__type_traits/add_rvalue_reference.h" #include "../__type_traits/is_nothrow_assignable.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_move_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_move_constructible.h index f8dc72d0ab4..57cf7fabcd6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_move_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_move_constructible.h @@ -17,9 +17,11 @@ #include "../__type_traits/add_rvalue_reference.h" #include "../__type_traits/is_nothrow_constructible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_null_pointer.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_null_pointer.h index 0782df40a61..fb9874052fc 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_null_pointer.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_null_pointer.h @@ -18,9 +18,11 @@ #include "../__type_traits/remove_cv.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_object.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_object.h index 477cb111de5..7be9b3b7afd 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_object.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_object.h @@ -20,9 +20,11 @@ #include "../__type_traits/is_scalar.h" #include "../__type_traits/is_union.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_pod.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_pod.h index 0758bee19f4..5ec7f7bd39d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_pod.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_pod.h @@ -21,9 +21,11 @@ #include "../__type_traits/is_trivially_destructible.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_pointer.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_pointer.h index 5e6f0478373..2eff37ba0fc 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_pointer.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_pointer.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/remove_cv.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_polymorphic.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_polymorphic.h index 67c65ca6022..7fa80ec8467 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_polymorphic.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_polymorphic.h @@ -17,9 +17,11 @@ #include "../__type_traits/enable_if.h" #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_primary_template.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_primary_template.h index 62489fd8d0b..bdff70f97da 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_primary_template.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_primary_template.h @@ -19,9 +19,11 @@ #include "../__type_traits/is_valid_expansion.h" #include "../__type_traits/void_t.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_reference.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_reference.h index f0a9b712e60..3b79fb89c3e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_reference.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_reference.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_reference_wrapper.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_reference_wrapper.h index 55859fae2d5..f2d73a359c9 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_reference_wrapper.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_reference_wrapper.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/remove_cv.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_referenceable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_referenceable.h index 7f965e94022..8d61a50c59e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_referenceable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_referenceable.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/is_same.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_same.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_same.h index 1fc3a4de6e9..ec24fa50ef9 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_same.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_same.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_scalar.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_scalar.h index 3fef34b4452..ee43b1b3269 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_scalar.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_scalar.h @@ -22,9 +22,11 @@ #include "../__type_traits/is_pointer.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_scoped_enum.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_scoped_enum.h index 65c2b3c14bc..94a530b11f5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_scoped_enum.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_scoped_enum.h @@ -19,9 +19,11 @@ #include "../__type_traits/is_enum.h" #include "../__type_traits/underlying_type.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_signed.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_signed.h index a74507c2994..e7f2c1543f2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_signed.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_signed.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/is_arithmetic.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_signed_integer.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_signed_integer.h index 68b4e4c9485..bbaba0140b2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_signed_integer.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_signed_integer.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_standard_layout.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_standard_layout.h index 11322fd91d1..bf367af2e6d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_standard_layout.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_standard_layout.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_swappable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_swappable.h index 2a0e9f9858b..79a875993d8 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_swappable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_swappable.h @@ -28,9 +28,11 @@ #include "../__utility/declval.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivial.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivial.h index 0b4b0752d89..0f79032f701 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivial.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivial.h @@ -18,9 +18,11 @@ #include "../__type_traits/is_trivially_copyable.h" #include "../__type_traits/is_trivially_default_constructible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_assignable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_assignable.h index 8175c259a50..5adb13e4878 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_assignable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_assignable.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/is_scalar.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_constructible.h index 6f1d3e6d74c..0e7ab17cdb4 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_constructible.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/is_scalar.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_copy_assignable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_copy_assignable.h index 87edfd5a891..7af35798147 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_copy_assignable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_copy_assignable.h @@ -18,9 +18,11 @@ #include "../__type_traits/add_lvalue_reference.h" #include "../__type_traits/is_trivially_assignable.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_copy_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_copy_constructible.h index e9405bb9d74..c659dc65b78 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_copy_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_copy_constructible.h @@ -18,9 +18,11 @@ #include "../__type_traits/add_lvalue_reference.h" #include "../__type_traits/is_trivially_constructible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_copyable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_copyable.h index f593aec0c4a..213eaeee173 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_copyable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_copyable.h @@ -18,9 +18,11 @@ #include "../__type_traits/is_scalar.h" #include "../__type_traits/remove_all_extents.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_default_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_default_constructible.h index c1332492f52..844b14b198d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_default_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_default_constructible.h @@ -16,9 +16,11 @@ #include "../__type_traits/is_trivially_constructible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_destructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_destructible.h index daf3edbd943..45b718791bd 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_destructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_destructible.h @@ -20,9 +20,11 @@ #include "../__type_traits/is_scalar.h" #include "../__type_traits/remove_all_extents.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_move_assignable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_move_assignable.h index 65775913143..30d002e79e9 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_move_assignable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_move_assignable.h @@ -18,9 +18,11 @@ #include "../__type_traits/add_rvalue_reference.h" #include "../__type_traits/is_trivially_assignable.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_move_constructible.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_move_constructible.h index 814981fd71d..99ecf5f13d7 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_move_constructible.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_trivially_move_constructible.h @@ -17,9 +17,11 @@ #include "../__type_traits/add_rvalue_reference.h" #include "../__type_traits/is_trivially_constructible.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_unbounded_array.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_unbounded_array.h index e272fc0719b..28563057dae 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_unbounded_array.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_unbounded_array.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_union.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_union.h index 71e76287847..655f4984d32 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_union.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_union.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../__type_traits/remove_cv.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_unsigned.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_unsigned.h index 47a10ea575c..551ba0b14d5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_unsigned.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_unsigned.h @@ -18,9 +18,11 @@ #include "../__type_traits/is_arithmetic.h" #include "../__type_traits/is_integral.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_unsigned_integer.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_unsigned_integer.h index 2a27c7c3f86..5cf645c9572 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_unsigned_integer.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_unsigned_integer.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_valid_expansion.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_valid_expansion.h index 985e25a6e29..f7ce4fb7f61 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_valid_expansion.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_valid_expansion.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_void.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_void.h index fb034c4345c..ff8987f5949 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_void.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_void.h @@ -18,9 +18,11 @@ #include "../__type_traits/is_same.h" #include "../__type_traits/remove_cvref.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_volatile.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_volatile.h index 95fbed6326a..b0c8698089e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_volatile.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/is_volatile.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/lazy.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/lazy.h index f54bf4dd77d..9982483380f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/lazy.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/lazy.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_32_64_or_128_bit.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_32_64_or_128_bit.h index 0ac1cb676ef..90f0efe55ac 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_32_64_or_128_bit.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_32_64_or_128_bit.h @@ -21,9 +21,11 @@ #include "../__type_traits/make_unsigned.h" #include "../cstdint" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_const_lvalue_ref.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_const_lvalue_ref.h index 4d8e6b6a4cb..30248365aa2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_const_lvalue_ref.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_const_lvalue_ref.h @@ -16,9 +16,11 @@ #include "../__type_traits/remove_reference.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_signed.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_signed.h index 14b5ab42c51..eee78f5a504 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_signed.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_signed.h @@ -21,9 +21,11 @@ #include "../__type_traits/remove_cv.h" #include "../__type_traits/type_list.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_unsigned.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_unsigned.h index edb074ec646..e4a8648f8eb 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_unsigned.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/make_unsigned.h @@ -24,9 +24,11 @@ #include "../__type_traits/type_list.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/maybe_const.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/maybe_const.h index 1a90b10ee77..654d28b8646 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/maybe_const.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/maybe_const.h @@ -16,9 +16,11 @@ #include "../__type_traits/conditional.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/nat.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/nat.h index 93df885716b..fda3b1b17f8 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/nat.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/nat.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/negation.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/negation.h index abd5e32c322..dde1f3ec12a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/negation.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/negation.h @@ -16,9 +16,11 @@ #include "../__type_traits/integral_constant.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/promote.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/promote.h index 5a968c722f4..4dcde79c22b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/promote.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/promote.h @@ -19,9 +19,11 @@ #include "../__utility/declval.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/rank.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/rank.h index 990d20ad08c..41e60e8077a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/rank.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/rank.h @@ -17,9 +17,11 @@ #include "../__type_traits/integral_constant.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_all_extents.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_all_extents.h index a77c359df81..03b07e79e4b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_all_extents.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_all_extents.h @@ -16,9 +16,11 @@ #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_const.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_const.h index 4a270fa23c7..e72135dfc1d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_const.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_const.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_const_ref.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_const_ref.h index 3001531798e..7b9cb321f3b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_const_ref.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_const_ref.h @@ -17,9 +17,11 @@ #include "../__type_traits/remove_const.h" #include "../__type_traits/remove_reference.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_cv.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_cv.h index 42ce4e987fc..d858bcc8b8a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_cv.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_cv.h @@ -17,9 +17,11 @@ #include "../__type_traits/remove_const.h" #include "../__type_traits/remove_volatile.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_cvref.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_cvref.h index 05ee4fbd0ba..4b946579590 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_cvref.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_cvref.h @@ -18,9 +18,11 @@ #include "../__type_traits/remove_cv.h" #include "../__type_traits/remove_reference.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_extent.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_extent.h index 5b412c809ab..1cf6f3eb93b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_extent.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_extent.h @@ -16,9 +16,11 @@ #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_pointer.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_pointer.h index 4a15a66aafc..d152a362bc7 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_pointer.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_pointer.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_reference.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_reference.h index 4b88c477434..0e800ba4702 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_reference.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_reference.h @@ -16,9 +16,11 @@ #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_volatile.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_volatile.h index 58e70a50e30..1ccb3ff08b5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_volatile.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/remove_volatile.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/result_of.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/result_of.h index 0c8d772c325..58378ff2938 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/result_of.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/result_of.h @@ -16,9 +16,11 @@ #include "../__functional/invoke.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/type_identity.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/type_identity.h index f76ed081d1a..125fff289c6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/type_identity.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/type_identity.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/type_list.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/type_list.h index 328e88b811e..3e287075900 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/type_list.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/type_list.h @@ -16,9 +16,11 @@ #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/underlying_type.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/underlying_type.h index 88f860ee0a2..ac083427537 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/underlying_type.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/underlying_type.h @@ -16,9 +16,11 @@ #include "../__type_traits/is_enum.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/void_t.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/void_t.h index 7cf29a19c98..4aeb40f0b85 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/void_t.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__type_traits/void_t.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/as_const.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/as_const.h index 4d8e92a48ca..1fd69cfda50 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/as_const.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/as_const.h @@ -16,9 +16,11 @@ #include "../__type_traits/add_const.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/auto_cast.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/auto_cast.h index dba7b3f2209..3712bd10d8c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/auto_cast.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/auto_cast.h @@ -17,9 +17,11 @@ #include "../__type_traits/decay.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #define _LIBCUDACXX_AUTO_CAST(expr) static_cast<_CUDA_VSTD::decay_t>(expr) diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/cmp.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/cmp.h index ab4c7476fed..4f48dd02463 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/cmp.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/cmp.h @@ -27,9 +27,11 @@ #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/convert_to_integral.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/convert_to_integral.h index d6f189cfdd3..7f4974b71b5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/convert_to_integral.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/convert_to_integral.h @@ -19,9 +19,11 @@ #include "../__type_traits/is_floating_point.h" #include "../__type_traits/underlying_type.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/declval.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/declval.h index 750e57a1a3d..e7be76bb445 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/declval.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/declval.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/exception_guard.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/exception_guard.h index 52725013aae..94a84e71b08 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/exception_guard.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/exception_guard.h @@ -19,9 +19,11 @@ #include "../__utility/exchange.h" #include "../__utility/move.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/exchange.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/exchange.h index d0ac808e86c..883b5330b4b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/exchange.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/exchange.h @@ -19,9 +19,11 @@ #include "../__utility/forward.h" #include "../__utility/move.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/forward.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/forward.h index 3bac753a1e2..0b093d94cd3 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/forward.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/forward.h @@ -19,9 +19,11 @@ #include "../__type_traits/remove_reference.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/forward_like.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/forward_like.h index b4d740765fa..0a65b7e37d2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/forward_like.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/forward_like.h @@ -20,9 +20,11 @@ #include "../__type_traits/is_reference.h" #include "../__type_traits/remove_reference.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/in_place.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/in_place.h index bcab29b8fa7..e7648ec8dbe 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/in_place.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/in_place.h @@ -18,9 +18,11 @@ #include "../__type_traits/remove_reference.h" #include "../__type_traits/remove_cvref.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/integer_sequence.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/integer_sequence.h index f0c7d7406e2..e9ee2d7e4bf 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/integer_sequence.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/integer_sequence.h @@ -16,9 +16,11 @@ #include "../__type_traits/is_integral.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/move.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/move.h index 31dfcc4a1b8..6726e4aaaa6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/move.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/move.h @@ -20,9 +20,11 @@ #include "../__type_traits/is_nothrow_move_constructible.h" #include "../__type_traits/remove_reference.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/pair.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/pair.h index c4f66a62071..718aa29f887 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/pair.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/pair.h @@ -59,9 +59,11 @@ #include #endif // defined(__cuda_std__) && !defined(__CUDACC_RTC__) -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/piecewise_construct.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/piecewise_construct.h index 30e86e19fa4..fc503f819b3 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/piecewise_construct.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/piecewise_construct.h @@ -14,9 +14,11 @@ #include <__config> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/priority_tag.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/priority_tag.h index 09898c5362b..4c636309484 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/priority_tag.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/priority_tag.h @@ -16,9 +16,11 @@ #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/rel_ops.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/rel_ops.h index 72f95609063..aed8fc43d43 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/rel_ops.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/rel_ops.h @@ -17,9 +17,11 @@ #include "../__utility/forward.h" #include "../__utility/move.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/swap.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/swap.h index e68295e60df..cc5ed96de7b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/swap.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/swap.h @@ -23,9 +23,11 @@ #include "../__utility/move.h" #include "../cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/to_underlying.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/to_underlying.h index d9e54fccc38..bd91e060165 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/to_underlying.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/to_underlying.h @@ -17,9 +17,11 @@ #include "../__type_traits/underlying_type.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/unreachable.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/unreachable.h index 3a136921b67..5ef2e996f00 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/unreachable.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__utility/unreachable.h @@ -16,9 +16,11 @@ #include "../cstdlib" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__verbose_abort b/libcudacxx/include/cuda/std/detail/libcxx/include/__verbose_abort index be1a16ff916..862ecd08789 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__verbose_abort +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__verbose_abort @@ -17,9 +17,11 @@ #include "__availability" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC // Provide a default implementation of __libcpp_verbose_abort if we know that neither the built // library nor the user is providing one. Otherwise, just declare it and use the one from the diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/algorithm b/libcudacxx/include/cuda/std/detail/libcxx/include/algorithm index 310652e03fb..503abf21fa6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/algorithm +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/algorithm @@ -668,9 +668,11 @@ template #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/any b/libcudacxx/include/cuda/std/detail/libcxx/include/any index 0031c5cda82..83ab42b7456 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/any +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/any @@ -88,9 +88,11 @@ namespace std { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC namespace std { class _LIBCUDACXX_EXCEPTION_ABI _LIBCUDACXX_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/array b/libcudacxx/include/cuda/std/detail/libcxx/include/array index 73f2b2ca869..05839350cc5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/array +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/array @@ -149,9 +149,11 @@ template const T&& get(const array&&) noexce #include "__tuple_dir/tuple_element.h" #include "__tuple_dir/tuple_size.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/atomic b/libcudacxx/include/cuda/std/detail/libcxx/include/atomic index 45c2a5a558a..1d045e42b37 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/atomic +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/atomic @@ -572,9 +572,11 @@ void atomic_signal_fence(memory_order m) noexcept; #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifdef _LIBCUDACXX_HAS_NO_THREADS # error is not supported on this single threaded system diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/barrier b/libcudacxx/include/cuda/std/detail/libcxx/include/barrier index ab4c0fb851f..ad4298b3e8e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/barrier +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/barrier @@ -65,9 +65,11 @@ namespace std #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifdef _LIBCUDACXX_HAS_NO_THREADS # error is not supported on this single threaded system diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/bit b/libcudacxx/include/cuda/std/detail/libcxx/include/bit index 32263c56b50..b3ea29e4e18 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/bit +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/bit @@ -68,9 +68,11 @@ namespace std { #include <__pragma_push> #endif //__cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if defined(_LIBCUDACXX_COMPILER_MSVC) #include diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/bitset b/libcudacxx/include/cuda/std/detail/libcxx/include/bitset index a6b19b81ce9..cbf68020ea8 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/bitset +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/bitset @@ -121,9 +121,11 @@ template struct hash>; #include #include <__functional_base> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/ccomplex b/libcudacxx/include/cuda/std/detail/libcxx/include/ccomplex index 728af56ffaf..3e727a933b5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/ccomplex +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/ccomplex @@ -19,9 +19,11 @@ #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC // hh 080623 Created diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cctype b/libcudacxx/include/cuda/std/detail/libcxx/include/cctype index 16173ec7674..61ae214c384 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cctype +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cctype @@ -37,9 +37,11 @@ int toupper(int c); #include <__config> #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cerrno b/libcudacxx/include/cuda/std/detail/libcxx/include/cerrno index 717f0f481d3..8f8c5533a64 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cerrno +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cerrno @@ -25,8 +25,10 @@ Macros: #include <__config> #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #endif // _LIBCUDACXX_CERRNO diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cfenv b/libcudacxx/include/cuda/std/detail/libcxx/include/cfenv index 65e776ff64c..06e311c7014 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cfenv +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cfenv @@ -55,9 +55,11 @@ int feupdateenv(const fenv_t* envp); #include <__config> #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/charconv b/libcudacxx/include/cuda/std/detail/libcxx/include/charconv index 29cf317e97e..e51090e8fd2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/charconv +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/charconv @@ -82,9 +82,11 @@ namespace std { #include <__debug> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/chrono b/libcudacxx/include/cuda/std/detail/libcxx/include/chrono index f00bdeedbcc..828aa923813 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/chrono +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/chrono @@ -850,9 +850,11 @@ constexpr chrono::year operator ""y(unsigned lo #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC // Silence NVCC warnings `long double` arising from chrono floating pointer // user-defined literals which are defined in terms of `long double`. @@ -3203,6 +3205,9 @@ constexpr hours make24(const hours& __h, bool __is_pm) noexcept #pragma GCC system_header #endif +_LIBCUDACXX_DIAGNOSTIC_PUSH +_LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED("-Wliteral-suffix") +_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wuser-defined-literals") // Suffixes for duration literals [time.duration.literals] inline namespace literals { @@ -3295,6 +3300,7 @@ inline namespace literals } #endif //_LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_CXX20_CHRONO_LITERALS) }} +_LIBCUDACXX_DIAGNOSTIC_POP namespace chrono { // hoist the literals into namespace std::chrono using namespace literals::chrono_literals; diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cinttypes b/libcudacxx/include/cuda/std/detail/libcxx/include/cinttypes index 0a995a61420..8029b59ebe2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cinttypes +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cinttypes @@ -239,9 +239,11 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int #include "cstdint" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/climits b/libcudacxx/include/cuda/std/detail/libcxx/include/climits index 92cfad5a052..5574afe450a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/climits +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/climits @@ -48,9 +48,11 @@ Macros: #include <__pragma_push> #endif //__cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if defined(_LIBCUDACXX_COMPILER_MSVC) #include "support/win32/limits_msvc_win32.h" diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/clocale b/libcudacxx/include/cuda/std/detail/libcxx/include/clocale index 64d6fe37774..52c61aaa6a3 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/clocale +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/clocale @@ -37,9 +37,11 @@ lconv* localeconv(); #include <__config> #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cmath b/libcudacxx/include/cuda/std/detail/libcxx/include/cmath index 2855220e72d..7638eaf5db1 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cmath +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cmath @@ -320,9 +320,11 @@ long double truncl(long double x); #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifdef _LIBCUDACXX_COMPILER_NVRTC #include "climits" diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/codecvt b/libcudacxx/include/cuda/std/detail/libcxx/include/codecvt index cbb09db11ab..4c02915ab10 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/codecvt +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/codecvt @@ -57,9 +57,11 @@ class codecvt_utf8_utf16 #include <__config> #include <__locale> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/compare b/libcudacxx/include/cuda/std/detail/libcxx/include/compare index d3482f0e23c..63d2b3f20b1 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/compare +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/compare @@ -50,9 +50,11 @@ namespace std { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/complex b/libcudacxx/include/cuda/std/detail/libcxx/include/complex index 1abd36617db..e064ade753b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/complex +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/complex @@ -267,9 +267,11 @@ template complex tanh (const complex&); #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC # if _LIBCUDACXX_CUDA_ABI_VERSION > 3 # define _LIBCUDACXX_COMPLEX_ALIGNAS(V) _ALIGNAS(V) diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/complex.h b/libcudacxx/include/cuda/std/detail/libcxx/include/complex.h index 505d11cef35..22ad5415020 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/complex.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/complex.h @@ -19,9 +19,11 @@ #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifdef __cplusplus diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/concepts b/libcudacxx/include/cuda/std/detail/libcxx/include/concepts index 8b99044509e..b68750dd601 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/concepts +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/concepts @@ -162,8 +162,10 @@ namespace std { #include "version" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #endif // _LIBCUDACXX_CONCEPTS diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/condition_variable b/libcudacxx/include/cuda/std/detail/libcxx/include/condition_variable index 0d11724365f..ded33441f72 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/condition_variable +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/condition_variable @@ -110,9 +110,11 @@ public: #include <__mutex_base> #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifndef _LIBCUDACXX_HAS_NO_THREADS diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/csetjmp b/libcudacxx/include/cuda/std/detail/libcxx/include/csetjmp index d6b46eff984..a5faf91b9c2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/csetjmp +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/csetjmp @@ -33,9 +33,11 @@ void longjmp(jmp_buf env, int val); #include <__config> #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/csignal b/libcudacxx/include/cuda/std/detail/libcxx/include/csignal index 39c13590e02..39259812809 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/csignal +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/csignal @@ -42,9 +42,11 @@ int raise(int sig); #include <__config> #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdarg b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdarg index a7b2fb9a1d0..aca5c592846 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdarg +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdarg @@ -37,9 +37,11 @@ Types: #include <__pragma_push> #endif //__cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdbool b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdbool index 026f9574fcd..23a2ef4504e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdbool +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdbool @@ -24,9 +24,11 @@ Macros: #include <__pragma_push> #endif //__cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #undef __bool_true_false_are_defined #define __bool_true_false_are_defined 1 diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cstddef b/libcudacxx/include/cuda/std/detail/libcxx/include/cstddef index da6f5610413..83f0d8c2994 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cstddef +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cstddef @@ -48,9 +48,11 @@ Types: #include <__pragma_push> #endif //__cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifndef __cuda_std__ // Don't include our own ; we don't want to declare ::nullptr_t. diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdint b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdint index 1f0337a6008..ef6ff78accf 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdint +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdint @@ -157,9 +157,11 @@ Types: #include <__pragma_push> #endif //__cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdio b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdio index e17d75386e0..c067f6177d7 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdio +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdio @@ -98,9 +98,11 @@ void perror(const char* s); #include <__config> #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdlib b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdlib index f1659f57553..306c319ce64 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdlib +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdlib @@ -94,9 +94,11 @@ void *aligned_alloc(size_t alignment, size_t size); // C11 #include <__pragma_push> #endif //__cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if defined(_LIBCUDACXX_COMPILER_CLANG_CUDA) # define _LIBCUDACXX_UNREACHABLE() __builtin_unreachable() diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cstring b/libcudacxx/include/cuda/std/detail/libcxx/include/cstring index 06e1c95f8b3..7e4a904ac25 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cstring +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cstring @@ -62,9 +62,11 @@ size_t strlen(const char* s); #include <__pragma_push> #endif //__simet__ <- a tribute to ogiroux -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/ctgmath b/libcudacxx/include/cuda/std/detail/libcxx/include/ctgmath index d43fbcce9d8..11c0746caee 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/ctgmath +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/ctgmath @@ -21,8 +21,10 @@ #include #include "cmath" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #endif // _LIBCUDACXX_CTGMATH diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/ctime b/libcudacxx/include/cuda/std/detail/libcxx/include/ctime index 1b045f9f2d5..fa17dfa0f36 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/ctime +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/ctime @@ -59,9 +59,11 @@ typedef long long int time_t; #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/ctype.h b/libcudacxx/include/cuda/std/detail/libcxx/include/ctype.h index 4957f6eb134..173c16e4273 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/ctype.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/ctype.h @@ -31,9 +31,11 @@ int toupper(int c); #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cwchar b/libcudacxx/include/cuda/std/detail/libcxx/include/cwchar index 750b774c6a1..9d0062a94b8 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cwchar +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cwchar @@ -106,9 +106,11 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len, #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cwctype b/libcudacxx/include/cuda/std/detail/libcxx/include/cwctype index ce8a7933c29..3a1ccc36a26 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cwctype +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cwctype @@ -53,9 +53,11 @@ wctrans_t wctrans(const char* property); #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/deque b/libcudacxx/include/cuda/std/detail/libcxx/include/deque index d730129136f..271ba5e3720 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/deque +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/deque @@ -167,9 +167,11 @@ template #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/errno.h b/libcudacxx/include/cuda/std/detail/libcxx/include/errno.h index b35af2570a0..589d29d5092 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/errno.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/errno.h @@ -24,9 +24,11 @@ #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/exception b/libcudacxx/include/cuda/std/detail/libcxx/include/exception index 971154e1e3f..4efc1841828 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/exception +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/exception @@ -89,9 +89,11 @@ template void rethrow_if_nested(const E& e); #include #endif -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD_NOVERSION // purposefully not using versioning namespace diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/expected b/libcudacxx/include/cuda/std/detail/libcxx/include/expected index 2f01dd9de16..68f61f6e1d5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/expected +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/expected @@ -32,8 +32,10 @@ namespace std { #include "version" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #endif // _LIBCUDACXX_EXPECTED diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/__config b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/__config index 4571a089240..802708e3277 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/__config +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/__config @@ -12,9 +12,11 @@ #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #define _LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL namespace std { namespace experimental { #define _LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL } } diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/algorithm b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/algorithm index 7fe305cf0b4..1da9a4a26f8 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/algorithm +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/algorithm @@ -37,9 +37,11 @@ ForwardIterator search(ForwardIterator first, ForwardIterator last, #include <__debug> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/coroutine b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/coroutine index a5e60fe3ef5..bd94e5b6d02 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/coroutine +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/coroutine @@ -53,9 +53,11 @@ template struct hash>; #include #include <__debug> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifdef _LIBCUDACXX_HAS_NO_COROUTINES # if defined(_LIBCUDACXX_WARNING) diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/deque b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/deque index 1f2291796db..06673b613bc 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/deque +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/deque @@ -32,9 +32,11 @@ namespace pmr { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/filesystem b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/filesystem index e0e6b9bbab0..736b2917302 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/filesystem +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/filesystem @@ -232,9 +232,11 @@ #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/forward_list b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/forward_list index 585ca5a8d6f..2222319f75a 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/forward_list +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/forward_list @@ -32,9 +32,11 @@ namespace pmr { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/functional b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/functional index 719396c07c7..e45c071a8d6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/functional +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/functional @@ -96,9 +96,11 @@ inline namespace fundamentals_v1 { #include <__debug> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> @@ -112,7 +114,7 @@ template> class _LIBCUDACXX_TYPE_VIS default_searcher { public: _LIBCUDACXX_INLINE_VISIBILITY - default_searcher(_ForwardIterator __f, _ForwardIterator __l, + default_searcher(_ForwardIterator __f, _ForwardIterator __l, _BinaryPredicate __p = _BinaryPredicate()) : __first_(__f), __last_(__l), __pred_(__p) {} @@ -151,12 +153,12 @@ public: // TODO private: const _Value __default_value_; std::unordered_map<_Key, _Value, _Hash, _BinaryPredicate> __table; - + public: _LIBCUDACXX_INLINE_VISIBILITY _BMSkipTable(std::size_t __sz, _Value __default, _Hash __hf, _BinaryPredicate __pred) : __default_value_(__default), __table(__sz, __hf, __pred) {} - + _LIBCUDACXX_INLINE_VISIBILITY void insert(const key_type &__key, value_type __val) { @@ -170,7 +172,7 @@ public: return __it == __table.end() ? __default_value_ : __it->second; } }; - + // Special case small numeric values; use an array template @@ -189,7 +191,7 @@ public: { std::fill_n(__table.begin(), __table.size(), __default); } - + _LIBCUDACXX_INLINE_VISIBILITY void insert(key_type __key, value_type __val) { @@ -204,8 +206,8 @@ public: }; -template ::value_type>, +template ::value_type>, class _BinaryPredicate = equal_to<>> class _LIBCUDACXX_TYPE_VIS boyer_moore_searcher { private: @@ -217,9 +219,9 @@ private: is_same<_Hash, hash>::value && is_same<_BinaryPredicate, equal_to<>>::value > skip_table_type; - + public: - boyer_moore_searcher(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l, + boyer_moore_searcher(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l, _Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate()) : __first_(__f), __last_(__l), __pred_(__pred), __pattern_length_(_CUDA_VSTD::distance(__first_, __last_)), @@ -232,13 +234,13 @@ public: this->__build_suffix_table ( __first_, __last_, __pred_ ); } - + template pair<_RandomAccessIterator2, _RandomAccessIterator2> operator ()(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const { static_assert ( std::is_same< - std::__remove_cvref_t::value_type>, + std::__remove_cvref_t::value_type>, std::__remove_cvref_t::value_type> >::value, "Corpus and Pattern iterators must point to the same type" ); @@ -247,13 +249,13 @@ public: if (__first_ == __last_) return make_pair(__f, __f); // empty pattern // If the pattern is larger than the corpus, we can't find it! - if ( __pattern_length_ > _CUDA_VSTD::distance (__f, __l)) + if ( __pattern_length_ > _CUDA_VSTD::distance (__f, __l)) return make_pair(__l, __l); - // Do the search + // Do the search return this->__search(__f, __l); } - + public: // TODO private: _RandomAccessIterator1 __first_; _RandomAccessIterator1 __last_; @@ -270,7 +272,7 @@ public: // TODO private: const _RandomAccessIterator2 __last = __l - __pattern_length_; const skip_table_type & __skip = *__skip_.get(); const vector & __suffix = *__suffix_.get(); - + while (__cur <= __last) { @@ -282,7 +284,7 @@ public: // TODO private: if ( __j == 0 ) return make_pair(__cur, __cur + __pattern_length_); } - + // Since we didn't match, figure out how far to skip forward difference_type __k = __skip[__cur [ __j - 1 ]]; difference_type __m = __j - __k - 1; @@ -291,7 +293,7 @@ public: // TODO private: else __cur += __suffix[ __j ]; } - + return make_pair(__l, __l); // We didn't find anything } @@ -300,21 +302,21 @@ public: // TODO private: void __compute_bm_prefix ( _Iterator __f, _Iterator __l, _BinaryPredicate __pred, _Container &__prefix ) { const std::size_t __count = _CUDA_VSTD::distance(__f, __l); - + __prefix[0] = 0; std::size_t __k = 0; for ( std::size_t __i = 1; __i < __count; ++__i ) { while ( __k > 0 && !__pred ( __f[__k], __f[__i] )) __k = __prefix [ __k - 1 ]; - + if ( __pred ( __f[__k], __f[__i] )) __k++; __prefix [ __i ] = __k; } } - void __build_suffix_table(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l, + void __build_suffix_table(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l, _BinaryPredicate __pred) { const std::size_t __count = _CUDA_VSTD::distance(__f, __l); @@ -322,19 +324,19 @@ public: // TODO private: if (__count > 0) { _CUDA_VSTD::vector __scratch(__count); - + __compute_bm_prefix(__f, __l, __pred, __scratch); for ( std::size_t __i = 0; __i <= __count; __i++ ) __suffix[__i] = __count - __scratch[__count-1]; - + typedef _CUDA_VSTD::reverse_iterator<_RandomAccessIterator1> _RevIter; __compute_bm_prefix(_RevIter(__l), _RevIter(__f), __pred, __scratch); - + for ( std::size_t __i = 0; __i < __count; __i++ ) { const std::size_t __j = __count - __scratch[__i]; const difference_type __k = __i - __scratch[__i] + 1; - + if (__suffix[__j] > __k) __suffix[__j] = __k; } @@ -343,20 +345,20 @@ public: // TODO private: }; -template::value_type>, +template::value_type>, class _BinaryPredicate = equal_to<>> _LIBCUDACXX_INLINE_VISIBILITY boyer_moore_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate> -make_boyer_moore_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l, +make_boyer_moore_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l, _Hash __hf = _Hash(), _BinaryPredicate __p = _BinaryPredicate ()) { return boyer_moore_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate>(__f, __l, __hf, __p); } // boyer-moore-horspool -template ::value_type>, +template ::value_type>, class _BinaryPredicate = equal_to<>> class _LIBCUDACXX_TYPE_VIS boyer_moore_horspool_searcher { private: @@ -370,7 +372,7 @@ private: > skip_table_type; public: - boyer_moore_horspool_searcher(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l, + boyer_moore_horspool_searcher(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l, _Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate()) : __first_(__f), __last_(__l), __pred_(__pred), __pattern_length_(_CUDA_VSTD::distance(__first_, __last_)), @@ -384,13 +386,13 @@ public: __skip_->insert(*__f, __pattern_length_ - 1 - __i); } } - + template pair<_RandomAccessIterator2, _RandomAccessIterator2> operator ()(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const { static_assert ( std::is_same< - std::__remove_cvref_t::value_type>, + std::__remove_cvref_t::value_type>, std::__remove_cvref_t::value_type> >::value, "Corpus and Pattern iterators must point to the same type" ); @@ -399,13 +401,13 @@ public: if (__first_ == __last_) return make_pair(__f, __f); // empty pattern // If the pattern is larger than the corpus, we can't find it! - if ( __pattern_length_ > _CUDA_VSTD::distance (__f, __l)) + if ( __pattern_length_ > _CUDA_VSTD::distance (__f, __l)) return make_pair(__l, __l); - // Do the search + // Do the search return this->__search(__f, __l); } - + private: _RandomAccessIterator1 __first_; _RandomAccessIterator1 __last_; @@ -433,17 +435,17 @@ private: } __cur += __skip[__cur[__pattern_length_-1]]; } - + return make_pair(__l, __l); } }; -template::value_type>, +template::value_type>, class _BinaryPredicate = equal_to<>> _LIBCUDACXX_INLINE_VISIBILITY boyer_moore_horspool_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate> -make_boyer_moore_horspool_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l, +make_boyer_moore_horspool_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l, _Hash __hf = _Hash(), _BinaryPredicate __p = _BinaryPredicate ()) { return boyer_moore_horspool_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate>(__f, __l, __hf, __p); diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/list b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/list index 0600d27e65a..8f6fbced635 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/list +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/list @@ -32,9 +32,11 @@ namespace pmr { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/map b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/map index 222836e1801..339b149f623 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/map +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/map @@ -37,9 +37,11 @@ namespace pmr { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/memory_resource b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/memory_resource index 7b32dd558d9..93e62b656f2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/memory_resource +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/memory_resource @@ -77,9 +77,11 @@ namespace pmr { #include #include <__debug> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/propagate_const b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/propagate_const index 476d307692b..70afdfa086b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/propagate_const +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/propagate_const @@ -106,11 +106,11 @@ */ -#include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#include #if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif - +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if _LIBCUDACXX_STD_VER > 11 #include diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/regex b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/regex index 3a7cd32ccec..ef2dc3aea12 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/regex +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/regex @@ -40,9 +40,11 @@ namespace pmr { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/set b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/set index 995d50a3d48..a267b7acd1c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/set +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/set @@ -37,9 +37,11 @@ namespace pmr { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/simd b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/simd index 99453767b5f..ed37b0f212b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/simd +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/simd @@ -655,9 +655,11 @@ public: #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/string b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/string index 0e502e823b3..6509bd8b9cd 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/string +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/string @@ -41,9 +41,11 @@ namespace pmr { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/type_traits b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/type_traits index 83859d47216..c73143bbb0c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/type_traits +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/type_traits @@ -60,7 +60,7 @@ inline namespace fundamentals_v1 { using is_detected_convertible = is_convertible, To>; template class Op, class... Args> constexpr bool is_detected_convertible_v - = is_detected_convertible::value; + = is_detected_convertible::value; } // namespace fundamentals_v1 } // namespace experimental @@ -75,9 +75,11 @@ inline namespace fundamentals_v1 { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_LFTS @@ -122,7 +124,7 @@ struct _DETECTOR<_Default, void_t<_Op<_Args...>>, _Op, _Args...> { using value_t = true_type; using type = _Op<_Args...>; }; - + template class _Op, class... _Args> using is_detected = typename _DETECTOR::value_t; @@ -144,7 +146,7 @@ template class _Op, class... _Args> template class _Op, class... _Args> using is_detected_convertible = is_convertible, To>; template class _Op, class... _Args> - constexpr bool is_detected_convertible_v = is_detected_convertible::value; + constexpr bool is_detected_convertible_v = is_detected_convertible::value; _LIBCUDACXX_END_NAMESPACE_LFTS diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/unordered_map b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/unordered_map index 221156a3e84..a110a918fe0 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/unordered_map +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/unordered_map @@ -43,9 +43,11 @@ namespace pmr { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/unordered_set b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/unordered_set index 2c3243e06c7..4714c8421f5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/unordered_set +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/unordered_set @@ -37,9 +37,11 @@ namespace pmr { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/utility b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/utility index 8f7f7a149d9..6d2c15d5704 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/utility +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/utility @@ -33,9 +33,11 @@ inline namespace fundamentals_v1 { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_LFTS diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/vector b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/vector index d3c593467c5..31c06fca578 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/vector +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/experimental/vector @@ -32,9 +32,11 @@ namespace pmr { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/ext/hash_map b/libcudacxx/include/cuda/std/detail/libcxx/include/ext/hash_map index 292ee3156d7..4dbebc16f3b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/ext/hash_map +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/ext/hash_map @@ -216,9 +216,11 @@ template #endif #endif -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC namespace __gnu_cxx { diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/fenv.h b/libcudacxx/include/cuda/std/detail/libcxx/include/fenv.h index 30b1eff084d..766517eea32 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/fenv.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/fenv.h @@ -52,9 +52,11 @@ int feupdateenv(const fenv_t* envp); #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/filesystem b/libcudacxx/include/cuda/std/detail/libcxx/include/filesystem index 73242d42cda..3ec35cdee0f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/filesystem +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/filesystem @@ -247,9 +247,11 @@ #include <__debug> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/float.h b/libcudacxx/include/cuda/std/detail/libcxx/include/float.h index afd612c76e1..404eebabce1 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/float.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/float.h @@ -74,9 +74,11 @@ #include <__pragma_push> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/forward_list b/libcudacxx/include/cuda/std/detail/libcxx/include/forward_list index 633cc575527..25ae3efacf2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/forward_list +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/forward_list @@ -185,9 +185,11 @@ template #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> @@ -1498,7 +1500,7 @@ forward_list<_Tp, _Alloc>::remove(const value_type& __v) else ++__i; } - + return (__remove_return_type) __count_removed; } @@ -1526,7 +1528,7 @@ forward_list<_Tp, _Alloc>::remove_if(_Predicate __pred) else ++__i; } - + return (__remove_return_type) __count_removed; } @@ -1546,7 +1548,7 @@ forward_list<_Tp, _Alloc>::unique(_BinaryPredicate __binary_pred) __deleted_nodes.splice_after(__deleted_nodes.before_begin(), *this, __i, __j); __i = __j; } - + return (__remove_return_type) __count_removed; } diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/fstream b/libcudacxx/include/cuda/std/detail/libcxx/include/fstream index 772abc6b83a..e86f7427eae 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/fstream +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/fstream @@ -187,9 +187,11 @@ typedef basic_fstream wfstream; #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/functional b/libcudacxx/include/cuda/std/detail/libcxx/include/functional index d2c937ea655..1e13ca7a14c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/functional +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/functional @@ -541,8 +541,10 @@ POLICY: For non-variadic implementations, the number of arguments is limited #include "type_traits" #include "version" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #endif // _LIBCUDACXX_FUNCTIONAL diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/future b/libcudacxx/include/cuda/std/detail/libcxx/include/future index c2c08623add..c911590b2aa 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/future +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/future @@ -369,9 +369,11 @@ template struct uses_allocator, Alloc>; #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifdef _LIBCUDACXX_HAS_NO_THREADS #error is not supported on this single threaded system diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/initializer_list b/libcudacxx/include/cuda/std/detail/libcxx/include/initializer_list index 0470bf4e2bd..303f8f343b7 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/initializer_list +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/initializer_list @@ -47,9 +47,11 @@ template const E* end(initializer_list il) noexcept; // constexpr in #include "cstddef" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC namespace std // purposefully not versioned { diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/inttypes.h b/libcudacxx/include/cuda/std/detail/libcxx/include/inttypes.h index c40180098d3..abc3e0896f7 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/inttypes.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/inttypes.h @@ -237,9 +237,11 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC /* C99 stdlib (e.g. glibc < 2.18) does not provide format macros needed for C++11 unless __STDC_FORMAT_MACROS is defined diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/iomanip b/libcudacxx/include/cuda/std/detail/libcxx/include/iomanip index 3684b01d69d..2f01d9199ed 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/iomanip +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/iomanip @@ -47,9 +47,11 @@ template #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/ios b/libcudacxx/include/cuda/std/detail/libcxx/include/ios index f26d370c1e9..eb1c5607397 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/ios +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/ios @@ -219,9 +219,11 @@ storage-class-specifier const error_category& iostream_category() noexcept; #include // for __xindex_ #endif -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/iosfwd b/libcudacxx/include/cuda/std/detail/libcxx/include/iosfwd index 3e7c0503804..4b705112043 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/iosfwd +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/iosfwd @@ -100,9 +100,11 @@ typedef fpos::state_type> wstreampos; #include "__fwd/string.h" #include "version" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/iostream b/libcudacxx/include/cuda/std/detail/libcxx/include/iostream index e6f0d86dfdf..1863a346f5b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/iostream +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/iostream @@ -39,9 +39,11 @@ extern wostream wclog; #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/istream b/libcudacxx/include/cuda/std/detail/libcxx/include/istream index d09ad5c861e..2834f6dedd3 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/istream +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/istream @@ -162,9 +162,11 @@ template #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/iterator b/libcudacxx/include/cuda/std/detail/libcxx/include/iterator index 6fb9daf30ff..12b8f3a3646 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/iterator +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/iterator @@ -729,9 +729,11 @@ template constexpr const E* data(initializer_list il) noexcept; #include <__pragma_push> #endif //__cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/latch b/libcudacxx/include/cuda/std/detail/libcxx/include/latch index c4367b65f7f..6ed62527f6b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/latch +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/latch @@ -50,9 +50,11 @@ namespace std #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifdef _LIBCUDACXX_HAS_NO_THREADS # error is not supported on this single threaded system diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/limits b/libcudacxx/include/cuda/std/detail/libcxx/include/limits index 93aef89a59c..942ef9e039e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/limits +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/limits @@ -118,9 +118,11 @@ template<> class numeric_limits; #include <__pragma_push> #endif //__cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if defined(_LIBCUDACXX_COMPILER_MSVC) #include "support/win32/limits_msvc_win32.h" diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/limits.h b/libcudacxx/include/cuda/std/detail/libcxx/include/limits.h index 6cb5334dee3..29a3601f7fb 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/limits.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/limits.h @@ -41,9 +41,11 @@ #include <__pragma_push> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifndef __GNUC__ #include_next diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/list b/libcudacxx/include/cuda/std/detail/libcxx/include/list index 50e20059b2e..977062f9345 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/list +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/list @@ -190,9 +190,11 @@ template #include <__debug> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/locale b/libcudacxx/include/cuda/std/detail/libcxx/include/locale index 08e36d539a2..5c1e61d39f8 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/locale +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/locale @@ -207,9 +207,11 @@ template class messages_byname; #include <__bsd_locale_fallbacks.h> #endif -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/locale.h b/libcudacxx/include/cuda/std/detail/libcxx/include/locale.h index d156f318608..29d1f4cc1ce 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/locale.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/locale.h @@ -35,9 +35,11 @@ #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/map b/libcudacxx/include/cuda/std/detail/libcxx/include/map index 527ca400d35..9d7c419ef3e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/map +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/map @@ -486,9 +486,11 @@ template #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/math.h b/libcudacxx/include/cuda/std/detail/libcxx/include/math.h index f6f4433a2a7..2215e722e82 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/math.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/math.h @@ -293,9 +293,11 @@ long double truncl(long double x); #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #define _LIBCUDACXX_STDLIB_INCLUDE_NEXT #include diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/memory b/libcudacxx/include/cuda/std/detail/libcxx/include/memory index 33dc40e5d27..2dbae984671 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/memory +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/memory @@ -704,9 +704,11 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space); #include <__pragma_push> #endif //__cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/mutex b/libcudacxx/include/cuda/std/detail/libcxx/include/mutex index 37e5045196b..a3979a102e1 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/mutex +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/mutex @@ -195,9 +195,11 @@ template #include #include <__threading_support> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/new b/libcudacxx/include/cuda/std/detail/libcxx/include/new index a2521caccbb..304fddcda94 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/new +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/new @@ -106,9 +106,11 @@ void operator delete[](void* ptr, void*) noexcept; #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if !defined(__cpp_sized_deallocation) || __cpp_sized_deallocation < 201309L #define _LIBCUDACXX_HAS_NO_LANGUAGE_SIZED_DEALLOCATION diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/numeric b/libcudacxx/include/cuda/std/detail/libcxx/include/numeric index b8ea76f905f..e240f28d99d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/numeric +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/numeric @@ -161,9 +161,11 @@ floating_point midpoint(floating_point a, floating_point b); // C++20 #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/optional b/libcudacxx/include/cuda/std/detail/libcxx/include/optional index c483376f544..8112bd4c47e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/optional +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/optional @@ -205,9 +205,11 @@ template #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifndef __cuda_std__ namespace std // purposefully not using versioning namespace diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/ostream b/libcudacxx/include/cuda/std/detail/libcxx/include/ostream index 32125a62ed1..c196ba70cdc 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/ostream +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/ostream @@ -142,9 +142,11 @@ template #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/queue b/libcudacxx/include/cuda/std/detail/libcxx/include/queue index 1b2a459309f..181e165c2a5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/queue +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/queue @@ -191,9 +191,11 @@ template #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/random b/libcudacxx/include/cuda/std/detail/libcxx/include/random index c509d48e2f4..73b048748d2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/random +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/random @@ -1645,9 +1645,11 @@ class piecewise_linear_distribution #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/ratio b/libcudacxx/include/cuda/std/detail/libcxx/include/ratio index 9aba177c4be..672626f16fe 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/ratio +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/ratio @@ -91,9 +91,11 @@ typedef ratio<1000000000000000000000000, 1> yotta; // not supported #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/regex b/libcudacxx/include/cuda/std/detail/libcxx/include/regex index bff01cee3d3..46b9280b9d5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/regex +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/regex @@ -770,9 +770,11 @@ typedef regex_token_iterator wsregex_token_iterator; #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/scoped_allocator b/libcudacxx/include/cuda/std/detail/libcxx/include/scoped_allocator index dc13e4ed98e..a249b9eeb6b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/scoped_allocator +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/scoped_allocator @@ -109,9 +109,11 @@ template #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/semaphore b/libcudacxx/include/cuda/std/detail/libcxx/include/semaphore index 5b6041a95ee..f6bfe4d41fa 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/semaphore +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/semaphore @@ -58,9 +58,11 @@ using binary_semaphore = counting_semaphore<1>; #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifdef _LIBCUDACXX_HAS_NO_THREADS # error is not supported on this single threaded system diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/set b/libcudacxx/include/cuda/std/detail/libcxx/include/set index a9f458f1760..69508e9d090 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/set +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/set @@ -429,9 +429,11 @@ template #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/setjmp.h b/libcudacxx/include/cuda/std/detail/libcxx/include/setjmp.h index d609c166841..0c1e9ad54af 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/setjmp.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/setjmp.h @@ -27,9 +27,11 @@ void longjmp(jmp_buf env, int val); #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/shared_mutex b/libcudacxx/include/cuda/std/detail/libcxx/include/shared_mutex index 31d0776312a..69a0f455e67 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/shared_mutex +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/shared_mutex @@ -133,9 +133,11 @@ _LIBCUDACXX_PUSH_MACROS #include <__mutex_base> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifdef _LIBCUDACXX_HAS_NO_THREADS #error is not supported on this single threaded system diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/span b/libcudacxx/include/cuda/std/detail/libcxx/include/span index 999d05b4633..42d880e632f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/span +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/span @@ -157,9 +157,11 @@ template #include "cstddef" // for ptrdiff_t #include "version" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/sstream b/libcudacxx/include/cuda/std/detail/libcxx/include/sstream index 6a2a01e42e7..ad25c7e7e1b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/sstream +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/sstream @@ -174,9 +174,11 @@ typedef basic_stringstream wstringstream; #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/stack b/libcudacxx/include/cuda/std/detail/libcxx/include/stack index 26fdf711fec..3d0ca3223fe 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/stack +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/stack @@ -90,9 +90,11 @@ template #include <__config> #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/stdbool.h b/libcudacxx/include/cuda/std/detail/libcxx/include/stdbool.h index 274609ad0d9..dae4aca58b9 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/stdbool.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/stdbool.h @@ -21,9 +21,11 @@ #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/stddef.h b/libcudacxx/include/cuda/std/detail/libcxx/include/stddef.h index fe0a0e9d8a1..1052ec45afc 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/stddef.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/stddef.h @@ -10,9 +10,11 @@ #if defined(__need_ptrdiff_t) || defined(__need_size_t) || \ defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t) -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next @@ -40,9 +42,11 @@ #include <__pragma_push> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/stdexcept b/libcudacxx/include/cuda/std/detail/libcxx/include/stdexcept index 51b7ef92cfe..02d678e510b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/stdexcept +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/stdexcept @@ -57,9 +57,11 @@ public: #include <__pragma_push> #endif //__cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/stdint.h b/libcudacxx/include/cuda/std/detail/libcxx/include/stdint.h index 6a95b3362a5..189c9c087bc 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/stdint.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/stdint.h @@ -107,9 +107,11 @@ #include <__pragma_push> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC /* C99 stdlib (e.g. glibc < 2.18) does not provide macros needed for C++11 unless __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/stdio.h b/libcudacxx/include/cuda/std/detail/libcxx/include/stdio.h index e793e93de9d..145319f36f7 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/stdio.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/stdio.h @@ -9,9 +9,11 @@ #if defined(__need_FILE) || defined(__need___FILE) -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next @@ -100,9 +102,11 @@ void perror(const char* s); #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/stdlib.h b/libcudacxx/include/cuda/std/detail/libcxx/include/stdlib.h index a980e7642c5..abc54deae08 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/stdlib.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/stdlib.h @@ -9,9 +9,11 @@ #if defined(__need_malloc_and_calloc) || defined(_LIBCUDACXX_STDLIB_INCLUDE_NEXT) -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if defined(_LIBCUDACXX_STDLIB_INCLUDE_NEXT) #undef _LIBCUDACXX_STDLIB_INCLUDE_NEXT @@ -90,9 +92,11 @@ void *aligned_alloc(size_t alignment, size_t size); // C11 #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/streambuf b/libcudacxx/include/cuda/std/detail/libcxx/include/streambuf index 8a305dc2ad5..b1ddd4417d5 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/streambuf +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/streambuf @@ -111,9 +111,11 @@ protected: #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/string b/libcudacxx/include/cuda/std/detail/libcxx/include/string index b338306a2e6..ee4ec891ca4 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/string +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/string @@ -523,9 +523,11 @@ basic_string operator "" s( const char32_t *str, size_t len ); // C++1 #include "__fwd/string.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/string.h b/libcudacxx/include/cuda/std/detail/libcxx/include/string.h index f0591447854..9f0f0a0f151 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/string.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/string.h @@ -53,9 +53,11 @@ size_t strlen(const char* s); #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/string_view b/libcudacxx/include/cuda/std/detail/libcxx/include/string_view index 16989dba1b3..167805405ef 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/string_view +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/string_view @@ -183,9 +183,11 @@ namespace std { #include "__fwd/string_view.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/strstream b/libcudacxx/include/cuda/std/detail/libcxx/include/strstream index 6604c82aef2..aaeb4e063d6 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/strstream +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/strstream @@ -130,9 +130,11 @@ private: #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/system_error b/libcudacxx/include/cuda/std/detail/libcxx/include/system_error index 73130a53c5c..c7283f4f5b1 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/system_error +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/system_error @@ -148,9 +148,11 @@ template <> struct hash; #include <__functional_base> #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/tgmath.h b/libcudacxx/include/cuda/std/detail/libcxx/include/tgmath.h index a2f03bc906e..3e804cdbc28 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/tgmath.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/tgmath.h @@ -19,9 +19,11 @@ #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifdef __cplusplus diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/thread b/libcudacxx/include/cuda/std/detail/libcxx/include/thread index 8adcfd49a21..4b05aead9a4 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/thread +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/thread @@ -96,9 +96,11 @@ void sleep_for(const chrono::duration& rel_time); #include <__threading_support> #include <__debug> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/tuple b/libcudacxx/include/cuda/std/detail/libcxx/include/tuple index 1e507edf140..bb2c8d0e241 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/tuple +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/tuple @@ -187,9 +187,11 @@ template #include <__pragma_push> #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/type_traits b/libcudacxx/include/cuda/std/detail/libcxx/include/type_traits index a4814ac2066..062c344a82e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/type_traits +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/type_traits @@ -561,9 +561,11 @@ namespace std #include "cstddef" #include "version" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/typeindex b/libcudacxx/include/cuda/std/detail/libcxx/include/typeindex index 37f3c47ad1e..c28ce638ade 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/typeindex +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/typeindex @@ -48,9 +48,11 @@ struct hash #include #include <__functional_base> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/typeinfo b/libcudacxx/include/cuda/std/detail/libcxx/include/typeinfo index 81855efa921..83ac67ff077 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/typeinfo +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/typeinfo @@ -64,9 +64,11 @@ public: #include #endif -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if defined(_LIBCUDACXX_ABI_VCRUNTIME) #include diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/unordered_map b/libcudacxx/include/cuda/std/detail/libcxx/include/unordered_map index 06c6222525c..fa3f41a9f6b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/unordered_map +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/unordered_map @@ -415,9 +415,11 @@ template #include <__debug> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/unordered_set b/libcudacxx/include/cuda/std/detail/libcxx/include/unordered_set index ed8a2a6044b..996aedbec2e 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/unordered_set +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/unordered_set @@ -368,9 +368,11 @@ template #include <__debug> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_BEGIN_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/utility b/libcudacxx/include/cuda/std/detail/libcxx/include/utility index fc5d846e897..fe81a993cc1 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/utility +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/utility @@ -292,8 +292,10 @@ template #include "__tuple_dir/tuple_element.h" #include "__tuple_dir/tuple_size.h" -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #endif // _LIBCUDACXX_UTILITY diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/valarray b/libcudacxx/include/cuda/std/detail/libcxx/include/valarray index 82a34d70437..728f4a6134d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/valarray +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/valarray @@ -361,9 +361,11 @@ template unspecified2 end(const valarray& v); // [valarray.syn] #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/variant b/libcudacxx/include/cuda/std/detail/libcxx/include/variant index a799e753b54..403d7122eff 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/variant +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/variant @@ -208,9 +208,11 @@ namespace std { #include #include -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/vector b/libcudacxx/include/cuda/std/detail/libcxx/include/vector index 3b975c5dc8f..f18ce0d8602 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/vector +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/vector @@ -286,9 +286,11 @@ template #include <__debug> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/version b/libcudacxx/include/cuda/std/detail/libcxx/include/version index d6b4b45fdba..a2c91e81cd2 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/version +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/version @@ -215,9 +215,11 @@ __cpp_lib_void_t 201411L #endif #endif // __cuda_std__ -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC // We define certain feature test macros depending on availability. When // __CUDA_MINIMUM_ARCH__ is not available, we define the following features diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/wchar.h b/libcudacxx/include/cuda/std/detail/libcxx/include/wchar.h index 999837c3893..4981c861720 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/wchar.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/wchar.h @@ -9,9 +9,11 @@ #if defined(__need_wint_t) || defined(__need_mbstate_t) -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next @@ -107,9 +109,11 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len, #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #ifdef __cplusplus #define __CORRECT_ISO_CPP_WCHAR_H_PROTO diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/wctype.h b/libcudacxx/include/cuda/std/detail/libcxx/include/wctype.h index ad4a88a38ae..dd5c13cc85d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/wctype.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/wctype.h @@ -46,9 +46,11 @@ wctrans_t wctrans(const char* property); #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include_next diff --git a/libcudacxx/libcxx/utils/generate_feature_test_macro_components.py b/libcudacxx/libcxx/utils/generate_feature_test_macro_components.py index b34d05501b7..2e1b6d8a42b 100755 --- a/libcudacxx/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcudacxx/libcxx/utils/generate_feature_test_macro_components.py @@ -716,9 +716,11 @@ def produce_version_header(): #include <__config> -#if defined(_LIBCUDACXX_USE_PRAGMA_GCC_SYSTEM_HEADER) +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) #pragma GCC system_header -#endif +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if _LIBCUDACXX_STD_VER > 11 {cxx14_macros} diff --git a/thrust/cmake/ThrustBuildCompilerTargets.cmake b/thrust/cmake/ThrustBuildCompilerTargets.cmake index f65cb1bd95b..0473b3a5057 100644 --- a/thrust/cmake/ThrustBuildCompilerTargets.cmake +++ b/thrust/cmake/ThrustBuildCompilerTargets.cmake @@ -26,6 +26,9 @@ function(thrust_build_compiler_targets) thrust_update_system_found_flags() + # Ensure that we build our tests without treating ourself as system header + list(APPEND cxx_compile_definitions "_CCCL_NO_SYSTEM_HEADER") + if ("MSVC" STREQUAL "${CMAKE_CXX_COMPILER_ID}") append_option_if_available("/W4" cxx_compile_options) diff --git a/thrust/thrust/addressof.h b/thrust/thrust/addressof.h index d21df0c76a5..ac1af8a3aec 100644 --- a/thrust/thrust/addressof.h +++ b/thrust/thrust/addressof.h @@ -7,6 +7,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_CPP_DIALECT >= 2011 # include #endif @@ -19,7 +25,7 @@ THRUST_NAMESPACE_BEGIN */ template __host__ __device__ -T* addressof(T& arg) +T* addressof(T& arg) { return reinterpret_cast( &const_cast(reinterpret_cast(arg)) diff --git a/thrust/thrust/adjacent_difference.h b/thrust/thrust/adjacent_difference.h index e8385c240dd..6aa67465554 100644 --- a/thrust/thrust/adjacent_difference.h +++ b/thrust/thrust/adjacent_difference.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -81,7 +87,7 @@ THRUST_NAMESPACE_BEGIN template __host__ __device__ OutputIterator adjacent_difference(const thrust::detail::execution_policy_base &exec, - InputIterator first, InputIterator last, + InputIterator first, InputIterator last, OutputIterator result); /*! \p adjacent_difference calculates the differences of adjacent elements in the @@ -89,7 +95,7 @@ OutputIterator adjacent_difference(const thrust::detail::execution_policy_base\*result, and, for each iterator \p i in the range * [first + 1, last), binary_op(\*i, \*(i - 1)) is assigned to * \*(result + (i - first)). - * + * * This version of \p adjacent_difference uses the binary function \p binary_op to * calculate differences. * @@ -183,7 +189,7 @@ OutputIterator adjacent_difference(const thrust::detail::execution_policy_base -OutputIterator adjacent_difference(InputIterator first, InputIterator last, +OutputIterator adjacent_difference(InputIterator first, InputIterator last, OutputIterator result); /*! \p adjacent_difference calculates the differences of adjacent elements in the @@ -191,7 +197,7 @@ OutputIterator adjacent_difference(InputIterator first, InputIterator last, * \*result, and, for each iterator \p i in the range * [first + 1, last), binary_op(\*i, \*(i - 1)) is assigned to * \*(result + (i - first)). - * + * * This version of \p adjacent_difference uses the binary function \p binary_op to * calculate differences. * diff --git a/thrust/thrust/advance.h b/thrust/thrust/advance.h index a5162e20300..e7b36236522 100644 --- a/thrust/thrust/advance.h +++ b/thrust/thrust/advance.h @@ -23,6 +23,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN /*! \addtogroup iterators diff --git a/thrust/thrust/allocate_unique.h b/thrust/thrust/allocate_unique.h index ff10cb51cd1..bd3ca33ded7 100644 --- a/thrust/thrust/allocate_unique.h +++ b/thrust/thrust/allocate_unique.h @@ -6,6 +6,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 @@ -245,7 +251,7 @@ struct array_allocator_delete final allocator_type alloc_; std::size_t count_; }; - + template using uninitialized_array_allocator_delete = array_allocator_delete; diff --git a/thrust/thrust/async/copy.h b/thrust/thrust/async/copy.h index a8edc7411e5..5fc18424c74 100644 --- a/thrust/thrust/async/copy.h +++ b/thrust/thrust/async/copy.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/async/for_each.h b/thrust/thrust/async/for_each.h index 0d3b3a18905..8dd198c15b3 100644 --- a/thrust/thrust/async/for_each.h +++ b/thrust/thrust/async/for_each.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/async/reduce.h b/thrust/thrust/async/reduce.h index 8f4fe3133e6..893c3c5b132 100644 --- a/thrust/thrust/async/reduce.h +++ b/thrust/thrust/async/reduce.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/async/scan.h b/thrust/thrust/async/scan.h index 1bcf8125780..56ef43f317a 100644 --- a/thrust/thrust/async/scan.h +++ b/thrust/thrust/async/scan.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/async/sort.h b/thrust/thrust/async/sort.h index 8881793970b..551f599035e 100644 --- a/thrust/thrust/async/sort.h +++ b/thrust/thrust/async/sort.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/async/transform.h b/thrust/thrust/async/transform.h index de72549bf01..3f4d2af526c 100644 --- a/thrust/thrust/async/transform.h +++ b/thrust/thrust/async/transform.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/binary_search.h b/thrust/thrust/binary_search.h index 7a4746e0b16..c6633ce18fd 100644 --- a/thrust/thrust/binary_search.h +++ b/thrust/thrust/binary_search.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -43,18 +49,18 @@ THRUST_NAMESPACE_BEGIN */ -////////////////////// +////////////////////// // Scalar Functions // ////////////////////// /*! \p lower_bound is a version of binary search: it attempts to find - * the element value in an ordered range [first, last). + * the element value in an ordered range [first, last). * Specifically, it returns the first position where value could be - * inserted without violating the ordering. This version of + * inserted without violating the ordering. This version of * \p lower_bound uses operator< for comparison and returns * the furthermost iterator \c i in [first, last) such that, - * for every iterator \c j in [first, i), *j < value. + * for every iterator \c j in [first, i), *j < value. * * The algorithm's execution is parallelized as determined by \p exec. * @@ -63,10 +69,10 @@ THRUST_NAMESPACE_BEGIN * \param last The end of the ordered sequence. * \param value The value to be searched. * \return The furthermost iterator \c i, such that *i < value. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. - * \tparam LessThanComparable is a model of LessThanComparable. + * \tparam LessThanComparable is a model of LessThanComparable. * * The following code snippet demonstrates how to use \p lower_bound * to search for values in a ordered range using the \p thrust::device execution policy for parallelization: @@ -106,20 +112,20 @@ ForwardIterator lower_bound(const thrust::detail::execution_policy_base[first, last). + * the element value in an ordered range [first, last). * Specifically, it returns the first position where value could be - * inserted without violating the ordering. This version of + * inserted without violating the ordering. This version of * \p lower_bound uses operator< for comparison and returns * the furthermost iterator \c i in [first, last) such that, - * for every iterator \c j in [first, i), *j < value. + * for every iterator \c j in [first, i), *j < value. * * \param first The beginning of the ordered sequence. * \param last The end of the ordered sequence. * \param value The value to be searched. * \return The furthermost iterator \c i, such that *i < value. - * + * * \tparam ForwardIterator is a model of Forward Iterator. - * \tparam LessThanComparable is a model of LessThanComparable. + * \tparam LessThanComparable is a model of LessThanComparable. * * The following code snippet demonstrates how to use \p lower_bound * to search for values in a ordered range. @@ -150,19 +156,19 @@ ForwardIterator lower_bound(const thrust::detail::execution_policy_base -ForwardIterator lower_bound(ForwardIterator first, +ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, const LessThanComparable& value); /*! \p lower_bound is a version of binary search: it attempts to find - * the element value in an ordered range [first, last). + * the element value in an ordered range [first, last). * Specifically, it returns the first position where value could be - * inserted without violating the ordering. This version of - * \p lower_bound uses function object \c comp for comparison + * inserted without violating the ordering. This version of + * \p lower_bound uses function object \c comp for comparison * and returns the furthermost iterator \c i in [first, last) - * such that, for every iterator \c j in [first, i), - * comp(*j, value) is \c true. + * such that, for every iterator \c j in [first, i), + * comp(*j, value) is \c true. * * The algorithm's execution is parallelized as determined by \p exec. * @@ -172,7 +178,7 @@ ForwardIterator lower_bound(ForwardIterator first, * \param value The value to be searched. * \param comp The comparison operator. * \return The furthermost iterator \c i, such that comp(*i, value) is \c true. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. * \tparam T is comparable to \p ForwardIterator's \c value_type. @@ -218,20 +224,20 @@ ForwardIterator lower_bound(const thrust::detail::execution_policy_base[first, last). + * the element value in an ordered range [first, last). * Specifically, it returns the first position where value could be - * inserted without violating the ordering. This version of - * \p lower_bound uses function object \c comp for comparison + * inserted without violating the ordering. This version of + * \p lower_bound uses function object \c comp for comparison * and returns the furthermost iterator \c i in [first, last) - * such that, for every iterator \c j in [first, i), - * comp(*j, value) is \c true. + * such that, for every iterator \c j in [first, i), + * comp(*j, value) is \c true. * * \param first The beginning of the ordered sequence. * \param last The end of the ordered sequence. * \param value The value to be searched. * \param comp The comparison operator. * \return The furthermost iterator \c i, such that comp(*i, value) is \c true. - * + * * \tparam ForwardIterator is a model of Forward Iterator. * \tparam T is comparable to \p ForwardIterator's \c value_type. * \tparam StrictWeakOrdering is a model of Strict Weak Ordering. @@ -268,14 +274,14 @@ ForwardIterator lower_bound(const thrust::detail::execution_policy_base ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, - const T& value, + const T& value, StrictWeakOrdering comp); /*! \p upper_bound is a version of binary search: it attempts to find - * the element value in an ordered range [first, last). + * the element value in an ordered range [first, last). * Specifically, it returns the last position where value could be - * inserted without violating the ordering. This version of + * inserted without violating the ordering. This version of * \p upper_bound uses operator< for comparison and returns * the furthermost iterator \c i in [first, last) such that, * for every iterator \c j in [first, i), value < *j @@ -288,10 +294,10 @@ ForwardIterator lower_bound(ForwardIterator first, * \param last The end of the ordered sequence. * \param value The value to be searched. * \return The furthermost iterator \c i, such that value < *i is \c false. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. - * \tparam LessThanComparable is a model of LessThanComparable. + * \tparam LessThanComparable is a model of LessThanComparable. * * The following code snippet demonstrates how to use \p upper_bound * to search for values in a ordered range using the \p thrust::device execution policy for parallelism: @@ -331,9 +337,9 @@ ForwardIterator upper_bound(const thrust::detail::execution_policy_base[first, last). + * the element value in an ordered range [first, last). * Specifically, it returns the last position where value could be - * inserted without violating the ordering. This version of + * inserted without violating the ordering. This version of * \p upper_bound uses operator< for comparison and returns * the furthermost iterator \c i in [first, last) such that, * for every iterator \c j in [first, i), value < *j @@ -343,9 +349,9 @@ ForwardIterator upper_bound(const thrust::detail::execution_policy_basevalue < *i is \c false. - * + * * \tparam ForwardIterator is a model of Forward Iterator. - * \tparam LessThanComparable is a model of LessThanComparable. + * \tparam LessThanComparable is a model of LessThanComparable. * * The following code snippet demonstrates how to use \p upper_bound * to search for values in a ordered range. @@ -376,15 +382,15 @@ ForwardIterator upper_bound(const thrust::detail::execution_policy_base -ForwardIterator upper_bound(ForwardIterator first, +ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, const LessThanComparable& value); /*! \p upper_bound is a version of binary search: it attempts to find - * the element value in an ordered range [first, last). + * the element value in an ordered range [first, last). * Specifically, it returns the last position where value could be - * inserted without violating the ordering. This version of + * inserted without violating the ordering. This version of * \p upper_bound uses function object \c comp for comparison and returns * the furthermost iterator \c i in [first, last) such that, * for every iterator \c j in [first, i), comp(value, *j) @@ -398,7 +404,7 @@ ForwardIterator upper_bound(ForwardIterator first, * \param value The value to be searched. * \param comp The comparison operator. * \return The furthermost iterator \c i, such that comp(value, *i) is \c false. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. * \tparam T is comparable to \p ForwardIterator's \c value_type. @@ -443,9 +449,9 @@ ForwardIterator upper_bound(const thrust::detail::execution_policy_base[first, last). + * the element value in an ordered range [first, last). * Specifically, it returns the last position where value could be - * inserted without violating the ordering. This version of + * inserted without violating the ordering. This version of * \p upper_bound uses function object \c comp for comparison and returns * the furthermost iterator \c i in [first, last) such that, * for every iterator \c j in [first, i), comp(value, *j) @@ -456,7 +462,7 @@ ForwardIterator upper_bound(const thrust::detail::execution_policy_basecomp(value, *i) is \c false. - * + * * \tparam ForwardIterator is a model of Forward Iterator. * \tparam T is comparable to \p ForwardIterator's \c value_type. * \tparam StrictWeakOrdering is a model of Strict Weak Ordering. @@ -493,16 +499,16 @@ ForwardIterator upper_bound(const thrust::detail::execution_policy_base ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, - const T& value, + const T& value, StrictWeakOrdering comp); /*! \p binary_search is a version of binary search: it attempts to find - * the element value in an ordered range [first, last). - * It returns \c true if an element that is equivalent to \c value + * the element value in an ordered range [first, last). + * It returns \c true if an element that is equivalent to \c value * is present in [first, last) and \c false if no such element - * exists. Specifically, this version returns \c true if and only if - * there exists an iterator \c i in [first, last) such that + * exists. Specifically, this version returns \c true if and only if + * there exists an iterator \c i in [first, last) such that * *i < value and value < *i are both \c false. * * The algorithm's execution is parallelized as determined by \p exec. @@ -512,10 +518,10 @@ ForwardIterator upper_bound(ForwardIterator first, * \param last The end of the ordered sequence. * \param value The value to be searched. * \return \c true if an equivalent element exists in [first, last), otherwise \c false. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. - * \tparam LessThanComparable is a model of LessThanComparable. + * \tparam LessThanComparable is a model of LessThanComparable. * * The following code snippet demonstrates how to use \p binary_search * to search for values in a ordered range using the \p thrust::device execution policy for parallelization: @@ -549,26 +555,26 @@ ForwardIterator upper_bound(ForwardIterator first, template __host__ __device__ bool binary_search(const thrust::detail::execution_policy_base &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, const LessThanComparable& value); /*! \p binary_search is a version of binary search: it attempts to find - * the element value in an ordered range [first, last). - * It returns \c true if an element that is equivalent to \c value + * the element value in an ordered range [first, last). + * It returns \c true if an element that is equivalent to \c value * is present in [first, last) and \c false if no such element - * exists. Specifically, this version returns \c true if and only if - * there exists an iterator \c i in [first, last) such that + * exists. Specifically, this version returns \c true if and only if + * there exists an iterator \c i in [first, last) such that * *i < value and value < *i are both \c false. * * \param first The beginning of the ordered sequence. * \param last The end of the ordered sequence. * \param value The value to be searched. * \return \c true if an equivalent element exists in [first, last), otherwise \c false. - * + * * \tparam ForwardIterator is a model of Forward Iterator. - * \tparam LessThanComparable is a model of LessThanComparable. + * \tparam LessThanComparable is a model of LessThanComparable. * * The following code snippet demonstrates how to use \p binary_search * to search for values in a ordered range. @@ -599,17 +605,17 @@ bool binary_search(const thrust::detail::execution_policy_base &e * \see \p equal_range */ template -bool binary_search(ForwardIterator first, +bool binary_search(ForwardIterator first, ForwardIterator last, const LessThanComparable& value); /*! \p binary_search is a version of binary search: it attempts to find - * the element value in an ordered range [first, last). - * It returns \c true if an element that is equivalent to \c value + * the element value in an ordered range [first, last). + * It returns \c true if an element that is equivalent to \c value * is present in [first, last) and \c false if no such element - * exists. Specifically, this version returns \c true if and only if - * there exists an iterator \c i in [first, last) such that + * exists. Specifically, this version returns \c true if and only if + * there exists an iterator \c i in [first, last) such that * comp(*i, value) and comp(value, *i) are both \c false. * * The algorithm's execution is parallelized as determined by \p exec. @@ -620,7 +626,7 @@ bool binary_search(ForwardIterator first, * \param value The value to be searched. * \param comp The comparison operator. * \return \c true if an equivalent element exists in [first, last), otherwise \c false. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. * \tparam T is comparable to \p ForwardIterator's \c value_type. @@ -661,16 +667,16 @@ __host__ __device__ bool binary_search(const thrust::detail::execution_policy_base &exec, ForwardIterator first, ForwardIterator last, - const T& value, + const T& value, StrictWeakOrdering comp); /*! \p binary_search is a version of binary search: it attempts to find - * the element value in an ordered range [first, last). - * It returns \c true if an element that is equivalent to \c value + * the element value in an ordered range [first, last). + * It returns \c true if an element that is equivalent to \c value * is present in [first, last) and \c false if no such element - * exists. Specifically, this version returns \c true if and only if - * there exists an iterator \c i in [first, last) such that + * exists. Specifically, this version returns \c true if and only if + * there exists an iterator \c i in [first, last) such that * comp(*i, value) and comp(value, *i) are both \c false. * * \param first The beginning of the ordered sequence. @@ -678,7 +684,7 @@ bool binary_search(const thrust::detail::execution_policy_base &e * \param value The value to be searched. * \param comp The comparison operator. * \return \c true if an equivalent element exists in [first, last), otherwise \c false. - * + * * \tparam ForwardIterator is a model of Forward Iterator. * \tparam T is comparable to \p ForwardIterator's \c value_type. * \tparam StrictWeakOrdering is a model of Strict Weak Ordering. @@ -715,29 +721,29 @@ bool binary_search(const thrust::detail::execution_policy_base &e template bool binary_search(ForwardIterator first, ForwardIterator last, - const T& value, + const T& value, StrictWeakOrdering comp); /*! \p equal_range is a version of binary search: it attempts to find - * the element value in an ordered range [first, last). The + * the element value in an ordered range [first, last). The * value returned by \p equal_range is essentially a combination of * the values returned by \p lower_bound and \p upper_bound: it returns * a \p pair of iterators \c i and \c j such that \c i is the first - * position where value could be inserted without violating the + * position where value could be inserted without violating the * ordering and \c j is the last position where value could be inserted * without violating the ordering. It follows that every element in the - * range [i, j) is equivalent to value, and that + * range [i, j) is equivalent to value, and that * [i, j) is the largest subrange of [first, last) that - * has this property. + * has this property. * - * This version of \p equal_range returns a \p pair of iterators - * [i, j), where \c i is the furthermost iterator in - * [first, last) such that, for every iterator \c k in + * This version of \p equal_range returns a \p pair of iterators + * [i, j), where \c i is the furthermost iterator in + * [first, last) such that, for every iterator \c k in * [first, i), *k < value. \c j is the furthermost - * iterator in [first, last) such that, for every iterator - * \c k in [first, j), value < *k is \c false. - * For every iterator \c k in [i, j), neither + * iterator in [first, last) such that, for every iterator + * \c k in [first, j), value < *k is \c false. + * For every iterator \c k in [i, j), neither * value < *k nor *k < value is \c true. * * The algorithm's execution is parallelized as determined by \p exec. @@ -747,10 +753,10 @@ bool binary_search(ForwardIterator first, * \param last The end of the ordered sequence. * \param value The value to be searched. * \return A \p pair of iterators [i, j) that define the range of equivalent elements. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. - * \tparam LessThanComparable is a model of LessThanComparable. + * \tparam LessThanComparable is a model of LessThanComparable. * * The following code snippet demonstrates how to use \p equal_range * to search for values in a ordered range using the \p thrust::device execution policy for parallelization: @@ -791,33 +797,33 @@ equal_range(const thrust::detail::execution_policy_base &exec, /*! \p equal_range is a version of binary search: it attempts to find - * the element value in an ordered range [first, last). The + * the element value in an ordered range [first, last). The * value returned by \p equal_range is essentially a combination of * the values returned by \p lower_bound and \p upper_bound: it returns * a \p pair of iterators \c i and \c j such that \c i is the first - * position where value could be inserted without violating the + * position where value could be inserted without violating the * ordering and \c j is the last position where value could be inserted * without violating the ordering. It follows that every element in the - * range [i, j) is equivalent to value, and that + * range [i, j) is equivalent to value, and that * [i, j) is the largest subrange of [first, last) that - * has this property. + * has this property. * - * This version of \p equal_range returns a \p pair of iterators - * [i, j), where \c i is the furthermost iterator in - * [first, last) such that, for every iterator \c k in + * This version of \p equal_range returns a \p pair of iterators + * [i, j), where \c i is the furthermost iterator in + * [first, last) such that, for every iterator \c k in * [first, i), *k < value. \c j is the furthermost - * iterator in [first, last) such that, for every iterator - * \c k in [first, j), value < *k is \c false. - * For every iterator \c k in [i, j), neither + * iterator in [first, last) such that, for every iterator + * \c k in [first, j), value < *k is \c false. + * For every iterator \c k in [i, j), neither * value < *k nor *k < value is \c true. * * \param first The beginning of the ordered sequence. * \param last The end of the ordered sequence. * \param value The value to be searched. * \return A \p pair of iterators [i, j) that define the range of equivalent elements. - * + * * \tparam ForwardIterator is a model of Forward Iterator. - * \tparam LessThanComparable is a model of LessThanComparable. + * \tparam LessThanComparable is a model of LessThanComparable. * * The following code snippet demonstrates how to use \p equal_range * to search for values in a ordered range. @@ -855,25 +861,25 @@ equal_range(ForwardIterator first, /*! \p equal_range is a version of binary search: it attempts to find - * the element value in an ordered range [first, last). The + * the element value in an ordered range [first, last). The * value returned by \p equal_range is essentially a combination of * the values returned by \p lower_bound and \p upper_bound: it returns * a \p pair of iterators \c i and \c j such that \c i is the first - * position where value could be inserted without violating the + * position where value could be inserted without violating the * ordering and \c j is the last position where value could be inserted * without violating the ordering. It follows that every element in the - * range [i, j) is equivalent to value, and that + * range [i, j) is equivalent to value, and that * [i, j) is the largest subrange of [first, last) that - * has this property. + * has this property. * - * This version of \p equal_range returns a \p pair of iterators - * [i, j). \c i is the furthermost iterator in - * [first, last) such that, for every iterator \c k in + * This version of \p equal_range returns a \p pair of iterators + * [i, j). \c i is the furthermost iterator in + * [first, last) such that, for every iterator \c k in * [first, i), comp(*k, value) is \c true. * \c j is the furthermost iterator in [first, last) such - * that, for every iterator \c k in [first, last), - * comp(value, *k) is \c false. For every iterator \c k - * in [i, j), neither comp(value, *k) nor + * that, for every iterator \c k in [first, last), + * comp(value, *k) is \c false. For every iterator \c k + * in [i, j), neither comp(value, *k) nor * comp(*k, value) is \c true. * * The algorithm's execution is parallelized as determined by \p exec. @@ -884,7 +890,7 @@ equal_range(ForwardIterator first, * \param value The value to be searched. * \param comp The comparison operator. * \return A \p pair of iterators [i, j) that define the range of equivalent elements. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. * \tparam T is comparable to \p ForwardIterator's \c value_type. @@ -931,25 +937,25 @@ equal_range(const thrust::detail::execution_policy_base &exec, /*! \p equal_range is a version of binary search: it attempts to find - * the element value in an ordered range [first, last). The + * the element value in an ordered range [first, last). The * value returned by \p equal_range is essentially a combination of * the values returned by \p lower_bound and \p upper_bound: it returns * a \p pair of iterators \c i and \c j such that \c i is the first - * position where value could be inserted without violating the + * position where value could be inserted without violating the * ordering and \c j is the last position where value could be inserted * without violating the ordering. It follows that every element in the - * range [i, j) is equivalent to value, and that + * range [i, j) is equivalent to value, and that * [i, j) is the largest subrange of [first, last) that - * has this property. + * has this property. * - * This version of \p equal_range returns a \p pair of iterators - * [i, j). \c i is the furthermost iterator in - * [first, last) such that, for every iterator \c k in + * This version of \p equal_range returns a \p pair of iterators + * [i, j). \c i is the furthermost iterator in + * [first, last) such that, for every iterator \c k in * [first, i), comp(*k, value) is \c true. * \c j is the furthermost iterator in [first, last) such - * that, for every iterator \c k in [first, last), - * comp(value, *k) is \c false. For every iterator \c k - * in [i, j), neither comp(value, *k) nor + * that, for every iterator \c k in [first, last), + * comp(value, *k) is \c false. For every iterator \c k + * in [i, j), neither comp(value, *k) nor * comp(*k, value) is \c true. * * \param first The beginning of the ordered sequence. @@ -957,7 +963,7 @@ equal_range(const thrust::detail::execution_policy_base &exec, * \param value The value to be searched. * \param comp The comparison operator. * \return A \p pair of iterators [i, j) that define the range of equivalent elements. - * + * * \tparam ForwardIterator is a model of Forward Iterator. * \tparam T is comparable to \p ForwardIterator's \c value_type. * \tparam StrictWeakOrdering is a model of Strict Weak Ordering. @@ -1010,7 +1016,7 @@ equal_range(ForwardIterator first, ////////////////////// -/*! \p lower_bound is a vectorized version of binary search: for each +/*! \p lower_bound is a vectorized version of binary search: for each * iterator \c v in [values_first, values_last) it attempts to * find the value *v in an ordered range [first, last). * Specifically, it returns the index of first position where value could @@ -1024,7 +1030,7 @@ equal_range(ForwardIterator first, * \param values_first The beginning of the search values sequence. * \param values_last The end of the search values sequence. * \param result The beginning of the output sequence. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. * \tparam InputIterator is a model of Input Iterator. @@ -1052,7 +1058,7 @@ equal_range(ForwardIterator first, * input[4] = 8; * * thrust::device_vector values(6); - * values[0] = 0; + * values[0] = 0; * values[1] = 1; * values[2] = 2; * values[3] = 3; @@ -1077,14 +1083,14 @@ equal_range(ForwardIterator first, template __host__ __device__ OutputIterator lower_bound(const thrust::detail::execution_policy_base &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, - InputIterator values_first, + InputIterator values_first, InputIterator values_last, OutputIterator result); -/*! \p lower_bound is a vectorized version of binary search: for each +/*! \p lower_bound is a vectorized version of binary search: for each * iterator \c v in [values_first, values_last) it attempts to * find the value *v in an ordered range [first, last). * Specifically, it returns the index of first position where value could @@ -1095,7 +1101,7 @@ OutputIterator lower_bound(const thrust::detail::execution_policy_baseForward Iterator. * \tparam InputIterator is a model of Input Iterator. * and \c InputIterator's \c value_type is LessThanComparable. @@ -1120,7 +1126,7 @@ OutputIterator lower_bound(const thrust::detail::execution_policy_base values(6); - * values[0] = 0; + * values[0] = 0; * values[1] = 1; * values[2] = 2; * values[3] = 3; @@ -1142,18 +1148,18 @@ OutputIterator lower_bound(const thrust::detail::execution_policy_base -OutputIterator lower_bound(ForwardIterator first, +OutputIterator lower_bound(ForwardIterator first, ForwardIterator last, - InputIterator values_first, + InputIterator values_first, InputIterator values_last, OutputIterator result); -/*! \p lower_bound is a vectorized version of binary search: for each +/*! \p lower_bound is a vectorized version of binary search: for each * iterator \c v in [values_first, values_last) it attempts to * find the value *v in an ordered range [first, last). * Specifically, it returns the index of first position where value could - * be inserted without violating the ordering. This version of + * be inserted without violating the ordering. This version of * \p lower_bound uses function object \c comp for comparison. * * The algorithm's execution is parallelized as determined by \p exec. @@ -1165,7 +1171,7 @@ OutputIterator lower_bound(ForwardIterator first, * \param values_last The end of the search values sequence. * \param result The beginning of the output sequence. * \param comp The comparison operator. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. * \tparam InputIterator is a model of Input Iterator. @@ -1194,7 +1200,7 @@ OutputIterator lower_bound(ForwardIterator first, * input[4] = 8; * * thrust::device_vector values(6); - * values[0] = 0; + * values[0] = 0; * values[1] = 1; * values[2] = 2; * values[3] = 3; @@ -1204,7 +1210,7 @@ OutputIterator lower_bound(ForwardIterator first, * thrust::device_vector output(6); * * thrust::lower_bound(input.begin(), input.end(), - * values.begin(), values.end(), + * values.begin(), values.end(), * output.begin(), * thrust::less()); * @@ -1219,19 +1225,19 @@ OutputIterator lower_bound(ForwardIterator first, template __host__ __device__ OutputIterator lower_bound(const thrust::detail::execution_policy_base &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, - InputIterator values_first, + InputIterator values_first, InputIterator values_last, OutputIterator result, StrictWeakOrdering comp); -/*! \p lower_bound is a vectorized version of binary search: for each +/*! \p lower_bound is a vectorized version of binary search: for each * iterator \c v in [values_first, values_last) it attempts to * find the value *v in an ordered range [first, last). * Specifically, it returns the index of first position where value could - * be inserted without violating the ordering. This version of + * be inserted without violating the ordering. This version of * \p lower_bound uses function object \c comp for comparison. * * \param first The beginning of the ordered sequence. @@ -1240,7 +1246,7 @@ OutputIterator lower_bound(const thrust::detail::execution_policy_baseForward Iterator. * \tparam InputIterator is a model of Input Iterator. * and \c InputIterator's \c value_type is comparable to \p ForwardIterator's \c value_type. @@ -1267,7 +1273,7 @@ OutputIterator lower_bound(const thrust::detail::execution_policy_base values(6); - * values[0] = 0; + * values[0] = 0; * values[1] = 1; * values[2] = 2; * values[3] = 3; @@ -1277,7 +1283,7 @@ OutputIterator lower_bound(const thrust::detail::execution_policy_base output(6); * * thrust::lower_bound(input.begin(), input.end(), - * values.begin(), values.end(), + * values.begin(), values.end(), * output.begin(), * thrust::less()); * @@ -1290,15 +1296,15 @@ OutputIterator lower_bound(const thrust::detail::execution_policy_base -OutputIterator lower_bound(ForwardIterator first, +OutputIterator lower_bound(ForwardIterator first, ForwardIterator last, - InputIterator values_first, + InputIterator values_first, InputIterator values_last, OutputIterator result, StrictWeakOrdering comp); -/*! \p upper_bound is a vectorized version of binary search: for each +/*! \p upper_bound is a vectorized version of binary search: for each * iterator \c v in [values_first, values_last) it attempts to * find the value *v in an ordered range [first, last). * Specifically, it returns the index of last position where value could @@ -1312,7 +1318,7 @@ OutputIterator lower_bound(ForwardIterator first, * \param values_first The beginning of the search values sequence. * \param values_last The end of the search values sequence. * \param result The beginning of the output sequence. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. * \tparam InputIterator is a model of Input Iterator. @@ -1340,7 +1346,7 @@ OutputIterator lower_bound(ForwardIterator first, * input[4] = 8; * * thrust::device_vector values(6); - * values[0] = 0; + * values[0] = 0; * values[1] = 1; * values[2] = 2; * values[3] = 3; @@ -1365,14 +1371,14 @@ OutputIterator lower_bound(ForwardIterator first, template __host__ __device__ OutputIterator upper_bound(const thrust::detail::execution_policy_base &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, - InputIterator values_first, + InputIterator values_first, InputIterator values_last, OutputIterator result); -/*! \p upper_bound is a vectorized version of binary search: for each +/*! \p upper_bound is a vectorized version of binary search: for each * iterator \c v in [values_first, values_last) it attempts to * find the value *v in an ordered range [first, last). * Specifically, it returns the index of last position where value could @@ -1383,7 +1389,7 @@ OutputIterator upper_bound(const thrust::detail::execution_policy_baseForward Iterator. * \tparam InputIterator is a model of Input Iterator. * and \c InputIterator's \c value_type is LessThanComparable. @@ -1408,7 +1414,7 @@ OutputIterator upper_bound(const thrust::detail::execution_policy_base values(6); - * values[0] = 0; + * values[0] = 0; * values[1] = 1; * values[2] = 2; * values[3] = 3; @@ -1430,18 +1436,18 @@ OutputIterator upper_bound(const thrust::detail::execution_policy_base -OutputIterator upper_bound(ForwardIterator first, +OutputIterator upper_bound(ForwardIterator first, ForwardIterator last, - InputIterator values_first, + InputIterator values_first, InputIterator values_last, OutputIterator result); -/*! \p upper_bound is a vectorized version of binary search: for each +/*! \p upper_bound is a vectorized version of binary search: for each * iterator \c v in [values_first, values_last) it attempts to * find the value *v in an ordered range [first, last). * Specifically, it returns the index of first position where value could - * be inserted without violating the ordering. This version of + * be inserted without violating the ordering. This version of * \p upper_bound uses function object \c comp for comparison. * * The algorithm's execution is parallelized as determined by \p exec. @@ -1453,7 +1459,7 @@ OutputIterator upper_bound(ForwardIterator first, * \param values_last The end of the search values sequence. * \param result The beginning of the output sequence. * \param comp The comparison operator. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. * \tparam InputIterator is a model of Input Iterator. @@ -1483,7 +1489,7 @@ OutputIterator upper_bound(ForwardIterator first, * input[4] = 8; * * thrust::device_vector values(6); - * values[0] = 0; + * values[0] = 0; * values[1] = 1; * values[2] = 2; * values[3] = 3; @@ -1494,7 +1500,7 @@ OutputIterator upper_bound(ForwardIterator first, * * thrust::upper_bound(thrust::device, * input.begin(), input.end(), - * values.begin(), values.end(), + * values.begin(), values.end(), * output.begin(), * thrust::less()); * @@ -1509,19 +1515,19 @@ OutputIterator upper_bound(ForwardIterator first, template __host__ __device__ OutputIterator upper_bound(const thrust::detail::execution_policy_base &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, - InputIterator values_first, + InputIterator values_first, InputIterator values_last, OutputIterator result, StrictWeakOrdering comp); -/*! \p upper_bound is a vectorized version of binary search: for each +/*! \p upper_bound is a vectorized version of binary search: for each * iterator \c v in [values_first, values_last) it attempts to * find the value *v in an ordered range [first, last). * Specifically, it returns the index of first position where value could - * be inserted without violating the ordering. This version of + * be inserted without violating the ordering. This version of * \p upper_bound uses function object \c comp for comparison. * * \param first The beginning of the ordered sequence. @@ -1530,7 +1536,7 @@ OutputIterator upper_bound(const thrust::detail::execution_policy_baseForward Iterator. * \tparam InputIterator is a model of Input Iterator. * and \c InputIterator's \c value_type is comparable to \p ForwardIterator's \c value_type. @@ -1557,7 +1563,7 @@ OutputIterator upper_bound(const thrust::detail::execution_policy_base values(6); - * values[0] = 0; + * values[0] = 0; * values[1] = 1; * values[2] = 2; * values[3] = 3; @@ -1567,7 +1573,7 @@ OutputIterator upper_bound(const thrust::detail::execution_policy_base output(6); * * thrust::upper_bound(input.begin(), input.end(), - * values.begin(), values.end(), + * values.begin(), values.end(), * output.begin(), * thrust::less()); * @@ -1580,18 +1586,18 @@ OutputIterator upper_bound(const thrust::detail::execution_policy_base -OutputIterator upper_bound(ForwardIterator first, +OutputIterator upper_bound(ForwardIterator first, ForwardIterator last, - InputIterator values_first, + InputIterator values_first, InputIterator values_last, OutputIterator result, StrictWeakOrdering comp); -/*! \p binary_search is a vectorized version of binary search: for each +/*! \p binary_search is a vectorized version of binary search: for each * iterator \c v in [values_first, values_last) it attempts to * find the value *v in an ordered range [first, last). - * It returns \c true if an element that is equivalent to \c value + * It returns \c true if an element that is equivalent to \c value * is present in [first, last) and \c false if no such element * exists. * @@ -1603,7 +1609,7 @@ OutputIterator upper_bound(ForwardIterator first, * \param values_first The beginning of the search values sequence. * \param values_last The end of the search values sequence. * \param result The beginning of the output sequence. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. * \tparam InputIterator is a model of Input Iterator. @@ -1631,7 +1637,7 @@ OutputIterator upper_bound(ForwardIterator first, * input[4] = 8; * * thrust::device_vector values(6); - * values[0] = 0; + * values[0] = 0; * values[1] = 1; * values[2] = 2; * values[3] = 3; @@ -1656,17 +1662,17 @@ OutputIterator upper_bound(ForwardIterator first, template __host__ __device__ OutputIterator binary_search(const thrust::detail::execution_policy_base &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, - InputIterator values_first, + InputIterator values_first, InputIterator values_last, OutputIterator result); -/*! \p binary_search is a vectorized version of binary search: for each +/*! \p binary_search is a vectorized version of binary search: for each * iterator \c v in [values_first, values_last) it attempts to * find the value *v in an ordered range [first, last). - * It returns \c true if an element that is equivalent to \c value + * It returns \c true if an element that is equivalent to \c value * is present in [first, last) and \c false if no such element * exists. * @@ -1675,7 +1681,7 @@ OutputIterator binary_search(const thrust::detail::execution_policy_baseForward Iterator. * \tparam InputIterator is a model of Input Iterator. * and \c InputIterator's \c value_type is LessThanComparable. @@ -1700,7 +1706,7 @@ OutputIterator binary_search(const thrust::detail::execution_policy_base values(6); - * values[0] = 0; + * values[0] = 0; * values[1] = 1; * values[2] = 2; * values[3] = 3; @@ -1722,19 +1728,19 @@ OutputIterator binary_search(const thrust::detail::execution_policy_base -OutputIterator binary_search(ForwardIterator first, +OutputIterator binary_search(ForwardIterator first, ForwardIterator last, - InputIterator values_first, + InputIterator values_first, InputIterator values_last, OutputIterator result); -/*! \p binary_search is a vectorized version of binary search: for each +/*! \p binary_search is a vectorized version of binary search: for each * iterator \c v in [values_first, values_last) it attempts to * find the value *v in an ordered range [first, last). - * It returns \c true if an element that is equivalent to \c value + * It returns \c true if an element that is equivalent to \c value * is present in [first, last) and \c false if no such element - * exists. This version of \p binary_search uses function object + * exists. This version of \p binary_search uses function object * \c comp for comparison. * * The algorithm's execution is parallelized as determined by \p exec. @@ -1746,7 +1752,7 @@ OutputIterator binary_search(ForwardIterator first, * \param values_last The end of the search values sequence. * \param result The beginning of the output sequence. * \param comp The comparison operator. - * + * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward Iterator. * \tparam InputIterator is a model of Input Iterator. @@ -1776,7 +1782,7 @@ OutputIterator binary_search(ForwardIterator first, * input[4] = 8; * * thrust::device_vector values(6); - * values[0] = 0; + * values[0] = 0; * values[1] = 1; * values[2] = 2; * values[3] = 3; @@ -1802,20 +1808,20 @@ OutputIterator binary_search(ForwardIterator first, template __host__ __device__ OutputIterator binary_search(const thrust::detail::execution_policy_base &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, - InputIterator values_first, + InputIterator values_first, InputIterator values_last, OutputIterator result, StrictWeakOrdering comp); -/*! \p binary_search is a vectorized version of binary search: for each +/*! \p binary_search is a vectorized version of binary search: for each * iterator \c v in [values_first, values_last) it attempts to * find the value *v in an ordered range [first, last). - * It returns \c true if an element that is equivalent to \c value + * It returns \c true if an element that is equivalent to \c value * is present in [first, last) and \c false if no such element - * exists. This version of \p binary_search uses function object + * exists. This version of \p binary_search uses function object * \c comp for comparison. * * \param first The beginning of the ordered sequence. @@ -1824,7 +1830,7 @@ OutputIterator binary_search(const thrust::detail::execution_policy_baseForward Iterator. * \tparam InputIterator is a model of Input Iterator. * and \c InputIterator's \c value_type is LessThanComparable. @@ -1851,7 +1857,7 @@ OutputIterator binary_search(const thrust::detail::execution_policy_base values(6); - * values[0] = 0; + * values[0] = 0; * values[1] = 1; * values[2] = 2; * values[3] = 3; @@ -1874,9 +1880,9 @@ OutputIterator binary_search(const thrust::detail::execution_policy_base -OutputIterator binary_search(ForwardIterator first, +OutputIterator binary_search(ForwardIterator first, ForwardIterator last, - InputIterator values_first, + InputIterator values_first, InputIterator values_last, OutputIterator result, StrictWeakOrdering comp); diff --git a/thrust/thrust/complex.h b/thrust/thrust/complex.h index 7f1c601c8f4..a400a6dbd7d 100644 --- a/thrust/thrust/complex.h +++ b/thrust/thrust/complex.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/copy.h b/thrust/thrust/copy.h index 99d488174dd..24f1ac78cfc 100644 --- a/thrust/thrust/copy.h +++ b/thrust/thrust/copy.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -140,7 +146,7 @@ __host__ __device__ OutputIterator result); - + /*! \p copy copies elements from the range [\p first, \p last) to the range * [\p result, \p result + (\p last - \p first)). That is, it performs * the assignments *\p result = *\p first, *(\p result + \c 1) = *(\p first + \c 1), diff --git a/thrust/thrust/count.h b/thrust/thrust/count.h index abf8b2d6c30..0512933cbbe 100644 --- a/thrust/thrust/count.h +++ b/thrust/thrust/count.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -57,7 +63,7 @@ THRUST_NAMESPACE_BEGIN * \tparam InputIterator must be a model of Input Iterator and \c InputIterator's \c value_type must be a model of must be a model of Equality Comparable. * \tparam EqualityComparable must be a model of Equality Comparable and can be compared for equality with \c InputIterator's \c value_type * - * The following code snippet demonstrates how to use \p count to + * The following code snippet demonstrates how to use \p count to * count the number of instances in a range of a value of interest using the \p thrust::device execution policy: * * \code @@ -70,7 +76,7 @@ THRUST_NAMESPACE_BEGIN * vec[1] = 1; * vec[3] = 1; * vec[4] = 1; - * + * * // count the 1s * int result = thrust::count(thrust::device, vec.begin(), vec.end(), 1); * // result == 3 @@ -97,7 +103,7 @@ __host__ __device__ * \tparam InputIterator must be a model of Input Iterator and \c InputIterator's \c value_type must be a model of must be a model of Equality Comparable. * \tparam EqualityComparable must be a model of Equality Comparable and can be compared for equality with \c InputIterator's \c value_type * - * The following code snippet demonstrates how to use \p count to + * The following code snippet demonstrates how to use \p count to * count the number of instances in a range of a value of interest. * \code * #include @@ -108,7 +114,7 @@ __host__ __device__ * vec[1] = 1; * vec[3] = 1; * vec[4] = 1; - * + * * // count the 1s * int result = thrust::count(vec.begin(), vec.end(), 1); * // result == 3 @@ -121,7 +127,7 @@ template count(InputIterator first, InputIterator last, const EqualityComparable& value); -/*! \p count_if finds the number of elements in [first,last) for which +/*! \p count_if finds the number of elements in [first,last) for which * a predicate is \c true. More precisely, \p count_if returns the number of iterators * \c i in [first, last) such that pred(*i) == true. * @@ -175,7 +181,7 @@ __host__ __device__ count_if(const thrust::detail::execution_policy_base &exec, InputIterator first, InputIterator last, Predicate pred); -/*! \p count_if finds the number of elements in [first,last) for which +/*! \p count_if finds the number of elements in [first,last) for which * a predicate is \c true. More precisely, \p count_if returns the number of iterators * \c i in [first, last) such that pred(*i) == true. * diff --git a/thrust/thrust/detail/adjacent_difference.inl b/thrust/thrust/detail/adjacent_difference.inl index 844687cff4c..1f604c07118 100644 --- a/thrust/thrust/detail/adjacent_difference.inl +++ b/thrust/thrust/detail/adjacent_difference.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/advance.inl b/thrust/thrust/detail/advance.inl index 7b5f261bdce..e73e9cd8035 100644 --- a/thrust/thrust/detail/advance.inl +++ b/thrust/thrust/detail/advance.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/algorithm_wrapper.h b/thrust/thrust/detail/algorithm_wrapper.h index c09b9a0a0b4..ad5efce8b06 100644 --- a/thrust/thrust/detail/algorithm_wrapper.h +++ b/thrust/thrust/detail/algorithm_wrapper.h @@ -16,6 +16,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // When a compiler uses Thrust as part of its implementation of Standard C++ // algorithms, a cycle of included files may result when Thrust code tries to // use a standard algorithm. Having a macro that is defined only when Thrust diff --git a/thrust/thrust/detail/alignment.h b/thrust/thrust/detail/alignment.h index 96fb8436a75..6b8f11b333f 100644 --- a/thrust/thrust/detail/alignment.h +++ b/thrust/thrust/detail/alignment.h @@ -21,12 +21,18 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include // For `integral_constant`. #include // For `std::size_t` and `std::max_align_t`. #if THRUST_CPP_DIALECT >= 2011 - #include // For `std::alignment_of`. + #include // For `std::alignment_of`. #endif THRUST_NAMESPACE_BEGIN @@ -36,7 +42,7 @@ namespace detail /// \p THRUST_ALIGNOF is a macro that takes a single type-id as a parameter, /// and returns the alignment requirement of the type in bytes. -/// +/// /// It is an approximation of C++11's `alignof` operator. /// /// Note: MSVC does not allow the builtin used to implement this to be placed @@ -44,7 +50,7 @@ namespace detail /// assign the result of \p THRUST_ALIGNOF to a variable and pass the variable /// as the argument to `__declspec(align(#))`. #if THRUST_CPP_DIALECT >= 2011 - #define THRUST_ALIGNOF(x) alignof(x) + #define THRUST_ALIGNOF(x) alignof(x) #else #define THRUST_ALIGNOF(x) __alignof(x) #endif @@ -52,7 +58,7 @@ namespace detail /// \p alignment_of provides the member constant `value` which is equal to the /// alignment requirement of the type `T`, as if obtained by a C++11 `alignof` /// expression. -/// +/// /// It is an implementation of C++11's \p std::alignment_of. #if THRUST_CPP_DIALECT >= 2011 template @@ -110,9 +116,9 @@ struct aligned_type; || ( (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) \ && (THRUST_GCC_VERSION < 40600)) // C++03 implementation for MSVC and GCC <= 4.5. - // + // // We have to implement `aligned_type` with specializations for MSVC - // and GCC 4.2.x and older because they require literals as arguments to + // and GCC 4.2.x and older because they require literals as arguments to // their alignment attribute. #if (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC) @@ -134,7 +140,7 @@ struct aligned_type; }; \ /**/ #endif - + THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(1); THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(2); THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(4); diff --git a/thrust/thrust/detail/allocator/allocator_traits.h b/thrust/thrust/detail/allocator/allocator_traits.h index 3a5af3661f3..d59f38591c2 100644 --- a/thrust/thrust/detail/allocator/allocator_traits.h +++ b/thrust/thrust/detail/allocator/allocator_traits.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -384,7 +390,7 @@ template template inline __host__ __device__ static void construct(allocator_type &a, T *p); - + template inline __host__ __device__ static void construct(allocator_type &a, T *p, const Arg1 &arg1); diff --git a/thrust/thrust/detail/allocator/allocator_traits.inl b/thrust/thrust/detail/allocator/allocator_traits.inl index 27533009494..1548373a6eb 100644 --- a/thrust/thrust/detail/allocator/allocator_traits.inl +++ b/thrust/thrust/detail/allocator/allocator_traits.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/allocator/copy_construct_range.h b/thrust/thrust/detail/allocator/copy_construct_range.h index b3c2de32462..25139925efe 100644 --- a/thrust/thrust/detail/allocator/copy_construct_range.h +++ b/thrust/thrust/detail/allocator/copy_construct_range.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/detail/allocator/copy_construct_range.inl b/thrust/thrust/detail/allocator/copy_construct_range.inl index a71cca1f720..54ae413a100 100644 --- a/thrust/thrust/detail/allocator/copy_construct_range.inl +++ b/thrust/thrust/detail/allocator/copy_construct_range.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/allocator/default_construct_range.h b/thrust/thrust/detail/allocator/default_construct_range.h index 8b5026c05b3..b53534936cc 100644 --- a/thrust/thrust/detail/allocator/default_construct_range.h +++ b/thrust/thrust/detail/allocator/default_construct_range.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace detail { diff --git a/thrust/thrust/detail/allocator/default_construct_range.inl b/thrust/thrust/detail/allocator/default_construct_range.inl index 6d26578fa23..6edc4f7a2cb 100644 --- a/thrust/thrust/detail/allocator/default_construct_range.inl +++ b/thrust/thrust/detail/allocator/default_construct_range.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/allocator/destroy_range.h b/thrust/thrust/detail/allocator/destroy_range.h index cfc7e3f6ef5..cfedf0c4f32 100644 --- a/thrust/thrust/detail/allocator/destroy_range.h +++ b/thrust/thrust/detail/allocator/destroy_range.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace detail { diff --git a/thrust/thrust/detail/allocator/destroy_range.inl b/thrust/thrust/detail/allocator/destroy_range.inl index 662177f3a72..a288d3d663b 100644 --- a/thrust/thrust/detail/allocator/destroy_range.inl +++ b/thrust/thrust/detail/allocator/destroy_range.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/allocator/fill_construct_range.h b/thrust/thrust/detail/allocator/fill_construct_range.h index a7572cb2d2b..5aa6f84bee8 100644 --- a/thrust/thrust/detail/allocator/fill_construct_range.h +++ b/thrust/thrust/detail/allocator/fill_construct_range.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace detail { diff --git a/thrust/thrust/detail/allocator/fill_construct_range.inl b/thrust/thrust/detail/allocator/fill_construct_range.inl index 876b5ddd264..4019d9d9b46 100644 --- a/thrust/thrust/detail/allocator/fill_construct_range.inl +++ b/thrust/thrust/detail/allocator/fill_construct_range.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/allocator/malloc_allocator.h b/thrust/thrust/detail/allocator/malloc_allocator.h index af3d0fccbd7..be230a986f5 100644 --- a/thrust/thrust/detail/allocator/malloc_allocator.h +++ b/thrust/thrust/detail/allocator/malloc_allocator.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/detail/allocator/malloc_allocator.inl b/thrust/thrust/detail/allocator/malloc_allocator.inl index d03d33305cb..0e64abf73fa 100644 --- a/thrust/thrust/detail/allocator/malloc_allocator.inl +++ b/thrust/thrust/detail/allocator/malloc_allocator.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/allocator/no_throw_allocator.h b/thrust/thrust/detail/allocator/no_throw_allocator.h index a6c16985b11..7a35b3d1160 100644 --- a/thrust/thrust/detail/allocator/no_throw_allocator.h +++ b/thrust/thrust/detail/allocator/no_throw_allocator.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN @@ -29,7 +35,7 @@ template { private: typedef BaseAllocator super_t; - + public: inline __host__ __device__ no_throw_allocator(const BaseAllocator &other = BaseAllocator()) diff --git a/thrust/thrust/detail/allocator/tagged_allocator.h b/thrust/thrust/detail/allocator/tagged_allocator.h index 804c4e42e51..fa7a716f119 100644 --- a/thrust/thrust/detail/allocator/tagged_allocator.h +++ b/thrust/thrust/detail/allocator/tagged_allocator.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/detail/allocator/tagged_allocator.inl b/thrust/thrust/detail/allocator/tagged_allocator.inl index bcd534cbcee..4f02e59c840 100644 --- a/thrust/thrust/detail/allocator/tagged_allocator.inl +++ b/thrust/thrust/detail/allocator/tagged_allocator.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/detail/allocator/temporary_allocator.h b/thrust/thrust/detail/allocator/temporary_allocator.h index c8ef606258a..81110e3f2e7 100644 --- a/thrust/thrust/detail/allocator/temporary_allocator.h +++ b/thrust/thrust/detail/allocator/temporary_allocator.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/allocator/temporary_allocator.inl b/thrust/thrust/detail/allocator/temporary_allocator.inl index ef5d1afa503..23f96cfb996 100644 --- a/thrust/thrust/detail/allocator/temporary_allocator.inl +++ b/thrust/thrust/detail/allocator/temporary_allocator.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/allocator_aware_execution_policy.h b/thrust/thrust/detail/allocator_aware_execution_policy.h index eea93c035ea..bfc29736bfd 100644 --- a/thrust/thrust/detail/allocator_aware_execution_policy.h +++ b/thrust/thrust/detail/allocator_aware_execution_policy.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/detail/binary_search.inl b/thrust/thrust/detail/binary_search.inl index 90350ced4bb..d2a42fdf6af 100644 --- a/thrust/thrust/detail/binary_search.inl +++ b/thrust/thrust/detail/binary_search.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/caching_allocator.h b/thrust/thrust/detail/caching_allocator.h index 941f52755ca..f306f0f1220 100644 --- a/thrust/thrust/detail/caching_allocator.h +++ b/thrust/thrust/detail/caching_allocator.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/config.h b/thrust/thrust/detail/config.h index 5a5573a410e..12df82f6944 100644 --- a/thrust/thrust/detail/config.h +++ b/thrust/thrust/detail/config.h @@ -22,3 +22,8 @@ #include #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC diff --git a/thrust/thrust/detail/config/compiler.h b/thrust/thrust/detail/config/compiler.h index e35652f6a41..3359808f6c2 100644 --- a/thrust/thrust/detail/config/compiler.h +++ b/thrust/thrust/detail/config/compiler.h @@ -20,6 +20,14 @@ #pragma once +// Internal config header that is only included through thrust/detail/config/config.h + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // enumerate host compilers we know about #define THRUST_HOST_COMPILER_UNKNOWN 0 #define THRUST_HOST_COMPILER_MSVC 1 diff --git a/thrust/thrust/detail/config/compiler_fence.h b/thrust/thrust/detail/config/compiler_fence.h index c379abaf364..629e0a549f4 100644 --- a/thrust/thrust/detail/config/compiler_fence.h +++ b/thrust/thrust/detail/config/compiler_fence.h @@ -17,6 +17,13 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include // TODO: Enable this or remove this file once nvGRAPH/CUSP migrates off of it. diff --git a/thrust/thrust/detail/config/config.h b/thrust/thrust/detail/config/config.h index 797f6605b08..692d356c5f1 100644 --- a/thrust/thrust/detail/config/config.h +++ b/thrust/thrust/detail/config/config.h @@ -20,6 +20,15 @@ #pragma once +// For _CCCL_IMPLICIT_SYSTEM_HEADER +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // NOTE: The order of these #includes matters. #include diff --git a/thrust/thrust/detail/config/cpp_compatibility.h b/thrust/thrust/detail/config/cpp_compatibility.h index 18b9cbdcf59..ba6c9b65b6d 100644 --- a/thrust/thrust/detail/config/cpp_compatibility.h +++ b/thrust/thrust/detail/config/cpp_compatibility.h @@ -16,6 +16,14 @@ #pragma once +// Internal config header that is only included through thrust/detail/config/config.h + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/detail/config/cpp_dialect.h b/thrust/thrust/detail/config/cpp_dialect.h index 97c39bea574..87905893fc9 100644 --- a/thrust/thrust/detail/config/cpp_dialect.h +++ b/thrust/thrust/detail/config/cpp_dialect.h @@ -20,6 +20,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include // Deprecation warnings may be silenced by defining the following macros. These diff --git a/thrust/thrust/detail/config/debug.h b/thrust/thrust/detail/config/debug.h index 16f65d67c90..be903b1f36b 100644 --- a/thrust/thrust/detail/config/debug.h +++ b/thrust/thrust/detail/config/debug.h @@ -16,6 +16,14 @@ #pragma once +// Internal config header that is only included through thrust/detail/config/config.h + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #ifndef THRUST_DEBUG # ifndef NDEBUG # if defined(DEBUG) || defined(_DEBUG) diff --git a/thrust/thrust/detail/config/deprecated.h b/thrust/thrust/detail/config/deprecated.h index 05851c6768f..0ec83a15dc7 100644 --- a/thrust/thrust/detail/config/deprecated.h +++ b/thrust/thrust/detail/config/deprecated.h @@ -20,6 +20,14 @@ #pragma once +// Internal config header that is only included through thrust/detail/config/config.h + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/detail/config/device_system.h b/thrust/thrust/detail/config/device_system.h index 29418c90308..188202276ae 100644 --- a/thrust/thrust/detail/config/device_system.h +++ b/thrust/thrust/detail/config/device_system.h @@ -16,6 +16,14 @@ #pragma once +// Internal config header that is only included through thrust/detail/config/config.h + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // reserve 0 for undefined #define THRUST_DEVICE_SYSTEM_CUDA 1 #define THRUST_DEVICE_SYSTEM_OMP 2 diff --git a/thrust/thrust/detail/config/exec_check_disable.h b/thrust/thrust/detail/config/exec_check_disable.h index 9b25b375dfb..8a9811f86d3 100644 --- a/thrust/thrust/detail/config/exec_check_disable.h +++ b/thrust/thrust/detail/config/exec_check_disable.h @@ -20,7 +20,13 @@ #pragma once -#include +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC // #pragma nv_exec_check_disable is only recognized by NVCC. Having a macro // expand to a #pragma (rather than _Pragma) only works with NVCC's compilation diff --git a/thrust/thrust/detail/config/forceinline.h b/thrust/thrust/detail/config/forceinline.h index b001fd4b114..c90124cb8e7 100644 --- a/thrust/thrust/detail/config/forceinline.h +++ b/thrust/thrust/detail/config/forceinline.h @@ -20,7 +20,13 @@ #pragma once -#include +// Internal config header that is only included through thrust/detail/config/config.h + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #if defined(__CUDACC__) || defined(_NVHPC_CUDA) @@ -28,7 +34,7 @@ #else -// TODO add +// TODO add #define __thrust_forceinline__ diff --git a/thrust/thrust/detail/config/global_workarounds.h b/thrust/thrust/detail/config/global_workarounds.h index 9800f03593a..e16de143b55 100644 --- a/thrust/thrust/detail/config/global_workarounds.h +++ b/thrust/thrust/detail/config/global_workarounds.h @@ -16,6 +16,14 @@ #pragma once +// Internal config header that is only included through thrust/detail/config/config.h + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include // XXX workaround gcc 4.8+'s complaints about unused local typedefs by silencing them globally diff --git a/thrust/thrust/detail/config/host_device.h b/thrust/thrust/detail/config/host_device.h index 5540f91260d..b4b4a26be9f 100644 --- a/thrust/thrust/detail/config/host_device.h +++ b/thrust/thrust/detail/config/host_device.h @@ -20,7 +20,13 @@ #pragma once -#include +// Internal config header that is only included through thrust/detail/config/config.h + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC // since nvcc defines __host__ and __device__ for us, // and only nvcc knows what to do with __host__ and __device__, diff --git a/thrust/thrust/detail/config/host_system.h b/thrust/thrust/detail/config/host_system.h index f216f649237..aab787a9ffd 100644 --- a/thrust/thrust/detail/config/host_system.h +++ b/thrust/thrust/detail/config/host_system.h @@ -16,6 +16,14 @@ #pragma once +// Internal config header that is only included through thrust/detail/config/config.h + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // reserve 0 for undefined #define THRUST_HOST_SYSTEM_CPP 1 #define THRUST_HOST_SYSTEM_OMP 2 diff --git a/thrust/thrust/detail/config/memory_resource.h b/thrust/thrust/detail/config/memory_resource.h index ab719c9bde9..a8a4f18971e 100644 --- a/thrust/thrust/detail/config/memory_resource.h +++ b/thrust/thrust/detail/config/memory_resource.h @@ -16,9 +16,16 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include diff --git a/thrust/thrust/detail/config/namespace.h b/thrust/thrust/detail/config/namespace.h index 91b9f879cdd..94cbbbbe6eb 100644 --- a/thrust/thrust/detail/config/namespace.h +++ b/thrust/thrust/detail/config/namespace.h @@ -16,6 +16,14 @@ #pragma once +// Internal config header that is only included through thrust/detail/config/config.h + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/detail/config/simple_defines.h b/thrust/thrust/detail/config/simple_defines.h index e3ea2eb64e7..c99d7ab2a40 100644 --- a/thrust/thrust/detail/config/simple_defines.h +++ b/thrust/thrust/detail/config/simple_defines.h @@ -20,6 +20,14 @@ #pragma once +// Internal config header that is only included through thrust/detail/config/config.h + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #define THRUST_UNKNOWN 0 #define THRUST_FALSE 0 #define THRUST_TRUE 1 diff --git a/thrust/thrust/detail/contiguous_storage.h b/thrust/thrust/detail/contiguous_storage.h index 536c1c27c2e..3ed000a26b6 100644 --- a/thrust/thrust/detail/contiguous_storage.h +++ b/thrust/thrust/detail/contiguous_storage.h @@ -16,10 +16,17 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include -#include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/detail/contiguous_storage.inl b/thrust/thrust/detail/contiguous_storage.inl index 7ae8657f081..ded03e01710 100644 --- a/thrust/thrust/detail/contiguous_storage.inl +++ b/thrust/thrust/detail/contiguous_storage.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/copy.h b/thrust/thrust/detail/copy.h index d6c5bc805c4..59d0f264b0b 100644 --- a/thrust/thrust/detail/copy.h +++ b/thrust/thrust/detail/copy.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/detail/copy.inl b/thrust/thrust/detail/copy.inl index 4d62798c705..ada0aa5d2bd 100644 --- a/thrust/thrust/detail/copy.inl +++ b/thrust/thrust/detail/copy.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/copy_if.h b/thrust/thrust/detail/copy_if.h index 32eb5e08323..a7a72734665 100644 --- a/thrust/thrust/detail/copy_if.h +++ b/thrust/thrust/detail/copy_if.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/detail/copy_if.inl b/thrust/thrust/detail/copy_if.inl index 952541c5180..a013328bf85 100644 --- a/thrust/thrust/detail/copy_if.inl +++ b/thrust/thrust/detail/copy_if.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/count.h b/thrust/thrust/detail/count.h index 7c48bc54606..cc513f9bb75 100644 --- a/thrust/thrust/detail/count.h +++ b/thrust/thrust/detail/count.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/detail/count.inl b/thrust/thrust/detail/count.inl index 5d1f628a93c..c896e740859 100644 --- a/thrust/thrust/detail/count.inl +++ b/thrust/thrust/detail/count.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/cpp11_required.h b/thrust/thrust/detail/cpp11_required.h index a7fb4fb12cd..6447d0eba7d 100644 --- a/thrust/thrust/detail/cpp11_required.h +++ b/thrust/thrust/detail/cpp11_required.h @@ -18,8 +18,14 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #ifndef THRUST_CPP11_REQUIRED_NO_ERROR -# if THRUST_CPP_DIALECT < 2011 +# if THRUST_CPP_DIALECT < 2011 # error C++11 is required for this Thrust feature; please upgrade your compiler or pass the appropriate -std=c++XX flag to it. # endif #endif diff --git a/thrust/thrust/detail/cpp14_required.h b/thrust/thrust/detail/cpp14_required.h index 083c8a1ad47..27ed1bd7d96 100644 --- a/thrust/thrust/detail/cpp14_required.h +++ b/thrust/thrust/detail/cpp14_required.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #ifndef THRUST_CPP14_REQUIRED_NO_ERROR # if THRUST_CPP_DIALECT < 2014 # error C++14 is required for this Thrust feature; please upgrade your compiler or pass the appropriate -std=c++14 flag to it. diff --git a/thrust/thrust/detail/cstdint.h b/thrust/thrust/detail/cstdint.h index f41e1147576..d9f5fd595db 100644 --- a/thrust/thrust/detail/cstdint.h +++ b/thrust/thrust/detail/cstdint.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) || \ (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG) || \ (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_INTEL) diff --git a/thrust/thrust/detail/dependencies_aware_execution_policy.h b/thrust/thrust/detail/dependencies_aware_execution_policy.h index a7567a3fab3..d781daf2428 100644 --- a/thrust/thrust/detail/dependencies_aware_execution_policy.h +++ b/thrust/thrust/detail/dependencies_aware_execution_policy.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/detail/device_delete.inl b/thrust/thrust/detail/device_delete.inl index 87f73aad902..6b86808633d 100644 --- a/thrust/thrust/detail/device_delete.inl +++ b/thrust/thrust/detail/device_delete.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/device_free.inl b/thrust/thrust/detail/device_free.inl index 806802e1651..bc3ccbb30dd 100644 --- a/thrust/thrust/detail/device_free.inl +++ b/thrust/thrust/detail/device_free.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/device_malloc.inl b/thrust/thrust/detail/device_malloc.inl index f4222f51da3..aaf5887b02f 100644 --- a/thrust/thrust/detail/device_malloc.inl +++ b/thrust/thrust/detail/device_malloc.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/device_new.inl b/thrust/thrust/detail/device_new.inl index c66e2cbff6c..b6578a662ca 100644 --- a/thrust/thrust/detail/device_new.inl +++ b/thrust/thrust/detail/device_new.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/device_ptr.inl b/thrust/thrust/detail/device_ptr.inl index 361c61f3314..d980f45dda1 100644 --- a/thrust/thrust/detail/device_ptr.inl +++ b/thrust/thrust/detail/device_ptr.inl @@ -16,9 +16,16 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include #include #include diff --git a/thrust/thrust/detail/distance.inl b/thrust/thrust/detail/distance.inl index 6702c2b6f73..452469cb4e1 100644 --- a/thrust/thrust/detail/distance.inl +++ b/thrust/thrust/detail/distance.inl @@ -16,8 +16,15 @@ #pragma once -#include #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +#include #include #include diff --git a/thrust/thrust/detail/equal.inl b/thrust/thrust/detail/equal.inl index e21ddfa5abb..02d9686691c 100644 --- a/thrust/thrust/detail/equal.inl +++ b/thrust/thrust/detail/equal.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/event_error.h b/thrust/thrust/detail/event_error.h index b928e0650c2..90bfafcd887 100644 --- a/thrust/thrust/detail/event_error.h +++ b/thrust/thrust/detail/event_error.h @@ -20,6 +20,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/detail/execute_with_allocator.h b/thrust/thrust/detail/execute_with_allocator.h index 430fe739c3f..a41a2c205fc 100644 --- a/thrust/thrust/detail/execute_with_allocator.h +++ b/thrust/thrust/detail/execute_with_allocator.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/execute_with_allocator_fwd.h b/thrust/thrust/detail/execute_with_allocator_fwd.h index 1d5899a7db7..8c5cec162c9 100644 --- a/thrust/thrust/detail/execute_with_allocator_fwd.h +++ b/thrust/thrust/detail/execute_with_allocator_fwd.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/detail/execute_with_dependencies.h b/thrust/thrust/detail/execute_with_dependencies.h index 9f82f28badf..834f8868ce6 100644 --- a/thrust/thrust/detail/execute_with_dependencies.h +++ b/thrust/thrust/detail/execute_with_dependencies.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 @@ -96,7 +102,7 @@ struct execute_with_dependencies std::tuple...> __host__ - extract_dependencies() + extract_dependencies() { return std::move(dependencies); } @@ -184,7 +190,7 @@ struct execute_with_allocator_and_dependencies std::tuple...> __host__ - extract_dependencies() + extract_dependencies() { return std::move(dependencies); } diff --git a/thrust/thrust/detail/execution_policy.h b/thrust/thrust/detail/execution_policy.h index dcc11a77033..87857a51d0a 100644 --- a/thrust/thrust/detail/execution_policy.h +++ b/thrust/thrust/detail/execution_policy.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace detail diff --git a/thrust/thrust/detail/extrema.inl b/thrust/thrust/detail/extrema.inl index 2c1750e7d48..cfa21741109 100644 --- a/thrust/thrust/detail/extrema.inl +++ b/thrust/thrust/detail/extrema.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/fill.inl b/thrust/thrust/detail/fill.inl index e68672bbebe..0ba85a6f1e0 100644 --- a/thrust/thrust/detail/fill.inl +++ b/thrust/thrust/detail/fill.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/find.inl b/thrust/thrust/detail/find.inl index 5b494f61a60..621a2cd8e4b 100644 --- a/thrust/thrust/detail/find.inl +++ b/thrust/thrust/detail/find.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/for_each.inl b/thrust/thrust/detail/for_each.inl index 4ba39c71a40..1f5111ade7c 100644 --- a/thrust/thrust/detail/for_each.inl +++ b/thrust/thrust/detail/for_each.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/function.h b/thrust/thrust/detail/function.h index ba20507a547..14b288bf94e 100644 --- a/thrust/thrust/detail/function.h +++ b/thrust/thrust/detail/function.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/detail/functional.inl b/thrust/thrust/detail/functional.inl index bdf8e041529..bf56fce23a2 100644 --- a/thrust/thrust/detail/functional.inl +++ b/thrust/thrust/detail/functional.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/detail/functional/actor.h b/thrust/thrust/detail/functional/actor.h index 208a8706180..52d0c6660ae 100644 --- a/thrust/thrust/detail/functional/actor.h +++ b/thrust/thrust/detail/functional/actor.h @@ -26,6 +26,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/functional/actor.inl b/thrust/thrust/detail/functional/actor.inl index 5272101b7f4..9043062436f 100644 --- a/thrust/thrust/detail/functional/actor.inl +++ b/thrust/thrust/detail/functional/actor.inl @@ -26,6 +26,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/functional/argument.h b/thrust/thrust/detail/functional/argument.h index b1ceb220555..be3824e3671 100644 --- a/thrust/thrust/detail/functional/argument.h +++ b/thrust/thrust/detail/functional/argument.h @@ -26,6 +26,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/detail/functional/composite.h b/thrust/thrust/detail/functional/composite.h index 40466b3b8ea..129d8320831 100644 --- a/thrust/thrust/detail/functional/composite.h +++ b/thrust/thrust/detail/functional/composite.h @@ -27,6 +27,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/detail/functional/operators.h b/thrust/thrust/detail/functional/operators.h index f86ea205218..74804745f82 100644 --- a/thrust/thrust/detail/functional/operators.h +++ b/thrust/thrust/detail/functional/operators.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/functional/operators/arithmetic_operators.h b/thrust/thrust/detail/functional/operators/arithmetic_operators.h index 443d307cbd6..238f2e5698c 100644 --- a/thrust/thrust/detail/functional/operators/arithmetic_operators.h +++ b/thrust/thrust/detail/functional/operators/arithmetic_operators.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/functional/operators/assignment_operator.h b/thrust/thrust/detail/functional/operators/assignment_operator.h index 870354b6f0b..62f93ce710b 100644 --- a/thrust/thrust/detail/functional/operators/assignment_operator.h +++ b/thrust/thrust/detail/functional/operators/assignment_operator.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/functional/operators/bitwise_operators.h b/thrust/thrust/detail/functional/operators/bitwise_operators.h index 065cd15403c..b49a464aba6 100644 --- a/thrust/thrust/detail/functional/operators/bitwise_operators.h +++ b/thrust/thrust/detail/functional/operators/bitwise_operators.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/functional/operators/compound_assignment_operators.h b/thrust/thrust/detail/functional/operators/compound_assignment_operators.h index b5ba77fb48d..61fc6f5971e 100644 --- a/thrust/thrust/detail/functional/operators/compound_assignment_operators.h +++ b/thrust/thrust/detail/functional/operators/compound_assignment_operators.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/functional/operators/logical_operators.h b/thrust/thrust/detail/functional/operators/logical_operators.h index e1e4ff71994..a30850b5886 100644 --- a/thrust/thrust/detail/functional/operators/logical_operators.h +++ b/thrust/thrust/detail/functional/operators/logical_operators.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/functional/operators/operator_adaptors.h b/thrust/thrust/detail/functional/operators/operator_adaptors.h index addfbd3dce2..6f69e6f91ec 100644 --- a/thrust/thrust/detail/functional/operators/operator_adaptors.h +++ b/thrust/thrust/detail/functional/operators/operator_adaptors.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/functional/operators/relational_operators.h b/thrust/thrust/detail/functional/operators/relational_operators.h index 6c58325e225..fb55c34627d 100644 --- a/thrust/thrust/detail/functional/operators/relational_operators.h +++ b/thrust/thrust/detail/functional/operators/relational_operators.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/functional/placeholder.h b/thrust/thrust/detail/functional/placeholder.h index e3c0835531f..19b40de8722 100644 --- a/thrust/thrust/detail/functional/placeholder.h +++ b/thrust/thrust/detail/functional/placeholder.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/detail/functional/value.h b/thrust/thrust/detail/functional/value.h index d6b1563b15c..0b30a0cf39b 100644 --- a/thrust/thrust/detail/functional/value.h +++ b/thrust/thrust/detail/functional/value.h @@ -26,6 +26,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/detail/gather.inl b/thrust/thrust/detail/gather.inl index 3812702f61c..9488c4caf15 100644 --- a/thrust/thrust/detail/gather.inl +++ b/thrust/thrust/detail/gather.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/generate.inl b/thrust/thrust/detail/generate.inl index 2ecb65d5843..8e3924c2810 100644 --- a/thrust/thrust/detail/generate.inl +++ b/thrust/thrust/detail/generate.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/get_iterator_value.h b/thrust/thrust/detail/get_iterator_value.h index 27e0a4e47a0..c5828ff2a6b 100644 --- a/thrust/thrust/detail/get_iterator_value.h +++ b/thrust/thrust/detail/get_iterator_value.h @@ -1,4 +1,3 @@ -#pragma once /* * Copyright 2008-2016 NVIDIA Corporation * @@ -14,8 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include @@ -39,12 +46,12 @@ get_iterator_value(thrust::execution_policy &, Iterator it) // get_iterator_value specialization on pointer // ---------------------------------------------- // we can't just dereference a pointer in the usual way, because -// it may point to a location in the device memory. +// it may point to a location in the device memory. // we use get_value(exec,pointer*) function // to perform a dereferencing consistent with the execution policy template __host__ __device__ -typename thrust::detail::pointer_traits::element_type +typename thrust::detail::pointer_traits::element_type get_iterator_value(thrust::execution_policy &exec, Pointer* ptr) { return get_value(derived_cast(exec),ptr); diff --git a/thrust/thrust/detail/inner_product.inl b/thrust/thrust/detail/inner_product.inl index 97cd2b0b52e..373d15af0be 100644 --- a/thrust/thrust/detail/inner_product.inl +++ b/thrust/thrust/detail/inner_product.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/integer_math.h b/thrust/thrust/detail/integer_math.h index 0f8c8aac168..c5640493f95 100644 --- a/thrust/thrust/detail/integer_math.h +++ b/thrust/thrust/detail/integer_math.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/detail/integer_traits.h b/thrust/thrust/detail/integer_traits.h index 853af20b860..cafea573f23 100644 --- a/thrust/thrust/detail/integer_traits.h +++ b/thrust/thrust/detail/integer_traits.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/detail/internal_functional.h b/thrust/thrust/detail/internal_functional.h index a0c4056feba..585592ebc14 100644 --- a/thrust/thrust/detail/internal_functional.h +++ b/thrust/thrust/detail/internal_functional.h @@ -21,9 +21,16 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include #include #include #include diff --git a/thrust/thrust/detail/logical.inl b/thrust/thrust/detail/logical.inl index 3d39cac9268..30992bbaa46 100644 --- a/thrust/thrust/detail/logical.inl +++ b/thrust/thrust/detail/logical.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/malloc_and_free.h b/thrust/thrust/detail/malloc_and_free.h index 14351889319..a03df639d44 100644 --- a/thrust/thrust/detail/malloc_and_free.h +++ b/thrust/thrust/detail/malloc_and_free.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/memory_algorithms.h b/thrust/thrust/detail/memory_algorithms.h index 2f6b3a81d71..05d68f043fa 100644 --- a/thrust/thrust/detail/memory_algorithms.h +++ b/thrust/thrust/detail/memory_algorithms.h @@ -9,6 +9,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/memory_wrapper.h b/thrust/thrust/detail/memory_wrapper.h index bfc9056fa15..1df1dfcb813 100644 --- a/thrust/thrust/detail/memory_wrapper.h +++ b/thrust/thrust/detail/memory_wrapper.h @@ -16,6 +16,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // When a compiler uses Thrust as part of its implementation of Standard C++ // algorithms, a cycle of included files may result when Thrust code tries to // use a standard algorithm. Having a macro that is defined only when Thrust diff --git a/thrust/thrust/detail/merge.inl b/thrust/thrust/detail/merge.inl index 1595cc1a145..64b1f5f2ee1 100644 --- a/thrust/thrust/detail/merge.inl +++ b/thrust/thrust/detail/merge.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/minmax.h b/thrust/thrust/detail/minmax.h index c565a74bdff..bbc54d47537 100644 --- a/thrust/thrust/detail/minmax.h +++ b/thrust/thrust/detail/minmax.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN template diff --git a/thrust/thrust/detail/mismatch.inl b/thrust/thrust/detail/mismatch.inl index 16c579d8069..e0dee618395 100644 --- a/thrust/thrust/detail/mismatch.inl +++ b/thrust/thrust/detail/mismatch.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/modern_gcc_required.h b/thrust/thrust/detail/modern_gcc_required.h index a8c3d98ba99..517d285a2c8 100644 --- a/thrust/thrust/detail/modern_gcc_required.h +++ b/thrust/thrust/detail/modern_gcc_required.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #ifndef THRUST_MODERN_GCC_REQUIRED_NO_ERROR # if defined(THRUST_GCC_VERSION) && !defined(THRUST_MODERN_GCC) # error GCC 5 or later is required for this Thrust feature; please upgrade your compiler. diff --git a/thrust/thrust/detail/mpl/math.h b/thrust/thrust/detail/mpl/math.h index bda98003cd5..ccdba5ce3b2 100644 --- a/thrust/thrust/detail/mpl/math.h +++ b/thrust/thrust/detail/mpl/math.h @@ -24,6 +24,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace detail diff --git a/thrust/thrust/detail/numeric_traits.h b/thrust/thrust/detail/numeric_traits.h index e728adcaf3e..8e1fa8e5936 100644 --- a/thrust/thrust/detail/numeric_traits.h +++ b/thrust/thrust/detail/numeric_traits.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -46,7 +52,7 @@ template >, integral_constant< int, - sizeof(T) * std::numeric_limits::digits - (is_signed::value ? 1 : 0) + sizeof(T) * std::numeric_limits::digits - (is_signed::value ? 1 : 0) > >::type {}; // end num_digits diff --git a/thrust/thrust/detail/numeric_wrapper.h b/thrust/thrust/detail/numeric_wrapper.h index 9ebc6e23b71..0460fba98d6 100644 --- a/thrust/thrust/detail/numeric_wrapper.h +++ b/thrust/thrust/detail/numeric_wrapper.h @@ -16,6 +16,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // When a compiler uses Thrust as part of its implementation of Standard C++ // algorithms, a cycle of included files may result when Thrust code tries to // use a standard algorithm. Having a macro that is defined only when Thrust diff --git a/thrust/thrust/detail/overlapped_copy.h b/thrust/thrust/detail/overlapped_copy.h index 418497de8db..7d4f5dc2ada 100644 --- a/thrust/thrust/detail/overlapped_copy.h +++ b/thrust/thrust/detail/overlapped_copy.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/partition.inl b/thrust/thrust/detail/partition.inl index 5c51bca8095..5a72aad321e 100644 --- a/thrust/thrust/detail/partition.inl +++ b/thrust/thrust/detail/partition.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/pointer.h b/thrust/thrust/detail/pointer.h index aed1fcc2444..3dab11a58b1 100644 --- a/thrust/thrust/detail/pointer.h +++ b/thrust/thrust/detail/pointer.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/pointer.inl b/thrust/thrust/detail/pointer.inl index de05ff20f0c..f8d9f20e8f0 100644 --- a/thrust/thrust/detail/pointer.inl +++ b/thrust/thrust/detail/pointer.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/detail/preprocessor.h b/thrust/thrust/detail/preprocessor.h index 2e850c764dd..a077405d84d 100644 --- a/thrust/thrust/detail/preprocessor.h +++ b/thrust/thrust/detail/preprocessor.h @@ -9,6 +9,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + /////////////////////////////////////////////////////////////////////////////// /// \def THRUST_PP_STRINGIZE(expr) diff --git a/thrust/thrust/detail/range/head_flags.h b/thrust/thrust/detail/range/head_flags.h index b755840c991..188c0fc67f8 100644 --- a/thrust/thrust/detail/range/head_flags.h +++ b/thrust/thrust/detail/range/head_flags.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/range/tail_flags.h b/thrust/thrust/detail/range/tail_flags.h index 41ee5dd29cc..10126e73f76 100644 --- a/thrust/thrust/detail/range/tail_flags.h +++ b/thrust/thrust/detail/range/tail_flags.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/raw_pointer_cast.h b/thrust/thrust/detail/raw_pointer_cast.h index 53a77861ef0..7f72b30c293 100644 --- a/thrust/thrust/detail/raw_pointer_cast.h +++ b/thrust/thrust/detail/raw_pointer_cast.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/detail/raw_reference_cast.h b/thrust/thrust/detail/raw_reference_cast.h index 99af0da183d..c01fe9c04d9 100644 --- a/thrust/thrust/detail/raw_reference_cast.h +++ b/thrust/thrust/detail/raw_reference_cast.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/reduce.inl b/thrust/thrust/detail/reduce.inl index 448a4b38c4a..86a82ab30a1 100644 --- a/thrust/thrust/detail/reduce.inl +++ b/thrust/thrust/detail/reduce.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/reference.h b/thrust/thrust/detail/reference.h index 5cc13625daf..f1be715a9f5 100644 --- a/thrust/thrust/detail/reference.h +++ b/thrust/thrust/detail/reference.h @@ -14,7 +14,7 @@ * limitations under the License. */ -/*! \file +/*! \file * \brief A pointer to a variable which resides in memory associated with a * system. */ @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/reference_forward_declaration.h b/thrust/thrust/detail/reference_forward_declaration.h index 6f2b999497a..a412dc5bc4f 100644 --- a/thrust/thrust/detail/reference_forward_declaration.h +++ b/thrust/thrust/detail/reference_forward_declaration.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/detail/remove.inl b/thrust/thrust/detail/remove.inl index 7ccc0cc4656..efd99651d1d 100644 --- a/thrust/thrust/detail/remove.inl +++ b/thrust/thrust/detail/remove.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/replace.inl b/thrust/thrust/detail/replace.inl index 629287bee08..7dd797b12ae 100644 --- a/thrust/thrust/detail/replace.inl +++ b/thrust/thrust/detail/replace.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/reverse.inl b/thrust/thrust/detail/reverse.inl index dc316d18f52..128af196874 100644 --- a/thrust/thrust/detail/reverse.inl +++ b/thrust/thrust/detail/reverse.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/scan.inl b/thrust/thrust/detail/scan.inl index b781b0e280c..7300ff4c3a4 100644 --- a/thrust/thrust/detail/scan.inl +++ b/thrust/thrust/detail/scan.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/scatter.inl b/thrust/thrust/detail/scatter.inl index 30dd611d11f..115020afb47 100644 --- a/thrust/thrust/detail/scatter.inl +++ b/thrust/thrust/detail/scatter.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/select_system.h b/thrust/thrust/detail/select_system.h index 968446162dd..45afb93e33d 100644 --- a/thrust/thrust/detail/select_system.h +++ b/thrust/thrust/detail/select_system.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/detail/seq.h b/thrust/thrust/detail/seq.h index ba18c2dbf51..13df612cb20 100644 --- a/thrust/thrust/detail/seq.h +++ b/thrust/thrust/detail/seq.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/detail/sequence.inl b/thrust/thrust/detail/sequence.inl index ffc9b968b97..6ae4180284b 100644 --- a/thrust/thrust/detail/sequence.inl +++ b/thrust/thrust/detail/sequence.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/set_operations.inl b/thrust/thrust/detail/set_operations.inl index 7915f7b3eab..e993b583188 100644 --- a/thrust/thrust/detail/set_operations.inl +++ b/thrust/thrust/detail/set_operations.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/shuffle.inl b/thrust/thrust/detail/shuffle.inl index 48f5ba63929..d34454cb405 100644 --- a/thrust/thrust/detail/shuffle.inl +++ b/thrust/thrust/detail/shuffle.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/detail/sort.inl b/thrust/thrust/detail/sort.inl index 53f8bad93b1..6b6f5ba639e 100644 --- a/thrust/thrust/detail/sort.inl +++ b/thrust/thrust/detail/sort.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/static_assert.h b/thrust/thrust/detail/static_assert.h index 0e613279055..dad671caf2b 100644 --- a/thrust/thrust/detail/static_assert.h +++ b/thrust/thrust/detail/static_assert.h @@ -16,7 +16,7 @@ /* * (C) Copyright John Maddock 2000. - * + * * Distributed under the Boost Software License, Version 1.0. * (See accompanying NOTICE file for the complete license) * @@ -26,6 +26,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -70,14 +76,14 @@ template struct static_assert_test {}; > \ THRUST_PP_CAT2(thrust_static_assert_typedef_, __LINE__) \ __attribute__((unused)) \ - /**/ + /**/ #else # define THRUST_STATIC_ASSERT(B) \ typedef THRUST_NS_QUALIFIER::detail::static_assert_test< \ sizeof(THRUST_NS_QUALIFIER::detail::STATIC_ASSERTION_FAILURE<(bool)(B)>)\ > \ THRUST_PP_CAT2(thrust_static_assert_typedef_, __LINE__) \ - /**/ + /**/ #endif #define THRUST_STATIC_ASSERT_MSG(B, msg) THRUST_STATIC_ASSERT(B) diff --git a/thrust/thrust/detail/static_map.h b/thrust/thrust/detail/static_map.h index 9f0d79e83e2..c6a69981714 100644 --- a/thrust/thrust/detail/static_map.h +++ b/thrust/thrust/detail/static_map.h @@ -16,9 +16,13 @@ #pragma once - #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC THRUST_NAMESPACE_BEGIN namespace detail diff --git a/thrust/thrust/detail/swap.h b/thrust/thrust/detail/swap.h index 305750f8ae7..41782b12ef2 100644 --- a/thrust/thrust/detail/swap.h +++ b/thrust/thrust/detail/swap.h @@ -19,6 +19,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN __thrust_exec_check_disable__ diff --git a/thrust/thrust/detail/swap.inl b/thrust/thrust/detail/swap.inl index 196c34f41ee..3d11608821e 100644 --- a/thrust/thrust/detail/swap.inl +++ b/thrust/thrust/detail/swap.inl @@ -16,6 +16,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/swap_ranges.inl b/thrust/thrust/detail/swap_ranges.inl index 1f35c1ff318..0e834ac36ad 100644 --- a/thrust/thrust/detail/swap_ranges.inl +++ b/thrust/thrust/detail/swap_ranges.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/tabulate.inl b/thrust/thrust/detail/tabulate.inl index 308be061faf..7f56d95f1aa 100644 --- a/thrust/thrust/detail/tabulate.inl +++ b/thrust/thrust/detail/tabulate.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/temporary_array.h b/thrust/thrust/detail/temporary_array.h index cf4bc7d2d2e..5e938a96dc0 100644 --- a/thrust/thrust/detail/temporary_array.h +++ b/thrust/thrust/detail/temporary_array.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace detail { @@ -34,7 +40,6 @@ template } // end detail THRUST_NAMESPACE_END -#include #include #include #include diff --git a/thrust/thrust/detail/temporary_array.inl b/thrust/thrust/detail/temporary_array.inl index 90b7279ac6d..6edde810008 100644 --- a/thrust/thrust/detail/temporary_array.inl +++ b/thrust/thrust/detail/temporary_array.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/temporary_buffer.h b/thrust/thrust/detail/temporary_buffer.h index be95e7180f5..a32c014635d 100644 --- a/thrust/thrust/detail/temporary_buffer.h +++ b/thrust/thrust/detail/temporary_buffer.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/transform.inl b/thrust/thrust/detail/transform.inl index 62bafd35ef0..0999bca04ac 100644 --- a/thrust/thrust/detail/transform.inl +++ b/thrust/thrust/detail/transform.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/transform_reduce.inl b/thrust/thrust/detail/transform_reduce.inl index 702dd9f73b5..16b41010e61 100644 --- a/thrust/thrust/detail/transform_reduce.inl +++ b/thrust/thrust/detail/transform_reduce.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/transform_scan.inl b/thrust/thrust/detail/transform_scan.inl index 957001cefd6..f78fc055689 100644 --- a/thrust/thrust/detail/transform_scan.inl +++ b/thrust/thrust/detail/transform_scan.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/trivial_sequence.h b/thrust/thrust/detail/trivial_sequence.h index 2cf98e7872a..df70462c265 100644 --- a/thrust/thrust/detail/trivial_sequence.h +++ b/thrust/thrust/detail/trivial_sequence.h @@ -25,6 +25,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include @@ -64,7 +70,7 @@ struct _trivial_sequence { typedef typename thrust::iterator_value::type iterator_value; typedef typename thrust::detail::temporary_array::iterator iterator_type; - + thrust::detail::temporary_array buffer; __host__ __device__ diff --git a/thrust/thrust/detail/tuple_algorithms.h b/thrust/thrust/detail/tuple_algorithms.h index 2e49f4281f3..f75f3f63ac8 100644 --- a/thrust/thrust/detail/tuple_algorithms.h +++ b/thrust/thrust/detail/tuple_algorithms.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/detail/tuple_meta_transform.h b/thrust/thrust/detail/tuple_meta_transform.h index 285cae8b4c7..9ecfe113ab8 100644 --- a/thrust/thrust/detail/tuple_meta_transform.h +++ b/thrust/thrust/detail/tuple_meta_transform.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/detail/tuple_transform.h b/thrust/thrust/detail/tuple_transform.h index 1011d5179e3..0be5814cd00 100644 --- a/thrust/thrust/detail/tuple_transform.h +++ b/thrust/thrust/detail/tuple_transform.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/detail/type_deduction.h b/thrust/thrust/detail/type_deduction.h index 6f240711d0a..d861400b6ec 100644 --- a/thrust/thrust/detail/type_deduction.h +++ b/thrust/thrust/detail/type_deduction.h @@ -8,6 +8,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/detail/type_traits.h b/thrust/thrust/detail/type_traits.h index 605db3f5d40..1d19fc7b838 100644 --- a/thrust/thrust/detail/type_traits.h +++ b/thrust/thrust/detail/type_traits.h @@ -24,6 +24,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/detail/type_traits/function_traits.h b/thrust/thrust/detail/type_traits/function_traits.h index 1098201366e..7565b5a5b47 100644 --- a/thrust/thrust/detail/type_traits/function_traits.h +++ b/thrust/thrust/detail/type_traits/function_traits.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/detail/type_traits/has_member_function.h b/thrust/thrust/detail/type_traits/has_member_function.h index c33fe28f654..f12802d9d8a 100644 --- a/thrust/thrust/detail/type_traits/has_member_function.h +++ b/thrust/thrust/detail/type_traits/has_member_function.h @@ -16,6 +16,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include // for std::declval diff --git a/thrust/thrust/detail/type_traits/has_nested_type.h b/thrust/thrust/detail/type_traits/has_nested_type.h index 78bb4b7f57a..860514f35d2 100644 --- a/thrust/thrust/detail/type_traits/has_nested_type.h +++ b/thrust/thrust/detail/type_traits/has_nested_type.h @@ -16,6 +16,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #define __THRUST_DEFINE_HAS_NESTED_TYPE(trait_name, nested_type_name) \ diff --git a/thrust/thrust/detail/type_traits/has_trivial_assign.h b/thrust/thrust/detail/type_traits/has_trivial_assign.h index 7222ce593f5..8d057b72033 100644 --- a/thrust/thrust/detail/type_traits/has_trivial_assign.h +++ b/thrust/thrust/detail/type_traits/has_trivial_assign.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -32,11 +38,11 @@ THRUST_NAMESPACE_BEGIN namespace detail { -template +template struct has_trivial_assign : public integral_constant< - bool, - (is_pod::value && !is_const::value) + bool, + (is_pod::value && !is_const::value) || ::cuda::std::is_trivially_copy_assignable::value > {}; diff --git a/thrust/thrust/detail/type_traits/is_call_possible.h b/thrust/thrust/detail/type_traits/is_call_possible.h index 58c1aca4df0..cbc231e8760 100644 --- a/thrust/thrust/detail/type_traits/is_call_possible.h +++ b/thrust/thrust/detail/type_traits/is_call_possible.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include @@ -30,24 +36,24 @@ namespace detail namespace is_call_possible_detail { -template class void_exp_result {}; +template class void_exp_result {}; -template -U const& operator,(U const&, void_exp_result); +template +U const& operator,(U const&, void_exp_result); -template -U& operator,(U&, void_exp_result); +template +U& operator,(U&, void_exp_result); -template -struct clone_constness +template +struct clone_constness { - typedef dest_type type; -}; + typedef dest_type type; +}; -template -struct clone_constness -{ - typedef const dest_type type; +template +struct clone_constness +{ + typedef const dest_type type; }; } // end is_call_possible_detail @@ -158,5 +164,5 @@ struct trait_name public: \ static const bool value = impl::value, Signature>::value; \ typedef thrust::detail::integral_constant type; \ -}; +}; diff --git a/thrust/thrust/detail/type_traits/is_metafunction_defined.h b/thrust/thrust/detail/type_traits/is_metafunction_defined.h index 2c7a4be52df..5e2c217322e 100644 --- a/thrust/thrust/detail/type_traits/is_metafunction_defined.h +++ b/thrust/thrust/detail/type_traits/is_metafunction_defined.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/detail/type_traits/iterator/is_discard_iterator.h b/thrust/thrust/detail/type_traits/iterator/is_discard_iterator.h index 210409d6269..218273ff438 100644 --- a/thrust/thrust/detail/type_traits/iterator/is_discard_iterator.h +++ b/thrust/thrust/detail/type_traits/iterator/is_discard_iterator.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/detail/type_traits/iterator/is_output_iterator.h b/thrust/thrust/detail/type_traits/iterator/is_output_iterator.h index 555b67400cd..fdf95e0fae7 100644 --- a/thrust/thrust/detail/type_traits/iterator/is_output_iterator.h +++ b/thrust/thrust/detail/type_traits/iterator/is_output_iterator.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/type_traits/minimum_type.h b/thrust/thrust/detail/type_traits/minimum_type.h index 2417e327df8..d520fd5f827 100644 --- a/thrust/thrust/detail/type_traits/minimum_type.h +++ b/thrust/thrust/detail/type_traits/minimum_type.h @@ -18,12 +18,18 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN namespace detail -{ +{ namespace minimum_type_detail { @@ -33,7 +39,7 @@ namespace minimum_type_detail // if T1 and T2 are unrelated. // template struct minimum_type_impl {}; - + template struct minimum_type_impl { diff --git a/thrust/thrust/detail/type_traits/pointer_traits.h b/thrust/thrust/detail/type_traits/pointer_traits.h index 90a8bc29dec..e35047ba2b0 100644 --- a/thrust/thrust/detail/type_traits/pointer_traits.h +++ b/thrust/thrust/detail/type_traits/pointer_traits.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/type_traits/result_of_adaptable_function.h b/thrust/thrust/detail/type_traits/result_of_adaptable_function.h index edf797f141b..4baf724035e 100644 --- a/thrust/thrust/detail/type_traits/result_of_adaptable_function.h +++ b/thrust/thrust/detail/type_traits/result_of_adaptable_function.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/detail/uninitialized_copy.inl b/thrust/thrust/detail/uninitialized_copy.inl index 2778693ad3c..bf8f6c5cfb0 100644 --- a/thrust/thrust/detail/uninitialized_copy.inl +++ b/thrust/thrust/detail/uninitialized_copy.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/uninitialized_fill.inl b/thrust/thrust/detail/uninitialized_fill.inl index e013dac7b07..1dc65edb916 100644 --- a/thrust/thrust/detail/uninitialized_fill.inl +++ b/thrust/thrust/detail/uninitialized_fill.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/detail/unique.inl b/thrust/thrust/detail/unique.inl index ac5475f0238..1a5b827d16c 100644 --- a/thrust/thrust/detail/unique.inl +++ b/thrust/thrust/detail/unique.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/detail/use_default.h b/thrust/thrust/detail/use_default.h index f25b6274c44..745547ca5f7 100644 --- a/thrust/thrust/detail/use_default.h +++ b/thrust/thrust/detail/use_default.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN struct use_default {}; diff --git a/thrust/thrust/detail/util/align.h b/thrust/thrust/detail/util/align.h index a3aa75bfe41..c00a000f598 100644 --- a/thrust/thrust/detail/util/align.h +++ b/thrust/thrust/detail/util/align.h @@ -19,6 +19,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include // functions to handle memory alignment diff --git a/thrust/thrust/detail/vector_base.h b/thrust/thrust/detail/vector_base.h index 0c4da449eab..0657cbe25b2 100644 --- a/thrust/thrust/detail/vector_base.h +++ b/thrust/thrust/detail/vector_base.h @@ -22,11 +22,18 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include #include -#include #include #include @@ -134,13 +141,13 @@ template * \param il The intializer_list. */ vector_base(std::initializer_list il); - + /*! This constructor builds a \p vector_base from an intializer_list. * \param il The intializer_list. * \param alloc The allocator to use by this device_vector. */ vector_base(std::initializer_list il, const Alloc &alloc); - + /*! Assign operator copies from an initializer_list * \param il The initializer_list. */ @@ -445,7 +452,7 @@ template * \param x The exemplar element to copy & insert. * \return An iterator pointing to the newly inserted element. */ - iterator insert(iterator position, const T &x); + iterator insert(iterator position, const T &x); /*! This method inserts a copy of an exemplar value to a range at the * specified position in this vector_base. @@ -498,10 +505,10 @@ template private: // these methods resolve the ambiguity of the constructor template of form (Iterator, Iterator) template - void init_dispatch(IteratorOrIntegralType begin, IteratorOrIntegralType end, false_type); + void init_dispatch(IteratorOrIntegralType begin, IteratorOrIntegralType end, false_type); template - void init_dispatch(IteratorOrIntegralType n, IteratorOrIntegralType value, true_type); + void init_dispatch(IteratorOrIntegralType n, IteratorOrIntegralType value, true_type); template void range_init(InputIterator first, InputIterator last); @@ -589,7 +596,7 @@ template bool operator==(const detail::vector_base& lhs, const detail::vector_base& rhs); - + template bool operator==(const detail::vector_base& lhs, @@ -610,7 +617,7 @@ template bool operator!=(const detail::vector_base& lhs, const detail::vector_base& rhs); - + template bool operator!=(const detail::vector_base& lhs, diff --git a/thrust/thrust/detail/vector_base.inl b/thrust/thrust/detail/vector_base.inl index bdd6c1c7ac1..7d6bf5dd2a9 100644 --- a/thrust/thrust/detail/vector_base.inl +++ b/thrust/thrust/detail/vector_base.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/device_allocator.h b/thrust/thrust/device_allocator.h index f64c3854f0e..a0b240a66cc 100644 --- a/thrust/thrust/device_allocator.h +++ b/thrust/thrust/device_allocator.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/device_delete.h b/thrust/thrust/device_delete.h index 0811936fbbe..fb3af0316fe 100644 --- a/thrust/thrust/device_delete.h +++ b/thrust/thrust/device_delete.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/device_free.h b/thrust/thrust/device_free.h index 1cd305045e4..410201cbbdd 100644 --- a/thrust/thrust/device_free.h +++ b/thrust/thrust/device_free.h @@ -14,13 +14,19 @@ * limitations under the License. */ -/*! \file +/*! \file * \brief Deallocates storage allocated by \p device_malloc. */ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/device_make_unique.h b/thrust/thrust/device_make_unique.h index cdb8c31d82f..6f63f4cfb70 100644 --- a/thrust/thrust/device_make_unique.h +++ b/thrust/thrust/device_make_unique.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/device_malloc.h b/thrust/thrust/device_malloc.h index 790ddbac3a7..ed8276dee6f 100644 --- a/thrust/thrust/device_malloc.h +++ b/thrust/thrust/device_malloc.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include // for std::size_t diff --git a/thrust/thrust/device_malloc_allocator.h b/thrust/thrust/device_malloc_allocator.h index 1b15045f2f8..e34f3be3b14 100644 --- a/thrust/thrust/device_malloc_allocator.h +++ b/thrust/thrust/device_malloc_allocator.h @@ -14,13 +14,19 @@ * limitations under the License. */ -/*! \file +/*! \file * \brief An allocator which allocates storage with \p device_malloc. */ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -34,7 +40,7 @@ THRUST_NAMESPACE_BEGIN template class device_ptr; template device_ptr device_malloc(const std::size_t n); -/*! \addtogroup allocators Allocators +/*! \addtogroup allocators Allocators * \ingroup memory_management * \{ */ diff --git a/thrust/thrust/device_new.h b/thrust/thrust/device_new.h index c615e58f2d6..bfd252f0b3c 100644 --- a/thrust/thrust/device_new.h +++ b/thrust/thrust/device_new.h @@ -23,6 +23,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // #include this for size_t #include #include diff --git a/thrust/thrust/device_new_allocator.h b/thrust/thrust/device_new_allocator.h index c9c6b0e9507..a34888140ae 100644 --- a/thrust/thrust/device_new_allocator.h +++ b/thrust/thrust/device_new_allocator.h @@ -14,13 +14,19 @@ * limitations under the License. */ -/*! \file +/*! \file * \brief An allocator which allocates storage with \p device_new. */ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -105,7 +111,7 @@ template */ __host__ __device__ inline pointer address(reference r) { return &r; } - + /*! Returns the address an allocated object. * \return &r. */ diff --git a/thrust/thrust/device_ptr.h b/thrust/thrust/device_ptr.h index 5ef4aa464fc..8d3890c0cc8 100644 --- a/thrust/thrust/device_ptr.h +++ b/thrust/thrust/device_ptr.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/device_reference.h b/thrust/thrust/device_reference.h index 512ab4c60c3..50601ec5179 100644 --- a/thrust/thrust/device_reference.h +++ b/thrust/thrust/device_reference.h @@ -14,7 +14,7 @@ * limitations under the License. */ -/*! \file +/*! \file * \brief A reference to an object which resides in memory associated with the * device system. */ @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/device_vector.h b/thrust/thrust/device_vector.h index 9b97e8d7033..47d67b412d7 100644 --- a/thrust/thrust/device_vector.h +++ b/thrust/thrust/device_vector.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -203,14 +209,14 @@ template > */ device_vector(std::initializer_list il) :Parent(il) {} - + /*! This constructor builds a \p device_vector from an intializer_list. * \param il The intializer_list. * \param alloc The allocator to use by this device_vector. */ device_vector(std::initializer_list il, const Alloc &alloc) :Parent(il, alloc) {} - + /*! Assign an \p intializer_list with a matching element type * \param il The intializer_list. */ diff --git a/thrust/thrust/distance.h b/thrust/thrust/distance.h index 89087911512..82f045a06bb 100644 --- a/thrust/thrust/distance.h +++ b/thrust/thrust/distance.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/equal.h b/thrust/thrust/equal.h index 2f351890789..d85a36cc6b1 100644 --- a/thrust/thrust/equal.h +++ b/thrust/thrust/equal.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -150,7 +156,7 @@ bool equal(InputIterator1 first1, InputIterator1 last1, * #include * #include * ... - * + * * struct compare_modulo_two * { * __host__ __device__ @@ -200,7 +206,7 @@ bool equal(const thrust::detail::execution_policy_base &exec, Inp * * \code * #include - * + * * struct compare_modulo_two * { * __host__ __device__ @@ -220,7 +226,7 @@ bool equal(const thrust::detail::execution_policy_base &exec, Inp * * \see https://en.cppreference.com/w/cpp/algorithm/equal */ -template bool equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate binary_pred); diff --git a/thrust/thrust/event.h b/thrust/thrust/event.h index 75578d96443..d7b6a5d393b 100644 --- a/thrust/thrust/event.h +++ b/thrust/thrust/event.h @@ -20,6 +20,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include // TODO: Actually separate `` into two headers. diff --git a/thrust/thrust/execution_policy.h b/thrust/thrust/execution_policy.h index ecf14413f60..fe0ca84a728 100644 --- a/thrust/thrust/execution_policy.h +++ b/thrust/thrust/execution_policy.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/extrema.h b/thrust/thrust/extrema.h index ca419a0aa5b..f680eb35ebf 100644 --- a/thrust/thrust/extrema.h +++ b/thrust/thrust/extrema.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -220,7 +226,7 @@ __host__ __device__ * // *result is 0 * \endcode * - * \see https://en.cppreference.com/w/cpp/algorithm/min_element + * \see https://en.cppreference.com/w/cpp/algorithm/min_element */ template __host__ __device__ @@ -258,7 +264,7 @@ ForwardIterator min_element(const thrust::detail::execution_policy_base ForwardIterator min_element(ForwardIterator first, ForwardIterator last); @@ -323,7 +329,7 @@ ForwardIterator min_element(ForwardIterator first, ForwardIterator last); * // *smallest == {0,7} * \endcode * - * \see https://en.cppreference.com/w/cpp/algorithm/min_element + * \see https://en.cppreference.com/w/cpp/algorithm/min_element */ template __host__ __device__ @@ -383,7 +389,7 @@ ForwardIterator min_element(const thrust::detail::execution_policy_base ForwardIterator min_element(ForwardIterator first, ForwardIterator last, @@ -425,7 +431,7 @@ ForwardIterator min_element(ForwardIterator first, ForwardIterator last, * // *result == 3 * \endcode * - * \see https://en.cppreference.com/w/cpp/algorithm/max_element + * \see https://en.cppreference.com/w/cpp/algorithm/max_element */ template __host__ __device__ @@ -462,7 +468,7 @@ ForwardIterator max_element(const thrust::detail::execution_policy_base ForwardIterator max_element(ForwardIterator first, ForwardIterator last); @@ -527,7 +533,7 @@ ForwardIterator max_element(ForwardIterator first, ForwardIterator last); * // *largest == {6,1} * \endcode * - * \see https://en.cppreference.com/w/cpp/algorithm/max_element + * \see https://en.cppreference.com/w/cpp/algorithm/max_element */ template __host__ __device__ @@ -587,7 +593,7 @@ ForwardIterator max_element(const thrust::detail::execution_policy_base ForwardIterator max_element(ForwardIterator first, ForwardIterator last, @@ -665,7 +671,7 @@ thrust::pair minmax_element(const thrust::detai * \see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1840.pdf */ template -thrust::pair minmax_element(ForwardIterator first, +thrust::pair minmax_element(ForwardIterator first, ForwardIterator last); @@ -787,7 +793,7 @@ thrust::pair minmax_element(const thrust::detai * \see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1840.pdf */ template -thrust::pair minmax_element(ForwardIterator first, +thrust::pair minmax_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); diff --git a/thrust/thrust/fill.h b/thrust/thrust/fill.h index bd9e4026897..33ff6d614c3 100644 --- a/thrust/thrust/fill.h +++ b/thrust/thrust/fill.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/find.h b/thrust/thrust/find.h index 5ab9b0a2df8..4bfa9952203 100644 --- a/thrust/thrust/find.h +++ b/thrust/thrust/find.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -35,7 +41,7 @@ THRUST_NAMESPACE_BEGIN */ -/*! \p find returns the first iterator \c i in the range +/*! \p find returns the first iterator \c i in the range * [first, last) such that *i == value * or \c last if no such iterator exists. * @@ -50,7 +56,7 @@ THRUST_NAMESPACE_BEGIN * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input Iterator * and \p InputIterator's \c value_type is equality comparable to type \c T. - * \tparam T is a model of EqualityComparable. + * \tparam T is a model of EqualityComparable. * * \code * #include @@ -82,7 +88,7 @@ InputIterator find(const thrust::detail::execution_policy_base &e const T& value); -/*! \p find returns the first iterator \c i in the range +/*! \p find returns the first iterator \c i in the range * [first, last) such that *i == value * or \c last if no such iterator exists. * @@ -93,7 +99,7 @@ InputIterator find(const thrust::detail::execution_policy_base &e * * \tparam InputIterator is a model of Input Iterator * and \p InputIterator's \c value_type is equality comparable to type \c T. - * \tparam T is a model of EqualityComparable. + * \tparam T is a model of EqualityComparable. * * \code * #include @@ -122,7 +128,7 @@ InputIterator find(InputIterator first, const T& value); -/*! \p find_if returns the first iterator \c i in the range +/*! \p find_if returns the first iterator \c i in the range * [first, last) such that pred(*i) is \c true * or \c last if no such iterator exists. * @@ -189,7 +195,7 @@ InputIterator find_if(const thrust::detail::execution_policy_base Predicate pred); -/*! \p find_if returns the first iterator \c i in the range +/*! \p find_if returns the first iterator \c i in the range * [first, last) such that pred(*i) is \c true * or \c last if no such iterator exists. * @@ -248,7 +254,7 @@ InputIterator find_if(InputIterator first, Predicate pred); -/*! \p find_if_not returns the first iterator \c i in the range +/*! \p find_if_not returns the first iterator \c i in the range * [first, last) such that pred(*i) is \c false * or \c last if no such iterator exists. * @@ -315,7 +321,7 @@ InputIterator find_if_not(const thrust::detail::execution_policy_base[first, last) such that pred(*i) is \c false * or \c last if no such iterator exists. * diff --git a/thrust/thrust/for_each.h b/thrust/thrust/for_each.h index 7d05e3ea16b..1f11ea1a696 100644 --- a/thrust/thrust/for_each.h +++ b/thrust/thrust/for_each.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/functional.h b/thrust/thrust/functional.h index 0608f4b3d45..009b5b96f44 100644 --- a/thrust/thrust/functional.h +++ b/thrust/thrust/functional.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/future.h b/thrust/thrust/future.h index d8fb7544b17..5a896c23705 100644 --- a/thrust/thrust/future.h +++ b/thrust/thrust/future.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 @@ -70,14 +76,14 @@ namespace unimplemented struct no_unique_eager_event_type_found {}; -inline __host__ +inline __host__ no_unique_eager_event_type_found unique_eager_event_type(...) noexcept; struct no_unique_eager_future_type_found {}; template -__host__ +__host__ no_unique_eager_future_type_found unique_eager_future_type(...) noexcept; diff --git a/thrust/thrust/gather.h b/thrust/thrust/gather.h index 41acc22a34e..b0d4553f812 100644 --- a/thrust/thrust/gather.h +++ b/thrust/thrust/gather.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -32,7 +38,7 @@ THRUST_NAMESPACE_BEGIN */ -/*! \p gather copies elements from a source array into a destination range according +/*! \p gather copies elements from a source array into a destination range according * to a map. For each input iterator \c i in the range [map_first, map_last), the * value input_first[\*i] is assigned to *(result + (i - map_first)). * \p RandomAccessIterator must permit random access. @@ -92,7 +98,7 @@ __host__ __device__ OutputIterator result); -/*! \p gather copies elements from a source array into a destination range according +/*! \p gather copies elements from a source array into a destination range according * to a map. For each input iterator \c i in the range [map_first, map_last), the * value input_first[\*i] is assigned to *(result + (i - map_first)). * \p RandomAccessIterator must permit random access. @@ -143,7 +149,7 @@ template[map_first, map_last), * such that the value of \*(stencil + (i - map_first)) is \c true, the value * input_first[\*i] is assigned to *(result + (i - map_first)). @@ -214,7 +220,7 @@ __host__ __device__ OutputIterator result); -/*! \p gather_if conditionally copies elements from a source array into a destination +/*! \p gather_if conditionally copies elements from a source array into a destination * range according to a map. For each input iterator \c i in the range [map_first, map_last), * such that the value of \*(stencil + (i - map_first)) is \c true, the value * input_first[\*i] is assigned to *(result + (i - map_first)). @@ -276,7 +282,7 @@ template[map_first, map_last) * such that the value of pred(\*(stencil + (i - map_first))) is \c true, * the value input_first[\*i] is assigned to *(result + (i - map_first)). @@ -312,7 +318,7 @@ template * #include * #include - * + * * struct is_even * { * __host__ __device__ @@ -361,7 +367,7 @@ __host__ __device__ Predicate pred); -/*! \p gather_if conditionally copies elements from a source array into a destination +/*! \p gather_if conditionally copies elements from a source array into a destination * range according to a map. For each input iterator \c i in the range [map_first, map_last) * such that the value of pred(\*(stencil + (i - map_first))) is \c true, * the value input_first[\*i] is assigned to *(result + (i - map_first)). @@ -392,7 +398,7 @@ __host__ __device__ * \code * #include * #include - * + * * struct is_even * { * __host__ __device__ diff --git a/thrust/thrust/generate.h b/thrust/thrust/generate.h index d4729534460..671383018b8 100644 --- a/thrust/thrust/generate.h +++ b/thrust/thrust/generate.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/host_vector.h b/thrust/thrust/host_vector.h index bb925ea9ce8..2dd00cd59c7 100644 --- a/thrust/thrust/host_vector.h +++ b/thrust/thrust/host_vector.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -218,20 +224,20 @@ template > __host__ host_vector &operator=(const detail::vector_base &v) { Parent::operator=(v); return *this; } - + /*! This constructor builds a \p host_vector from an intializer_list. * \param il The intializer_list. */ host_vector(std::initializer_list il) :Parent(il) {} - + /*! This constructor builds a \p host_vector from an intializer_list. * \param il The intializer_list. * \param alloc The allocator to use by this host_vector. */ host_vector(std::initializer_list il, const Alloc &alloc) :Parent(il, alloc) {} - + /*! Assign an \p intializer_list with a matching element type * \param il The intializer_list. */ diff --git a/thrust/thrust/inner_product.h b/thrust/thrust/inner_product.h index 80068cf0c83..a4cda16172d 100644 --- a/thrust/thrust/inner_product.h +++ b/thrust/thrust/inner_product.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -162,7 +168,7 @@ OutputType inner_product(InputIterator1 first1, InputIterator1 last1, * and \p BinaryFunction1's \c return_type is convertible to \p OutputType. * \tparam BinaryFunction2 is a model of Binary Function, * and \p BinaryFunction2's \c return_type is convertible to \p BinaryFunction1's \c second_argument_type. - * + * * \code * #include * #include @@ -192,7 +198,7 @@ OutputType inner_product(const thrust::detail::execution_policy_baseBinary Function, * and \p BinaryFunction2's \c return_type is convertible to \p BinaryFunction1's \c second_argument_type. - * + * * \code * #include * ... @@ -248,7 +254,7 @@ OutputType inner_product(const thrust::detail::execution_policy_base OutputType inner_product(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, OutputType init, + InputIterator2 first2, OutputType init, BinaryFunction1 binary_op1, BinaryFunction2 binary_op2); diff --git a/thrust/thrust/iterator/constant_iterator.h b/thrust/thrust/iterator/constant_iterator.h index c6eec28e70e..dc773489299 100644 --- a/thrust/thrust/iterator/constant_iterator.h +++ b/thrust/thrust/iterator/constant_iterator.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -77,15 +83,15 @@ THRUST_NAMESPACE_BEGIN * data[1] = 7; * data[2] = 2; * data[3] = 5; - * + * * // add 10 to all values in data * thrust::transform(data.begin(), data.end(), * thrust::make_constant_iterator(10), * data.begin(), * thrust::plus()); - * + * * // data is now [13, 17, 12, 15] - * + * * return 0; * } * \endcode @@ -145,7 +151,7 @@ template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/iterator/detail/any_assign.h b/thrust/thrust/iterator/detail/any_assign.h index 87192215c3a..f07ec00d86c 100644 --- a/thrust/thrust/iterator/detail/any_assign.h +++ b/thrust/thrust/iterator/detail/any_assign.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace detail { diff --git a/thrust/thrust/iterator/detail/any_system_tag.h b/thrust/thrust/iterator/detail/any_system_tag.h index 2c5ce6448be..e53323f807f 100644 --- a/thrust/thrust/iterator/detail/any_system_tag.h +++ b/thrust/thrust/iterator/detail/any_system_tag.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/iterator/detail/constant_iterator_base.h b/thrust/thrust/iterator/detail/constant_iterator_base.h index 56bb7a5d01f..22065dc1489 100644 --- a/thrust/thrust/iterator/detail/constant_iterator_base.h +++ b/thrust/thrust/iterator/detail/constant_iterator_base.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include @@ -66,6 +72,6 @@ template +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/iterator/detail/device_system_tag.h b/thrust/thrust/iterator/detail/device_system_tag.h index b86109d216b..f9518536927 100644 --- a/thrust/thrust/iterator/detail/device_system_tag.h +++ b/thrust/thrust/iterator/detail/device_system_tag.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // #include the device system's execution_policy header #define __THRUST_DEVICE_SYSTEM_TAG_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/execution_policy.h> #include __THRUST_DEVICE_SYSTEM_TAG_HEADER diff --git a/thrust/thrust/iterator/detail/discard_iterator_base.h b/thrust/thrust/iterator/detail/discard_iterator_base.h index 38f77b37812..aa213cd5169 100644 --- a/thrust/thrust/iterator/detail/discard_iterator_base.h +++ b/thrust/thrust/iterator/detail/discard_iterator_base.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -58,7 +64,7 @@ template } // end detail - + THRUST_NAMESPACE_END diff --git a/thrust/thrust/iterator/detail/distance_from_result.h b/thrust/thrust/iterator/detail/distance_from_result.h index fe140344d49..478cdf00b98 100644 --- a/thrust/thrust/iterator/detail/distance_from_result.h +++ b/thrust/thrust/iterator/detail/distance_from_result.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/iterator/detail/host_system_tag.h b/thrust/thrust/iterator/detail/host_system_tag.h index 58478f8d926..28523ff4ef6 100644 --- a/thrust/thrust/iterator/detail/host_system_tag.h +++ b/thrust/thrust/iterator/detail/host_system_tag.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // #include the host system's execution_policy header #define __THRUST_HOST_SYSTEM_TAG_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/execution_policy.h> #include __THRUST_HOST_SYSTEM_TAG_HEADER diff --git a/thrust/thrust/iterator/detail/is_iterator_category.h b/thrust/thrust/iterator/detail/is_iterator_category.h index e520452a3ca..d6ccad460e9 100644 --- a/thrust/thrust/iterator/detail/is_iterator_category.h +++ b/thrust/thrust/iterator/detail/is_iterator_category.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/iterator/detail/iterator_adaptor_base.h b/thrust/thrust/iterator/detail/iterator_adaptor_base.h index 1173e414ca5..b7abacf35b7 100644 --- a/thrust/thrust/iterator/detail/iterator_adaptor_base.h +++ b/thrust/thrust/iterator/detail/iterator_adaptor_base.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/iterator/detail/iterator_category_to_system.h b/thrust/thrust/iterator/detail/iterator_category_to_system.h index e6103b539ae..68bfcfb6fae 100644 --- a/thrust/thrust/iterator/detail/iterator_category_to_system.h +++ b/thrust/thrust/iterator/detail/iterator_category_to_system.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -46,7 +52,7 @@ template >::value, detail::identity_, - + // convertible to device iterator? eval_if< or_< diff --git a/thrust/thrust/iterator/detail/iterator_category_to_traversal.h b/thrust/thrust/iterator/detail/iterator_category_to_traversal.h index d8c736c50a4..39bd5d325ce 100644 --- a/thrust/thrust/iterator/detail/iterator_category_to_traversal.h +++ b/thrust/thrust/iterator/detail/iterator_category_to_traversal.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/iterator/detail/iterator_category_with_system_and_traversal.h b/thrust/thrust/iterator/detail/iterator_category_with_system_and_traversal.h index cdd8a6d366a..a06f303f377 100644 --- a/thrust/thrust/iterator/detail/iterator_category_with_system_and_traversal.h +++ b/thrust/thrust/iterator/detail/iterator_category_with_system_and_traversal.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace detail { diff --git a/thrust/thrust/iterator/detail/iterator_facade_category.h b/thrust/thrust/iterator/detail/iterator_facade_category.h index 81b518002ba..5b3af7ecbb0 100644 --- a/thrust/thrust/iterator/detail/iterator_facade_category.h +++ b/thrust/thrust/iterator/detail/iterator_facade_category.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/iterator/detail/iterator_traits.inl b/thrust/thrust/iterator/detail/iterator_traits.inl index 544c24f0b42..cdc99473776 100644 --- a/thrust/thrust/iterator/detail/iterator_traits.inl +++ b/thrust/thrust/iterator/detail/iterator_traits.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/iterator/detail/iterator_traversal_tags.h b/thrust/thrust/iterator/detail/iterator_traversal_tags.h index 1fbc8a1e49c..88efd921649 100644 --- a/thrust/thrust/iterator/detail/iterator_traversal_tags.h +++ b/thrust/thrust/iterator/detail/iterator_traversal_tags.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN // define Boost's traversal tags diff --git a/thrust/thrust/iterator/detail/join_iterator.h b/thrust/thrust/iterator/detail/join_iterator.h index 83f143dc00a..d62099abb6b 100644 --- a/thrust/thrust/iterator/detail/join_iterator.h +++ b/thrust/thrust/iterator/detail/join_iterator.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/iterator/detail/minimum_category.h b/thrust/thrust/iterator/detail/minimum_category.h index 01e7e82c535..bbbcbe08454 100644 --- a/thrust/thrust/iterator/detail/minimum_category.h +++ b/thrust/thrust/iterator/detail/minimum_category.h @@ -18,12 +18,18 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN namespace detail -{ +{ template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include THRUST_NAMESPACE_BEGIN namespace detail -{ +{ template +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include @@ -49,7 +55,7 @@ template __host__ __device__ normal_iterator(Pointer p) : super_t(p) {} - + template __host__ __device__ normal_iterator(const normal_iterator &other, diff --git a/thrust/thrust/iterator/detail/permutation_iterator_base.h b/thrust/thrust/iterator/detail/permutation_iterator_base.h index d586cabb780..33d271588e2 100644 --- a/thrust/thrust/iterator/detail/permutation_iterator_base.h +++ b/thrust/thrust/iterator/detail/permutation_iterator_base.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/iterator/detail/retag.h b/thrust/thrust/iterator/detail/retag.h index d277d8b6f2b..fc3e96b1785 100644 --- a/thrust/thrust/iterator/detail/retag.h +++ b/thrust/thrust/iterator/detail/retag.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/iterator/detail/reverse_iterator.inl b/thrust/thrust/iterator/detail/reverse_iterator.inl index 9182ac3e896..36b8705abba 100644 --- a/thrust/thrust/iterator/detail/reverse_iterator.inl +++ b/thrust/thrust/iterator/detail/reverse_iterator.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/iterator/detail/reverse_iterator_base.h b/thrust/thrust/iterator/detail/reverse_iterator_base.h index de3bafde979..88fd0e4e0ba 100644 --- a/thrust/thrust/iterator/detail/reverse_iterator_base.h +++ b/thrust/thrust/iterator/detail/reverse_iterator_base.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/iterator/detail/tagged_iterator.h b/thrust/thrust/iterator/detail/tagged_iterator.h index 24cbbb7361d..f461ada8a80 100644 --- a/thrust/thrust/iterator/detail/tagged_iterator.h +++ b/thrust/thrust/iterator/detail/tagged_iterator.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/iterator/detail/transform_input_output_iterator.inl b/thrust/thrust/iterator/detail/transform_input_output_iterator.inl index b4792f724df..1020c3b8086 100644 --- a/thrust/thrust/iterator/detail/transform_input_output_iterator.inl +++ b/thrust/thrust/iterator/detail/transform_input_output_iterator.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/iterator/detail/transform_iterator.inl b/thrust/thrust/iterator/detail/transform_iterator.inl index 0dc6f9854de..4616e021e06 100644 --- a/thrust/thrust/iterator/detail/transform_iterator.inl +++ b/thrust/thrust/iterator/detail/transform_iterator.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/iterator/detail/transform_output_iterator.inl b/thrust/thrust/iterator/detail/transform_output_iterator.inl index d5033f10589..94aa6288f3a 100644 --- a/thrust/thrust/iterator/detail/transform_output_iterator.inl +++ b/thrust/thrust/iterator/detail/transform_output_iterator.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/iterator/detail/tuple_of_iterator_references.h b/thrust/thrust/iterator/detail/tuple_of_iterator_references.h index eb171338d27..c04c9705a5f 100644 --- a/thrust/thrust/iterator/detail/tuple_of_iterator_references.h +++ b/thrust/thrust/iterator/detail/tuple_of_iterator_references.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/iterator/detail/universal_categories.h b/thrust/thrust/iterator/detail/universal_categories.h index d2abd7f55bd..b5410b2c442 100644 --- a/thrust/thrust/iterator/detail/universal_categories.h +++ b/thrust/thrust/iterator/detail/universal_categories.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include // XXX eliminate this file diff --git a/thrust/thrust/iterator/detail/zip_iterator.inl b/thrust/thrust/iterator/detail/zip_iterator.inl index a2bc98afec2..9419737d4fd 100644 --- a/thrust/thrust/iterator/detail/zip_iterator.inl +++ b/thrust/thrust/iterator/detail/zip_iterator.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/iterator/detail/zip_iterator_base.h b/thrust/thrust/iterator/detail/zip_iterator_base.h index 030153b65ea..cfecd742ac0 100644 --- a/thrust/thrust/iterator/detail/zip_iterator_base.h +++ b/thrust/thrust/iterator/detail/zip_iterator_base.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include @@ -84,7 +90,7 @@ struct dereference_iterator { template struct apply - { + { typedef typename iterator_traits::reference type; @@ -122,8 +128,8 @@ template }; // end apply2 -// Meta-accumulate algorithm for tuples. Note: The template -// parameter StartType corresponds to the initial value in +// Meta-accumulate algorithm for tuples. Note: The template +// parameter StartType corresponds to the initial value in // ordinary accumulation. // template @@ -153,7 +159,7 @@ template< , typename tuple_meta_accumulate< thrust::tuple , BinaryMetaFun - , StartType + , StartType >::type >::type type; }; @@ -187,7 +193,7 @@ Fun tuple_for_each(thrust::tuple& t, Fun f, thrust::index_sequence template inline __host__ __device__ Fun tuple_for_each(thrust::tuple& t, Fun f) -{ +{ return tuple_for_each(t, f, thrust::make_index_sequence>::value>{}); } @@ -227,7 +233,7 @@ struct minimum_traversal_category_in_iterator_tuple IteratorTuple , thrust::iterator_traversal >::type tuple_of_traversal_tags; - + typedef typename tuple_impl_specific::tuple_meta_accumulate< tuple_of_traversal_tags , minimum_category_lambda @@ -302,7 +308,7 @@ template // // Class zip_iterator_base // -// Builds and exposes the iterator facade type from which the zip +// Builds and exposes the iterator facade type from which the zip // iterator will be derived. // template @@ -331,14 +337,14 @@ template // iterator tuple typedef typename minimum_traversal_category_in_iterator_tuple::type traversal_category; - + public: - + // The iterator facade type from which the zip iterator will // be derived. typedef thrust::iterator_facade< zip_iterator, - value_type, + value_type, system, traversal_category, reference, diff --git a/thrust/thrust/iterator/discard_iterator.h b/thrust/thrust/iterator/discard_iterator.h index eb5156edac4..7d3b5467e62 100644 --- a/thrust/thrust/iterator/discard_iterator.h +++ b/thrust/thrust/iterator/discard_iterator.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/iterator/iterator_adaptor.h b/thrust/thrust/iterator/iterator_adaptor.h index 36ba0f63f7b..ff5af899984 100644 --- a/thrust/thrust/iterator/iterator_adaptor.h +++ b/thrust/thrust/iterator/iterator_adaptor.h @@ -33,6 +33,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/iterator/iterator_categories.h b/thrust/thrust/iterator/iterator_categories.h index 9a6f3f4ae52..4b02ec6be25 100644 --- a/thrust/thrust/iterator/iterator_categories.h +++ b/thrust/thrust/iterator/iterator_categories.h @@ -21,7 +21,7 @@ /* * (C) Copyright Jeremy Siek 2002. - * + * * Distributed under the Boost Software License, Version 1.0. * (See accompanying NOTICE file for the complete license) * @@ -32,6 +32,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -111,7 +117,7 @@ struct forward_device_iterator_tag * representation of the Bidirectional Device Iterator concept within the C++ * type system. * - * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags + * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags * iterator_traits, input_device_iterator_tag, output_device_iterator_tag, * forward_device_iterator_tag, random_access_device_iterator_tag, * input_host_iterator_tag, output_host_iterator_tag, forward_host_iterator_tag, @@ -130,7 +136,7 @@ struct bidirectional_device_iterator_tag * representation of the Random Access Device Iterator concept within the C++ * type system. * - * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags + * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags * iterator_traits, input_device_iterator_tag, output_device_iterator_tag, * forward_device_iterator_tag, bidirectional_device_iterator_tag, * input_host_iterator_tag, output_host_iterator_tag, forward_host_iterator_tag, @@ -149,7 +155,7 @@ struct random_access_device_iterator_tag * representation of the Input Host Iterator concept within the C++ * type system. * - * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags + * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags * iterator_traits, input_device_iterator_tag, output_device_iterator_tag, * forward_device_iterator_tag, bidirectional_device_iterator_tag, * random_access_device_iterator_tag, @@ -163,7 +169,7 @@ typedef std::input_iterator_tag input_host_iterator_tag; * representation of the Output Host Iterator concept within the C++ * type system. * - * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags + * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags * iterator_traits, input_device_iterator_tag, output_device_iterator_tag, * forward_device_iterator_tag, bidirectional_device_iterator_tag, * random_access_device_iterator_tag, @@ -177,7 +183,7 @@ typedef std::output_iterator_tag output_host_iterator_tag; * representation of the Forward Host Iterator concept within the C++ * type system. * - * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags + * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags * iterator_traits, input_device_iterator_tag, output_device_iterator_tag, * forward_device_iterator_tag, bidirectional_device_iterator_tag, * random_access_device_iterator_tag, @@ -191,7 +197,7 @@ typedef std::forward_iterator_tag forward_host_iterator_tag; * representation of the Forward Host Iterator concept within the C++ * type system. * - * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags + * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags * iterator_traits, input_device_iterator_tag, output_device_iterator_tag, * forward_device_iterator_tag, bidirectional_device_iterator_tag, * random_access_device_iterator_tag, @@ -205,7 +211,7 @@ typedef std::bidirectional_iterator_tag bidirectional_host_iterator_tag; * representation of the Forward Host Iterator concept within the C++ * type system. * - * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags + * \see https://en.cppreference.com/w/cpp/iterator/iterator_tags * iterator_traits, input_device_iterator_tag, output_device_iterator_tag, * forward_device_iterator_tag, bidirectional_device_iterator_tag, * random_access_device_iterator_tag, diff --git a/thrust/thrust/iterator/iterator_facade.h b/thrust/thrust/iterator/iterator_facade.h index f6920c5c85c..e1d4e0889d8 100644 --- a/thrust/thrust/iterator/iterator_facade.h +++ b/thrust/thrust/iterator/iterator_facade.h @@ -22,7 +22,7 @@ * (C) Copyright David Abrahams 2002. * (C) Copyright Jeremy Siek 2002. * (C) Copyright Thomas Witt 2002. - * + * * Distributed under the Boost Software License, Version 1.0. * (See accompanying NOTICE file for the complete license) * @@ -33,6 +33,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -189,7 +195,7 @@ class iterator_core_access { return f2.distance_to(f1); } - + template __host__ __device__ static typename thrust::detail::distance_from_result::type diff --git a/thrust/thrust/iterator/iterator_traits.h b/thrust/thrust/iterator/iterator_traits.h index b2f4b175a3f..7d9cf29c942 100644 --- a/thrust/thrust/iterator/iterator_traits.h +++ b/thrust/thrust/iterator/iterator_traits.h @@ -21,7 +21,7 @@ /* * (C) Copyright David Abrahams 2003. - * + * * Distributed under the Boost Software License, Version 1.0. * (See accompanying NOTICE file for the complete license) * @@ -31,6 +31,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/iterator/permutation_iterator.h b/thrust/thrust/iterator/permutation_iterator.h index 60e9c8e8ada..6a615eaff2a 100644 --- a/thrust/thrust/iterator/permutation_iterator.h +++ b/thrust/thrust/iterator/permutation_iterator.h @@ -32,6 +32,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/iterator/retag.h b/thrust/thrust/iterator/retag.h index 1eb770ae321..17740d3f1bd 100644 --- a/thrust/thrust/iterator/retag.h +++ b/thrust/thrust/iterator/retag.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/iterator/reverse_iterator.h b/thrust/thrust/iterator/reverse_iterator.h index fe8bbe0cf83..0f903ca4886 100644 --- a/thrust/thrust/iterator/reverse_iterator.h +++ b/thrust/thrust/iterator/reverse_iterator.h @@ -23,7 +23,7 @@ * (C) Copyright David Abrahams 2002. * (C) Copyright Jeremy Siek 2002. * (C) Copyright Thomas Witt 2002. - * + * * Distributed under the Boost Software License, Version 1.0. * (See accompanying NOTICE file for the complete license) * @@ -33,6 +33,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -216,7 +222,7 @@ template /*! \p make_reverse_iterator creates a \p reverse_iterator * from a \c BidirectionalIterator pointing to a range of elements to reverse. - * + * * \param x A \c BidirectionalIterator pointing to a range to reverse. * \return A new \p reverse_iterator which reverses the range \p x. */ diff --git a/thrust/thrust/iterator/transform_input_output_iterator.h b/thrust/thrust/iterator/transform_input_output_iterator.h index a5f725dc537..f050f509bdf 100644 --- a/thrust/thrust/iterator/transform_input_output_iterator.h +++ b/thrust/thrust/iterator/transform_input_output_iterator.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -62,7 +68,7 @@ THRUST_NAMESPACE_BEGIN * // Iterator that returns negated values and writes squared values * auto iter = thrust::make_transform_input_output_iterator(v.begin(), * thrust::negate{}, thrust::square{}); - * + * * // Iterator negates values when reading * std::cout << iter[0] << " "; // -1.0f; * std::cout << iter[1] << " "; // -2.0f; diff --git a/thrust/thrust/iterator/transform_iterator.h b/thrust/thrust/iterator/transform_iterator.h index f777a9baf27..128ddf3f73d 100644 --- a/thrust/thrust/iterator/transform_iterator.h +++ b/thrust/thrust/iterator/transform_iterator.h @@ -34,6 +34,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // #include the details first #include #include diff --git a/thrust/thrust/iterator/transform_output_iterator.h b/thrust/thrust/iterator/transform_output_iterator.h index 3ac4b85729e..d5b1f272f74 100644 --- a/thrust/thrust/iterator/transform_output_iterator.h +++ b/thrust/thrust/iterator/transform_output_iterator.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -38,7 +44,7 @@ THRUST_NAMESPACE_BEGIN /*! \p transform_output_iterator is a special kind of output iterator which * transforms a value written upon dereference. This iterator is useful * for transforming an output from algorithms without explicitly storing the - * intermediate result in the memory and applying subsequent transformation, + * intermediate result in the memory and applying subsequent transformation, * thereby avoiding wasting memory capacity and bandwidth. * Using \p transform_iterator facilitates kernel fusion by deferring execution * of transformation until the value is written while saving both memory @@ -61,7 +67,7 @@ THRUST_NAMESPACE_BEGIN * return sqrtf(x); * } * }; - * + * * int main() * { * thrust::device_vector v(4); @@ -69,17 +75,17 @@ THRUST_NAMESPACE_BEGIN * typedef thrust::device_vector::iterator FloatIterator; * thrust::transform_output_iterator iter(v.begin(), square_root()); * - * iter[0] = 1.0f; // stores sqrtf( 1.0f) + * iter[0] = 1.0f; // stores sqrtf( 1.0f) * iter[1] = 4.0f; // stores sqrtf( 4.0f) * iter[2] = 9.0f; // stores sqrtf( 9.0f) * iter[3] = 16.0f; // stores sqrtf(16.0f) * // iter[4] is an out-of-bounds error - * + * * v[0]; // returns 1.0f; * v[1]; // returns 2.0f; * v[2]; // returns 3.0f; * v[3]; // returns 4.0f; - * + * * } * \endcode * @@ -109,7 +115,7 @@ template /*! This constructor takes as argument an \c OutputIterator and an \c * UnaryFunction and copies them to a new \p transform_output_iterator * - * \param out An \c OutputIterator pointing to the output range whereto the result of + * \param out An \c OutputIterator pointing to the output range whereto the result of * \p transform_output_iterator's \c UnaryFunction will be written. * \param fun An \c UnaryFunction used to transform the objects assigned to * this \p transform_output_iterator. diff --git a/thrust/thrust/iterator/zip_iterator.h b/thrust/thrust/iterator/zip_iterator.h index c2dd5ddc456..fb55295aaa9 100644 --- a/thrust/thrust/iterator/zip_iterator.h +++ b/thrust/thrust/iterator/zip_iterator.h @@ -22,7 +22,7 @@ /* * Copyright David Abrahams and Thomas Becker 2000-2006. - * + * * Distributed under the Boost Software License, Version 1.0. * (See accompanying NOTICE file for the complete license) * @@ -32,6 +32,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -56,7 +62,7 @@ THRUST_NAMESPACE_BEGIN * * The following code snippet demonstrates how to create a \p zip_iterator * which represents the result of "zipping" multiple ranges together. - * + * * \code * #include * #include @@ -147,7 +153,7 @@ template /*! This constructor creates a new \p zip_iterator from a * \p tuple of iterators. - * + * * \param iterator_tuple The \p tuple of iterators to copy from. */ inline __host__ __device__ diff --git a/thrust/thrust/limits.h b/thrust/thrust/limits.h index 52f38b1fc9e..92281ea0a59 100644 --- a/thrust/thrust/limits.h +++ b/thrust/thrust/limits.h @@ -5,6 +5,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/logical.h b/thrust/thrust/logical.h index 5a8dbbecf6e..6e4e7d4e45a 100644 --- a/thrust/thrust/logical.h +++ b/thrust/thrust/logical.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -36,7 +42,7 @@ THRUST_NAMESPACE_BEGIN /*! \p all_of determines whether all elements in a range satify a predicate. * Specifically, \p all_of returns \c true if pred(*i) is \c true - * for every iterator \c i in the range [first, last) and + * for every iterator \c i in the range [first, last) and * \c false otherwise. * * The algorithm's execution is parallelized as determined by \p exec. @@ -63,7 +69,7 @@ THRUST_NAMESPACE_BEGIN * * // empty range * thrust::all_of(thrust::host, A, A, thrust::identity()); // returns false - * + * * \endcode * * \see any_of @@ -77,7 +83,7 @@ bool all_of(const thrust::detail::execution_policy_base &exec, In /*! \p all_of determines whether all elements in a range satify a predicate. * Specifically, \p all_of returns \c true if pred(*i) is \c true - * for every iterator \c i in the range [first, last) and + * for every iterator \c i in the range [first, last) and * \c false otherwise. * * \param first The beginning of the sequence. @@ -99,7 +105,7 @@ bool all_of(const thrust::detail::execution_policy_base &exec, In * * // empty range * thrust::all_of(A, A, thrust::identity()); // returns false - * + * * \endcode * * \see any_of @@ -112,7 +118,7 @@ bool all_of(InputIterator first, InputIterator last, Predicate pred); /*! \p any_of determines whether any element in a range satifies a predicate. * Specifically, \p any_of returns \c true if pred(*i) is \c true - * for any iterator \c i in the range [first, last) and + * for any iterator \c i in the range [first, last) and * \c false otherwise. * * The algorithm's execution is parallelized as determined by \p exec. @@ -150,11 +156,11 @@ bool all_of(InputIterator first, InputIterator last, Predicate pred); template __host__ __device__ bool any_of(const thrust::detail::execution_policy_base &exec, InputIterator first, InputIterator last, Predicate pred); - + /*! \p any_of determines whether any element in a range satifies a predicate. * Specifically, \p any_of returns \c true if pred(*i) is \c true - * for any iterator \c i in the range [first, last) and + * for any iterator \c i in the range [first, last) and * \c false otherwise. * * \param first The beginning of the sequence. @@ -189,7 +195,7 @@ bool any_of(InputIterator first, InputIterator last, Predicate pred); /*! \p none_of determines whether no element in a range satifies a predicate. - * Specifically, \p none_of returns \c true if there is no iterator \c i in + * Specifically, \p none_of returns \c true if there is no iterator \c i in * the range [first, last) such that pred(*i) is \c true, * and \c false otherwise. * @@ -231,7 +237,7 @@ bool none_of(const thrust::detail::execution_policy_base &exec, I /*! \p none_of determines whether no element in a range satifies a predicate. - * Specifically, \p none_of returns \c true if there is no iterator \c i in + * Specifically, \p none_of returns \c true if there is no iterator \c i in * the range [first, last) such that pred(*i) is \c true, * and \c false otherwise. * diff --git a/thrust/thrust/memory.h b/thrust/thrust/memory.h index 819ac251301..39557fe9f48 100644 --- a/thrust/thrust/memory.h +++ b/thrust/thrust/memory.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/merge.h b/thrust/thrust/merge.h index 724f4c167f1..85139edc52d 100644 --- a/thrust/thrust/merge.h +++ b/thrust/thrust/merge.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/mismatch.h b/thrust/thrust/mismatch.h index bbdf2923a09..ed614df340a 100644 --- a/thrust/thrust/mismatch.h +++ b/thrust/thrust/mismatch.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -37,7 +43,7 @@ THRUST_NAMESPACE_BEGIN /*! \p mismatch finds the first position where the two ranges [first1, last1) - * and [first2, first2 + (last1 - first1)) differ. The two versions of + * and [first2, first2 + (last1 - first1)) differ. The two versions of * \p mismatch use different tests for whether elements differ. * * This version of \p mismatch finds the first iterator \c i in [first1, last1) @@ -67,7 +73,7 @@ THRUST_NAMESPACE_BEGIN * thrust::device_vector vec1(4); * thrust::device_vector vec2(4); * - * vec1[0] = 0; vec2[0] = 0; + * vec1[0] = 0; vec2[0] = 0; * vec1[1] = 5; vec2[1] = 5; * vec1[2] = 3; vec2[2] = 8; * vec1[3] = 7; vec2[3] = 7; @@ -93,7 +99,7 @@ thrust::pair mismatch(const thrust::detail::exec /*! \p mismatch finds the first position where the two ranges [first1, last1) - * and [first2, first2 + (last1 - first1)) differ. The two versions of + * and [first2, first2 + (last1 - first1)) differ. The two versions of * \p mismatch use different tests for whether elements differ. * * This version of \p mismatch finds the first iterator \c i in [first1, last1) @@ -118,7 +124,7 @@ thrust::pair mismatch(const thrust::detail::exec * thrust::device_vector vec1(4); * thrust::device_vector vec2(4); * - * vec1[0] = 0; vec2[0] = 0; + * vec1[0] = 0; vec2[0] = 0; * vec1[1] = 5; vec2[1] = 5; * vec1[2] = 3; vec2[2] = 8; * vec1[3] = 7; vec2[3] = 7; @@ -142,7 +148,7 @@ thrust::pair mismatch(InputIterator1 first1, /*! \p mismatch finds the first position where the two ranges [first1, last1) - * and [first2, first2 + (last1 - first1)) differ. The two versions of + * and [first2, first2 + (last1 - first1)) differ. The two versions of * \p mismatch use different tests for whether elements differ. * * This version of \p mismatch finds the first iterator \c i in [first1, last1) @@ -173,7 +179,7 @@ thrust::pair mismatch(InputIterator1 first1, * thrust::device_vector vec1(4); * thrust::device_vector vec2(4); * - * vec1[0] = 0; vec2[0] = 0; + * vec1[0] = 0; vec2[0] = 0; * vec1[1] = 5; vec2[1] = 5; * vec1[2] = 3; vec2[2] = 8; * vec1[3] = 7; vec2[3] = 7; @@ -200,7 +206,7 @@ thrust::pair mismatch(const thrust::detail::exec /*! \p mismatch finds the first position where the two ranges [first1, last1) - * and [first2, first2 + (last1 - first1)) differ. The two versions of + * and [first2, first2 + (last1 - first1)) differ. The two versions of * \p mismatch use different tests for whether elements differ. * * This version of \p mismatch finds the first iterator \c i in [first1, last1) @@ -226,7 +232,7 @@ thrust::pair mismatch(const thrust::detail::exec * thrust::device_vector vec1(4); * thrust::device_vector vec2(4); * - * vec1[0] = 0; vec2[0] = 0; + * vec1[0] = 0; vec2[0] = 0; * vec1[1] = 5; vec2[1] = 5; * vec1[2] = 3; vec2[2] = 8; * vec1[3] = 7; vec2[3] = 7; diff --git a/thrust/thrust/mr/allocator.h b/thrust/thrust/mr/allocator.h index 67adbe87c34..e6dd57b763b 100644 --- a/thrust/thrust/mr/allocator.h +++ b/thrust/thrust/mr/allocator.h @@ -14,16 +14,23 @@ * limitations under the License. */ -/*! \file +/*! \file * \brief Allocator types usable with \ref Memory Resources. */ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include #include #include diff --git a/thrust/thrust/mr/device_memory_resource.h b/thrust/thrust/mr/device_memory_resource.h index 3a671142aaf..6dce1a6e09b 100644 --- a/thrust/thrust/mr/device_memory_resource.h +++ b/thrust/thrust/mr/device_memory_resource.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // #include the device system's memory_resource header #define __THRUST_DEVICE_SYSTEM_MEMORY_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/memory_resource.h> #include __THRUST_DEVICE_SYSTEM_MEMORY_HEADER diff --git a/thrust/thrust/mr/disjoint_pool.h b/thrust/thrust/mr/disjoint_pool.h index b00a8644cca..245cc91a8a0 100644 --- a/thrust/thrust/mr/disjoint_pool.h +++ b/thrust/thrust/mr/disjoint_pool.h @@ -14,13 +14,21 @@ * limitations under the License. */ -/*! \file +/*! \file * \brief A caching and pooling memory resource adaptor which uses separate upstream resources for memory allocation * and bookkeeping. */ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/mr/disjoint_sync_pool.h b/thrust/thrust/mr/disjoint_sync_pool.h index ed81ae4cb84..aea7fc2a109 100644 --- a/thrust/thrust/mr/disjoint_sync_pool.h +++ b/thrust/thrust/mr/disjoint_sync_pool.h @@ -14,13 +14,19 @@ * limitations under the License. */ -/*! \file +/*! \file * \brief A mutex-synchronized version of \p disjoint_unsynchronized_pool_resource. */ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/mr/disjoint_tls_pool.h b/thrust/thrust/mr/disjoint_tls_pool.h index 9fc7917cae1..730f1c2a116 100644 --- a/thrust/thrust/mr/disjoint_tls_pool.h +++ b/thrust/thrust/mr/disjoint_tls_pool.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/mr/fancy_pointer_resource.h b/thrust/thrust/mr/fancy_pointer_resource.h index b8810756409..3282e81ac98 100644 --- a/thrust/thrust/mr/fancy_pointer_resource.h +++ b/thrust/thrust/mr/fancy_pointer_resource.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/mr/host_memory_resource.h b/thrust/thrust/mr/host_memory_resource.h index 9359a97a7de..6460148d4fb 100644 --- a/thrust/thrust/mr/host_memory_resource.h +++ b/thrust/thrust/mr/host_memory_resource.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // #include the host system's memory_resource header #define __THRUST_HOST_SYSTEM_MEMORY_HEADER <__THRUST_HOST_SYSTEM_ROOT/memory_resource.h> #include __THRUST_HOST_SYSTEM_MEMORY_HEADER diff --git a/thrust/thrust/mr/memory_resource.h b/thrust/thrust/mr/memory_resource.h index 6af2f167c64..bda6d54ce61 100644 --- a/thrust/thrust/mr/memory_resource.h +++ b/thrust/thrust/mr/memory_resource.h @@ -22,6 +22,13 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #ifdef THRUST_MR_STD_MR_HEADER # include THRUST_MR_STD_MR_HEADER diff --git a/thrust/thrust/mr/new.h b/thrust/thrust/mr/new.h index 644e25169ed..ccc788e9aca 100644 --- a/thrust/thrust/mr/new.h +++ b/thrust/thrust/mr/new.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/mr/polymorphic_adaptor.h b/thrust/thrust/mr/polymorphic_adaptor.h index 0562a8f8269..9114be766d9 100644 --- a/thrust/thrust/mr/polymorphic_adaptor.h +++ b/thrust/thrust/mr/polymorphic_adaptor.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/mr/pool.h b/thrust/thrust/mr/pool.h index 6259a23f172..2eee32ced63 100644 --- a/thrust/thrust/mr/pool.h +++ b/thrust/thrust/mr/pool.h @@ -14,7 +14,7 @@ * limitations under the License. */ -/*! \file +/*! \file * \brief A caching and pooling memory resource adaptor which uses a single * upstream resource for memory allocation, and embeds bookkeeping information * in allocated blocks. @@ -24,6 +24,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/mr/pool_options.h b/thrust/thrust/mr/pool_options.h index 13a8fe67400..c0346b13c95 100644 --- a/thrust/thrust/mr/pool_options.h +++ b/thrust/thrust/mr/pool_options.h @@ -14,18 +14,24 @@ * limitations under the License. */ -/*! \file +/*! \file * \brief A type used by the pooling resource adaptors to fine-tune their * behavior. */ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include - -#include #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/mr/sync_pool.h b/thrust/thrust/mr/sync_pool.h index 46c0e844137..6e1a338226e 100644 --- a/thrust/thrust/mr/sync_pool.h +++ b/thrust/thrust/mr/sync_pool.h @@ -14,13 +14,19 @@ * limitations under the License. */ -/*! \file +/*! \file * \brief A mutex-synchronized version of \p unsynchronized_pool_resource. */ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/mr/tls_pool.h b/thrust/thrust/mr/tls_pool.h index 8ee8127a3d7..f8984d97be6 100644 --- a/thrust/thrust/mr/tls_pool.h +++ b/thrust/thrust/mr/tls_pool.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/mr/universal_memory_resource.h b/thrust/thrust/mr/universal_memory_resource.h index b7f1ebd6f46..f056fda5efc 100644 --- a/thrust/thrust/mr/universal_memory_resource.h +++ b/thrust/thrust/mr/universal_memory_resource.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include diff --git a/thrust/thrust/mr/validator.h b/thrust/thrust/mr/validator.h index 10e964821a5..3a9c9c3da99 100644 --- a/thrust/thrust/mr/validator.h +++ b/thrust/thrust/mr/validator.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/optional.h b/thrust/thrust/optional.h index a1ca4f46554..746f202db24 100644 --- a/thrust/thrust/optional.h +++ b/thrust/thrust/optional.h @@ -14,6 +14,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/pair.h b/thrust/thrust/pair.h index 8b1b6b91f87..15ebc1cc5ee 100644 --- a/thrust/thrust/pair.h +++ b/thrust/thrust/pair.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/partition.h b/thrust/thrust/partition.h index 90768f24676..c98116c7fc3 100644 --- a/thrust/thrust/partition.h +++ b/thrust/thrust/partition.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -1246,7 +1252,7 @@ template */ -/*! \p is_partitioned returns \c true if the given range +/*! \p is_partitioned returns \c true if the given range * is partitioned with respect to a predicate, and \c false otherwise. * * Specifically, \p is_partitioned returns \c true if [first, last) @@ -1346,7 +1352,7 @@ template * \tparam InputIterator is a model of Input Iterator, * and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type. * \tparam Predicate is a model of Predicate. - * + * * \code * #include * #include @@ -1359,7 +1365,7 @@ template * return (x % 2) == 0; * } * }; - * + * * ... * * int A[] = {2, 4, 6, 8, 10, 1, 3, 5, 7, 9}; @@ -1379,7 +1385,7 @@ __host__ __device__ Predicate pred); -/*! \p is_partitioned returns \c true if the given range +/*! \p is_partitioned returns \c true if the given range * is partitioned with respect to a predicate, and \c false otherwise. * * Specifically, \p is_partitioned returns \c true if [first, last) @@ -1396,7 +1402,7 @@ __host__ __device__ * \tparam InputIterator is a model of Input Iterator, * and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type. * \tparam Predicate is a model of Predicate. - * + * * \code * #include * @@ -1408,7 +1414,7 @@ __host__ __device__ * return (x % 2) == 0; * } * }; - * + * * ... * * int A[] = {2, 4, 6, 8, 10, 1, 3, 5, 7, 9}; diff --git a/thrust/thrust/per_device_resource.h b/thrust/thrust/per_device_resource.h index a6d620f85ec..8ee9b5d5b19 100644 --- a/thrust/thrust/per_device_resource.h +++ b/thrust/thrust/per_device_resource.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/random.h b/thrust/thrust/random.h index 7463620b7bc..223566dae01 100644 --- a/thrust/thrust/random.h +++ b/thrust/thrust/random.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include // RNGs diff --git a/thrust/thrust/random/detail/discard_block_engine.inl b/thrust/thrust/random/detail/discard_block_engine.inl index 31128e25061..fc95d7e29ea 100644 --- a/thrust/thrust/random/detail/discard_block_engine.inl +++ b/thrust/thrust/random/detail/discard_block_engine.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/random/detail/linear_congruential_engine.inl b/thrust/thrust/random/detail/linear_congruential_engine.inl index fa9fd7d0d66..5058d1a912d 100644 --- a/thrust/thrust/random/detail/linear_congruential_engine.inl +++ b/thrust/thrust/random/detail/linear_congruential_engine.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/random/detail/linear_congruential_engine_discard.h b/thrust/thrust/random/detail/linear_congruential_engine_discard.h index c8103d9dc94..c6c6fd54411 100644 --- a/thrust/thrust/random/detail/linear_congruential_engine_discard.h +++ b/thrust/thrust/random/detail/linear_congruential_engine_discard.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include @@ -59,7 +65,7 @@ template // figure out a robust implementation of this later unsigned long long multiplier = a; unsigned long long multiplier_to_z = 1; - + // see http://en.wikipedia.org/wiki/Modular_exponentiation while(z > 0) { @@ -89,7 +95,7 @@ struct linear_congruential_engine_discard const result_type c = LinearCongruentialEngine::increment; const result_type a = LinearCongruentialEngine::multiplier; const result_type m = LinearCongruentialEngine::modulus; - + // XXX WAR unused variable warnings (void) c; (void) a; diff --git a/thrust/thrust/random/detail/linear_feedback_shift_engine.inl b/thrust/thrust/random/detail/linear_feedback_shift_engine.inl index ac3ca86736b..90be369f33e 100644 --- a/thrust/thrust/random/detail/linear_feedback_shift_engine.inl +++ b/thrust/thrust/random/detail/linear_feedback_shift_engine.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/random/detail/linear_feedback_shift_engine_wordmask.h b/thrust/thrust/random/detail/linear_feedback_shift_engine_wordmask.h index 73c8ae83efb..627ce8afd42 100644 --- a/thrust/thrust/random/detail/linear_feedback_shift_engine_wordmask.h +++ b/thrust/thrust/random/detail/linear_feedback_shift_engine_wordmask.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace random diff --git a/thrust/thrust/random/detail/mod.h b/thrust/thrust/random/detail/mod.h index f0637582de5..b3f0de9445e 100644 --- a/thrust/thrust/random/detail/mod.h +++ b/thrust/thrust/random/detail/mod.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace random diff --git a/thrust/thrust/random/detail/normal_distribution.inl b/thrust/thrust/random/detail/normal_distribution.inl index 4b69bab2139..46c3667f95c 100644 --- a/thrust/thrust/random/detail/normal_distribution.inl +++ b/thrust/thrust/random/detail/normal_distribution.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/random/detail/normal_distribution_base.h b/thrust/thrust/random/detail/normal_distribution_base.h index a42e8001403..fed4f718ec7 100644 --- a/thrust/thrust/random/detail/normal_distribution_base.h +++ b/thrust/thrust/random/detail/normal_distribution_base.h @@ -24,6 +24,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/random/detail/random_core_access.h b/thrust/thrust/random/detail/random_core_access.h index a3e34e02b93..549e268e42f 100644 --- a/thrust/thrust/random/detail/random_core_access.h +++ b/thrust/thrust/random/detail/random_core_access.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace random diff --git a/thrust/thrust/random/detail/subtract_with_carry_engine.inl b/thrust/thrust/random/detail/subtract_with_carry_engine.inl index 21c22fe775c..e9518fdf0de 100644 --- a/thrust/thrust/random/detail/subtract_with_carry_engine.inl +++ b/thrust/thrust/random/detail/subtract_with_carry_engine.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/random/detail/uniform_int_distribution.inl b/thrust/thrust/random/detail/uniform_int_distribution.inl index 064bfcc733b..00e9cfe1b64 100644 --- a/thrust/thrust/random/detail/uniform_int_distribution.inl +++ b/thrust/thrust/random/detail/uniform_int_distribution.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/random/detail/uniform_real_distribution.inl b/thrust/thrust/random/detail/uniform_real_distribution.inl index 119f82c1eba..f7a7ec4074c 100644 --- a/thrust/thrust/random/detail/uniform_real_distribution.inl +++ b/thrust/thrust/random/detail/uniform_real_distribution.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/random/detail/xor_combine_engine.inl b/thrust/thrust/random/detail/xor_combine_engine.inl index c948214438f..3fbce644ac7 100644 --- a/thrust/thrust/random/detail/xor_combine_engine.inl +++ b/thrust/thrust/random/detail/xor_combine_engine.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/random/detail/xor_combine_engine_max.h b/thrust/thrust/random/detail/xor_combine_engine_max.h index 0756ff9e04c..f450aaeebc3 100644 --- a/thrust/thrust/random/detail/xor_combine_engine_max.h +++ b/thrust/thrust/random/detail/xor_combine_engine_max.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include @@ -219,7 +225,7 @@ template { typedef xor_combine_engine_max_aux_constants constants; - static const result_type value = + static const result_type value = thrust::detail::eval_if< // if k is odd... math::is_odd::value, @@ -287,7 +293,7 @@ template::value - 1 + two_to_the_power::value - 1 >::value; static const result_type m2 = diff --git a/thrust/thrust/random/discard_block_engine.h b/thrust/thrust/random/discard_block_engine.h index 88e1155861e..96c50abbd49 100644 --- a/thrust/thrust/random/discard_block_engine.h +++ b/thrust/thrust/random/discard_block_engine.h @@ -24,7 +24,12 @@ #include -#include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include @@ -71,7 +76,7 @@ namespace random * return 0; * } * \endcode - */ + */ template class discard_block_engine { @@ -124,7 +129,7 @@ template explicit discard_block_engine(const base_type &urng); /*! This constructor initializes a new \p discard_block_engine with a given seed. - * + * * \param s The seed used to intialize this \p discard_block_engine's adapted base engine. */ __host__ __device__ @@ -145,7 +150,7 @@ template void seed(result_type s); // generating functions - + /*! This member function produces a new random value and updates this \p discard_block_engine's state. * \return A new random number. */ diff --git a/thrust/thrust/random/linear_congruential_engine.h b/thrust/thrust/random/linear_congruential_engine.h index dac03d90eb2..63e31a2dcc3 100644 --- a/thrust/thrust/random/linear_congruential_engine.h +++ b/thrust/thrust/random/linear_congruential_engine.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -113,7 +119,7 @@ template { public: // types - + /*! \typedef result_type * \brief The type of the unsigned integer produced by this \p linear_congruential_engine. */ @@ -149,7 +155,7 @@ template /*! This constructor, which optionally accepts a seed, initializes a new * \p linear_congruential_engine. - * + * * \param s The seed used to intialize this \p linear_congruential_engine's state. */ __host__ __device__ @@ -280,7 +286,7 @@ typedef linear_congruential_engine + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include // for size_t @@ -116,7 +122,7 @@ template /*! This constructor, which optionally accepts a seed, initializes a new * \p linear_feedback_shift_engine. - * + * * \param value The seed used to intialize this \p linear_feedback_shift_engine's state. */ __host__ __device__ @@ -131,7 +137,7 @@ template void seed(result_type value = default_seed); // generating functions - + /*! This member function produces a new random value and updates this \p linear_feedback_shift_engine's state. * \return A new random number. */ diff --git a/thrust/thrust/random/normal_distribution.h b/thrust/thrust/random/normal_distribution.h index 36b985cb685..e781e8a0272 100644 --- a/thrust/thrust/random/normal_distribution.h +++ b/thrust/thrust/random/normal_distribution.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -43,7 +49,7 @@ namespace random * * \tparam RealType The type of floating point number to produce. * - * The following code snippet demonstrates examples of using a \p normal_distribution with a + * The following code snippet demonstrates examples of using a \p normal_distribution with a * random number engine to produce random values drawn from the Normal distribution with a given * mean and variance: * @@ -86,7 +92,7 @@ template public: // types - + /*! \typedef result_type * \brief The type of the floating point number produced by this \p normal_distribution. */ @@ -98,10 +104,10 @@ template typedef thrust::pair param_type; // constructors and reset functions - + /*! This constructor creates a new \p normal_distribution from two values defining the * half-open interval of the distribution. - * + * * \param mean The mean (expected value) of the distribution. Defaults to \c 0.0. * \param stddev The standard deviation of the distribution. Defaults to \c 1.0. */ @@ -110,7 +116,7 @@ template /*! This constructor creates a new \p normal_distribution from a \p param_type object * encapsulating the range of the distribution. - * + * * \param parm A \p param_type object encapsulating the parameters (i.e., the mean and standard deviation) of the distribution. */ __host__ __device__ @@ -134,7 +140,7 @@ template __host__ __device__ result_type operator()(UniformRandomNumberGenerator &urng); - /*! This method produces a new Normal random integer as if by creating a new \p normal_distribution + /*! This method produces a new Normal random integer as if by creating a new \p normal_distribution * from the given \p param_type object, and calling its operator() method with the given * \p UniformRandomNumberGenerator as a source of randomness. * diff --git a/thrust/thrust/random/subtract_with_carry_engine.h b/thrust/thrust/random/subtract_with_carry_engine.h index 69ee841fda3..7f62615fc29 100644 --- a/thrust/thrust/random/subtract_with_carry_engine.h +++ b/thrust/thrust/random/subtract_with_carry_engine.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -74,7 +80,7 @@ template public: // types - + /*! \typedef result_type * \brief The type of the unsigned integer produced by this \p subtract_with_carry_engine. */ @@ -110,7 +116,7 @@ template /*! This constructor, which optionally accepts a seed, initializes a new * \p subtract_with_carry_engine. - * + * * \param value The seed used to intialize this \p subtract_with_carry_engine's state. */ __host__ __device__ @@ -125,7 +131,7 @@ template void seed(result_type value = default_seed); // generating functions - + /*! This member function produces a new random value and updates this \p subtract_with_carry_engine's state. * \return A new random number. */ diff --git a/thrust/thrust/random/uniform_int_distribution.h b/thrust/thrust/random/uniform_int_distribution.h index 18f369fc2a4..7d2db7e4b07 100644 --- a/thrust/thrust/random/uniform_int_distribution.h +++ b/thrust/thrust/random/uniform_int_distribution.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -43,7 +49,7 @@ namespace random * * \tparam IntType The type of integer to produce. * - * The following code snippet demonstrates examples of using a \p uniform_int_distribution with a + * The following code snippet demonstrates examples of using a \p uniform_int_distribution with a * random number engine to produce random integers drawn from a given range: * * \code @@ -103,7 +109,7 @@ template /*! This constructor creates a new \p uniform_int_distribution from two values defining the * range of the distribution. - * + * * \param a The smallest integer to potentially produce. Defaults to \c 0. * \param b The largest integer to potentially produce. Defaults to the largest representable integer in * the platform. @@ -114,7 +120,7 @@ template /*! This constructor creates a new \p uniform_int_distribution from a \p param_type object * encapsulating the range of the distribution. - * + * * \param parm A \p param_type object encapsulating the parameters (i.e., the range) of the distribution. */ __host__ __device__ @@ -136,7 +142,7 @@ template __host__ __device__ result_type operator()(UniformRandomNumberGenerator &urng); - /*! This method produces a new uniform random integer as if by creating a new \p uniform_int_distribution + /*! This method produces a new uniform random integer as if by creating a new \p uniform_int_distribution * from the given \p param_type object, and calling its operator() method with the given * \p UniformRandomNumberGenerator as a source of randomness. * @@ -149,7 +155,7 @@ template result_type operator()(UniformRandomNumberGenerator &urng, const param_type &parm); // property functions - + /*! This method returns the value of the parameter with which this \p uniform_int_distribution * was constructed. * diff --git a/thrust/thrust/random/uniform_real_distribution.h b/thrust/thrust/random/uniform_real_distribution.h index e6c5a7d88a5..bfc703a5e83 100644 --- a/thrust/thrust/random/uniform_real_distribution.h +++ b/thrust/thrust/random/uniform_real_distribution.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -42,7 +48,7 @@ namespace random * * \tparam RealType The type of floating point number to produce. * - * The following code snippet demonstrates examples of using a \p uniform_real_distribution with a + * The following code snippet demonstrates examples of using a \p uniform_real_distribution with a * random number engine to produce random integers drawn from a given range: * * \code @@ -87,7 +93,7 @@ template { public: // types - + /*! \typedef result_type * \brief The type of the floating point number produced by this \p uniform_real_distribution. */ @@ -99,10 +105,10 @@ template typedef thrust::pair param_type; // constructors and reset functions - + /*! This constructor creates a new \p uniform_real_distribution from two values defining the * half-open interval of the distribution. - * + * * \param a The smallest floating point number to potentially produce. Defaults to \c 0.0. * \param b The smallest number larger than the largest floating point number to potentially produce. Defaults to \c 1.0. */ @@ -111,7 +117,7 @@ template /*! This constructor creates a new \p uniform_real_distribution from a \p param_type object * encapsulating the range of the distribution. - * + * * \param parm A \p param_type object encapsulating the parameters (i.e., the range) of the distribution. */ __host__ __device__ @@ -133,7 +139,7 @@ template __host__ __device__ result_type operator()(UniformRandomNumberGenerator &urng); - /*! This method produces a new uniform random integer as if by creating a new \p uniform_real_distribution + /*! This method produces a new uniform random integer as if by creating a new \p uniform_real_distribution * from the given \p param_type object, and calling its operator() method with the given * \p UniformRandomNumberGenerator as a source of randomness. * diff --git a/thrust/thrust/random/xor_combine_engine.h b/thrust/thrust/random/xor_combine_engine.h index 321f040333d..b560b85fcf4 100644 --- a/thrust/thrust/random/xor_combine_engine.h +++ b/thrust/thrust/random/xor_combine_engine.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -92,7 +98,7 @@ template, thrust::detail::identity_ >::type result_type; - + /*! The size of the first shift used in the generation algorithm. */ static const size_t shift1 = s1; @@ -132,7 +138,7 @@ template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -44,7 +50,7 @@ THRUST_NAMESPACE_BEGIN * * Note that \p reduce also assumes that the binary reduction operator (in this * case operator+) is commutative. If the reduction operator is not commutative - * then \p thrust::reduce should not be used. Instead, one could use + * then \p thrust::reduce should not be used. Instead, one could use * \p inclusive_scan (which does not require commutativity) and select the * last element of the output array. * @@ -94,7 +100,7 @@ __host__ __device__ * * Note that \p reduce also assumes that the binary reduction operator (in this * case operator+) is commutative. If the reduction operator is not commutative - * then \p thrust::reduce should not be used. Instead, one could use + * then \p thrust::reduce should not be used. Instead, one could use * \p inclusive_scan (which does not require commutativity) and select the * last element of the output array. * @@ -137,7 +143,7 @@ template typename * * Note that \p reduce also assumes that the binary reduction operator (in this * case operator+) is commutative. If the reduction operator is not commutative - * then \p thrust::reduce should not be used. Instead, one could use + * then \p thrust::reduce should not be used. Instead, one could use * \p inclusive_scan (which does not require commutativity) and select the * last element of the output array. * @@ -190,7 +196,7 @@ __host__ __device__ * * Note that \p reduce also assumes that the binary reduction operator (in this * case operator+) is commutative. If the reduction operator is not commutative - * then \p thrust::reduce should not be used. Instead, one could use + * then \p thrust::reduce should not be used. Instead, one could use * \p inclusive_scan (which does not require commutativity) and select the * last element of the output array. * @@ -235,7 +241,7 @@ template * * Note that \p reduce also assumes that the binary reduction operator (in this * case \p binary_op) is commutative. If the reduction operator is not commutative - * then \p thrust::reduce should not be used. Instead, one could use + * then \p thrust::reduce should not be used. Instead, one could use * \p inclusive_scan (which does not require commutativity) and select the * last element of the output array. * @@ -299,7 +305,7 @@ __host__ __device__ * * Note that \p reduce also assumes that the binary reduction operator (in this * case \p binary_op) is commutative. If the reduction operator is not commutative - * then \p thrust::reduce should not be used. Instead, one could use + * then \p thrust::reduce should not be used. Instead, one could use * \p inclusive_scan (which does not require commutativity) and select the * last element of the output array. * @@ -346,7 +352,7 @@ template[keys_first, keys_last) * that are equal, \p reduce_by_key copies the first element of the group to the * \c keys_output. The corresponding values in the range are reduced using the - * \c plus and the result copied to \c values_output. + * \c plus and the result copied to \c values_output. * * This version of \p reduce_by_key uses the function object \c equal_to * to test for equality and \c plus to reduce values with equal keys. @@ -391,7 +397,7 @@ template reduce_by_key(const thrust::detail::execution_policy_base &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -416,7 +422,7 @@ __host__ __device__ * For each group of consecutive keys in the range [keys_first, keys_last) * that are equal, \p reduce_by_key copies the first element of the group to the * \c keys_output. The corresponding values in the range are reduced using the - * \c plus and the result copied to \c values_output. + * \c plus and the result copied to \c values_output. * * This version of \p reduce_by_key uses the function object \c equal_to * to test for equality and \c plus to reduce values with equal keys. @@ -455,7 +461,7 @@ __host__ __device__ * // The first four keys in C are now {1, 3, 2, 1} and new_end.first - C is 4. * // The first four values in D are now {9, 21, 9, 3} and new_end.second - D is 4. * \endcode - * + * * \see reduce * \see unique_copy * \see unique_by_key @@ -466,7 +472,7 @@ template thrust::pair - reduce_by_key(InputIterator1 keys_first, + reduce_by_key(InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -477,7 +483,7 @@ template[keys_first, keys_last) * that are equal, \p reduce_by_key copies the first element of the group to the * \c keys_output. The corresponding values in the range are reduced using the - * \c plus and the result copied to \c values_output. + * \c plus and the result copied to \c values_output. * * This version of \p reduce_by_key uses the function object \c binary_pred * to test for equality and \c plus to reduce values with equal keys. @@ -525,7 +531,7 @@ template reduce_by_key(const thrust::detail::execution_policy_base &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -552,7 +558,7 @@ __host__ __device__ * For each group of consecutive keys in the range [keys_first, keys_last) * that are equal, \p reduce_by_key copies the first element of the group to the * \c keys_output. The corresponding values in the range are reduced using the - * \c plus and the result copied to \c values_output. + * \c plus and the result copied to \c values_output. * * This version of \p reduce_by_key uses the function object \c binary_pred * to test for equality and \c plus to reduce values with equal keys. @@ -594,7 +600,7 @@ __host__ __device__ * // The first four keys in C are now {1, 3, 2, 1} and new_end.first - C is 4. * // The first four values in D are now {9, 21, 9, 3} and new_end.second - D is 4. * \endcode - * + * * \see reduce * \see unique_copy * \see unique_by_key @@ -606,7 +612,7 @@ template thrust::pair - reduce_by_key(InputIterator1 keys_first, + reduce_by_key(InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -618,8 +624,8 @@ template[keys_first, keys_last) * that are equal, \p reduce_by_key copies the first element of the group to the * \c keys_output. The corresponding values in the range are reduced using the - * \c BinaryFunction \c binary_op and the result copied to \c values_output. - * Specifically, if consecutive key iterators \c i and \c (i + 1) are + * \c BinaryFunction \c binary_op and the result copied to \c values_output. + * Specifically, if consecutive key iterators \c i and \c (i + 1) are * such that binary_pred(*i, *(i+1)) is \c true, then the corresponding * values are reduced to a single value with \c binary_op. * @@ -673,7 +679,7 @@ template reduce_by_key(const thrust::detail::execution_policy_base &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -702,8 +708,8 @@ __host__ __device__ * For each group of consecutive keys in the range [keys_first, keys_last) * that are equal, \p reduce_by_key copies the first element of the group to the * \c keys_output. The corresponding values in the range are reduced using the - * \c BinaryFunction \c binary_op and the result copied to \c values_output. - * Specifically, if consecutive key iterators \c i and \c (i + 1) are + * \c BinaryFunction \c binary_op and the result copied to \c values_output. + * Specifically, if consecutive key iterators \c i and \c (i + 1) are * such that binary_pred(*i, *(i+1)) is \c true, then the corresponding * values are reduced to a single value with \c binary_op. * @@ -751,7 +757,7 @@ __host__ __device__ * // The first four keys in C are now {1, 3, 2, 1} and new_end.first - C is 4. * // The first four values in D are now {9, 21, 9, 3} and new_end.second - D is 4. * \endcode - * + * * \see reduce * \see unique_copy * \see unique_by_key @@ -764,7 +770,7 @@ template thrust::pair - reduce_by_key(InputIterator1 keys_first, + reduce_by_key(InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, diff --git a/thrust/thrust/remove.h b/thrust/thrust/remove.h index a57fcf211cf..c571d16e1ff 100644 --- a/thrust/thrust/remove.h +++ b/thrust/thrust/remove.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -549,7 +555,7 @@ template[first, last) every element \p x * such that pred(x) is \c true. That is, \p remove_if returns an * iterator \c new_last such that the range [first, new_last) contains - * no elements for which \p pred of the corresponding stencil value is \c true. + * no elements for which \p pred of the corresponding stencil value is \c true. * The iterators in the range [new_last,last) are all still dereferenceable, * but the elements that they point to are unspecified. \p remove_if is stable, * meaning that the relative order of elements that are not removed is unchanged. @@ -615,7 +621,7 @@ __host__ __device__ /*! \p remove_if removes from the range [first, last) every element \p x * such that pred(x) is \c true. That is, \p remove_if returns an * iterator \c new_last such that the range [first, new_last) contains - * no elements for which \p pred of the corresponding stencil value is \c true. + * no elements for which \p pred of the corresponding stencil value is \c true. * The iterators in the range [new_last,last) are all still dereferenceable, * but the elements that they point to are unspecified. \p remove_if is stable, * meaning that the relative order of elements that are not removed is unchanged. @@ -670,10 +676,10 @@ template[first,last) to a - * range beginning at \p result, except that elements for which \p pred of the - * corresponding stencil value is \c true are not copied. The return value is + * range beginning at \p result, except that elements for which \p pred of the + * corresponding stencil value is \c true are not copied. The return value is * the end of the resulting range. This operation is stable, meaning that the - * relative order of the elements that are copied is the same as the + * relative order of the elements that are copied is the same as the * range [first,last). * * The algorithm's execution policy is parallelized as determined by \p exec. @@ -737,10 +743,10 @@ __host__ __device__ /*! \p remove_copy_if copies elements from the range [first,last) to a - * range beginning at \p result, except that elements for which \p pred of the - * corresponding stencil value is \c true are not copied. The return value is + * range beginning at \p result, except that elements for which \p pred of the + * corresponding stencil value is \c true are not copied. The return value is * the end of the resulting range. This operation is stable, meaning that the - * relative order of the elements that are copied is the same as the + * relative order of the elements that are copied is the same as the * range [first,last). * * \param first The beginning of the range of interest. diff --git a/thrust/thrust/replace.h b/thrust/thrust/replace.h index a5c0320c423..4488f780691 100644 --- a/thrust/thrust/replace.h +++ b/thrust/thrust/replace.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -64,7 +70,7 @@ THRUST_NAMESPACE_BEGIN * #include * * ... - * + * * thrust::device_vector A(4); * A[0] = 1; * A[1] = 2; @@ -114,7 +120,7 @@ __host__ __device__ * #include * * ... - * + * * thrust::device_vector A(4); * A[0] = 1; * A[1] = 2; @@ -176,7 +182,7 @@ template * }; * * ... - * + * * thrust::device_vector A(4); * A[0] = 1; * A[1] = -3; @@ -237,7 +243,7 @@ __host__ __device__ * }; * * ... - * + * * thrust::device_vector A(4); * A[0] = 1; * A[1] = -3; @@ -303,9 +309,9 @@ template * return x < 0; * } * }; - * + * * ... - * + * * thrust::device_vector A(4); * A[0] = 10; * A[1] = 20; @@ -373,9 +379,9 @@ __host__ __device__ * return x < 0; * } * }; - * + * * ... - * + * * thrust::device_vector A(4); * A[0] = 10; * A[1] = 20; @@ -563,13 +569,13 @@ template * }; * * ... - * + * * thrust::device_vector A(4); * A[0] = 1; * A[1] = -3; * A[2] = 2; * A[3] = -1; - + * thrust::device_vector B(4); * is_less_than_zero pred; * @@ -630,13 +636,13 @@ __host__ __device__ * }; * * ... - * + * * thrust::device_vector A(4); * A[0] = 1; * A[1] = -3; * A[2] = 2; * A[3] = -1; - + * thrust::device_vector B(4); * is_less_than_zero pred; * @@ -673,7 +679,7 @@ template[stencil, stencil + (last - first)). - * \param new_value The replacement value to assign when pred(*s) evaluates to \c true. + * \param new_value The replacement value to assign when pred(*s) evaluates to \c true. * \return result + (last-first) * * \tparam DerivedPolicy The name of the derived execution policy. @@ -701,9 +707,9 @@ template A(4); * A[0] = 10; * A[1] = 20; @@ -750,7 +756,7 @@ __host__ __device__ * \param stencil The beginning of the stencil sequence. * \param result The beginning of the sequence to copy to. * \param pred The predicate to test on every value of the range [stencil, stencil + (last - first)). - * \param new_value The replacement value to assign when pred(*s) evaluates to \c true. + * \param new_value The replacement value to assign when pred(*s) evaluates to \c true. * \return result + (last-first) * * \tparam InputIterator1 is a model of Input Iterator. @@ -776,9 +782,9 @@ __host__ __device__ * return x < 0; * } * }; - * + * * ... - * + * * thrust::device_vector A(4); * A[0] = 10; * A[1] = 20; diff --git a/thrust/thrust/reverse.h b/thrust/thrust/reverse.h index 056be200adc..ac40b2dfa49 100644 --- a/thrust/thrust/reverse.h +++ b/thrust/thrust/reverse.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -59,7 +65,7 @@ THRUST_NAMESPACE_BEGIN * thrust::reverse(thrust::device, v.begin(), v.end()); * // v is now {5, 4, 3, 2, 1, 0} * \endcode - * + * * \see https://en.cppreference.com/w/cpp/algorithm/reverse * \see \p reverse_copy * \see \p reverse_iterator @@ -93,7 +99,7 @@ __host__ __device__ * thrust::reverse(v.begin(), v.end()); * // v is now {5, 4, 3, 2, 1, 0} * \endcode - * + * * \see https://en.cppreference.com/w/cpp/algorithm/reverse * \see \p reverse_copy * \see \p reverse_iterator @@ -107,7 +113,7 @@ template * is written to a different output range, rather than inplace. * * \p reverse_copy copies elements from the range [first, last) to the - * range [result, result + (last - first)) such that the copy is a + * range [result, result + (last - first)) such that the copy is a * reverse of the original range. Specifically: for every i such that * 0 <= i < (last - first), \p reverse_copy performs the assignment * *(result + (last - first) - i) = *(first + i). @@ -144,7 +150,7 @@ template * // input is still {0, 1, 2, 3, 4, 5} * // output is now {5, 4, 3, 2, 1, 0} * \endcode - * + * * \see https://en.cppreference.com/w/cpp/algorithm/reverse_copy * \see \p reverse * \see \p reverse_iterator @@ -161,7 +167,7 @@ __host__ __device__ * is written to a different output range, rather than inplace. * * \p reverse_copy copies elements from the range [first, last) to the - * range [result, result + (last - first)) such that the copy is a + * range [result, result + (last - first)) such that the copy is a * reverse of the original range. Specifically: for every i such that * 0 <= i < (last - first), \p reverse_copy performs the assignment * *(result + (last - first) - i) = *(first + i). @@ -192,7 +198,7 @@ __host__ __device__ * // input is still {0, 1, 2, 3, 4, 5} * // output is now {5, 4, 3, 2, 1, 0} * \endcode - * + * * \see https://en.cppreference.com/w/cpp/algorithm/reverse_copy * \see \p reverse * \see \p reverse_iterator diff --git a/thrust/thrust/scan.h b/thrust/thrust/scan.h index 9b381422323..79d2a85621a 100644 --- a/thrust/thrust/scan.h +++ b/thrust/thrust/scan.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -38,16 +44,16 @@ THRUST_NAMESPACE_BEGIN /*! \p inclusive_scan computes an inclusive prefix sum operation. The * term 'inclusive' means that each result includes the corresponding - * input operand in the partial sum. More precisely, *first is - * assigned to *result and the sum of *first and - * *(first + 1) is assigned to *(result + 1), and so on. - * This version of \p inclusive_scan assumes plus as the associative operator. - * When the input and output sequences are the same, the scan is performed + * input operand in the partial sum. More precisely, *first is + * assigned to *result and the sum of *first and + * *(first + 1) is assigned to *(result + 1), and so on. + * This version of \p inclusive_scan assumes plus as the associative operator. + * When the input and output sequences are the same, the scan is performed * in-place. * * \p inclusive_scan is similar to \c std::partial_sum in the STL. The primary * difference between the two functions is that \c std::partial_sum guarantees - * a serial summation order, while \p inclusive_scan requires associativity of + * a serial summation order, while \p inclusive_scan requires associativity of * the binary operation to parallelize the prefix sum. * * Results are not deterministic for pseudo-associative operators (e.g., @@ -55,7 +61,7 @@ THRUST_NAMESPACE_BEGIN * operators may vary from run to run. * * The algorithm's execution is parallelized as determined by \p exec. - * + * * \param exec The execution policy to use for parallelization. * \param first The beginning of the input sequence. * \param last The end of the input sequence. @@ -81,7 +87,7 @@ THRUST_NAMESPACE_BEGIN * #include * #include * ... - * + * * int data[6] = {1, 0, 2, 2, 1, 3}; * * thrust::inclusive_scan(thrust::host, data, data + 6, data); // in-place scan @@ -104,16 +110,16 @@ __host__ __device__ /*! \p inclusive_scan computes an inclusive prefix sum operation. The * term 'inclusive' means that each result includes the corresponding - * input operand in the partial sum. More precisely, *first is - * assigned to *result and the sum of *first and - * *(first + 1) is assigned to *(result + 1), and so on. - * This version of \p inclusive_scan assumes plus as the associative operator. - * When the input and output sequences are the same, the scan is performed + * input operand in the partial sum. More precisely, *first is + * assigned to *result and the sum of *first and + * *(first + 1) is assigned to *(result + 1), and so on. + * This version of \p inclusive_scan assumes plus as the associative operator. + * When the input and output sequences are the same, the scan is performed * in-place. * * \p inclusive_scan is similar to \c std::partial_sum in the STL. The primary * difference between the two functions is that \c std::partial_sum guarantees - * a serial summation order, while \p inclusive_scan requires associativity of + * a serial summation order, while \p inclusive_scan requires associativity of * the binary operation to parallelize the prefix sum. * * Results are not deterministic for pseudo-associative operators (e.g., @@ -140,7 +146,7 @@ __host__ __device__ * * \code * #include - * + * * int data[6] = {1, 0, 2, 2, 1, 3}; * * thrust::inclusive_scan(data, data + 6, data); // in-place scan @@ -160,12 +166,12 @@ template binary_op; * * thrust::inclusive_scan(thrust::host, data, data + 10, data, binary_op); // in-place scan @@ -224,12 +230,12 @@ __host__ __device__ /*! \p inclusive_scan computes an inclusive prefix sum operation. The * term 'inclusive' means that each result includes the corresponding - * input operand in the partial sum. When the input and output sequences + * input operand in the partial sum. When the input and output sequences * are the same, the scan is performed in-place. - * + * * \p inclusive_scan is similar to \c std::partial_sum in the STL. The primary * difference between the two functions is that \c std::partial_sum guarantees - * a serial summation order, while \p inclusive_scan requires associativity of + * a serial summation order, while \p inclusive_scan requires associativity of * the binary operation to parallelize the prefix sum. * * Results are not deterministic for pseudo-associative operators (e.g., @@ -259,7 +265,7 @@ __host__ __device__ * * \code * int data[10] = {-5, 0, 2, -3, 2, 4, 0, -1, 2, 8}; - * + * * thrust::maximum binary_op; * * thrust::inclusive_scan(data, data + 10, data, binary_op); // in-place scan @@ -279,12 +285,12 @@ template0 is assigned to *result and the sum of + * 0 is assigned to *result and the sum of * 0 and *first is assigned to *(result + 1), - * and so on. This version of \p exclusive_scan assumes plus as the - * associative operator and \c 0 as the initial value. When the input and + * and so on. This version of \p exclusive_scan assumes plus as the + * associative operator and \c 0 as the initial value. When the input and * output sequences are the same, the scan is performed in-place. * * Results are not deterministic for pseudo-associative operators (e.g., @@ -292,7 +298,7 @@ template * #include * ... - * + * * int data[6] = {1, 0, 2, 2, 1, 3}; * * thrust::exclusive_scan(thrust::host, data, data + 6, data); // in-place scan @@ -339,12 +345,12 @@ __host__ __device__ /*! \p exclusive_scan computes an exclusive prefix sum operation. The - * term 'exclusive' means that each result does not include the + * term 'exclusive' means that each result does not include the * corresponding input operand in the partial sum. More precisely, - * 0 is assigned to *result and the sum of + * 0 is assigned to *result and the sum of * 0 and *first is assigned to *(result + 1), - * and so on. This version of \p exclusive_scan assumes plus as the - * associative operator and \c 0 as the initial value. When the input and + * and so on. This version of \p exclusive_scan assumes plus as the + * associative operator and \c 0 as the initial value. When the input and * output sequences are the same, the scan is performed in-place. * * Results are not deterministic for pseudo-associative operators (e.g., @@ -371,7 +377,7 @@ __host__ __device__ * * \code * #include - * + * * int data[6] = {1, 0, 2, 2, 1, 3}; * * thrust::exclusive_scan(data, data + 6, data); // in-place scan @@ -389,12 +395,12 @@ template*result and the sum of \p init and - * *first is assigned to *(result + 1), and so on. - * This version of \p exclusive_scan assumes plus as the associative - * operator but requires an initial value \p init. When the input and + * \p init is assigned to *result and the sum of \p init and + * *first is assigned to *(result + 1), and so on. + * This version of \p exclusive_scan assumes plus as the associative + * operator but requires an initial value \p init. When the input and * output sequences are the same, the scan is performed in-place. * * Results are not deterministic for pseudo-associative operators (e.g., @@ -427,7 +433,7 @@ template * #include - * + * * int data[6] = {1, 0, 2, 2, 1, 3}; * * thrust::exclusive_scan(thrust::host, data, data + 6, data, 4); // in-place scan @@ -450,12 +456,12 @@ __host__ __device__ /*! \p exclusive_scan computes an exclusive prefix sum operation. The - * term 'exclusive' means that each result does not include the + * term 'exclusive' means that each result does not include the * corresponding input operand in the partial sum. More precisely, - * \p init is assigned to *result and the sum of \p init and - * *first is assigned to *(result + 1), and so on. - * This version of \p exclusive_scan assumes plus as the associative - * operator but requires an initial value \p init. When the input and + * \p init is assigned to *result and the sum of \p init and + * *first is assigned to *(result + 1), and so on. + * This version of \p exclusive_scan assumes plus as the associative + * operator but requires an initial value \p init. When the input and * output sequences are the same, the scan is performed in-place. * * Results are not deterministic for pseudo-associative operators (e.g., @@ -482,7 +488,7 @@ __host__ __device__ * * \code * #include - * + * * int data[6] = {1, 0, 2, 2, 1, 3}; * * thrust::exclusive_scan(data, data + 6, data, 4); // in-place scan @@ -502,11 +508,11 @@ template\*result and the value * binary_op(init, \*first) is assigned to \*(result + 1), - * and so on. This version of the function requires both an associative + * and so on. This version of the function requires both an associative * operator and an initial value \p init. When the input and output * sequences are the same, the scan is performed in-place. * @@ -515,7 +521,7 @@ template * #include * ... - * + * * int data[10] = {-5, 0, 2, -3, 2, 4, 0, -1, 2, 8}; - * + * * thrust::maximum binary_op; * * thrust::exclusive_scan(thrust::host, data, data + 10, data, 1, binary_op); // in-place scan * * // data is now {1, 1, 1, 2, 2, 2, 4, 4, 4, 4 } * \endcode - * + * * \see https://en.cppreference.com/w/cpp/algorithm/partial_sum */ template\*result and the value * binary_op(init, \*first) is assigned to \*(result + 1), - * and so on. This version of the function requires both an associative + * and so on. This version of the function requires both an associative * operator and an initial value \p init. When the input and output * sequences are the same, the scan is performed in-place. * @@ -612,16 +618,16 @@ __host__ __device__ * \code * #include * #include - * + * * int data[10] = {-5, 0, 2, -3, 2, 4, 0, -1, 2, 8}; - * + * * thrust::maximum binary_op; * * thrust::exclusive_scan(data, data + 10, data, 1, binary_op); // in-place scan * * // data is now {1, 1, 1, 2, 2, 2, 4, 4, 4, 4 } * \endcode - * + * * \see https://en.cppreference.com/w/cpp/algorithm/partial_sum */ templateInput Iterator * and \c InputIterator2's \c value_type is convertible to \c OutputIterator's \c value_type. * \tparam OutputIterator is a model of Output Iterator, - * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then + * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then * binary_op(x,y) is defined. * * \pre \p first1 may equal \p result but the range [first1, last1) and the range [result, result + (last1 - first1)) shall not overlap otherwise. @@ -689,7 +695,7 @@ template * #include * ... - * + * * int data[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * @@ -712,10 +718,10 @@ __host__ __device__ InputIterator1 last1, InputIterator2 first2, OutputIterator result); - -/*! \p inclusive_scan_by_key computes an inclusive key-value or 'segmented' prefix - * sum operation. The term 'inclusive' means that each result includes + +/*! \p inclusive_scan_by_key computes an inclusive key-value or 'segmented' prefix + * sum operation. The term 'inclusive' means that each result includes * the corresponding input operand in the partial sum. The term 'segmented' * means that the partial sums are broken into distinct segments. In other * words, within each segment a separate inclusive scan operation is computed. @@ -745,7 +751,7 @@ __host__ __device__ * \tparam InputIterator2 is a model of Input Iterator * and \c InputIterator2's \c value_type is convertible to \c OutputIterator's \c value_type. * \tparam OutputIterator is a model of Output Iterator, - * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then + * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then * binary_op(x,y) is defined. * * \pre \p first1 may equal \p result but the range [first1, last1) and the range [result, result + (last1 - first1)) shall not overlap otherwise. @@ -755,7 +761,7 @@ __host__ __device__ * * \code * #include - * + * * int data[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * @@ -777,17 +783,17 @@ templatei and i+1 in the range [first1, last1) - * belong to the same segment if binary_pred(*i, *(i+1)) is true, and belong to + * belong to the same segment if binary_pred(*i, *(i+1)) is true, and belong to * different segments otherwise. * * This version of \p inclusive_scan_by_key assumes \c plus as the associative @@ -798,7 +804,7 @@ templateInput Iterator * and \c InputIterator2's \c value_type is convertible to \c OutputIterator's \c value_type. * \tparam OutputIterator is a model of Output Iterator, - * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then + * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then * binary_op(x,y) is defined. * \tparam BinaryPredicate is a model of Binary Predicate. * @@ -828,7 +834,7 @@ template * #include * ... - * + * * int data[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * @@ -857,17 +863,17 @@ __host__ __device__ BinaryPredicate binary_pred); -/*! \p inclusive_scan_by_key computes an inclusive key-value or 'segmented' prefix - * sum operation. The term 'inclusive' means that each result includes +/*! \p inclusive_scan_by_key computes an inclusive key-value or 'segmented' prefix + * sum operation. The term 'inclusive' means that each result includes * the corresponding input operand in the partial sum. The term 'segmented' * means that the partial sums are broken into distinct segments. In other * words, within each segment a separate inclusive scan operation is computed. * Refer to the code sample below for example usage. * - * This version of \p inclusive_scan_by_key uses the binary predicate + * This version of \p inclusive_scan_by_key uses the binary predicate * \c pred to compare adjacent keys. Specifically, consecutive iterators * i and i+1 in the range [first1, last1) - * belong to the same segment if binary_pred(*i, *(i+1)) is true, and belong to + * belong to the same segment if binary_pred(*i, *(i+1)) is true, and belong to * different segments otherwise. * * This version of \p inclusive_scan_by_key assumes \c plus as the associative @@ -889,7 +895,7 @@ __host__ __device__ * \tparam InputIterator2 is a model of Input Iterator * and \c InputIterator2's \c value_type is convertible to \c OutputIterator's \c value_type. * \tparam OutputIterator is a model of Output Iterator, - * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then + * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then * binary_op(x,y) is defined. * \tparam BinaryPredicate is a model of Binary Predicate. * @@ -901,7 +907,7 @@ __host__ __device__ * \code * #include * #include - * + * * int data[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * @@ -927,20 +933,20 @@ templatei and i+1 in the range [first1, last1) - * belong to the same segment if binary_pred(*i, *(i+1)) is true, and belong to + * belong to the same segment if binary_pred(*i, *(i+1)) is true, and belong to * different segments otherwise. * - * This version of \p inclusive_scan_by_key uses the associative operator + * This version of \p inclusive_scan_by_key uses the associative operator * \c binary_op to perform the prefix sum. When the input and output sequences * are the same, the scan is performed in-place. * @@ -964,7 +970,7 @@ templateInput Iterator * and \c InputIterator2's \c value_type is convertible to \c OutputIterator's \c value_type. * \tparam OutputIterator is a model of Output Iterator, - * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then + * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then * binary_op(x,y) is defined. * \tparam BinaryPredicate is a model of Binary Predicate. * \tparam AssociativeOperator is a model of Binary Function @@ -982,7 +988,7 @@ template * #include * ... - * + * * int data[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * @@ -1014,24 +1020,24 @@ __host__ __device__ AssociativeOperator binary_op); -/*! \p inclusive_scan_by_key computes an inclusive key-value or 'segmented' prefix - * sum operation. The term 'inclusive' means that each result includes +/*! \p inclusive_scan_by_key computes an inclusive key-value or 'segmented' prefix + * sum operation. The term 'inclusive' means that each result includes * the corresponding input operand in the partial sum. The term 'segmented' * means that the partial sums are broken into distinct segments. In other * words, within each segment a separate inclusive scan operation is computed. * Refer to the code sample below for example usage. * - * This version of \p inclusive_scan_by_key uses the binary predicate + * This version of \p inclusive_scan_by_key uses the binary predicate * \c pred to compare adjacent keys. Specifically, consecutive iterators * i and i+1 in the range [first1, last1) - * belong to the same segment if binary_pred(*i, *(i+1)) is true, and belong to + * belong to the same segment if binary_pred(*i, *(i+1)) is true, and belong to * different segments otherwise. * * Results are not deterministic for pseudo-associative operators (e.g., * addition of floating-point types). Results for pseudo-associative * operators may vary from run to run. * - * This version of \p inclusive_scan_by_key uses the associative operator + * This version of \p inclusive_scan_by_key uses the associative operator * \c binary_op to perform the prefix sum. When the input and output sequences * are the same, the scan is performed in-place. * @@ -1047,7 +1053,7 @@ __host__ __device__ * \tparam InputIterator2 is a model of Input Iterator * and \c InputIterator2's \c value_type is convertible to \c OutputIterator's \c value_type. * \tparam OutputIterator is a model of Output Iterator, - * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then + * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then * binary_op(x,y) is defined. * \tparam BinaryPredicate is a model of Binary Predicate. * \tparam AssociativeOperator is a model of Binary Function @@ -1062,7 +1068,7 @@ __host__ __device__ * \code * #include * #include - * + * * int data[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * @@ -1091,7 +1097,7 @@ templatei and i+1 in the range [first1, last1 - * belong to the same segment if *i == *(i+1), and belong to + * belong to the same segment if *i == *(i+1), and belong to * different segments otherwise. * * Results are not deterministic for pseudo-associative operators (e.g., @@ -1130,7 +1136,7 @@ template * #include * ... - * + * * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * int vals[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * @@ -1154,7 +1160,7 @@ __host__ __device__ OutputIterator result); -/*! \p exclusive_scan_by_key computes an exclusive segmented prefix +/*! \p exclusive_scan_by_key computes an exclusive segmented prefix * * This version of \p exclusive_scan_by_key uses the value \c 0 to * initialize the exclusive scan operation. @@ -1162,11 +1168,11 @@ __host__ __device__ * This version of \p exclusive_scan_by_key assumes \c plus as the associative * operator used to perform the prefix sum. When the input and output sequences * are the same, the scan is performed in-place. - * + * * This version of \p exclusive_scan_by_key assumes \c equal_to as the binary * predicate used to compare adjacent keys. Specifically, consecutive iterators * i and i+1 in the range [first1, last1 - * belong to the same segment if *i == *(i+1), and belong to + * belong to the same segment if *i == *(i+1), and belong to * different segments otherwise. * * Results are not deterministic for pseudo-associative operators (e.g., @@ -1187,7 +1193,7 @@ __host__ __device__ * * \code * #include - * + * * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * int vals[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * @@ -1208,7 +1214,7 @@ template * #include * ... - * + * * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * int vals[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * @@ -1272,7 +1278,7 @@ __host__ __device__ T init); -/*! \p exclusive_scan_by_key computes an exclusive key-value or 'segmented' prefix +/*! \p exclusive_scan_by_key computes an exclusive key-value or 'segmented' prefix * sum operation. The term 'exclusive' means that each result does not include * the corresponding input operand in the partial sum. The term 'segmented' * means that the partial sums are broken into distinct segments. In other @@ -1301,7 +1307,7 @@ __host__ __device__ * \code * #include * #include - * + * * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * int vals[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * @@ -1327,7 +1333,7 @@ template * #include * ... - * + * * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * int vals[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * @@ -1401,7 +1407,7 @@ __host__ __device__ BinaryPredicate binary_pred); -/*! \p exclusive_scan_by_key computes an exclusive key-value or 'segmented' prefix +/*! \p exclusive_scan_by_key computes an exclusive key-value or 'segmented' prefix * sum operation. The term 'exclusive' means that each result does not include * the corresponding input operand in the partial sum. The term 'segmented' * means that the partial sums are broken into distinct segments. In other @@ -1436,7 +1442,7 @@ __host__ __device__ * \code * #include * #include - * + * * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * int vals[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * @@ -1466,7 +1472,7 @@ templatei and - * i+1 in the range [first1, last1) belong to the same segment if + * i+1 in the range [first1, last1) belong to the same segment if * binary_pred(*i, *(i+1)) is true, and belong to different segments otherwise. * - * This version of \p exclusive_scan_by_key uses the associative operator + * This version of \p exclusive_scan_by_key uses the associative operator * \c binary_op to perform the prefix sum. When the input and output sequences * are the same, the scan is performed in-place. * @@ -1506,7 +1512,7 @@ templateInput Iterator * and \c InputIterator2's \c value_type is convertible to \c OutputIterator's \c value_type. * \tparam OutputIterator is a model of Output Iterator, - * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then + * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then * binary_op(x,y) is defined. * \tparam T is convertible to \c OutputIterator's \c value_type. * \tparam BinaryPredicate is a model of Binary Predicate. @@ -1524,7 +1530,7 @@ template * #include * ... - * + * * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * int vals[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * @@ -1560,7 +1566,7 @@ __host__ __device__ AssociativeOperator binary_op); -/*! \p exclusive_scan_by_key computes an exclusive key-value or 'segmented' prefix +/*! \p exclusive_scan_by_key computes an exclusive key-value or 'segmented' prefix * sum operation. The term 'exclusive' means that each result does not include * the corresponding input operand in the partial sum. The term 'segmented' * means that the partial sums are broken into distinct segments. In other @@ -1572,10 +1578,10 @@ __host__ __device__ * * This version of \p exclusive_scan_by_key uses the binary predicate \c binary_pred * to compare adjacent keys. Specifically, consecutive iterators i and - * i+1 in the range [first1, last1) belong to the same segment if + * i+1 in the range [first1, last1) belong to the same segment if * binary_pred(*i, *(i+1)) is true, and belong to different segments otherwise. * - * This version of \p exclusive_scan_by_key uses the associative operator + * This version of \p exclusive_scan_by_key uses the associative operator * \c binary_op to perform the prefix sum. When the input and output sequences * are the same, the scan is performed in-place. * @@ -1596,7 +1602,7 @@ __host__ __device__ * \tparam InputIterator2 is a model of Input Iterator * and \c InputIterator2's \c value_type is convertible to \c OutputIterator's \c value_type. * \tparam OutputIterator is a model of Output Iterator, - * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then + * and if \c x and \c y are objects of \c OutputIterator's \c value_type, then * binary_op(x,y) is defined. * \tparam T is convertible to \c OutputIterator's \c value_type. * \tparam BinaryPredicate is a model of Binary Predicate. @@ -1611,7 +1617,7 @@ __host__ __device__ * \code * #include * #include - * + * * int keys[10] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; * int vals[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; * diff --git a/thrust/thrust/scatter.h b/thrust/thrust/scatter.h index b8b0bd84f52..40a5e45264c 100644 --- a/thrust/thrust/scatter.h +++ b/thrust/thrust/scatter.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -34,8 +40,8 @@ THRUST_NAMESPACE_BEGIN /*! \p scatter copies elements from a source range into an output array * according to a map. For each iterator \c i in the range [\p first, \p last), - * the value \c *i is assigned to output[*(map + (i - first))]. The - * output iterator must permit random access. If the same index + * the value \c *i is assigned to output[*(map + (i - first))]. The + * output iterator must permit random access. If the same index * appears more than once in the range [map, map + (last - first)), * the result is undefined. * @@ -98,8 +104,8 @@ __host__ __device__ /*! \p scatter copies elements from a source range into an output array * according to a map. For each iterator \c i in the range [\p first, \p last), - * the value \c *i is assigned to output[*(map + (i - first))]. The - * output iterator must permit random access. If the same index + * the value \c *i is assigned to output[*(map + (i - first))]. The + * output iterator must permit random access. If the same index * appears more than once in the range [map, map + (last - first)), * the result is undefined. * @@ -151,11 +157,11 @@ template[first, last) such that *(stencil + (i - first)) is * true, the value \c *i is assigned to output[*(map + (i - first))]. - * The output iterator must permit random access. If the same index + * The output iterator must permit random access. If the same index * appears more than once in the range [map, map + (last - first)) * the result is undefined. * @@ -190,9 +196,9 @@ template[first, last) such that *(stencil + (i - first)) is * true, the value \c *i is assigned to output[*(map + (i - first))]. - * The output iterator must permit random access. If the same index + * The output iterator must permit random access. If the same index * appears more than once in the range [map, map + (last - first)) * the result is undefined. * @@ -246,9 +252,9 @@ __host__ __device__ * int M[8] = {0, 5, 1, 6, 2, 7, 3, 4}; * int S[8] = {1, 0, 1, 0, 1, 0, 1, 0}; * int D[8] = {0, 0, 0, 0, 0, 0, 0, 0}; - * + * * thrust::scatter_if(V, V + 8, M, S, D); - * + * * // D contains [10, 30, 50, 70, 0, 0, 0, 0]; * \endcode * @@ -265,11 +271,11 @@ template[first, last) such that pred(*(stencil + (i - first))) is * \c true, the value \c *i is assigned to output[*(map + (i - first))]. - * The output iterator must permit random access. If the same index + * The output iterator must permit random access. If the same index * appears more than once in the range [map, map + (last - first)) * the result is undefined. * @@ -317,13 +323,13 @@ template[first, last) such that pred(*(stencil + (i - first))) is * \c true, the value \c *i is assigned to output[*(map + (i - first))]. - * The output iterator must permit random access. If the same index + * The output iterator must permit random access. If the same index * appears more than once in the range [map, map + (last - first)) * the result is undefined. * @@ -389,13 +395,13 @@ __host__ __device__ * int M[8] = {0, 5, 1, 6, 2, 7, 3, 4}; * int S[8] = {2, 1, 2, 1, 2, 1, 2, 1}; * int D[8] = {0, 0, 0, 0, 0, 0, 0, 0}; - * + * * is_even pred; * thrust::scatter_if(V, V + 8, M, S, D, pred); - * + * * // D contains [10, 30, 50, 70, 0, 0, 0, 0]; * \endcode - * + * * \note \p scatter_if is the inverse of thrust::gather_if. */ template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -33,7 +39,7 @@ THRUST_NAMESPACE_BEGIN /*! \p sequence fills the range [first, last) with a sequence of numbers. * - * For each iterator \c i in the range [first, last), this version of + * For each iterator \c i in the range [first, last), this version of * \p sequence performs the assignment *i = (i - first). * * The algorithm's execution is parallelized as determined by \p exec. @@ -75,7 +81,7 @@ __host__ __device__ /*! \p sequence fills the range [first, last) with a sequence of numbers. * - * For each iterator \c i in the range [first, last), this version of + * For each iterator \c i in the range [first, last), this version of * \p sequence performs the assignment *i = (i - first). * * \param first The beginning of the sequence. @@ -110,7 +116,7 @@ template /*! \p sequence fills the range [first, last) with a sequence of numbers. * - * For each iterator \c i in the range [first, last), this version of + * For each iterator \c i in the range [first, last), this version of * \p sequence performs the assignment *i = init + (i - first). * * The algorithm's execution is parallelized as determined by \p exec. @@ -157,7 +163,7 @@ __host__ __device__ /*! \p sequence fills the range [first, last) with a sequence of numbers. * - * For each iterator \c i in the range [first, last), this version of + * For each iterator \c i in the range [first, last), this version of * \p sequence performs the assignment *i = init + (i - first). * * \param first The beginning of the sequence. @@ -196,7 +202,7 @@ template /*! \p sequence fills the range [first, last) with a sequence of numbers. * - * For each iterator \c i in the range [first, last), this version of + * For each iterator \c i in the range [first, last), this version of * \p sequence performs the assignment *i = init + step * (i - first). * * The algorithm's execution is parallelized as determined by \p exec. @@ -245,7 +251,7 @@ __host__ __device__ /*! \p sequence fills the range [first, last) with a sequence of numbers. * - * For each iterator \c i in the range [first, last), this version of + * For each iterator \c i in the range [first, last), this version of * \p sequence performs the assignment *i = init + step * (i - first). * * \param first The beginning of the sequence. diff --git a/thrust/thrust/set_operations.h b/thrust/thrust/set_operations.h index 65a48d1b661..223907a4605 100644 --- a/thrust/thrust/set_operations.h +++ b/thrust/thrust/set_operations.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -1771,7 +1777,7 @@ template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #if THRUST_CPP_DIALECT >= 2011 -#include #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/sort.h b/thrust/thrust/sort.h index 5cf9d6217ab..8c4f0d49b94 100644 --- a/thrust/thrust/sort.h +++ b/thrust/thrust/sort.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -1055,7 +1061,7 @@ template ForwardIterator last); -/*! \p is_sorted returns \c true if the range [first, last) is sorted in ascending +/*! \p is_sorted returns \c true if the range [first, last) is sorted in ascending * order accoring to a user-defined comparison operation, and \c false otherwise. * * Specifically, this version of \p is_sorted returns \c false if for some iterator \c i in @@ -1117,7 +1123,7 @@ __host__ __device__ Compare comp); -/*! \p is_sorted returns \c true if the range [first, last) is sorted in ascending +/*! \p is_sorted returns \c true if the range [first, last) is sorted in ascending * order accoring to a user-defined comparison operation, and \c false otherwise. * * Specifically, this version of \p is_sorted returns \c false if for some iterator \c i in @@ -1189,17 +1195,17 @@ template * The following code snippet demonstrates how to use \p is_sorted_until to find the first position * in an array where the data becomes unsorted using the \p thrust::host execution policy for * parallelization: - * + * * \code * #include * #include * * ... - * + * * int A[8] = {0, 1, 2, 3, 0, 1, 2, 3}; - * + * * int * B = thrust::is_sorted_until(thrust::host, A, A + 8); - * + * * // B - A is 4 * // [A, B) is sorted * \endcode @@ -1230,16 +1236,16 @@ __host__ __device__ * * The following code snippet demonstrates how to use \p is_sorted_until to find the first position * in an array where the data becomes unsorted: - * + * * \code * #include * * ... - * + * * int A[8] = {0, 1, 2, 3, 0, 1, 2, 3}; - * + * * int * B = thrust::is_sorted_until(A, A + 8); - * + * * // B - A is 4 * // [A, B) is sorted * \endcode @@ -1282,12 +1288,12 @@ template * #include * * ... - * + * * int A[8] = {3, 2, 1, 0, 3, 2, 1, 0}; - * + * * thrust::greater comp; * int * B = thrust::is_sorted_until(thrust::host, A, A + 8, comp); - * + * * // B - A is 4 * // [A, B) is sorted in descending order * \endcode @@ -1327,12 +1333,12 @@ __host__ __device__ * #include * * ... - * + * * int A[8] = {3, 2, 1, 0, 3, 2, 1, 0}; - * + * * thrust::greater comp; * int * B = thrust::is_sorted_until(A, A + 8, comp); - * + * * // B - A is 4 * // [A, B) is sorted in descending order * \endcode diff --git a/thrust/thrust/swap.h b/thrust/thrust/swap.h index d8a8be73c31..7716458b004 100644 --- a/thrust/thrust/swap.h +++ b/thrust/thrust/swap.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -36,7 +42,7 @@ THRUST_NAMESPACE_BEGIN /*! \p swap assigns the contents of \c a to \c b and the * contents of \c b to \c a. This is used as a primitive operation * by many other algorithms. - * + * * \param a The first value of interest. After completion, * the value of b will be returned here. * \param b The second value of interest. After completion, @@ -58,7 +64,7 @@ THRUST_NAMESPACE_BEGIN * \endcode */ template -__host__ __device__ +__host__ __device__ inline void swap(Assignable1 &a, Assignable2 &b); /*! \} // swap diff --git a/thrust/thrust/system/cpp/detail/adjacent_difference.h b/thrust/thrust/system/cpp/detail/adjacent_difference.h index b82242c7c07..dc050ffb801 100644 --- a/thrust/thrust/system/cpp/detail/adjacent_difference.h +++ b/thrust/thrust/system/cpp/detail/adjacent_difference.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits adjacent_difference #include diff --git a/thrust/thrust/system/cpp/detail/assign_value.h b/thrust/thrust/system/cpp/detail/assign_value.h index d5f14bd1636..6596d8a9aae 100644 --- a/thrust/thrust/system/cpp/detail/assign_value.h +++ b/thrust/thrust/system/cpp/detail/assign_value.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits assign_value #include diff --git a/thrust/thrust/system/cpp/detail/binary_search.h b/thrust/thrust/system/cpp/detail/binary_search.h index a2c33f32aad..10129190061 100644 --- a/thrust/thrust/system/cpp/detail/binary_search.h +++ b/thrust/thrust/system/cpp/detail/binary_search.h @@ -16,6 +16,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include // this system inherits the binary search algorithms diff --git a/thrust/thrust/system/cpp/detail/copy.h b/thrust/thrust/system/cpp/detail/copy.h index d2f5b1bd45c..6edd9af7755 100644 --- a/thrust/thrust/system/cpp/detail/copy.h +++ b/thrust/thrust/system/cpp/detail/copy.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits copy #include diff --git a/thrust/thrust/system/cpp/detail/copy_if.h b/thrust/thrust/system/cpp/detail/copy_if.h index 10869e2a902..3da9e682187 100644 --- a/thrust/thrust/system/cpp/detail/copy_if.h +++ b/thrust/thrust/system/cpp/detail/copy_if.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits copy_if #include diff --git a/thrust/thrust/system/cpp/detail/count.h b/thrust/thrust/system/cpp/detail/count.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/count.h +++ b/thrust/thrust/system/cpp/detail/count.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/equal.h b/thrust/thrust/system/cpp/detail/equal.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/equal.h +++ b/thrust/thrust/system/cpp/detail/equal.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/execution_policy.h b/thrust/thrust/system/cpp/detail/execution_policy.h index 1a8193bf3ac..39d19c3b222 100644 --- a/thrust/thrust/system/cpp/detail/execution_policy.h +++ b/thrust/thrust/system/cpp/detail/execution_policy.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -55,7 +61,7 @@ template struct execution_policy : thrust::system::detail::sequential::execution_policy { - typedef tag tag_type; + typedef tag tag_type; operator tag() const { return tag(); } }; diff --git a/thrust/thrust/system/cpp/detail/extrema.h b/thrust/thrust/system/cpp/detail/extrema.h index 5fbb8c55c28..a5aa41669f2 100644 --- a/thrust/thrust/system/cpp/detail/extrema.h +++ b/thrust/thrust/system/cpp/detail/extrema.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits extrema algorithms #include diff --git a/thrust/thrust/system/cpp/detail/fill.h b/thrust/thrust/system/cpp/detail/fill.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/fill.h +++ b/thrust/thrust/system/cpp/detail/fill.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/find.h b/thrust/thrust/system/cpp/detail/find.h index 29c0dafc8ce..f246e9be742 100644 --- a/thrust/thrust/system/cpp/detail/find.h +++ b/thrust/thrust/system/cpp/detail/find.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits find #include diff --git a/thrust/thrust/system/cpp/detail/for_each.h b/thrust/thrust/system/cpp/detail/for_each.h index 9ef45dfe62e..505ffd3285f 100644 --- a/thrust/thrust/system/cpp/detail/for_each.h +++ b/thrust/thrust/system/cpp/detail/for_each.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits for_each #include diff --git a/thrust/thrust/system/cpp/detail/gather.h b/thrust/thrust/system/cpp/detail/gather.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/gather.h +++ b/thrust/thrust/system/cpp/detail/gather.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/generate.h b/thrust/thrust/system/cpp/detail/generate.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/generate.h +++ b/thrust/thrust/system/cpp/detail/generate.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/get_value.h b/thrust/thrust/system/cpp/detail/get_value.h index 915001d37f4..a39301e3988 100644 --- a/thrust/thrust/system/cpp/detail/get_value.h +++ b/thrust/thrust/system/cpp/detail/get_value.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits get_value #include diff --git a/thrust/thrust/system/cpp/detail/inner_product.h b/thrust/thrust/system/cpp/detail/inner_product.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/inner_product.h +++ b/thrust/thrust/system/cpp/detail/inner_product.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/iter_swap.h b/thrust/thrust/system/cpp/detail/iter_swap.h index 7a982becb39..3e419612d4a 100644 --- a/thrust/thrust/system/cpp/detail/iter_swap.h +++ b/thrust/thrust/system/cpp/detail/iter_swap.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits iter_swap #include diff --git a/thrust/thrust/system/cpp/detail/logical.h b/thrust/thrust/system/cpp/detail/logical.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/logical.h +++ b/thrust/thrust/system/cpp/detail/logical.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/malloc_and_free.h b/thrust/thrust/system/cpp/detail/malloc_and_free.h index b1ad7a7341b..2d3fb189ade 100644 --- a/thrust/thrust/system/cpp/detail/malloc_and_free.h +++ b/thrust/thrust/system/cpp/detail/malloc_and_free.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits malloc & free #include diff --git a/thrust/thrust/system/cpp/detail/memory.inl b/thrust/thrust/system/cpp/detail/memory.inl index 650aa1cb501..f8ed48b32c8 100644 --- a/thrust/thrust/system/cpp/detail/memory.inl +++ b/thrust/thrust/system/cpp/detail/memory.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/cpp/detail/merge.h b/thrust/thrust/system/cpp/detail/merge.h index 20e17f2d40d..f7c60de2eea 100644 --- a/thrust/thrust/system/cpp/detail/merge.h +++ b/thrust/thrust/system/cpp/detail/merge.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits merge #include diff --git a/thrust/thrust/system/cpp/detail/mismatch.h b/thrust/thrust/system/cpp/detail/mismatch.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/mismatch.h +++ b/thrust/thrust/system/cpp/detail/mismatch.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/par.h b/thrust/thrust/system/cpp/detail/par.h index c56921327f5..03a1c4d2b9a 100644 --- a/thrust/thrust/system/cpp/detail/par.h +++ b/thrust/thrust/system/cpp/detail/par.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/cpp/detail/partition.h b/thrust/thrust/system/cpp/detail/partition.h index 50d48e222aa..742b7c806f7 100644 --- a/thrust/thrust/system/cpp/detail/partition.h +++ b/thrust/thrust/system/cpp/detail/partition.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits partition #include diff --git a/thrust/thrust/system/cpp/detail/per_device_resource.h b/thrust/thrust/system/cpp/detail/per_device_resource.h index 1b8d61f9216..64c721210a7 100644 --- a/thrust/thrust/system/cpp/detail/per_device_resource.h +++ b/thrust/thrust/system/cpp/detail/per_device_resource.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special per device resource functions diff --git a/thrust/thrust/system/cpp/detail/reduce.h b/thrust/thrust/system/cpp/detail/reduce.h index e09652cd9fd..3197b30a97b 100644 --- a/thrust/thrust/system/cpp/detail/reduce.h +++ b/thrust/thrust/system/cpp/detail/reduce.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits reduce #include diff --git a/thrust/thrust/system/cpp/detail/reduce_by_key.h b/thrust/thrust/system/cpp/detail/reduce_by_key.h index a2c7744249b..836628d2fdc 100644 --- a/thrust/thrust/system/cpp/detail/reduce_by_key.h +++ b/thrust/thrust/system/cpp/detail/reduce_by_key.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits reduce_by_key #include diff --git a/thrust/thrust/system/cpp/detail/remove.h b/thrust/thrust/system/cpp/detail/remove.h index a529f625d6a..f2c673830e2 100644 --- a/thrust/thrust/system/cpp/detail/remove.h +++ b/thrust/thrust/system/cpp/detail/remove.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits remove #include diff --git a/thrust/thrust/system/cpp/detail/replace.h b/thrust/thrust/system/cpp/detail/replace.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/replace.h +++ b/thrust/thrust/system/cpp/detail/replace.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/reverse.h b/thrust/thrust/system/cpp/detail/reverse.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/reverse.h +++ b/thrust/thrust/system/cpp/detail/reverse.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/scan.h b/thrust/thrust/system/cpp/detail/scan.h index 4d38e648437..5c8beb197d9 100644 --- a/thrust/thrust/system/cpp/detail/scan.h +++ b/thrust/thrust/system/cpp/detail/scan.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits scan #include diff --git a/thrust/thrust/system/cpp/detail/scan_by_key.h b/thrust/thrust/system/cpp/detail/scan_by_key.h index 1e72e7c38f8..b4aabfd1c1e 100644 --- a/thrust/thrust/system/cpp/detail/scan_by_key.h +++ b/thrust/thrust/system/cpp/detail/scan_by_key.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits the scan_by_key algorithms #include diff --git a/thrust/thrust/system/cpp/detail/scatter.h b/thrust/thrust/system/cpp/detail/scatter.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/scatter.h +++ b/thrust/thrust/system/cpp/detail/scatter.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/sequence.h b/thrust/thrust/system/cpp/detail/sequence.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/sequence.h +++ b/thrust/thrust/system/cpp/detail/sequence.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/set_operations.h b/thrust/thrust/system/cpp/detail/set_operations.h index bbde20114c2..c5247efee00 100644 --- a/thrust/thrust/system/cpp/detail/set_operations.h +++ b/thrust/thrust/system/cpp/detail/set_operations.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits the set operations #include diff --git a/thrust/thrust/system/cpp/detail/sort.h b/thrust/thrust/system/cpp/detail/sort.h index ae38b3ba8c7..e25973ea166 100644 --- a/thrust/thrust/system/cpp/detail/sort.h +++ b/thrust/thrust/system/cpp/detail/sort.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits sort #include diff --git a/thrust/thrust/system/cpp/detail/swap_ranges.h b/thrust/thrust/system/cpp/detail/swap_ranges.h index 35cd5462207..276381aadff 100644 --- a/thrust/thrust/system/cpp/detail/swap_ranges.h +++ b/thrust/thrust/system/cpp/detail/swap_ranges.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // cpp has no special swap_ranges diff --git a/thrust/thrust/system/cpp/detail/tabulate.h b/thrust/thrust/system/cpp/detail/tabulate.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/tabulate.h +++ b/thrust/thrust/system/cpp/detail/tabulate.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/temporary_buffer.h b/thrust/thrust/system/cpp/detail/temporary_buffer.h index 2adfaf2810c..d666f267e35 100644 --- a/thrust/thrust/system/cpp/detail/temporary_buffer.h +++ b/thrust/thrust/system/cpp/detail/temporary_buffer.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special temporary buffer functions diff --git a/thrust/thrust/system/cpp/detail/transform.h b/thrust/thrust/system/cpp/detail/transform.h index 895164ce5af..434e7a66535 100644 --- a/thrust/thrust/system/cpp/detail/transform.h +++ b/thrust/thrust/system/cpp/detail/transform.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // cpp has no special transform diff --git a/thrust/thrust/system/cpp/detail/transform_reduce.h b/thrust/thrust/system/cpp/detail/transform_reduce.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/transform_reduce.h +++ b/thrust/thrust/system/cpp/detail/transform_reduce.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/transform_scan.h b/thrust/thrust/system/cpp/detail/transform_scan.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/transform_scan.h +++ b/thrust/thrust/system/cpp/detail/transform_scan.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/uninitialized_copy.h b/thrust/thrust/system/cpp/detail/uninitialized_copy.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/uninitialized_copy.h +++ b/thrust/thrust/system/cpp/detail/uninitialized_copy.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/uninitialized_fill.h b/thrust/thrust/system/cpp/detail/uninitialized_fill.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cpp/detail/uninitialized_fill.h +++ b/thrust/thrust/system/cpp/detail/uninitialized_fill.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cpp/detail/unique.h b/thrust/thrust/system/cpp/detail/unique.h index 2ff23e9d3db..c00503fb282 100644 --- a/thrust/thrust/system/cpp/detail/unique.h +++ b/thrust/thrust/system/cpp/detail/unique.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits unique #include diff --git a/thrust/thrust/system/cpp/detail/unique_by_key.h b/thrust/thrust/system/cpp/detail/unique_by_key.h index 1d40011787c..78e73f639e9 100644 --- a/thrust/thrust/system/cpp/detail/unique_by_key.h +++ b/thrust/thrust/system/cpp/detail/unique_by_key.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits unique_by_key #include diff --git a/thrust/thrust/system/cpp/detail/vector.inl b/thrust/thrust/system/cpp/detail/vector.inl index 02980c62a42..96e0f285782 100644 --- a/thrust/thrust/system/cpp/detail/vector.inl +++ b/thrust/thrust/system/cpp/detail/vector.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -98,13 +104,13 @@ template return *this; } #endif - + template vector ::vector(std::initializer_list il) : super_t(il) {} - + template vector ::vector(std::initializer_list il, const Allocator& alloc) @@ -139,7 +145,7 @@ template super_t::operator=(x); return *this; } - + } // end cpp } // end system THRUST_NAMESPACE_END diff --git a/thrust/thrust/system/cpp/execution_policy.h b/thrust/thrust/system/cpp/execution_policy.h index 0d8a9a36790..f7aca1fb22f 100644 --- a/thrust/thrust/system/cpp/execution_policy.h +++ b/thrust/thrust/system/cpp/execution_policy.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // get the execution policies definitions first #include diff --git a/thrust/thrust/system/cpp/memory.h b/thrust/thrust/system/cpp/memory.h index a18abeb8e4f..d6451670c03 100644 --- a/thrust/thrust/system/cpp/memory.h +++ b/thrust/thrust/system/cpp/memory.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/cpp/memory_resource.h b/thrust/thrust/system/cpp/memory_resource.h index 04b4e3cf8da..1a0206f31e7 100644 --- a/thrust/thrust/system/cpp/memory_resource.h +++ b/thrust/thrust/system/cpp/memory_resource.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/cpp/pointer.h b/thrust/thrust/system/cpp/pointer.h index f204fa37509..5e75aafd44c 100644 --- a/thrust/thrust/system/cpp/pointer.h +++ b/thrust/thrust/system/cpp/pointer.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/cpp/vector.h b/thrust/thrust/system/cpp/vector.h index 2a418dbc30d..6122dd42bc8 100644 --- a/thrust/thrust/system/cpp/vector.h +++ b/thrust/thrust/system/cpp/vector.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/cuda/config.h b/thrust/thrust/system/cuda/config.h index f29a72ac863..9ec5137f2af 100644 --- a/thrust/thrust/system/cuda/config.h +++ b/thrust/thrust/system/cuda/config.h @@ -34,9 +34,14 @@ #define THRUST_DEBUG_SYNC_FLAG false #endif - #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // We don't directly include since it doesn't exist in // older releases. This header will always pull in version info: #include diff --git a/thrust/thrust/system/cuda/detail/adjacent_difference.h b/thrust/thrust/system/cuda/detail/adjacent_difference.h index 28461123518..85c499b620a 100644 --- a/thrust/thrust/system/cuda/detail/adjacent_difference.h +++ b/thrust/thrust/system/cuda/detail/adjacent_difference.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/assign_value.h b/thrust/thrust/system/cuda/detail/assign_value.h index 8945f1cac37..3e98b37d8e3 100644 --- a/thrust/thrust/system/cuda/detail/assign_value.h +++ b/thrust/thrust/system/cuda/detail/assign_value.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/async/copy.h b/thrust/thrust/system/cuda/detail/async/copy.h index 6f29707594f..af0040f18a2 100644 --- a/thrust/thrust/system/cuda/detail/async/copy.h +++ b/thrust/thrust/system/cuda/detail/async/copy.h @@ -30,6 +30,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/customization.h b/thrust/thrust/system/cuda/detail/async/customization.h index 6f125a6f418..758370cf992 100644 --- a/thrust/thrust/system/cuda/detail/async/customization.h +++ b/thrust/thrust/system/cuda/detail/async/customization.h @@ -30,6 +30,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/exclusive_scan.h b/thrust/thrust/system/cuda/detail/async/exclusive_scan.h index 0b120a434a3..f600def0f85 100644 --- a/thrust/thrust/system/cuda/detail/async/exclusive_scan.h +++ b/thrust/thrust/system/cuda/detail/async/exclusive_scan.h @@ -28,6 +28,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/for_each.h b/thrust/thrust/system/cuda/detail/async/for_each.h index d6809fe0a46..fe500fe8dfa 100644 --- a/thrust/thrust/system/cuda/detail/async/for_each.h +++ b/thrust/thrust/system/cuda/detail/async/for_each.h @@ -31,6 +31,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/inclusive_scan.h b/thrust/thrust/system/cuda/detail/async/inclusive_scan.h index 363347c3531..2c6b3bdb72f 100644 --- a/thrust/thrust/system/cuda/detail/async/inclusive_scan.h +++ b/thrust/thrust/system/cuda/detail/async/inclusive_scan.h @@ -28,6 +28,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/reduce.h b/thrust/thrust/system/cuda/detail/async/reduce.h index 2d0dbfe16f6..73351132df8 100644 --- a/thrust/thrust/system/cuda/detail/async/reduce.h +++ b/thrust/thrust/system/cuda/detail/async/reduce.h @@ -32,6 +32,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/scan.h b/thrust/thrust/system/cuda/detail/async/scan.h index 4a9f31681ec..e946683061c 100644 --- a/thrust/thrust/system/cuda/detail/async/scan.h +++ b/thrust/thrust/system/cuda/detail/async/scan.h @@ -27,6 +27,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/system/cuda/detail/async/sort.h b/thrust/thrust/system/cuda/detail/async/sort.h index f501f19c580..9f1d567cad9 100644 --- a/thrust/thrust/system/cuda/detail/async/sort.h +++ b/thrust/thrust/system/cuda/detail/async/sort.h @@ -30,6 +30,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/transform.h b/thrust/thrust/system/cuda/detail/async/transform.h index a971300f229..4bd8f96bddd 100644 --- a/thrust/thrust/system/cuda/detail/async/transform.h +++ b/thrust/thrust/system/cuda/detail/async/transform.h @@ -30,6 +30,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 diff --git a/thrust/thrust/system/cuda/detail/binary_search.h b/thrust/thrust/system/cuda/detail/binary_search.h index fb769a4ac0a..e7c5184af70 100644 --- a/thrust/thrust/system/cuda/detail/binary_search.h +++ b/thrust/thrust/system/cuda/detail/binary_search.h @@ -16,4 +16,12 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special version of this algorithm diff --git a/thrust/thrust/system/cuda/detail/cdp_dispatch.h b/thrust/thrust/system/cuda/detail/cdp_dispatch.h index f94e5dd9265..739d1cb7ecd 100644 --- a/thrust/thrust/system/cuda/detail/cdp_dispatch.h +++ b/thrust/thrust/system/cuda/detail/cdp_dispatch.h @@ -21,6 +21,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/system/cuda/detail/copy.h b/thrust/thrust/system/cuda/detail/copy.h index 02a5d2ac1a6..d394131d423 100644 --- a/thrust/thrust/system/cuda/detail/copy.h +++ b/thrust/thrust/system/cuda/detail/copy.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/system/cuda/detail/copy_if.h b/thrust/thrust/system/cuda/detail/copy_if.h index 5e760c086fb..4d99dda6f35 100644 --- a/thrust/thrust/system/cuda/detail/copy_if.h +++ b/thrust/thrust/system/cuda/detail/copy_if.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/core/agent_launcher.h b/thrust/thrust/system/cuda/detail/core/agent_launcher.h index 10df7612cd9..1958e2e20a0 100644 --- a/thrust/thrust/system/cuda/detail/core/agent_launcher.h +++ b/thrust/thrust/system/cuda/detail/core/agent_launcher.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC @@ -35,30 +41,29 @@ #include #include -#include // _LIBCUDACXX_HIDDEN, _LIBCUDACXX_{CLANG,GCC}_DIAGNOSTIC_IGNORED - #include #include -THRUST_NAMESPACE_BEGIN -namespace cuda_cub { -namespace core { - /** * @def THRUST_DISABLE_KERNEL_VISIBILITY_WARNING_SUPPRESSION * If defined, the default suppression of kernel visibility attribute warning is disabled. */ #if !defined(THRUST_DISABLE_KERNEL_VISIBILITY_WARNING_SUPPRESSION) -_LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED("-Wattributes") -_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wattributes") -#if !defined(_LIBCUDACXX_COMPILER_NVHPC_CUDA) -_LIBCUDACXX_NVHPC_DIAGNOSTIC_IGNORED(attribute_requires_external_linkage) -#endif -#endif +_CCCL_DIAG_SUPPRESS_GCC("-Wattributes") +_CCCL_DIAG_SUPPRESS_CLANG("-Wattributes") +#if !defined(_CCCL_CUDA_COMPILER_NVHPC) +_CCCL_DIAG_SUPPRESS_NVHPC(attribute_requires_external_linkage) +#endif // !_LIBCUDACXX_COMPILER_NVHPC_CUDA +#endif // !THRUST_DISABLE_KERNEL_VISIBILITY_WARNING_SUPPRESSION + +THRUST_NAMESPACE_BEGIN + +namespace cuda_cub { +namespace core { #ifndef THRUST_DETAIL_KERNEL_ATTRIBUTES -#define THRUST_DETAIL_KERNEL_ATTRIBUTES __global__ _LIBCUDACXX_HIDDEN +#define THRUST_DETAIL_KERNEL_ATTRIBUTES CCCL_DETAIL_KERNEL_ATTRIBUTES #endif #if defined(__CUDA_ARCH__) || defined(_NVHPC_CUDA) @@ -541,7 +546,7 @@ _LIBCUDACXX_NVHPC_DIAGNOSTIC_IGNORED(attribute_requires_external_linkage) THRUST_RUNTIME_FUNCTION void print_info(K k) const { - #if THRUST_DEBUG_SYNC_FLAG + #if THRUST_DEBUG_SYNC_FLAG cuda_optional occ = max_sm_occupancy(k); const int ptx_version = core::get_ptx_version(); if (count > 0) @@ -1159,5 +1164,7 @@ _LIBCUDACXX_NVHPC_DIAGNOSTIC_IGNORED(attribute_requires_external_linkage) } // namespace core } // namespace cuda_cub + THRUST_NAMESPACE_END + #endif diff --git a/thrust/thrust/system/cuda/detail/core/alignment.h b/thrust/thrust/system/cuda/detail/core/alignment.h index 4b807ebc1ee..8c28547001d 100644 --- a/thrust/thrust/system/cuda/detail/core/alignment.h +++ b/thrust/thrust/system/cuda/detail/core/alignment.h @@ -20,6 +20,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/cuda/detail/core/triple_chevron_launch.h b/thrust/thrust/system/cuda/detail/core/triple_chevron_launch.h index 28ac1a23053..47af5501934 100644 --- a/thrust/thrust/system/cuda/detail/core/triple_chevron_launch.h +++ b/thrust/thrust/system/cuda/detail/core/triple_chevron_launch.h @@ -27,11 +27,15 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include -#include // _LIBCUDACXX_HIDDEN - #include THRUST_NAMESPACE_BEGIN @@ -39,7 +43,7 @@ THRUST_NAMESPACE_BEGIN namespace cuda_cub { namespace launcher { - struct _LIBCUDACXX_HIDDEN triple_chevron + struct _CCCL_ATTRIBUTE_HIDDEN triple_chevron { typedef size_t Size; dim3 const grid; @@ -127,7 +131,7 @@ namespace launcher { shared_mem, stream); } - #else + #else template cudaError_t __device__ doit_device(K, Args const&... ) const diff --git a/thrust/thrust/system/cuda/detail/core/util.h b/thrust/thrust/system/cuda/detail/core/util.h index 3741aec2848..e4dbb8e5195 100644 --- a/thrust/thrust/system/cuda/detail/core/util.h +++ b/thrust/thrust/system/cuda/detail/core/util.h @@ -27,6 +27,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -620,7 +626,7 @@ namespace core { inline int get_ptx_version() { int ptx_version = 0; - if (cub::PtxVersion(ptx_version) != cudaSuccess) + if (cub::PtxVersion(ptx_version) != cudaSuccess) { // Failure might mean that there's no device found const int current_device = cub::CurrentDevice(); @@ -629,7 +635,7 @@ namespace core { cuda_cub::throw_on_error(cudaErrorNoDevice, "No GPU is available\n"); } - // Any subsequent failure means the provided device binary does not match + // Any subsequent failure means the provided device binary does not match // the generated function code int major = 0, minor = 0; cudaError_t attr_status; @@ -643,7 +649,7 @@ namespace core { cuda_cub::throw_on_error(attr_status, "get_ptx_version :" "failed to get minor CUDA device compute capability version."); - + // Index from which SM code has to start in the message below int code_offset = 37; char str[] = "This program was not compiled for SM \n"; diff --git a/thrust/thrust/system/cuda/detail/count.h b/thrust/thrust/system/cuda/detail/count.h index b624f39dcca..2fc36c36b61 100644 --- a/thrust/thrust/system/cuda/detail/count.h +++ b/thrust/thrust/system/cuda/detail/count.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/cross_system.h b/thrust/thrust/system/cuda/detail/cross_system.h index 039531d2821..e01721f227e 100644 --- a/thrust/thrust/system/cuda/detail/cross_system.h +++ b/thrust/thrust/system/cuda/detail/cross_system.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/system/cuda/detail/dispatch.h b/thrust/thrust/system/cuda/detail/dispatch.h index d0e3f94ec82..2e20a19f75f 100644 --- a/thrust/thrust/system/cuda/detail/dispatch.h +++ b/thrust/thrust/system/cuda/detail/dispatch.h @@ -16,6 +16,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/system/cuda/detail/equal.h b/thrust/thrust/system/cuda/detail/equal.h index aec60824526..2adfa868c35 100644 --- a/thrust/thrust/system/cuda/detail/equal.h +++ b/thrust/thrust/system/cuda/detail/equal.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/error.inl b/thrust/thrust/system/cuda/detail/error.inl index e5230521131..2bdd107c77f 100644 --- a/thrust/thrust/system/cuda/detail/error.inl +++ b/thrust/thrust/system/cuda/detail/error.inl @@ -19,6 +19,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/system/cuda/detail/execution_policy.h b/thrust/thrust/system/cuda/detail/execution_policy.h index 4202424c5e4..318ada1faa1 100644 --- a/thrust/thrust/system/cuda/detail/execution_policy.h +++ b/thrust/thrust/system/cuda/detail/execution_policy.h @@ -29,6 +29,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include @@ -66,7 +72,7 @@ struct tag : execution_policy template struct execution_policy : thrust::execution_policy { - typedef tag tag_type; + typedef tag tag_type; operator tag() const { return tag(); } }; diff --git a/thrust/thrust/system/cuda/detail/extrema.h b/thrust/thrust/system/cuda/detail/extrema.h index 4fe7ec86b5c..9aea95a1b07 100644 --- a/thrust/thrust/system/cuda/detail/extrema.h +++ b/thrust/thrust/system/cuda/detail/extrema.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/fill.h b/thrust/thrust/system/cuda/detail/fill.h index 80ea68592a2..286937fe10a 100644 --- a/thrust/thrust/system/cuda/detail/fill.h +++ b/thrust/thrust/system/cuda/detail/fill.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/find.h b/thrust/thrust/system/cuda/detail/find.h index b7d2b748f87..adfa93fd484 100644 --- a/thrust/thrust/system/cuda/detail/find.h +++ b/thrust/thrust/system/cuda/detail/find.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include @@ -111,10 +117,10 @@ find_if_n(execution_policy& policy, Predicate predicate) { typedef typename thrust::tuple result_type; - + // empty sequence if(num_items == 0) return first; - + // this implementation breaks up the sequence into separate intervals // in an attempt to early-out as soon as a value is found // @@ -125,7 +131,7 @@ find_if_n(execution_policy& policy, // TODO incorporate sizeof(InputType) into interval_threshold and round to multiple of 32 const Size interval_threshold = 1 << 20; const Size interval_size = (thrust::min)(interval_threshold, num_items); - + // force transform_iterator output to bool typedef transform_input_iterator_t& policy, return first + thrust::get<1>(result); } } - + //nothing was found if we reach here... return first + num_items; } diff --git a/thrust/thrust/system/cuda/detail/for_each.h b/thrust/thrust/system/cuda/detail/for_each.h index 518538ff362..8041de112db 100644 --- a/thrust/thrust/system/cuda/detail/for_each.h +++ b/thrust/thrust/system/cuda/detail/for_each.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/future.inl b/thrust/thrust/system/cuda/detail/future.inl index f23184aae9d..1ef39fee448 100644 --- a/thrust/thrust/system/cuda/detail/future.inl +++ b/thrust/thrust/system/cuda/detail/future.inl @@ -9,6 +9,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 @@ -361,7 +367,7 @@ try_acquire_stream(int device, unique_eager_future& parent) noexcept; template __host__ acquired_stream acquire_stream(int device, Dependencies&... deps) noexcept; - + template __host__ unique_eager_event @@ -520,7 +526,7 @@ public: // Precondition: `true == valid_content()`. __host__ - pointer data() + pointer data() { if (!valid_content()) throw thrust::event_error(event_errc::no_content); @@ -530,7 +536,7 @@ public: // Precondition: `true == valid_content()`. __host__ - const_pointer data() const + const_pointer data() const { if (!valid_content()) throw thrust::event_error(event_errc::no_content); @@ -673,7 +679,7 @@ public: } THRUST_NODISCARD __host__ __device__ - value_type extract() + value_type extract() { return std::move(value_); } @@ -1331,7 +1337,7 @@ make_dependent_future(ComputeContent&& cc, std::tuple&& deps) std::unique_ptr sig( new async_signal_type(std::move(as.stream), std::move(ka), std::move(cc)) ); - + // Finally, we create the promise and future objects. weak_promise child_prom(device_id, sig->data()); unique_eager_future child_fut(device_id, std::move(sig)); @@ -1350,7 +1356,7 @@ unique_eager_event when_all(Events&&... evs) // TODO: Constrain to events, futures, and maybe streams (currently allows keep // alives). { - return detail::make_dependent_event(std::make_tuple(std::move(evs)...)); + return detail::make_dependent_event(std::make_tuple(std::move(evs)...)); } // ADL hook for transparent `.after` move support. diff --git a/thrust/thrust/system/cuda/detail/gather.h b/thrust/thrust/system/cuda/detail/gather.h index 56ff3aecf16..bdbc7b566dc 100644 --- a/thrust/thrust/system/cuda/detail/gather.h +++ b/thrust/thrust/system/cuda/detail/gather.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/generate.h b/thrust/thrust/system/cuda/detail/generate.h index ad6340f8313..dd8b7ce9d99 100644 --- a/thrust/thrust/system/cuda/detail/generate.h +++ b/thrust/thrust/system/cuda/detail/generate.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/get_value.h b/thrust/thrust/system/cuda/detail/get_value.h index 9065f773a80..6364970a243 100644 --- a/thrust/thrust/system/cuda/detail/get_value.h +++ b/thrust/thrust/system/cuda/detail/get_value.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/guarded_cuda_runtime_api.h b/thrust/thrust/system/cuda/detail/guarded_cuda_runtime_api.h index 5b0f345a74a..0a61ac2ff2c 100644 --- a/thrust/thrust/system/cuda/detail/guarded_cuda_runtime_api.h +++ b/thrust/thrust/system/cuda/detail/guarded_cuda_runtime_api.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to check for the existence of macros // such as __host__ and __device__, which may already be defined by thrust // and to undefine them before entering cuda_runtime_api.h (which will redefine them) diff --git a/thrust/thrust/system/cuda/detail/guarded_driver_types.h b/thrust/thrust/system/cuda/detail/guarded_driver_types.h index 076964071cf..7620b08704c 100644 --- a/thrust/thrust/system/cuda/detail/guarded_driver_types.h +++ b/thrust/thrust/system/cuda/detail/guarded_driver_types.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include without causing // warnings from redefinitions of __host__ and __device__. // carefully save their definitions and restore them diff --git a/thrust/thrust/system/cuda/detail/inner_product.h b/thrust/thrust/system/cuda/detail/inner_product.h index 98e9064d286..f65db8df1aa 100644 --- a/thrust/thrust/system/cuda/detail/inner_product.h +++ b/thrust/thrust/system/cuda/detail/inner_product.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/internal/copy_cross_system.h b/thrust/thrust/system/cuda/detail/internal/copy_cross_system.h index a1208c67c9a..468253482e5 100644 --- a/thrust/thrust/system/cuda/detail/internal/copy_cross_system.h +++ b/thrust/thrust/system/cuda/detail/internal/copy_cross_system.h @@ -26,12 +26,18 @@ ******************************************************************************/ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // XXX // this file must not be included on its own, ever, // but must be part of include in thrust/system/cuda/detail/copy.h -#include - #include #include @@ -178,7 +184,7 @@ namespace __copy { // get type of the input data typedef typename thrust::iterator_value::type InputTy; - // allocate device temp storage + // allocate device temp storage thrust::detail::temporary_array d_in_ptr(device_s, num_items); // uninitialize copy into temp device storage diff --git a/thrust/thrust/system/cuda/detail/internal/copy_device_to_device.h b/thrust/thrust/system/cuda/detail/internal/copy_device_to_device.h index a0d9d492dac..fccec83922c 100644 --- a/thrust/thrust/system/cuda/detail/internal/copy_device_to_device.h +++ b/thrust/thrust/system/cuda/detail/internal/copy_device_to_device.h @@ -29,6 +29,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/iter_swap.h b/thrust/thrust/system/cuda/detail/iter_swap.h index c0628610acb..df2a1b450e1 100644 --- a/thrust/thrust/system/cuda/detail/iter_swap.h +++ b/thrust/thrust/system/cuda/detail/iter_swap.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/logical.h b/thrust/thrust/system/cuda/detail/logical.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cuda/detail/logical.h +++ b/thrust/thrust/system/cuda/detail/logical.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cuda/detail/make_unsigned_special.h b/thrust/thrust/system/cuda/detail/make_unsigned_special.h index dda73576760..b5e0d5bec73 100644 --- a/thrust/thrust/system/cuda/detail/make_unsigned_special.h +++ b/thrust/thrust/system/cuda/detail/make_unsigned_special.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace cuda_cub { diff --git a/thrust/thrust/system/cuda/detail/malloc_and_free.h b/thrust/thrust/system/cuda/detail/malloc_and_free.h index 1b12e2cc305..57b5d7e1583 100644 --- a/thrust/thrust/system/cuda/detail/malloc_and_free.h +++ b/thrust/thrust/system/cuda/detail/malloc_and_free.h @@ -16,9 +16,16 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include -#include #include #include #include diff --git a/thrust/thrust/system/cuda/detail/memory.inl b/thrust/thrust/system/cuda/detail/memory.inl index f6fc98359af..4ba3180faa0 100644 --- a/thrust/thrust/system/cuda/detail/memory.inl +++ b/thrust/thrust/system/cuda/detail/memory.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/cuda/detail/merge.h b/thrust/thrust/system/cuda/detail/merge.h index 478e3508d70..2ae9469ad6d 100644 --- a/thrust/thrust/system/cuda/detail/merge.h +++ b/thrust/thrust/system/cuda/detail/merge.h @@ -28,6 +28,12 @@ j * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/mismatch.h b/thrust/thrust/system/cuda/detail/mismatch.h index b1e2f44d2df..7110c232cbc 100644 --- a/thrust/thrust/system/cuda/detail/mismatch.h +++ b/thrust/thrust/system/cuda/detail/mismatch.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/par.h b/thrust/thrust/system/cuda/detail/par.h index 42c701ca701..56aa3c2414f 100644 --- a/thrust/thrust/system/cuda/detail/par.h +++ b/thrust/thrust/system/cuda/detail/par.h @@ -27,6 +27,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -114,7 +120,7 @@ struct execute_on_stream : execute_on_stream_base __host__ __device__ execute_on_stream() : base_t(){}; __host__ __device__ - execute_on_stream(cudaStream_t stream) + execute_on_stream(cudaStream_t stream) : base_t(stream){}; }; @@ -125,7 +131,7 @@ struct execute_on_stream_nosync : execute_on_stream_nosync_base>> syntax. * The user must take care to perform explicit synchronization if necessary. - * + * * The following code snippet demonstrates how to use \p thrust::cuda::par_nosync : * * \code diff --git a/thrust/thrust/system/cuda/detail/par_to_seq.h b/thrust/thrust/system/cuda/detail/par_to_seq.h index e710f017b65..a03fa182342 100644 --- a/thrust/thrust/system/cuda/detail/par_to_seq.h +++ b/thrust/thrust/system/cuda/detail/par_to_seq.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/system/cuda/detail/parallel_for.h b/thrust/thrust/system/cuda/detail/parallel_for.h index 43c3297aaef..8ee1be41bf9 100644 --- a/thrust/thrust/system/cuda/detail/parallel_for.h +++ b/thrust/thrust/system/cuda/detail/parallel_for.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/partition.h b/thrust/thrust/system/cuda/detail/partition.h index fad75eb0d83..7ee25157326 100644 --- a/thrust/thrust/system/cuda/detail/partition.h +++ b/thrust/thrust/system/cuda/detail/partition.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/per_device_resource.h b/thrust/thrust/system/cuda/detail/per_device_resource.h index 414ea778813..354fe5d6bce 100644 --- a/thrust/thrust/system/cuda/detail/per_device_resource.h +++ b/thrust/thrust/system/cuda/detail/per_device_resource.h @@ -28,6 +28,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/system/cuda/detail/reduce.h b/thrust/thrust/system/cuda/detail/reduce.h index 41d9075da75..3258064ddef 100644 --- a/thrust/thrust/system/cuda/detail/reduce.h +++ b/thrust/thrust/system/cuda/detail/reduce.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/reduce_by_key.h b/thrust/thrust/system/cuda/detail/reduce_by_key.h index 2933d062acd..bcb5ad60fc8 100644 --- a/thrust/thrust/system/cuda/detail/reduce_by_key.h +++ b/thrust/thrust/system/cuda/detail/reduce_by_key.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/remove.h b/thrust/thrust/system/cuda/detail/remove.h index 836d8f5eab6..7d8d85b328d 100644 --- a/thrust/thrust/system/cuda/detail/remove.h +++ b/thrust/thrust/system/cuda/detail/remove.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include @@ -35,7 +41,7 @@ THRUST_NAMESPACE_BEGIN namespace cuda_cub { // in-place - + template +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/reverse.h b/thrust/thrust/system/cuda/detail/reverse.h index 7c4cb867e32..9f4f831c283 100644 --- a/thrust/thrust/system/cuda/detail/reverse.h +++ b/thrust/thrust/system/cuda/detail/reverse.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/scan.h b/thrust/thrust/system/cuda/detail/scan.h index fdab8df8447..e2f97a07203 100644 --- a/thrust/thrust/system/cuda/detail/scan.h +++ b/thrust/thrust/system/cuda/detail/scan.h @@ -28,9 +28,14 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC -#include #include #include #include diff --git a/thrust/thrust/system/cuda/detail/scan_by_key.h b/thrust/thrust/system/cuda/detail/scan_by_key.h index 0407779c6e0..c358bf2e232 100644 --- a/thrust/thrust/system/cuda/detail/scan_by_key.h +++ b/thrust/thrust/system/cuda/detail/scan_by_key.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/scatter.h b/thrust/thrust/system/cuda/detail/scatter.h index e297d782d71..84f5afe0bff 100644 --- a/thrust/thrust/system/cuda/detail/scatter.h +++ b/thrust/thrust/system/cuda/detail/scatter.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/sequence.h b/thrust/thrust/system/cuda/detail/sequence.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/cuda/detail/sequence.h +++ b/thrust/thrust/system/cuda/detail/sequence.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/cuda/detail/set_operations.h b/thrust/thrust/system/cuda/detail/set_operations.h index 98bb4bb5d69..e6b868c6d51 100644 --- a/thrust/thrust/system/cuda/detail/set_operations.h +++ b/thrust/thrust/system/cuda/detail/set_operations.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/sort.h b/thrust/thrust/system/cuda/detail/sort.h index db4c211b377..ddb0cf66344 100644 --- a/thrust/thrust/system/cuda/detail/sort.h +++ b/thrust/thrust/system/cuda/detail/sort.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/swap_ranges.h b/thrust/thrust/system/cuda/detail/swap_ranges.h index 8f9e4fa8aaf..bbf51789c60 100644 --- a/thrust/thrust/system/cuda/detail/swap_ranges.h +++ b/thrust/thrust/system/cuda/detail/swap_ranges.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/tabulate.h b/thrust/thrust/system/cuda/detail/tabulate.h index 67edb8574d4..562f7037706 100644 --- a/thrust/thrust/system/cuda/detail/tabulate.h +++ b/thrust/thrust/system/cuda/detail/tabulate.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/temporary_buffer.h b/thrust/thrust/system/cuda/detail/temporary_buffer.h index 6b527614162..1daf6c04a34 100644 --- a/thrust/thrust/system/cuda/detail/temporary_buffer.h +++ b/thrust/thrust/system/cuda/detail/temporary_buffer.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special temporary buffer functions diff --git a/thrust/thrust/system/cuda/detail/terminate.h b/thrust/thrust/system/cuda/detail/terminate.h index 226c9d5ac2a..2a7ebc43153 100644 --- a/thrust/thrust/system/cuda/detail/terminate.h +++ b/thrust/thrust/system/cuda/detail/terminate.h @@ -28,6 +28,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/cuda/detail/transform.h b/thrust/thrust/system/cuda/detail/transform.h index 3cf171a4724..473a0ba0989 100644 --- a/thrust/thrust/system/cuda/detail/transform.h +++ b/thrust/thrust/system/cuda/detail/transform.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/transform_reduce.h b/thrust/thrust/system/cuda/detail/transform_reduce.h index 60efaae5a55..c0c96b2c594 100644 --- a/thrust/thrust/system/cuda/detail/transform_reduce.h +++ b/thrust/thrust/system/cuda/detail/transform_reduce.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/transform_scan.h b/thrust/thrust/system/cuda/detail/transform_scan.h index 8f14ca8f7f2..fd76a84e795 100644 --- a/thrust/thrust/system/cuda/detail/transform_scan.h +++ b/thrust/thrust/system/cuda/detail/transform_scan.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/uninitialized_copy.h b/thrust/thrust/system/cuda/detail/uninitialized_copy.h index f21b7c0d62f..3fa8940b627 100644 --- a/thrust/thrust/system/cuda/detail/uninitialized_copy.h +++ b/thrust/thrust/system/cuda/detail/uninitialized_copy.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/uninitialized_fill.h b/thrust/thrust/system/cuda/detail/uninitialized_fill.h index 96b9702016b..368349db104 100644 --- a/thrust/thrust/system/cuda/detail/uninitialized_fill.h +++ b/thrust/thrust/system/cuda/detail/uninitialized_fill.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include #include diff --git a/thrust/thrust/system/cuda/detail/unique.h b/thrust/thrust/system/cuda/detail/unique.h index 653ffa79ab6..aba3a4dc2a9 100644 --- a/thrust/thrust/system/cuda/detail/unique.h +++ b/thrust/thrust/system/cuda/detail/unique.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include @@ -788,7 +794,7 @@ struct zip_adj_not_predicate { bool __host__ __device__ operator()(TupleType&& tuple) { return !binary_pred(thrust::get<0>(tuple), thrust::get<1>(tuple)); } - + BinaryPred binary_pred; }; diff --git a/thrust/thrust/system/cuda/detail/unique_by_key.h b/thrust/thrust/system/cuda/detail/unique_by_key.h index d5ce8e786f8..f0f7ed93c26 100644 --- a/thrust/thrust/system/cuda/detail/unique_by_key.h +++ b/thrust/thrust/system/cuda/detail/unique_by_key.h @@ -28,6 +28,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC #include diff --git a/thrust/thrust/system/cuda/detail/util.h b/thrust/thrust/system/cuda/detail/util.h index 6d9e3681d8c..c610629af26 100644 --- a/thrust/thrust/system/cuda/detail/util.h +++ b/thrust/thrust/system/cuda/detail/util.h @@ -26,16 +26,23 @@ ******************************************************************************/ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include #include #include #include #include #include -#include +#include #include #include @@ -318,7 +325,7 @@ struct transform_input_iterator_t // UnaryOp might not be copy assignable, such as when it is a lambda. Define // an explicit copy assignment operator that doesn't try to assign it. - __host__ __device__ + __host__ __device__ self_t& operator=(const self_t& o) { input = o.input; diff --git a/thrust/thrust/system/cuda/error.h b/thrust/thrust/system/cuda/error.h index b180f8347e0..5b1d764b27f 100644 --- a/thrust/thrust/system/cuda/error.h +++ b/thrust/thrust/system/cuda/error.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/cuda/execution_policy.h b/thrust/thrust/system/cuda/execution_policy.h index c171ac3d969..f1cea2c80b9 100644 --- a/thrust/thrust/system/cuda/execution_policy.h +++ b/thrust/thrust/system/cuda/execution_policy.h @@ -27,5 +27,11 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/cuda/future.h b/thrust/thrust/system/cuda/future.h index 79bfc9134d4..c37f4851c22 100644 --- a/thrust/thrust/system/cuda/future.h +++ b/thrust/thrust/system/cuda/future.h @@ -6,6 +6,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2014 @@ -52,14 +58,14 @@ using thrust::system::cuda::when_all; } // namespace cuda template -__host__ +__host__ thrust::cuda::unique_eager_event unique_eager_event_type( thrust::cuda::execution_policy const& ) noexcept; template -__host__ +__host__ thrust::cuda::unique_eager_future unique_eager_future_type( thrust::cuda::execution_policy const& diff --git a/thrust/thrust/system/cuda/memory.h b/thrust/thrust/system/cuda/memory.h index eb8020adb9e..da0708b012f 100644 --- a/thrust/thrust/system/cuda/memory.h +++ b/thrust/thrust/system/cuda/memory.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/cuda/memory_resource.h b/thrust/thrust/system/cuda/memory_resource.h index 4bf534e401e..68af96b5084 100644 --- a/thrust/thrust/system/cuda/memory_resource.h +++ b/thrust/thrust/system/cuda/memory_resource.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/system/cuda/pointer.h b/thrust/thrust/system/cuda/pointer.h index ace77fbaef4..793751cb040 100644 --- a/thrust/thrust/system/cuda/pointer.h +++ b/thrust/thrust/system/cuda/pointer.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/cuda/vector.h b/thrust/thrust/system/cuda/vector.h index fafc7bf17e3..ed6114aadab 100644 --- a/thrust/thrust/system/cuda/vector.h +++ b/thrust/thrust/system/cuda/vector.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/adl/adjacent_difference.h b/thrust/thrust/system/detail/adl/adjacent_difference.h index c6f6c72820a..980dc4fce48 100644 --- a/thrust/thrust/system/detail/adl/adjacent_difference.h +++ b/thrust/thrust/system/detail/adl/adjacent_difference.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the adjacent_difference.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch adjacent_difference diff --git a/thrust/thrust/system/detail/adl/assign_value.h b/thrust/thrust/system/detail/adl/assign_value.h index d38934affd1..c2a9cda7f78 100644 --- a/thrust/thrust/system/detail/adl/assign_value.h +++ b/thrust/thrust/system/detail/adl/assign_value.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the assign_value.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch assign_value diff --git a/thrust/thrust/system/detail/adl/async/copy.h b/thrust/thrust/system/detail/adl/async/copy.h index 72debb3b667..b9d6a335f91 100644 --- a/thrust/thrust/system/detail/adl/async/copy.h +++ b/thrust/thrust/system/detail/adl/async/copy.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + //#include //#define __THRUST_HOST_SYSTEM_ASYNC_COPY_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/async/copy.h> diff --git a/thrust/thrust/system/detail/adl/async/for_each.h b/thrust/thrust/system/detail/adl/async/for_each.h index 08347f65927..e0e71ea8a36 100644 --- a/thrust/thrust/system/detail/adl/async/for_each.h +++ b/thrust/thrust/system/detail/adl/async/for_each.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + //#include //#define __THRUST_HOST_SYSTEM_ASYNC_FOR_EACH_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/async/for_each.h> diff --git a/thrust/thrust/system/detail/adl/async/reduce.h b/thrust/thrust/system/detail/adl/async/reduce.h index f13ab02fdca..0e157cb7970 100644 --- a/thrust/thrust/system/detail/adl/async/reduce.h +++ b/thrust/thrust/system/detail/adl/async/reduce.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + //#include //#define __THRUST_HOST_SYSTEM_ASYNC_REDUCE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/async/reduce.h> diff --git a/thrust/thrust/system/detail/adl/async/scan.h b/thrust/thrust/system/detail/adl/async/scan.h index a2a90618b48..ac60330e1c7 100644 --- a/thrust/thrust/system/detail/adl/async/scan.h +++ b/thrust/thrust/system/detail/adl/async/scan.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + //#include //#define __THRUST_HOST_SYSTEM_ASYNC_SCAN_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/async/scan.h> diff --git a/thrust/thrust/system/detail/adl/async/sort.h b/thrust/thrust/system/detail/adl/async/sort.h index c3a83ad404f..8f07711e6b7 100644 --- a/thrust/thrust/system/detail/adl/async/sort.h +++ b/thrust/thrust/system/detail/adl/async/sort.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + //#include //#define __THRUST_HOST_SYSTEM_ASYNC_SORT_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/async/sort.h> diff --git a/thrust/thrust/system/detail/adl/async/transform.h b/thrust/thrust/system/detail/adl/async/transform.h index abb2163ead0..7dc39b0eba0 100644 --- a/thrust/thrust/system/detail/adl/async/transform.h +++ b/thrust/thrust/system/detail/adl/async/transform.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + //#include //#define __THRUST_HOST_SYSTEM_ASYNC_TRANSFORM_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/async/transform.h> diff --git a/thrust/thrust/system/detail/adl/binary_search.h b/thrust/thrust/system/detail/adl/binary_search.h index 2f9ac06df9b..a8149753f5c 100644 --- a/thrust/thrust/system/detail/adl/binary_search.h +++ b/thrust/thrust/system/detail/adl/binary_search.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the binary_search.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch binary_search diff --git a/thrust/thrust/system/detail/adl/copy.h b/thrust/thrust/system/detail/adl/copy.h index 0035b83efee..e103a6ed333 100644 --- a/thrust/thrust/system/detail/adl/copy.h +++ b/thrust/thrust/system/detail/adl/copy.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the copy.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch copy diff --git a/thrust/thrust/system/detail/adl/copy_if.h b/thrust/thrust/system/detail/adl/copy_if.h index 31adaf8e1a7..efec0cb9445 100644 --- a/thrust/thrust/system/detail/adl/copy_if.h +++ b/thrust/thrust/system/detail/adl/copy_if.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the copy_if.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch copy_if diff --git a/thrust/thrust/system/detail/adl/count.h b/thrust/thrust/system/detail/adl/count.h index 5d6f1f748ff..60dbab4f29c 100644 --- a/thrust/thrust/system/detail/adl/count.h +++ b/thrust/thrust/system/detail/adl/count.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the count.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch count diff --git a/thrust/thrust/system/detail/adl/equal.h b/thrust/thrust/system/detail/adl/equal.h index 6b02e33b857..3f5bb54b1c0 100644 --- a/thrust/thrust/system/detail/adl/equal.h +++ b/thrust/thrust/system/detail/adl/equal.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the equal.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch equal diff --git a/thrust/thrust/system/detail/adl/extrema.h b/thrust/thrust/system/detail/adl/extrema.h index 62fb39be922..ad4ae3b5a61 100644 --- a/thrust/thrust/system/detail/adl/extrema.h +++ b/thrust/thrust/system/detail/adl/extrema.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the extrema.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch extrema diff --git a/thrust/thrust/system/detail/adl/fill.h b/thrust/thrust/system/detail/adl/fill.h index f76a81b4f34..adfce5a49d5 100644 --- a/thrust/thrust/system/detail/adl/fill.h +++ b/thrust/thrust/system/detail/adl/fill.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the fill.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch fill diff --git a/thrust/thrust/system/detail/adl/find.h b/thrust/thrust/system/detail/adl/find.h index 8d85e09a3ab..1b8543aaaa8 100644 --- a/thrust/thrust/system/detail/adl/find.h +++ b/thrust/thrust/system/detail/adl/find.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the find.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch find diff --git a/thrust/thrust/system/detail/adl/for_each.h b/thrust/thrust/system/detail/adl/for_each.h index 8509edca363..3a9e3adf735 100644 --- a/thrust/thrust/system/detail/adl/for_each.h +++ b/thrust/thrust/system/detail/adl/for_each.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the for_each.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch for_each diff --git a/thrust/thrust/system/detail/adl/gather.h b/thrust/thrust/system/detail/adl/gather.h index 242da3c9095..82ac687ca64 100644 --- a/thrust/thrust/system/detail/adl/gather.h +++ b/thrust/thrust/system/detail/adl/gather.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the gather.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch gather diff --git a/thrust/thrust/system/detail/adl/generate.h b/thrust/thrust/system/detail/adl/generate.h index 5b1d7b4bac5..47dbad27455 100644 --- a/thrust/thrust/system/detail/adl/generate.h +++ b/thrust/thrust/system/detail/adl/generate.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the generate.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch generate diff --git a/thrust/thrust/system/detail/adl/get_value.h b/thrust/thrust/system/detail/adl/get_value.h index 306eb423eb4..4817055baa9 100644 --- a/thrust/thrust/system/detail/adl/get_value.h +++ b/thrust/thrust/system/detail/adl/get_value.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the get_value.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch get_value diff --git a/thrust/thrust/system/detail/adl/inner_product.h b/thrust/thrust/system/detail/adl/inner_product.h index 9423b1bdbf1..ff4756bc5af 100644 --- a/thrust/thrust/system/detail/adl/inner_product.h +++ b/thrust/thrust/system/detail/adl/inner_product.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the inner_product.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch inner_product diff --git a/thrust/thrust/system/detail/adl/iter_swap.h b/thrust/thrust/system/detail/adl/iter_swap.h index d9da52a6274..8bf4f87f123 100644 --- a/thrust/thrust/system/detail/adl/iter_swap.h +++ b/thrust/thrust/system/detail/adl/iter_swap.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the iter_swap.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch iter_swap diff --git a/thrust/thrust/system/detail/adl/logical.h b/thrust/thrust/system/detail/adl/logical.h index bdaad4d293a..9bbdaac40fb 100644 --- a/thrust/thrust/system/detail/adl/logical.h +++ b/thrust/thrust/system/detail/adl/logical.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the logical.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch logical diff --git a/thrust/thrust/system/detail/adl/malloc_and_free.h b/thrust/thrust/system/detail/adl/malloc_and_free.h index c36db0270dd..9234da85e18 100644 --- a/thrust/thrust/system/detail/adl/malloc_and_free.h +++ b/thrust/thrust/system/detail/adl/malloc_and_free.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the malloc_and_free.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch malloc_and_free diff --git a/thrust/thrust/system/detail/adl/merge.h b/thrust/thrust/system/detail/adl/merge.h index 7abca9bcf3f..7974823c9fe 100644 --- a/thrust/thrust/system/detail/adl/merge.h +++ b/thrust/thrust/system/detail/adl/merge.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the merge.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch merge diff --git a/thrust/thrust/system/detail/adl/mismatch.h b/thrust/thrust/system/detail/adl/mismatch.h index 74feb826928..1313425eaf0 100644 --- a/thrust/thrust/system/detail/adl/mismatch.h +++ b/thrust/thrust/system/detail/adl/mismatch.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the mismatch.h header // of the host and device systems. It should be #included in any // code which uses adl to dispatch mismatch diff --git a/thrust/thrust/system/detail/adl/partition.h b/thrust/thrust/system/detail/adl/partition.h index a45f845a5c6..60d2d8de2f3 100644 --- a/thrust/thrust/system/detail/adl/partition.h +++ b/thrust/thrust/system/detail/adl/partition.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the partition.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch partition diff --git a/thrust/thrust/system/detail/adl/per_device_resource.h b/thrust/thrust/system/detail/adl/per_device_resource.h index 721f49e03fd..afc5df0031b 100644 --- a/thrust/thrust/system/detail/adl/per_device_resource.h +++ b/thrust/thrust/system/detail/adl/per_device_resource.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the per_device_resource.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch per_device_resource diff --git a/thrust/thrust/system/detail/adl/reduce.h b/thrust/thrust/system/detail/adl/reduce.h index 8a9673b3f95..ce86610ebbc 100644 --- a/thrust/thrust/system/detail/adl/reduce.h +++ b/thrust/thrust/system/detail/adl/reduce.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the reduce.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch reduce diff --git a/thrust/thrust/system/detail/adl/reduce_by_key.h b/thrust/thrust/system/detail/adl/reduce_by_key.h index 0605f9befaf..49afe209f44 100644 --- a/thrust/thrust/system/detail/adl/reduce_by_key.h +++ b/thrust/thrust/system/detail/adl/reduce_by_key.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the reduce_by_key.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch reduce_by_key diff --git a/thrust/thrust/system/detail/adl/remove.h b/thrust/thrust/system/detail/adl/remove.h index c281379d54e..ba14b96bd4f 100644 --- a/thrust/thrust/system/detail/adl/remove.h +++ b/thrust/thrust/system/detail/adl/remove.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the remove.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch remove diff --git a/thrust/thrust/system/detail/adl/replace.h b/thrust/thrust/system/detail/adl/replace.h index d8fb5746f1c..c2efd40e80a 100644 --- a/thrust/thrust/system/detail/adl/replace.h +++ b/thrust/thrust/system/detail/adl/replace.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the replace.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch replace diff --git a/thrust/thrust/system/detail/adl/reverse.h b/thrust/thrust/system/detail/adl/reverse.h index f6bd8947ee4..f0a4972c648 100644 --- a/thrust/thrust/system/detail/adl/reverse.h +++ b/thrust/thrust/system/detail/adl/reverse.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the reverse.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch reverse diff --git a/thrust/thrust/system/detail/adl/scan.h b/thrust/thrust/system/detail/adl/scan.h index a2491041058..904e9c4f9ce 100644 --- a/thrust/thrust/system/detail/adl/scan.h +++ b/thrust/thrust/system/detail/adl/scan.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the scan.h header // of the host and device systems. It should be #included in any // code which uses adl to dispatch scan diff --git a/thrust/thrust/system/detail/adl/scan_by_key.h b/thrust/thrust/system/detail/adl/scan_by_key.h index 94f73503cac..bb4f9d4af76 100644 --- a/thrust/thrust/system/detail/adl/scan_by_key.h +++ b/thrust/thrust/system/detail/adl/scan_by_key.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the scan_by_key.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch scan_by_key diff --git a/thrust/thrust/system/detail/adl/scatter.h b/thrust/thrust/system/detail/adl/scatter.h index d9f42b28b13..d562fbec037 100644 --- a/thrust/thrust/system/detail/adl/scatter.h +++ b/thrust/thrust/system/detail/adl/scatter.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the scatter.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch scatter diff --git a/thrust/thrust/system/detail/adl/sequence.h b/thrust/thrust/system/detail/adl/sequence.h index d3c2a20f47e..4e364a84db2 100644 --- a/thrust/thrust/system/detail/adl/sequence.h +++ b/thrust/thrust/system/detail/adl/sequence.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the sequence.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch sequence diff --git a/thrust/thrust/system/detail/adl/set_operations.h b/thrust/thrust/system/detail/adl/set_operations.h index 7d09355e12a..dae16bd3714 100644 --- a/thrust/thrust/system/detail/adl/set_operations.h +++ b/thrust/thrust/system/detail/adl/set_operations.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the set_operations.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch set_operations diff --git a/thrust/thrust/system/detail/adl/sort.h b/thrust/thrust/system/detail/adl/sort.h index 1f6118c90bf..d0687f311b6 100644 --- a/thrust/thrust/system/detail/adl/sort.h +++ b/thrust/thrust/system/detail/adl/sort.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the sort.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch sort diff --git a/thrust/thrust/system/detail/adl/swap_ranges.h b/thrust/thrust/system/detail/adl/swap_ranges.h index 1ca3719d96c..af2393b8125 100644 --- a/thrust/thrust/system/detail/adl/swap_ranges.h +++ b/thrust/thrust/system/detail/adl/swap_ranges.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the swap_ranges.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch swap_ranges diff --git a/thrust/thrust/system/detail/adl/tabulate.h b/thrust/thrust/system/detail/adl/tabulate.h index 6ae2b22a5cb..ba9a013ac7a 100644 --- a/thrust/thrust/system/detail/adl/tabulate.h +++ b/thrust/thrust/system/detail/adl/tabulate.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the tabulate.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch tabulate diff --git a/thrust/thrust/system/detail/adl/temporary_buffer.h b/thrust/thrust/system/detail/adl/temporary_buffer.h index 0cada5ee4b1..e916fe63d8f 100644 --- a/thrust/thrust/system/detail/adl/temporary_buffer.h +++ b/thrust/thrust/system/detail/adl/temporary_buffer.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the temporary_buffer.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch get_temporary_buffer or return_temporary_buffer diff --git a/thrust/thrust/system/detail/adl/transform.h b/thrust/thrust/system/detail/adl/transform.h index b70333093fd..a3e0757cc7c 100644 --- a/thrust/thrust/system/detail/adl/transform.h +++ b/thrust/thrust/system/detail/adl/transform.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the transform.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch transform diff --git a/thrust/thrust/system/detail/adl/transform_reduce.h b/thrust/thrust/system/detail/adl/transform_reduce.h index e3f9494dfa6..45483fea753 100644 --- a/thrust/thrust/system/detail/adl/transform_reduce.h +++ b/thrust/thrust/system/detail/adl/transform_reduce.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the transform_reduce.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch transform_reduce diff --git a/thrust/thrust/system/detail/adl/transform_scan.h b/thrust/thrust/system/detail/adl/transform_scan.h index 3a05c7eeed9..972d46c723a 100644 --- a/thrust/thrust/system/detail/adl/transform_scan.h +++ b/thrust/thrust/system/detail/adl/transform_scan.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the transform_scan.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch transform_scan diff --git a/thrust/thrust/system/detail/adl/uninitialized_copy.h b/thrust/thrust/system/detail/adl/uninitialized_copy.h index a13b18aa8d7..f31e4b2c66d 100644 --- a/thrust/thrust/system/detail/adl/uninitialized_copy.h +++ b/thrust/thrust/system/detail/adl/uninitialized_copy.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the uninitialized_copy.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch uninitialized_copy diff --git a/thrust/thrust/system/detail/adl/uninitialized_fill.h b/thrust/thrust/system/detail/adl/uninitialized_fill.h index 98b57836e12..bd98e450f46 100644 --- a/thrust/thrust/system/detail/adl/uninitialized_fill.h +++ b/thrust/thrust/system/detail/adl/uninitialized_fill.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the uninitialized_fill.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch uninitialized_fill diff --git a/thrust/thrust/system/detail/adl/unique.h b/thrust/thrust/system/detail/adl/unique.h index 4082f529926..d866ad04a49 100644 --- a/thrust/thrust/system/detail/adl/unique.h +++ b/thrust/thrust/system/detail/adl/unique.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the unique.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch unique diff --git a/thrust/thrust/system/detail/adl/unique_by_key.h b/thrust/thrust/system/detail/adl/unique_by_key.h index dcf9acd42cd..d6e6020550a 100644 --- a/thrust/thrust/system/detail/adl/unique_by_key.h +++ b/thrust/thrust/system/detail/adl/unique_by_key.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // the purpose of this header is to #include the unique_by_key.h header // of the sequential, host, and device systems. It should be #included in any // code which uses adl to dispatch unique_by_key diff --git a/thrust/thrust/system/detail/bad_alloc.h b/thrust/thrust/system/detail/bad_alloc.h index ae5dd5994ef..32b1bf0a75f 100644 --- a/thrust/thrust/system/detail/bad_alloc.h +++ b/thrust/thrust/system/detail/bad_alloc.h @@ -17,11 +17,17 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include -#include - THRUST_NAMESPACE_BEGIN namespace system { @@ -51,7 +57,7 @@ class bad_alloc private: std::string m_what; }; // end bad_alloc - + } // end detail } // end system THRUST_NAMESPACE_END diff --git a/thrust/thrust/system/detail/errno.h b/thrust/thrust/system/detail/errno.h index 69cb2bd9806..8e29bf7cb6b 100644 --- a/thrust/thrust/system/detail/errno.h +++ b/thrust/thrust/system/detail/errno.h @@ -19,6 +19,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // The rationale for the existence of these apparently redundant definitions is // to provide them portably and to avoid bringing in system headers which might // pollute the global namespace. These identifiers are in lowercase to avoid diff --git a/thrust/thrust/system/detail/error_category.inl b/thrust/thrust/system/detail/error_category.inl index 45fd15a3fd5..68332dd3644 100644 --- a/thrust/thrust/system/detail/error_category.inl +++ b/thrust/thrust/system/detail/error_category.inl @@ -19,6 +19,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/system/detail/error_code.inl b/thrust/thrust/system/detail/error_code.inl index 2b819c0485e..16611bf1b5b 100644 --- a/thrust/thrust/system/detail/error_code.inl +++ b/thrust/thrust/system/detail/error_code.inl @@ -19,6 +19,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/error_condition.inl b/thrust/thrust/system/detail/error_condition.inl index 0daf1f2938b..903a4fc20b6 100644 --- a/thrust/thrust/system/detail/error_condition.inl +++ b/thrust/thrust/system/detail/error_condition.inl @@ -19,6 +19,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/system/detail/generic/adjacent_difference.h b/thrust/thrust/system/detail/generic/adjacent_difference.h index 43592e15b03..0e0b13d841c 100644 --- a/thrust/thrust/system/detail/generic/adjacent_difference.h +++ b/thrust/thrust/system/detail/generic/adjacent_difference.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/adjacent_difference.inl b/thrust/thrust/system/detail/generic/adjacent_difference.inl index 50412932888..1a6128cfa41 100644 --- a/thrust/thrust/system/detail/generic/adjacent_difference.inl +++ b/thrust/thrust/system/detail/generic/adjacent_difference.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/advance.h b/thrust/thrust/system/detail/generic/advance.h index 4d6562e00fa..cc298954174 100644 --- a/thrust/thrust/system/detail/generic/advance.h +++ b/thrust/thrust/system/detail/generic/advance.h @@ -19,6 +19,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace system { diff --git a/thrust/thrust/system/detail/generic/advance.inl b/thrust/thrust/system/detail/generic/advance.inl index 21555ebb03f..c2600cc56cc 100644 --- a/thrust/thrust/system/detail/generic/advance.inl +++ b/thrust/thrust/system/detail/generic/advance.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/generic/binary_search.h b/thrust/thrust/system/detail/generic/binary_search.h index 6603f6c302f..77a4ce73ea6 100644 --- a/thrust/thrust/system/detail/generic/binary_search.h +++ b/thrust/thrust/system/detail/generic/binary_search.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -35,7 +41,7 @@ namespace generic template __host__ __device__ -ForwardIterator lower_bound(thrust::execution_policy &exec, +ForwardIterator lower_bound(thrust::execution_policy &exec, ForwardIterator begin, ForwardIterator end, const T& value); @@ -45,7 +51,7 @@ __host__ __device__ ForwardIterator lower_bound(thrust::execution_policy &exec, ForwardIterator begin, ForwardIterator end, - const T& value, + const T& value, StrictWeakOrdering comp); @@ -58,10 +64,10 @@ ForwardIterator upper_bound(thrust::execution_policy &exec, template __host__ __device__ -ForwardIterator upper_bound(thrust::execution_policy &exec, +ForwardIterator upper_bound(thrust::execution_policy &exec, ForwardIterator begin, ForwardIterator end, - const T& value, + const T& value, StrictWeakOrdering comp); @@ -77,16 +83,16 @@ __host__ __device__ bool binary_search(thrust::execution_policy &exec, ForwardIterator begin, ForwardIterator end, - const T& value, + const T& value, StrictWeakOrdering comp); template __host__ __device__ OutputIterator lower_bound(thrust::execution_policy &exec, - ForwardIterator begin, + ForwardIterator begin, ForwardIterator end, - InputIterator values_begin, + InputIterator values_begin, InputIterator values_end, OutputIterator output); @@ -94,9 +100,9 @@ OutputIterator lower_bound(thrust::execution_policy &exec, template __host__ __device__ OutputIterator lower_bound(thrust::execution_policy &exec, - ForwardIterator begin, + ForwardIterator begin, ForwardIterator end, - InputIterator values_begin, + InputIterator values_begin, InputIterator values_end, OutputIterator output, StrictWeakOrdering comp); @@ -105,9 +111,9 @@ OutputIterator lower_bound(thrust::execution_policy &exec, template __host__ __device__ OutputIterator upper_bound(thrust::execution_policy &exec, - ForwardIterator begin, + ForwardIterator begin, ForwardIterator end, - InputIterator values_begin, + InputIterator values_begin, InputIterator values_end, OutputIterator output); @@ -115,9 +121,9 @@ OutputIterator upper_bound(thrust::execution_policy &exec, template __host__ __device__ OutputIterator upper_bound(thrust::execution_policy &exec, - ForwardIterator begin, + ForwardIterator begin, ForwardIterator end, - InputIterator values_begin, + InputIterator values_begin, InputIterator values_end, OutputIterator output, StrictWeakOrdering comp); @@ -126,9 +132,9 @@ OutputIterator upper_bound(thrust::execution_policy &exec, template __host__ __device__ OutputIterator binary_search(thrust::execution_policy &exec, - ForwardIterator begin, + ForwardIterator begin, ForwardIterator end, - InputIterator values_begin, + InputIterator values_begin, InputIterator values_end, OutputIterator output); @@ -136,9 +142,9 @@ OutputIterator binary_search(thrust::execution_policy &exec, template __host__ __device__ OutputIterator binary_search(thrust::execution_policy &exec, - ForwardIterator begin, + ForwardIterator begin, ForwardIterator end, - InputIterator values_begin, + InputIterator values_begin, InputIterator values_end, OutputIterator output, StrictWeakOrdering comp); diff --git a/thrust/thrust/system/detail/generic/binary_search.inl b/thrust/thrust/system/detail/generic/binary_search.inl index bc60bb8e502..391263eea08 100644 --- a/thrust/thrust/system/detail/generic/binary_search.inl +++ b/thrust/thrust/system/detail/generic/binary_search.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/copy.h b/thrust/thrust/system/detail/generic/copy.h index 36ac71899de..201a33489a3 100644 --- a/thrust/thrust/system/detail/generic/copy.h +++ b/thrust/thrust/system/detail/generic/copy.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/copy.inl b/thrust/thrust/system/detail/generic/copy.inl index 34d66baa6b2..57d040385e5 100644 --- a/thrust/thrust/system/detail/generic/copy.inl +++ b/thrust/thrust/system/detail/generic/copy.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/copy_if.h b/thrust/thrust/system/detail/generic/copy_if.h index 6a13edfdaf3..44105eb0140 100644 --- a/thrust/thrust/system/detail/generic/copy_if.h +++ b/thrust/thrust/system/detail/generic/copy_if.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/copy_if.inl b/thrust/thrust/system/detail/generic/copy_if.inl index 5a6edd72e18..5dbff9fff55 100644 --- a/thrust/thrust/system/detail/generic/copy_if.inl +++ b/thrust/thrust/system/detail/generic/copy_if.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -58,7 +64,7 @@ OutputIterator copy_if(thrust::execution_policy &exec, Predicate pred) { THRUST_DISABLE_MSVC_POSSIBLE_LOSS_OF_DATA_WARNING(IndexType n = thrust::distance(first, last)); - + // compute {0,1} predicates thrust::detail::temporary_array predicates(exec, n); thrust::transform(exec, @@ -66,7 +72,7 @@ OutputIterator copy_if(thrust::execution_policy &exec, stencil + n, predicates.begin(), thrust::detail::predicate_to_integral(pred)); - + // scan {0,1} predicates thrust::detail::temporary_array scatter_indices(exec, n); thrust::exclusive_scan(exec, @@ -75,7 +81,7 @@ OutputIterator copy_if(thrust::execution_policy &exec, scatter_indices.begin(), static_cast(0), thrust::plus()); - + // scatter the true elements thrust::scatter_if(exec, first, @@ -84,10 +90,10 @@ OutputIterator copy_if(thrust::execution_policy &exec, predicates.begin(), result, thrust::identity()); - + // find the end of the new sequence IndexType output_size = scatter_indices[n - 1] + predicates[n - 1]; - + return result + output_size; } @@ -128,17 +134,17 @@ __host__ __device__ Predicate pred) { typedef typename thrust::iterator_traits::difference_type difference_type; - + // empty sequence if(first == last) return result; - + difference_type n = thrust::distance(first, last); - + // create an unsigned version of n (we know n is positive from the comparison above) // to avoid a warning in the compare below typename thrust::detail::make_unsigned::type unsigned_n(n); - + // use 32-bit indices when possible (almost always) if(sizeof(difference_type) > sizeof(unsigned int) && unsigned_n > thrust::detail::integer_traits::const_max) { diff --git a/thrust/thrust/system/detail/generic/count.h b/thrust/thrust/system/detail/generic/count.h index 295d36e6b9d..80523a7dc1f 100644 --- a/thrust/thrust/system/detail/generic/count.h +++ b/thrust/thrust/system/detail/generic/count.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/count.inl b/thrust/thrust/system/detail/generic/count.inl index dafc1c1df2a..d1187a8d667 100644 --- a/thrust/thrust/system/detail/generic/count.inl +++ b/thrust/thrust/system/detail/generic/count.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/distance.h b/thrust/thrust/system/detail/generic/distance.h index 4627376b575..2d48211af10 100644 --- a/thrust/thrust/system/detail/generic/distance.h +++ b/thrust/thrust/system/detail/generic/distance.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/distance.inl b/thrust/thrust/system/detail/generic/distance.inl index 46bad7ba74e..7356946a033 100644 --- a/thrust/thrust/system/detail/generic/distance.inl +++ b/thrust/thrust/system/detail/generic/distance.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/generic/equal.h b/thrust/thrust/system/detail/generic/equal.h index 4afd88d001f..cbbd6ffb2e3 100644 --- a/thrust/thrust/system/detail/generic/equal.h +++ b/thrust/thrust/system/detail/generic/equal.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/equal.inl b/thrust/thrust/system/detail/generic/equal.inl index c023070cdcb..a9e318c5751 100644 --- a/thrust/thrust/system/detail/generic/equal.inl +++ b/thrust/thrust/system/detail/generic/equal.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/extrema.h b/thrust/thrust/system/detail/generic/extrema.h index e3b447958e0..88d1a859b0c 100644 --- a/thrust/thrust/system/detail/generic/extrema.h +++ b/thrust/thrust/system/detail/generic/extrema.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -67,14 +73,14 @@ ForwardIterator min_element(thrust::execution_policy &exec, template __host__ __device__ thrust::pair minmax_element(thrust::execution_policy &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last); template __host__ __device__ thrust::pair minmax_element(thrust::execution_policy &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, BinaryPredicate comp); diff --git a/thrust/thrust/system/detail/generic/extrema.inl b/thrust/thrust/system/detail/generic/extrema.inl index 744d137de1d..a98ce903ce2 100644 --- a/thrust/thrust/system/detail/generic/extrema.inl +++ b/thrust/thrust/system/detail/generic/extrema.inl @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -49,19 +55,19 @@ namespace detail ////////////// // -// return the smaller/larger element making sure to prefer the +// return the smaller/larger element making sure to prefer the // first occurance of the minimum/maximum element template struct min_element_reduction { BinaryPredicate comp; - __host__ __device__ + __host__ __device__ min_element_reduction(BinaryPredicate comp) : comp(comp){} - __host__ __device__ + __host__ __device__ thrust::tuple - operator()(const thrust::tuple& lhs, + operator()(const thrust::tuple& lhs, const thrust::tuple& rhs ) { if(comp(thrust::get<0>(lhs), thrust::get<0>(rhs))) @@ -83,12 +89,12 @@ struct max_element_reduction { BinaryPredicate comp; - __host__ __device__ + __host__ __device__ max_element_reduction(BinaryPredicate comp) : comp(comp){} - __host__ __device__ + __host__ __device__ thrust::tuple - operator()(const thrust::tuple& lhs, + operator()(const thrust::tuple& lhs, const thrust::tuple& rhs ) { if(comp(thrust::get<0>(lhs), thrust::get<0>(rhs))) @@ -105,7 +111,7 @@ struct max_element_reduction }; // end max_element_reduction -// return the smaller & larger element making sure to prefer the +// return the smaller & larger element making sure to prefer the // first occurance of the minimum/maximum element template struct minmax_element_reduction @@ -115,9 +121,9 @@ struct minmax_element_reduction __host__ __device__ minmax_element_reduction(BinaryPredicate comp) : comp(comp){} - __host__ __device__ + __host__ __device__ thrust::tuple< thrust::tuple, thrust::tuple > - operator()(const thrust::tuple< thrust::tuple, thrust::tuple >& lhs, + operator()(const thrust::tuple< thrust::tuple, thrust::tuple >& lhs, const thrust::tuple< thrust::tuple, thrust::tuple >& rhs ) { @@ -130,7 +136,7 @@ struct minmax_element_reduction template struct duplicate_tuple { - __host__ __device__ + __host__ __device__ thrust::tuple< thrust::tuple, thrust::tuple > operator()(const thrust::tuple& t) { @@ -219,7 +225,7 @@ ForwardIterator max_element(thrust::execution_policy &exec, template __host__ __device__ thrust::pair minmax_element(thrust::execution_policy &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last) { typedef typename thrust::iterator_value::type value_type; @@ -231,7 +237,7 @@ thrust::pair minmax_element(thrust::execution_p template __host__ __device__ thrust::pair minmax_element(thrust::execution_policy &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, BinaryPredicate comp) { @@ -241,7 +247,7 @@ thrust::pair minmax_element(thrust::execution_p typedef typename thrust::iterator_traits::value_type InputType; typedef typename thrust::iterator_traits::difference_type IndexType; - thrust::tuple< thrust::tuple, thrust::tuple > result = + thrust::tuple< thrust::tuple, thrust::tuple > result = thrust::transform_reduce (exec, thrust::make_zip_iterator(thrust::make_tuple(first, thrust::counting_iterator(0))), diff --git a/thrust/thrust/system/detail/generic/fill.h b/thrust/thrust/system/detail/generic/fill.h index 5a881359b56..95179d287e1 100644 --- a/thrust/thrust/system/detail/generic/fill.h +++ b/thrust/thrust/system/detail/generic/fill.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/system/detail/generic/find.h b/thrust/thrust/system/detail/generic/find.h index 6db441d02f7..5825fe11530 100644 --- a/thrust/thrust/system/detail/generic/find.h +++ b/thrust/thrust/system/detail/generic/find.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/find.inl b/thrust/thrust/system/detail/generic/find.inl index 8bd619561e9..c0077e9c70a 100644 --- a/thrust/thrust/system/detail/generic/find.inl +++ b/thrust/thrust/system/detail/generic/find.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/generic/for_each.h b/thrust/thrust/system/detail/generic/for_each.h index 3c2ec12cd21..d650ee20b00 100644 --- a/thrust/thrust/system/detail/generic/for_each.h +++ b/thrust/thrust/system/detail/generic/for_each.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/gather.h b/thrust/thrust/system/detail/generic/gather.h index 5b6b4183113..c8d94c9514f 100644 --- a/thrust/thrust/system/detail/generic/gather.h +++ b/thrust/thrust/system/detail/generic/gather.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/gather.inl b/thrust/thrust/system/detail/generic/gather.inl index 7ab550edf14..d8d897302fe 100644 --- a/thrust/thrust/system/detail/generic/gather.inl +++ b/thrust/thrust/system/detail/generic/gather.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/generate.h b/thrust/thrust/system/detail/generic/generate.h index a9846c5bed6..8806f4c4bc8 100644 --- a/thrust/thrust/system/detail/generic/generate.h +++ b/thrust/thrust/system/detail/generic/generate.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/generate.inl b/thrust/thrust/system/detail/generic/generate.inl index 869e0f32bf4..7c6a949e913 100644 --- a/thrust/thrust/system/detail/generic/generate.inl +++ b/thrust/thrust/system/detail/generic/generate.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/inner_product.h b/thrust/thrust/system/detail/generic/inner_product.h index 62d10d31f58..92c4915a548 100644 --- a/thrust/thrust/system/detail/generic/inner_product.h +++ b/thrust/thrust/system/detail/generic/inner_product.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -44,7 +50,7 @@ OutputType inner_product(thrust::execution_policy &exec, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, - OutputType init, + OutputType init, BinaryFunction1 binary_op1, BinaryFunction2 binary_op2); diff --git a/thrust/thrust/system/detail/generic/inner_product.inl b/thrust/thrust/system/detail/generic/inner_product.inl index 5055ec10f66..92246ae46e9 100644 --- a/thrust/thrust/system/detail/generic/inner_product.inl +++ b/thrust/thrust/system/detail/generic/inner_product.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/logical.h b/thrust/thrust/system/detail/generic/logical.h index e261154e248..ab74f97126b 100644 --- a/thrust/thrust/system/detail/generic/logical.h +++ b/thrust/thrust/system/detail/generic/logical.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/memory.h b/thrust/thrust/system/detail/generic/memory.h index 675cc73023c..69a0598e764 100644 --- a/thrust/thrust/system/detail/generic/memory.h +++ b/thrust/thrust/system/detail/generic/memory.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/memory.inl b/thrust/thrust/system/detail/generic/memory.inl index b857290985c..8b4b4a120e8 100644 --- a/thrust/thrust/system/detail/generic/memory.inl +++ b/thrust/thrust/system/detail/generic/memory.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/merge.h b/thrust/thrust/system/detail/generic/merge.h index 6e82464074e..83a64187ebc 100644 --- a/thrust/thrust/system/detail/generic/merge.h +++ b/thrust/thrust/system/detail/generic/merge.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/merge.inl b/thrust/thrust/system/detail/generic/merge.inl index 03b77e6235b..18dd9f0323e 100644 --- a/thrust/thrust/system/detail/generic/merge.inl +++ b/thrust/thrust/system/detail/generic/merge.inl @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/mismatch.h b/thrust/thrust/system/detail/generic/mismatch.h index 4a71cd34414..aff424d0d04 100644 --- a/thrust/thrust/system/detail/generic/mismatch.h +++ b/thrust/thrust/system/detail/generic/mismatch.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/mismatch.inl b/thrust/thrust/system/detail/generic/mismatch.inl index f6b9674a1cc..717d576e2cd 100644 --- a/thrust/thrust/system/detail/generic/mismatch.inl +++ b/thrust/thrust/system/detail/generic/mismatch.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/partition.h b/thrust/thrust/system/detail/generic/partition.h index 113d6ecbc3d..6b216dac154 100644 --- a/thrust/thrust/system/detail/generic/partition.h +++ b/thrust/thrust/system/detail/generic/partition.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/partition.inl b/thrust/thrust/system/detail/generic/partition.inl index ab56fdd5751..0a835fcedbd 100644 --- a/thrust/thrust/system/detail/generic/partition.inl +++ b/thrust/thrust/system/detail/generic/partition.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/per_device_resource.h b/thrust/thrust/system/detail/generic/per_device_resource.h index 606f91f3658..1565fee9c1f 100644 --- a/thrust/thrust/system/detail/generic/per_device_resource.h +++ b/thrust/thrust/system/detail/generic/per_device_resource.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/reduce.h b/thrust/thrust/system/detail/generic/reduce.h index f28b11a87bb..54c415aa265 100644 --- a/thrust/thrust/system/detail/generic/reduce.h +++ b/thrust/thrust/system/detail/generic/reduce.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/generic/reduce.inl b/thrust/thrust/system/detail/generic/reduce.inl index d673d0cf882..bfc478ed55a 100644 --- a/thrust/thrust/system/detail/generic/reduce.inl +++ b/thrust/thrust/system/detail/generic/reduce.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/system/detail/generic/reduce_by_key.h b/thrust/thrust/system/detail/generic/reduce_by_key.h index 8ba47e11f0a..00abf0c85bf 100644 --- a/thrust/thrust/system/detail/generic/reduce_by_key.h +++ b/thrust/thrust/system/detail/generic/reduce_by_key.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -38,7 +44,7 @@ template reduce_by_key(thrust::execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -53,7 +59,7 @@ template reduce_by_key(thrust::execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -70,7 +76,7 @@ template reduce_by_key(thrust::execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, diff --git a/thrust/thrust/system/detail/generic/reduce_by_key.inl b/thrust/thrust/system/detail/generic/reduce_by_key.inl index 2ea73fedaa1..9ade5eaaec1 100644 --- a/thrust/thrust/system/detail/generic/reduce_by_key.inl +++ b/thrust/thrust/system/detail/generic/reduce_by_key.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/system/detail/generic/remove.h b/thrust/thrust/system/detail/generic/remove.h index 37354ef805c..2c9a8f9abae 100644 --- a/thrust/thrust/system/detail/generic/remove.h +++ b/thrust/thrust/system/detail/generic/remove.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/remove.inl b/thrust/thrust/system/detail/generic/remove.inl index e51a3caeee1..d71a2e2e0fb 100644 --- a/thrust/thrust/system/detail/generic/remove.inl +++ b/thrust/thrust/system/detail/generic/remove.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/replace.h b/thrust/thrust/system/detail/generic/replace.h index 0821d6c07db..a294f108a8b 100644 --- a/thrust/thrust/system/detail/generic/replace.h +++ b/thrust/thrust/system/detail/generic/replace.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/replace.inl b/thrust/thrust/system/detail/generic/replace.inl index ed845dd458c..d49f85cc078 100644 --- a/thrust/thrust/system/detail/generic/replace.inl +++ b/thrust/thrust/system/detail/generic/replace.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/reverse.h b/thrust/thrust/system/detail/generic/reverse.h index 65c77ae7502..3e8451a6cd1 100644 --- a/thrust/thrust/system/detail/generic/reverse.h +++ b/thrust/thrust/system/detail/generic/reverse.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/reverse.inl b/thrust/thrust/system/detail/generic/reverse.inl index 1ce6db38b98..2ee86fcba11 100644 --- a/thrust/thrust/system/detail/generic/reverse.inl +++ b/thrust/thrust/system/detail/generic/reverse.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/scalar/binary_search.h b/thrust/thrust/system/detail/generic/scalar/binary_search.h index 3e019c2233e..51842eb5103 100644 --- a/thrust/thrust/system/detail/generic/scalar/binary_search.h +++ b/thrust/thrust/system/detail/generic/scalar/binary_search.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/scalar/binary_search.inl b/thrust/thrust/system/detail/generic/scalar/binary_search.inl index 61c71fba4df..095a8a13a51 100644 --- a/thrust/thrust/system/detail/generic/scalar/binary_search.inl +++ b/thrust/thrust/system/detail/generic/scalar/binary_search.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/scan.h b/thrust/thrust/system/detail/generic/scan.h index 476441ab6f6..b96ab3462cb 100644 --- a/thrust/thrust/system/detail/generic/scan.h +++ b/thrust/thrust/system/detail/generic/scan.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -39,7 +45,7 @@ __host__ __device__ OutputIterator result); -// XXX it is an error to call this function; it has no implementation +// XXX it is an error to call this function; it has no implementation template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/scan_by_key.h b/thrust/thrust/system/detail/generic/scan_by_key.h index 9e38ac93392..eba28de7feb 100644 --- a/thrust/thrust/system/detail/generic/scan_by_key.h +++ b/thrust/thrust/system/detail/generic/scan_by_key.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/scan_by_key.inl b/thrust/thrust/system/detail/generic/scan_by_key.inl index 0e3100224a4..242c6852c9f 100644 --- a/thrust/thrust/system/detail/generic/scan_by_key.inl +++ b/thrust/thrust/system/detail/generic/scan_by_key.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/scatter.h b/thrust/thrust/system/detail/generic/scatter.h index 6bb7949efa4..00b89287b78 100644 --- a/thrust/thrust/system/detail/generic/scatter.h +++ b/thrust/thrust/system/detail/generic/scatter.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/scatter.inl b/thrust/thrust/system/detail/generic/scatter.inl index 5b479870897..0880a495d2b 100644 --- a/thrust/thrust/system/detail/generic/scatter.inl +++ b/thrust/thrust/system/detail/generic/scatter.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/select_system.h b/thrust/thrust/system/detail/generic/select_system.h index 7619b80e5ad..4d7657cf356 100644 --- a/thrust/thrust/system/detail/generic/select_system.h +++ b/thrust/thrust/system/detail/generic/select_system.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/select_system.inl b/thrust/thrust/system/detail/generic/select_system.inl index b69d17c4507..b793fca5e4e 100644 --- a/thrust/thrust/system/detail/generic/select_system.inl +++ b/thrust/thrust/system/detail/generic/select_system.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/select_system_exists.h b/thrust/thrust/system/detail/generic/select_system_exists.h index 29d05781d9e..1a6943f0730 100644 --- a/thrust/thrust/system/detail/generic/select_system_exists.h +++ b/thrust/thrust/system/detail/generic/select_system_exists.h @@ -23,6 +23,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN // forward declaration of any_system_tag for any_conversion below diff --git a/thrust/thrust/system/detail/generic/sequence.h b/thrust/thrust/system/detail/generic/sequence.h index 26bf17bb8ba..2fa79d9256b 100644 --- a/thrust/thrust/system/detail/generic/sequence.h +++ b/thrust/thrust/system/detail/generic/sequence.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/sequence.inl b/thrust/thrust/system/detail/generic/sequence.inl index 7d0c12de3c2..55f8e9e333c 100644 --- a/thrust/thrust/system/detail/generic/sequence.inl +++ b/thrust/thrust/system/detail/generic/sequence.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/set_operations.h b/thrust/thrust/system/detail/generic/set_operations.h index 37665d78dd9..7285876b54e 100644 --- a/thrust/thrust/system/detail/generic/set_operations.h +++ b/thrust/thrust/system/detail/generic/set_operations.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/generic/set_operations.inl b/thrust/thrust/system/detail/generic/set_operations.inl index 4363be5c0d8..61f9c0156b8 100644 --- a/thrust/thrust/system/detail/generic/set_operations.inl +++ b/thrust/thrust/system/detail/generic/set_operations.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/shuffle.h b/thrust/thrust/system/detail/generic/shuffle.h index 8f8e21afdf9..34aea081fb0 100644 --- a/thrust/thrust/system/detail/generic/shuffle.h +++ b/thrust/thrust/system/detail/generic/shuffle.h @@ -20,8 +20,14 @@ #pragma once - #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/system/detail/generic/sort.h b/thrust/thrust/system/detail/generic/sort.h index cd8d455624c..87da3bc4cb6 100644 --- a/thrust/thrust/system/detail/generic/sort.h +++ b/thrust/thrust/system/detail/generic/sort.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/sort.inl b/thrust/thrust/system/detail/generic/sort.inl index 632cab435ea..e2f3c31184e 100644 --- a/thrust/thrust/system/detail/generic/sort.inl +++ b/thrust/thrust/system/detail/generic/sort.inl @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -44,7 +50,7 @@ __host__ __device__ RandomAccessIterator first, RandomAccessIterator last) { - typedef typename thrust::iterator_value::type value_type; + typedef typename thrust::iterator_value::type value_type; thrust::sort(exec, first, last, thrust::less()); } // end sort() diff --git a/thrust/thrust/system/detail/generic/swap_ranges.h b/thrust/thrust/system/detail/generic/swap_ranges.h index edb5acf31fb..b7270530247 100644 --- a/thrust/thrust/system/detail/generic/swap_ranges.h +++ b/thrust/thrust/system/detail/generic/swap_ranges.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/swap_ranges.inl b/thrust/thrust/system/detail/generic/swap_ranges.inl index ea42df35bcd..0f68ebd80a7 100644 --- a/thrust/thrust/system/detail/generic/swap_ranges.inl +++ b/thrust/thrust/system/detail/generic/swap_ranges.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/tabulate.h b/thrust/thrust/system/detail/generic/tabulate.h index 041093e82e6..4c6df103a8b 100644 --- a/thrust/thrust/system/detail/generic/tabulate.h +++ b/thrust/thrust/system/detail/generic/tabulate.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/tabulate.inl b/thrust/thrust/system/detail/generic/tabulate.inl index 0fd2121c149..da2a6b82c9d 100644 --- a/thrust/thrust/system/detail/generic/tabulate.inl +++ b/thrust/thrust/system/detail/generic/tabulate.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/tag.h b/thrust/thrust/system/detail/generic/tag.h index 48f0947974f..1a02f1af0bd 100644 --- a/thrust/thrust/system/detail/generic/tag.h +++ b/thrust/thrust/system/detail/generic/tag.h @@ -23,6 +23,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace system { diff --git a/thrust/thrust/system/detail/generic/temporary_buffer.h b/thrust/thrust/system/detail/generic/temporary_buffer.h index 6b7e01ff24b..94d8cb64be6 100644 --- a/thrust/thrust/system/detail/generic/temporary_buffer.h +++ b/thrust/thrust/system/detail/generic/temporary_buffer.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/temporary_buffer.inl b/thrust/thrust/system/detail/generic/temporary_buffer.inl index 254c48cb915..7a792e5041b 100644 --- a/thrust/thrust/system/detail/generic/temporary_buffer.inl +++ b/thrust/thrust/system/detail/generic/temporary_buffer.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/transform.h b/thrust/thrust/system/detail/generic/transform.h index 30e032696bc..175fcb672b8 100644 --- a/thrust/thrust/system/detail/generic/transform.h +++ b/thrust/thrust/system/detail/generic/transform.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/transform.inl b/thrust/thrust/system/detail/generic/transform.inl index 122c42580b0..6bc3292117e 100644 --- a/thrust/thrust/system/detail/generic/transform.inl +++ b/thrust/thrust/system/detail/generic/transform.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/transform_reduce.h b/thrust/thrust/system/detail/generic/transform_reduce.h index af510296e1c..e5c07e2d415 100644 --- a/thrust/thrust/system/detail/generic/transform_reduce.h +++ b/thrust/thrust/system/detail/generic/transform_reduce.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -30,8 +36,8 @@ namespace generic template __host__ __device__ diff --git a/thrust/thrust/system/detail/generic/transform_reduce.inl b/thrust/thrust/system/detail/generic/transform_reduce.inl index 539c3b22c04..580da0c1e06 100644 --- a/thrust/thrust/system/detail/generic/transform_reduce.inl +++ b/thrust/thrust/system/detail/generic/transform_reduce.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/transform_scan.h b/thrust/thrust/system/detail/generic/transform_scan.h index 05054c965a0..9226615a0b1 100644 --- a/thrust/thrust/system/detail/generic/transform_scan.h +++ b/thrust/thrust/system/detail/generic/transform_scan.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/transform_scan.inl b/thrust/thrust/system/detail/generic/transform_scan.inl index c9c97668731..23e2582b6f1 100644 --- a/thrust/thrust/system/detail/generic/transform_scan.inl +++ b/thrust/thrust/system/detail/generic/transform_scan.inl @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/uninitialized_copy.h b/thrust/thrust/system/detail/generic/uninitialized_copy.h index bac5bcf9609..022f016055e 100644 --- a/thrust/thrust/system/detail/generic/uninitialized_copy.h +++ b/thrust/thrust/system/detail/generic/uninitialized_copy.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/uninitialized_copy.inl b/thrust/thrust/system/detail/generic/uninitialized_copy.inl index 679d1f6bae8..ba7a5a27dc1 100644 --- a/thrust/thrust/system/detail/generic/uninitialized_copy.inl +++ b/thrust/thrust/system/detail/generic/uninitialized_copy.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/uninitialized_fill.h b/thrust/thrust/system/detail/generic/uninitialized_fill.h index 4f5404508c0..dc88adc0e9c 100644 --- a/thrust/thrust/system/detail/generic/uninitialized_fill.h +++ b/thrust/thrust/system/detail/generic/uninitialized_fill.h @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/uninitialized_fill.inl b/thrust/thrust/system/detail/generic/uninitialized_fill.inl index 06241494548..169abebb309 100644 --- a/thrust/thrust/system/detail/generic/uninitialized_fill.inl +++ b/thrust/thrust/system/detail/generic/uninitialized_fill.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/generic/unique.h b/thrust/thrust/system/detail/generic/unique.h index ce3bff884b3..786da30caa9 100644 --- a/thrust/thrust/system/detail/generic/unique.h +++ b/thrust/thrust/system/detail/generic/unique.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/generic/unique.inl b/thrust/thrust/system/detail/generic/unique.inl index bb66e3585d2..e85768cd3df 100644 --- a/thrust/thrust/system/detail/generic/unique.inl +++ b/thrust/thrust/system/detail/generic/unique.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -112,9 +118,9 @@ __host__ __device__ BinaryPredicate binary_pred) { thrust::detail::head_flags stencil(first, last, binary_pred); - + using namespace thrust::placeholders; - + return thrust::count_if(exec, stencil.begin(), stencil.end(), _1); } // end unique_copy() diff --git a/thrust/thrust/system/detail/generic/unique_by_key.h b/thrust/thrust/system/detail/generic/unique_by_key.h index 0ea9e7cc845..c070e738cc0 100644 --- a/thrust/thrust/system/detail/generic/unique_by_key.h +++ b/thrust/thrust/system/detail/generic/unique_by_key.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -35,7 +41,7 @@ template unique_by_key(thrust::execution_policy &exec, - ForwardIterator1 keys_first, + ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first); @@ -47,7 +53,7 @@ template unique_by_key(thrust::execution_policy &exec, - ForwardIterator1 keys_first, + ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first, BinaryPredicate binary_pred); @@ -61,7 +67,7 @@ template unique_by_key_copy(thrust::execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -77,7 +83,7 @@ template unique_by_key_copy(thrust::execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, diff --git a/thrust/thrust/system/detail/generic/unique_by_key.inl b/thrust/thrust/system/detail/generic/unique_by_key.inl index ffcf1dd0c74..801bdea5abf 100644 --- a/thrust/thrust/system/detail/generic/unique_by_key.inl +++ b/thrust/thrust/system/detail/generic/unique_by_key.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/internal/decompose.h b/thrust/thrust/system/detail/internal/decompose.h index 58af7c55144..131fb258f52 100644 --- a/thrust/thrust/system/detail/internal/decompose.h +++ b/thrust/thrust/system/detail/internal/decompose.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace system { diff --git a/thrust/thrust/system/detail/sequential/adjacent_difference.h b/thrust/thrust/system/detail/sequential/adjacent_difference.h index 4a9dad82c93..414470442b2 100644 --- a/thrust/thrust/system/detail/sequential/adjacent_difference.h +++ b/thrust/thrust/system/detail/sequential/adjacent_difference.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/sequential/assign_value.h b/thrust/thrust/system/detail/sequential/assign_value.h index 0eb145d135a..511a8507f8b 100644 --- a/thrust/thrust/system/detail/sequential/assign_value.h +++ b/thrust/thrust/system/detail/sequential/assign_value.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/sequential/binary_search.h b/thrust/thrust/system/detail/sequential/binary_search.h index 2da5080f4f8..37ffb195b49 100644 --- a/thrust/thrust/system/detail/sequential/binary_search.h +++ b/thrust/thrust/system/detail/sequential/binary_search.h @@ -23,6 +23,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include @@ -91,7 +97,7 @@ __host__ __device__ ForwardIterator upper_bound(sequential::execution_policy &, ForwardIterator first, ForwardIterator last, - const T& val, + const T& val, StrictWeakOrdering comp) { // wrap comp @@ -136,7 +142,7 @@ __host__ __device__ bool binary_search(sequential::execution_policy &exec, ForwardIterator first, ForwardIterator last, - const T& val, + const T& val, StrictWeakOrdering comp) { ForwardIterator iter = sequential::lower_bound(exec, first, last, val, comp); diff --git a/thrust/thrust/system/detail/sequential/copy.h b/thrust/thrust/system/detail/sequential/copy.h index 0dd2cdad5c3..a657297698c 100644 --- a/thrust/thrust/system/detail/sequential/copy.h +++ b/thrust/thrust/system/detail/sequential/copy.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/sequential/copy.inl b/thrust/thrust/system/detail/sequential/copy.inl index 850f20f1eaa..50007f948fc 100644 --- a/thrust/thrust/system/detail/sequential/copy.inl +++ b/thrust/thrust/system/detail/sequential/copy.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/sequential/copy_backward.h b/thrust/thrust/system/detail/sequential/copy_backward.h index d127ac80db2..b85834a601f 100644 --- a/thrust/thrust/system/detail/sequential/copy_backward.h +++ b/thrust/thrust/system/detail/sequential/copy_backward.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN namespace system { @@ -31,8 +37,8 @@ __thrust_exec_check_disable__ template __host__ __device__ -BidirectionalIterator2 copy_backward(BidirectionalIterator1 first, - BidirectionalIterator1 last, +BidirectionalIterator2 copy_backward(BidirectionalIterator1 first, + BidirectionalIterator1 last, BidirectionalIterator2 result) { while (first != last) diff --git a/thrust/thrust/system/detail/sequential/copy_if.h b/thrust/thrust/system/detail/sequential/copy_if.h index 3c00956deb3..169654517ac 100644 --- a/thrust/thrust/system/detail/sequential/copy_if.h +++ b/thrust/thrust/system/detail/sequential/copy_if.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/sequential/count.h b/thrust/thrust/system/detail/sequential/count.h index ed3cadffe36..aa47b74f536 100644 --- a/thrust/thrust/system/detail/sequential/count.h +++ b/thrust/thrust/system/detail/sequential/count.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special count functions diff --git a/thrust/thrust/system/detail/sequential/equal.h b/thrust/thrust/system/detail/sequential/equal.h index 9d31e70f6fd..be6983aab32 100644 --- a/thrust/thrust/system/detail/sequential/equal.h +++ b/thrust/thrust/system/detail/sequential/equal.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special equal functions diff --git a/thrust/thrust/system/detail/sequential/execution_policy.h b/thrust/thrust/system/detail/sequential/execution_policy.h index 99d78fc27f0..dd547d77f76 100644 --- a/thrust/thrust/system/detail/sequential/execution_policy.h +++ b/thrust/thrust/system/detail/sequential/execution_policy.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/sequential/extrema.h b/thrust/thrust/system/detail/sequential/extrema.h index 5e5c62da694..0859adbc3de 100644 --- a/thrust/thrust/system/detail/sequential/extrema.h +++ b/thrust/thrust/system/detail/sequential/extrema.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -41,7 +47,7 @@ template __host__ __device__ ForwardIterator min_element(sequential::execution_policy &, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, BinaryPredicate comp) { @@ -71,7 +77,7 @@ template __host__ __device__ ForwardIterator max_element(sequential::execution_policy &, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, BinaryPredicate comp) { @@ -101,7 +107,7 @@ template __host__ __device__ thrust::pair minmax_element(sequential::execution_policy &, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, BinaryPredicate comp) { @@ -110,7 +116,7 @@ thrust::pair minmax_element(sequential::executi BinaryPredicate, bool > wrapped_comp(comp); - + ForwardIterator imin = first; ForwardIterator imax = first; diff --git a/thrust/thrust/system/detail/sequential/fill.h b/thrust/thrust/system/detail/sequential/fill.h index 20c636096c2..85313ac6548 100644 --- a/thrust/thrust/system/detail/sequential/fill.h +++ b/thrust/thrust/system/detail/sequential/fill.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special fill functions diff --git a/thrust/thrust/system/detail/sequential/find.h b/thrust/thrust/system/detail/sequential/find.h index 54c238c7158..ea19b6957c8 100644 --- a/thrust/thrust/system/detail/sequential/find.h +++ b/thrust/thrust/system/detail/sequential/find.h @@ -16,12 +16,18 @@ /*! \file find.h - * \brief Sequential implementation of find_if. + * \brief Sequential implementation of find_if. */ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/sequential/for_each.h b/thrust/thrust/system/detail/sequential/for_each.h index 7058c56f28e..c115b901cf9 100644 --- a/thrust/thrust/system/detail/sequential/for_each.h +++ b/thrust/thrust/system/detail/sequential/for_each.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/sequential/gather.h b/thrust/thrust/system/detail/sequential/gather.h index a5657585eae..76eb47da643 100644 --- a/thrust/thrust/system/detail/sequential/gather.h +++ b/thrust/thrust/system/detail/sequential/gather.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special gather functions diff --git a/thrust/thrust/system/detail/sequential/general_copy.h b/thrust/thrust/system/detail/sequential/general_copy.h index 6ea87bbacbe..a1579d5d1b4 100644 --- a/thrust/thrust/system/detail/sequential/general_copy.h +++ b/thrust/thrust/system/detail/sequential/general_copy.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/sequential/generate.h b/thrust/thrust/system/detail/sequential/generate.h index ac38be51617..eb534e994c4 100644 --- a/thrust/thrust/system/detail/sequential/generate.h +++ b/thrust/thrust/system/detail/sequential/generate.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special generate functions diff --git a/thrust/thrust/system/detail/sequential/get_value.h b/thrust/thrust/system/detail/sequential/get_value.h index 90752d8671a..f06567334eb 100644 --- a/thrust/thrust/system/detail/sequential/get_value.h +++ b/thrust/thrust/system/detail/sequential/get_value.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/sequential/inner_product.h b/thrust/thrust/system/detail/sequential/inner_product.h index e6b3c0ae174..28d3f13a3ba 100644 --- a/thrust/thrust/system/detail/sequential/inner_product.h +++ b/thrust/thrust/system/detail/sequential/inner_product.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special inner_product functions diff --git a/thrust/thrust/system/detail/sequential/insertion_sort.h b/thrust/thrust/system/detail/sequential/insertion_sort.h index 9acccd8e92e..4b9d283573c 100644 --- a/thrust/thrust/system/detail/sequential/insertion_sort.h +++ b/thrust/thrust/system/detail/sequential/insertion_sort.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/system/detail/sequential/iter_swap.h b/thrust/thrust/system/detail/sequential/iter_swap.h index 7a5c481fc03..bcb98dd2acd 100644 --- a/thrust/thrust/system/detail/sequential/iter_swap.h +++ b/thrust/thrust/system/detail/sequential/iter_swap.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/sequential/logical.h b/thrust/thrust/system/detail/sequential/logical.h index ee458627356..9bed89ef06e 100644 --- a/thrust/thrust/system/detail/sequential/logical.h +++ b/thrust/thrust/system/detail/sequential/logical.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special logical functions diff --git a/thrust/thrust/system/detail/sequential/malloc_and_free.h b/thrust/thrust/system/detail/sequential/malloc_and_free.h index b250140e083..452ff12beda 100644 --- a/thrust/thrust/system/detail/sequential/malloc_and_free.h +++ b/thrust/thrust/system/detail/sequential/malloc_and_free.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include // for malloc & free #include diff --git a/thrust/thrust/system/detail/sequential/merge.h b/thrust/thrust/system/detail/sequential/merge.h index a45e18004d4..3cb0041e269 100644 --- a/thrust/thrust/system/detail/sequential/merge.h +++ b/thrust/thrust/system/detail/sequential/merge.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/sequential/merge.inl b/thrust/thrust/system/detail/sequential/merge.inl index 08d7c0b0d4e..ee11e602a3c 100644 --- a/thrust/thrust/system/detail/sequential/merge.inl +++ b/thrust/thrust/system/detail/sequential/merge.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/sequential/mismatch.h b/thrust/thrust/system/detail/sequential/mismatch.h index e6094d261a0..5d077bbdabd 100644 --- a/thrust/thrust/system/detail/sequential/mismatch.h +++ b/thrust/thrust/system/detail/sequential/mismatch.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special mismatch functions diff --git a/thrust/thrust/system/detail/sequential/partition.h b/thrust/thrust/system/detail/sequential/partition.h index 43d5b0e2378..3878a3b2bdc 100644 --- a/thrust/thrust/system/detail/sequential/partition.h +++ b/thrust/thrust/system/detail/sequential/partition.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/sequential/per_device_resource.h b/thrust/thrust/system/detail/sequential/per_device_resource.h index 1b8d61f9216..64c721210a7 100644 --- a/thrust/thrust/system/detail/sequential/per_device_resource.h +++ b/thrust/thrust/system/detail/sequential/per_device_resource.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special per device resource functions diff --git a/thrust/thrust/system/detail/sequential/reduce.h b/thrust/thrust/system/detail/sequential/reduce.h index a532f71b246..e14fb4755f0 100644 --- a/thrust/thrust/system/detail/sequential/reduce.h +++ b/thrust/thrust/system/detail/sequential/reduce.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -36,7 +42,7 @@ namespace sequential __thrust_exec_check_disable__ template __host__ __device__ diff --git a/thrust/thrust/system/detail/sequential/reduce_by_key.h b/thrust/thrust/system/detail/sequential/reduce_by_key.h index ef17ac5b0ea..cad30bb417c 100644 --- a/thrust/thrust/system/detail/sequential/reduce_by_key.h +++ b/thrust/thrust/system/detail/sequential/reduce_by_key.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -41,7 +47,7 @@ template reduce_by_key(sequential::execution_policy &, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, diff --git a/thrust/thrust/system/detail/sequential/remove.h b/thrust/thrust/system/detail/sequential/remove.h index df564f15b03..1444db22fc9 100644 --- a/thrust/thrust/system/detail/sequential/remove.h +++ b/thrust/thrust/system/detail/sequential/remove.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -57,7 +63,7 @@ __host__ __device__ if(first == last) return first; - // result always trails first + // result always trails first ForwardIterator result = first; ++first; @@ -104,7 +110,7 @@ __host__ __device__ if(first == last) return first; - // result always trails first + // result always trails first ForwardIterator result = first; ++first; diff --git a/thrust/thrust/system/detail/sequential/replace.h b/thrust/thrust/system/detail/sequential/replace.h index f5c8e838571..8a2fb0e0463 100644 --- a/thrust/thrust/system/detail/sequential/replace.h +++ b/thrust/thrust/system/detail/sequential/replace.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special replace functions diff --git a/thrust/thrust/system/detail/sequential/reverse.h b/thrust/thrust/system/detail/sequential/reverse.h index f80974e8a8d..9cd83565804 100644 --- a/thrust/thrust/system/detail/sequential/reverse.h +++ b/thrust/thrust/system/detail/sequential/reverse.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special reverse functions diff --git a/thrust/thrust/system/detail/sequential/scan.h b/thrust/thrust/system/detail/sequential/scan.h index c5fce247582..fee6f11571f 100644 --- a/thrust/thrust/system/detail/sequential/scan.h +++ b/thrust/thrust/system/detail/sequential/scan.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -111,7 +117,7 @@ __host__ __device__ } return result; -} +} } // end namespace sequential diff --git a/thrust/thrust/system/detail/sequential/scan_by_key.h b/thrust/thrust/system/detail/sequential/scan_by_key.h index c428c1050e8..11e43969304 100644 --- a/thrust/thrust/system/detail/sequential/scan_by_key.h +++ b/thrust/thrust/system/detail/sequential/scan_by_key.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -131,7 +137,7 @@ __host__ __device__ if (!binary_pred(temp_key, key)) next = init; // reset sum - *result = next; + *result = next; next = binary_op(next, temp_value); temp_key = key; diff --git a/thrust/thrust/system/detail/sequential/scatter.h b/thrust/thrust/system/detail/sequential/scatter.h index d6817b4cb26..166b455c1ae 100644 --- a/thrust/thrust/system/detail/sequential/scatter.h +++ b/thrust/thrust/system/detail/sequential/scatter.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special scatter functions diff --git a/thrust/thrust/system/detail/sequential/sequence.h b/thrust/thrust/system/detail/sequential/sequence.h index 0c090f96f34..a65392eb799 100644 --- a/thrust/thrust/system/detail/sequential/sequence.h +++ b/thrust/thrust/system/detail/sequential/sequence.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special sequence functions diff --git a/thrust/thrust/system/detail/sequential/set_operations.h b/thrust/thrust/system/detail/sequential/set_operations.h index 678754b45dd..028fe9bcb53 100644 --- a/thrust/thrust/system/detail/sequential/set_operations.h +++ b/thrust/thrust/system/detail/sequential/set_operations.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/sequential/sort.h b/thrust/thrust/system/detail/sequential/sort.h index 34cc7a8ba89..6e635deb1ea 100644 --- a/thrust/thrust/system/detail/sequential/sort.h +++ b/thrust/thrust/system/detail/sequential/sort.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/sequential/sort.inl b/thrust/thrust/system/detail/sequential/sort.inl index 241a860aff5..30a4715b15d 100644 --- a/thrust/thrust/system/detail/sequential/sort.inl +++ b/thrust/thrust/system/detail/sequential/sort.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/system/detail/sequential/stable_merge_sort.h b/thrust/thrust/system/detail/sequential/stable_merge_sort.h index 64aa2bf96ce..e9a8bedc288 100644 --- a/thrust/thrust/system/detail/sequential/stable_merge_sort.h +++ b/thrust/thrust/system/detail/sequential/stable_merge_sort.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/sequential/stable_merge_sort.inl b/thrust/thrust/system/detail/sequential/stable_merge_sort.inl index 02f384afba1..a98e10541f9 100644 --- a/thrust/thrust/system/detail/sequential/stable_merge_sort.inl +++ b/thrust/thrust/system/detail/sequential/stable_merge_sort.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/system/detail/sequential/stable_primitive_sort.h b/thrust/thrust/system/detail/sequential/stable_primitive_sort.h index acbb81217bd..d4e16a7d18d 100644 --- a/thrust/thrust/system/detail/sequential/stable_primitive_sort.h +++ b/thrust/thrust/system/detail/sequential/stable_primitive_sort.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/sequential/stable_primitive_sort.inl b/thrust/thrust/system/detail/sequential/stable_primitive_sort.inl index 9897d6798da..94ba396b08d 100644 --- a/thrust/thrust/system/detail/sequential/stable_primitive_sort.inl +++ b/thrust/thrust/system/detail/sequential/stable_primitive_sort.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/sequential/stable_radix_sort.h b/thrust/thrust/system/detail/sequential/stable_radix_sort.h index 1e9713a2cc9..bb7b941d744 100644 --- a/thrust/thrust/system/detail/sequential/stable_radix_sort.h +++ b/thrust/thrust/system/detail/sequential/stable_radix_sort.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/detail/sequential/stable_radix_sort.inl b/thrust/thrust/system/detail/sequential/stable_radix_sort.inl index 83d95ebfd49..463d380aee0 100644 --- a/thrust/thrust/system/detail/sequential/stable_radix_sort.inl +++ b/thrust/thrust/system/detail/sequential/stable_radix_sort.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/system/detail/sequential/swap_ranges.h b/thrust/thrust/system/detail/sequential/swap_ranges.h index 497497d6a15..c41998fc52d 100644 --- a/thrust/thrust/system/detail/sequential/swap_ranges.h +++ b/thrust/thrust/system/detail/sequential/swap_ranges.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special swap_ranges functions diff --git a/thrust/thrust/system/detail/sequential/tabulate.h b/thrust/thrust/system/detail/sequential/tabulate.h index 926cdec15a0..8a556172336 100644 --- a/thrust/thrust/system/detail/sequential/tabulate.h +++ b/thrust/thrust/system/detail/sequential/tabulate.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special tabulate functions diff --git a/thrust/thrust/system/detail/sequential/temporary_buffer.h b/thrust/thrust/system/detail/sequential/temporary_buffer.h index 2adfaf2810c..d666f267e35 100644 --- a/thrust/thrust/system/detail/sequential/temporary_buffer.h +++ b/thrust/thrust/system/detail/sequential/temporary_buffer.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special temporary buffer functions diff --git a/thrust/thrust/system/detail/sequential/transform.h b/thrust/thrust/system/detail/sequential/transform.h index 30305c15287..0cd9491b4a4 100644 --- a/thrust/thrust/system/detail/sequential/transform.h +++ b/thrust/thrust/system/detail/sequential/transform.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special transform functions diff --git a/thrust/thrust/system/detail/sequential/transform_reduce.h b/thrust/thrust/system/detail/sequential/transform_reduce.h index 8d2a1b3850d..15e8ed52d08 100644 --- a/thrust/thrust/system/detail/sequential/transform_reduce.h +++ b/thrust/thrust/system/detail/sequential/transform_reduce.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special transform_reduce functions diff --git a/thrust/thrust/system/detail/sequential/transform_scan.h b/thrust/thrust/system/detail/sequential/transform_scan.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/detail/sequential/transform_scan.h +++ b/thrust/thrust/system/detail/sequential/transform_scan.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/detail/sequential/trivial_copy.h b/thrust/thrust/system/detail/sequential/trivial_copy.h index ea55c8fd201..44047db2b9b 100644 --- a/thrust/thrust/system/detail/sequential/trivial_copy.h +++ b/thrust/thrust/system/detail/sequential/trivial_copy.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/detail/sequential/uninitialized_copy.h b/thrust/thrust/system/detail/sequential/uninitialized_copy.h index c6ae90664ad..c3f89646b4e 100644 --- a/thrust/thrust/system/detail/sequential/uninitialized_copy.h +++ b/thrust/thrust/system/detail/sequential/uninitialized_copy.h @@ -18,5 +18,11 @@ #include -// this system has no special version of this algorithm +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + +// this system has no special version of this algorithm diff --git a/thrust/thrust/system/detail/sequential/uninitialized_fill.h b/thrust/thrust/system/detail/sequential/uninitialized_fill.h index 65e59fae5dc..cdf362d9d9d 100644 --- a/thrust/thrust/system/detail/sequential/uninitialized_fill.h +++ b/thrust/thrust/system/detail/sequential/uninitialized_fill.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special unintialized_fill functions diff --git a/thrust/thrust/system/detail/sequential/unique.h b/thrust/thrust/system/detail/sequential/unique.h index c4fe5268a33..e3897ba21dc 100644 --- a/thrust/thrust/system/detail/sequential/unique.h +++ b/thrust/thrust/system/detail/sequential/unique.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/detail/sequential/unique_by_key.h b/thrust/thrust/system/detail/sequential/unique_by_key.h index d30cc7c7153..1cd0cedcfc4 100644 --- a/thrust/thrust/system/detail/sequential/unique_by_key.h +++ b/thrust/thrust/system/detail/sequential/unique_by_key.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -45,7 +51,7 @@ template unique_by_key_copy(sequential::execution_policy &, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -98,7 +104,7 @@ template unique_by_key(sequential::execution_policy &exec, - ForwardIterator1 keys_first, + ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first, BinaryPredicate binary_pred) diff --git a/thrust/thrust/system/detail/system_error.inl b/thrust/thrust/system/detail/system_error.inl index 075fe88e463..dbdf7d82243 100644 --- a/thrust/thrust/system/detail/system_error.inl +++ b/thrust/thrust/system/detail/system_error.inl @@ -19,6 +19,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/error_code.h b/thrust/thrust/system/error_code.h index d460a315b1d..23e818a93ee 100644 --- a/thrust/thrust/system/error_code.h +++ b/thrust/thrust/system/error_code.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -419,7 +425,7 @@ class error_condition // XXX replace below with this upon c++0x //explicit operator bool (void) const; - + /*! \return value() != 0. */ inline operator bool (void) const; diff --git a/thrust/thrust/system/omp/detail/adjacent_difference.h b/thrust/thrust/system/omp/detail/adjacent_difference.h index 622ee61bafd..6706826e6ca 100644 --- a/thrust/thrust/system/omp/detail/adjacent_difference.h +++ b/thrust/thrust/system/omp/detail/adjacent_difference.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/omp/detail/assign_value.h b/thrust/thrust/system/omp/detail/assign_value.h index cf244a02193..5924261c7ca 100644 --- a/thrust/thrust/system/omp/detail/assign_value.h +++ b/thrust/thrust/system/omp/detail/assign_value.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits assign_value #include diff --git a/thrust/thrust/system/omp/detail/binary_search.h b/thrust/thrust/system/omp/detail/binary_search.h index 1ed700bd8c8..15de5974ee9 100644 --- a/thrust/thrust/system/omp/detail/binary_search.h +++ b/thrust/thrust/system/omp/detail/binary_search.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -33,7 +39,7 @@ template &exec, ForwardIterator begin, ForwardIterator end, - const T& value, + const T& value, StrictWeakOrdering comp) { // omp prefers generic::lower_bound to cpp::lower_bound @@ -45,7 +51,7 @@ template &exec, ForwardIterator begin, ForwardIterator end, - const T& value, + const T& value, StrictWeakOrdering comp) { // omp prefers generic::upper_bound to cpp::upper_bound @@ -57,7 +63,7 @@ template &exec, ForwardIterator begin, ForwardIterator end, - const T& value, + const T& value, StrictWeakOrdering comp) { // omp prefers generic::binary_search to cpp::binary_search diff --git a/thrust/thrust/system/omp/detail/copy.h b/thrust/thrust/system/omp/detail/copy.h index ae7b1eed777..9a735ca4b94 100644 --- a/thrust/thrust/system/omp/detail/copy.h +++ b/thrust/thrust/system/omp/detail/copy.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/omp/detail/copy.inl b/thrust/thrust/system/omp/detail/copy.inl index 47f606dda63..de6ad0c851b 100644 --- a/thrust/thrust/system/omp/detail/copy.inl +++ b/thrust/thrust/system/omp/detail/copy.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -101,7 +107,7 @@ OutputIterator copy(execution_policy &exec, { typedef typename thrust::iterator_traversal::type traversal1; typedef typename thrust::iterator_traversal::type traversal2; - + typedef typename thrust::detail::minimum_type::type traversal; // dispatch on minimum traversal @@ -121,7 +127,7 @@ OutputIterator copy_n(execution_policy &exec, { typedef typename thrust::iterator_traversal::type traversal1; typedef typename thrust::iterator_traversal::type traversal2; - + typedef typename thrust::detail::minimum_type::type traversal; // dispatch on minimum traversal diff --git a/thrust/thrust/system/omp/detail/copy_if.h b/thrust/thrust/system/omp/detail/copy_if.h index b33fd96df12..67be8febb13 100644 --- a/thrust/thrust/system/omp/detail/copy_if.h +++ b/thrust/thrust/system/omp/detail/copy_if.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/omp/detail/copy_if.inl b/thrust/thrust/system/omp/detail/copy_if.inl index 8e597d4fcc5..43117e74d21 100644 --- a/thrust/thrust/system/omp/detail/copy_if.inl +++ b/thrust/thrust/system/omp/detail/copy_if.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/omp/detail/count.h b/thrust/thrust/system/omp/detail/count.h index fde1728b772..2b57cde7e4f 100644 --- a/thrust/thrust/system/omp/detail/count.h +++ b/thrust/thrust/system/omp/detail/count.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits count #include diff --git a/thrust/thrust/system/omp/detail/default_decomposition.h b/thrust/thrust/system/omp/detail/default_decomposition.h index 2fe0a24fd74..232ab0422be 100644 --- a/thrust/thrust/system/omp/detail/default_decomposition.h +++ b/thrust/thrust/system/omp/detail/default_decomposition.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/omp/detail/default_decomposition.inl b/thrust/thrust/system/omp/detail/default_decomposition.inl index 0698d53fbdc..ac7e36245eb 100644 --- a/thrust/thrust/system/omp/detail/default_decomposition.inl +++ b/thrust/thrust/system/omp/detail/default_decomposition.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include // don't attempt to #include this file without omp support diff --git a/thrust/thrust/system/omp/detail/equal.h b/thrust/thrust/system/omp/detail/equal.h index 13398fc9db5..b0dc474862c 100644 --- a/thrust/thrust/system/omp/detail/equal.h +++ b/thrust/thrust/system/omp/detail/equal.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits equal #include diff --git a/thrust/thrust/system/omp/detail/execution_policy.h b/thrust/thrust/system/omp/detail/execution_policy.h index f9b45312be8..850084cab9a 100644 --- a/thrust/thrust/system/omp/detail/execution_policy.h +++ b/thrust/thrust/system/omp/detail/execution_policy.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -58,7 +64,7 @@ template struct execution_policy : thrust::system::cpp::detail::execution_policy { - typedef tag tag_type; + typedef tag tag_type; operator tag() const { return tag(); } }; diff --git a/thrust/thrust/system/omp/detail/extrema.h b/thrust/thrust/system/omp/detail/extrema.h index bde4e5f80cf..fd9cbe89b66 100644 --- a/thrust/thrust/system/omp/detail/extrema.h +++ b/thrust/thrust/system/omp/detail/extrema.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -30,7 +36,7 @@ namespace detail template ForwardIterator max_element(execution_policy &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, BinaryPredicate comp) { @@ -40,7 +46,7 @@ ForwardIterator max_element(execution_policy &exec, template ForwardIterator min_element(execution_policy &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, BinaryPredicate comp) { @@ -50,7 +56,7 @@ ForwardIterator min_element(execution_policy &exec, template thrust::pair minmax_element(execution_policy &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, BinaryPredicate comp) { diff --git a/thrust/thrust/system/omp/detail/fill.h b/thrust/thrust/system/omp/detail/fill.h index 6665a264873..3bda479c892 100644 --- a/thrust/thrust/system/omp/detail/fill.h +++ b/thrust/thrust/system/omp/detail/fill.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits fill #include diff --git a/thrust/thrust/system/omp/detail/find.h b/thrust/thrust/system/omp/detail/find.h index d2abac95e30..6a8209c13c8 100644 --- a/thrust/thrust/system/omp/detail/find.h +++ b/thrust/thrust/system/omp/detail/find.h @@ -16,12 +16,18 @@ /*! \file find.h - * \brief OpenMP implementation of find_if. + * \brief OpenMP implementation of find_if. */ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/omp/detail/for_each.h b/thrust/thrust/system/omp/detail/for_each.h index a2030f37464..f138622e1bf 100644 --- a/thrust/thrust/system/omp/detail/for_each.h +++ b/thrust/thrust/system/omp/detail/for_each.h @@ -16,13 +16,19 @@ /*! \file for_each.h - * \brief Defines the interface for a function that executes a + * \brief Defines the interface for a function that executes a * function or functional for each value in a given range. */ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/omp/detail/for_each.inl b/thrust/thrust/system/omp/detail/for_each.inl index 4246d538070..80b47d4d173 100644 --- a/thrust/thrust/system/omp/detail/for_each.inl +++ b/thrust/thrust/system/omp/detail/for_each.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/omp/detail/gather.h b/thrust/thrust/system/omp/detail/gather.h index 098e0f4fbad..6630a1dd322 100644 --- a/thrust/thrust/system/omp/detail/gather.h +++ b/thrust/thrust/system/omp/detail/gather.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits gather #include diff --git a/thrust/thrust/system/omp/detail/generate.h b/thrust/thrust/system/omp/detail/generate.h index f907b6acc07..847f2b151f5 100644 --- a/thrust/thrust/system/omp/detail/generate.h +++ b/thrust/thrust/system/omp/detail/generate.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits generate #include diff --git a/thrust/thrust/system/omp/detail/get_value.h b/thrust/thrust/system/omp/detail/get_value.h index 23a11a8574f..cc3c0652d23 100644 --- a/thrust/thrust/system/omp/detail/get_value.h +++ b/thrust/thrust/system/omp/detail/get_value.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits get_value #include diff --git a/thrust/thrust/system/omp/detail/inner_product.h b/thrust/thrust/system/omp/detail/inner_product.h index e8cf941a1dc..4a11b03869f 100644 --- a/thrust/thrust/system/omp/detail/inner_product.h +++ b/thrust/thrust/system/omp/detail/inner_product.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits inner_product #include diff --git a/thrust/thrust/system/omp/detail/iter_swap.h b/thrust/thrust/system/omp/detail/iter_swap.h index a096739947c..8e4fe18ba0e 100644 --- a/thrust/thrust/system/omp/detail/iter_swap.h +++ b/thrust/thrust/system/omp/detail/iter_swap.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits iter_swap #include diff --git a/thrust/thrust/system/omp/detail/logical.h b/thrust/thrust/system/omp/detail/logical.h index 4199063183d..755655faecd 100644 --- a/thrust/thrust/system/omp/detail/logical.h +++ b/thrust/thrust/system/omp/detail/logical.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits logical #include diff --git a/thrust/thrust/system/omp/detail/malloc_and_free.h b/thrust/thrust/system/omp/detail/malloc_and_free.h index 01ab1e6dbe1..d68883f4561 100644 --- a/thrust/thrust/system/omp/detail/malloc_and_free.h +++ b/thrust/thrust/system/omp/detail/malloc_and_free.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits malloc and free #include diff --git a/thrust/thrust/system/omp/detail/memory.inl b/thrust/thrust/system/omp/detail/memory.inl index db9b4f07b80..d66050d7ac2 100644 --- a/thrust/thrust/system/omp/detail/memory.inl +++ b/thrust/thrust/system/omp/detail/memory.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/omp/detail/merge.h b/thrust/thrust/system/omp/detail/merge.h index 6a7bf6a7f80..1938e2e3940 100644 --- a/thrust/thrust/system/omp/detail/merge.h +++ b/thrust/thrust/system/omp/detail/merge.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits merge #include diff --git a/thrust/thrust/system/omp/detail/mismatch.h b/thrust/thrust/system/omp/detail/mismatch.h index b5c6b2c4bdd..2b9f3a3645c 100644 --- a/thrust/thrust/system/omp/detail/mismatch.h +++ b/thrust/thrust/system/omp/detail/mismatch.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits mismatch #include diff --git a/thrust/thrust/system/omp/detail/par.h b/thrust/thrust/system/omp/detail/par.h index b81a5d4894d..e1a07606453 100644 --- a/thrust/thrust/system/omp/detail/par.h +++ b/thrust/thrust/system/omp/detail/par.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/omp/detail/partition.h b/thrust/thrust/system/omp/detail/partition.h index 7a6f4a93447..66f94abe693 100644 --- a/thrust/thrust/system/omp/detail/partition.h +++ b/thrust/thrust/system/omp/detail/partition.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/omp/detail/partition.inl b/thrust/thrust/system/omp/detail/partition.inl index ba0a09eafb0..5737762ec40 100644 --- a/thrust/thrust/system/omp/detail/partition.inl +++ b/thrust/thrust/system/omp/detail/partition.inl @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/omp/detail/per_device_resource.h b/thrust/thrust/system/omp/detail/per_device_resource.h index 1b8d61f9216..64c721210a7 100644 --- a/thrust/thrust/system/omp/detail/per_device_resource.h +++ b/thrust/thrust/system/omp/detail/per_device_resource.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special per device resource functions diff --git a/thrust/thrust/system/omp/detail/pragma_omp.h b/thrust/thrust/system/omp/detail/pragma_omp.h index a8eeae23449..1b78d526651 100644 --- a/thrust/thrust/system/omp/detail/pragma_omp.h +++ b/thrust/thrust/system/omp/detail/pragma_omp.h @@ -29,6 +29,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC // MSVC ICEs when using the standard C++11 `_Pragma` operator with OpenMP // directives. diff --git a/thrust/thrust/system/omp/detail/reduce.h b/thrust/thrust/system/omp/detail/reduce.h index 5e5f2106ef7..39e4057847c 100644 --- a/thrust/thrust/system/omp/detail/reduce.h +++ b/thrust/thrust/system/omp/detail/reduce.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -34,7 +40,7 @@ namespace detail template OutputType reduce(execution_policy &exec, diff --git a/thrust/thrust/system/omp/detail/reduce.inl b/thrust/thrust/system/omp/detail/reduce.inl index 6a5723780b4..473dfe0c8be 100644 --- a/thrust/thrust/system/omp/detail/reduce.inl +++ b/thrust/thrust/system/omp/detail/reduce.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/omp/detail/reduce_by_key.h b/thrust/thrust/system/omp/detail/reduce_by_key.h index 005616de5f1..997c2c88951 100644 --- a/thrust/thrust/system/omp/detail/reduce_by_key.h +++ b/thrust/thrust/system/omp/detail/reduce_by_key.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -42,7 +48,7 @@ template thrust::pair reduce_by_key(execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, diff --git a/thrust/thrust/system/omp/detail/reduce_by_key.inl b/thrust/thrust/system/omp/detail/reduce_by_key.inl index 4088d06345e..3bc9e0c0ff6 100644 --- a/thrust/thrust/system/omp/detail/reduce_by_key.inl +++ b/thrust/thrust/system/omp/detail/reduce_by_key.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/omp/detail/reduce_intervals.h b/thrust/thrust/system/omp/detail/reduce_intervals.h index 1c69fc621ef..58938c53607 100644 --- a/thrust/thrust/system/omp/detail/reduce_intervals.h +++ b/thrust/thrust/system/omp/detail/reduce_intervals.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/omp/detail/reduce_intervals.inl b/thrust/thrust/system/omp/detail/reduce_intervals.inl index 2668a7b6059..7254b1cbab2 100644 --- a/thrust/thrust/system/omp/detail/reduce_intervals.inl +++ b/thrust/thrust/system/omp/detail/reduce_intervals.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/omp/detail/remove.h b/thrust/thrust/system/omp/detail/remove.h index 9b2d46e75c6..793fa98f78e 100644 --- a/thrust/thrust/system/omp/detail/remove.h +++ b/thrust/thrust/system/omp/detail/remove.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/omp/detail/remove.inl b/thrust/thrust/system/omp/detail/remove.inl index 5330f140725..82772cc1d79 100644 --- a/thrust/thrust/system/omp/detail/remove.inl +++ b/thrust/thrust/system/omp/detail/remove.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/omp/detail/replace.h b/thrust/thrust/system/omp/detail/replace.h index 95c5a14ba3d..12b1603a6a8 100644 --- a/thrust/thrust/system/omp/detail/replace.h +++ b/thrust/thrust/system/omp/detail/replace.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits this algorithm #include diff --git a/thrust/thrust/system/omp/detail/reverse.h b/thrust/thrust/system/omp/detail/reverse.h index 1f3e0325e25..aedea33aa82 100644 --- a/thrust/thrust/system/omp/detail/reverse.h +++ b/thrust/thrust/system/omp/detail/reverse.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits reverse #include diff --git a/thrust/thrust/system/omp/detail/scan.h b/thrust/thrust/system/omp/detail/scan.h index f47dbbc3087..f1f901dcab5 100644 --- a/thrust/thrust/system/omp/detail/scan.h +++ b/thrust/thrust/system/omp/detail/scan.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits scan #include diff --git a/thrust/thrust/system/omp/detail/scan_by_key.h b/thrust/thrust/system/omp/detail/scan_by_key.h index 7f6b42d5441..5c7e3d9942a 100644 --- a/thrust/thrust/system/omp/detail/scan_by_key.h +++ b/thrust/thrust/system/omp/detail/scan_by_key.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits this algorithm #include diff --git a/thrust/thrust/system/omp/detail/scatter.h b/thrust/thrust/system/omp/detail/scatter.h index 95c5a14ba3d..12b1603a6a8 100644 --- a/thrust/thrust/system/omp/detail/scatter.h +++ b/thrust/thrust/system/omp/detail/scatter.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits this algorithm #include diff --git a/thrust/thrust/system/omp/detail/sequence.h b/thrust/thrust/system/omp/detail/sequence.h index c33b2d4333c..8d6e3c34f65 100644 --- a/thrust/thrust/system/omp/detail/sequence.h +++ b/thrust/thrust/system/omp/detail/sequence.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits sequence #include diff --git a/thrust/thrust/system/omp/detail/set_operations.h b/thrust/thrust/system/omp/detail/set_operations.h index 421fa8a4bd9..890da986216 100644 --- a/thrust/thrust/system/omp/detail/set_operations.h +++ b/thrust/thrust/system/omp/detail/set_operations.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits set_operations #include diff --git a/thrust/thrust/system/omp/detail/sort.h b/thrust/thrust/system/omp/detail/sort.h index cf0b8c6d636..b673c572189 100644 --- a/thrust/thrust/system/omp/detail/sort.h +++ b/thrust/thrust/system/omp/detail/sort.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -34,7 +40,7 @@ void stable_sort(execution_policy &exec, RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp); - + template +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // don't attempt to #include this file without omp support #if (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE) #include diff --git a/thrust/thrust/system/omp/detail/swap_ranges.h b/thrust/thrust/system/omp/detail/swap_ranges.h index 8c3338b1baf..2540b86e17b 100644 --- a/thrust/thrust/system/omp/detail/swap_ranges.h +++ b/thrust/thrust/system/omp/detail/swap_ranges.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // omp inherits swap_ranges #include diff --git a/thrust/thrust/system/omp/detail/tabulate.h b/thrust/thrust/system/omp/detail/tabulate.h index ea135c70706..930d9efd15f 100644 --- a/thrust/thrust/system/omp/detail/tabulate.h +++ b/thrust/thrust/system/omp/detail/tabulate.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits tabulate #include diff --git a/thrust/thrust/system/omp/detail/temporary_buffer.h b/thrust/thrust/system/omp/detail/temporary_buffer.h index 2adfaf2810c..d666f267e35 100644 --- a/thrust/thrust/system/omp/detail/temporary_buffer.h +++ b/thrust/thrust/system/omp/detail/temporary_buffer.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special temporary buffer functions diff --git a/thrust/thrust/system/omp/detail/transform.h b/thrust/thrust/system/omp/detail/transform.h index 20d606dfbee..8a572e02bc3 100644 --- a/thrust/thrust/system/omp/detail/transform.h +++ b/thrust/thrust/system/omp/detail/transform.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // omp inherits transform #include diff --git a/thrust/thrust/system/omp/detail/transform_reduce.h b/thrust/thrust/system/omp/detail/transform_reduce.h index a8736bd75d0..5fb51bf8a07 100644 --- a/thrust/thrust/system/omp/detail/transform_reduce.h +++ b/thrust/thrust/system/omp/detail/transform_reduce.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits transform_reduce #include diff --git a/thrust/thrust/system/omp/detail/transform_scan.h b/thrust/thrust/system/omp/detail/transform_scan.h index 75b075b6b16..02371a3fc09 100644 --- a/thrust/thrust/system/omp/detail/transform_scan.h +++ b/thrust/thrust/system/omp/detail/transform_scan.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits transform_scan #include diff --git a/thrust/thrust/system/omp/detail/uninitialized_copy.h b/thrust/thrust/system/omp/detail/uninitialized_copy.h index bda06ac13e9..5ba0d83cde8 100644 --- a/thrust/thrust/system/omp/detail/uninitialized_copy.h +++ b/thrust/thrust/system/omp/detail/uninitialized_copy.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits uninitialized_copy #include diff --git a/thrust/thrust/system/omp/detail/uninitialized_fill.h b/thrust/thrust/system/omp/detail/uninitialized_fill.h index 764de876233..f1b4a302c6d 100644 --- a/thrust/thrust/system/omp/detail/uninitialized_fill.h +++ b/thrust/thrust/system/omp/detail/uninitialized_fill.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits uninitialized_fill #include diff --git a/thrust/thrust/system/omp/detail/unique.h b/thrust/thrust/system/omp/detail/unique.h index cf8025665ac..a95aaad5037 100644 --- a/thrust/thrust/system/omp/detail/unique.h +++ b/thrust/thrust/system/omp/detail/unique.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -60,7 +66,7 @@ template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -73,7 +79,7 @@ template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -35,7 +41,7 @@ template thrust::pair unique_by_key(execution_policy &exec, - ForwardIterator1 keys_first, + ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first, BinaryPredicate binary_pred); @@ -49,7 +55,7 @@ template thrust::pair unique_by_key_copy(execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -58,7 +64,7 @@ template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -36,7 +42,7 @@ template thrust::pair unique_by_key(execution_policy &exec, - ForwardIterator1 keys_first, + ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first, BinaryPredicate binary_pred) @@ -54,7 +60,7 @@ template thrust::pair unique_by_key_copy(execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, diff --git a/thrust/thrust/system/omp/execution_policy.h b/thrust/thrust/system/omp/execution_policy.h index c027d6be67d..f499eaed51b 100644 --- a/thrust/thrust/system/omp/execution_policy.h +++ b/thrust/thrust/system/omp/execution_policy.h @@ -16,12 +16,18 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + /*! \file thrust/system/omp/execution_policy.h * \brief Execution policies for Thrust's OpenMP system. */ -#include - // get the execution policies definitions first #include diff --git a/thrust/thrust/system/omp/memory.h b/thrust/thrust/system/omp/memory.h index 31f407c4c6f..b568b77079c 100644 --- a/thrust/thrust/system/omp/memory.h +++ b/thrust/thrust/system/omp/memory.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/omp/memory_resource.h b/thrust/thrust/system/omp/memory_resource.h index d8eed0c0f9e..c2d3c9e650c 100644 --- a/thrust/thrust/system/omp/memory_resource.h +++ b/thrust/thrust/system/omp/memory_resource.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/omp/pointer.h b/thrust/thrust/system/omp/pointer.h index 2be42e4fcf6..3cf07954160 100644 --- a/thrust/thrust/system/omp/pointer.h +++ b/thrust/thrust/system/omp/pointer.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/omp/vector.h b/thrust/thrust/system/omp/vector.h index 179b5207dd6..98d8765155f 100644 --- a/thrust/thrust/system/omp/vector.h +++ b/thrust/thrust/system/omp/vector.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/system_error.h b/thrust/thrust/system/system_error.h index fb31a2da805..438518e72ea 100644 --- a/thrust/thrust/system/system_error.h +++ b/thrust/thrust/system/system_error.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -90,7 +96,7 @@ class system_error { public: // [19.5.5.2] Class system_error members - + /*! Constructs an object of class \p system_error. * \param ec The value returned by \p code(). * \param what_arg A string to include in the result returned by \p what(). @@ -141,7 +147,7 @@ class system_error /*! Destructor does not throw. */ inline virtual ~system_error(void) noexcept {}; - + /*! Returns an object encoding the error. * \return ec or error_code(ev, ecat), from the * constructor, as appropriate. diff --git a/thrust/thrust/system/tbb/detail/adjacent_difference.h b/thrust/thrust/system/tbb/detail/adjacent_difference.h index ab519d11eb4..70d93b46286 100644 --- a/thrust/thrust/system/tbb/detail/adjacent_difference.h +++ b/thrust/thrust/system/tbb/detail/adjacent_difference.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/tbb/detail/assign_value.h b/thrust/thrust/system/tbb/detail/assign_value.h index cf244a02193..5924261c7ca 100644 --- a/thrust/thrust/system/tbb/detail/assign_value.h +++ b/thrust/thrust/system/tbb/detail/assign_value.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits assign_value #include diff --git a/thrust/thrust/system/tbb/detail/binary_search.h b/thrust/thrust/system/tbb/detail/binary_search.h index 0847e5d1fdb..eed753e11c0 100644 --- a/thrust/thrust/system/tbb/detail/binary_search.h +++ b/thrust/thrust/system/tbb/detail/binary_search.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits binary_search #include diff --git a/thrust/thrust/system/tbb/detail/copy.h b/thrust/thrust/system/tbb/detail/copy.h index 30e95a98ce2..f4d737b0494 100644 --- a/thrust/thrust/system/tbb/detail/copy.h +++ b/thrust/thrust/system/tbb/detail/copy.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/tbb/detail/copy.inl b/thrust/thrust/system/tbb/detail/copy.inl index 1016f40d4da..bb20559b5fb 100644 --- a/thrust/thrust/system/tbb/detail/copy.inl +++ b/thrust/thrust/system/tbb/detail/copy.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -101,7 +107,7 @@ OutputIterator copy(execution_policy &exec, { typedef typename thrust::iterator_traversal::type traversal1; typedef typename thrust::iterator_traversal::type traversal2; - + typedef typename thrust::detail::minimum_type::type traversal; // dispatch on minimum traversal @@ -121,7 +127,7 @@ OutputIterator copy_n(execution_policy &exec, { typedef typename thrust::iterator_traversal::type traversal1; typedef typename thrust::iterator_traversal::type traversal2; - + typedef typename thrust::detail::minimum_type::type traversal; // dispatch on minimum traversal diff --git a/thrust/thrust/system/tbb/detail/copy_if.h b/thrust/thrust/system/tbb/detail/copy_if.h index db860f37758..87b60db56b5 100644 --- a/thrust/thrust/system/tbb/detail/copy_if.h +++ b/thrust/thrust/system/tbb/detail/copy_if.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/tbb/detail/copy_if.inl b/thrust/thrust/system/tbb/detail/copy_if.inl index aa2379b8d03..f566020efe4 100644 --- a/thrust/thrust/system/tbb/detail/copy_if.inl +++ b/thrust/thrust/system/tbb/detail/copy_if.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -66,13 +72,13 @@ struct body ++sum; } } - + void operator()(const ::tbb::blocked_range& r, ::tbb::final_scan_tag) { InputIterator1 iter1 = first + r.begin(); InputIterator2 iter2 = stencil + r.begin(); OutputIterator iter3 = result + sum; - + for (Size i = r.begin(); i != r.end(); ++i, ++iter1, ++iter2) { if (pred(*iter2)) @@ -87,12 +93,12 @@ struct body void reverse_join(body& b) { sum = b.sum + sum; - } + } void assign(body& b) { sum = b.sum; - } + } }; // end body } // end copy_if_detail @@ -108,9 +114,9 @@ template::type Size; + typedef typename thrust::iterator_difference::type Size; typedef typename copy_if_detail::body Body; - + Size n = thrust::distance(first, last); if (n != 0) diff --git a/thrust/thrust/system/tbb/detail/count.h b/thrust/thrust/system/tbb/detail/count.h index fde1728b772..2b57cde7e4f 100644 --- a/thrust/thrust/system/tbb/detail/count.h +++ b/thrust/thrust/system/tbb/detail/count.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits count #include diff --git a/thrust/thrust/system/tbb/detail/equal.h b/thrust/thrust/system/tbb/detail/equal.h index 13398fc9db5..b0dc474862c 100644 --- a/thrust/thrust/system/tbb/detail/equal.h +++ b/thrust/thrust/system/tbb/detail/equal.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits equal #include diff --git a/thrust/thrust/system/tbb/detail/execution_policy.h b/thrust/thrust/system/tbb/detail/execution_policy.h index ac4a788e760..a67b7db379d 100644 --- a/thrust/thrust/system/tbb/detail/execution_policy.h +++ b/thrust/thrust/system/tbb/detail/execution_policy.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -57,7 +63,7 @@ template struct execution_policy : thrust::system::cpp::detail::execution_policy { - typedef tag tag_type; + typedef tag tag_type; operator tag() const { return tag(); } }; diff --git a/thrust/thrust/system/tbb/detail/extrema.h b/thrust/thrust/system/tbb/detail/extrema.h index c6c747f426b..2cfdac87f8a 100644 --- a/thrust/thrust/system/tbb/detail/extrema.h +++ b/thrust/thrust/system/tbb/detail/extrema.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -30,7 +36,7 @@ namespace detail template ForwardIterator max_element(execution_policy &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, BinaryPredicate comp) { @@ -40,7 +46,7 @@ ForwardIterator max_element(execution_policy &exec, template ForwardIterator min_element(execution_policy &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, BinaryPredicate comp) { @@ -50,7 +56,7 @@ ForwardIterator min_element(execution_policy &exec, template thrust::pair minmax_element(execution_policy &exec, - ForwardIterator first, + ForwardIterator first, ForwardIterator last, BinaryPredicate comp) { diff --git a/thrust/thrust/system/tbb/detail/fill.h b/thrust/thrust/system/tbb/detail/fill.h index 6665a264873..3bda479c892 100644 --- a/thrust/thrust/system/tbb/detail/fill.h +++ b/thrust/thrust/system/tbb/detail/fill.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits fill #include diff --git a/thrust/thrust/system/tbb/detail/find.h b/thrust/thrust/system/tbb/detail/find.h index e5dea8e779d..ecd6e11f7cf 100644 --- a/thrust/thrust/system/tbb/detail/find.h +++ b/thrust/thrust/system/tbb/detail/find.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/tbb/detail/for_each.h b/thrust/thrust/system/tbb/detail/for_each.h index 26c4b539b05..94b7803101e 100644 --- a/thrust/thrust/system/tbb/detail/for_each.h +++ b/thrust/thrust/system/tbb/detail/for_each.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/tbb/detail/for_each.inl b/thrust/thrust/system/tbb/detail/for_each.inl index 21dfce9aebf..8e95e221cdf 100644 --- a/thrust/thrust/system/tbb/detail/for_each.inl +++ b/thrust/thrust/system/tbb/detail/for_each.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/tbb/detail/gather.h b/thrust/thrust/system/tbb/detail/gather.h index 098e0f4fbad..6630a1dd322 100644 --- a/thrust/thrust/system/tbb/detail/gather.h +++ b/thrust/thrust/system/tbb/detail/gather.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits gather #include diff --git a/thrust/thrust/system/tbb/detail/generate.h b/thrust/thrust/system/tbb/detail/generate.h index f907b6acc07..847f2b151f5 100644 --- a/thrust/thrust/system/tbb/detail/generate.h +++ b/thrust/thrust/system/tbb/detail/generate.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits generate #include diff --git a/thrust/thrust/system/tbb/detail/get_value.h b/thrust/thrust/system/tbb/detail/get_value.h index 23a11a8574f..cc3c0652d23 100644 --- a/thrust/thrust/system/tbb/detail/get_value.h +++ b/thrust/thrust/system/tbb/detail/get_value.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits get_value #include diff --git a/thrust/thrust/system/tbb/detail/inner_product.h b/thrust/thrust/system/tbb/detail/inner_product.h index e8cf941a1dc..4a11b03869f 100644 --- a/thrust/thrust/system/tbb/detail/inner_product.h +++ b/thrust/thrust/system/tbb/detail/inner_product.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits inner_product #include diff --git a/thrust/thrust/system/tbb/detail/iter_swap.h b/thrust/thrust/system/tbb/detail/iter_swap.h index a096739947c..8e4fe18ba0e 100644 --- a/thrust/thrust/system/tbb/detail/iter_swap.h +++ b/thrust/thrust/system/tbb/detail/iter_swap.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits iter_swap #include diff --git a/thrust/thrust/system/tbb/detail/logical.h b/thrust/thrust/system/tbb/detail/logical.h index 4199063183d..755655faecd 100644 --- a/thrust/thrust/system/tbb/detail/logical.h +++ b/thrust/thrust/system/tbb/detail/logical.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits logical #include diff --git a/thrust/thrust/system/tbb/detail/malloc_and_free.h b/thrust/thrust/system/tbb/detail/malloc_and_free.h index 01ab1e6dbe1..d68883f4561 100644 --- a/thrust/thrust/system/tbb/detail/malloc_and_free.h +++ b/thrust/thrust/system/tbb/detail/malloc_and_free.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits malloc and free #include diff --git a/thrust/thrust/system/tbb/detail/memory.inl b/thrust/thrust/system/tbb/detail/memory.inl index 32e28300a41..d0985ef568c 100644 --- a/thrust/thrust/system/tbb/detail/memory.inl +++ b/thrust/thrust/system/tbb/detail/memory.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/tbb/detail/merge.h b/thrust/thrust/system/tbb/detail/merge.h index 014e2eb8bce..a64b03eb637 100644 --- a/thrust/thrust/system/tbb/detail/merge.h +++ b/thrust/thrust/system/tbb/detail/merge.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/tbb/detail/merge.inl b/thrust/thrust/system/tbb/detail/merge.inl index 89a01aebfc8..4b61e16bc63 100644 --- a/thrust/thrust/system/tbb/detail/merge.inl +++ b/thrust/thrust/system/tbb/detail/merge.inl @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include #include diff --git a/thrust/thrust/system/tbb/detail/mismatch.h b/thrust/thrust/system/tbb/detail/mismatch.h index b5c6b2c4bdd..2b9f3a3645c 100644 --- a/thrust/thrust/system/tbb/detail/mismatch.h +++ b/thrust/thrust/system/tbb/detail/mismatch.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits mismatch #include diff --git a/thrust/thrust/system/tbb/detail/par.h b/thrust/thrust/system/tbb/detail/par.h index 308d41e1366..74a5f6ef6d0 100644 --- a/thrust/thrust/system/tbb/detail/par.h +++ b/thrust/thrust/system/tbb/detail/par.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/tbb/detail/partition.h b/thrust/thrust/system/tbb/detail/partition.h index f9c56b92b52..ec60d3d456c 100644 --- a/thrust/thrust/system/tbb/detail/partition.h +++ b/thrust/thrust/system/tbb/detail/partition.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/tbb/detail/partition.inl b/thrust/thrust/system/tbb/detail/partition.inl index 74ad809da4e..4cdb0492247 100644 --- a/thrust/thrust/system/tbb/detail/partition.inl +++ b/thrust/thrust/system/tbb/detail/partition.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/tbb/detail/per_device_resource.h b/thrust/thrust/system/tbb/detail/per_device_resource.h index 1b8d61f9216..64c721210a7 100644 --- a/thrust/thrust/system/tbb/detail/per_device_resource.h +++ b/thrust/thrust/system/tbb/detail/per_device_resource.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special per device resource functions diff --git a/thrust/thrust/system/tbb/detail/reduce.h b/thrust/thrust/system/tbb/detail/reduce.h index 81e8d1f6f30..b12c7f43927 100644 --- a/thrust/thrust/system/tbb/detail/reduce.h +++ b/thrust/thrust/system/tbb/detail/reduce.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -34,7 +40,7 @@ namespace detail template OutputType reduce(execution_policy &exec, diff --git a/thrust/thrust/system/tbb/detail/reduce.inl b/thrust/thrust/system/tbb/detail/reduce.inl index 47fe6616d6b..96621d9bf63 100644 --- a/thrust/thrust/system/tbb/detail/reduce.inl +++ b/thrust/thrust/system/tbb/detail/reduce.inl @@ -18,6 +18,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -60,7 +66,7 @@ struct body void operator()(const ::tbb::blocked_range &r) { // we assume that blocked_range specifies a contiguous range of integers - + if (r.empty()) return; // nothing to do RandomAccessIterator iter = first + r.begin(); @@ -85,7 +91,7 @@ struct body sum = binary_op(sum, temp); } } // end operator()() - + void join(body& b) { sum = binary_op(sum, b.sum); @@ -96,7 +102,7 @@ struct body template OutputType reduce(execution_policy &, @@ -105,7 +111,7 @@ template::type Size; + typedef typename thrust::iterator_difference::type Size; Size n = thrust::distance(begin, end); diff --git a/thrust/thrust/system/tbb/detail/reduce_by_key.h b/thrust/thrust/system/tbb/detail/reduce_by_key.h index 04d46e7c0fa..0b14ca2787e 100644 --- a/thrust/thrust/system/tbb/detail/reduce_by_key.h +++ b/thrust/thrust/system/tbb/detail/reduce_by_key.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -38,7 +44,7 @@ template thrust::pair reduce_by_key(execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, diff --git a/thrust/thrust/system/tbb/detail/reduce_by_key.inl b/thrust/thrust/system/tbb/detail/reduce_by_key.inl index 693abb2e739..4053f0faf1e 100644 --- a/thrust/thrust/system/tbb/detail/reduce_by_key.inl +++ b/thrust/thrust/system/tbb/detail/reduce_by_key.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -125,7 +131,7 @@ template::type, typename partial_sum_type::type > - reduce_by_key_with_carry(InputIterator1 keys_first, + reduce_by_key_with_carry(InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -145,7 +151,7 @@ template bool interval_has_carry(size_t interval_idx, size_t interval_size, size_t num_intervals, Iterator tail_flags) { - // to discover whether the interval has a carry, look at the tail_flag corresponding to its last element + // to discover whether the interval has a carry, look at the tail_flag corresponding to its last element // the final interval never has a carry by definition return (interval_idx + 1 < num_intervals) ? !tail_flags[(interval_idx + 1) * interval_size - 1] : false; } @@ -226,7 +232,7 @@ template flags = thrust::detail::make_tail_flags(keys_first, keys_first + n, binary_pred); @@ -259,7 +265,7 @@ template thrust::pair reduce_by_key(thrust::tbb::execution_policy &exec, - Iterator1 keys_first, Iterator1 keys_last, + Iterator1 keys_first, Iterator1 keys_last, Iterator2 values_first, Iterator3 keys_result, Iterator4 values_result, @@ -300,7 +306,7 @@ template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/tbb/detail/remove.h b/thrust/thrust/system/tbb/detail/remove.h index 34cd917994a..f13bdc9ccf6 100644 --- a/thrust/thrust/system/tbb/detail/remove.h +++ b/thrust/thrust/system/tbb/detail/remove.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/tbb/detail/remove.inl b/thrust/thrust/system/tbb/detail/remove.inl index 76d77e64ba5..f2a35f1e534 100644 --- a/thrust/thrust/system/tbb/detail/remove.inl +++ b/thrust/thrust/system/tbb/detail/remove.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/tbb/detail/replace.h b/thrust/thrust/system/tbb/detail/replace.h index 95c5a14ba3d..12b1603a6a8 100644 --- a/thrust/thrust/system/tbb/detail/replace.h +++ b/thrust/thrust/system/tbb/detail/replace.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits this algorithm #include diff --git a/thrust/thrust/system/tbb/detail/reverse.h b/thrust/thrust/system/tbb/detail/reverse.h index 1f3e0325e25..aedea33aa82 100644 --- a/thrust/thrust/system/tbb/detail/reverse.h +++ b/thrust/thrust/system/tbb/detail/reverse.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits reverse #include diff --git a/thrust/thrust/system/tbb/detail/scan.h b/thrust/thrust/system/tbb/detail/scan.h index b31b46317cf..769eb449e5a 100644 --- a/thrust/thrust/system/tbb/detail/scan.h +++ b/thrust/thrust/system/tbb/detail/scan.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/tbb/detail/scan.inl b/thrust/thrust/system/tbb/detail/scan.inl index d6e89498390..86857f5bc81 100644 --- a/thrust/thrust/system/tbb/detail/scan.inl +++ b/thrust/thrust/system/tbb/detail/scan.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -53,16 +59,16 @@ struct inclusive_body inclusive_body(InputIterator input, OutputIterator output, BinaryFunction binary_op, ValueType dummy) : input(input), output(output), binary_op(binary_op), sum(dummy), first_call(true) {} - + inclusive_body(inclusive_body& b, ::tbb::split) : input(b.input), output(b.output), binary_op(b.binary_op), sum(b.sum), first_call(true) {} - template + template void operator()(const ::tbb::blocked_range& r, ::tbb::pre_scan_tag) { InputIterator iter = input + r.begin(); - + ValueType temp = *iter; ++iter; @@ -74,11 +80,11 @@ struct inclusive_body sum = temp; else sum = binary_op(sum, temp); - + first_call = false; } - - template + + template void operator()(const ::tbb::blocked_range& r, ::tbb::final_scan_tag) { InputIterator iter1 = input + r.begin(); @@ -109,12 +115,12 @@ struct inclusive_body { sum = binary_op(b.sum, sum); } - } + } void assign(inclusive_body& b) { sum = b.sum; - } + } }; @@ -133,16 +139,16 @@ struct exclusive_body exclusive_body(InputIterator input, OutputIterator output, BinaryFunction binary_op, ValueType init) : input(input), output(output), binary_op(binary_op), sum(init), first_call(true) {} - + exclusive_body(exclusive_body& b, ::tbb::split) : input(b.input), output(b.output), binary_op(b.binary_op), sum(b.sum), first_call(true) {} - template + template void operator()(const ::tbb::blocked_range& r, ::tbb::pre_scan_tag) { InputIterator iter = input + r.begin(); - + ValueType temp = *iter; ++iter; @@ -154,11 +160,11 @@ struct exclusive_body sum = temp; else sum = binary_op(sum, temp); - + first_call = false; } - - template + + template void operator()(const ::tbb::blocked_range& r, ::tbb::final_scan_tag) { InputIterator iter1 = input + r.begin(); @@ -170,7 +176,7 @@ struct exclusive_body *iter2 = sum; sum = temp; } - + first_call = false; } @@ -187,7 +193,7 @@ struct exclusive_body void assign(exclusive_body& b) { sum = b.sum; - } + } }; } // end scan_detail @@ -250,7 +256,7 @@ template +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits scan_by_key #include diff --git a/thrust/thrust/system/tbb/detail/scatter.h b/thrust/thrust/system/tbb/detail/scatter.h index 95c5a14ba3d..12b1603a6a8 100644 --- a/thrust/thrust/system/tbb/detail/scatter.h +++ b/thrust/thrust/system/tbb/detail/scatter.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits this algorithm #include diff --git a/thrust/thrust/system/tbb/detail/sequence.h b/thrust/thrust/system/tbb/detail/sequence.h index c33b2d4333c..8d6e3c34f65 100644 --- a/thrust/thrust/system/tbb/detail/sequence.h +++ b/thrust/thrust/system/tbb/detail/sequence.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits sequence #include diff --git a/thrust/thrust/system/tbb/detail/set_operations.h b/thrust/thrust/system/tbb/detail/set_operations.h index 421fa8a4bd9..890da986216 100644 --- a/thrust/thrust/system/tbb/detail/set_operations.h +++ b/thrust/thrust/system/tbb/detail/set_operations.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits set_operations #include diff --git a/thrust/thrust/system/tbb/detail/sort.h b/thrust/thrust/system/tbb/detail/sort.h index 9c58bf6d49f..b89693a2da8 100644 --- a/thrust/thrust/system/tbb/detail/sort.h +++ b/thrust/thrust/system/tbb/detail/sort.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/system/tbb/detail/sort.inl b/thrust/thrust/system/tbb/detail/sort.inl index 103710fba54..5b72a6f6380 100644 --- a/thrust/thrust/system/tbb/detail/sort.inl +++ b/thrust/thrust/system/tbb/detail/sort.inl @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/tbb/detail/swap_ranges.h b/thrust/thrust/system/tbb/detail/swap_ranges.h index 4a0b06cbe9e..a57487f9fa1 100644 --- a/thrust/thrust/system/tbb/detail/swap_ranges.h +++ b/thrust/thrust/system/tbb/detail/swap_ranges.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // tbb inherits swap_ranges #include diff --git a/thrust/thrust/system/tbb/detail/tabulate.h b/thrust/thrust/system/tbb/detail/tabulate.h index ea135c70706..930d9efd15f 100644 --- a/thrust/thrust/system/tbb/detail/tabulate.h +++ b/thrust/thrust/system/tbb/detail/tabulate.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits tabulate #include diff --git a/thrust/thrust/system/tbb/detail/temporary_buffer.h b/thrust/thrust/system/tbb/detail/temporary_buffer.h index 2adfaf2810c..d666f267e35 100644 --- a/thrust/thrust/system/tbb/detail/temporary_buffer.h +++ b/thrust/thrust/system/tbb/detail/temporary_buffer.h @@ -18,5 +18,11 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system has no special temporary buffer functions diff --git a/thrust/thrust/system/tbb/detail/transform.h b/thrust/thrust/system/tbb/detail/transform.h index 20d606dfbee..8a572e02bc3 100644 --- a/thrust/thrust/system/tbb/detail/transform.h +++ b/thrust/thrust/system/tbb/detail/transform.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // omp inherits transform #include diff --git a/thrust/thrust/system/tbb/detail/transform_reduce.h b/thrust/thrust/system/tbb/detail/transform_reduce.h index a8736bd75d0..5fb51bf8a07 100644 --- a/thrust/thrust/system/tbb/detail/transform_reduce.h +++ b/thrust/thrust/system/tbb/detail/transform_reduce.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits transform_reduce #include diff --git a/thrust/thrust/system/tbb/detail/transform_scan.h b/thrust/thrust/system/tbb/detail/transform_scan.h index 75b075b6b16..02371a3fc09 100644 --- a/thrust/thrust/system/tbb/detail/transform_scan.h +++ b/thrust/thrust/system/tbb/detail/transform_scan.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits transform_scan #include diff --git a/thrust/thrust/system/tbb/detail/uninitialized_copy.h b/thrust/thrust/system/tbb/detail/uninitialized_copy.h index bda06ac13e9..5ba0d83cde8 100644 --- a/thrust/thrust/system/tbb/detail/uninitialized_copy.h +++ b/thrust/thrust/system/tbb/detail/uninitialized_copy.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits uninitialized_copy #include diff --git a/thrust/thrust/system/tbb/detail/uninitialized_fill.h b/thrust/thrust/system/tbb/detail/uninitialized_fill.h index 764de876233..f1b4a302c6d 100644 --- a/thrust/thrust/system/tbb/detail/uninitialized_fill.h +++ b/thrust/thrust/system/tbb/detail/uninitialized_fill.h @@ -18,6 +18,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // this system inherits uninitialized_fill #include diff --git a/thrust/thrust/system/tbb/detail/unique.h b/thrust/thrust/system/tbb/detail/unique.h index 843e6406e3a..66ecebafe2d 100644 --- a/thrust/thrust/system/tbb/detail/unique.h +++ b/thrust/thrust/system/tbb/detail/unique.h @@ -17,6 +17,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -60,7 +66,7 @@ template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -73,7 +79,7 @@ template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include @@ -35,7 +41,7 @@ template thrust::pair unique_by_key(execution_policy &exec, - ForwardIterator1 keys_first, + ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first, BinaryPredicate binary_pred); @@ -49,7 +55,7 @@ template thrust::pair unique_by_key_copy(execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -58,7 +64,7 @@ template + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -36,7 +42,7 @@ template thrust::pair unique_by_key(execution_policy &exec, - ForwardIterator1 keys_first, + ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first, BinaryPredicate binary_pred) @@ -54,7 +60,7 @@ template thrust::pair unique_by_key_copy(execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, diff --git a/thrust/thrust/system/tbb/execution_policy.h b/thrust/thrust/system/tbb/execution_policy.h index bfa6b7893b1..b305519f423 100644 --- a/thrust/thrust/system/tbb/execution_policy.h +++ b/thrust/thrust/system/tbb/execution_policy.h @@ -16,12 +16,18 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + /*! \file thrust/system/tbb/execution_policy.h * \brief Execution policies for Thrust's TBB system. */ -#include - // get the execution policies definitions first #include diff --git a/thrust/thrust/system/tbb/memory.h b/thrust/thrust/system/tbb/memory.h index 3bd4422320e..49453b3755f 100644 --- a/thrust/thrust/system/tbb/memory.h +++ b/thrust/thrust/system/tbb/memory.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/tbb/memory_resource.h b/thrust/thrust/system/tbb/memory_resource.h index a698b924271..1ba3a020ccc 100644 --- a/thrust/thrust/system/tbb/memory_resource.h +++ b/thrust/thrust/system/tbb/memory_resource.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include diff --git a/thrust/thrust/system/tbb/pointer.h b/thrust/thrust/system/tbb/pointer.h index 065e1a548f0..794429d4d80 100644 --- a/thrust/thrust/system/tbb/pointer.h +++ b/thrust/thrust/system/tbb/pointer.h @@ -21,6 +21,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system/tbb/vector.h b/thrust/thrust/system/tbb/vector.h index 8cbbabbd242..d6615e500fe 100644 --- a/thrust/thrust/system/tbb/vector.h +++ b/thrust/thrust/system/tbb/vector.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/system_error.h b/thrust/thrust/system_error.h index 6bf240e5123..3d657b24833 100644 --- a/thrust/thrust/system_error.h +++ b/thrust/thrust/system_error.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + THRUST_NAMESPACE_BEGIN /*! \addtogroup system diff --git a/thrust/thrust/tabulate.h b/thrust/thrust/tabulate.h index 7cb7945508d..725ed981fcb 100644 --- a/thrust/thrust/tabulate.h +++ b/thrust/thrust/tabulate.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/transform.h b/thrust/thrust/transform.h index 2d064c13b3e..06886523a31 100644 --- a/thrust/thrust/transform.h +++ b/thrust/thrust/transform.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -36,16 +42,16 @@ THRUST_NAMESPACE_BEGIN /*! This version of \p transform applies a unary function to each element - * of an input sequence and stores the result in the corresponding - * position in an output sequence. Specifically, for each iterator - * i in the range [\p first, \p last) the operation + * of an input sequence and stores the result in the corresponding + * position in an output sequence. Specifically, for each iterator + * i in the range [\p first, \p last) the operation * op(*i) is performed and the result is assigned to *o, * where o is the corresponding output iterator in the range * [\p result, \p result + (\p last - \p first) ). The input and * output sequences may coincide, resulting in an in-place transformation. * * The algorithm's execution is parallelized as determined by \p exec. - * + * * \param exec The execution policy to use for parallelization. * \param first The beginning of the input sequence. * \param last The end of the input sequence. @@ -70,9 +76,9 @@ THRUST_NAMESPACE_BEGIN * #include * #include * ... - * + * * int data[10] = {-5, 0, 2, -3, 2, 4, 0, -1, 2, 8}; - * + * * thrust::negate op; * * thrust::transform(thrust::host, data, data + 10, data, op); // in-place transformation @@ -92,16 +98,16 @@ __host__ __device__ OutputIterator result, UnaryFunction op); - + /*! This version of \p transform applies a unary function to each element - * of an input sequence and stores the result in the corresponding - * position in an output sequence. Specifically, for each iterator - * i in the range [\p first, \p last) the operation + * of an input sequence and stores the result in the corresponding + * position in an output sequence. Specifically, for each iterator + * i in the range [\p first, \p last) the operation * op(*i) is performed and the result is assigned to *o, * where o is the corresponding output iterator in the range * [\p result, \p result + (\p last - \p first) ). The input and * output sequences may coincide, resulting in an in-place transformation. - * + * * \param first The beginning of the input sequence. * \param last The end of the input sequence. * \param result The beginning of the output sequence. @@ -121,9 +127,9 @@ __host__ __device__ * \code * #include * #include - * + * * int data[10] = {-5, 0, 2, -3, 2, 4, 0, -1, 2, 8}; - * + * * thrust::negate op; * * thrust::transform(data, data + 10, data, op); // in-place transformation @@ -144,16 +150,16 @@ templatei in the range [\p first1, \p last1) and + * each iterator i in the range [\p first1, \p last1) and * j = first + (i - first1) in the range [\p first2, \p last2) - * the operation op(*i,*j) is performed and the result is + * the operation op(*i,*j) is performed and the result is * assigned to *o, where o is the corresponding * output iterator in the range [\p result, \p result + (\p last - \p first) ). - * The input and output sequences may coincide, resulting in an + * The input and output sequences may coincide, resulting in an * in-place transformation. * * The algorithm's execution is parallelized as determined by \p exec. - * + * * \param exec The execution policy to use for parallelization. * \param first1 The beginning of the first input sequence. * \param last1 The end of the first input sequence. @@ -182,11 +188,11 @@ template * #include * ... - * + * * int input1[6] = {-5, 0, 2, 3, 2, 4}; * int input2[6] = { 3, 6, -2, 1, 2, 3}; * int output[6]; - * + * * thrust::plus op; * * thrust::transform(thrust::host, input1, input1 + 6, input2, output, op); @@ -212,14 +218,14 @@ __host__ __device__ /*! This version of \p transform applies a binary function to each pair * of elements from two input sequences and stores the result in the * corresponding position in an output sequence. Specifically, for - * each iterator i in the range [\p first1, \p last1) and + * each iterator i in the range [\p first1, \p last1) and * j = first + (i - first1) in the range [\p first2, \p last2) - * the operation op(*i,*j) is performed and the result is + * the operation op(*i,*j) is performed and the result is * assigned to *o, where o is the corresponding * output iterator in the range [\p result, \p result + (\p last - \p first) ). - * The input and output sequences may coincide, resulting in an + * The input and output sequences may coincide, resulting in an * in-place transformation. - * + * * \param first1 The beginning of the first input sequence. * \param last1 The end of the first input sequence. * \param first2 The beginning of the second input sequence. @@ -243,11 +249,11 @@ __host__ __device__ * \code * #include * #include - * + * * int input1[6] = {-5, 0, 2, 3, 2, 4}; * int input2[6] = { 3, 6, -2, 1, 2, 3}; * int output[6]; - * + * * thrust::plus op; * * thrust::transform(input1, input1 + 6, input2, output, op); @@ -268,7 +274,7 @@ template * #include * ... - * + * * int data[10] = {-5, 0, 2, -3, 2, 4, 0, -1, 2, 8}; * * struct is_odd @@ -321,7 +327,7 @@ template op; * thrust::identity identity; * @@ -347,7 +353,7 @@ __host__ __device__ /*! This version of \p transform_if conditionally applies a unary function - * to each element of an input sequence and stores the result in the corresponding + * to each element of an input sequence and stores the result in the corresponding * position in an output sequence if the corresponding position in the input sequence * satifies a predicate. Otherwise, the corresponding position in the * output sequence is not modified. @@ -359,7 +365,7 @@ __host__ __device__ * [result, result + (last - first) ). Otherwise, op(*i) is * not evaluated and no assignment occurs. The input and output sequences may coincide, * resulting in an in-place transformation. - * + * * \param first The beginning of the input sequence. * \param last The end of the input sequence. * \param result The beginning of the output sequence. @@ -382,7 +388,7 @@ __host__ __device__ * \code * #include * #include - * + * * int data[10] = {-5, 0, 2, -3, 2, 4, 0, -1, 2, 8}; * * struct is_odd @@ -393,7 +399,7 @@ __host__ __device__ * return x % 2; * } * }; - * + * * thrust::negate op; * thrust::identity identity; * @@ -416,7 +422,7 @@ template * #include * ... - * + * * int data[10] = {-5, 0, 2, -3, 2, 4, 0, -1, 2, 8}; * int stencil[10] = { 1, 0, 1, 0, 1, 0, 1, 0, 1, 0}; - * + * * thrust::negate op; * thrust::identity identity; * @@ -492,7 +498,7 @@ __host__ __device__ /*! This version of \p transform_if conditionally applies a unary function - * to each element of an input sequence and stores the result in the corresponding + * to each element of an input sequence and stores the result in the corresponding * position in an output sequence if the corresponding position in a stencil sequence * satisfies a predicate. Otherwise, the corresponding position in the * output sequence is not modified. @@ -505,7 +511,7 @@ __host__ __device__ * [result, result + (last - first) ). Otherwise, op(*i) is * not evaluated and no assignment occurs. The input and output sequences may coincide, * resulting in an in-place transformation. - * + * * \param first The beginning of the input sequence. * \param last The end of the input sequence. * \param stencil The beginning of the stencil sequence. @@ -531,10 +537,10 @@ __host__ __device__ * \code * #include * #include - * + * * int data[10] = {-5, 0, 2, -3, 2, 4, 0, -1, 2, 8}; * int stencil[10] = { 1, 0, 1, 0, 1, 0, 1, 0, 1, 0}; - * + * * thrust::negate op; * thrust::identity identity; * @@ -558,12 +564,12 @@ templatei in the range [first1, last1) and + * Specifically, for each iterator i in the range [first1, last1) and * j = first2 + (i - first1) in the range [first2, first2 + (last1 - first1) ), * the predicate pred(*s) is evaluated, where s is the corresponding input * iterator in the range [stencil, stencil + (last1 - first1) ). If this predicate @@ -574,7 +580,7 @@ template * #include * ... - * + * * int input1[6] = {-5, 0, 2, 3, 2, 4}; * int input2[6] = { 3, 6, -2, 1, 2, 3}; * int stencil[8] = { 1, 0, 1, 0, 1, 0}; * int output[6]; - * + * * thrust::plus op; * thrust::identity identity; * @@ -641,12 +647,12 @@ __host__ __device__ /*! This version of \p transform_if conditionally applies a binary function - * to each pair of elements from two input sequences and stores the result in the corresponding + * to each pair of elements from two input sequences and stores the result in the corresponding * position in an output sequence if the corresponding position in a stencil sequence * satifies a predicate. Otherwise, the corresponding position in the * output sequence is not modified. * - * Specifically, for each iterator i in the range [first1, last1) and + * Specifically, for each iterator i in the range [first1, last1) and * j = first2 + (i - first1) in the range [first2, first2 + (last1 - first1) ), * the predicate pred(*s) is evaluated, where s is the corresponding input * iterator in the range [stencil, stencil + (last1 - first1) ). If this predicate @@ -655,7 +661,7 @@ __host__ __device__ * [result, result + (last1 - first1) ). Otherwise, binary_op(*i,*j) is * not evaluated and no assignment occurs. The input and output sequences may coincide, * resulting in an in-place transformation. - * + * * \param first1 The beginning of the first input sequence. * \param last1 The end of the first input sequence. * \param first2 The beginning of the second input sequence. @@ -683,12 +689,12 @@ __host__ __device__ * \code * #include * #include - * + * * int input1[6] = {-5, 0, 2, 3, 2, 4}; * int input2[6] = { 3, 6, -2, 1, 2, 3}; * int stencil[8] = { 1, 0, 1, 0, 1, 0}; * int output[6]; - * + * * thrust::plus op; * thrust::identity identity; * diff --git a/thrust/thrust/transform_reduce.h b/thrust/thrust/transform_reduce.h index 11d6b84c3eb..17ae56af125 100644 --- a/thrust/thrust/transform_reduce.h +++ b/thrust/thrust/transform_reduce.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -43,10 +49,10 @@ THRUST_NAMESPACE_BEGIN * \p transform_reduce performs a reduction on the transformation of the * sequence [first, last) according to \p unary_op. Specifically, * \p unary_op is applied to each element of the sequence and then the result - * is reduced to a single value with \p binary_op using the initial value - * \p init. Note that the transformation \p unary_op is not applied to - * the initial value \p init. The order of reduction is not specified, - * so \p binary_op must be both commutative and associative. + * is reduced to a single value with \p binary_op using the initial value + * \p init. Note that the transformation \p unary_op is not applied to + * the initial value \p init. The order of reduction is not specified, + * so \p binary_op must be both commutative and associative. * * The algorithm's execution is parallelized as determined by \p exec. * @@ -101,8 +107,8 @@ THRUST_NAMESPACE_BEGIN * \see \c reduce */ template __host__ __device__ @@ -123,10 +129,10 @@ __host__ __device__ * \p transform_reduce performs a reduction on the transformation of the * sequence [first, last) according to \p unary_op. Specifically, * \p unary_op is applied to each element of the sequence and then the result - * is reduced to a single value with \p binary_op using the initial value - * \p init. Note that the transformation \p unary_op is not applied to - * the initial value \p init. The order of reduction is not specified, - * so \p binary_op must be both commutative and associative. + * is reduced to a single value with \p binary_op using the initial value + * \p init. Note that the transformation \p unary_op is not applied to + * the initial value \p init. The order of reduction is not specified, + * so \p binary_op must be both commutative and associative. * * \param first The beginning of the sequence. * \param last The end of the sequence. @@ -174,8 +180,8 @@ __host__ __device__ * \see \c transform * \see \c reduce */ -template OutputType transform_reduce(InputIterator first, diff --git a/thrust/thrust/transform_scan.h b/thrust/thrust/transform_scan.h index 6c0fe811668..1831c7d84be 100644 --- a/thrust/thrust/transform_scan.h +++ b/thrust/thrust/transform_scan.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -33,7 +39,7 @@ THRUST_NAMESPACE_BEGIN * \ingroup algorithms * \{ */ - + /*! \addtogroup transformed_prefixsums Transformed Prefix Sums * \ingroup prefixsums * \{ @@ -81,7 +87,7 @@ THRUST_NAMESPACE_BEGIN * #include * #include * ... - * + * * int data[6] = {1, 0, 2, 2, 1, 3}; * * thrust::negate unary_op; @@ -144,7 +150,7 @@ __host__ __device__ * * \code * #include - * + * * int data[6] = {1, 0, 2, 2, 1, 3}; * * thrust::negate unary_op; @@ -175,10 +181,10 @@ template\*result + * fewer memory reads and writes are required. In + * \p transform_exclusive_scan, \p init is assigned to \*result * and the result of binary_op(init, unary_op(\*first)) is assigned - * to \*(result + 1), and so on. The transform scan operation is + * to \*(result + 1), and so on. The transform scan operation is * permitted to be in-place. * * The algorithm's execution is parallelized as determined by \p exec. @@ -213,7 +219,7 @@ template * #include * ... - * + * * int data[6] = {1, 0, 2, 2, 1, 3}; * * thrust::negate unary_op; @@ -249,10 +255,10 @@ __host__ __device__ * tranformation defined by \p unary_op into a temporary sequence and then * performing an \p exclusive_scan on the tranformed sequence. In most * cases, fusing these two operations together is more efficient, since - * fewer memory reads and writes are required. In - * \p transform_exclusive_scan, \p init is assigned to \*result + * fewer memory reads and writes are required. In + * \p transform_exclusive_scan, \p init is assigned to \*result * and the result of binary_op(init, unary_op(\*first)) is assigned - * to \*(result + 1), and so on. The transform scan operation is + * to \*(result + 1), and so on. The transform scan operation is * permitted to be in-place. * * \param first The beginning of the input sequence. @@ -280,7 +286,7 @@ __host__ __device__ * * \code * #include - * + * * int data[6] = {1, 0, 2, 2, 1, 3}; * * thrust::negate unary_op; diff --git a/thrust/thrust/tuple.h b/thrust/thrust/tuple.h index 20b9fe5a2b6..75922592b6c 100644 --- a/thrust/thrust/tuple.h +++ b/thrust/thrust/tuple.h @@ -31,11 +31,17 @@ #include -#include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include +#include + THRUST_NAMESPACE_BEGIN diff --git a/thrust/thrust/type_traits/integer_sequence.h b/thrust/thrust/type_traits/integer_sequence.h index 26ea542134a..427a5cf8e14 100644 --- a/thrust/thrust/type_traits/integer_sequence.h +++ b/thrust/thrust/type_traits/integer_sequence.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/type_traits/is_contiguous_iterator.h b/thrust/thrust/type_traits/is_contiguous_iterator.h index eaa088978c4..3eb2575c244 100644 --- a/thrust/thrust/type_traits/is_contiguous_iterator.h +++ b/thrust/thrust/type_traits/is_contiguous_iterator.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/type_traits/is_execution_policy.h b/thrust/thrust/type_traits/is_execution_policy.h index f83751ea2da..18c7269d13f 100644 --- a/thrust/thrust/type_traits/is_execution_policy.h +++ b/thrust/thrust/type_traits/is_execution_policy.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include #include diff --git a/thrust/thrust/type_traits/is_operator_less_or_greater_function_object.h b/thrust/thrust/type_traits/is_operator_less_or_greater_function_object.h index ef5a19f691e..0f9c21ee1c9 100644 --- a/thrust/thrust/type_traits/is_operator_less_or_greater_function_object.h +++ b/thrust/thrust/type_traits/is_operator_less_or_greater_function_object.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/type_traits/is_operator_plus_function_object.h b/thrust/thrust/type_traits/is_operator_plus_function_object.h index 800847532cf..f7372c1d7d6 100644 --- a/thrust/thrust/type_traits/is_operator_plus_function_object.h +++ b/thrust/thrust/type_traits/is_operator_plus_function_object.h @@ -23,6 +23,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/type_traits/is_trivially_relocatable.h b/thrust/thrust/type_traits/is_trivially_relocatable.h index 21d1f09d8d7..4ab9f04fa77 100644 --- a/thrust/thrust/type_traits/is_trivially_relocatable.h +++ b/thrust/thrust/type_traits/is_trivially_relocatable.h @@ -24,6 +24,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include diff --git a/thrust/thrust/type_traits/logical_metafunctions.h b/thrust/thrust/type_traits/logical_metafunctions.h index 914b477e8ef..5cddc88722a 100644 --- a/thrust/thrust/type_traits/logical_metafunctions.h +++ b/thrust/thrust/type_traits/logical_metafunctions.h @@ -25,6 +25,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #if THRUST_CPP_DIALECT >= 2011 diff --git a/thrust/thrust/type_traits/remove_cvref.h b/thrust/thrust/type_traits/remove_cvref.h index 1da2e0de35c..5189d7ebd1c 100644 --- a/thrust/thrust/type_traits/remove_cvref.h +++ b/thrust/thrust/type_traits/remove_cvref.h @@ -23,6 +23,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_CPP_DIALECT >= 2017 #if __has_include() # include diff --git a/thrust/thrust/type_traits/void_t.h b/thrust/thrust/type_traits/void_t.h index ed12d861dcb..d10d96f2643 100644 --- a/thrust/thrust/type_traits/void_t.h +++ b/thrust/thrust/type_traits/void_t.h @@ -22,6 +22,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #if THRUST_CPP_DIALECT >= 2017 # include #endif diff --git a/thrust/thrust/uninitialized_copy.h b/thrust/thrust/uninitialized_copy.h index 94c2763e3e4..459af1e1251 100644 --- a/thrust/thrust/uninitialized_copy.h +++ b/thrust/thrust/uninitialized_copy.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -66,13 +72,13 @@ THRUST_NAMESPACE_BEGIN * #include * #include * #include - * + * * struct Int * { * __host__ __device__ * Int(int x) : val(x) {} * int val; - * }; + * }; * ... * const int N = 137; * @@ -128,13 +134,13 @@ __host__ __device__ * #include * #include * #include - * + * * struct Int * { * __host__ __device__ * Int(int x) : val(x) {} * int val; - * }; + * }; * ... * const int N = 137; * @@ -195,13 +201,13 @@ template * #include * #include * #include - * + * * struct Int * { * __host__ __device__ * Int(int x) : val(x) {} * int val; - * }; + * }; * ... * const int N = 137; * @@ -259,13 +265,13 @@ __host__ __device__ * #include * #include * #include - * + * * struct Int * { * __host__ __device__ * Int(int x) : val(x) {} * int val; - * }; + * }; * ... * const int N = 137; * diff --git a/thrust/thrust/uninitialized_fill.h b/thrust/thrust/uninitialized_fill.h index b46758a3c8c..a46c78bd405 100644 --- a/thrust/thrust/uninitialized_fill.h +++ b/thrust/thrust/uninitialized_fill.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include THRUST_NAMESPACE_BEGIN @@ -42,7 +48,7 @@ THRUST_NAMESPACE_BEGIN * calling \p ForwardIterator's \c value_type's copy constructor. * * The algorithm's execution is parallelized as determined by \p exec. - * + * * \param exec The execution policy to use for parallelization. * \param first The first element of the range of interest. * \param last The last element of the range of interest. @@ -60,13 +66,13 @@ THRUST_NAMESPACE_BEGIN * #include * #include * #include - * + * * struct Int * { * __host__ __device__ * Int(int x) : val(x) {} * int val; - * }; + * }; * ... * const int N = 137; * @@ -101,7 +107,7 @@ __host__ __device__ * in that range. That is, for each iterator \c i in the range [first, last), * \p uninitialized_fill creates a copy of \c x in the location pointed to \c i by * calling \p ForwardIterator's \c value_type's copy constructor. - * + * * \param first The first element of the range of interest. * \param last The last element of the range of interest. * \param x The value to use as the exemplar of the copy constructor. @@ -116,13 +122,13 @@ __host__ __device__ * \code * #include * #include - * + * * struct Int * { * __host__ __device__ * Int(int x) : val(x) {} * int val; - * }; + * }; * ... * const int N = 137; * @@ -157,7 +163,7 @@ template * calling \p ForwardIterator's \c value_type's copy constructor. * * The algorithm's execution is parallelized as determined by \p exec. - * + * * \param exec The execution policy to use for parallelization. * \param first The first element of the range of interest. * \param n The size of the range of interest. @@ -176,13 +182,13 @@ template * #include * #include * #include - * + * * struct Int * { * __host__ __device__ * Int(int x) : val(x) {} * int val; - * }; + * }; * ... * const int N = 137; * @@ -217,7 +223,7 @@ __host__ __device__ * in that range. That is, for each iterator \c i in the range [first, first+n), * \p uninitialized_fill creates a copy of \c x in the location pointed to \c i by * calling \p ForwardIterator's \c value_type's copy constructor. - * + * * \param first The first element of the range of interest. * \param n The size of the range of interest. * \param x The value to use as the exemplar of the copy constructor. @@ -233,13 +239,13 @@ __host__ __device__ * \code * #include * #include - * + * * struct Int * { * __host__ __device__ * Int(int x) : val(x) {} * int val; - * }; + * }; * ... * const int N = 137; * diff --git a/thrust/thrust/unique.h b/thrust/thrust/unique.h index 234cd493569..a3a6a7fdbe2 100644 --- a/thrust/thrust/unique.h +++ b/thrust/thrust/unique.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include #include @@ -34,8 +40,8 @@ THRUST_NAMESPACE_BEGIN /*! For each group of consecutive elements in the range [first, last) - * with the same value, \p unique removes all but the first element of - * the group. The return value is an iterator \c new_last such that + * with the same value, \p unique removes all but the first element of + * the group. The return value is an iterator \c new_last such that * no two consecutive elements in the range [first, new_last) are * equal. The iterators in the range [new_last, last) are all still * dereferenceable, but the elements that they point to are unspecified. @@ -83,8 +89,8 @@ ForwardIterator unique(const thrust::detail::execution_policy_base[first, last) - * with the same value, \p unique removes all but the first element of - * the group. The return value is an iterator \c new_last such that + * with the same value, \p unique removes all but the first element of + * the group. The return value is an iterator \c new_last such that * no two consecutive elements in the range [first, new_last) are * equal. The iterators in the range [new_last, last) are all still * dereferenceable, but the elements that they point to are unspecified. @@ -123,8 +129,8 @@ ForwardIterator unique(ForwardIterator first, /*! For each group of consecutive elements in the range [first, last) - * with the same value, \p unique removes all but the first element of - * the group. The return value is an iterator \c new_last such that + * with the same value, \p unique removes all but the first element of + * the group. The return value is an iterator \c new_last such that * no two consecutive elements in the range [first, new_last) are * equal. The iterators in the range [new_last, last) are all still * dereferenceable, but the elements that they point to are unspecified. @@ -177,8 +183,8 @@ ForwardIterator unique(const thrust::detail::execution_policy_base[first, last) - * with the same value, \p unique removes all but the first element of - * the group. The return value is an iterator \c new_last such that + * with the same value, \p unique removes all but the first element of + * the group. The return value is an iterator \c new_last such that * no two consecutive elements in the range [first, new_last) are * equal. The iterators in the range [new_last, last) are all still * dereferenceable, but the elements that they point to are unspecified. @@ -224,14 +230,14 @@ ForwardIterator unique(ForwardIterator first, /*! \p unique_copy copies elements from the range [first, last) * to a range beginning with \p result, except that in a consecutive group * of duplicate elements only the first one is copied. The return value - * is the end of the range to which the elements are copied. + * is the end of the range to which the elements are copied. * * The reason there are two different versions of unique_copy is that there * are two different definitions of what it means for a consecutive group of * elements to be duplicates. In the first version, the test is simple * equality: the elements in a range [f, l) are duplicates if, - * for every iterator \p i in the range, either i == f or else - * *i == *(i-1). In the second, the test is an arbitrary + * for every iterator \p i in the range, either i == f or else + * *i == *(i-1). In the second, the test is an arbitrary * \p BinaryPredicate \p binary_pred: the elements in [f, l) are * duplicates if, for every iterator \p i in the range, either i == f * or else binary_pred(*i, *(i-1)) is \p true. @@ -286,14 +292,14 @@ OutputIterator unique_copy(const thrust::detail::execution_policy_base[first, last) * to a range beginning with \p result, except that in a consecutive group * of duplicate elements only the first one is copied. The return value - * is the end of the range to which the elements are copied. + * is the end of the range to which the elements are copied. * * The reason there are two different versions of unique_copy is that there * are two different definitions of what it means for a consecutive group of * elements to be duplicates. In the first version, the test is simple * equality: the elements in a range [f, l) are duplicates if, - * for every iterator \p i in the range, either i == f or else - * *i == *(i-1). In the second, the test is an arbitrary + * for every iterator \p i in the range, either i == f or else + * *i == *(i-1). In the second, the test is an arbitrary * \p BinaryPredicate \p binary_pred: the elements in [f, l) are * duplicates if, for every iterator \p i in the range, either i == f * or else binary_pred(*i, *(i-1)) is \p true. @@ -339,9 +345,9 @@ OutputIterator unique_copy(InputIterator first, /*! \p unique_copy copies elements from the range [first, last) * to a range beginning with \p result, except that in a consecutive group * of duplicate elements only the first one is copied. The return value - * is the end of the range to which the elements are copied. + * is the end of the range to which the elements are copied. * - * This version of \p unique_copy uses the function object \c binary_pred + * This version of \p unique_copy uses the function object \c binary_pred * to test for equality. * * The algorithm's execution is parallelized as determined by \p exec. @@ -391,14 +397,14 @@ OutputIterator unique_copy(const thrust::detail::execution_policy_base[first, last) * to a range beginning with \p result, except that in a consecutive group * of duplicate elements only the first one is copied. The return value - * is the end of the range to which the elements are copied. + * is the end of the range to which the elements are copied. * - * This version of \p unique_copy uses the function object \c binary_pred + * This version of \p unique_copy uses the function object \c binary_pred * to test for equality. * * \param first The beginning of the input range. @@ -443,16 +449,16 @@ OutputIterator unique_copy(InputIterator first, /*! \p unique_by_key is a generalization of \p unique to key-value pairs. * For each group of consecutive keys in the range [keys_first, keys_last) - * that are equal, \p unique_by_key removes all but the first element of + * that are equal, \p unique_by_key removes all but the first element of * the group. Similarly, the corresponding values in the range - * [values_first, values_first + (keys_last - keys_first)) + * [values_first, values_first + (keys_last - keys_first)) * are also removed. * * The return value is a \p pair of iterators (new_keys_last,new_values_last) * such that no two consecutive elements in the range [keys_first, new_keys_last) * are equal. * - * This version of \p unique_by_key uses \c operator== to test for equality and + * This version of \p unique_by_key uses \c operator== to test for equality and * \c project1st to reduce values with equal keys. * * The algorithm's execution is parallelized as determined by \p exec. @@ -501,23 +507,23 @@ template unique_by_key(const thrust::detail::execution_policy_base &exec, - ForwardIterator1 keys_first, + ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first); /*! \p unique_by_key is a generalization of \p unique to key-value pairs. * For each group of consecutive keys in the range [keys_first, keys_last) - * that are equal, \p unique_by_key removes all but the first element of + * that are equal, \p unique_by_key removes all but the first element of * the group. Similarly, the corresponding values in the range - * [values_first, values_first + (keys_last - keys_first)) + * [values_first, values_first + (keys_last - keys_first)) * are also removed. * * The return value is a \p pair of iterators (new_keys_last,new_values_last) * such that no two consecutive elements in the range [keys_first, new_keys_last) * are equal. * - * This version of \p unique_by_key uses \c operator== to test for equality and + * This version of \p unique_by_key uses \c operator== to test for equality and * \c project1st to reduce values with equal keys. * * \param keys_first The beginning of the key range. @@ -557,16 +563,16 @@ __host__ __device__ template thrust::pair - unique_by_key(ForwardIterator1 keys_first, + unique_by_key(ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first); /*! \p unique_by_key is a generalization of \p unique to key-value pairs. * For each group of consecutive keys in the range [keys_first, keys_last) - * that are equal, \p unique_by_key removes all but the first element of + * that are equal, \p unique_by_key removes all but the first element of * the group. Similarly, the corresponding values in the range - * [values_first, values_first + (keys_last - keys_first)) + * [values_first, values_first + (keys_last - keys_first)) * are also removed. * * This version of \p unique_by_key uses the function object \c binary_pred @@ -622,7 +628,7 @@ template unique_by_key(const thrust::detail::execution_policy_base &exec, - ForwardIterator1 keys_first, + ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first, BinaryPredicate binary_pred); @@ -630,9 +636,9 @@ __host__ __device__ /*! \p unique_by_key is a generalization of \p unique to key-value pairs. * For each group of consecutive keys in the range [keys_first, keys_last) - * that are equal, \p unique_by_key removes all but the first element of + * that are equal, \p unique_by_key removes all but the first element of * the group. Similarly, the corresponding values in the range - * [values_first, values_first + (keys_last - keys_first)) + * [values_first, values_first + (keys_last - keys_first)) * are also removed. * * This version of \p unique_by_key uses the function object \c binary_pred @@ -679,7 +685,7 @@ template thrust::pair - unique_by_key(ForwardIterator1 keys_first, + unique_by_key(ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first, BinaryPredicate binary_pred); @@ -748,7 +754,7 @@ template unique_by_key_copy(const thrust::detail::execution_policy_base &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_result, @@ -809,7 +815,7 @@ template thrust::pair - unique_by_key_copy(InputIterator1 keys_first, + unique_by_key_copy(InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_result, @@ -883,7 +889,7 @@ template unique_by_key_copy(const thrust::detail::execution_policy_base &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_result, @@ -949,7 +955,7 @@ template thrust::pair - unique_by_key_copy(InputIterator1 keys_first, + unique_by_key_copy(InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_result, @@ -958,7 +964,7 @@ template[first, last) - * with the same value, + * with the same value, * * This version of \p unique_count uses the function object \p binary_pred to test for equality. * @@ -1005,7 +1011,7 @@ __host__ __device__ /*! \p unique_count counts runs of equal elements in the range [first, last) - * with the same value, + * with the same value, * * This version of \p unique_count uses \c operator== to test for equality. * @@ -1050,7 +1056,7 @@ __host__ __device__ /*! \p unique_count counts runs of equal elements in the range [first, last) - * with the same value, + * with the same value, * * This version of \p unique_count uses the function object \p binary_pred to test for equality. * @@ -1092,7 +1098,7 @@ __host__ __device__ /*! \p unique_count counts runs of equal elements in the range [first, last) - * with the same value, + * with the same value, * * This version of \p unique_count uses \c operator== to test for equality. * diff --git a/thrust/thrust/universal_allocator.h b/thrust/thrust/universal_allocator.h index 8d85cd20de0..742bb559a3d 100644 --- a/thrust/thrust/universal_allocator.h +++ b/thrust/thrust/universal_allocator.h @@ -24,6 +24,12 @@ #include +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // #include the device system's vector header #define __THRUST_DEVICE_SYSTEM_MEMORY_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/memory.h> #include __THRUST_DEVICE_SYSTEM_MEMORY_HEADER diff --git a/thrust/thrust/universal_ptr.h b/thrust/thrust/universal_ptr.h index 9d1de19d5f1..122ade0ed11 100644 --- a/thrust/thrust/universal_ptr.h +++ b/thrust/thrust/universal_ptr.h @@ -22,5 +22,13 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + #include diff --git a/thrust/thrust/universal_vector.h b/thrust/thrust/universal_vector.h index 0ce38fd868c..311f31473f7 100644 --- a/thrust/thrust/universal_vector.h +++ b/thrust/thrust/universal_vector.h @@ -22,6 +22,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include // #include the device system's vector header diff --git a/thrust/thrust/version.h b/thrust/thrust/version.h index 71f1adb6951..8c3fa09acaf 100644 --- a/thrust/thrust/version.h +++ b/thrust/thrust/version.h @@ -28,6 +28,14 @@ #pragma once +#include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC + // This is the only Thrust header that is guaranteed to // change with every Thrust release. // diff --git a/thrust/thrust/zip_function.h b/thrust/thrust/zip_function.h index 7653f9b7f3e..b5b725b61dd 100644 --- a/thrust/thrust/zip_function.h +++ b/thrust/thrust/zip_function.h @@ -8,6 +8,12 @@ #pragma once #include + +#if defined(_CCCL_COMPILER_NVHPC) && defined(_CCCL_USE_IMPLICIT_SYSTEM_DEADER) +#pragma GCC system_header +#else // ^^^ _CCCL_COMPILER_NVHPC ^^^ / vvv !_CCCL_COMPILER_NVHPC vvv +_CCCL_IMPLICIT_SYSTEM_HEADER +#endif // !_CCCL_COMPILER_NVHPC #include #include