2 Replies Latest reply on May 29, 2015 1:24 AM by savage309

    OpenCL constant memory

    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) ?

       

      Thanks.