diff libinterp/corefcn/cellfun.cc @ 17004:19b7c7412a63

cell2mat.m: Re-vamp input validation for 30% speedup * scripts/general/cell2mat.m: Use if tree to only call cellfun if necessary to further validate inputs. Add %!error tests for input validation. Use standard variable name 'sz' for size of object. * libinterp/corefcn/cellfun.cc(try_cellfun_internal_ops): Put test for 'numel' ahead of test for 'prodofsize' since it is the more common usage.
author Rik <rik@octave.org>
date Thu, 18 Jul 2013 12:05:34 -0700
parents dd783018709b
children d6499c14021c
line wrap: on
line diff
--- a/libinterp/corefcn/cellfun.cc	Thu Jul 18 12:01:32 2013 -0700
+++ b/libinterp/corefcn/cellfun.cc	Thu Jul 18 12:05:34 2013 -0700
@@ -161,7 +161,7 @@
         result(count) = static_cast<double> (f_args.elem (count).ndims ());
       retval(0) = result;
     }
-  else if (name == "prodofsize" || name == "numel")
+  else if (name == "numel" || name == "prodofsize")
     {
       NDArray result (f_args.dims ());
       for (octave_idx_type count = 0; count < k; count++)