26 #if ! defined (octave_mx_inlines_h)
27 #define octave_mx_inlines_h 1
46 template <
typename R,
typename S>
49 for (
size_t i = 0; i <
n; i++)
53 template <
typename R,
typename X>
57 for (
size_t i = 0; i <
n; i++)
65 for (
size_t i = 0; i <
n; i++)
74 for (
size_t i = 0; i <
n; i++)
83 for (
size_t i = 0; i <
n; i++)
87 #define DEFMXBINOP(F, OP) \
88 template <typename R, typename X, typename Y> \
89 inline void F (size_t n, R *r, const X *x, const Y *y) \
91 for (size_t i = 0; i < n; i++) \
92 r[i] = x[i] OP y[i]; \
94 template <typename R, typename X, typename Y> \
95 inline void F (size_t n, R *r, const X *x, Y y) \
97 for (size_t i = 0; i < n; i++) \
100 template <typename R, typename X, typename Y> \
101 inline void F (size_t n, R *r, X x, const Y *y) \
103 for (size_t i = 0; i < n; i++) \
112 #define DEFMXBINOPEQ(F, OP) \
113 template <typename R, typename X> \
114 inline void F (size_t n, R *r, const X *x) \
116 for (size_t i = 0; i < n; i++) \
119 template <typename R, typename X> \
120 inline void F (size_t n, R *r, X x) \
122 for (size_t i = 0; i < n; i++) \
131 #define DEFMXCMPOP(F, OP) \
132 template <typename X, typename Y> \
133 inline void F (size_t n, bool *r, const X *x, const Y *y) \
135 for (size_t i = 0; i < n; i++) \
136 r[i] = x[i] OP y[i]; \
138 template <typename X, typename Y> \
139 inline void F (size_t n, bool *r, const X *x, Y y) \
141 for (size_t i = 0; i < n; i++) \
144 template <typename X, typename Y> \
145 inline void F (size_t n, bool *r, X x, const Y *y) \
147 for (size_t i = 0; i < n; i++) \
159 template <typename T>
166 template <
typename T>
170 return x.real () != 0 ||
x.imag () != 0;
173 template <
typename T>
180 template <
typename X>
183 for (
size_t i = 0; i <
n; i++)
189 for (
size_t i = 0; i <
n; i++)
193 #define DEFMXBOOLOP(F, NOT1, OP, NOT2) \
194 template <typename X, typename Y> \
195 inline void F (size_t n, bool *r, const X *x, const Y *y) \
197 for (size_t i = 0; i < n; i++) \
198 r[i] = ((NOT1 logical_value (x[i])) \
199 OP (NOT2 logical_value (y[i]))); \
201 template <typename X, typename Y> \
202 inline void F (size_t n, bool *r, const X *x, Y y) \
204 const bool yy = (NOT2 logical_value (y)); \
205 for (size_t i = 0; i < n; i++) \
206 r[i] = (NOT1 logical_value (x[i])) OP yy; \
208 template <typename X, typename Y> \
209 inline void F (size_t n, bool *r, X x, const Y *y) \
211 const bool xx = (NOT1 logical_value (x)); \
212 for (size_t i = 0; i < n; i++) \
213 r[i] = xx OP (NOT2 logical_value (y[i])); \
223 template <typename X>
227 for (
size_t i = 0; i <
n; i++)
231 template <
typename X>
235 for (
size_t i = 0; i <
n; i++)
239 template <
typename X>
243 for (
size_t i = 0; i <
n; i++)
247 template <
typename X>
251 for (
size_t i = 0; i <
n; i++)
255 template <
typename T>
259 for (
size_t i = 0; i <
n; i++)
268 template <
typename T>
272 for (
size_t i = 0; i <
n; i++)
281 template <
typename T>
285 for (
size_t i = 0; i <
n; i++)
294 template <
typename T>
298 for (
size_t i = 0; i <
n; i++)
307 template <
typename T>
311 for (
size_t i = 0; i <
n; i++)
313 if (
x[i].
imag () != 0)
320 template <
typename T>
323 for (
size_t i = 0; i <
n; i++)
327 template <
typename T>
330 for (
size_t i = 0; i <
n; i++)
334 template <
typename T>
338 for (
size_t i = 0; i <
n; i++)
342 template <
typename T>
346 for (
size_t i = 0; i <
n; i++)
350 template <
typename T>
354 for (
size_t i = 0; i <
n; i++)
358 template <
typename T>
362 for (
size_t i = 0; i <
n; i++)
366 template <
typename T>
370 for (
size_t i = 0; i <
n; i++)
374 template <
typename T>
378 for (
size_t i = 0; i <
n; i++)
383 #define DEFMINMAXSPEC(T, F, OP) \
385 inline void F<T> (size_t n, T *r, const T *x, T y) \
387 if (octave::math::isnan (y)) \
388 std::memcpy (r, x, n * sizeof (T)); \
390 for (size_t i = 0; i < n; i++) \
391 r[i] = (x[i] OP y ? x[i] : y); \
394 inline void F<T> (size_t n, T *r, T x, const T *y) \
396 if (octave::math::isnan (x)) \
397 std::memcpy (r, y, n * sizeof (T)); \
399 for (size_t i = 0; i < n; i++) \
400 r[i] = (y[i] OP x ? y[i] : x); \
412 template <typename R, typename X, typename Y>
418 for (
size_t i = 0; i <
n; i++)
419 r[i] =
pow (
x[i], y[i]);
422 template <
typename R,
typename X,
typename Y>
428 for (
size_t i = 0; i <
n; i++)
429 r[i] =
pow (
x[i], y);
432 template <
typename R,
typename X,
typename Y>
438 for (
size_t i = 0; i <
n; i++)
439 r[i] =
pow (
x, y[i]);
444 template <
typename R,
typename X, R fun (X x)>
447 for (
size_t i = 0; i <
n; i++)
451 template <
typename R,
typename X, R fun (const X& x)>
454 for (
size_t i = 0; i <
n; i++)
461 template <
typename R,
typename X>
464 void (*op) (
size_t, R *,
const X *))
467 op (
r.numel (),
r.fortran_vec (),
x.data ());
473 template <
typename R,
typename X, R fun (X)>
477 return do_mx_unary_op<R, X> (
x, mx_inline_map<R, X, fun>);
480 template <
typename R,
typename X, R fun (const X&)>
484 return do_mx_unary_op<R, X> (
x, mx_inline_map<R, X, fun>);
487 template <
typename R>
490 void (*op) (
size_t, R *))
492 op (
r.numel (),
r.fortran_vec ());
496 template <
typename R,
typename X,
typename Y>
499 void (*op) (
size_t, R *,
const X *,
const Y *),
500 void (*op1) (
size_t, R *, X,
const Y *),
501 void (*op2) (
size_t, R *,
const X *, Y),
509 op (
r.numel (),
r.fortran_vec (),
x.data (), y.
data ());
520 template <
typename R,
typename X,
typename Y>
523 void (*op) (
size_t, R *,
const X *, Y))
526 op (
r.numel (),
r.fortran_vec (),
x.data (), y);
530 template <
typename R,
typename X,
typename Y>
533 void (*op) (
size_t, R *, X,
const Y *))
536 op (
r.numel (),
r.fortran_vec (),
x, y.
data ());
540 template <
typename R,
typename X>
543 void (*op) (
size_t, R *,
const X *),
544 void (*op1) (
size_t, R *, X),
550 op (
r.numel (),
r.fortran_vec (),
x.data ());
559 template <
typename R,
typename X>
562 void (*op) (
size_t, R *, X))
564 op (
r.numel (),
r.fortran_vec (),
x);
568 template <
typename T1,
typename T2>
572 for (
size_t i = 0; i <
n; i++)
578 template <
typename T>
581 bool (*op) (
size_t,
const T *))
588 template <
typename T>
589 inline T
cabsq (
const std::complex<T>& c)
591 return c.real () * c.real () + c.imag () * c.imag ();
595 template <
typename T>
602 template <
typename T>
610 template <
typename T>
617 template <
typename T>
674 #define OP_RED_SUM(ac, el) ac += el
675 #define OP_RED_PROD(ac, el) ac *= el
676 #define OP_RED_SUMSQ(ac, el) ac += ((el)*(el))
677 #define OP_RED_SUMSQC(ac, el) ac += cabsq (el)
692 template <
typename T>
712 template <
typename T>
720 #define OP_RED_ANYC(ac, el) \
729 #define OP_RED_ALLC(ac, el) \
730 if (xis_false (el)) \
738 #define OP_RED_FCN(F, TSRC, TRES, OP, ZERO) \
739 template <typename T> \
741 F (const TSRC *v, octave_idx_type n) \
744 for (octave_idx_type i = 0; i < n; i++) \
749 #define PROMOTE_DOUBLE(T) \
750 typename subst_template_param<std::complex, T, double>::type
762 #define OP_RED_FCN2(F, TSRC, TRES, OP, ZERO) \
763 template <typename T> \
765 F (const TSRC *v, TRES *r, octave_idx_type m, octave_idx_type n) \
767 for (octave_idx_type i = 0; i < m; i++) \
769 for (octave_idx_type j = 0; j < n; j++) \
771 for (octave_idx_type i = 0; i < m; i++) \
785 #define OP_RED_ANYR(ac, el) ac |= xis_true (el)
786 #define OP_RED_ALLR(ac, el) ac &= xis_true (el)
796 #define OP_ROW_SHORT_CIRCUIT(F, PRED, ZERO) \
797 template <typename T> \
799 F (const T *v, bool *r, octave_idx_type m, octave_idx_type n) \
802 return F ## _r (v, r, m, n); \
805 OCTAVE_LOCAL_BUFFER (octave_idx_type, iact, m); \
806 for (octave_idx_type i = 0; i < m; i++) iact[i] = i; \
807 octave_idx_type nact = m; \
808 for (octave_idx_type j = 0; j < n; j++) \
810 octave_idx_type k = 0; \
811 for (octave_idx_type i = 0; i < nact; i++) \
813 octave_idx_type ia = iact[i]; \
814 if (! PRED (v[ia])) \
820 for (octave_idx_type i = 0; i < m; i++) r[i] = ! ZERO; \
821 for (octave_idx_type i = 0; i < nact; i++) r[iact[i]] = ZERO; \
827 #define OP_RED_FCNN(F, TSRC, TRES) \
828 template <typename T> \
830 F (const TSRC *v, TRES *r, octave_idx_type l, \
831 octave_idx_type n, octave_idx_type u) \
835 for (octave_idx_type i = 0; i < u; i++) \
837 r[i] = F<T> (v, n); \
843 for (octave_idx_type i = 0; i < u; i++) \
862 #define OP_CUM_FCN(F, TSRC, TRES, OP) \
863 template <typename T> \
865 F (const TSRC *v, TRES *r, octave_idx_type n) \
869 TRES t = r[0] = v[0]; \
870 for (octave_idx_type i = 1; i < n; i++) \
871 r[i] = t = t OP v[i]; \
879 #define OP_CUM_FCN2(F, TSRC, TRES, OP) \
880 template <typename T> \
882 F (const TSRC *v, TRES *r, octave_idx_type m, octave_idx_type n) \
886 for (octave_idx_type i = 0; i < m; i++) \
889 for (octave_idx_type j = 1; j < n; j++) \
892 for (octave_idx_type i = 0; i < m; i++) \
893 r[i] = r0[i] OP v[i]; \
903 #define OP_CUM_FCNN(F, TSRC, TRES) \
904 template <typename T> \
906 F (const TSRC *v, TRES *r, octave_idx_type l, \
907 octave_idx_type n, octave_idx_type u) \
911 for (octave_idx_type i = 0; i < u; i++) \
920 for (octave_idx_type i = 0; i < u; i++) \
933 #define OP_MINMAX_FCN(F, OP) \
934 template <typename T> \
935 void F (const T *v, T *r, octave_idx_type n) \
940 octave_idx_type i = 1; \
941 if (octave::math::isnan (tmp)) \
943 for (; i < n && octave::math::isnan (v[i]); i++) ; \
952 template <typename T> \
953 void F (const T *v, T *r, octave_idx_type *ri, octave_idx_type n) \
958 octave_idx_type tmpi = 0; \
959 octave_idx_type i = 1; \
960 if (octave::math::isnan (tmp)) \
962 for (; i < n && octave::math::isnan (v[i]); i++) ; \
986 #define OP_MINMAX_FCN2(F, OP) \
987 template <typename T> \
989 F (const T *v, T *r, octave_idx_type m, octave_idx_type n) \
994 octave_idx_type j = 0; \
995 for (octave_idx_type i = 0; i < m; i++) \
998 if (octave::math::isnan (v[i])) \
1003 while (nan && j < n) \
1006 for (octave_idx_type i = 0; i < m; i++) \
1008 if (octave::math::isnan (v[i])) \
1010 else if (octave::math::isnan (r[i]) || v[i] OP r[i]) \
1018 for (octave_idx_type i = 0; i < m; i++) \
1025 template <typename T> \
1027 F (const T *v, T *r, octave_idx_type *ri, \
1028 octave_idx_type m, octave_idx_type n) \
1033 octave_idx_type j = 0; \
1034 for (octave_idx_type i = 0; i < m; i++) \
1038 if (octave::math::isnan (v[i])) \
1043 while (nan && j < n) \
1046 for (octave_idx_type i = 0; i < m; i++) \
1048 if (octave::math::isnan (v[i])) \
1050 else if (octave::math::isnan (r[i]) || v[i] OP r[i]) \
1061 for (octave_idx_type i = 0; i < m; i++) \
1075 #define OP_MINMAX_FCNN(F) \
1076 template <typename T> \
1078 F (const T *v, T *r, octave_idx_type l, \
1079 octave_idx_type n, octave_idx_type u) \
1085 for (octave_idx_type i = 0; i < u; i++) \
1094 for (octave_idx_type i = 0; i < u; i++) \
1102 template <typename T> \
1104 F (const T *v, T *r, octave_idx_type *ri, \
1105 octave_idx_type l, octave_idx_type n, octave_idx_type u) \
1110 for (octave_idx_type i = 0; i < u; i++) \
1120 for (octave_idx_type i = 0; i < u; i++) \
1122 F (v, r, ri, l, n); \
1133 #define OP_CUMMINMAX_FCN(F, OP) \
1134 template <typename T> \
1135 void F (const T *v, T *r, octave_idx_type n) \
1140 octave_idx_type i = 1; \
1141 octave_idx_type j = 0; \
1142 if (octave::math::isnan (tmp)) \
1144 for (; i < n && octave::math::isnan (v[i]); i++) ; \
1145 for (; j < i; j++) \
1150 for (; i < n; i++) \
1153 for (; j < i; j++) \
1157 for (; j < i; j++) \
1160 template <typename T> \
1161 void F (const T *v, T *r, octave_idx_type *ri, octave_idx_type n) \
1166 octave_idx_type tmpi = 0; \
1167 octave_idx_type i = 1; \
1168 octave_idx_type j = 0; \
1169 if (octave::math::isnan (tmp)) \
1171 for (; i < n && octave::math::isnan (v[i]); i++) ; \
1172 for (; j < i; j++) \
1183 for (; i < n; i++) \
1186 for (; j < i; j++) \
1194 for (; j < i; j++) \
1208 #define OP_CUMMINMAX_FCN2(F, OP) \
1209 template <typename T> \
1211 F (const T *v, T *r, octave_idx_type m, octave_idx_type n) \
1217 octave_idx_type j = 0; \
1218 for (octave_idx_type i = 0; i < m; i++) \
1221 if (octave::math::isnan (v[i])) \
1228 while (nan && j < n) \
1231 for (octave_idx_type i = 0; i < m; i++) \
1233 if (octave::math::isnan (v[i])) \
1238 else if (octave::math::isnan (r0[i]) || v[i] OP r0[i]) \
1250 for (octave_idx_type i = 0; i < m; i++) \
1251 if (v[i] OP r0[i]) \
1261 template <typename T> \
1263 F (const T *v, T *r, octave_idx_type *ri, \
1264 octave_idx_type m, octave_idx_type n) \
1270 const octave_idx_type *r0i; \
1271 octave_idx_type j = 0; \
1272 for (octave_idx_type i = 0; i < m; i++) \
1274 r[i] = v[i]; ri[i] = 0; \
1275 if (octave::math::isnan (v[i])) \
1284 while (nan && j < n) \
1287 for (octave_idx_type i = 0; i < m; i++) \
1289 if (octave::math::isnan (v[i])) \
1295 else if (octave::math::isnan (r0[i]) || v[i] OP r0[i]) \
1315 for (octave_idx_type i = 0; i < m; i++) \
1316 if (v[i] OP r0[i]) \
1338 #define OP_CUMMINMAX_FCNN(F) \
1339 template <typename T> \
1341 F (const T *v, T *r, octave_idx_type l, \
1342 octave_idx_type n, octave_idx_type u) \
1348 for (octave_idx_type i = 0; i < u; i++) \
1357 for (octave_idx_type i = 0; i < u; i++) \
1365 template <typename T> \
1367 F (const T *v, T *r, octave_idx_type *ri, \
1368 octave_idx_type l, octave_idx_type n, octave_idx_type u) \
1374 for (octave_idx_type i = 0; i < u; i++) \
1384 for (octave_idx_type i = 0; i < u; i++) \
1386 F (v, r, ri, l, n); \
1397 template <
typename T>
1405 r[i] = v[i+1] - v[i];
1410 T lst = v[1] - v[0];
1413 T
dif = v[i+2] - v[i+1];
1424 buf[i] = v[i+1] - v[i];
1429 buf[i] = buf[i+1] - buf[i];
1438 template <
typename T>
1447 r[i] = v[i+
m] - v[i];
1453 r[j] = (v[j+
m+
m] - v[j+
m]) - (v[j+
m] - v[j]);
1463 buf[i] = v[i*
m+j+
m] - v[i*
m+j];
1468 buf[i] = buf[i+1] - buf[i];
1478 template <
typename T>
1490 v +=
n;
r +=
n-order;
1524 l = 1,
n = dims(dim), u = 1;
1536 template <
typename R,
typename T>
1545 if (dims.
ndims () == 2 && dims(0) == 0 && dims(1) == 0)
1551 if (dim < dims.
ndims ()) dims(dim) = 1;
1555 mx_red_op (src.
data (), ret.fortran_vec (), l,
n, u);
1560 template <
typename R,
typename T>
1572 mx_cum_op (src.
data (), ret.fortran_vec (), l,
n, u);
1577 template <
typename R>
1588 if (dim < dims.
ndims () && dims(dim) != 0) dims(dim) = 1;
1592 mx_minmax_op (src.
data (), ret.fortran_vec (), l,
n, u);
1597 template <
typename R>
1608 if (dim < dims.
ndims () && dims(dim) != 0) dims(dim) = 1;
1620 template <
typename R>
1631 mx_cumminmax_op (src.
data (), ret.fortran_vec (), l,
n, u);
1636 template <
typename R>
1655 template <
typename R>
1658 void (*mx_diff_op) (
const R *, R *,
1669 if (dim >= dims.
ndims ())
1672 if (dims(dim) <= order)
1683 mx_diff_op (src.
data (), ret.fortran_vec (), l,
n, u, order);
1693 template <
typename T>
1699 T e1 = (s - (s1 - t)) + (
x - t);
1704 template <
typename T>
1716 template <
typename T>
template class OCTAVE_API Array< octave_idx_type >
static void dif(octave_idx_type nt, double *root, double *dif1, double *dif2, double *dif3)
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))
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))
bool is_valid_inplace_bsxfun(const std::string &name, const dim_vector &rdv, const dim_vector &xdv)
bool is_valid_bsxfun(const std::string &name, const dim_vector &xdv, const dim_vector &ydv)
N Dimensional Array with copy-on-write semantics.
octave_idx_type numel(void) const
Number of elements in the array.
const T * data(void) const
Size of the specified dimension.
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
const T * fortran_vec(void) const
Size of the specified dimension.
Vector representing the dimensions (size) of an Array.
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
void resize(int n, int fill_value=0)
void chop_trailing_singletons(void)
int first_non_singleton(int def=0) const
octave_idx_type ndims(void) const
Number of dimensions.
double double_value(void) const
ColumnVector real(const ComplexColumnVector &a)
ColumnVector imag(const ComplexColumnVector &a)
F77_RET_T const F77_DBLE * x
bool mx_inline_any_positive(size_t n, const T *x)
void mx_inline_and2(size_t n, bool *r, const X *x)
void mx_inline_or_not(size_t n, bool *r, const X *x, const Y *y)
#define DEFMXCMPOP(F, OP)
void mx_inline_not2(size_t n, bool *r)
bool mx_inline_all_finite(size_t n, const T *x)
#define OP_RED_ANYR(ac, el)
#define OP_CUM_FCN2(F, TSRC, TRES, OP)
#define OP_ROW_SHORT_CIRCUIT(F, PRED, ZERO)
T mx_inline_xsum(const T *v, octave_idx_type n)
void mx_inline_div(size_t n, R *r, const X *x, const Y *y)
#define OP_RED_SUMSQC(ac, el)
void mx_inline_div2(size_t n, R *r, const X *x)
void mx_inline_any(const T *v, bool *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
void mx_inline_gt(size_t n, bool *r, const X *x, const Y *y)
#define OP_RED_FCNN(F, TSRC, TRES)
#define OP_CUMMINMAX_FCN(F, OP)
void mx_inline_and_not(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_ne(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_or(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_imag(size_t n, T *r, const std::complex< T > *x)
void mx_inline_and(size_t n, bool *r, const X *x, const Y *y)
#define OP_RED_ALLC(ac, el)
void mx_inline_cummin(const T *v, T *r, octave_idx_type n)
void mx_inline_iszero(size_t n, bool *r, const X *x)
#define DEFMXBOOLOP(F, NOT1, OP, NOT2)
#define PROMOTE_DOUBLE(T)
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))
void mx_inline_uminus(size_t n, R *r, const X *x)
#define OP_MINMAX_FCN2(F, OP)
void mx_inline_notzero(size_t n, bool *r, const X *x)
void mx_inline_cumprod(const T *v, T *r, octave_idx_type n)
void mx_inline_cumsum(const T *v, T *r, octave_idx_type n)
void mx_inline_map(size_t n, R *r, const X *x)
void twosum_accum(T &s, T &e, const T &x)
void mx_inline_not(size_t n, bool *r, const X *x)
#define DEFMXBINOPEQ(F, OP)
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_mx_inplace_op(Array< R > &r, void(*op)(size_t, R *))
void mx_inline_max(const T *v, T *r, octave_idx_type n)
#define OP_CUM_FCN(F, TSRC, TRES, OP)
void mx_inline_le(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_eq(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_mul(size_t n, R *r, const X *x, const Y *y)
#define OP_MINMAX_FCNN(F)
#define OP_CUM_FCNN(F, TSRC, TRES)
void mx_inline_all(const T *v, bool *r, octave_idx_type m, 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))
void mx_inline_prod(const T *v, T *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
void mx_inline_lt(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_cummax(const T *v, T *r, octave_idx_type n)
#define OP_CUMMINMAX_FCN2(F, OP)
Array< R > & do_ms_inplace_op(Array< R > &r, const X &x, void(*op)(size_t, R *, X))
void op_dble_prod(double &ac, float el)
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))
void mx_inline_add2(size_t n, R *r, const X *x)
T cabsq(const std::complex< T > &c)
#define OP_RED_FCN2(F, TSRC, TRES, OP, ZERO)
void mx_inline_not_and(size_t n, bool *r, const X *x, const Y *y)
void op_dble_sum(double &ac, float el)
void mx_inline_sub2(size_t n, R *r, const X *x)
void mx_inline_uminus2(size_t n, R *r)
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))
bool mx_inline_any_negative(size_t n, const T *x)
#define DEFMINMAXSPEC(T, F, OP)
void mx_inline_not_or(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_dprod(const T *v, typename subst_template_param< std::complex, T, double >::type *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
void mx_inline_cumcount(const bool *v, T *r, octave_idx_type n)
#define OP_RED_ANYC(ac, el)
void mx_inline_xmax(size_t n, T *r, const T *x, const T *y)
Array< R > do_sm_binary_op(const X &x, const Array< Y > &y, void(*op)(size_t, R *, X, const Y *))
bool mx_inline_all_real(size_t n, const std::complex< T > *x)
Array< R > do_mx_unary_op(const Array< X > &x, void(*op)(size_t, R *, const X *))
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))
void mx_inline_ge(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_count(const bool *v, T *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
T mx_inline_sumsq(const T *v, octave_idx_type n)
Array< R > do_mx_unary_map(const Array< X > &x)
#define OP_CUMMINMAX_FCNN(F)
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)
bool mx_inline_any_nan(size_t n, const T *x)
T mx_inline_sum(const T *v, octave_idx_type n)
void mx_inline_min(const T *v, T *r, octave_idx_type n)
void mx_inline_add(size_t n, R *r, const X *x, const Y *y)
void mx_inline_or2(size_t n, bool *r, const X *x)
#define OP_RED_SUM(ac, el)
void mx_inline_dsum(const T *v, typename subst_template_param< std::complex, T, double >::type *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
#define OP_MINMAX_FCN(F, OP)
#define OP_RED_FCN(F, TSRC, TRES, OP, ZERO)
void mx_inline_diff(const T *v, T *r, octave_idx_type n, octave_idx_type order)
#define OP_RED_PROD(ac, el)
void mx_inline_real(size_t n, T *r, const std::complex< T > *x)
bool mx_inline_equal(size_t n, const T1 *x, const T2 *y)
void mx_inline_mul2(size_t n, R *r, const X *x)
void mx_inline_sub(size_t n, R *r, const X *x, const Y *y)
void mx_inline_fill(size_t n, R *r, S s)
void get_extent_triplet(const dim_vector &dims, int &dim, octave_idx_type &l, octave_idx_type &n, octave_idx_type &u)
void mx_inline_xmin(size_t n, T *r, const T *x, const T *y)
bool do_mx_check(const Array< T > &a, bool(*op)(size_t, const T *))
#define OP_RED_ALLR(ac, el)
#define OP_RED_SUMSQ(ac, el)
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))
#define DEFMXBINOP(F, OP)
void mx_inline_pow(size_t n, R *r, const X *x, const Y *y)
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
std::complex< double > Complex
std::complex< float > FloatComplex
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
#define OCTAVE_LOCAL_BUFFER(T, buf, size)