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

LibGeoDecomp::Coord< 1 > Class Template Reference

#include <coord.h>

Collaboration diagram for LibGeoDecomp::Coord< 1 >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef int ValueType

Public Member Functions

__host__ __device__ Coord (const int &nx=0)
template<int X, int Y, int Z>
__host__ __device__ Coord (FixedCoord< X, Y, Z >)
__host__ __device__ Coord< 1 > indexToCoord (int index) const
 converts a linear index to a coordinate in a cuboid of size given by the Coord.
__host__ __device__ std::size_t toIndex (const Coord< 1 > &dim) const
 converts the coord to a linear index.
__host__ __device__ int & x ()
__host__ __device__ const int & x () const
__host__ __device__ int & operator[] (const int &i)
__host__ __device__ const int & operator[] (const int &i) const
__host__ __device__ bool operator== (const Coord &comp) const
__host__ __device__ bool operator!= (const Coord &comp) const
__host__ __device__ bool operator< (const Coord &comp) const
__host__ __device__ Coord operator+ (const Coord &addend) const
__host__ __device__ void operator+= (const Coord &addend)
__host__ __device__ void operator-= (const Coord &minuend)
__host__ __device__ Coord operator- (const Coord &minuend) const
__host__ __device__ Coord operator- () const
__host__ __device__ Coord operator* (const int &scale) const
__host__ __device__ int operator* (const Coord &multiplier) const
__host__ __device__ Coord operator/ (const int &divisor) const
__host__ __device__ Coord scale (const Coord< 1 > &scale) const
__host__ __device__ const int & prod () const
__host__ __device__ const int & sum () const
 Coord (max)(const Coord< 1 > &other) const
 Coord (min)(const Coord< 1 > &other) const
boost::detail::multi_array::extent_gen< 1ul > toExtents () const
std::string toString () const

Static Public Member Functions

__host__ static __device__
Coord< 1 > 
diagonal (const int &nx)

Private Attributes

int c [1]

Friends

class Serialization
class Typemaps

template<>
class LibGeoDecomp::Coord< 1 >


Member Typedef Documentation

typedef int LibGeoDecomp::Coord< 1 >::ValueType

Constructor & Destructor Documentation

__host__ __device__ LibGeoDecomp::Coord< 1 >::Coord ( const int &  nx = 0  )  [inline, explicit]
template<int X, int Y, int Z>
__host__ __device__ LibGeoDecomp::Coord< 1 >::Coord ( FixedCoord< X, Y, Z >   )  [inline, explicit]
LibGeoDecomp::Coord< 1 >::Coord ( max   )  const [inline]
LibGeoDecomp::Coord< 1 >::Coord ( min   )  const [inline]

Member Function Documentation

__host__ static __device__ Coord<1> LibGeoDecomp::Coord< 1 >::diagonal ( const int &  nx  )  [inline, static]
__host__ __device__ Coord<1> LibGeoDecomp::Coord< 1 >::indexToCoord ( int  index  )  const [inline]

converts a linear index to a coordinate in a cuboid of size given by the Coord.

__host__ __device__ bool LibGeoDecomp::Coord< 1 >::operator!= ( const Coord< 1 > &  comp  )  const [inline]
__host__ __device__ Coord LibGeoDecomp::Coord< 1 >::operator* ( const int &  scale  )  const [inline]
__host__ __device__ int LibGeoDecomp::Coord< 1 >::operator* ( const Coord< 1 > &  multiplier  )  const [inline]
__host__ __device__ Coord LibGeoDecomp::Coord< 1 >::operator+ ( const Coord< 1 > &  addend  )  const [inline]
__host__ __device__ void LibGeoDecomp::Coord< 1 >::operator+= ( const Coord< 1 > &  addend  )  [inline]
__host__ __device__ Coord LibGeoDecomp::Coord< 1 >::operator- ( const Coord< 1 > &  minuend  )  const [inline]
__host__ __device__ Coord LibGeoDecomp::Coord< 1 >::operator- (  )  const [inline]
__host__ __device__ void LibGeoDecomp::Coord< 1 >::operator-= ( const Coord< 1 > &  minuend  )  [inline]
__host__ __device__ Coord LibGeoDecomp::Coord< 1 >::operator/ ( const int &  divisor  )  const [inline]
__host__ __device__ bool LibGeoDecomp::Coord< 1 >::operator< ( const Coord< 1 > &  comp  )  const [inline]
__host__ __device__ bool LibGeoDecomp::Coord< 1 >::operator== ( const Coord< 1 > &  comp  )  const [inline]
__host__ __device__ int& LibGeoDecomp::Coord< 1 >::operator[] ( const int &  i  )  [inline]
__host__ __device__ const int& LibGeoDecomp::Coord< 1 >::operator[] ( const int &  i  )  const [inline]
__host__ __device__ const int& LibGeoDecomp::Coord< 1 >::prod (  )  const [inline]
__host__ __device__ Coord LibGeoDecomp::Coord< 1 >::scale ( const Coord< 1 > &  scale  )  const [inline]

References x().

__host__ __device__ const int& LibGeoDecomp::Coord< 1 >::sum (  )  const [inline]
boost::detail::multi_array::extent_gen<1ul> LibGeoDecomp::Coord< 1 >::toExtents (  )  const [inline]
__host__ __device__ std::size_t LibGeoDecomp::Coord< 1 >::toIndex ( const Coord< 1 > &  dim  )  const [inline]

converts the coord to a linear index.

This is good for addressing a linear array via Coords.

std::string LibGeoDecomp::Coord< 1 >::toString (  )  const [inline]
__host__ __device__ int& LibGeoDecomp::Coord< 1 >::x (  )  [inline]
__host__ __device__ const int& LibGeoDecomp::Coord< 1 >::x (  )  const [inline]

Friends And Related Function Documentation

friend class Serialization [friend]
friend class Typemaps [friend]

Member Data Documentation

int LibGeoDecomp::Coord< 1 >::c[1] [private]

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