Appropriate usage of cudaGetSymbolAddress and cudaMemcpyToSymbol with global memory?

后端 未结 1 1531
一向
一向 2021-01-27 04:48

I am fairly new to CUDA and am familiar with the normal usage of cudaMalloc and cudaMemcpy and also with cudaMemcpyToSymbol f

1条回答
  •  自闭症患者
    2021-01-27 05:37

    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

    0 讨论(0)
提交回复
热议问题