Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

CL_MEM_BANK flag

Altera_Forum
Honored Contributor II
1,404 Views

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, 

Sergio
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
414 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
414 Views

Thanks Ryan. Now it works. I just forgot to include the .h.

0 Kudos
Reply