AnsweredAssumed Answered

OpenCL constant memory

Question asked by savage309 on May 28, 2015
Latest reply on May 29, 2015 by savage309

Hi there,

I need to write code that runs both in OpenCL and CUDA.

I am having some trouble with the constant memory however.

In CUDA constant memory is file scope only (and transferred with the special API call cudaMemcpytoSymbol).

In OpenCL constant memory is function scope only (transferred as regular data).


Is there a way to declare constant memory in OpenCL in file scope, that could be set prior kerne launch (or if anybody knows how to do the opposite in CUDA) ?