I am fairly new to CUDA and am familiar with the normal usage of cudaMalloc and cudaMemcpy and also with cudaMemcpyToSymbol f
CUDA
cudaMalloc
cudaMemcpy
cudaMemcpyToSymbol
When global memory is allocated dynamically using cudaMalloc, then the correct copying API to use is cudaMemcpy.
When global memory is allocated statically:
__device__ int my_data[DSIZE];
then the correct API to use is cudaMemcpyToSymbol or cudaMemcpyFromSymbol
cudaMemcpyFromSymbol