View Full Version : Constant memory
12-07-2009, 11:05 AM
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
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.