speedups for empty subcubes

This commit is contained in:
conrad
2026-03-12 15:30:34 +10:00
parent 9201e8ddd0
commit e05bc82e7b
@@ -1125,6 +1125,8 @@ subview_cube<eT>::each_slice(const std::function< void(Mat<eT>&) >& F)
{
arma_debug_sigprint();
if( (n_rows == 0) || (n_cols == 0) ) { return; }
Mat<eT> tmp1(n_rows, n_cols, arma_nozeros_indicator());
Mat<eT> tmp2('j', tmp1.memptr(), n_rows, n_cols);
@@ -1153,6 +1155,8 @@ subview_cube<eT>::each_slice(const std::function< void(const Mat<eT>&) >& F) con
{
arma_debug_sigprint();
if( (n_rows == 0) || (n_cols == 0) ) { return; }
Mat<eT> tmp1(n_rows, n_cols, arma_nozeros_indicator());
const Mat<eT> tmp2('j', tmp1.memptr(), n_rows, n_cols);