Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

CL_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,

Sergio

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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