diff --git a/include/armadillo_bits/podarray_bones.hpp b/include/armadillo_bits/podarray_bones.hpp index 07a2b860..852c2410 100644 --- a/include/armadillo_bits/podarray_bones.hpp +++ b/include/armadillo_bits/podarray_bones.hpp @@ -53,6 +53,9 @@ class podarray arma_inline explicit podarray(const uword new_N); + template + inline explicit podarray(const uword new_N, const arma_initmode_indicator&); + arma_inline explicit podarray(const eT* X, const uword new_N); // template diff --git a/include/armadillo_bits/podarray_meat.hpp b/include/armadillo_bits/podarray_meat.hpp index c42f4576..044124d8 100644 --- a/include/armadillo_bits/podarray_meat.hpp +++ b/include/armadillo_bits/podarray_meat.hpp @@ -94,6 +94,25 @@ podarray::podarray(const uword new_n_elem) +template +template +inline +podarray::podarray(const uword new_n_elem, const arma_initmode_indicator&) + : n_elem(new_n_elem) + { + arma_extra_debug_sigprint_this(this); + + init_cold(new_n_elem); + + if(do_zeros) + { + arma_extra_debug_print("podarray::constructor: zeroing memory"); + arrayops::fill_zeros(memptr(), n_elem); + } + } + + + template arma_inline podarray::podarray(const eT* X, const uword new_n_elem)