Wraps both a host and device ParallArray and exposes methods for synchronizing between the two. More...
#include <parallel_array.h>
Wraps both a host and device ParallArray and exposes methods for synchronizing between the two.
Definition at line 151 of file parallel_array.h.
typedef PMemManager::device_type parallel_utils::ParallelHDArray< Type, PType >::DType [private] |
Definition at line 154 of file parallel_array.h.
typedef PMemManager::host_type parallel_utils::ParallelHDArray< Type, PType >::HType [private] |
Definition at line 155 of file parallel_array.h.
typedef PMemManager::mem_flags parallel_utils::ParallelHDArray< Type, PType >::MemFlags [private] |
Definition at line 157 of file parallel_array.h.
typedef MemManager<Type,PType> parallel_utils::ParallelHDArray< Type, PType >::PMemManager [private] |
Definition at line 153 of file parallel_array.h.
typedef PMemManager::stream_type parallel_utils::ParallelHDArray< Type, PType >::SType [private] |
Definition at line 156 of file parallel_array.h.
parallel_utils::ParallelHDArray< Type, PType >::ParallelHDArray | ( | ArraySize | size = 0 , |
|
MemFlags | flags = 0 , |
|||
SType | stream = 0 | |||
) | [inline] |
Constructs an instance of the class, initializing both host and device arrays
size | The number of elements | |
flags | Flags governing memory operations | |
stream |
Definition at line 168 of file parallel_array.h.
virtual parallel_utils::ParallelHDArray< Type, PType >::~ParallelHDArray | ( | ) | [inline, virtual] |
Destroys the object, freeing both host and device arrays
Definition at line 176 of file parallel_array.h.
ArraySize parallel_utils::ParallelHDArray< Type, PType >::getByteSize | ( | ArraySize | arraySize | ) | const [inline] |
Definition at line 251 of file parallel_array.h.
ArraySize parallel_utils::ParallelHDArray< Type, PType >::getByteSize | ( | ) | const [inline] |
Definition at line 250 of file parallel_array.h.
DType parallel_utils::ParallelHDArray< Type, PType >::getDeviceBuffer | ( | ArraySize | offset | ) | [inline] |
Definition at line 257 of file parallel_array.h.
DType parallel_utils::ParallelHDArray< Type, PType >::getDeviceBuffer | ( | ) | [inline] |
Definition at line 255 of file parallel_array.h.
MemFlags parallel_utils::ParallelHDArray< Type, PType >::getFlags | ( | ) | const [inline] |
Definition at line 253 of file parallel_array.h.
HType parallel_utils::ParallelHDArray< Type, PType >::getHostBuffer | ( | ArraySize | offset | ) | [inline] |
Definition at line 256 of file parallel_array.h.
HType parallel_utils::ParallelHDArray< Type, PType >::getHostBuffer | ( | ) | [inline] |
Definition at line 254 of file parallel_array.h.
ArraySize parallel_utils::ParallelHDArray< Type, PType >::getSize | ( | ) | const [inline] |
Definition at line 252 of file parallel_array.h.
void parallel_utils::ParallelHDArray< Type, PType >::print | ( | const char * | s, | |
int | stride = 1 | |||
) | const [inline] |
Prints the contents of the host array
s | The prefix | |
stride | The stride between elements |
Definition at line 248 of file parallel_array.h.
void parallel_utils::ParallelHDArray< Type, PType >::setFlags | ( | MemFlags | flags | ) | [inline] |
Sets the flags of the host and device arrays
flags | The flags to set |
Definition at line 236 of file parallel_array.h.
void parallel_utils::ParallelHDArray< Type, PType >::setSize | ( | ArraySize | size | ) | [inline] |
Sets the size of the host and device arrays
size | The size of the arrays |
Definition at line 225 of file parallel_array.h.
void parallel_utils::ParallelHDArray< Type, PType >::syncToDevice | ( | CopyType | copyType = CopyTypes::COPY_DEFAULT |
) | [inline] |
Copies size number of elements from the host to the device
copyType | The type of copy, synchronous or asynchronous |
Definition at line 218 of file parallel_array.h.
void parallel_utils::ParallelHDArray< Type, PType >::syncToDevice | ( | ArraySize | offset, | |
ArraySize | length, | |||
CopyType | copyType = CopyTypes::COPY_DEFAULT | |||
) | [inline] |
Copies data form the host to the device
offset | The offset into the array from which to copy | |
length | The number of elements to copy | |
copyType | The type of copy, synchronous or asynchronous |
Definition at line 200 of file parallel_array.h.
void parallel_utils::ParallelHDArray< Type, PType >::syncToHost | ( | CopyType | copyType = CopyTypes::COPY_DEFAULT |
) | [inline] |
Copies size number of elements from the device to the host
copyType | The type of copy, synchronous or asynchronous |
Definition at line 211 of file parallel_array.h.
void parallel_utils::ParallelHDArray< Type, PType >::syncToHost | ( | ArraySize | offset, | |
ArraySize | length, | |||
CopyType | copyType = CopyTypes::COPY_DEFAULT | |||
) | [inline] |
Copies data from the device to the host
offset | The offset into the array from which to copy | |
length | The number of elements to copy | |
copyType | The type of copy, synchronous or asynchronous |
Definition at line 187 of file parallel_array.h.
ParallelArray<Type,DType,PType> parallel_utils::ParallelHDArray< Type, PType >::deviceArray_ [private] |
Handle to the device side ParallelArray
Definition at line 266 of file parallel_array.h.
ParallelArray<Type,HType,PType> parallel_utils::ParallelHDArray< Type, PType >::hostArray_ [private] |
Handle toe the host side ParallelArray
Definition at line 265 of file parallel_array.h.
SType parallel_utils::ParallelHDArray< Type, PType >::stream_ [private] |
The type of stream, specific to the underlying architecture
Definition at line 263 of file parallel_array.h.