brucefan1983 / CUDA-Programming

Sample codes for my CUDA programming book
GNU General Public License v3.0
1.59k stars 326 forks source link

extern __shared__ real s_y[]; #20

Closed wangzhankun closed 1 year ago

wangzhankun commented 2 years ago

08-shared-memory/reduce2gpu.cu文件中有

extern __shared__ real s_y[];

请问这里为什么可以使用extern呢?该数组是在哪里定义的呢?

fever-Wong commented 2 years ago

谢谢,您发给我的邮件已经收到,我会尽快处理。Thank you,the email you sent me has been received and I will handle it as soon as possible.王景博fever wong

brucefan1983 commented 2 years ago

这是“动态"共享内存定义的语法,参见书的8.1.3节。