Interface Documentation
Version: invalid
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
dimensioned_array.hh File Reference
#include <array>
#include <cmath>
#include <ostream>
#include "flecsi/util/common.hh"
Include dependency graph for dimensioned_array.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  flecsi::util::and_< CONDITIONS >
 
struct  flecsi::util::and_< CONDITION, CONDITIONS... >
 
class  flecsi::util::dimensioned_array< TYPE, DIMENSION, NAMESPACE >
 

Namespaces

 flecsi
 

Macros

#define define_operator(op)
 
#define define_operator_type(op)
 

Typedefs

template<typename TARGET , typename... TARGETS>
using flecsi::util::are_type = and_< std::is_same< TARGETS, TARGET >... >
 

Enumerations

enum  flecsi::util::axis : size_t { x = 0, y = 1, z = 2 }
 Enumeration for axes.
 

Functions

template<typename TYPE , size_t DIMENSION, size_t NAMESPACE>
constexpr dimensioned_array< TYPE, DIMENSION, NAMESPACE > flecsi::util::operator+ (const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &lhs, const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &rhs)
 
template<typename TYPE , size_t DIMENSION, size_t NAMESPACE>
constexpr dimensioned_array< TYPE, DIMENSION, NAMESPACE > flecsi::util::operator- (const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &lhs, const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &rhs)
 
template<typename TYPE , size_t DIMENSION, size_t NAMESPACE>
std::ostream & flecsi::util::operator<< (std::ostream &stream, dimensioned_array< TYPE, DIMENSION, NAMESPACE > const &a)
 

Macro Definition Documentation

◆ define_operator

#define define_operator (   op)
Value:
constexpr dimensioned_array & operator op(dimensioned_array const & rhs) { \
if(this != &rhs) { \
for(size_t i{0}; i < DIMENSION; i++) { \
data_[i] op rhs[i]; \
} /* for */ \
} /* if */ \
\
return *this; \
}

◆ define_operator_type

#define define_operator_type (   op)
Value:
constexpr dimensioned_array & operator op(TYPE val) { \
for(size_t i{0}; i < DIMENSION; i++) { \
data_[i] op val; \
} /* for */ \
\
return *this; \
}

Function Documentation

◆ operator+()

template<typename TYPE , size_t DIMENSION, size_t NAMESPACE>
constexpr dimensioned_array<TYPE, DIMENSION, NAMESPACE> flecsi::util::operator+ ( const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &  lhs,
const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &  rhs 
)

Addition operator.

Template Parameters
TYPEThe type of the array, e.g., P.O.D. type.
DIMENSIONThe dimension of the array, i.e., the number of elements to be stored in the array.
NAMESPACEThe namespace of the array. This is a dummy parameter that is useful for creating distinct types that alias dimensioned_array.

◆ operator-()

template<typename TYPE , size_t DIMENSION, size_t NAMESPACE>
constexpr dimensioned_array<TYPE, DIMENSION, NAMESPACE> flecsi::util::operator- ( const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &  lhs,
const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &  rhs 
)

Addition operator.

Template Parameters
TYPEThe type of the array, e.g., P.O.D. type.
DIMENSIONThe dimension of the array, i.e., the number of elements to be stored in the array.
NAMESPACEThe namespace of the array. This is a dummy parameter that is useful for creating distinct types that alias dimensioned_array.

◆ operator<<()

template<typename TYPE , size_t DIMENSION, size_t NAMESPACE>
std::ostream& flecsi::util::operator<< ( std::ostream &  stream,
dimensioned_array< TYPE, DIMENSION, NAMESPACE > const &  a 
)

Addition operator.

Template Parameters
TYPEThe type of the array, e.g., P.O.D. type.
DIMENSIONThe dimension of the array, i.e., the number of elements to be stored in the array.
NAMESPACEThe namespace of the array. This is a dummy parameter that is useful for creating distinct types that alias dimensioned_array.
Parameters
streamThe output stream.
aThe dimensioned array.