| 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 | |
|