- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
status = clEnqueueWriteBuffer(queue, d_OptionData_bino, CL_TRUE,
0, NUM_OPT * sizeof(__TOptionData_Bino), h_OptionData_bino, 0, NULL, NULL); checkError(status, "Failed to transfer input A"); status = clSetKernelArg(kernel, argi++, sizeof(cl_mem), (void*)&d_OptionData_bino); checkError(status, "Failed to set argument %d", argi - 1); h_OptionData_bino is the CPU input data structure,type is "__TOptionData_Bino", the values input are correct(printf tells),but nothing has been transferred to FPGA(also printf()).checkError function doesn't show anything. I was using a emulation aocx to run with exe without FPGA board, I do not know whether it matters. Can anyone help me?Thanks a lot !Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
add event to clEnqueueWriteBuffer function, Events are used to ensure that the kernel is not launched until the writes to the input buffers have completed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This should not matter since if both commands are launched in the same queue, they WILL be run sequentially and the clEnqueueWriteBuffer will start and finish BEFORE the kernel is launched. Furthermore, passing CL_TRUE as the third argument of "clEnqueueWriteBuffer" forces the write operation to be blocking, and the host process will be locked until the host to device transfer is done. The only way the kernel might be launched before clEnqueueWriteBuffer finishes is if the two commands are launched in different queues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have only created one queue,as following:
queue = clCreateCommandQueue(context, device, CL_QUEUE_PROFILING_ENABLE, &status); checkError(status, "Failed to create command queue")- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page