0
clEnqueueMapBufferを使用してカーネルから計算結果を取得するときに問題が発生しましたが、エラーなしでクラッシュします。私のプロセスは、下にある:OpenCL:なぜclEnqueueMapBufferを使用するのは、エラーのないクラッシュですか?
.
.
// Create a buffer in Host, and use CL_MEM_USE_HOST_PTR in device
int out_data;
cl_mem cl_dst = clCreateBuffer(context_CL, CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR, sizeof(int), &out_data, &err);
.
.
//Do something in a kernel(ignore the detail of kernel and other input data, because there is no wrong there. the output is cl_dst(INT))
err = clEnqueueNDRangeKernel(....)
.
.
//Mapping the result back to the host
clEnqueueMapBuffer(queue_CL, cl_dst, CL_TRUE, CL_MAP_READ, 0, sizeof(cl_dst), 0, NULL, NULL, &err);
//And then my graphic card shut down here at this command...
.
.
.
私のグラフィックカードであるインテルHD 5500(サポートOpenCLの2.0) 私はどこか、いくつかの重要な概念が欠落し、間違った旗を持っていますか?
あなたの答えはありがとうございますが、私は同じ結果を得ています。まだ何か不足していますか? – Robin