A class representing a CUDA 2D device memory allocation for Matrix container. More...
#include <device_mem_pointer_matrix_cu.h>
Public Member Functions | |
| DeviceMemPointer_Matrix_CU (T *start, int rows, int cols, Device_CU *device, bool usePitch=false) | |
| ~DeviceMemPointer_Matrix_CU () | |
| void | copyHostToDevice (int rows=-1, int cols=-1) const |
| void | copyDeviceToHost (int rows=-1, int cols=-1) const |
| T * | getDeviceDataPointer () const |
| int | getDeviceID () const |
| void | changeDeviceData () |
A class representing a CUDA 2D device memory allocation for Matrix container.
This class represents a CUDA device memory allocation and controls the data transfers between host and device.
| skepu::DeviceMemPointer_Matrix_CU< T >::DeviceMemPointer_Matrix_CU | ( | T * | start, |
| int | rows, | ||
| int | cols, | ||
| Device_CU * | device, | ||
| bool | usePitch = false |
||
| ) |
The constructor allocates a certain amount of space in device memory internally as 1D and stores a pointer to same data in host memory.
| start | Pointer to data in host memory. |
| rows | Number of rows. |
| cols | Number of columns. |
| deviceID | ID of a valid CUDA device to allocate memory on. |
References skepu::Device_CU::getDeviceID().

| skepu::DeviceMemPointer_Matrix_CU< T >::~DeviceMemPointer_Matrix_CU | ( | ) |
The destructor releases the allocated device memory.
| void skepu::DeviceMemPointer_Matrix_CU< T >::changeDeviceData | ( | ) |
Marks the device data as changed.
| void skepu::DeviceMemPointer_Matrix_CU< T >::copyDeviceToHost | ( | int | rows = -1, |
| int | cols = -1 |
||
| ) | const |
Copies data from device memory to host memory. Only copies if data on device has been marked as changed.
| rows | Number of rows. |
| cols | Number of columns. |
| void skepu::DeviceMemPointer_Matrix_CU< T >::copyHostToDevice | ( | int | rows = -1, |
| int | cols = -1 |
||
| ) | const |
Copies data from host memory to device memory.
| rows | Number of rows. |
| cols | Number of columns. |
| T * skepu::DeviceMemPointer_Matrix_CU< T >::getDeviceDataPointer | ( | ) | const |
| int skepu::DeviceMemPointer_Matrix_CU< T >::getDeviceID | ( | ) | const |
1.8.5