25 typedef typename T1::elem_type eT;
31 arma_debug_check( (dim > 1),
"cumsum(): incorrect usage. dim must be 0 or 1");
42 for(
uword col=0; col<X_n_cols; ++col)
44 eT* out_colmem = out.
colptr(col);
45 const eT* X_colmem = X.
colptr(col);
49 for(
uword row=0; row<X_n_rows; ++row)
53 out_colmem[row] = acc;
62 for(
uword row=0; row<X_n_rows; ++row)
66 for(
uword col=0; col<X_n_cols; ++col)
70 out.
at(row,col) = acc;
85 typedef typename T1::elem_type eT;
94 eT* out_mem = out.
memptr();
95 const eT* X_mem = X.
memptr();
99 for(
uword i=0; i<n_elem; ++i)
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the matrix
const uword n_cols
number of columns in the matrix (read-only)
const uword n_elem
number of elements in the matrix (read-only)
const uword n_rows
number of rows in the matrix (read-only)
static void apply(Mat< typename T1::elem_type > &out, const Op< T1, op_cumsum_vec > &in)
#define arma_extra_debug_print
arma_aligned const T1 & m
storage of reference to the operand (eg. a matrix)
arma_inline arma_warn_unused eT * colptr(const uword in_col)
returns a pointer to array of eTs for a specified column; no bounds check
arma_inline arma_warn_unused eT & at(const uword i)
linear element accessor (treats the matrix as a vector); no bounds check.
void copy_size(const Mat< eT2 > &m)
change the matrix (without preserving data) to have the same dimensions as the given matrix ...
#define arma_extra_debug_sigprint
static void apply(Mat< typename T1::elem_type > &out, const Op< T1, op_cumsum_mat > &in)
arma_aligned uword aux_uword_a
storage of auxiliary data, uword format