Forum Discussion
Altera_Forum
Honored Contributor
9 years agoMemory leak using emulator
Hi I'm working on transforming a CUDA program to OpenCL and run on FPGA, right now I'm using the emulator since I don't have the device yet. I wrote a OpenCL kernel that do some simple comput...
Altera_Forum
Honored Contributor
9 years ago --- Quote Start --- Do you mean CL_MEM_COPY_HOST_PTR is the proper way? I did try it but the result was the same. --- Quote End --- No, if you are going to manually copy the host buffer to device using clWriteBuffer, you should create your device buffer like this:
cl_mem cl_d_afPadScnOut = clCreateBuffer(context, CL_MEM_READ_WRITE, giScnMemSzCmplx, NULL, NULL);