Cuda::DeviceMemory< Type, Dim > Class Template Reference

Representation of global GPU memory. More...

#include <devicememory.hpp>

Inheritance diagram for Cuda::DeviceMemory< Type, Dim >:

Inheritance graph
[legend]
Collaboration diagram for Cuda::DeviceMemory< Type, Dim >:

Collaboration graph
[legend]

List of all members.

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...


Detailed Description

template<class Type, unsigned Dim>
class Cuda::DeviceMemory< Type, Dim >

Representation of global GPU memory.

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).


Constructor & Destructor Documentation

template<class Type, unsigned Dim>
Cuda::DeviceMemory< Type, Dim >::DeviceMemory ( const Size< Dim > &  _size  )  [inline, protected]

Constructor.

Parameters:
_size requested size of memory block

template<class Type, unsigned Dim>
Cuda::DeviceMemory< Type, Dim >::DeviceMemory ( const Layout< Type, Dim > &  layout  )  [inline, protected]

Constructor.

Parameters:
layout requested layout of memory block


Member Function Documentation

template<class Type, unsigned Dim>
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 >.

template<class Type, unsigned Dim>
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.

Parameters:
slice slice to which reference will be created


The documentation for this class was generated from the following file:

Generated on Sun Sep 13 00:55:17 2009 for cudatemplates by  doxygen 1.5.6