diff --git a/cub/cub/agent/agent_adjacent_difference.cuh b/cub/cub/agent/agent_adjacent_difference.cuh index c19cb90079a..8617c78193b 100644 --- a/cub/cub/agent/agent_adjacent_difference.cuh +++ b/cub/cub/agent/agent_adjacent_difference.cuh @@ -79,7 +79,7 @@ template struct AgentDifference { - using LoadIt = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; + using LoadIt = typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; using BlockLoad = typename cub::BlockLoadType::type; using BlockStore = typename cub::BlockStoreType::type; @@ -119,7 +119,7 @@ struct AgentDifference OffsetT num_items) : temp_storage(temp_storage.Alias()) , input_it(input_it) - , load_it(THRUST_NS_QUALIFIER::cuda_cub::core::make_load_iterator(Policy(), input_it)) + , load_it(THRUST_NS_QUALIFIER::cuda_cub::core::detail::make_load_iterator(Policy(), input_it)) , first_tile_previous(first_tile_previous) , result(result) , difference_op(difference_op) diff --git a/cub/cub/agent/agent_merge.cuh b/cub/cub/agent/agent_merge.cuh index 9ae14c3e42e..5c7d5322456 100644 --- a/cub/cub/agent/agent_merge.cuh +++ b/cub/cub/agent/agent_merge.cuh @@ -64,10 +64,10 @@ struct agent_t using key_type = typename ::cuda::std::iterator_traits::value_type; using item_type = typename ::cuda::std::iterator_traits::value_type; - using keys_load_it1 = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; - using keys_load_it2 = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; - using items_load_it1 = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; - using items_load_it2 = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; + using keys_load_it1 = typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; + using keys_load_it2 = typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; + using items_load_it1 = typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; + using items_load_it2 = typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; using block_load_keys1 = typename BlockLoadType::type; using block_load_keys2 = typename BlockLoadType::type; diff --git a/cub/cub/agent/agent_merge_sort.cuh b/cub/cub/agent/agent_merge_sort.cuh index bf4984f7256..1ec952187a7 100644 --- a/cub/cub/agent/agent_merge_sort.cuh +++ b/cub/cub/agent/agent_merge_sort.cuh @@ -91,8 +91,10 @@ struct AgentBlockSort using BlockMergeSortT = BlockMergeSort; - using KeysLoadIt = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; - using ItemsLoadIt = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; + using KeysLoadIt = + typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; + using ItemsLoadIt = + typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; using BlockLoadKeys = typename cub::BlockLoadType::type; using BlockLoadItems = typename cub::BlockLoadType::type; @@ -438,10 +440,11 @@ struct AgentMerge //--------------------------------------------------------------------- // Types and constants //--------------------------------------------------------------------- - using KeysLoadPingIt = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; - using ItemsLoadPingIt = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; - using KeysLoadPongIt = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; - using ItemsLoadPongIt = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; + using KeysLoadPingIt = typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; + using ItemsLoadPingIt = + typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; + using KeysLoadPongIt = typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; + using ItemsLoadPongIt = typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; using KeysOutputPongIt = KeyIteratorT; using ItemsOutputPongIt = ValueIteratorT; diff --git a/cub/cub/agent/agent_sub_warp_merge_sort.cuh b/cub/cub/agent/agent_sub_warp_merge_sort.cuh index b10f1cda3ea..9f98ac42e3b 100644 --- a/cub/cub/agent/agent_sub_warp_merge_sort.cuh +++ b/cub/cub/agent/agent_sub_warp_merge_sort.cuh @@ -183,8 +183,8 @@ public: using WarpMergeSortT = WarpMergeSort; - using KeysLoadItT = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; - using ItemsLoadItT = typename THRUST_NS_QUALIFIER::cuda_cub::core::LoadIterator::type; + using KeysLoadItT = typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; + using ItemsLoadItT = typename THRUST_NS_QUALIFIER::cuda_cub::core::detail::LoadIterator::type; using WarpLoadKeysT = cub::WarpLoad; using WarpLoadItemsT = diff --git a/cub/cub/device/dispatch/dispatch_merge.cuh b/cub/cub/device/dispatch/dispatch_merge.cuh index b3d0c8ab2ca..c4df61fd29a 100644 --- a/cub/cub/device/dispatch/dispatch_merge.cuh +++ b/cub/cub/device/dispatch/dispatch_merge.cuh @@ -138,7 +138,7 @@ __launch_bounds__( CompareOp>::type; using MergePolicy = typename MergeAgent::policy; - using THRUST_NS_QUALIFIER::cuda_cub::core::make_load_iterator; + using THRUST_NS_QUALIFIER::cuda_cub::core::detail::make_load_iterator; using vsmem_helper_t = vsmem_helper_impl; __shared__ typename vsmem_helper_t::static_temp_storage_t shared_temp_storage; auto& temp_storage = vsmem_helper_t::get_temp_storage(shared_temp_storage, global_temp_storage); diff --git a/cub/cub/device/dispatch/kernels/merge_sort.cuh b/cub/cub/device/dispatch/kernels/merge_sort.cuh index 1065313c20d..8401744b226 100644 --- a/cub/cub/device/dispatch/kernels/merge_sort.cuh +++ b/cub/cub/device/dispatch/kernels/merge_sort.cuh @@ -19,12 +19,13 @@ THRUST_NAMESPACE_BEGIN -namespace cuda_cub::core +namespace cuda_cub::core::detail { // We must forward declare here because make_load_iterator.h pulls in non NVRTC compilable code template -typename LoadIterator::type _CCCL_DEVICE _CCCL_FORCEINLINE make_load_iterator(PtxPlan const&, It it); -} // namespace cuda_cub::core +typename detail::LoadIterator::type _CCCL_DEVICE _CCCL_FORCEINLINE +make_load_iterator(PtxPlan const&, It it); +} // namespace cuda_cub::core::detail THRUST_NAMESPACE_END @@ -174,8 +175,8 @@ __launch_bounds__( AgentBlockSortT agent( ping, temp_storage, - THRUST_NS_QUALIFIER::cuda_cub::core::make_load_iterator(ActivePolicyT(), keys_in), - THRUST_NS_QUALIFIER::cuda_cub::core::make_load_iterator(ActivePolicyT(), items_in), + THRUST_NS_QUALIFIER::cuda_cub::core::detail::make_load_iterator(ActivePolicyT(), keys_in), + THRUST_NS_QUALIFIER::cuda_cub::core::detail::make_load_iterator(ActivePolicyT(), items_in), keys_count, keys_out, items_out, @@ -280,10 +281,10 @@ __launch_bounds__( AgentMergeT agent( ping, temp_storage, - THRUST_NS_QUALIFIER::cuda_cub::core::make_load_iterator(ActivePolicyT(), keys_ping), - THRUST_NS_QUALIFIER::cuda_cub::core::make_load_iterator(ActivePolicyT(), items_ping), - THRUST_NS_QUALIFIER::cuda_cub::core::make_load_iterator(ActivePolicyT(), keys_pong), - THRUST_NS_QUALIFIER::cuda_cub::core::make_load_iterator(ActivePolicyT(), items_pong), + THRUST_NS_QUALIFIER::cuda_cub::core::detail::make_load_iterator(ActivePolicyT(), keys_ping), + THRUST_NS_QUALIFIER::cuda_cub::core::detail::make_load_iterator(ActivePolicyT(), items_ping), + THRUST_NS_QUALIFIER::cuda_cub::core::detail::make_load_iterator(ActivePolicyT(), keys_pong), + THRUST_NS_QUALIFIER::cuda_cub::core::detail::make_load_iterator(ActivePolicyT(), items_pong), keys_count, keys_pong, items_pong, diff --git a/thrust/thrust/system/cuda/detail/core/agent_launcher.h b/thrust/thrust/system/cuda/detail/core/agent_launcher.h index b8416a59164..d9baeb47593 100644 --- a/thrust/thrust/system/cuda/detail/core/agent_launcher.h +++ b/thrust/thrust/system/cuda/detail/core/agent_launcher.h @@ -122,7 +122,7 @@ struct AgentLauncher : Agent , name(name_) , grid(static_cast((count + plan.items_per_tile - 1) / plan.items_per_tile)) , vshmem(nullptr) - , has_shmem((size_t) core::get_max_shared_memory_per_block() >= (size_t) plan.shared_memory_size) + , has_shmem((size_t) get_max_shared_memory_per_block() >= (size_t) plan.shared_memory_size) , shmem_size(has_shmem ? plan.shared_memory_size : 0) { assert(count > 0); @@ -137,7 +137,7 @@ struct AgentLauncher : Agent , name(name_) , grid(static_cast((count + plan.items_per_tile - 1) / plan.items_per_tile)) , vshmem(vshmem) - , has_shmem((size_t) core::get_max_shared_memory_per_block() >= (size_t) plan.shared_memory_size) + , has_shmem((size_t) get_max_shared_memory_per_block() >= (size_t) plan.shared_memory_size) , shmem_size(has_shmem ? plan.shared_memory_size : 0) { assert(count > 0); @@ -150,7 +150,7 @@ struct AgentLauncher : Agent , name(name_) , grid(plan.grid_size) , vshmem(nullptr) - , has_shmem((size_t) core::get_max_shared_memory_per_block() >= (size_t) plan.shared_memory_size) + , has_shmem((size_t) get_max_shared_memory_per_block() >= (size_t) plan.shared_memory_size) , shmem_size(has_shmem ? plan.shared_memory_size : 0) { assert(plan.grid_size > 0); @@ -163,19 +163,19 @@ struct AgentLauncher : Agent , name(name_) , grid(plan.grid_size) , vshmem(vshmem) - , has_shmem((size_t) core::get_max_shared_memory_per_block() >= (size_t) plan.shared_memory_size) + , has_shmem((size_t) get_max_shared_memory_per_block() >= (size_t) plan.shared_memory_size) , shmem_size(has_shmem ? plan.shared_memory_size : 0) { assert(plan.grid_size > 0); } - THRUST_RUNTIME_FUNCTION typename core::get_plan::type static get_plan(cudaStream_t, void* d_ptr = 0) + THRUST_RUNTIME_FUNCTION typename get_plan::type static get_plan(cudaStream_t, void* d_ptr = 0) { THRUST_UNUSED_VAR(d_ptr); return get_agent_plan(get_ptx_version()); } - THRUST_RUNTIME_FUNCTION typename core::get_plan::type static get_plan() + THRUST_RUNTIME_FUNCTION typename detail::get_plan::type static get_plan() { return get_agent_plan(lowest_supported_sm_arch::ver); } diff --git a/thrust/thrust/system/cuda/detail/core/load_iterator.h b/thrust/thrust/system/cuda/detail/core/load_iterator.h index 07c5eba0eaa..6f2c118b151 100644 --- a/thrust/thrust/system/cuda/detail/core/load_iterator.h +++ b/thrust/thrust/system/cuda/detail/core/load_iterator.h @@ -34,7 +34,7 @@ THRUST_NAMESPACE_BEGIN -namespace cuda_cub::core +namespace cuda_cub::core::detail { // LoadIterator @@ -52,6 +52,6 @@ struct LoadIterator cub::CacheModifiedInputIterator, It>; }; // struct Iterator -} // namespace cuda_cub::core +} // namespace cuda_cub::core::detail THRUST_NAMESPACE_END diff --git a/thrust/thrust/system/cuda/detail/core/make_load_iterator.h b/thrust/thrust/system/cuda/detail/core/make_load_iterator.h index 28c65c813ea..9497ccacca9 100644 --- a/thrust/thrust/system/cuda/detail/core/make_load_iterator.h +++ b/thrust/thrust/system/cuda/detail/core/make_load_iterator.h @@ -33,7 +33,7 @@ THRUST_NAMESPACE_BEGIN -namespace cuda_cub::core +namespace cuda_cub::core::detail { template typename LoadIterator::type _CCCL_DEVICE _CCCL_FORCEINLINE @@ -55,6 +55,6 @@ typename LoadIterator::type _CCCL_DEVICE _CCCL_FORCEINLINE make_loa return make_load_iterator_impl(it, typename is_contiguous_iterator::type()); } -} // namespace cuda_cub::core +} // namespace cuda_cub::core::detail THRUST_NAMESPACE_END diff --git a/thrust/thrust/system/cuda/detail/reduce.h b/thrust/thrust/system/cuda/detail/reduce.h index 502a92e41f7..4a467fe7176 100644 --- a/thrust/thrust/system/cuda/detail/reduce.h +++ b/thrust/thrust/system/cuda/detail/reduce.h @@ -109,7 +109,7 @@ template struct Tuning; template -struct Tuning +struct Tuning { enum { @@ -129,7 +129,7 @@ struct Tuning }; // Tuning sm30 template -struct Tuning : Tuning +struct Tuning : Tuning { // ReducePolicy1B (GTX Titan: 228.7 GB/s @ 192M 1B items) using ReducePolicy1B = @@ -204,7 +204,7 @@ struct ReduceAgent // ptx_plan type *must* only be used from device code // Its use from host code will result in *undefined behaviour* // - using ptx_plan = typename core::specialize_plan_msvc10_war::type::type; + using ptx_plan = typename core::detail::specialize_plan_msvc10_war::type::type; using TempStorage = typename ptx_plan::TempStorage; using Vector = typename ptx_plan::Vector; diff --git a/thrust/thrust/system/cuda/detail/reduce_by_key.h b/thrust/thrust/system/cuda/detail/reduce_by_key.h index a0a810e5344..b7ab31e7dfb 100644 --- a/thrust/thrust/system/cuda/detail/reduce_by_key.h +++ b/thrust/thrust/system/cuda/detail/reduce_by_key.h @@ -115,7 +115,7 @@ template struct Tuning; template -struct Tuning +struct Tuning { enum { @@ -138,7 +138,7 @@ struct Tuning }; // Tuning sm30 template -struct Tuning : Tuning +struct Tuning : Tuning { enum { @@ -162,7 +162,7 @@ struct Tuning : Tuning }; // Tuning sm35 template -struct Tuning : Tuning +struct Tuning : Tuning { enum { @@ -239,7 +239,7 @@ struct ReduceByKeyAgent }; // union TempStorage }; // struct PtxPlan - using ptx_plan = typename core::specialize_plan_msvc10_war::type::type; + using ptx_plan = typename core::detail::specialize_plan_msvc10_war::type::type; using KeysLoadIt = typename ptx_plan::KeysLoadIt; using ValuesLoadIt = typename ptx_plan::ValuesLoadIt;