#include <devicememory.hpp>
Public Member Functions | |
void | initMem (int val, bool sync=true) |
Initializes the GPU memory with the value val. | |
DeviceMemoryReference< Type, Dim-1 > | getSlice (unsigned int slice) |
Returns a single slice from a higher dimensional dataset. | |
Protected Member Functions | |
DeviceMemory () | |
Default constructor. | |
DeviceMemory (const Size< Dim > &_size) | |
Constructor. | |
DeviceMemory (const Layout< Type, Dim > &layout) | |
Constructor. | |
Classes | |
struct | KernelData |
A stripped-down version of the layout data structure suitable for passing to a CUDA kernel. More... |
This is the base class for all kind of GPU memory for which a pointer can be obtained for read and write access (i.e., no CUDA arrays).
Cuda::DeviceMemory< Type, Dim >::DeviceMemory | ( | const Size< Dim > & | _size | ) | [inline, protected] |
Constructor.
_size | requested size of memory block |
Cuda::DeviceMemory< Type, Dim >::DeviceMemory | ( | const Layout< Type, Dim > & | layout | ) | [inline, protected] |
Constructor.
layout | requested layout of memory block |
void Cuda::DeviceMemory< Type, Dim >::initMem | ( | int | val, | |
bool | sync = true | |||
) | [inline] |
Initializes the GPU memory with the value val.
Unfortunately only integer values are supported by the cudaMemset functions.
Reimplemented in Cuda::DeviceMemoryPitched< Type, Dim >, Cuda::DeviceMemoryPitched< Type, 1 >, Cuda::DeviceMemoryPitched< Type, 2 >, and Cuda::DeviceMemoryPitched< Type, 3 >.
DeviceMemoryReference<Type, Dim-1> Cuda::DeviceMemory< Type, Dim >::getSlice | ( | unsigned int | slice | ) | [inline] |
Returns a single slice from a higher dimensional dataset.
Keeps region of interest and other information.
slice | slice to which reference will be created |