23 inline static const char*
text() {
return "addition"; }
32 inline static const char*
text() {
return "subtraction"; }
41 inline static const char*
text() {
return "element-wise division"; }
50 inline static const char*
text() {
return "element-wise multiplication"; }
61 #define arma_applier_1(operatorA, operatorB) \ 65 for(i=0, j=1; j<n_elem; i+=2, j+=2)\ 70 tmp_i operatorB##= P2[i];\ 71 tmp_j operatorB##= P2[j];\ 73 out_mem[i] operatorA tmp_i;\ 74 out_mem[j] operatorA tmp_j;\ 79 out_mem[i] operatorA P1[i] operatorB P2[i];\ 85 #define arma_applier_2(operatorA, operatorB) \ 89 for(uword col=0; col<n_cols; ++col)\ 93 for(i=0, j=1; j<n_rows; i+=2, j+=2, count+=2)\ 95 eT tmp_i = P1.at(i,col);\ 96 eT tmp_j = P1.at(j,col);\ 98 tmp_i operatorB##= P2.at(i,col);\ 99 tmp_j operatorB##= P2.at(j,col);\ 101 out_mem[count ] operatorA tmp_i;\ 102 out_mem[count+1] operatorA tmp_j;\ 107 out_mem[count] operatorA P1.at(i,col) operatorB P2.at(i,col);\ 115 #define arma_applier_3(operatorA, operatorB) \ 119 for(uword slice=0; slice<n_slices; ++slice)\ 121 for(uword col=0; col<n_cols; ++col)\ 125 for(i=0, j=1; j<n_rows; i+=2, j+=2, count+=2)\ 127 eT tmp_i = P1.at(i,col,slice);\ 128 eT tmp_j = P1.at(j,col,slice);\ 130 tmp_i operatorB##= P2.at(i,col,slice);\ 131 tmp_j operatorB##= P2.at(j,col,slice);\ 133 out_mem[count ] operatorA tmp_i;\ 134 out_mem[count+1] operatorA tmp_j;\ 139 out_mem[count] operatorA P1.at(i,col,slice) operatorB P2.at(i,col,slice);\ 153 template<
typename eglue_type>
154 template<
typename T1,
typename T2>
162 typedef typename T1::elem_type eT;
169 eT* out_mem = out.
memptr();
171 if(prefer_at_accessor ==
false)
200 template<
typename eglue_type>
201 template<
typename T1,
typename T2>
211 typedef typename T1::elem_type eT;
213 eT* out_mem = out.
memptr();
217 if(prefer_at_accessor ==
false)
246 template<
typename eglue_type>
247 template<
typename T1,
typename T2>
257 typedef typename T1::elem_type eT;
259 eT* out_mem = out.
memptr();
263 if(prefer_at_accessor ==
false)
292 template<
typename eglue_type>
293 template<
typename T1,
typename T2>
303 typedef typename T1::elem_type eT;
305 eT* out_mem = out.
memptr();
309 if(prefer_at_accessor ==
false)
338 template<
typename eglue_type>
339 template<
typename T1,
typename T2>
349 typedef typename T1::elem_type eT;
351 eT* out_mem = out.
memptr();
355 if(prefer_at_accessor ==
false)
389 template<
typename eglue_type>
390 template<
typename T1,
typename T2>
398 typedef typename T1::elem_type eT;
406 eT* out_mem = out.
memptr();
408 if(prefer_at_accessor ==
false)
438 template<
typename eglue_type>
439 template<
typename T1,
typename T2>
453 typedef typename T1::elem_type eT;
455 eT* out_mem = out.
memptr();
459 if(prefer_at_accessor ==
false)
485 template<
typename eglue_type>
486 template<
typename T1,
typename T2>
500 typedef typename T1::elem_type eT;
502 eT* out_mem = out.
memptr();
506 if(prefer_at_accessor ==
false)
532 template<
typename eglue_type>
533 template<
typename T1,
typename T2>
547 typedef typename T1::elem_type eT;
549 eT* out_mem = out.
memptr();
553 if(prefer_at_accessor ==
false)
579 template<
typename eglue_type>
580 template<
typename T1,
typename T2>
594 typedef typename T1::elem_type eT;
596 eT* out_mem = out.
memptr();
600 if(prefer_at_accessor ==
false)
626 #undef arma_applier_1 627 #undef arma_applier_2 628 #undef arma_applier_3
#define arma_applier_3(operatorA, operatorB)
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the matrix
arma_aligned const Proxy< T2 > P2
static const char * text()
arma_inline uword get_n_slices() const
static const char * text()
static arma_hot void apply_inplace_minus(Mat< typename T1::elem_type > &out, const eGlue< T1, T2, eglue_type > &x)
const uword n_cols
number of columns in the matrix (read-only)
#define arma_debug_assert_same_size
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 const char * text()
#define arma_applier_2(operatorA, operatorB)
static arma_hot void apply(Mat< typename T1::elem_type > &out, const eGlue< T1, T2, eglue_type > &x)
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the cube
const uword n_cols
number of columns in each slice (read-only)
arma_inline uword get_n_rows() const
arma_inline uword get_n_cols() const
static arma_hot void apply_inplace_plus(Mat< typename T1::elem_type > &out, const eGlue< T1, T2, eglue_type > &x)
arma_aligned const Proxy< T1 > P1
#define arma_extra_debug_sigprint
arma_aligned const ProxyCube< T2 > P2
const uword n_elem
number of elements in the cube (read-only)
arma_aligned const ProxyCube< T1 > P1
#define arma_applier_1(operatorA, operatorB)
static arma_hot void apply_inplace_div(Mat< typename T1::elem_type > &out, const eGlue< T1, T2, eglue_type > &x)
static arma_hot void apply_inplace_schur(Mat< typename T1::elem_type > &out, const eGlue< T1, T2, eglue_type > &x)
const uword n_slices
number of slices in the cube (read-only)
static const char * text()
const uword n_rows
number of rows in each slice (read-only)