8 static constexpr
int n_dim = 4;
20 constexpr
inline const int *
data()
const {
return array; }
28 constexpr
int inline product(
const CommKey &input) {
return input[0] * input[1] * input[2] * input[3]; }
47 for (
int d = 0; d <
CommKey::n_dim; d++) { quotient[d] = lhs[d] / rhs[d]; }
54 for (
int d = 0; d <
CommKey::n_dim; d++) { mod[d] = lhs[d] % rhs[d]; }
61 if (lhs[d] < rhs[d]) {
return true; }
69 if (lhs[d] > rhs[d]) {
return true; }
78 coord[d] = index %
dim[d];
86 return ((coord[3] *
dim[2] + coord[2]) *
dim[1] + coord[1]) *
dim[0] + coord[0];
constexpr int index_from_coordinate(CommKey coord, CommKey dim)
constexpr bool operator<(const CommKey &lhs, const CommKey &rhs)
__device__ __host__ ColorSpinor< Float, Nc, Ns > operator*(const S &a, const ColorSpinor< Float, Nc, Ns > &x)
Compute the scalar-vector product y = a * x.
constexpr int product(const CommKey &input)
constexpr bool operator>(const CommKey &lhs, const CommKey &rhs)
__device__ __host__ ColorSpinor< Float, Nc, Ns > operator+(const ColorSpinor< Float, Nc, Ns > &x, const ColorSpinor< Float, Nc, Ns > &y)
ColorSpinor addition operator.
constexpr CommKey coordinate_from_index(int index, CommKey dim)
constexpr CommKey operator%(const CommKey &lhs, const CommKey &rhs)
constexpr CommKey operator/(const CommKey &lhs, const CommKey &rhs)
__host__ __device__ T sum(const array< T, s > &a)
constexpr const int & operator[](int d) const
static constexpr int n_dim
constexpr int & operator[](int d)
constexpr const int * data() const
constexpr bool is_valid() const