25 #if ! defined (octave_mx_inlines_h) 26 #define octave_mx_inlines_h 1 45 template <
typename R,
typename S>
48 for (
size_t i = 0;
i < n;
i++)
52 template <
typename R,
typename X>
56 for (
size_t i = 0;
i < n;
i++)
64 for (
size_t i = 0;
i < n;
i++)
73 for (
size_t i = 0;
i < n;
i++)
82 for (
size_t i = 0;
i < n;
i++)
86 #define DEFMXBINOP(F, OP) \ 87 template <typename R, typename X, typename Y> \ 88 inline void F (size_t n, R *r, const X *x, const Y *y) \ 90 for (size_t i = 0; i < n; i++) \ 91 r[i] = x[i] OP y[i]; \ 93 template <typename R, typename X, typename Y> \ 94 inline void F (size_t n, R *r, const X *x, Y y) \ 96 for (size_t i = 0; i < n; i++) \ 99 template <typename R, typename X, typename Y> \ 100 inline void F (size_t n, R *r, X x, const Y *y) \ 102 for (size_t i = 0; i < n; i++) \ 111 #define DEFMXBINOPEQ(F, OP) \ 112 template <typename R, typename X> \ 113 inline void F (size_t n, R *r, const X *x) \ 115 for (size_t i = 0; i < n; i++) \ 118 template <typename R, typename X> \ 119 inline void F (size_t n, R *r, X x) \ 121 for (size_t i = 0; i < n; i++) \ 130 #define DEFMXCMPOP(F, OP) \ 131 template <typename X, typename Y> \ 132 inline void F (size_t n, bool *r, const X *x, const Y *y) \ 134 for (size_t i = 0; i < n; i++) \ 135 r[i] = x[i] OP y[i]; \ 137 template <typename X, typename Y> \ 138 inline void F (size_t n, bool *r, const X *x, Y y) \ 140 for (size_t i = 0; i < n; i++) \ 143 template <typename X, typename Y> \ 144 inline void F (size_t n, bool *r, X x, const Y *y) \ 146 for (size_t i = 0; i < n; i++) \ 158 template <typename T>
165 template <
typename T>
169 return x.real () != 0 ||
x.imag () != 0;
172 template <
typename T>
179 template <
typename X>
182 for (
size_t i = 0;
i < n;
i++)
188 for (
size_t i = 0;
i < n;
i++)
192 #define DEFMXBOOLOP(F, NOT1, OP, NOT2) \ 193 template <typename X, typename Y> \ 194 inline void F (size_t n, bool *r, const X *x, const Y *y) \ 196 for (size_t i = 0; i < n; i++) \ 197 r[i] = ((NOT1 logical_value (x[i])) \ 198 OP (NOT2 logical_value (y[i]))); \ 200 template <typename X, typename Y> \ 201 inline void F (size_t n, bool *r, const X *x, Y y) \ 203 const bool yy = (NOT2 logical_value (y)); \ 204 for (size_t i = 0; i < n; i++) \ 205 r[i] = (NOT1 logical_value (x[i])) OP yy; \ 207 template <typename X, typename Y> \ 208 inline void F (size_t n, bool *r, X x, const Y *y) \ 210 const bool xx = (NOT1 logical_value (x)); \ 211 for (size_t i = 0; i < n; i++) \ 212 r[i] = xx OP (NOT2 logical_value (y[i])); \ 222 template <typename X>
226 for (
size_t i = 0;
i < n;
i++)
230 template <
typename X>
234 for (
size_t i = 0;
i < n;
i++)
238 template <
typename X>
242 for (
size_t i = 0;
i < n;
i++)
246 template <
typename X>
250 for (
size_t i = 0;
i < n;
i++)
254 template <
typename T>
258 for (
size_t i = 0;
i < n;
i++)
267 template <
typename T>
271 for (
size_t i = 0;
i < n;
i++)
280 template <
typename T>
284 for (
size_t i = 0;
i < n;
i++)
293 template <
typename T>
297 for (
size_t i = 0;
i < n;
i++)
306 template <
typename T>
310 for (
size_t i = 0;
i < n;
i++)
319 template <
typename T>
322 for (
size_t i = 0;
i < n;
i++)
326 template <
typename T>
329 for (
size_t i = 0;
i < n;
i++)
333 template <
typename T>
337 for (
size_t i = 0;
i < n;
i++)
341 template <
typename T>
345 for (
size_t i = 0;
i < n;
i++)
349 template <
typename T>
353 for (
size_t i = 0;
i < n;
i++)
357 template <
typename T>
361 for (
size_t i = 0;
i < n;
i++)
365 template <
typename T>
369 for (
size_t i = 0;
i < n;
i++)
373 template <
typename T>
377 for (
size_t i = 0;
i < n;
i++)
382 #define DEFMINMAXSPEC(T, F, OP) \ 384 inline void F<T> (size_t n, T *r, const T *x, T y) \ 386 if (octave::math::isnan (y)) \ 387 std::memcpy (r, x, n * sizeof (T)); \ 389 for (size_t i = 0; i < n; i++) \ 390 r[i] = (x[i] OP y ? x[i] : y); \ 393 inline void F<T> (size_t n, T *r, T x, const T *y) \ 395 if (octave::math::isnan (x)) \ 396 std::memcpy (r, y, n * sizeof (T)); \ 398 for (size_t i = 0; i < n; i++) \ 399 r[i] = (y[i] OP x ? y[i] : x); \ 411 template <typename R, typename X, typename Y>
417 for (
size_t i = 0;
i < n;
i++)
421 template <
typename R,
typename X,
typename Y>
427 for (
size_t i = 0;
i < n;
i++)
431 template <
typename R,
typename X,
typename Y>
437 for (
size_t i = 0;
i < n;
i++)
443 template <
typename R,
typename X, R fun (X x)>
446 for (
size_t i = 0;
i < n;
i++)
450 template <
typename R,
typename X, R fun (const X& x)>
453 for (
size_t i = 0;
i < n;
i++)
460 template <
typename R,
typename X>
463 void (*op) (
size_t, R *,
const X *))
466 op (r.numel (), r.fortran_vec (),
x.data ());
472 template <
typename R,
typename X, R fun (X)>
476 return do_mx_unary_op<R, X> (
x, mx_inline_map<R, X, fun>);
479 template <
typename R,
typename X, R fun (const X&)>
483 return do_mx_unary_op<R, X> (
x, mx_inline_map<R, X, fun>);
486 template <
typename R>
489 void (*op) (
size_t, R *))
495 template <
typename R,
typename X,
typename Y>
498 void (*op) (
size_t, R *,
const X *,
const Y *),
499 void (*op1) (
size_t, R *, X,
const Y *),
500 void (*op2) (
size_t, R *,
const X *, Y),
519 template <
typename R,
typename X,
typename Y>
522 void (*op) (
size_t, R *,
const X *, Y))
529 template <
typename R,
typename X,
typename Y>
532 void (*op) (
size_t, R *, X,
const Y *))
539 template <
typename R,
typename X>
542 void (*op) (
size_t, R *,
const X *) ,
543 void (*op1) (
size_t, R *, X) ,
558 template <
typename R,
typename X>
561 void (*op) (
size_t, R *, X))
567 template <
typename T1,
typename T2>
571 for (
size_t i = 0;
i < n;
i++)
577 template <
typename T>
580 bool (*op) (
size_t,
const T *))
582 return op (
a.numel (),
a.data ());
587 template <
typename T>
588 inline T
cabsq (
const std::complex<T>&
c)
590 return c.real () *
c.real () +
c.imag () *
c.imag ();
594 template <
typename T>
601 template <
typename T>
609 template <
typename T>
616 template <
typename T>
673 #define OP_RED_SUM(ac, el) ac += el 674 #define OP_RED_PROD(ac, el) ac *= el 675 #define OP_RED_SUMSQ(ac, el) ac += el*el 676 #define OP_RED_SUMSQC(ac, el) ac += cabsq (el) 691 template <
typename T>
711 template <
typename T>
719 #define OP_RED_ANYC(ac, el) \ 728 #define OP_RED_ALLC(ac, el) \ 729 if (xis_false (el)) \ 737 #define OP_RED_FCN(F, TSRC, TRES, OP, ZERO) \ 738 template <typename T> \ 740 F (const TSRC *v, octave_idx_type n) \ 743 for (octave_idx_type i = 0; i < n; i++) \ 748 #define PROMOTE_DOUBLE(T) \ 749 typename subst_template_param<std::complex, T, double>::type 761 #define OP_RED_FCN2(F, TSRC, TRES, OP, ZERO) \ 762 template <typename T> \ 764 F (const TSRC *v, TRES *r, octave_idx_type m, octave_idx_type n) \ 766 for (octave_idx_type i = 0; i < m; i++) \ 768 for (octave_idx_type j = 0; j < n; j++) \ 770 for (octave_idx_type i = 0; i < m; i++) \ 784 #define OP_RED_ANYR(ac, el) ac |= xis_true (el) 785 #define OP_RED_ALLR(ac, el) ac &= xis_true (el) 795 #define OP_ROW_SHORT_CIRCUIT(F, PRED, ZERO) \ 796 template <typename T> \ 798 F (const T *v, bool *r, octave_idx_type m, octave_idx_type n) \ 801 return F ## _r (v, r, m, n); \ 804 OCTAVE_LOCAL_BUFFER (octave_idx_type, iact, m); \ 805 for (octave_idx_type i = 0; i < m; i++) iact[i] = i; \ 806 octave_idx_type nact = m; \ 807 for (octave_idx_type j = 0; j < n; j++) \ 809 octave_idx_type k = 0; \ 810 for (octave_idx_type i = 0; i < nact; i++) \ 812 octave_idx_type ia = iact[i]; \ 813 if (! PRED (v[ia])) \ 819 for (octave_idx_type i = 0; i < m; i++) r[i] = ! ZERO; \ 820 for (octave_idx_type i = 0; i < nact; i++) r[iact[i]] = ZERO; \ 826 #define OP_RED_FCNN(F, TSRC, TRES) \ 827 template <typename T> \ 829 F (const TSRC *v, TRES *r, octave_idx_type l, \ 830 octave_idx_type n, octave_idx_type u) \ 834 for (octave_idx_type i = 0; i < u; i++) \ 836 r[i] = F<T> (v, n); \ 842 for (octave_idx_type i = 0; i < u; i++) \ 861 #define OP_CUM_FCN(F, TSRC, TRES, OP) \ 862 template <typename T> \ 864 F (const TSRC *v, TRES *r, octave_idx_type n) \ 868 TRES t = r[0] = v[0]; \ 869 for (octave_idx_type i = 1; i < n; i++) \ 870 r[i] = t = t OP v[i]; \ 878 #define OP_CUM_FCN2(F, TSRC, TRES, OP) \ 879 template <typename T> \ 881 F (const TSRC *v, TRES *r, octave_idx_type m, octave_idx_type n) \ 885 for (octave_idx_type i = 0; i < m; i++) \ 888 for (octave_idx_type j = 1; j < n; j++) \ 891 for (octave_idx_type i = 0; i < m; i++) \ 892 r[i] = r0[i] OP v[i]; \ 902 #define OP_CUM_FCNN(F, TSRC, TRES) \ 903 template <typename T> \ 905 F (const TSRC *v, TRES *r, octave_idx_type l, \ 906 octave_idx_type n, octave_idx_type u) \ 910 for (octave_idx_type i = 0; i < u; i++) \ 919 for (octave_idx_type i = 0; i < u; i++) \ 932 #define OP_MINMAX_FCN(F, OP) \ 933 template <typename T> \ 934 void F (const T *v, T *r, octave_idx_type n) \ 939 octave_idx_type i = 1; \ 940 if (octave::math::isnan (tmp)) \ 942 for (; i < n && octave::math::isnan (v[i]); i++) ; \ 951 template <typename T> \ 952 void F (const T *v, T *r, octave_idx_type *ri, octave_idx_type n) \ 957 octave_idx_type tmpi = 0; \ 958 octave_idx_type i = 1; \ 959 if (octave::math::isnan (tmp)) \ 961 for (; i < n && octave::math::isnan (v[i]); i++) ; \ 985 #define OP_MINMAX_FCN2(F, OP) \ 986 template <typename T> \ 988 F (const T *v, T *r, octave_idx_type m, octave_idx_type n) \ 993 octave_idx_type j = 0; \ 994 for (octave_idx_type i = 0; i < m; i++) \ 997 if (octave::math::isnan (v[i])) \ 1002 while (nan && j < n) \ 1005 for (octave_idx_type i = 0; i < m; i++) \ 1007 if (octave::math::isnan (v[i])) \ 1009 else if (octave::math::isnan (r[i]) || v[i] OP r[i]) \ 1017 for (octave_idx_type i = 0; i < m; i++) \ 1024 template <typename T> \ 1026 F (const T *v, T *r, octave_idx_type *ri, \ 1027 octave_idx_type m, octave_idx_type n) \ 1032 octave_idx_type j = 0; \ 1033 for (octave_idx_type i = 0; i < m; i++) \ 1037 if (octave::math::isnan (v[i])) \ 1042 while (nan && j < n) \ 1045 for (octave_idx_type i = 0; i < m; i++) \ 1047 if (octave::math::isnan (v[i])) \ 1049 else if (octave::math::isnan (r[i]) || v[i] OP r[i]) \ 1060 for (octave_idx_type i = 0; i < m; i++) \ 1074 #define OP_MINMAX_FCNN(F) \ 1075 template <typename T> \ 1077 F (const T *v, T *r, octave_idx_type l, \ 1078 octave_idx_type n, octave_idx_type u) \ 1084 for (octave_idx_type i = 0; i < u; i++) \ 1093 for (octave_idx_type i = 0; i < u; i++) \ 1101 template <typename T> \ 1103 F (const T *v, T *r, octave_idx_type *ri, \ 1104 octave_idx_type l, octave_idx_type n, octave_idx_type u) \ 1109 for (octave_idx_type i = 0; i < u; i++) \ 1119 for (octave_idx_type i = 0; i < u; i++) \ 1121 F (v, r, ri, l, n); \ 1132 #define OP_CUMMINMAX_FCN(F, OP) \ 1133 template <typename T> \ 1134 void F (const T *v, T *r, octave_idx_type n) \ 1139 octave_idx_type i = 1; \ 1140 octave_idx_type j = 0; \ 1141 if (octave::math::isnan (tmp)) \ 1143 for (; i < n && octave::math::isnan (v[i]); i++) ; \ 1144 for (; j < i; j++) \ 1149 for (; i < n; i++) \ 1152 for (; j < i; j++) \ 1156 for (; j < i; j++) \ 1159 template <typename T> \ 1160 void F (const T *v, T *r, octave_idx_type *ri, octave_idx_type n) \ 1165 octave_idx_type tmpi = 0; \ 1166 octave_idx_type i = 1; \ 1167 octave_idx_type j = 0; \ 1168 if (octave::math::isnan (tmp)) \ 1170 for (; i < n && octave::math::isnan (v[i]); i++) ; \ 1171 for (; j < i; j++) \ 1182 for (; i < n; i++) \ 1185 for (; j < i; j++) \ 1193 for (; j < i; j++) \ 1207 #define OP_CUMMINMAX_FCN2(F, OP) \ 1208 template <typename T> \ 1210 F (const T *v, T *r, octave_idx_type m, octave_idx_type n) \ 1216 octave_idx_type j = 0; \ 1217 for (octave_idx_type i = 0; i < m; i++) \ 1220 if (octave::math::isnan (v[i])) \ 1227 while (nan && j < n) \ 1230 for (octave_idx_type i = 0; i < m; i++) \ 1232 if (octave::math::isnan (v[i])) \ 1237 else if (octave::math::isnan (r0[i]) || v[i] OP r0[i]) \ 1249 for (octave_idx_type i = 0; i < m; i++) \ 1250 if (v[i] OP r0[i]) \ 1260 template <typename T> \ 1262 F (const T *v, T *r, octave_idx_type *ri, \ 1263 octave_idx_type m, octave_idx_type n) \ 1269 const octave_idx_type *r0i; \ 1270 octave_idx_type j = 0; \ 1271 for (octave_idx_type i = 0; i < m; i++) \ 1273 r[i] = v[i]; ri[i] = 0; \ 1274 if (octave::math::isnan (v[i])) \ 1283 while (nan && j < n) \ 1286 for (octave_idx_type i = 0; i < m; i++) \ 1288 if (octave::math::isnan (v[i])) \ 1294 else if (octave::math::isnan (r0[i]) || v[i] OP r0[i]) \ 1314 for (octave_idx_type i = 0; i < m; i++) \ 1315 if (v[i] OP r0[i]) \ 1337 #define OP_CUMMINMAX_FCNN(F) \ 1338 template <typename T> \ 1340 F (const T *v, T *r, octave_idx_type l, \ 1341 octave_idx_type n, octave_idx_type u) \ 1347 for (octave_idx_type i = 0; i < u; i++) \ 1356 for (octave_idx_type i = 0; i < u; i++) \ 1364 template <typename T> \ 1366 F (const T *v, T *r, octave_idx_type *ri, \ 1367 octave_idx_type l, octave_idx_type n, octave_idx_type u) \ 1373 for (octave_idx_type i = 0; i < u; i++) \ 1383 for (octave_idx_type i = 0; i < u; i++) \ 1385 F (v, r, ri, l, n); \ 1396 template <
typename T>
1404 r[
i] = v[
i+1] - v[
i];
1409 T lst = v[1] - v[0];
1412 T
dif = v[
i+2] - v[
i+1];
1423 buf[
i] = v[
i+1] - v[
i];
1428 buf[
i] = buf[
i+1] - buf[
i];
1437 template <
typename T>
1446 r[
i] = v[
i+m] - v[
i];
1452 r[j] = (v[j+m+m] - v[j+m]) - (v[j+m] - v[j]);
1462 buf[
i] = v[
i*m+j+m] - v[
i*m+j];
1467 buf[
i] = buf[
i+1] - buf[
i];
1477 template <
typename T>
1489 v += n; r += n-order;
1523 l = 1, n =
dims(dim),
u = 1;
1535 template <
typename R,
typename T>
1550 if (dim <
dims.ndims ())
dims(dim) = 1;
1551 dims.chop_trailing_singletons ();
1554 mx_red_op (src.
data (), ret.fortran_vec (), l, n,
u);
1559 template <
typename R,
typename T>
1576 template <
typename R>
1587 if (dim <
dims.ndims () &&
dims(dim) != 0)
dims(dim) = 1;
1588 dims.chop_trailing_singletons ();
1596 template <
typename R>
1607 if (dim <
dims.ndims () &&
dims(dim) != 0)
dims(dim) = 1;
1608 dims.chop_trailing_singletons ();
1619 template <
typename R>
1635 template <
typename R>
1654 template <
typename R>
1657 void (*mx_diff_op) (
const R *, R *,
1668 if (dim >=
dims.ndims ())
1669 dims.resize (dim+1, 1);
1671 if (
dims(dim) <= order)
1682 mx_diff_op (src.
data (), ret.fortran_vec (), l, n,
u, order);
1692 template <
typename T>
1698 T e1 = (
s - (s1 -
t)) + (
x -
t);
1703 template <
typename T>
1715 template <
typename T>
void mx_inline_or_not(size_t n, bool *r, const X *x, const Y *y)
T mx_inline_xsum(const T *v, octave_idx_type n)
void mx_inline_mul2(size_t n, R *r, const X *x)
void op_dble_prod(double &ac, float el)
#define PROMOTE_DOUBLE(T)
void mx_inline_add2(size_t n, R *r, const X *x)
#define DEFMINMAXSPEC(T, F, OP)
void mx_inline_or2(size_t n, bool *r, const X *x)
Array< R > & do_mm_inplace_op(Array< R > &r, const Array< X > &x, void(*op)(size_t, R *, const X *), void(*op1)(size_t, R *, X), const char *opname)
Array< R > do_sm_binary_op(const X &x, const Array< Y > &y, void(*op)(size_t, R *, X, const Y *))
void mx_inline_sub2(size_t n, R *r, const X *x)
void mx_inline_cummax(const T *v, T *r, octave_idx_type n)
#define OP_MINMAX_FCN(F, OP)
void mx_inline_notzero(size_t n, bool *r, const X *x)
bool is_valid_bsxfun(const std::string &name, const dim_vector &xdv, const dim_vector &ydv)
void mx_inline_le(size_t n, bool *r, const X *x, const Y *y)
const T * data(void) const
void mx_inline_fill(size_t n, R *r, S s)
void mx_inline_uminus2(size_t n, R *r)
#define OP_CUM_FCN2(F, TSRC, TRES, OP)
Array< R > do_mx_diff_op(const Array< R > &src, int dim, octave_idx_type order, void(*mx_diff_op)(const R *, R *, octave_idx_type, octave_idx_type, octave_idx_type, octave_idx_type))
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the IEEE symbol zero divided by zero($0/0$)
T cabsq(const std::complex< T > &c)
#define DEFMXBOOLOP(F, NOT1, OP, NOT2)
bool is_valid_inplace_bsxfun(const std::string &name, const dim_vector &rdv, const dim_vector &xdv)
void mx_inline_real(size_t n, T *r, const std::complex< T > *x)
bool mx_inline_all_finite(size_t n, const T *x)
const T * fortran_vec(void) const
void mx_inline_cumcount(const bool *v, T *r, octave_idx_type n)
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
void mx_inline_map(size_t n, R *r, const X *x)
void mx_inline_ne(size_t n, bool *r, const X *x, const Y *y)
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
T mx_inline_sumsq(const T *v, octave_idx_type n)
bool mx_inline_any_negative(size_t n, const T *x)
void mx_inline_max(const T *v, T *r, octave_idx_type n)
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
void mx_inline_eq(size_t n, bool *r, const X *x, const Y *y)
Array< R > & do_ms_inplace_op(Array< R > &r, const X &x, void(*op)(size_t, R *, X))
#define OP_RED_ALLC(ac, el)
bool mx_inline_any(const T *v, octave_idx_type n)
static void dif(octave_idx_type nt, double *root, double *dif1, double *dif2, double *dif3)
void mx_inline_mul(size_t n, R *r, const X *x, const Y *y)
void mx_inline_imag(size_t n, T *r, const std::complex< T > *x)
void mx_inline_xmin(size_t n, T *r, const T *x, const T *y)
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
#define OP_CUMMINMAX_FCN2(F, OP)
#define DEFMXCMPOP(F, OP)
bool mx_inline_all_real(size_t n, const std::complex< T > *x)
void mx_inline_sub(size_t n, R *r, const X *x, const Y *y)
void mx_inline_uminus(size_t n, R *r, const X *x)
#define OP_RED_SUMSQC(ac, el)
void mx_inline_and2(size_t n, bool *r, const X *x)
subst_template_param< std::complex, T, double >::type mx_inline_dprod(const T *v, octave_idx_type n)
Array< R > do_mm_binary_op(const Array< X > &x, const Array< Y > &y, void(*op)(size_t, R *, const X *, const Y *), void(*op1)(size_t, R *, X, const Y *), void(*op2)(size_t, R *, const X *, Y), const char *opname)
Array< R > & do_mx_inplace_op(Array< R > &r, void(*op)(size_t, R *))
#define OP_CUMMINMAX_FCNN(F)
#define OP_ROW_SHORT_CIRCUIT(F, PRED, ZERO)
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
#define OP_RED_ANYC(ac, el)
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
bool mx_inline_any_positive(size_t n, const T *x)
void mx_inline_ge(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_cummin(const T *v, T *r, octave_idx_type n)
void mx_inline_pow(size_t n, R *r, const X *x, const Y *y)
void mx_inline_all_r(const T *v, bool *r, octave_idx_type m, octave_idx_type n)
the exceeded dimensions are set to if fewer subscripts than dimensions are the exceeding dimensions are merged into the final requested dimension For consider the following dims
Array< R > do_mx_red_op(const Array< T > &src, int dim, void(*mx_red_op)(const T *, R *, octave_idx_type, octave_idx_type, octave_idx_type))
bool mx_inline_any_nan(size_t n, const T *x)
subst_template_param< std::complex, T, double >::type mx_inline_dsum(const T *v, octave_idx_type n)
#define OP_RED_ALLR(ac, el)
#define OP_MINMAX_FCNN(F)
#define OP_CUMMINMAX_FCN(F, OP)
void do_inplace_bsxfun_op(Array< R > &r, const Array< X > &x, void(*op_vv)(size_t, R *, const X *), void(*op_vs)(size_t, R *, X))
#define OP_CUM_FCN(F, TSRC, TRES, OP)
T mx_inline_sum(const T *v, octave_idx_type n)
void mx_inline_gt(size_t n, bool *r, const X *x, const Y *y)
Array< R > do_mx_cum_op(const Array< T > &src, int dim, void(*mx_cum_op)(const T *, R *, octave_idx_type, octave_idx_type, octave_idx_type))
N Dimensional Array with copy-on-write semantics.
void mx_inline_not_or(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_cumprod(const T *v, T *r, octave_idx_type n)
void mx_inline_and(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_not_and(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_cumsum(const T *v, T *r, octave_idx_type n)
void mx_inline_iszero(size_t n, bool *r, const X *x)
#define DEFMXBINOPEQ(F, OP)
#define OP_RED_SUMSQ(ac, el)
double double_value(void) const
void mx_inline_or(size_t n, bool *r, const X *x, const Y *y)
Array< R > do_mx_unary_map(const Array< X > &x)
void get_extent_triplet(const dim_vector &dims, int &dim, octave_idx_type &l, octave_idx_type &n, octave_idx_type &u)
Array< R > do_mx_cumminmax_op(const Array< R > &src, int dim, void(*mx_cumminmax_op)(const R *, R *, octave_idx_type, octave_idx_type, octave_idx_type))
the element is set to zero In other the statement xample y
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
Array< R > do_mx_minmax_op(const Array< R > &src, int dim, void(*mx_minmax_op)(const R *, R *, octave_idx_type, octave_idx_type, octave_idx_type))
ColumnVector imag(const ComplexColumnVector &a)
void mx_inline_add(size_t n, R *r, const X *x, const Y *y)
void mx_inline_any_r(const T *v, bool *r, octave_idx_type m, octave_idx_type n)
std::complex< float > FloatComplex
void mx_inline_and_not(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_div(size_t n, R *r, const X *x, const Y *y)
#define OP_RED_FCNN(F, TSRC, TRES)
#define OP_RED_FCN(F, TSRC, TRES, OP, ZERO)
bool mx_inline_all(const T *v, octave_idx_type n)
#define OP_RED_SUM(ac, el)
std::complex< double > Complex
void mx_inline_div2(size_t n, R *r, const X *x)
#define DEFMXBINOP(F, OP)
void mx_inline_not(size_t n, bool *r, const X *x)
#define OP_CUM_FCNN(F, TSRC, TRES)
octave_idx_type numel(void) const
Number of elements in the array.
ColumnVector real(const ComplexColumnVector &a)
void mx_inline_lt(size_t n, bool *r, const X *x, const Y *y)
bool mx_inline_equal(size_t n, const T1 *x, const T2 *y)
#define OP_MINMAX_FCN2(F, OP)
void op_dble_sum(double &ac, float el)
Vector representing the dimensions (size) of an Array.
#define OP_RED_PROD(ac, el)
bool do_mx_check(const Array< T > &a, bool(*op)(size_t, const T *))
void mx_inline_not2(size_t n, bool *r)
T mx_inline_prod(const T *v, octave_idx_type n)
Array< R > do_ms_binary_op(const Array< X > &x, const Y &y, void(*op)(size_t, R *, const X *, Y))
Array< R > do_mx_unary_op(const Array< X > &x, void(*op)(size_t, R *, const X *))
void twosum_accum(T &s, T &e, const T &x)
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE * x
void mx_inline_diff(const T *v, T *r, octave_idx_type n, octave_idx_type order)
void mx_inline_xmax(size_t n, T *r, const T *x, const T *y)
Array< R > do_bsxfun_op(const Array< X > &x, const Array< Y > &y, void(*op_vv)(size_t, R *, const X *, const Y *), void(*op_sv)(size_t, R *, X, const Y *), void(*op_vs)(size_t, R *, const X *, Y))
T mx_inline_count(const bool *v, octave_idx_type n)
void mx_inline_min(const T *v, T *r, octave_idx_type n)