Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions cub/cub/device/device_partition.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,14 @@ public:
{
_CCCL_NVTX_RANGE_SCOPE("cub::DevicePartition::Flagged");

using offset_t = detail::choose_offset_t<NumItemsT>;
using ChooseOffsetT = detail::choose_signed_offset<NumItemsT>;
using offset_t = typename ChooseOffsetT::type;

// Check if the number of items exceeds the range covered by the selected signed offset type
if (const cudaError_t error = ChooseOffsetT::is_exceeding_offset_type(num_items))
{
return error;
}

// Dispatch with environment - handles all boilerplate
return detail::dispatch_with_env(env, [&]([[maybe_unused]] auto tuning, void* storage, size_t& bytes, auto stream) {
Expand Down Expand Up @@ -565,7 +572,14 @@ public:
{
_CCCL_NVTX_RANGE_SCOPE("cub::DevicePartition::If");

using offset_t = detail::choose_offset_t<NumItemsT>;
using ChooseOffsetT = detail::choose_signed_offset<NumItemsT>;
using offset_t = typename ChooseOffsetT::type;

// Check if the number of items exceeds the range covered by the selected signed offset type
if (const cudaError_t error = ChooseOffsetT::is_exceeding_offset_type(num_items))
{
return error;
}

// Dispatch with environment - handles all boilerplate
return detail::dispatch_with_env(env, [&]([[maybe_unused]] auto tuning, void* storage, size_t& bytes, auto stream) {
Expand Down
Loading