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

Class to represent memory that is accessible via a pointer. More...

#include <pointer.hpp>

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

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Pointer ()
 Default constructor.
 Pointer (const Size< Dim > &_size)
 Constructor.
 Pointer (const Layout< Type, Dim > &layout)
 Constructor.
virtual ~Pointer ()
 Destructor.
Type & operator[] (size_t i)
 Array index operator.
Type & operator[] (const SizeBase< Dim > &i)
 Array index operator.
const Type & operator[] (size_t i) const
 Array index operator.
const Type & operator[] (const SizeBase< Dim > &i) const
 Array index operator.
iterator begin () const
 Get iterator for begin of data.
iterator end () const
 Get iterator for end of data.
const Type * getBuffer () const
 Get buffer pointer.
Type * getBuffer ()
 Get buffer pointer.


Detailed Description

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

Class to represent memory that is accessible via a pointer.

This is used as a virtual base class for all types of memory which can be accessed via a typed pointer. Host and device memory are accessible by pointers, but CUDA arrays are not.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
_size requested size

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

Constructor.

Parameters:
layout requested layout


Member Function Documentation

template<class Type, unsigned Dim>
Type& Cuda::Pointer< Type, Dim >::operator[] ( size_t  i  )  [inline]

Array index operator.

Parameters:
i index
Returns:
value at index i

template<class Type, unsigned Dim>
Type& Cuda::Pointer< Type, Dim >::operator[] ( const SizeBase< Dim > &  i  )  [inline]

Array index operator.

Parameters:
i index
Returns:
value at index i

template<class Type, unsigned Dim>
const Type& Cuda::Pointer< Type, Dim >::operator[] ( size_t  i  )  const [inline]

Array index operator.

Parameters:
i index
Returns:
value at index i (constant)

template<class Type, unsigned Dim>
const Type& Cuda::Pointer< Type, Dim >::operator[] ( const SizeBase< Dim > &  i  )  const [inline]

Array index operator.

Parameters:
i index
Returns:
value at index i

template<class Type, unsigned Dim>
const Type* Cuda::Pointer< Type, Dim >::getBuffer (  )  const [inline]

Get buffer pointer.

Returns:
buffer pointer (constant)

template<class Type, unsigned Dim>
Type* Cuda::Pointer< Type, Dim >::getBuffer (  )  [inline]

Get buffer pointer.

Returns:
buffer pointer


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

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