26 #if ! defined (octave_mx_inlines_h)
27 #define octave_mx_inlines_h 1
46 template <
typename R,
typename S>
50 for (std::size_t i = 0; i <
n; i++)
54 template <
typename R,
typename X>
58 for (std::size_t i = 0; i <
n; i++)
66 for (std::size_t i = 0; i <
n; i++)
75 for (std::size_t i = 0; i <
n; i++)
84 for (std::size_t i = 0; i <
n; i++)
88 #define DEFMXBINOP(F, OP) \
89 template <typename R, typename X, typename Y> \
90 inline void F (std::size_t n, R *r, const X *x, const Y *y) \
92 for (std::size_t i = 0; i < n; i++) \
93 r[i] = x[i] OP y[i]; \
95 template <typename R, typename X, typename Y> \
96 inline void F (std::size_t n, R *r, const X *x, Y y) \
98 for (std::size_t i = 0; i < n; i++) \
101 template <typename R, typename X, typename Y> \
102 inline void F (std::size_t n, R *r, X x, const Y *y) \
104 for (std::size_t i = 0; i < n; i++) \
113 #define DEFMXBINOPEQ(F, OP) \
114 template <typename R, typename X> \
115 inline void F (std::size_t n, R *r, const X *x) \
117 for (std::size_t i = 0; i < n; i++) \
120 template <typename R, typename X> \
121 inline void F (std::size_t n, R *r, X x) \
123 for (std::size_t i = 0; i < n; i++) \
132 #define DEFMXCMPOP(F, OP) \
133 template <typename X, typename Y> \
134 inline void F (std::size_t n, bool *r, const X *x, const Y *y) \
136 for (std::size_t i = 0; i < n; i++) \
137 r[i] = x[i] OP y[i]; \
139 template <typename X, typename Y> \
140 inline void F (std::size_t n, bool *r, const X *x, Y y) \
142 for (std::size_t i = 0; i < n; i++) \
145 template <typename X, typename Y> \
146 inline void F (std::size_t n, bool *r, X x, const Y *y) \
148 for (std::size_t i = 0; i < n; i++) \
160 template <typename T>
167 template <
typename T>
171 return x.real () != 0 ||
x.imag () != 0;
174 template <
typename T>
181 template <
typename X>
185 for (std::size_t i = 0; i <
n; i++)
192 for (std::size_t i = 0; i <
n; i++)
196 #define DEFMXBOOLOP(F, NOT1, OP, NOT2) \
197 template <typename X, typename Y> \
198 inline void F (std::size_t n, bool *r, const X *x, const Y *y) \
200 for (std::size_t i = 0; i < n; i++) \
201 r[i] = ((NOT1 logical_value (x[i])) \
202 OP (NOT2 logical_value (y[i]))); \
204 template <typename X, typename Y> \
205 inline void F (std::size_t n, bool *r, const X *x, Y y) \
207 const bool yy = (NOT2 logical_value (y)); \
208 for (std::size_t i = 0; i < n; i++) \
209 r[i] = (NOT1 logical_value (x[i])) OP yy; \
211 template <typename X, typename Y> \
212 inline void F (std::size_t n, bool *r, X x, const Y *y) \
214 const bool xx = (NOT1 logical_value (x)); \
215 for (std::size_t i = 0; i < n; i++) \
216 r[i] = xx OP (NOT2 logical_value (y[i])); \
226 template <typename X>
230 for (std::size_t i = 0; i <
n; i++)
234 template <
typename X>
238 for (std::size_t i = 0; i <
n; i++)
242 template <
typename X>
246 for (std::size_t i = 0; i <
n; i++)
250 template <
typename X>
254 for (std::size_t i = 0; i <
n; i++)
258 template <
typename T>
262 for (std::size_t i = 0; i <
n; i++)
271 template <
typename T>
275 for (std::size_t i = 0; i <
n; i++)
284 template <
typename T>
288 for (std::size_t i = 0; i <
n; i++)
297 template <
typename T>
301 for (std::size_t i = 0; i <
n; i++)
310 template <
typename T>
314 for (std::size_t i = 0; i <
n; i++)
316 if (
x[i].
imag () != 0)
323 template <
typename T>
327 for (std::size_t i = 0; i <
n; i++)
331 template <
typename T>
335 for (std::size_t i = 0; i <
n; i++)
339 template <
typename T>
343 for (std::size_t i = 0; i <
n; i++)
347 template <
typename T>
351 for (std::size_t i = 0; i <
n; i++)
355 template <
typename T>
359 for (std::size_t i = 0; i <
n; i++)
363 template <
typename T>
367 for (std::size_t i = 0; i <
n; i++)
371 template <
typename T>
375 for (std::size_t i = 0; i <
n; i++)
379 template <
typename T>
383 for (std::size_t i = 0; i <
n; i++)
388 #define DEFMINMAXSPEC(T, F, OP) \
390 inline void F<T> (std::size_t n, T *r, const T *x, T y) \
392 if (octave::math::isnan (y)) \
393 std::memcpy (r, x, n * sizeof (T)); \
395 for (std::size_t i = 0; i < n; i++) \
396 r[i] = (x[i] OP y ? x[i] : y); \
399 inline void F<T> (std::size_t n, T *r, T x, const T *y) \
401 if (octave::math::isnan (x)) \
402 std::memcpy (r, y, n * sizeof (T)); \
404 for (std::size_t i = 0; i < n; i++) \
405 r[i] = (y[i] OP x ? y[i] : x); \
417 template <typename R, typename X, typename Y>
423 for (std::size_t i = 0; i <
n; i++)
424 r[i] =
pow (
x[i], y[i]);
427 template <
typename R,
typename X,
typename Y>
433 for (std::size_t i = 0; i <
n; i++)
434 r[i] =
pow (
x[i], y);
437 template <
typename R,
typename X,
typename Y>
443 for (std::size_t i = 0; i <
n; i++)
444 r[i] =
pow (
x, y[i]);
449 template <
typename R,
typename X, R fcn (X x)>
453 for (std::size_t i = 0; i <
n; i++)
457 template <
typename R,
typename X, R fcn (const X& x)>
461 for (std::size_t i = 0; i <
n; i++)
468 template <
typename R,
typename X>
471 void (*op) (std::size_t, R *,
const X *))
474 op (
r.numel (),
r.fortran_vec (),
x.data ());
480 template <
typename R,
typename X, R fcn (X)>
484 return do_mx_unary_op<R, X> (
x, mx_inline_map<R, X, fcn>);
487 template <
typename R,
typename X, R fcn (const X&)>
491 return do_mx_unary_op<R, X> (
x, mx_inline_map<R, X, fcn>);
494 template <
typename R>
497 void (*op) (std::size_t, R *))
499 op (
r.numel (),
r.fortran_vec ());
503 template <
typename R,
typename X,
typename Y>
506 void (*op) (std::size_t, R *,
const X *,
const Y *),
507 void (*op1) (std::size_t, R *, X,
const Y *),
508 void (*op2) (std::size_t, R *,
const X *, Y),
516 op (
r.numel (),
r.fortran_vec (),
x.data (), y.
data ());
527 template <
typename R,
typename X,
typename Y>
530 void (*op) (std::size_t, R *,
const X *, Y))
533 op (
r.numel (),
r.fortran_vec (),
x.data (), y);
537 template <
typename R,
typename X,
typename Y>
540 void (*op) (std::size_t, R *, X,
const Y *))
543 op (
r.numel (),
r.fortran_vec (),
x, y.
data ());
547 template <
typename R,
typename X>
550 void (*op) (std::size_t, R *,
const X *),
551 void (*op1) (std::size_t, R *, X),
557 op (
r.numel (),
r.fortran_vec (),
x.data ());
566 template <
typename R,
typename X>
569 void (*op) (std::size_t, R *, X))
571 op (
r.numel (),
r.fortran_vec (),
x);
575 template <
typename T1,
typename T2>
579 for (std::size_t i = 0; i <
n; i++)
585 template <
typename T>
588 bool (*op) (std::size_t,
const T *))
595 template <
typename T>
599 return c.real () * c.real () + c.imag () * c.imag ();
603 template <
typename T>
610 template <
typename T>
618 template <
typename T>
625 template <
typename T>
682 #define OP_RED_SUM(ac, el) ac += el
683 #define OP_RED_PROD(ac, el) ac *= el
684 #define OP_RED_SUMSQ(ac, el) ac += ((el)*(el))
685 #define OP_RED_SUMSQC(ac, el) ac += cabsq (el)
700 template <
typename T>
720 template <
typename T>
728 #define OP_RED_ANYC(ac, el) \
737 #define OP_RED_ALLC(ac, el) \
738 if (xis_false (el)) \
746 #define OP_RED_FCN(F, TSRC, TRES, OP, ZERO) \
747 template <typename T> \
749 F (const TSRC *v, octave_idx_type n) \
752 for (octave_idx_type i = 0; i < n; i++) \
757 #define PROMOTE_DOUBLE(T) \
758 typename subst_template_param<std::complex, T, double>::type
770 #define OP_RED_FCN2(F, TSRC, TRES, OP, ZERO) \
771 template <typename T> \
773 F (const TSRC *v, TRES *r, octave_idx_type m, octave_idx_type n) \
775 for (octave_idx_type i = 0; i < m; i++) \
777 for (octave_idx_type j = 0; j < n; j++) \
779 for (octave_idx_type i = 0; i < m; i++) \
793 #define OP_RED_ANYR(ac, el) ac |= xis_true (el)
794 #define OP_RED_ALLR(ac, el) ac &= xis_true (el)
804 #define OP_ROW_SHORT_CIRCUIT(F, PRED, ZERO) \
805 template <typename T> \
807 F (const T *v, bool *r, octave_idx_type m, octave_idx_type n) \
810 return F ## _r (v, r, m, n); \
813 OCTAVE_LOCAL_BUFFER (octave_idx_type, iact, m); \
814 for (octave_idx_type i = 0; i < m; i++) iact[i] = i; \
815 octave_idx_type nact = m; \
816 for (octave_idx_type j = 0; j < n; j++) \
818 octave_idx_type k = 0; \
819 for (octave_idx_type i = 0; i < nact; i++) \
821 octave_idx_type ia = iact[i]; \
822 if (! PRED (v[ia])) \
828 for (octave_idx_type i = 0; i < m; i++) r[i] = ! ZERO; \
829 for (octave_idx_type i = 0; i < nact; i++) r[iact[i]] = ZERO; \
835 #define OP_RED_FCNN(F, TSRC, TRES) \
836 template <typename T> \
838 F (const TSRC *v, TRES *r, octave_idx_type l, \
839 octave_idx_type n, octave_idx_type u) \
843 for (octave_idx_type i = 0; i < u; i++) \
845 r[i] = F<T> (v, n); \
851 for (octave_idx_type i = 0; i < u; i++) \
870 #define OP_CUM_FCN(F, TSRC, TRES, OP) \
871 template <typename T> \
873 F (const TSRC *v, TRES *r, octave_idx_type n) \
877 TRES t = r[0] = v[0]; \
878 for (octave_idx_type i = 1; i < n; i++) \
879 r[i] = t = t OP v[i]; \
887 #define OP_CUM_FCN2(F, TSRC, TRES, OP) \
888 template <typename T> \
890 F (const TSRC *v, TRES *r, octave_idx_type m, octave_idx_type n) \
894 for (octave_idx_type i = 0; i < m; i++) \
897 for (octave_idx_type j = 1; j < n; j++) \
900 for (octave_idx_type i = 0; i < m; i++) \
901 r[i] = r0[i] OP v[i]; \
911 #define OP_CUM_FCNN(F, TSRC, TRES) \
912 template <typename T> \
914 F (const TSRC *v, TRES *r, octave_idx_type l, \
915 octave_idx_type n, octave_idx_type u) \
919 for (octave_idx_type i = 0; i < u; i++) \
928 for (octave_idx_type i = 0; i < u; i++) \
941 #define OP_MINMAX_FCN(F, OP) \
942 template <typename T> \
943 void F (const T *v, T *r, octave_idx_type n) \
948 octave_idx_type i = 1; \
949 if (octave::math::isnan (tmp)) \
951 for (; i < n && octave::math::isnan (v[i]); i++) ; \
960 template <typename T> \
961 void F (const T *v, T *r, octave_idx_type *ri, octave_idx_type n) \
966 octave_idx_type tmpi = 0; \
967 octave_idx_type i = 1; \
968 if (octave::math::isnan (tmp)) \
970 for (; i < n && octave::math::isnan (v[i]); i++) ; \
994 #define OP_MINMAX_FCN2(F, OP) \
995 template <typename T> \
997 F (const T *v, T *r, octave_idx_type m, octave_idx_type n) \
1002 octave_idx_type j = 0; \
1003 for (octave_idx_type i = 0; i < m; i++) \
1006 if (octave::math::isnan (v[i])) \
1011 while (nan && j < n) \
1014 for (octave_idx_type i = 0; i < m; i++) \
1016 if (octave::math::isnan (v[i])) \
1018 else if (octave::math::isnan (r[i]) || v[i] OP r[i]) \
1026 for (octave_idx_type i = 0; i < m; i++) \
1033 template <typename T> \
1035 F (const T *v, T *r, octave_idx_type *ri, \
1036 octave_idx_type m, octave_idx_type n) \
1041 octave_idx_type j = 0; \
1042 for (octave_idx_type i = 0; i < m; i++) \
1046 if (octave::math::isnan (v[i])) \
1051 while (nan && j < n) \
1054 for (octave_idx_type i = 0; i < m; i++) \
1056 if (octave::math::isnan (v[i])) \
1058 else if (octave::math::isnan (r[i]) || v[i] OP r[i]) \
1069 for (octave_idx_type i = 0; i < m; i++) \
1083 #define OP_MINMAX_FCNN(F) \
1084 template <typename T> \
1086 F (const T *v, T *r, octave_idx_type l, \
1087 octave_idx_type n, octave_idx_type u) \
1093 for (octave_idx_type i = 0; i < u; i++) \
1102 for (octave_idx_type i = 0; i < u; i++) \
1110 template <typename T> \
1112 F (const T *v, T *r, octave_idx_type *ri, \
1113 octave_idx_type l, octave_idx_type n, octave_idx_type u) \
1118 for (octave_idx_type i = 0; i < u; i++) \
1128 for (octave_idx_type i = 0; i < u; i++) \
1130 F (v, r, ri, l, n); \
1141 #define OP_CUMMINMAX_FCN(F, OP) \
1142 template <typename T> \
1143 void F (const T *v, T *r, octave_idx_type n) \
1148 octave_idx_type i = 1; \
1149 octave_idx_type j = 0; \
1150 if (octave::math::isnan (tmp)) \
1152 for (; i < n && octave::math::isnan (v[i]); i++) ; \
1153 for (; j < i; j++) \
1158 for (; i < n; i++) \
1161 for (; j < i; j++) \
1165 for (; j < i; j++) \
1168 template <typename T> \
1169 void F (const T *v, T *r, octave_idx_type *ri, octave_idx_type n) \
1174 octave_idx_type tmpi = 0; \
1175 octave_idx_type i = 1; \
1176 octave_idx_type j = 0; \
1177 if (octave::math::isnan (tmp)) \
1179 for (; i < n && octave::math::isnan (v[i]); i++) ; \
1180 for (; j < i; j++) \
1191 for (; i < n; i++) \
1194 for (; j < i; j++) \
1202 for (; j < i; j++) \
1216 #define OP_CUMMINMAX_FCN2(F, OP) \
1217 template <typename T> \
1219 F (const T *v, T *r, octave_idx_type m, octave_idx_type n) \
1225 octave_idx_type j = 0; \
1226 for (octave_idx_type i = 0; i < m; i++) \
1229 if (octave::math::isnan (v[i])) \
1236 while (nan && j < n) \
1239 for (octave_idx_type i = 0; i < m; i++) \
1241 if (octave::math::isnan (v[i])) \
1246 else if (octave::math::isnan (r0[i]) || v[i] OP r0[i]) \
1258 for (octave_idx_type i = 0; i < m; i++) \
1259 if (v[i] OP r0[i]) \
1269 template <typename T> \
1271 F (const T *v, T *r, octave_idx_type *ri, \
1272 octave_idx_type m, octave_idx_type n) \
1278 const octave_idx_type *r0i; \
1279 octave_idx_type j = 0; \
1280 for (octave_idx_type i = 0; i < m; i++) \
1282 r[i] = v[i]; ri[i] = 0; \
1283 if (octave::math::isnan (v[i])) \
1292 while (nan && j < n) \
1295 for (octave_idx_type i = 0; i < m; i++) \
1297 if (octave::math::isnan (v[i])) \
1303 else if (octave::math::isnan (r0[i]) || v[i] OP r0[i]) \
1323 for (octave_idx_type i = 0; i < m; i++) \
1324 if (v[i] OP r0[i]) \
1346 #define OP_CUMMINMAX_FCNN(F) \
1347 template <typename T> \
1349 F (const T *v, T *r, octave_idx_type l, \
1350 octave_idx_type n, octave_idx_type u) \
1356 for (octave_idx_type i = 0; i < u; i++) \
1365 for (octave_idx_type i = 0; i < u; i++) \
1373 template <typename T> \
1375 F (const T *v, T *r, octave_idx_type *ri, \
1376 octave_idx_type l, octave_idx_type n, octave_idx_type u) \
1382 for (octave_idx_type i = 0; i < u; i++) \
1392 for (octave_idx_type i = 0; i < u; i++) \
1394 F (v, r, ri, l, n); \
1405 template <
typename T>
1413 r[i] = v[i+1] - v[i];
1418 T lst = v[1] - v[0];
1421 T dif = v[i+2] - v[i+1];
1432 buf[i] = v[i+1] - v[i];
1437 buf[i] = buf[i+1] - buf[i];
1446 template <
typename T>
1456 r[i] = v[i+
m] - v[i];
1462 r[j] = (v[j+
m+
m] - v[j+
m]) - (v[j+
m] - v[j]);
1472 buf[i] = v[i*
m+j+
m] - v[i*
m+j];
1477 buf[i] = buf[i+1] - buf[i];
1487 template <
typename T>
1499 v +=
n;
r +=
n-order;
1533 l = 1,
n = dims(dim), u = 1;
1545 template <
typename R,
typename T>
1554 if (dims.
ndims () == 2 && dims(0) == 0 && dims(1) == 0)
1560 if (dim < dims.
ndims ()) dims(dim) = 1;
1564 mx_red_op (src.
data (), ret.fortran_vec (), l,
n, u);
1569 template <
typename R,
typename T>
1581 mx_cum_op (src.
data (), ret.fortran_vec (), l,
n, u);
1586 template <
typename R>
1597 if (dim < dims.
ndims () && dims(dim) != 0) dims(dim) = 1;
1601 mx_minmax_op (src.
data (), ret.fortran_vec (), l,
n, u);
1606 template <
typename R>
1617 if (dim < dims.
ndims () && dims(dim) != 0) dims(dim) = 1;
1629 template <
typename R>
1640 mx_cumminmax_op (src.
data (), ret.fortran_vec (), l,
n, u);
1645 template <
typename R>
1664 template <
typename R>
1667 void (*mx_diff_op) (
const R *, R *,
1678 if (dim >= dims.
ndims ())
1681 if (dims(dim) <= order)
1692 mx_diff_op (src.
data (), ret.fortran_vec (), l,
n, u, order);
1702 template <
typename T>
1709 T e1 = (s - (s1 - t)) + (
x - t);
1714 template <
typename T>
1726 template <
typename T>
Array< R > do_bsxfun_op(const Array< X > &x, const Array< Y > &y, void(*op_vv)(std::size_t, R *, const X *, const Y *), void(*op_sv)(std::size_t, R *, X, const Y *), void(*op_vs)(std::size_t, R *, const X *, Y))
void do_inplace_bsxfun_op(Array< R > &r, const Array< X > &x, void(*op_vv)(std::size_t, R *, const X *), void(*op_vs)(std::size_t, R *, X))
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)
charNDArray max(char d, const charNDArray &m)
charNDArray min(char d, const charNDArray &m)
N Dimensional Array with copy-on-write semantics.
T * fortran_vec()
Size of the specified dimension.
const T * data() const
Size of the specified dimension.
const dim_vector & dims() const
Return a const-reference so that dims ()(i) works efficiently.
octave_idx_type numel() const
Number of elements in the array.
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 chop_trailing_singletons()
void resize(int n, int fill_value=0)
octave_idx_type ndims() const
Number of dimensions.
int first_non_singleton(int def=0) const
double double_value() const
ColumnVector real(const ComplexColumnVector &a)
ColumnVector imag(const ComplexColumnVector &a)
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
F77_RET_T const F77_DBLE * x
void mx_inline_map(std::size_t n, R *r, const X *x)
void mx_inline_div2(std::size_t n, R *r, const X *x)
bool do_mx_check(const Array< T > &a, bool(*op)(std::size_t, const T *))
void mx_inline_sub2(std::size_t n, R *r, const X *x)
void mx_inline_notzero(std::size_t n, bool *r, const X *x)
#define DEFMXCMPOP(F, OP)
void mx_inline_xmin(std::size_t n, T *r, const T *x, const T *y)
void mx_inline_not_and(std::size_t n, bool *r, const X *x, const Y *y)
#define OP_RED_ANYR(ac, el)
#define OP_CUM_FCN2(F, TSRC, TRES, OP)
void mx_inline_le(std::size_t n, bool *r, const X *x, const Y *y)
#define OP_ROW_SHORT_CIRCUIT(F, PRED, ZERO)
T mx_inline_xsum(const T *v, octave_idx_type n)
#define OP_RED_SUMSQC(ac, el)
Array< R > & do_ms_inplace_op(Array< R > &r, const X &x, void(*op)(std::size_t, R *, X))
Array< R > do_mx_unary_op(const Array< X > &x, void(*op)(std::size_t, R *, const X *))
void mx_inline_add2(std::size_t n, R *r, const X *x)
void mx_inline_and_not(std::size_t n, bool *r, const X *x, const Y *y)
void mx_inline_any(const T *v, bool *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
#define OP_RED_FCNN(F, TSRC, TRES)
#define OP_CUMMINMAX_FCN(F, OP)
Array< R > & do_mm_inplace_op(Array< R > &r, const Array< X > &x, void(*op)(std::size_t, R *, const X *), void(*op1)(std::size_t, R *, X), const char *opname)
void mx_inline_sub(std::size_t n, R *r, const X *x, const Y *y)
void mx_inline_uminus(std::size_t n, R *r, const X *x)
void mx_inline_uminus2(std::size_t n, R *r)
void mx_inline_eq(std::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)
#define DEFMXBOOLOP(F, NOT1, OP, NOT2)
void mx_inline_ge(std::size_t n, bool *r, const X *x, const Y *y)
bool mx_inline_all_real(std::size_t n, const std::complex< T > *x)
#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_or(std::size_t n, bool *r, const X *x, const Y *y)
void mx_inline_div(std::size_t n, R *r, const X *x, const Y *y)
#define OP_MINMAX_FCN2(F, OP)
Array< R > do_ms_binary_op(const Array< X > &x, const Y &y, void(*op)(std::size_t, R *, const X *, Y))
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 twosum_accum(T &s, T &e, const T &x)
bool mx_inline_any_nan(std::size_t n, const T *x)
void mx_inline_and2(std::size_t n, bool *r, const X *x)
#define DEFMXBINOPEQ(F, OP)
void mx_inline_max(const T *v, T *r, octave_idx_type n)
#define OP_CUM_FCN(F, TSRC, TRES, OP)
void mx_inline_iszero(std::size_t n, bool *r, const X *x)
void mx_inline_xmax(std::size_t n, T *r, const T *x, const T *y)
void mx_inline_and(std::size_t n, bool *r, const X *x, const Y *y)
#define OP_MINMAX_FCNN(F)
void mx_inline_add(std::size_t n, R *r, const X *x, const Y *y)
void mx_inline_not(std::size_t n, bool *r, const X *x)
#define OP_CUM_FCNN(F, TSRC, TRES)
void mx_inline_all(const T *v, bool *r, octave_idx_type m, octave_idx_type n)
void mx_inline_prod(const T *v, T *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
void mx_inline_not_or(std::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)
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))
T cabsq(const std::complex< T > &c)
#define OP_RED_FCN2(F, TSRC, TRES, OP, ZERO)
void mx_inline_gt(std::size_t n, bool *r, const X *x, const Y *y)
void op_dble_sum(double &ac, float el)
Array< R > do_mm_binary_op(const Array< X > &x, const Array< Y > &y, void(*op)(std::size_t, R *, const X *, const Y *), void(*op1)(std::size_t, R *, X, const Y *), void(*op2)(std::size_t, R *, const X *, Y), const char *opname)
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))
#define DEFMINMAXSPEC(T, F, OP)
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)
void mx_inline_mul2(std::size_t n, R *r, const X *x)
#define OP_RED_ANYC(ac, el)
void mx_inline_lt(std::size_t n, bool *r, const X *x, const Y *y)
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_count(const bool *v, T *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
bool mx_inline_equal(std::size_t n, const T1 *x, const T2 *y)
void mx_inline_real(std::size_t n, T *r, const std::complex< T > *x)
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)
bool mx_inline_any_positive(std::size_t n, const T *x)
void mx_inline_imag(std::size_t n, T *r, const std::complex< 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)
#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)
void mx_inline_or2(std::size_t n, bool *r, const X *x)
bool mx_inline_all_finite(std::size_t n, const T *x)
void mx_inline_mul(std::size_t n, R *r, const X *x, const Y *y)
#define OP_RED_PROD(ac, el)
bool mx_inline_any_negative(std::size_t n, const T *x)
Array< R > do_sm_binary_op(const X &x, const Array< Y > &y, void(*op)(std::size_t, R *, X, const Y *))
Array< R > & do_mx_inplace_op(Array< R > &r, void(*op)(std::size_t, R *))
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_pow(std::size_t n, R *r, const X *x, const Y *y)
void mx_inline_fill(std::size_t n, R *r, S s)
void mx_inline_not2(std::size_t n, bool *r)
void mx_inline_ne(std::size_t n, bool *r, const X *x, const Y *y)
#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))
void mx_inline_or_not(std::size_t n, bool *r, const X *x, const Y *y)
#define DEFMXBINOP(F, OP)
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)