随笔分类 - cuda
摘要:计算20000次10000点的fft,分别使用CPU和GPU,得 the running time of cpu is : 2.3696s the running time of gpu is : 0.3425s 相同的参数matlab处理的时间为 1.2865s ,理论上gpu最快,cpu次之,m
阅读全文
摘要:i=0 f= 0.0Hz RealAmp=-0.0 ImagAmp=+0.0ii=1 f= 10000.0Hz RealAmp=-0.0 ImagAmp=+0.0ii=2 f= 20000.0Hz RealAmp=-0.0 ImagAmp=+0.0ii=3 f= 30000.0Hz RealAmp=
阅读全文
摘要:一个grid包含多个blocks,这些blocks的组织方式可以是一维,二维或者三维。任何一个block包含有多个Threads,这些Threads的组织方式也可以是一维,二维或者三维。举例来讲:比如上图中,任何一个block中有10个Thread,那么,Block(0,0)的第一个Thread的T
阅读全文
摘要:22+103+61+63+17 = 266 22^2+103^2+61^2+63^2+17^2 = 19072 22*103*61*63*17 = 17 22^103^61^63^17 = 98
阅读全文
摘要:1 #include "cuda_runtime.h" 2 #include "device_launch_parameters.h" 3 #include <stdio.h> 4 #include <time.h> 5 #include <stdlib.h> 6 7 #define MAX 120
阅读全文
摘要:1GPUs can handle thousands of concurrent threads. 2The pieces of code running on the gpu are called kernels 3A kernel is executed by a set of threads.
阅读全文

浙公网安备 33010602011771号