Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEA]: Introduce new DeviceReduce::Arg{Min,Max} interface with two output iterators #3146

Open
1 task done
elstehle opened this issue Dec 12, 2024 · 0 comments · May be fixed by #3148
Open
1 task done

[FEA]: Introduce new DeviceReduce::Arg{Min,Max} interface with two output iterators #3146

elstehle opened this issue Dec 12, 2024 · 0 comments · May be fixed by #3148
Assignees
Labels
2.8.0 target for 2.8.0 release feature request New feature or request.

Comments

@elstehle
Copy link
Collaborator

Is this a duplicate?

Area

CUB

Is your feature request related to a problem? Please describe.

The cub::DeviceReduce::Arg{Min,Max} interfaces currently return the (extremum, index)-tuple of the result as a cub::KeyValuePair. This interface has shortcomings that were discussed in #414 (comment) and in https://github.com/NVIDIA/cccl/pull/2647/files#r1824185104.

Describe the solution you'd like

The following interface works around the referenced shortcomings and provides users with a more flexible and convenient interface, allowing to mix-and-match arbitrary output iterator combinations to which the index and extremum are written:

static cudaError_t ArgMin(
    void* d_temp_storage,
    size_t& temp_storage_bytes,
    InputIteratorT d_in,
    ExtremumOutIteratorT d_min_out,
    IndexOutIteratorT d_index_out,
    ::cuda::std::int64_t num_items,
    cudaStream_t stream)

Describe alternatives you've considered

No response

Additional context

No response

@elstehle elstehle added the feature request New feature or request. label Dec 12, 2024
@github-project-automation github-project-automation bot moved this to Todo in CCCL Dec 12, 2024
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Dec 12, 2024
@elstehle elstehle added the 2.8.0 target for 2.8.0 release label Dec 14, 2024
@elstehle elstehle self-assigned this Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.8.0 target for 2.8.0 release feature request New feature or request.
Projects
Status: In Review
Development

Successfully merging a pull request may close this issue.

1 participant