| armadillo | | armadillo | |
| | | | |
| skipping to change at line 174 | | skipping to change at line 174 | |
| #include "armadillo_bits/op_pinv_proto.hpp" | | #include "armadillo_bits/op_pinv_proto.hpp" | |
| #include "armadillo_bits/op_dotext_proto.hpp" | | #include "armadillo_bits/op_dotext_proto.hpp" | |
| #include "armadillo_bits/op_flip_proto.hpp" | | #include "armadillo_bits/op_flip_proto.hpp" | |
| #include "armadillo_bits/op_princomp_proto.hpp" | | #include "armadillo_bits/op_princomp_proto.hpp" | |
| #include "armadillo_bits/op_princomp_cov_proto.hpp" | | #include "armadillo_bits/op_princomp_cov_proto.hpp" | |
| | | | |
| #include "armadillo_bits/glue_times_proto.hpp" | | #include "armadillo_bits/glue_times_proto.hpp" | |
| #include "armadillo_bits/glue_cov_proto.hpp" | | #include "armadillo_bits/glue_cov_proto.hpp" | |
| #include "armadillo_bits/glue_cor_proto.hpp" | | #include "armadillo_bits/glue_cor_proto.hpp" | |
| #include "armadillo_bits/glue_kron_proto.hpp" | | #include "armadillo_bits/glue_kron_proto.hpp" | |
|
| | | #include "armadillo_bits/glue_cross_proto.hpp" | |
| | | | |
| // | | // | |
| // debugging functions | | // debugging functions | |
| | | | |
| #include "armadillo_bits/debug.hpp" | | #include "armadillo_bits/debug.hpp" | |
| | | | |
| // | | // | |
| // classes that underlay metaprogramming | | // classes that underlay metaprogramming | |
| | | | |
| #include "armadillo_bits/Proxy.hpp" | | #include "armadillo_bits/Proxy.hpp" | |
| | | | |
| skipping to change at line 288 | | skipping to change at line 289 | |
| #include "armadillo_bits/fn_shuffle.hpp" | | #include "armadillo_bits/fn_shuffle.hpp" | |
| #include "armadillo_bits/fn_prod.hpp" | | #include "armadillo_bits/fn_prod.hpp" | |
| #include "armadillo_bits/fn_eps.hpp" | | #include "armadillo_bits/fn_eps.hpp" | |
| #include "armadillo_bits/fn_pinv.hpp" | | #include "armadillo_bits/fn_pinv.hpp" | |
| #include "armadillo_bits/fn_rank.hpp" | | #include "armadillo_bits/fn_rank.hpp" | |
| #include "armadillo_bits/fn_kron.hpp" | | #include "armadillo_bits/fn_kron.hpp" | |
| #include "armadillo_bits/fn_flip.hpp" | | #include "armadillo_bits/fn_flip.hpp" | |
| #include "armadillo_bits/fn_as_scalar.hpp" | | #include "armadillo_bits/fn_as_scalar.hpp" | |
| #include "armadillo_bits/fn_princomp.hpp" | | #include "armadillo_bits/fn_princomp.hpp" | |
| #include "armadillo_bits/fn_princomp_cov.hpp" | | #include "armadillo_bits/fn_princomp_cov.hpp" | |
|
| | | #include "armadillo_bits/fn_cross.hpp" | |
| | | | |
| // | | // | |
| // class meat | | // class meat | |
| | | | |
| #include "armadillo_bits/gemm.hpp" | | #include "armadillo_bits/gemm.hpp" | |
| #include "armadillo_bits/gemv.hpp" | | #include "armadillo_bits/gemv.hpp" | |
| #include "armadillo_bits/gemm_mixed.hpp" | | #include "armadillo_bits/gemm_mixed.hpp" | |
| | | | |
| #include "armadillo_bits/eop_core_meat.hpp" | | #include "armadillo_bits/eop_core_meat.hpp" | |
| #include "armadillo_bits/eop_cube_core_meat.hpp" | | #include "armadillo_bits/eop_cube_core_meat.hpp" | |
| | | | |
| skipping to change at line 350 | | skipping to change at line 352 | |
| #include "armadillo_bits/op_pinv_meat.hpp" | | #include "armadillo_bits/op_pinv_meat.hpp" | |
| #include "armadillo_bits/op_dotext_meat.hpp" | | #include "armadillo_bits/op_dotext_meat.hpp" | |
| #include "armadillo_bits/op_flip_meat.hpp" | | #include "armadillo_bits/op_flip_meat.hpp" | |
| #include "armadillo_bits/op_princomp_meat.hpp" | | #include "armadillo_bits/op_princomp_meat.hpp" | |
| #include "armadillo_bits/op_princomp_cov_meat.hpp" | | #include "armadillo_bits/op_princomp_cov_meat.hpp" | |
| | | | |
| #include "armadillo_bits/glue_times_meat.hpp" | | #include "armadillo_bits/glue_times_meat.hpp" | |
| #include "armadillo_bits/glue_cov_meat.hpp" | | #include "armadillo_bits/glue_cov_meat.hpp" | |
| #include "armadillo_bits/glue_cor_meat.hpp" | | #include "armadillo_bits/glue_cor_meat.hpp" | |
| #include "armadillo_bits/glue_kron_meat.hpp" | | #include "armadillo_bits/glue_kron_meat.hpp" | |
|
| | | #include "armadillo_bits/glue_cross_meat.hpp" | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 3 change blocks. |
| 0 lines changed or deleted | | 3 lines changed or added | |
|
| glue_times_meat.hpp | | glue_times_meat.hpp | |
| | | | |
| skipping to change at line 206 | | skipping to change at line 206 | |
| const u32 result_n_cols = (do_trans_B == false) ? B.n_cols : B.n_rows; | | const u32 result_n_cols = (do_trans_B == false) ? B.n_cols : B.n_rows; | |
| | | | |
| arma_assert_same_size(out.n_rows, out.n_cols, result_n_rows, result_n_col
s, "matrix addition"); | | arma_assert_same_size(out.n_rows, out.n_cols, result_n_rows, result_n_col
s, "matrix addition"); | |
| | | | |
| if( (do_trans_A == false) && (do_trans_B == false) && (use_alpha == false
) ) | | if( (do_trans_A == false) && (do_trans_B == false) && (use_alpha == false
) ) | |
| { | | { | |
| if(A.n_rows == 1) | | if(A.n_rows == 1) | |
| { | | { | |
| gemv<true, false, true>::apply(out.memptr(), B, A.memptr(), a
lpha, eT(1)); | | gemv<true, false, true>::apply(out.memptr(), B, A.memptr(), a
lpha, eT(1)); | |
| } | | } | |
|
| | | else | |
| if(B.n_cols == 1) | | if(B.n_cols == 1) | |
| { | | { | |
| gemv<false, false, true>::apply(out.memptr(), A, B.memptr(), a
lpha, eT(1)); | | gemv<false, false, true>::apply(out.memptr(), A, B.memptr(), a
lpha, eT(1)); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<false, false, false, true>::apply(out, A, B, alpha, eT(1)); | | gemm<false, false, false, true>::apply(out, A, B, alpha, eT(1)); | |
| } | | } | |
| } | | } | |
| else | | else | |
| if( (do_trans_A == false) && (do_trans_B == false) && (use_alpha == true)
) | | if( (do_trans_A == false) && (do_trans_B == false) && (use_alpha == true)
) | |
| { | | { | |
| if(A.n_rows == 1) | | if(A.n_rows == 1) | |
| { | | { | |
| gemv<true, true, true>::apply(out.memptr(), B, A.memptr(), al
pha, eT(1)); | | gemv<true, true, true>::apply(out.memptr(), B, A.memptr(), al
pha, eT(1)); | |
| } | | } | |
|
| | | else | |
| if(B.n_cols == 1) | | if(B.n_cols == 1) | |
| { | | { | |
| gemv<false, true, true>::apply(out.memptr(), A, B.memptr(), al
pha, eT(1)); | | gemv<false, true, true>::apply(out.memptr(), A, B.memptr(), al
pha, eT(1)); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<false, false, true, true>::apply(out, A, B, alpha, eT(1)); | | gemm<false, false, true, true>::apply(out, A, B, alpha, eT(1)); | |
| } | | } | |
| } | | } | |
| else | | else | |
| if( (do_trans_A == true) && (do_trans_B == false) && (use_alpha == false)
) | | if( (do_trans_A == true) && (do_trans_B == false) && (use_alpha == false)
) | |
| { | | { | |
| if(A.n_cols == 1) | | if(A.n_cols == 1) | |
| { | | { | |
| gemv<true, false, true>::apply(out.memptr(), B, A.memptr(), al
pha, eT(1)); | | gemv<true, false, true>::apply(out.memptr(), B, A.memptr(), al
pha, eT(1)); | |
| } | | } | |
|
| | | else | |
| if(B.n_cols == 1) | | if(B.n_cols == 1) | |
| { | | { | |
| gemv<true, false, true>::apply(out.memptr(), A, B.memptr(), al
pha, eT(1)); | | gemv<true, false, true>::apply(out.memptr(), A, B.memptr(), al
pha, eT(1)); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<true, false, false, true>::apply(out, A, B, alpha, eT(1)); | | gemm<true, false, false, true>::apply(out, A, B, alpha, eT(1)); | |
| } | | } | |
| } | | } | |
| else | | else | |
| if( (do_trans_A == true) && (do_trans_B == false) && (use_alpha == true)
) | | if( (do_trans_A == true) && (do_trans_B == false) && (use_alpha == true)
) | |
| { | | { | |
| if(A.n_cols == 1) | | if(A.n_cols == 1) | |
| { | | { | |
| gemv<true, true, true>::apply(out.memptr(), B, A.memptr(), alp
ha, eT(1)); | | gemv<true, true, true>::apply(out.memptr(), B, A.memptr(), alp
ha, eT(1)); | |
| } | | } | |
|
| | | else | |
| if(B.n_cols == 1) | | if(B.n_cols == 1) | |
| { | | { | |
| gemv<true, true, true>::apply(out.memptr(), A, B.memptr(), alp
ha, eT(1)); | | gemv<true, true, true>::apply(out.memptr(), A, B.memptr(), alp
ha, eT(1)); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<true, false, true, true>::apply(out, A, B, alpha, eT(1)); | | gemm<true, false, true, true>::apply(out, A, B, alpha, eT(1)); | |
| } | | } | |
| } | | } | |
| else | | else | |
| if( (do_trans_A == false) && (do_trans_B == true) && (use_alpha == false)
) | | if( (do_trans_A == false) && (do_trans_B == true) && (use_alpha == false)
) | |
| { | | { | |
| if(A.n_rows == 1) | | if(A.n_rows == 1) | |
| { | | { | |
| gemv<false, false, true>::apply(out.memptr(), B, A.memptr(), al
pha, eT(1)); | | gemv<false, false, true>::apply(out.memptr(), B, A.memptr(), al
pha, eT(1)); | |
| } | | } | |
|
| | | else | |
| if(B.n_rows == 1) | | if(B.n_rows == 1) | |
| { | | { | |
| gemv<false, false, true>::apply(out.memptr(), A, B.memptr(), al
pha, eT(1)); | | gemv<false, false, true>::apply(out.memptr(), A, B.memptr(), al
pha, eT(1)); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<false, true, false, true>::apply(out, A, B, alpha, eT(1)); | | gemm<false, true, false, true>::apply(out, A, B, alpha, eT(1)); | |
| } | | } | |
| } | | } | |
| else | | else | |
| if( (do_trans_A == false) && (do_trans_B == true) && (use_alpha == true)
) | | if( (do_trans_A == false) && (do_trans_B == true) && (use_alpha == true)
) | |
| { | | { | |
| if(A.n_rows == 1) | | if(A.n_rows == 1) | |
| { | | { | |
| gemv<false, true, true>::apply(out.memptr(), B, A.memptr(), alp
ha, eT(1)); | | gemv<false, true, true>::apply(out.memptr(), B, A.memptr(), alp
ha, eT(1)); | |
| } | | } | |
|
| | | else | |
| if(B.n_rows == 1) | | if(B.n_rows == 1) | |
| { | | { | |
| gemv<false, true, true>::apply(out.memptr(), A, B.memptr(), alp
ha, eT(1)); | | gemv<false, true, true>::apply(out.memptr(), A, B.memptr(), alp
ha, eT(1)); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<false, true, true, true>::apply(out, A, B, alpha, eT(1)); | | gemm<false, true, true, true>::apply(out, A, B, alpha, eT(1)); | |
| } | | } | |
| } | | } | |
| else | | else | |
| if( (do_trans_A == true) && (do_trans_B == true) && (use_alpha == false)
) | | if( (do_trans_A == true) && (do_trans_B == true) && (use_alpha == false)
) | |
| { | | { | |
| if(A.n_cols == 1) | | if(A.n_cols == 1) | |
| { | | { | |
| gemv<false, false, true>::apply(out.memptr(), B, A.memptr(), alp
ha, eT(1)); | | gemv<false, false, true>::apply(out.memptr(), B, A.memptr(), alp
ha, eT(1)); | |
| } | | } | |
|
| | | else | |
| if(B.n_rows == 1) | | if(B.n_rows == 1) | |
| { | | { | |
| gemv<true, false, true>::apply(out.memptr(), A, B.memptr(), alp
ha, eT(1)); | | gemv<true, false, true>::apply(out.memptr(), A, B.memptr(), alp
ha, eT(1)); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<true, true, false, true>::apply(out, A, B, alpha, eT(1)); | | gemm<true, true, false, true>::apply(out, A, B, alpha, eT(1)); | |
| } | | } | |
| } | | } | |
| else | | else | |
| if( (do_trans_A == true) && (do_trans_B == true) && (use_alpha == true) ) | | if( (do_trans_A == true) && (do_trans_B == true) && (use_alpha == true) ) | |
| { | | { | |
| if(A.n_cols == 1) | | if(A.n_cols == 1) | |
| { | | { | |
| gemv<false, true, true>::apply(out.memptr(), B, A.memptr(), alph
a, eT(1)); | | gemv<false, true, true>::apply(out.memptr(), B, A.memptr(), alph
a, eT(1)); | |
| } | | } | |
|
| | | else | |
| if(B.n_rows == 1) | | if(B.n_rows == 1) | |
| { | | { | |
| gemv<true, true, true>::apply(out.memptr(), A, B.memptr(), alph
a, eT(1)); | | gemv<true, true, true>::apply(out.memptr(), A, B.memptr(), alph
a, eT(1)); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<true, true, true, true>::apply(out, A, B, alpha, eT(1)); | | gemm<true, true, true, true>::apply(out, A, B, alpha, eT(1)); | |
| } | | } | |
| } | | } | |
| | | | |
| | | | |
| skipping to change at line 440 | | skipping to change at line 448 | |
| gemm<true, false, false, false>::apply(out, A, B); | | gemm<true, false, false, false>::apply(out, A, B); | |
| } | | } | |
| } | | } | |
| else | | else | |
| if( (do_trans_A == true) && (do_trans_B == false) && (use_alpha == true)
) | | if( (do_trans_A == true) && (do_trans_B == false) && (use_alpha == true)
) | |
| { | | { | |
| if(A.n_cols == 1) | | if(A.n_cols == 1) | |
| { | | { | |
| gemv<true, true, false>::apply(out.memptr(), B, A.memptr(), al
pha); | | gemv<true, true, false>::apply(out.memptr(), B, A.memptr(), al
pha); | |
| } | | } | |
|
| | | else | |
| if(B.n_cols == 1) | | if(B.n_cols == 1) | |
| { | | { | |
| gemv<true, true, false>::apply(out.memptr(), A, B.memptr(), al
pha); | | gemv<true, true, false>::apply(out.memptr(), A, B.memptr(), al
pha); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<true, false, true, false>::apply(out, A, B, alpha); | | gemm<true, false, true, false>::apply(out, A, B, alpha); | |
| } | | } | |
| } | | } | |
| else | | else | |
| if( (do_trans_A == false) && (do_trans_B == true) && (use_alpha == false)
) | | if( (do_trans_A == false) && (do_trans_B == true) && (use_alpha == false)
) | |
| { | | { | |
| if(A.n_rows == 1) | | if(A.n_rows == 1) | |
| { | | { | |
| gemv<false, false, false>::apply(out.memptr(), B, A.memptr()); | | gemv<false, false, false>::apply(out.memptr(), B, A.memptr()); | |
| } | | } | |
|
| | | else | |
| if(B.n_rows == 1) | | if(B.n_rows == 1) | |
| { | | { | |
| gemv<false, false, false>::apply(out.memptr(), A, B.memptr()); | | gemv<false, false, false>::apply(out.memptr(), A, B.memptr()); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<false, true, false, false>::apply(out, A, B); | | gemm<false, true, false, false>::apply(out, A, B); | |
| } | | } | |
| } | | } | |
| else | | else | |
| if( (do_trans_A == false) && (do_trans_B == true) && (use_alpha == true)
) | | if( (do_trans_A == false) && (do_trans_B == true) && (use_alpha == true)
) | |
| { | | { | |
| if(A.n_rows == 1) | | if(A.n_rows == 1) | |
| { | | { | |
| gemv<false, true, false>::apply(out.memptr(), B, A.memptr(), al
pha); | | gemv<false, true, false>::apply(out.memptr(), B, A.memptr(), al
pha); | |
| } | | } | |
|
| | | else | |
| if(B.n_rows == 1) | | if(B.n_rows == 1) | |
| { | | { | |
| gemv<false, true, false>::apply(out.memptr(), A, B.memptr(), al
pha); | | gemv<false, true, false>::apply(out.memptr(), A, B.memptr(), al
pha); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<false, true, true, false>::apply(out, A, B, alpha); | | gemm<false, true, true, false>::apply(out, A, B, alpha); | |
| } | | } | |
| } | | } | |
| else | | else | |
| if( (do_trans_A == true) && (do_trans_B == true) && (use_alpha == false)
) | | if( (do_trans_A == true) && (do_trans_B == true) && (use_alpha == false)
) | |
| { | | { | |
| if(A.n_cols == 1) | | if(A.n_cols == 1) | |
| { | | { | |
| gemv<false, false, false>::apply(out.memptr(), B, A.memptr()); | | gemv<false, false, false>::apply(out.memptr(), B, A.memptr()); | |
| } | | } | |
|
| | | else | |
| if(B.n_rows == 1) | | if(B.n_rows == 1) | |
| { | | { | |
| gemv<true, false, false>::apply(out.memptr(), A, B.memptr()); | | gemv<true, false, false>::apply(out.memptr(), A, B.memptr()); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<true, true, false, false>::apply(out, A, B); | | gemm<true, true, false, false>::apply(out, A, B); | |
| } | | } | |
| } | | } | |
| else | | else | |
| if( (do_trans_A == true) && (do_trans_B == true) && (use_alpha == true) ) | | if( (do_trans_A == true) && (do_trans_B == true) && (use_alpha == true) ) | |
| { | | { | |
| if(A.n_cols == 1) | | if(A.n_cols == 1) | |
| { | | { | |
| gemv<false, true, false>::apply(out.memptr(), B, A.memptr(), alp
ha); | | gemv<false, true, false>::apply(out.memptr(), B, A.memptr(), alp
ha); | |
| } | | } | |
|
| | | else | |
| if(B.n_rows == 1) | | if(B.n_rows == 1) | |
| { | | { | |
| gemv<true, true, false>::apply(out.memptr(), A, B.memptr(), alp
ha); | | gemv<true, true, false>::apply(out.memptr(), A, B.memptr(), alp
ha); | |
| } | | } | |
| else | | else | |
| { | | { | |
| gemm<true, true, true, false>::apply(out, A, B, alpha); | | gemm<true, true, true, false>::apply(out, A, B, alpha); | |
| } | | } | |
| } | | } | |
| } | | } | |
| | | | |
End of changes. 13 change blocks. |
| 0 lines changed or deleted | | 13 lines changed or added | |
|