inline void op_mean::apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_mean>& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword dim = in.aux_uword_a; arma_debug_check( (dim > 2), "mean(): parameter 'dim' must be 0 or 1 or 2" ); const ProxyCube<T1> P(in.m); if(P.is_alias(out) == false) { op_mean::apply_noalias(out, P, dim); } else { Cube<eT> tmp; op_mean::apply_noalias(tmp, P, dim); out.steal_mem(tmp); } }
inline void glue_max::apply(Cube<typename T1::elem_type>& out, const GlueCube<T1, T2, glue_max>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const ProxyCube<T1> PA(X.A); const ProxyCube<T2> PB(X.B); if(PA.is_alias(out) || PB.is_alias(out)) { Cube<eT> tmp; glue_max::apply(tmp, PA, PB); out.steal_mem(tmp); } else { glue_max::apply(out, PA, PB); } }