diff --git a/vop/cmVectOpsTemplateCode.h b/vop/cmVectOpsTemplateCode.h index e8859c9..e160766 100644 --- a/vop/cmVectOpsTemplateCode.h +++ b/vop/cmVectOpsTemplateCode.h @@ -235,6 +235,21 @@ VECT_OP_TYPE* VECT_OP_FUNC(MeanM)( VECT_OP_TYPE* dp, const VECT_OP_TYPE* sp, return dp; } +VECT_OP_TYPE* VECT_OP_FUNC(MeanM2)( VECT_OP_TYPE* dp, const VECT_OP_TYPE* sp, unsigned srn, unsigned scn, unsigned dim, unsigned cnt ) +{ + unsigned i; + unsigned cn = dim == 0 ? scn : srn; + unsigned rn = dim == 0 ? srn : scn; + unsigned inc = dim == 0 ? srn : 1; + unsigned stride = dim == 0 ? 1 : srn; + unsigned d0 = 0; + + for(i=0; i