#ifndef TENSOR_EVALUATOR_H #define TENSOR_EVALUATOR_H // Expression templates evaluators //----------------------------------------------------------------------------------------------------------// template FASTOR_INLINE SIMDVector eval(FASTOR_INDEX i) const { SIMDVector _vec; _vec.load(&_data[get_mem_index(i)],false); return _vec; } template FASTOR_INLINE T eval_s(FASTOR_INDEX i) const { return _data[get_mem_index(i)]; } template FASTOR_INLINE SIMDVector eval(FASTOR_INDEX i, FASTOR_INDEX j) const { SIMDVector _vec; _vec.load(&_data[get_flat_index(i,j)],false); return _vec; } template FASTOR_INLINE T eval_s(FASTOR_INDEX i, FASTOR_INDEX j) const { return _data[get_flat_index(i,j)]; } template FASTOR_INLINE SIMDVector teval(const std::array &as) const { SIMDVector _vec; _vec.load(&_data[get_flat_index(as)],false); return _vec; } template FASTOR_INLINE T teval_s(const std::array &as) const { return _data[get_flat_index(as)]; } //----------------------------------------------------------------------------------------------------------// #endif // end of TENSOR_EVALUATOR_H