私はdevice_vector
構造を通過しようとしています
struct point
{
unsigned int x;
unsigned int y;
}
次の方法で関数に:
void print(thrust::device_vector<point> &points, unsigned int index)
{
std::cout << points[index].y << points[index].y << std::endl;
}
myvector は正しく初期化されました
print(myvector, 0);
次のエラーが表示されます。
error: class "thrust::device_reference<point>" has no member "x"
error: class "thrust::device_reference<point>" has no member "y"
どうしたの?