98template <
typename T, T op (
typename ref_param<T>::type,
99 typename ref_param<T>::type)>
178 sdv(dim) = ddv(dim) = 0;
180 (*current_liboctave_error_handler) (
"accumdim: dimension mismatch");
183 const T *src = vals.
data ();
318#define MARRAY_NDS_OP(OP, FN) \
319 template <typename T> \
321 operator OP (const MArray<T>& a, const T& s) \
323 return do_ms_binary_op<T, T, T> (a, s, FN); \
333#define MARRAY_SND_OP(OP, FN) \
334 template <typename T> \
336 operator OP (const T& s, const MArray<T>& a) \
338 return do_sm_binary_op<T, T, T> (s, a, FN); \
348#define MARRAY_NDND_OP(FCN, OP, FN) \
349 template <typename T> \
351 FCN (const MArray<T>& a, const MArray<T>& b) \
353 return do_mm_binary_op<T, T, T> (a, b, FN, FN, FN, #FCN); \
383#if defined (__clang__)
384# define INSTANTIATE_MARRAY(T, API) \
385 template <> API void \
386 MArray<T>::instantiation_guard () { } \
388 template class API MArray<T>
390# define INSTANTIATE_MARRAY(T, API) \
391 template <> API void \
392 MArray<T>::instantiation_guard () { } \
394 template class MArray<T>
#define MARRAY_NDS_OP(OP, FN)
MArray< T > & operator+=(MArray< T > &a, const T &s)
MArray< T > & quotient_eq(MArray< T > &a, const MArray< T > &b)
MArray< T > & operator/=(MArray< T > &a, const T &s)
MArray< T > & operator-=(MArray< T > &a, const T &s)
MArray< T > operator-(const MArray< T > &a, const T &s)
MArray< T > product(const MArray< T > &a, const MArray< T > &b)
MArray< T > & operator*=(MArray< T > &a, const T &s)
#define MARRAY_SND_OP(OP, FN)
MArray< T > & product_eq(MArray< T > &a, const MArray< T > &b)
#define MARRAY_NDND_OP(FCN, OP, FN)
MArray< T > quotient(const MArray< T > &a, const MArray< T > &b)
charNDArray max(char d, const charNDArray &m)
charNDArray min(char d, const charNDArray &m)
N Dimensional Array with copy-on-write semantics.
octave_idx_type numel(void) const
Number of elements in the array.
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
OCTARRAY_API void resize(const dim_vector &dv, const T &rfv)
Size of the specified dimension.
const T * data(void) const
Size of the specified dimension.
OCTARRAY_API T * fortran_vec(void)
Size of the specified dimension.
int ndims(void) const
Size of the specified dimension.
bool is_shared(void)
Size of the specified dimension.
Template for N-dimensional array classes with like-type math operators.
OCTARRAY_API void idx_min(const octave::idx_vector &idx, const MArray< T > &vals)
OCTARRAY_API void idx_add_nd(const octave::idx_vector &idx, const MArray< T > &vals, int dim=-1)
OCTARRAY_API void changesign(void)
OCTARRAY_API void idx_add(const octave::idx_vector &idx, T val)
Performs indexed accumulative addition.
OCTARRAY_API void idx_max(const octave::idx_vector &idx, const MArray< T > &vals)
static OCTARRAY_API void instantiation_guard()
void operator()(octave_idx_type i)
_idxadda_helper(T *a, const T *v)
void operator()(octave_idx_type i)
_idxadds_helper(T *a, T v)
Vector representing the dimensions (size) of an Array.
int first_non_singleton(int def=0) const
OCTAVE_API dim_vector redim(int n) const
Force certain dimensionality, preserving numel ().
void loop(octave_idx_type n, Functor body) const
octave_idx_type extent(octave_idx_type n) const
octave_idx_type length(octave_idx_type n=0) const
void mx_inline_div2(std::size_t n, R *r, const X *x)
void mx_inline_sub2(std::size_t n, R *r, const X *x)
void mx_inline_add2(std::size_t n, R *r, const X *x)
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_div(std::size_t n, R *r, const X *x, const Y *y)
void mx_inline_add(std::size_t n, R *r, const X *x, const Y *y)
void mx_inline_mul2(std::size_t n, R *r, const X *x)
void mx_inline_mul(std::size_t n, R *r, const X *x, const Y *y)
void get_extent_triplet(const dim_vector &dims, int &dim, octave_idx_type &l, octave_idx_type &n, octave_idx_type &u)
T::size_type numel(const T &str)
_idxbinop_helper(T *a, const T *v)
void operator()(octave_idx_type i)