Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只是想知道调用 CUDA 内核函数与
<<<BLOCK_NUM, THREAD_NUM>>>
和
<<<BLOCK_NUM, THREAD_NUM, THREAD_NUM * sizeof(float)>>> ?
第二种情况下的附加参数指定要分配给内核中每个块的动态共享内存量。
例如,如果您有这样定义的内核:
__global__ void kernel(...) { extern __shared__ float buffer[]; }
第二次内核启动将尝试为内核的每个块分配THREAD_NUM共享内存数组的字。buffer有关详细信息,请参阅 CUDA 4.1 编程指南的附录 B.17。
THREAD_NUM
buffer