资 源 简 介
General Description
DevAr (DeviceArray) is a C++ template library that works as a wrapper for variables allocated in GPU memory. The wrapper dramatically decreases the volume of code and makes program much reliable.
Main Features
The features of the library are:
* Built-in most typical operations with arrays in device memory (fill, clear, resize, etc.), which makes code shorter and more readable.
* Checking if operation with CUDA array were successful. If any appropriate function returned anything but cudaSuccess, the exception is thrown. The feature makes programs based on the DevAr template more reliable.
How to use it?
The example of using DevAr and documentation are available on Downloads page.
Example
```
#include "DevAr.h"
... //other headers
void kernel (float* data){
... //do something
}
int main(){
DevAr devF(256); //array in device memory
float* f = new float[256];