Forum Discussion
Altera_Forum
Honored Contributor
11 years agoCL_MEM_BANK flag
Hi everyone,
in my OpenCL project I am trying to assign a buffer to a specific memory bank using the flag CL_MEM_BANK_1_ALTERA in the clCreateBuffer function. What I don't understand is where I need to define these flag, since I am getting a compiler error (variable not defined). Thanks, Sergio2 Replies
- Altera_Forum
Honored Contributor
Hi Sergio,
Have you looked at the matrix multiplication example? Did you place it in the correct argument of the clCreatedBuffer function like below? " buf[i] = clCreateBuffer(context, CL_MEM_BANK_1_ALTERA, buffer_size, NULL, &status); " BTW: The flags are defined in cl_ext.h file and as long as you include CL/opencl.h it should be fine. Cheers, Ryan - Altera_Forum
Honored Contributor
Thanks Ryan. Now it works. I just forgot to include the .h.