diff --git a/include/armadillo_bits/op_stddev_bones.hpp b/include/armadillo_bits/op_stddev_bones.hpp index 9f7bc28a..9e2cb161 100644 --- a/include/armadillo_bits/op_stddev_bones.hpp +++ b/include/armadillo_bits/op_stddev_bones.hpp @@ -27,6 +27,9 @@ struct op_stddev template inline static void apply(Mat& out, const mtOp& in); + template + inline static void apply(Mat_noalias& out, const mtOp& in); + template inline static void apply_noalias(Mat::result>& out, const Mat& X, const uword norm_type, const uword dim); diff --git a/include/armadillo_bits/op_stddev_meat.hpp b/include/armadillo_bits/op_stddev_meat.hpp index fe540e35..2361983c 100644 --- a/include/armadillo_bits/op_stddev_meat.hpp +++ b/include/armadillo_bits/op_stddev_meat.hpp @@ -54,6 +54,26 @@ op_stddev::apply(Mat& out, const mtOp +inline +void +op_stddev::apply(Mat_noalias& out, const mtOp& in) + { + arma_debug_sigprint(); + + const uword norm_type = in.aux_uword_a; + const uword dim = in.aux_uword_b; + + arma_conform_check( (norm_type > 1), "stddev(): parameter 'norm_type' must be 0 or 1" ); + arma_conform_check( (dim > 1), "stddev(): parameter 'dim' must be 0 or 1" ); + + const quasi_unwrap U(in.m); + + op_stddev::apply_noalias(out, U.M, norm_type, dim); + } + + + template inline void diff --git a/include/armadillo_bits/op_var_bones.hpp b/include/armadillo_bits/op_var_bones.hpp index d6a9d893..2425a908 100644 --- a/include/armadillo_bits/op_var_bones.hpp +++ b/include/armadillo_bits/op_var_bones.hpp @@ -27,6 +27,9 @@ struct op_var template inline static void apply(Mat& out, const mtOp& in); + template + inline static void apply(Mat_noalias& out, const mtOp& in); + template inline static void apply_noalias(Mat::result>& out, const Mat& X, const uword norm_type, const uword dim); diff --git a/include/armadillo_bits/op_var_meat.hpp b/include/armadillo_bits/op_var_meat.hpp index 0147d1b1..273742e8 100644 --- a/include/armadillo_bits/op_var_meat.hpp +++ b/include/armadillo_bits/op_var_meat.hpp @@ -54,6 +54,26 @@ op_var::apply(Mat& out, const mtOp +inline +void +op_var::apply(Mat_noalias& out, const mtOp& in) + { + arma_debug_sigprint(); + + const uword norm_type = in.aux_uword_a; + const uword dim = in.aux_uword_b; + + arma_conform_check( (norm_type > 1), "var(): parameter 'norm_type' must be 0 or 1" ); + arma_conform_check( (dim > 1), "var(): parameter 'dim' must be 0 or 1" ); + + const quasi_unwrap U(in.m); + + op_var::apply_noalias(out, U.M, norm_type, dim); + } + + + template inline void