#include <devicememoryreference.hpp>
Public Member Functions | |
DeviceMemoryReference (const Size< Dim > &_size, Type *_buffer) | |
Constructor. | |
DeviceMemoryReference (const Layout< Type, Dim > &layout, Type *_buffer) | |
Constructor. | |
DeviceMemoryReference (DeviceMemory< Type, Dim > &data, const Size< Dim > &ofs, const Size< Dim > &_size) | |
Constructor based on existing device memory. | |
Protected Member Functions | |
DeviceMemoryReference () | |
Default constructor. |
This class can be used to apply the CUDA Templates methods to memory regions managed by other libraries.
Cuda::DeviceMemoryReference< Type, Dim >::DeviceMemoryReference | ( | const Size< Dim > & | _size, | |
Type * | _buffer | |||
) | [inline] |
Constructor.
_size | requested size | |
_buffer | pointer to GPU memory |
Cuda::DeviceMemoryReference< Type, Dim >::DeviceMemoryReference | ( | const Layout< Type, Dim > & | layout, | |
Type * | _buffer | |||
) | [inline] |
Constructor.
layout | requested layout | |
_buffer | pointer to GPU memory |
Cuda::DeviceMemoryReference< Type, Dim >::DeviceMemoryReference | ( | DeviceMemory< Type, Dim > & | data, | |
const Size< Dim > & | ofs, | |||
const Size< Dim > & | _size | |||
) | [inline] |
Constructor based on existing device memory.
Will keep any region of interest valid, by determining 'intersection' of regions.
data | existing device memroy | |
ofs | offset to new region | |
_size | size of new region |
Cuda::DeviceMemoryReference< Type, Dim >::DeviceMemoryReference | ( | ) | [inline, protected] |
Default constructor.
This is only for subclasses which know how to correctly set up the data pointer.