Hello, everyone.
I am trying to make up pointers such as x,y,z and radius structure from text file.
Moreover, there are so many pointers and I though i have to use with std::vector.
making a c coding, i made success without any troubles.
However, I cannot declare std::vector in CUDA. so I tried to find out solutions and there were some ways such as using the thrust::vector. But when I used to declare “device_vector” with structure, I failed to show up members or variables.
following code is sample of my work.
typedef struct inputs {
int idx;
int u, v;
float x, y, z = 0;
int r, g, b;
}point3d;
This is my structure.
thrust::host_vector<point3d> alpha;
(....reading from text files)
thrust::device_vector<point3d> beta = alpha;
beta[0]. // here is my problem. i need to call member from structure but i can only find a members like 'operator inputs','operator %=','operator &', and etc.
So, this is my question.
How can I use with device_vector with structure to GPU?
if we cannot use structure with device_vector, then what can I find an alternative way?