1 #ifndef GRID_KEY_EXPRESSION 2 #define GRID_KEY_EXPRESSION 4 #include "util/common.hpp" 6 template<
unsigned int dim,
typename index_type =
long int>
class grid_key_dx;
21 template<
unsigned int dim,
typename exp>
26 __device__ __host__ mem_id value(
int i)
const 28 return static_cast<const exp &>(*this).value(i);
38 template<
typename index_type>
68 template<
typename index_type>
100 template<
int dim,
typename exp1,
typename exp2>
108 __device__ __host__
grid_key_dx_sum(
const exp1 & ex1,
const exp2 & ex2)
112 __device__ __host__ mem_id value(
int i)
const 114 return e1.value(i) + e2.value(i);
125 template<
int dim,
typename exp1,
typename exp2>
133 __device__ __host__
grid_key_dx_sub(
const exp1 & ex1,
const exp2 & ex2)
137 __device__ __host__ mem_id value(
int i)
const 139 return e1.value(i) - e2.value(i);
Main class that encapsulate a sub expression.
grid_key_dx is the key to access any element in the grid
Expression template for grid_key_dx.
Main class that encapsulate a sum expression.