20 template<
typename T1,
typename T2>
27 typedef typename T1::elem_type eT1;
28 typedef typename T2::elem_type eT2;
38 const bool A_is_alias = ( ((
void *)&out) == ((
void *)&A) );
39 const bool B_is_alias = ( ((
void *)&out) == ((
void *)&B) );
44 const Mat<eT1>& AA = A_is_alias ? *AA_ptr : A;
45 const Mat<eT2>& BB = B_is_alias ? *BB_ptr : B;
49 out.set_size(AA.n_rows, BB.
n_cols);
53 if(A_is_alias ==
true)
58 if(B_is_alias ==
true)
67 template<
typename T1,
typename T2>
74 typedef typename T1::elem_type eT1;
75 typedef typename T2::elem_type eT2;
86 out.set_size(A.get_n_rows(), A.get_n_cols());
88 out_eT* out_mem = out.memptr();
89 const uword n_elem = out.n_elem;
91 for(
uword i=0; i<n_elem; ++i)
100 template<
typename T1,
typename T2>
107 typedef typename T1::elem_type eT1;
108 typedef typename T2::elem_type eT2;
119 out.set_size(A.get_n_rows(), A.get_n_cols());
121 out_eT* out_mem = out.memptr();
122 const uword n_elem = out.n_elem;
124 for(
uword i=0; i<n_elem; ++i)
133 template<
typename T1,
typename T2>
140 typedef typename T1::elem_type eT1;
141 typedef typename T2::elem_type eT2;
152 out.set_size(A.get_n_rows(), A.get_n_cols());
154 out_eT* out_mem = out.memptr();
155 const uword n_elem = out.n_elem;
157 for(
uword i=0; i<n_elem; ++i)
166 template<
typename T1,
typename T2>
173 typedef typename T1::elem_type eT1;
174 typedef typename T2::elem_type eT2;
185 out.set_size(A.get_n_rows(), A.get_n_cols());
187 out_eT* out_mem = out.memptr();
188 const uword n_elem = out.n_elem;
190 for(
uword i=0; i<n_elem; ++i)
205 template<
typename T1,
typename T2>
212 typedef typename T1::elem_type eT1;
213 typedef typename T2::elem_type eT2;
224 out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices());
226 out_eT* out_mem = out.memptr();
227 const uword n_elem = out.n_elem;
229 for(
uword i=0; i<n_elem; ++i)
238 template<
typename T1,
typename T2>
245 typedef typename T1::elem_type eT1;
246 typedef typename T2::elem_type eT2;
257 out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices());
259 out_eT* out_mem = out.memptr();
260 const uword n_elem = out.n_elem;
262 for(
uword i=0; i<n_elem; ++i)
271 template<
typename T1,
typename T2>
278 typedef typename T1::elem_type eT1;
279 typedef typename T2::elem_type eT2;
290 out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices());
292 out_eT* out_mem = out.memptr();
293 const uword n_elem = out.n_elem;
295 for(
uword i=0; i<n_elem; ++i)
304 template<
typename T1,
typename T2>
311 typedef typename T1::elem_type eT1;
312 typedef typename T2::elem_type eT2;
323 out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices());
325 out_eT* out_mem = out.memptr();
326 const uword n_elem = out.n_elem;
328 for(
uword i=0; i<n_elem; ++i)
static void apply(Mat< typename eT_promoter< T1, T2 >::eT > &out, const mtGlue< typename eT_promoter< T1, T2 >::eT, T1, T2, glue_mixed_plus > &X)
matrix addition with different element types
static void apply(Mat< typename eT_promoter< T1, T2 >::eT > &out, const mtGlue< typename eT_promoter< T1, T2 >::eT, T1, T2, glue_mixed_div > &X)
element-wise matrix division with different element types
const uword n_cols
number of columns in the matrix (read-only)
#define arma_debug_assert_same_size
static void apply(Mat< typename eT_promoter< T1, T2 >::eT > &out, const mtGlue< typename eT_promoter< T1, T2 >::eT, T1, T2, glue_mixed_times > &X)
matrix multiplication with different element types
static void apply(Mat< typename eT_promoter< T1, T2 >::eT > &out, const mtGlue< typename eT_promoter< T1, T2 >::eT, T1, T2, glue_mixed_minus > &X)
matrix subtraction with different element types
static arma_inline promote_type< T1, T2 >::result apply(const T1 x)
#define arma_extra_debug_sigprint
static void apply(Mat< typename eT_promoter< T1, T2 >::eT > &out, const mtGlue< typename eT_promoter< T1, T2 >::eT, T1, T2, glue_mixed_schur > &X)
element-wise matrix multiplication with different element types
#define arma_debug_assert_mul_size
static void apply(Mat< out_eT > &C, const Mat< in_eT1 > &A, const Mat< in_eT2 > &B, const out_eT alpha=out_eT(1), const out_eT beta=out_eT(0))
immediate multiplication of matrices A and B, storing the result in C