30 #ifndef HIPCUB_ROCPRIM_WARP_WARP_MERGE_SORT_
31 #define HIPCUB_ROCPRIM_WARP_WARP_MERGE_SORT_
33 #include "../../../config.hpp"
35 #include "../block/block_merge_sort.hpp"
36 #include "../util_ptx.hpp"
37 #include "../util_type.hpp"
39 #include <rocprim/functional.hpp>
40 #include <rocprim/intrinsics/thread.hpp>
42 BEGIN_HIPCUB_NAMESPACE
122 int ITEMS_PER_THREAD,
123 int LOGICAL_WARP_THREADS = HIPCUB_DEVICE_WARP_THREADS,
124 typename ValueT = NullType,
125 int PTX_ARCH = HIPCUB_ARCH>
130 LOGICAL_WARP_THREADS,
132 WarpMergeSort<KeyT, ITEMS_PER_THREAD, LOGICAL_WARP_THREADS, ValueT, PTX_ARCH>>
135 constexpr
static bool IS_ARCH_WARP = LOGICAL_WARP_THREADS == HIPCUB_DEVICE_WARP_THREADS;
136 constexpr
static bool KEYS_ONLY = ::rocprim::Equals<ValueT, NullType>::VALUE;
137 constexpr
static int TILE_SIZE = ITEMS_PER_THREAD * LOGICAL_WARP_THREADS;
141 LOGICAL_WARP_THREADS,
145 const unsigned int warp_id;
146 const uint64_t member_mask;
151 HIPCUB_DEVICE __forceinline__
156 : (LaneId() % LOGICAL_WARP_THREADS))
157 , warp_id(IS_ARCH_WARP ? 0 : (LaneId() / LOGICAL_WARP_THREADS))
158 , member_mask(WarpMask<LOGICAL_WARP_THREADS>(warp_id))
162 HIPCUB_DEVICE __forceinline__ uint64_t get_member_mask()
const
168 HIPCUB_DEVICE __forceinline__
void SyncImplementation()
const
170 WARP_SYNC(member_mask);
Generalized merge sort algorithm.
Definition: block_merge_sort.hpp:175
The WarpMergeSort class provides methods for sorting items partitioned across a CUDA warp using a mer...
Definition: warp_merge_sort.hpp:133
\smemstorage{BlockMergeSort}
Definition: block_merge_sort.hpp:207