|
| static void | Zero (T *p, size_t size, cudaStream_t stream=0) |
| static void | Copy (T *pout, const T *pin, long size, cudaStream_t stream=0) |
| template<typename S> |
| static void | Copy (T *pout, const S *pin, long size, cudaStream_t stream=0) |
| static void | Write (T *p, long nx, long ny, const char *keywords, file_t *fp, cudaStream_t stream=0) |
| static void | Write (T *p, long nx, long ny, const char *keywords, const char *format,...) |
◆ operator new[]()
template<typename T>
| void * Gpu< T >::operator new[] |
( |
size_t | size | ) |
|
Allocate zero initialized device memory.
- Parameters
-
- Returns
- Allocated memory. Freed with delete[].
◆ operator delete[]()
template<typename T>
| void Gpu< T >::operator delete[] |
( |
void * | p | ) |
|
Free device memory.
- Parameters
-
◆ Zero()
template<typename T>
| void Gpu< T >::Zero |
( |
T * | p, |
|
|
size_t | size, |
|
|
cudaStream_t | stream = 0 ) |
|
static |
Zero device memory asynchronously.
- Parameters
-
| [out] | p | Memory to zero. Nothing is done if NULL. |
| [in] | size | Number of elements. |
| [in] | stream | Stream to run in. |
◆ Copy() [1/2]
template<typename T>
| void Gpu< T >::Copy |
( |
T * | pout, |
|
|
const T * | pin, |
|
|
long | size, |
|
|
cudaStream_t | stream = 0 ) |
|
static |
Copy device memory asynchronously.
- Parameters
-
| [out] | pout | Destination. |
| [in] | pin | Source. |
| [in] | size | Number of elements. |
| [in] | stream | Stream to run in. |
◆ Copy() [2/2]
template<typename T>
template<typename S>
| void Gpu< T >::Copy |
( |
T * | pout, |
|
|
const S * | pin, |
|
|
long | size, |
|
|
cudaStream_t | stream = 0 ) |
|
static |
Copy device memory with type conversion. See copy_do().
- Parameters
-
| [out] | pout | Destination. |
| [in] | pin | Source. |
| [in] | size | Number of elements. |
| [in] | stream | Stream to run in. |
◆ Write() [1/2]
template<typename T>
| void Gpu< T >::Write |
( |
T * | p, |
|
|
long | nx, |
|
|
long | ny, |
|
|
const char * | keywords, |
|
|
file_t * | fp, |
|
|
cudaStream_t | stream = 0 ) |
|
static |
Copy device array to host and write it to file. Synchronizes stream.
- Parameters
-
| [in] | p | Device array of nx*ny. |
| [in] | nx | Number of rows. |
| [in] | ny | Number of columns. |
| [in] | keywords | Header keywords. May be NULL. |
| [in,out] | fp | File to write to. |
| [in] | stream | Stream to copy in. |
◆ Write() [2/2]
template<typename T>
| void Gpu< T >::Write |
( |
T * | p, |
|
|
long | nx, |
|
|
long | ny, |
|
|
const char * | keywords, |
|
|
const char * | format, |
|
|
| ... ) |
|
static |
Copy device array to host and write it to a file named by format.
- Parameters
-
| [in] | p | Device array of nx*ny. |
| [in] | nx | Number of rows. |
| [in] | ny | Number of columns. |
| [in] | keywords | Header keywords. May be NULL. |
| [in] | format | printf style format of the file name, followed by arguments. |
The documentation for this class was generated from the following file: