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

Representation of linear GPU memory with proper padding. More...

#include <devicememorypitched.hpp>

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

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DeviceMemoryPitched ()
 Default constructor.
 DeviceMemoryPitched (const Size< Dim > &_size)
 Constructor.
 DeviceMemoryPitched (const Layout< Type, Dim > &layout)
 Constructor.
void alloc ()
 Allocate GPU memory.
void alloc (const Size< Dim > &_size)
 Allocate GPU memory.
void initMem (int val, bool sync=true)
 Initializes the GPU memory with the value val.


Detailed Description

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

Representation of linear GPU memory with proper padding.

Appropriate padding is added to maximize access performance.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
_size requested size of memory block

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

Constructor.

Parameters:
layout requested layout of memory block


Member Function Documentation

template<class Type, unsigned Dim>
void Cuda::DeviceMemoryPitched< Type, Dim >::alloc ( const Size< Dim > &  _size  )  [inline]

Allocate GPU memory.

size to be allocated

Reimplemented from Cuda::Storage< Type, Dim >.

template<class Type, unsigned Dim>
void Cuda::DeviceMemoryPitched< 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 from Cuda::DeviceMemory< Type, Dim >.


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

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