Mercurial > hg > octave-lyh
changeset 17220:9336d0e1d1ec
perms.m: Use uint8 to reduce memory usage by 1/8th.
* doc/interpreter/contributors.in: Add Arun Giridha to contributors list.
* scripts/specfun/perms.m: Use uint8 to reduce memory usage by 1/8th.
author | Arun Giridha |
---|---|
date | Fri, 09 Aug 2013 21:53:05 -0700 |
parents | 87ba70043bfc |
children | 4407606d0939 |
files | doc/interpreter/contributors.in scripts/specfun/perms.m |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/contributors.in +++ b/doc/interpreter/contributors.in @@ -75,6 +75,7 @@ Klaus Gebhardt Driss Ghaddab Nicolo Giorgetti +Arun Giridha Michael D. Godfrey Michael Goffioul Glenn Golden
--- a/scripts/specfun/perms.m +++ b/scripts/specfun/perms.m @@ -42,7 +42,7 @@ if (nargin != 1) print_usage (); endif - vidx = [1:length(v)]'; + vidx = uint8 ([1:length(v)]'); n = length (vidx); if (n == 0) @@ -51,7 +51,7 @@ p = vidx(1); for j = 2:n B = p; - p = zeros (prod (2:j), n); + p = zeros (prod (2:j), n, "uint8"); k = rows (B); idx = 1:k; for i = j:-1:1