Cuda在努力构造一个类似CPP的完整的编程环境,所以他提供了一系列的库。
http://docs.nvidia.com/cuda/index.html
1) math API
类比C的math库有三角函数、对数、指数等基本的函数。
2) thrust
STL类似的Cuda实现,可以实现快速的排序,变换等操作。
http://docs.nvidia.com/cuda/thrust/index.html
3) 科学计算和图像视频处理相关的库,满足科学计算加速的基本需求。
如BLAS FFT SPARSE等。
4) 面向CUDA编程的device API 和 runtime API
这两个是不同层次的编程环境,彼此互斥,device的更底层。各有所长看需求。
It is composed of two APIs:
- A low-level API called the CUDA driver API,
- A higher-level API called the CUDA runtime API that is implemented on top of the CUDA driver API.
These APIs are mutually exclusive: An application should use either one or the other.
The CUDA runtime eases device code management by providing implicit initialization, context management, and module ma