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

thrust::device_vector should have an std::initializer_list constructor #1835

@Eren121

Description

@Eren121

Currently, its not possible to do:

thrust::device_vector<int> v{4, 8, 0, 8, 4, 2, 8};

But instead we need to do:

thrust::device_vector<int> v{std::vector<int>{4, 8, 0, 8, 4, 2, 8}};

Because there are no constructor taking a std::initializer_list, unlike std::vector.

Could it be possible to add this?

This shoud be straightforward to add, using other constructors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions