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

Reference to existing buffer in CPU main memory. More...

#include <hostmemoryreference.hpp>

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

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 HostMemoryReference (const Size< Dim > &_size, Type *_buffer)
 Constructor.
 HostMemoryReference (const Layout< Type, Dim > &layout, Type *_buffer)
 Constructor.
 HostMemoryReference (HostMemory< Type, Dim > &data, const Size< Dim > &ofs, const Size< Dim > &_size)
 Constructor based on existing host memory.

Protected Member Functions

 HostMemoryReference ()
 Default constructor.


Detailed Description

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

Reference to existing buffer in CPU main memory.

This class can be used to apply the Cuda Templates methods to memory regions managed by other libraries.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
_size requested size
_buffer pointer to CPU memory

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

Constructor.

Parameters:
layout requested layout
_buffer pointer to CPU memory

template<class Type, unsigned Dim>
Cuda::HostMemoryReference< Type, Dim >::HostMemoryReference ( HostMemory< Type, Dim > &  data,
const Size< Dim > &  ofs,
const Size< Dim > &  _size 
) [inline]

Constructor based on existing host memory.

Will keep any region of interest valid, by determining 'intersection' of regions.

Parameters:
data existing device memroy
ofs offset to new region
_size size of new region

template<class Type, unsigned Dim>
Cuda::HostMemoryReference< Type, Dim >::HostMemoryReference (  )  [inline, protected]

Default constructor.

This is only for subclasses which know how to correctly set up the data pointer.


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

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