
CUDA编程
siqi_fighting
这个作者很懒,什么都没留下…
展开
-
cuda编程之thread,block and grid
block中的所有线程都将在同一个stream processor中;一个kernel可被多个相同shaped blocks执行。There is a limit to the number of threads per block, since all threads of a block are expected to reside on the same processor core原创 2017-10-19 21:32:34 · 1019 阅读 · 0 评论 -
cuda编程之atomicAdd
以下内容来源于cuda c programming guide注意:函数运算完之后,会将运算结果保存在第一个参数指针指定的空间位置,返回的是old值。B.12.1.1. atomicAdd() int atomicAdd(int* address, int val);unsigned int atomicAdd(unsigned int*原创 2017-10-22 23:34:54 · 13374 阅读 · 0 评论 -
cuda编程之 __syncthreads()
__syncthreads( ) 对一个thread block中的线程进行同步。B.6. Synchronization Functionsvoid __syncthreads();waits untilall threads in the thread block have reached this point and all glob原创 2017-10-22 23:48:23 · 6412 阅读 · 0 评论 -
cuda dynamic parallelism-CUDA动态并行
cuda sample中有0_simple下的cdpSimplePrint.cu模仿了cuda dynamic parallelism。cdp指grid中的线程可生成新的grid,具体过程图示如下:cuda sample 0_Simple/cdpSimplePrint执行过程如下图:注:多个blocks可在同一个SMX上执行,__syncthreads( )同步原创 2017-10-23 00:20:07 · 1339 阅读 · 0 评论