|
| void | check_error (const char *file, const int line) |
| | Terminate if cudaGetLastError() returns error. More...
|
| |
| void | async_check_error (const char *file, const int line) |
| | Terminate if cudaGetLastError() returns error. More...
|
| |
| void | safe_call (cudaError_t err, const char *file, const int line) |
| | Wrapper to check error code for any cuda call that returns one. Terminates if error is returned. More...
|
| |
| void | handler (std::exception &e, const char *file, const int line) |
| | Simple exception handler. More...
|
| |
| template<typename T > |
| T * | device_malloc (int n) throw (exception) |
| | Allocate memory on device. More...
|
| |
| template<typename T > |
| T * | mapped_malloc (int n) throw (exception) |
| | Allocate mapped memory on host. More...
|
| |
| template<typename T > |
| T * | host_malloc (int n) throw ( exception ) |
| | Allocate host memory. More...
|
| |
| template<typename T > |
| void | device_free (T *ptr) throw ( exception ) |
| | Free device memory. More...
|
| |
| template<typename T > |
| void | mapped_free (T *ptr) throw ( exception ) |
| | Free mapped memory. More...
|
| |
| template<typename T > |
| void | host_free (T *ptr) |
| | Free host memory (included just for consistency). More...
|
| |
| template<typename T > |
| void | copy_device_to_host (T *dest, T *src, int n) throw ( exception ) |
| | Copy from device to host. More...
|
| |
| template<typename T > |
| void | copy_host_to_device (T *dest, T *src, int n) throw ( exception ) |
| | Copy from host to device. More...
|
| |
| template<typename T > |
| void | copy_device_to_device (T *dest, T *src, int n) throw ( exception ) |
| | Copy from device to device. More...
|
| |
| template<typename T > |
| void | copy_host_to_host (T *dest, T *src, int n) throw ( exception ) |
| | Copy from host to host. More...
|
| |
| void | device_synchronize () throw ( exception ) |
| | Wrapper for cudaDeviceSynchronize() More...
|
| |
| void | get_memory_info () throw ( exception ) |
| | Wrapper for cudaMemGetInfo() More...
|
| |
| template<typename T1 , typename T2 > |
| __global__ void | fill (T1 *z, T2 a, int n) |
| | Fill device array z with constant a. More...
|
| |
| template<typename T1 , typename T2 > |
| __global__ void | seq (T1 *z, T2 first, int n) |
| | Fill device array z with sequence. More...
|
| |
| template<typename T1 , typename T2 > |
| __global__ void | seq (T1 *z, T2 first, T2 inc, int n) |
| | Fill device array z with sequence. More...
|
| |
| template<typename T1 , typename T2 > |
| __global__ void | rep (T1 *z, int n, T2 *x, int nx, int ncopies) |
| | Fill device array z with values from x, repeated ncopies times. More...
|
| |
| template<typename T1 , typename T2 > |
| __global__ void | tile (T1 *z, int n, T2 *x, int nx, int ncopies) |
| | Fill device array z with values from x, tiled ncopies times. More...
|
| |
| __global__ void | aX_plus_bY (float *z, float a, float *x, float b, float *y, int n) |
| | Elementwise operation, z = a*x + b*y. More...
|
| |
| __global__ void | max_X_Y (float *z, float *x, float *y, int n) |
| | Elementwise operation, z = max( x, y ) More...
|
| |
| __global__ void | min_X_Y (float *z, float *x, float *y, int n) |
| | Elementwise operation, z = min( x, y) More...
|
| |
| __global__ void | log_X (float *z, float *x, int n) |
| | Elementwise operation, z = log( x ) More...
|
| |
| __global__ void | exp_X (float *z, float *x, int n) |
| | Elementwise operation, z = exp( x ) More...
|
| |
Core macros and utilities.