我的新博客

随笔分类 -  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 阅读全文
posted @ 2016-10-08 01:14 Leon#0534 阅读(3347) 评论(0) 推荐(0)
摘要: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= 阅读全文
posted @ 2016-10-07 21:22 Leon#0534 阅读(838) 评论(0) 推荐(0)
摘要:一个grid包含多个blocks,这些blocks的组织方式可以是一维,二维或者三维。任何一个block包含有多个Threads,这些Threads的组织方式也可以是一维,二维或者三维。举例来讲:比如上图中,任何一个block中有10个Thread,那么,Block(0,0)的第一个Thread的T 阅读全文
posted @ 2016-10-07 16:46 Leon#0534 阅读(1005) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2016-10-06 23:54 Leon#0534 阅读(153) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2016-10-06 22:21 Leon#0534 阅读(1064) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2016-10-06 20:38 Leon#0534 阅读(1289) 评论(1) 推荐(0)
摘要: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. 阅读全文
posted @ 2016-10-01 01:55 Leon#0534 阅读(244) 评论(0) 推荐(0)

我的新博客

专注天线学习,欢迎交流 yangli0534@gmail.com - 创建于 2010年

我永远是茫茫EE领域的一名小学生。