OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1719 Discussions

why use clEnqueueWriteBuffer()?

Fu_J_Intel
Employee
410 Views

Hi Robert,

in your example modulatemain.cpp,  I wonder why you use clEnqueueWriteBuffer().  I looks to me clEnqueueWriteBuffer() causes extra mem copy and thus slow down computing.

thanks,

Jeffrey

0 Kudos
1 Reply
Robert_I_Intel
Employee
410 Views

 

Hi Jeffrey,

Yes, you actually don't want to use it on our hardware. The right thing to do is described here: https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics

Modulate samples don't show good host side practices: the device side is OK.

Sorry for the confusion!

0 Kudos
Reply