Skip to content
Discussion options

You must be logged in to vote

The compile error you are receiving is correct.

std::array is a host only type and all accessor methods are host only. Consequently, thrust::device_vector<::std::array<...>> is an invalid type.

Luckily for you you can just use cuda::std::array from #include <cuda/std/array> as a drop in replacement.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@miscco
Comment options

miscco Jun 16, 2025
Collaborator

Answer selected by hzhangxyz
Comment options

You must be logged in to vote
1 reply
@hzhangxyz
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Thrust
Labels
None yet
3 participants