CUDA:纹理内存及其使用
2017-12-23 19:42
573 查看
本博客参考资料来源如下:
http://cuda-programming.blogspot.com/2013/02/texture-memory-in-cuda-what-is-texture.html
http://blog.csdn.net/ai_vivi/article/details/42235787
http://blog.csdn.net/traceorigin/article/details/9213453
https://devtalk.nvidia.com/default/topic/489304/size-of-constant-cache-and-texture-cache/
https://devtalk.nvidia.com/default/topic/805057/cuda-programming-and-performance/cudabindtexture2d-showing-error-
http://blog.csdn.net/yh880/article/details/50715844
https://stackoverflow.com/questions/22083499/constant-cache-vs-texture-cache-for-broadcasting-behaviour-in-cuda
http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#features-and-technical-specifications__technical-specifications-per-compute-capability
http://bbs.csdn.net/topics/390806590
http://bbs.csdn.net/topics/390818003
关于使用Texture Memory的好处,我已经在CUDA性能测试中做了比较详细的测试,此处就不详细介绍。
https://github.com/Yannnnnnnnnnnn/cpu_cuda_compare/blob/master/cuda_texture.cu
https://github.com/Yannnnnnnnnnnn/cpu_cuda_compare/blob/master/cuda_texture_2d.cu
代码中包括一维纹理和二维纹理。
http://cuda-programming.blogspot.com/2013/02/texture-memory-in-cuda-what-is-texture.html
http://blog.csdn.net/ai_vivi/article/details/42235787
http://blog.csdn.net/traceorigin/article/details/9213453
https://devtalk.nvidia.com/default/topic/489304/size-of-constant-cache-and-texture-cache/
https://devtalk.nvidia.com/default/topic/805057/cuda-programming-and-performance/cudabindtexture2d-showing-error-
http://blog.csdn.net/yh880/article/details/50715844
https://stackoverflow.com/questions/22083499/constant-cache-vs-texture-cache-for-broadcasting-behaviour-in-cuda
http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#features-and-technical-specifications__technical-specifications-per-compute-capability
http://bbs.csdn.net/topics/390806590
http://bbs.csdn.net/topics/390818003
Texture Memory
首先简单介绍一下什么是Texture Memory。从硬件角度来说,纹理内存实际上是存储在Global Memory上;唯一的区别是,当某一个变量绑定纹理内存后,在程序运行过程中会将部分信息存储在Texture Cache中,以减少线程块对Global Memory的读取,进而提高程序的运行速度。在《CUDA By Example》中的一个图片生动的描述了Texture Memory的运行模式。关于使用Texture Memory的好处,我已经在CUDA性能测试中做了比较详细的测试,此处就不详细介绍。
Texture Cache
在使用Texture Memory时,有一个比较重要的事情就是Texture Cache到底有多大内存。在查阅了一些CUDA的官方文档后,得到了以下两个表,放在下边以便再次查询。在知道了本电脑CUDA框架和版本之后,即可查阅知道Texture Cache的大小。Texture Demo
纹理内存有一维纹理内存和二维纹理内存两种,在CUDA性能测试中提到,代码链接如下:https://github.com/Yannnnnnnnnnnn/cpu_cuda_compare/blob/master/cuda_texture.cu
https://github.com/Yannnnnnnnnnnn/cpu_cuda_compare/blob/master/cuda_texture_2d.cu
代码中包括一维纹理和二维纹理。
相关文章推荐
- CUDA使用纹理内存
- CUDA纹理存储器的特性及其使用
- CUDA纹理存储器的特性及其使用
- CUDA纹理存储器的特性及其使用
- CUDA 图像处理使用纹理内存与不使用纹理内存对比
- cuda纹理内存使用例子 vs2013 cuda7.5
- CUDA中多维数组以及多维纹理内存的使用
- cuda纹理内存使用
- CUDA纹理存储器的特性及其使用
- CUDA使用纹理内存
- CUDA纹理内存的使用
- CUDA内存--纹理内存的说明与使用
- cuda纹理内存的使用
- CUDA二维纹理内存+OpenCV图像滤波
- CUDA:纹理内存
- CUDA:2D纹理内存
- cuda 内存分类和使用
- 【郝斌数据结构自学笔记】10-11_跨函数使用内存讲解及其示例
- 内存映射mmap的几个api及其使用
- cuda纹理内存简单操作 (2015年)