#ifndef __arith_h__ #define __arith_h__ namespace MultiArrayHelper { // OPERATIONS (STATIC) template struct plus { static inline T& acc(T& target, const T& arg) { return target += arg; } }; template struct minus { static inline T& acc(T& target, const T& arg) { return target -= arg; } }; template struct multiplies { static inline T& acc(T& target, const T& arg) { return target *= arg; } }; template struct divides { static inline T& acc(T& target, const T& arg) { return target /= arg; } }; } // end namespace MultiArrayHelper #endif