When my host program is in C language I can pass two options as an argument of an OpenCL function. For example, I can pass two
flags to the clCreateBuffer
function like this:
clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, sizeof(main_data), main_data, &err)
However, when I try to do the same in a host program written in Fortran:
main_data=clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, & sizeof(main_data), C_NULL_PTR, err)
I get an error:
& |CL_MEM_COPY_HOST_PTR, size_in_bytes,C_NULL_PTR,ierr)
1
Error: Syntax error in argument list at (1)
I have successfully compiled some other programs with CLFORTRAN, but whenever I try to pass two flags like CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR
I get the above error.