speedups for empty subcubes
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user