#include <coord.h>
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 |
typedef int LibGeoDecomp::Coord< 1 >::ValueType |
__host__ __device__ LibGeoDecomp::Coord< 1 >::Coord | ( | const int & | nx = 0 |
) | [inline, explicit] |
__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] |
__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] |
Referenced by LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >::delegateGet(), LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >::delegateSet(), LibGeoDecomp::SoAGridHelpers::GenIndex< DIM_X, DIM_Y, DIM_Z >::operator()(), LibGeoDecomp::GridHelpers::FillCoordBox< 1 >::operator()(), LibGeoDecomp::TopologiesHelpers::Accessor< 1 >::operator()(), and scale().
__host__ __device__ const int& LibGeoDecomp::Coord< 1 >::x | ( | ) | const [inline] |
friend class Serialization [friend] |
friend class Typemaps [friend] |
int LibGeoDecomp::Coord< 1 >::c[1] [private] |