Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

CUDA __constant__

// Initialised as a global variable
__constant__ float constData[256];
...
float data[256];
// Pass data to constData (in the texture memory of the GPU)
cudaMemcpyToSymbol(constData, data, sizeof(data), 0, cudaMemcpyHostToDevice));
Source by docs.nvidia.com #
 
PREVIOUS NEXT
Tagged: #CUDA
ADD COMMENT
Topic
Name
6+6 =