PDA

View Full Version : Constant memory



Adam Simpson
12-07-2009, 12:05 PM
I am having some trouble figuring out how to copy to constant memory space. In CUDA I could use cudamemcpytosymbol() on the host side to copy over to device constant memory. In the SDK examples i've looked at i've only seen constants passed in as kernel arguments. Is there a way to copy to constant memory space directly? Thanks

dbs2
12-07-2009, 12:32 PM
You can define data in your kernel to be constant, but you can not, as the name suggests, copy to constant data in your kernel. The data needs to be initialized before the kernel is launched, either via a kernel argument or by values within the constant address space in the kernel source.