Skip to content

Commit 10c791d

Browse files
author
conrad
committed
fix
1 parent 16f6b3a commit 10c791d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

include/armadillo_bits/fn_accu.hpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,6 @@ accu_proxy_at_mp(const Proxy<T1>& P)
156156

157157
typedef typename T1::elem_type eT;
158158

159-
if(P.get_n_elem() == uword(0))
160-
{
161-
return eT(0);
162-
}
163-
164159
eT val = eT(0);
165160

166161
#if defined(ARMA_USE_OPENMP)
@@ -240,6 +235,10 @@ accu_proxy_at_mp(const Proxy<T1>& P)
240235
val = arrayops::accumulate(col_accs.memptr(), n_cols);
241236
}
242237
}
238+
#else
239+
{
240+
arma_ignore(P);
241+
}
243242
#endif
244243

245244
return val;
@@ -634,6 +633,10 @@ accu_cube_proxy_at_mp(const ProxyCube<T1>& P)
634633

635634
val = arrayops::accumulate(slice_accs.memptr(), slice_accs.n_elem);
636635
}
636+
#else
637+
{
638+
arma_ignore(P);
639+
}
637640
#endif
638641

639642
return val;

0 commit comments

Comments
 (0)