Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends

LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT > Class Template Reference

A lightweight AoS-style (Array of Structs) grid class, to manage memory allocation and bulk data transfer on NVDIA GPUs. More...

#include <cudagrid.h>

Collaboration diagram for LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef CELL_TYPE CellType
typedef TOPOLOGY Topology

Public Member Functions

 CUDAGrid (const CoordBox< DIM > &box=CoordBox< DIM >(), const Coord< DIM > &topologicalDimensions=Coord< DIM >())
void setEdge (const CELL_TYPE &cell)
CELL_TYPE getEdge () const
template<typename GRID_TYPE , typename REGION >
void saveRegion (GRID_TYPE *target, const REGION &region) const
template<typename GRID_TYPE , typename REGION >
void loadRegion (const GRID_TYPE &source, const REGION &region)
__host__ __device__ const
CoordBox< DIM > & 
boundingBox ()
__host__ __device__ CellTypedata ()
__host__ __device__ const
CellType
data () const
__host__ __device__ CellTypeedgeCell ()
__host__ __device__ const
CellType
edgeCell () const

Static Public Attributes

static const int DIM = Topology::DIM

Private Member Functions

std::size_t byteSize () const
std::size_t offset (const Coord< DIM > &absoluteCoord) const
CellTypeaddress (const Coord< DIM > &absoluteCoord)
const CellTypeaddress (const Coord< DIM > &absoluteCoord) const

Private Attributes

CoordBox< DIMbox
Coord< DIMtopoDimensions
CUDAArray< CellTypearray
CUDAArray< CellTypeedgeCellStore

Friends

class CUDAGridTest

Detailed Description

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
class LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >

A lightweight AoS-style (Array of Structs) grid class, to manage memory allocation and bulk data transfer on NVDIA GPUs.

It does not implement the GridBase interface as its small-scale data access functions would yield an an unacceptably slow interface.


Member Typedef Documentation

template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
typedef CELL_TYPE LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::CellType
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
typedef TOPOLOGY LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::Topology

Constructor & Destructor Documentation

template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::CUDAGrid ( const CoordBox< DIM > &  box = CoordBox<DIM>(),
const Coord< DIM > &  topologicalDimensions = Coord<DIM>() 
) [inline]

Member Function Documentation

template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
CellType* LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::address ( const Coord< DIM > &  absoluteCoord  )  [inline, private]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
const CellType* LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::address ( const Coord< DIM > &  absoluteCoord  )  const [inline, private]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
__host__ __device__ const CoordBox<DIM>& LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::boundingBox (  )  [inline]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
std::size_t LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::byteSize (  )  const [inline, private]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
__host__ __device__ CellType* LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::data (  )  [inline]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
__host__ __device__ const CellType* LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::data (  )  const [inline]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
__host__ __device__ const CellType* LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::edgeCell (  )  const [inline]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
__host__ __device__ CellType* LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::edgeCell (  )  [inline]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
CELL_TYPE LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::getEdge (  )  const [inline]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
template<typename GRID_TYPE , typename REGION >
void LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::loadRegion ( const GRID_TYPE &  source,
const REGION &  region 
) [inline]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
std::size_t LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::offset ( const Coord< DIM > &  absoluteCoord  )  const [inline, private]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
template<typename GRID_TYPE , typename REGION >
void LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::saveRegion ( GRID_TYPE *  target,
const REGION &  region 
) const [inline]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
void LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::setEdge ( const CELL_TYPE &  cell  )  [inline]

Friends And Related Function Documentation

template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
friend class CUDAGridTest [friend]

Member Data Documentation

template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
CUDAArray<CellType> LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::array [private]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
CoordBox<DIM> LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::box [private]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
const int LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::DIM = Topology::DIM [static]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
CUDAArray<CellType> LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::edgeCellStore [private]
template<typename CELL_TYPE , typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
Coord<DIM> LibGeoDecomp::CUDAGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::topoDimensions [private]

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