Chinaunix首页 | 论坛 | 博客
  • 博客访问: 318296
  • 博文数量: 130
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 554
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-19 19:24
文章分类

全部博文(130)

文章存档

2016年(31)

2015年(16)

2014年(13)

2013年(70)

分类: 服务器与存储

2015-12-02 17:09:49

GPU 中CUDA(Compute Unified Device Architecture)抽象的
threads, block, and grid.
其中GPU中的thread 都执行一样的kernel代码
每个thread有自己唯一的线程ID
一个block由多个thread 组成, 线程之间可以同步执行
一个grid由多个block 组成, block之间是独立的, 按照自己的顺序执行


GPU 中的内存类型分为:
1. Global memery, 用于grid之间通信
2. share memery, 用于block之间通信
3. register memery, 用于thread self


C 语言中用到的Function以及Memery modifier
__global__ : to be called by the host but executed by the GPU
__host__ : to be called and executed by the host


__shared__ : variable in shared memory
__syncthreads() : sync of threads within a block
阅读(1454) | 评论(0) | 转发(0) |
0

上一篇:SQL COMMAND

下一篇:angularjs 学习

给主人留下些什么吧!~~