CUDA shared memory issue in outputs depending on extern declaration and size of array

后端 未结 1 471
自闭症患者
自闭症患者 2020-12-22 08:46

If I am experimenting with shared memory in CUDA and I do not understand its behaviour in this bit of code. I have a pretty basic kernel:

__global__ void sum         


        
相关标签:
1条回答
  • 2020-12-22 09:14

    If you use the extern qualifier you need to pass the size of the shared memory when launching the kernel.
    kernel<<< blocks, threads, size>>>(...)
    The size parameter is the size of shared memory in Bytes.

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