Mercurial > octave
diff libinterp/corefcn/nproc.cc @ 27032:0ee0bb5eb381
make nproc default to "overridable" to agree with nproc shell utility
* nproc.cc (Fnproc): Set default to OCTAVE_NPROC_CURRENT_OVERRIDABLE. Add BIST
test.
* oct-fftw.cc (fftw_planner::fftw_planner): Use OCTAVE_NPROC_CURRENT_OVERRIDABLE
for default thread count. (float_fftw_planner::float_fftw_planner): Likewise.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Sat, 06 Apr 2019 18:39:32 -0700 |
parents | 00f796120a6d |
children | 396d17dcfb9f |
line wrap: on
line diff
--- a/libinterp/corefcn/nproc.cc Sat Apr 06 18:46:30 2019 -0700 +++ b/libinterp/corefcn/nproc.cc Sat Apr 06 18:39:32 2019 -0700 @@ -54,7 +54,7 @@ if (nargin > 1) print_usage (); - octave_nproc_query query = OCTAVE_NPROC_CURRENT; + octave_nproc_query query = OCTAVE_NPROC_CURRENT_OVERRIDABLE; if (nargin == 1) { @@ -81,6 +81,9 @@ %!assert (nproc ("all") >= 1) %!assert (nproc ("current") >= 1) +## Test that "overridable" is the default +%!assert (nproc ("overridable"), nproc ()) + %!test %! c = nproc ("current"); %! unwind_protect