cub::DispatchMergeSort#

template<typename KeyInputIteratorT, typename ValueInputIteratorT, typename KeyIteratorT, typename ValueIteratorT, typename OffsetT, typename CompareOpT, typename PolicyHub = detail::merge_sort::policy_hub<KeyIteratorT>, typename KernelSource = detail::merge_sort::DeviceMergeSortKernelSource<typename PolicyHub::MaxPolicy, KeyInputIteratorT, ValueInputIteratorT, KeyIteratorT, ValueIteratorT, OffsetT, CompareOpT>, typename KernelLauncherFactory = CUB_DETAIL_DEFAULT_KERNEL_LAUNCHER_FACTORY, typename VSMemHelperT = detail::merge_sort::VSMemHelper, typename KeyT = cub::detail::it_value_t<KeyIteratorT>, typename ValueT = cub::detail::it_value_t<ValueIteratorT>>
struct DispatchMergeSort#

Public Functions

inline DispatchMergeSort(
void *d_temp_storage,
size_t &temp_storage_bytes,
KeyInputIteratorT d_input_keys,
ValueInputIteratorT d_input_items,
KeyIteratorT d_output_keys,
ValueIteratorT d_output_items,
OffsetT num_items,
CompareOpT compare_op,
cudaStream_t stream,
int ptx_version,
KernelSource kernel_source = {},
KernelLauncherFactory launcher_factory = {},
)#
template<typename ActivePolicyT>
inline cudaError_t Invoke(
ActivePolicyT policy = {},
)#

Public Members

void *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.

size_t &temp_storage_bytes#

Reference to size in bytes of d_temp_storage allocation.

KeyInputIteratorT d_input_keys#

Pointer to the input sequence of unsorted input keys.

ValueInputIteratorT d_input_items#

Pointer to the input sequence of unsorted input values.

KeyIteratorT d_output_keys#

Pointer to the output sequence of sorted input keys.

ValueIteratorT d_output_items#

Pointer to the output sequence of sorted input values.

OffsetT num_items#

Number of items to sort.

CompareOpT compare_op#

Comparison function object which returns true if the first argument is ordered before the second.

cudaStream_t stream#

CUDA stream to launch kernels within. Default is stream0.

int ptx_version#
KernelSource kernel_source#
KernelLauncherFactory launcher_factory#

Public Static Functions

template<typename MaxPolicyT = typename PolicyHub::MaxPolicy>
static inline cudaError_t Dispatch(
void *d_temp_storage,
size_t &temp_storage_bytes,
KeyInputIteratorT d_input_keys,
ValueInputIteratorT d_input_items,
KeyIteratorT d_output_keys,
ValueIteratorT d_output_items,
OffsetT num_items,
CompareOpT compare_op,
cudaStream_t stream,
KernelSource kernel_source = {},
KernelLauncherFactory launcher_factory = {},
MaxPolicyT max_policy = {},
)#

Public Static Attributes

static constexpr bool KEYS_ONLY = ::cuda::std::is_same_v<ValueT, NullType>#

Whether or not there are values to be trucked along with keys.