Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

cub::DeviceSelect::Unique doesn't work with thrust::discard_iterator #406

Closed
@zasdfgbnm

Description

Sample code:

#include <cub/cub.cuh>
#include <thrust/iterator/discard_iterator.h>

int main() {
    int *p = nullptr;
    thrust::discard_iterator<int> d;
    size_t s;

    cub::DeviceSelect::Unique(nullptr, s, p, p, p, 0);    // works
    cub::DeviceSelect::Unique(nullptr, s, p, p, d, 0);    // works
    // cub::DeviceSelect::Unique(nullptr, s, p, d, p, 0);    // Error
    // cub::DeviceSelect::Unique(nullptr, s, p, d, d, 0);    // Error
}

#405 is also affected. I am not fixing this issue in #405, so the fix of this should fix cub::DeviceSelect::UniqueByKey as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions