28#ifndef GRID_TENSOR_INDEX_H
29#define GRID_TENSOR_INDEX_H
79 template<
class vtype,
int N>
88 template<
class vtype,
int N>
101 template<
class vtype>
108 template<
class vtype>
116 template<
class vtype,
int N>
120 for(
int i=0;i<N;i++){
125 template<
class vtype,
int N>
130 for(
int i=0;i<N;i++){
136 template<
class vtype,
int N>
140 for(
int i=0;i<N;i++){
141 for(
int j=0;j<N;j++){
146 template<
class vtype,
int N>
151 for(
int i=0;i<N;i++){
152 for(
int j=0;j<N;j++){
175 for(
int ii=0;ii<N;ii++){
182 for(
int ii=0;ii<N;ii++){
190 for(
int ii=0;ii<N;ii++){
191 for(
int jj=0;jj<N;jj++){
198 for(
int ii=0;ii<N;ii++){
199 for(
int jj=0;jj<N;jj++){
218 for(
int i=0;i<N;i++){
227 for(
int i=0;i<N;i++){
228 for(
int j=0;j<N;j++){
238#define RemoveCRV(a) typename std::remove_const<typename std::remove_reference<decltype(a)>::type>::type
276 for(
int i=0;i<N;i++){
286 for(
int i=0;i<N;i++){
306 for(
int i=0;i<N;i++){
307 for(
int j=0;j<N;j++){
#define accelerator_inline
accelerator_inline void zeroit(Grid_simd2< S, V > &z)
#define NAMESPACE_BEGIN(A)
accelerator_inline void pokeIndex(vtype &ret, const decltype(TensorIndexRecursion< Level >::peekIndex(ret, 0)) &arg, int i)
accelerator_inline int isVector(void)
accelerator_inline int isScalar(void)
accelerator_inline auto peekIndex(const vtype &arg, int i) -> RemoveCRV(TensorIndexRecursion< Level >::peekIndex(arg, 0))
accelerator_inline auto transposeIndex(const vtype &arg) -> RemoveCRV(TensorIndexRecursion< Level >::transposeIndex(arg))
accelerator_inline auto traceIndex(const vtype &arg) -> RemoveCRV(TensorIndexRecursion< Level >::traceIndex(arg))
accelerator_inline int isMatrix(void)
accelerator_inline int indexRank(void)
static accelerator_inline int isScalar(const iVector< vtype, N > tmp)
static accelerator_inline int indexRank(const iMatrix< vtype, N > tmp)
static accelerator_inline int isVector(const iVector< vtype, N > tmp)
static accelerator_inline int isMatrix(const iVector< vtype, N > tmp)
static accelerator_inline void pokeIndex(iVector< vtype, N > &ret, const iScalar< vtype > &arg, int i)
static accelerator_inline auto peekIndex(const iVector< vtype, N > arg, int ii) -> iScalar< vtype >
static accelerator_inline auto traceIndex(const iMatrix< vtype, N > arg) -> iScalar< RemoveCRV(arg._internal[0][0])>
static accelerator_inline void pokeIndex(iMatrix< vtype, N > &ret, const iScalar< vtype > &arg, int i, int j)
static accelerator_inline int isVector(const iMatrix< vtype, N > tmp)
static accelerator_inline auto transposeIndex(const iMatrix< vtype, N > arg) -> iMatrix< vtype, N >
static accelerator_inline int isScalar(const iScalar< vtype > tmp)
static accelerator_inline int isMatrix(const iMatrix< vtype, N > tmp)
static accelerator_inline int isScalar(const iMatrix< vtype, N > tmp)
static accelerator_inline int isMatrix(const iScalar< vtype > tmp)
static accelerator_inline auto peekIndex(const iMatrix< vtype, N > arg, int ii, int jj) -> iScalar< vtype >
static accelerator_inline int isVector(const iScalar< vtype > tmp)
static accelerator_inline int indexRank(const iVector< vtype, N > tmp)
static accelerator_inline auto traceIndex(const iVector< vtype, N > arg) -> iScalar< RemoveCRV(arg._internal[0])>
static accelerator_inline auto traceIndex(const iScalar< vtype > arg) -> iScalar< RemoveCRV(arg._internal)>
static accelerator_inline auto transposeIndex(const iScalar< vtype > arg) -> iScalar< vtype >
static accelerator_inline int indexRank(const iScalar< vtype > tmp)
static accelerator_inline int isMatrix(const iScalar< vtype > tmp)
static accelerator_inline int isScalar(const iScalar< vtype > tmp)
static accelerator_inline auto transposeIndex(const iMatrix< vtype, N > arg) -> iMatrix< vtype, N >
static accelerator_inline int isScalar(const iMatrix< vtype, N > tmp)
static accelerator_inline int isMatrix(const iMatrix< vtype, N > tmp)
static accelerator_inline auto transposeIndex(const iVector< vtype, N > arg) -> iVector< vtype, N >
static accelerator_inline void pokeIndex(iScalar< vtype > &ret, const iScalar< decltype(TensorIndexRecursion< Level-1 >::peekIndex(ret._internal, 0))> &arg, int i)
static accelerator_inline void pokeIndex(iMatrix< vtype, N > &ret, const iMatrix< decltype(TensorIndexRecursion< Level-1 >::peekIndex(ret._internal[0][0], 0, 0)), N > &arg, int i, int j)
static accelerator_inline void pokeIndex(iVector< vtype, N > &ret, const iVector< decltype(TensorIndexRecursion< Level-1 >::peekIndex(ret._internal[0], 0, 0)), N > &arg, int i, int j)
static accelerator_inline int indexRank(const iScalar< vtype > tmp)
static accelerator_inline int isVector(const iMatrix< vtype, N > tmp)
static accelerator_inline void pokeIndex(iScalar< vtype > &ret, const iScalar< decltype(TensorIndexRecursion< Level-1 >::peekIndex(ret._internal, 0, 0))> &arg, int i, int j)
static accelerator_inline auto traceIndex(const iScalar< vtype > arg) -> iScalar< decltype(TensorIndexRecursion< Level-1 >::traceIndex(arg._internal))>
static accelerator_inline auto traceIndex(const iMatrix< vtype, N > arg) -> iMatrix< decltype(TensorIndexRecursion< Level-1 >::traceIndex(arg._internal[0][0])), N >
static accelerator_inline int indexRank(const iMatrix< vtype, N > tmp)
static accelerator_inline auto peekIndex(const iScalar< vtype > arg, int i, int j) -> iScalar< decltype(TensorIndexRecursion< Level-1 >::peekIndex(arg._internal, 0, 0))>
static accelerator_inline auto peekIndex(const iMatrix< vtype, N > arg, int ii, int jj) -> iMatrix< decltype(TensorIndexRecursion< Level-1 >::peekIndex(arg._internal[0][0], 0, 0)), N >
static accelerator_inline int isScalar(const iVector< vtype, N > tmp)
static accelerator_inline auto peekIndex(const iMatrix< vtype, N > arg, int ii) -> iMatrix< decltype(TensorIndexRecursion< Level-1 >::peekIndex(arg._internal[0][0], 0)), N >
static accelerator_inline int isVector(const iVector< vtype, N > tmp)
static accelerator_inline int isVector(const iScalar< vtype > tmp)
static accelerator_inline auto peekIndex(const iScalar< vtype > arg, int i) -> iScalar< decltype(TensorIndexRecursion< Level-1 >::peekIndex(arg._internal, 0))>
static accelerator_inline auto peekIndex(const iVector< vtype, N > arg, int ii, int jj) -> iVector< decltype(TensorIndexRecursion< Level-1 >::peekIndex(arg._internal[0], 0, 0)), N >
static accelerator_inline int indexRank(const iVector< vtype, N > tmp)
static accelerator_inline void pokeIndex(iVector< vtype, N > &ret, const iVector< decltype(TensorIndexRecursion< Level-1 >::peekIndex(ret._internal[0], 0)), N > &arg, int i)
static accelerator_inline auto traceIndex(const iVector< vtype, N > arg) -> iVector< decltype(TensorIndexRecursion< Level-1 >::traceIndex(arg._internal[0])), N >
static accelerator_inline auto transposeIndex(const iScalar< vtype > arg) -> iScalar< vtype >
static accelerator_inline void pokeIndex(iMatrix< vtype, N > &ret, const iMatrix< decltype(TensorIndexRecursion< Level-1 >::peekIndex(ret._internal[0][0], 0)), N > &arg, int i)
static accelerator_inline auto peekIndex(const iVector< vtype, N > arg, int ii) -> iVector< decltype(TensorIndexRecursion< Level-1 >::peekIndex(arg._internal[0], 0)), N >
static accelerator_inline int isMatrix(const iVector< vtype, N > tmp)