Mercurial > octave
diff libinterp/corefcn/rand.cc @ 21041:63374982750b
Usage of corresponding value extractor for octave_idx_type. Improves support
for large matrices in 64 bit builds, e.g. calls of "size" and large sparse
matrix creation.
* libinterp/corefcn/daspk.cc(daspk_user_function): Use idx_type_value ().
* libinterp/corefcn/data.cc(diag,size): Use idx_type_value ().
* libinterp/corefcn/rand.cc(do_rand): Use idx_type_value ().
* libinterp/corefcn/tril.cc(do_trilu): Use idx_type_value ().
* libinterp/corefcn/utils.cc(get_dimensions): Use idx_type_value ().
* libinterp/dldfcn/qr.cc(qrshift): Use idx_type_value ().
author | Kai T. Ohlhus <k.ohlhus@gmail.com> |
---|---|
date | Wed, 06 Jan 2016 18:04:02 +0100 |
parents | 48b2ad5ee801 |
children | e39e05d90788 |
line wrap: on
line diff
--- a/libinterp/corefcn/rand.cc Tue Jan 05 14:16:58 2016 -0800 +++ b/libinterp/corefcn/rand.cc Wed Jan 06 18:04:02 2016 +0100 @@ -259,7 +259,10 @@ for (int i = 0; i < nargin; i++) { - octave_idx_type elt = args(idx+i).xint_value ("%s: dimension must be a scalar or array of integers", fcn); + octave_idx_type elt = + args(idx+i).xidx_type_value ( + "%s: dimension must be a scalar or array of integers", + fcn); // Negative dimensions treated as zero for Matlab compatibility dims(i) = elt >= 0 ? elt : 0;