- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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 kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I have only created one queue,as following:
queue = clCreateCommandQueue(context, device, CL_QUEUE_PROFILING_ENABLE, &status); checkError(status, "Failed to create command queue")- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite