编译 VexCL 程序时出错:raw_ptr 不是 device_vector 的成员
Error compiling VexCL program: raw_ptr not a member of device_vector
我正在尝试使用推力示例编译我的第一个 VexCL 程序,但收到以下错误消息:
raw_ptr 不是 'vex::backend::opencl::device_vector'
的成员
这是代码
vex::Context ctx(vex::Filter::Env && vex::Filter::Count(1));
std::cout << ctx << std::endl;
vex::profiler<> prof(ctx);
typedef int T;
const size_t n = 16 * 1024 * 1024;
vex::vector<T> x(ctx, n);
vex::Random<T> rnd;
// Get raw pointers to the device memory.
T *x_begin = x(0).raw_ptr(); // Here is where the error is occurring.
T *x_end = x_begin + x.size();
我的语言不太懂。感谢您在此问题上提供的任何帮助。
谢谢
克里斯
我正在尝试使用推力示例编译我的第一个 VexCL 程序,但收到以下错误消息:
raw_ptr 不是 'vex::backend::opencl::device_vector'
的成员这是代码
vex::Context ctx(vex::Filter::Env && vex::Filter::Count(1));
std::cout << ctx << std::endl;
vex::profiler<> prof(ctx);
typedef int T;
const size_t n = 16 * 1024 * 1024;
vex::vector<T> x(ctx, n);
vex::Random<T> rnd;
// Get raw pointers to the device memory.
T *x_begin = x(0).raw_ptr(); // Here is where the error is occurring.
T *x_end = x_begin + x.size();
我的语言不太懂。感谢您在此问题上提供的任何帮助。
谢谢
克里斯