Namespaces | |
| namespace | math |
| Device/CUDA math functions. | |
Functions | |
| template<typename... Arguments> | |
| real | launch (bool timeKernel, const ExecutionPolicy &policy, void(*f)(Arguments...), Arguments... args) |
| CUDA execution wrapper function. More... | |
| template<typename... Arguments> | |
| real | launch (bool timeKernel, void(*f)(Arguments... args), Arguments... args) |
| CUDA execution wrapper function. More... | |
| template<typename T > | |
| void | copy (T *h_var, T *d_var, std::size_t count=1, To::Target copyTo=To::device) |
| Copy between host and device and vice-versa. More... | |
| template<typename T > | |
| void | set (T *d_var, T val, std::size_t count=1) |
| Set device memory to a specific value. More... | |
| template<typename T > | |
| void | malloc (T *&d_var, std::size_t count) |
| Allocate device memory. More... | |
| template<typename T > | |
| void | free (T *d_var) |
| Free device memory. More... | |
| void cuda::copy | ( | T * | h_var, |
| T * | d_var, | ||
| std::size_t | count = 1, |
||
| To::Target | copyTo = To::device |
||
| ) |
Copy between host and device and vice-versa.
Wrapping CUDA runtime function cudaMemcpy().
| T | Variable type to be copied |
| h_var | Host variable |
| d_var | Device variable |
| count | Amount of variable to be copied |
| copyTo | Copy from device to host or from host to device |
Definition at line 30 of file cuda_runtime.h.
| void cuda::free | ( | T * | d_var | ) |
Free device memory.
| T | Variable type to be freed |
| d_var | Device variable to be freed |
Definition at line 81 of file cuda_runtime.h.
| real cuda::launch | ( | bool | timeKernel, |
| const ExecutionPolicy & | policy, | ||
| void(*)(Arguments...) | f, | ||
| Arguments... | args | ||
| ) |
CUDA execution wrapper function.
| Arguments | CUDA kernel arguments |
| timeKernel | time execution of kernel |
| policy | Execution policy |
| f | CUDA kernel (function pointer) |
| args | CUDA kernel actual arguments |
Definition at line 114 of file cuda_launcher.cuh.
| real cuda::launch | ( | bool | timeKernel, |
| void(*)(Arguments... args) | f, | ||
| Arguments... | args | ||
| ) |
CUDA execution wrapper function.
| Arguments | CUDA kernel arguments |
| timeKernel | time execution of kernel |
| f | CUDA kernel (function pointer) |
| args | CUDA kernel actual arguments |
Definition at line 153 of file cuda_launcher.cuh.
| void cuda::malloc | ( | T *& | d_var, |
| std::size_t | count | ||
| ) |
Allocate device memory.
Wrapping CUDA runtime function cudaMalloc().
| T | Variable type to be allocated |
| d_var | Device variable pointing to device memory allocated |
| count | Amount of variables or subsequent memory location to be allocated |
Definition at line 70 of file cuda_runtime.h.
| void cuda::set | ( | T * | d_var, |
| T | val, | ||
| std::size_t | count = 1 |
||
| ) |
Set device memory to a specific value.
Wrapping CUDA runtime function cudaMemset().
| T | Variable type to be set |
| d_var | Device variable or memory to be set |
| val | Value the device memory to be set |
| count | Amount of variables or subsequent memory location to be set |
Definition at line 56 of file cuda_runtime.h.