| SpSubview_iterators_meat.hpp | | SpSubview_iterators_meat.hpp | |
| | | | |
| skipping to change at line 237 | | skipping to change at line 237 | |
| iterator_base::internal_pos = cur_pos; | | iterator_base::internal_pos = cur_pos; | |
| iterator_base::skip_pos = skip_pos; | | iterator_base::skip_pos = skip_pos; | |
| iterator_base::internal_col = cur_col; | | iterator_base::internal_col = cur_col; | |
| } | | } | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| inline | | inline | |
| SpSubview<eT>::const_iterator::const_iterator(const SpSubview<eT>& in_M, uw
ord in_row, uword in_col, uword in_pos, uword in_skip_pos) | | SpSubview<eT>::const_iterator::const_iterator(const SpSubview<eT>& in_M, uw
ord in_row, uword in_col, uword in_pos, uword in_skip_pos) | |
| : iterator_base(in_M, in_col, in_pos, in_skip_pos) | | : iterator_base(in_M, in_col, in_pos, in_skip_pos) | |
| { | | { | |
|
| | | arma_ignore(in_row); | |
| | | | |
| // Nothing to do. | | // Nothing to do. | |
| } | | } | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| inline | | inline | |
| SpSubview<eT>::const_iterator::const_iterator(const const_iterator& other) | | SpSubview<eT>::const_iterator::const_iterator(const const_iterator& other) | |
| : iterator_base(other.M, other.internal_col, other.internal_pos, other.sk
ip_pos) | | : iterator_base(other.M, other.internal_col, other.internal_pos, other.sk
ip_pos) | |
| { | | { | |
| // Nothing to do. | | // Nothing to do. | |
| } | | } | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 2 lines changed or added | |
|
| arma_version.hpp | | arma_version.hpp | |
| | | | |
| skipping to change at line 13 | | skipping to change at line 13 | |
| // | | // | |
| // This Source Code Form is subject to the terms of the Mozilla Public | | // This Source Code Form is subject to the terms of the Mozilla Public | |
| // License, v. 2.0. If a copy of the MPL was not distributed with this | | // License, v. 2.0. If a copy of the MPL was not distributed with this | |
| // file, You can obtain one at http://mozilla.org/MPL/2.0/. | | // file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
| | | | |
| //! \addtogroup arma_version | | //! \addtogroup arma_version | |
| //! @{ | | //! @{ | |
| | | | |
| #define ARMA_VERSION_MAJOR 3 | | #define ARMA_VERSION_MAJOR 3 | |
| #define ARMA_VERSION_MINOR 909 | | #define ARMA_VERSION_MINOR 909 | |
|
| #define ARMA_VERSION_PATCH 1 | | #define ARMA_VERSION_PATCH 2 | |
| #define ARMA_VERSION_NAME "development version" | | #define ARMA_VERSION_NAME "development version" | |
| | | | |
| struct arma_version | | struct arma_version | |
| { | | { | |
| static const unsigned int major = ARMA_VERSION_MAJOR; | | static const unsigned int major = ARMA_VERSION_MAJOR; | |
| static const unsigned int minor = ARMA_VERSION_MINOR; | | static const unsigned int minor = ARMA_VERSION_MINOR; | |
| static const unsigned int patch = ARMA_VERSION_PATCH; | | static const unsigned int patch = ARMA_VERSION_PATCH; | |
| | | | |
| static | | static | |
| inline | | inline | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|
| armadillo | | armadillo | |
| | | | |
| skipping to change at line 223 | | skipping to change at line 223 | |
| #include "armadillo_bits/op_find_bones.hpp" | | #include "armadillo_bits/op_find_bones.hpp" | |
| #include "armadillo_bits/op_chol_bones.hpp" | | #include "armadillo_bits/op_chol_bones.hpp" | |
| #include "armadillo_bits/op_cx_scalar_bones.hpp" | | #include "armadillo_bits/op_cx_scalar_bones.hpp" | |
| #include "armadillo_bits/op_trimat_bones.hpp" | | #include "armadillo_bits/op_trimat_bones.hpp" | |
| #include "armadillo_bits/op_cumsum_bones.hpp" | | #include "armadillo_bits/op_cumsum_bones.hpp" | |
| #include "armadillo_bits/op_symmat_bones.hpp" | | #include "armadillo_bits/op_symmat_bones.hpp" | |
| #include "armadillo_bits/op_hist_bones.hpp" | | #include "armadillo_bits/op_hist_bones.hpp" | |
| #include "armadillo_bits/op_unique_bones.hpp" | | #include "armadillo_bits/op_unique_bones.hpp" | |
| #include "armadillo_bits/op_toeplitz_bones.hpp" | | #include "armadillo_bits/op_toeplitz_bones.hpp" | |
| #include "armadillo_bits/op_fft_bones.hpp" | | #include "armadillo_bits/op_fft_bones.hpp" | |
|
| | | #include "armadillo_bits/op_any_bones.hpp" | |
| | | #include "armadillo_bits/op_all_bones.hpp" | |
| | | | |
| #include "armadillo_bits/glue_times_bones.hpp" | | #include "armadillo_bits/glue_times_bones.hpp" | |
| #include "armadillo_bits/glue_mixed_bones.hpp" | | #include "armadillo_bits/glue_mixed_bones.hpp" | |
| #include "armadillo_bits/glue_cov_bones.hpp" | | #include "armadillo_bits/glue_cov_bones.hpp" | |
| #include "armadillo_bits/glue_cor_bones.hpp" | | #include "armadillo_bits/glue_cor_bones.hpp" | |
| #include "armadillo_bits/glue_kron_bones.hpp" | | #include "armadillo_bits/glue_kron_bones.hpp" | |
| #include "armadillo_bits/glue_cross_bones.hpp" | | #include "armadillo_bits/glue_cross_bones.hpp" | |
| #include "armadillo_bits/glue_join_bones.hpp" | | #include "armadillo_bits/glue_join_bones.hpp" | |
| #include "armadillo_bits/glue_relational_bones.hpp" | | #include "armadillo_bits/glue_relational_bones.hpp" | |
| #include "armadillo_bits/glue_solve_bones.hpp" | | #include "armadillo_bits/glue_solve_bones.hpp" | |
| | | | |
| skipping to change at line 406 | | skipping to change at line 408 | |
| #include "armadillo_bits/fn_trunc_log.hpp" | | #include "armadillo_bits/fn_trunc_log.hpp" | |
| #include "armadillo_bits/fn_toeplitz.hpp" | | #include "armadillo_bits/fn_toeplitz.hpp" | |
| #include "armadillo_bits/fn_trimat.hpp" | | #include "armadillo_bits/fn_trimat.hpp" | |
| #include "armadillo_bits/fn_cumsum.hpp" | | #include "armadillo_bits/fn_cumsum.hpp" | |
| #include "armadillo_bits/fn_symmat.hpp" | | #include "armadillo_bits/fn_symmat.hpp" | |
| #include "armadillo_bits/fn_syl_lyap.hpp" | | #include "armadillo_bits/fn_syl_lyap.hpp" | |
| #include "armadillo_bits/fn_hist.hpp" | | #include "armadillo_bits/fn_hist.hpp" | |
| #include "armadillo_bits/fn_histc.hpp" | | #include "armadillo_bits/fn_histc.hpp" | |
| #include "armadillo_bits/fn_unique.hpp" | | #include "armadillo_bits/fn_unique.hpp" | |
| #include "armadillo_bits/fn_fft.hpp" | | #include "armadillo_bits/fn_fft.hpp" | |
|
| | | #include "armadillo_bits/fn_any.hpp" | |
| | | #include "armadillo_bits/fn_all.hpp" | |
| | | | |
| #include "armadillo_bits/fn_speye.hpp" | | #include "armadillo_bits/fn_speye.hpp" | |
| #include "armadillo_bits/fn_spones.hpp" | | #include "armadillo_bits/fn_spones.hpp" | |
| #include "armadillo_bits/fn_sprandn.hpp" | | #include "armadillo_bits/fn_sprandn.hpp" | |
| #include "armadillo_bits/fn_sprandu.hpp" | | #include "armadillo_bits/fn_sprandu.hpp" | |
| | | | |
| // misc stuff | | // misc stuff | |
| | | | |
| #include "armadillo_bits/hdf5_misc.hpp" | | #include "armadillo_bits/hdf5_misc.hpp" | |
| #include "armadillo_bits/fft_engine.hpp" | | #include "armadillo_bits/fft_engine.hpp" | |
| | | | |
| skipping to change at line 505 | | skipping to change at line 509 | |
| #include "armadillo_bits/op_find_meat.hpp" | | #include "armadillo_bits/op_find_meat.hpp" | |
| #include "armadillo_bits/op_chol_meat.hpp" | | #include "armadillo_bits/op_chol_meat.hpp" | |
| #include "armadillo_bits/op_cx_scalar_meat.hpp" | | #include "armadillo_bits/op_cx_scalar_meat.hpp" | |
| #include "armadillo_bits/op_trimat_meat.hpp" | | #include "armadillo_bits/op_trimat_meat.hpp" | |
| #include "armadillo_bits/op_cumsum_meat.hpp" | | #include "armadillo_bits/op_cumsum_meat.hpp" | |
| #include "armadillo_bits/op_symmat_meat.hpp" | | #include "armadillo_bits/op_symmat_meat.hpp" | |
| #include "armadillo_bits/op_hist_meat.hpp" | | #include "armadillo_bits/op_hist_meat.hpp" | |
| #include "armadillo_bits/op_unique_meat.hpp" | | #include "armadillo_bits/op_unique_meat.hpp" | |
| #include "armadillo_bits/op_toeplitz_meat.hpp" | | #include "armadillo_bits/op_toeplitz_meat.hpp" | |
| #include "armadillo_bits/op_fft_meat.hpp" | | #include "armadillo_bits/op_fft_meat.hpp" | |
|
| | | #include "armadillo_bits/op_any_meat.hpp" | |
| | | #include "armadillo_bits/op_all_meat.hpp" | |
| | | | |
| #include "armadillo_bits/glue_times_meat.hpp" | | #include "armadillo_bits/glue_times_meat.hpp" | |
| #include "armadillo_bits/glue_mixed_meat.hpp" | | #include "armadillo_bits/glue_mixed_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" | | #include "armadillo_bits/glue_cross_meat.hpp" | |
| #include "armadillo_bits/glue_join_meat.hpp" | | #include "armadillo_bits/glue_join_meat.hpp" | |
| #include "armadillo_bits/glue_relational_meat.hpp" | | #include "armadillo_bits/glue_relational_meat.hpp" | |
| #include "armadillo_bits/glue_solve_meat.hpp" | | #include "armadillo_bits/glue_solve_meat.hpp" | |
| | | | |
End of changes. 3 change blocks. |
| 0 lines changed or deleted | | 6 lines changed or added | |
|
| mul_herk.hpp | | mul_herk.hpp | |
| | | | |
| skipping to change at line 240 | | skipping to change at line 240 | |
| Mat< std::complex<T> >& C, | | Mat< std::complex<T> >& C, | |
| const TA& A, | | const TA& A, | |
| const T alpha = T(1), | | const T alpha = T(1), | |
| const T beta = T(0) | | const T beta = T(0) | |
| ) | | ) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
| typedef std::complex<T> eT; | | typedef std::complex<T> eT; | |
| | | | |
|
| const uword A_n_rows = A.n_rows; | | | |
| const uword A_n_cols = A.n_cols; | | | |
| | | | |
| // do_trans_A == false -> C = alpha * A * A^H + beta*C | | // do_trans_A == false -> C = alpha * A * A^H + beta*C | |
| // do_trans_A == true -> C = alpha * A^H * A + beta*C | | // do_trans_A == true -> C = alpha * A^H * A + beta*C | |
| | | | |
| if(do_trans_A == false) | | if(do_trans_A == false) | |
| { | | { | |
|
| podarray<eT> tmp(A_n_cols); | | Mat<eT> AA; | |
| | | | |
| eT* A_rowdata = tmp.memptr(); | | | |
| | | | |
| for(uword row_A=0; row_A < A_n_rows; ++row_A) | | | |
| { | | | |
| tmp.copy_row(A, row_A); | | | |
| | | | |
|
| for(uword k=row_A; k < A_n_rows; ++k) | | op_htrans::apply_noalias(AA, A); | |
| { | | | |
| const eT acc = herk_helper::dot_conj_row(A_n_cols, A_rowdata, A, | | | |
| k); | | | |
| | | | |
|
| if( (use_alpha == false) && (use_beta == false) ) | | herk_emul<true, use_alpha, use_beta>::apply(C, AA, alpha, beta); | |
| { | | | |
| C.at(row_A, k) = acc; | | | |
| | | | |
| if(row_A != k) { C.at(k, row_A) = std::conj(acc); } | | | |
| } | | | |
| else | | | |
| if( (use_alpha == true) && (use_beta == false) ) | | | |
| { | | | |
| const eT val = alpha*acc; | | | |
| | | | |
| C.at(row_A, k) = val; | | | |
| | | | |
| if(row_A != k) { C.at(k, row_A) = std::conj(val); } | | | |
| } | | | |
| else | | | |
| if( (use_alpha == false) && (use_beta == true) ) | | | |
| { | | | |
| C.at(row_A, k) = acc + beta*C.at(row_A, k); | | | |
| | | | |
| if(row_A != k) { C.at(k, row_A) = std::conj(acc) + beta*C.at(k | | | |
| , row_A); } | | | |
| } | | | |
| else | | | |
| if( (use_alpha == true) && (use_beta == true) ) | | | |
| { | | | |
| const eT val = alpha*acc; | | | |
| | | | |
| C.at(row_A, k) = val + beta*C.at(row_A, k); | | | |
| | | | |
| if(row_A != k) { C.at(k, row_A) = std::conj(val) + beta*C.at(k | | | |
| , row_A); } | | | |
| } | | | |
| } | | | |
| } | | | |
| } | | } | |
| else | | else | |
| if(do_trans_A == true) | | if(do_trans_A == true) | |
| { | | { | |
|
| | | const uword A_n_rows = A.n_rows; | |
| | | const uword A_n_cols = A.n_cols; | |
| | | | |
| for(uword col_A=0; col_A < A_n_cols; ++col_A) | | for(uword col_A=0; col_A < A_n_cols; ++col_A) | |
| { | | { | |
| // col_A is interpreted as row_A when storing the results in matrix
C | | // col_A is interpreted as row_A when storing the results in matrix
C | |
| | | | |
| const eT* A_coldata = A.colptr(col_A); | | const eT* A_coldata = A.colptr(col_A); | |
| | | | |
| for(uword k=col_A; k < A_n_cols ; ++k) | | for(uword k=col_A; k < A_n_cols ; ++k) | |
| { | | { | |
| const eT acc = op_cdot::direct_cdot(A_n_rows, A_coldata, A.colptr
(k)); | | const eT acc = op_cdot::direct_cdot(A_n_rows, A_coldata, A.colptr
(k)); | |
| | | | |
| | | | |
End of changes. 5 change blocks. |
| 49 lines changed or deleted | | 6 lines changed or added | |
|
| mul_syrk.hpp | | mul_syrk.hpp | |
| | | | |
| skipping to change at line 194 | | skipping to change at line 194 | |
| apply | | apply | |
| ( | | ( | |
| Mat<eT>& C, | | Mat<eT>& C, | |
| const TA& A, | | const TA& A, | |
| const eT alpha = eT(1), | | const eT alpha = eT(1), | |
| const eT beta = eT(0) | | const eT beta = eT(0) | |
| ) | | ) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
|
| const uword A_n_rows = A.n_rows; | | | |
| const uword A_n_cols = A.n_cols; | | | |
| | | | |
| // do_trans_A == false -> C = alpha * A * A^T + beta*C | | // do_trans_A == false -> C = alpha * A * A^T + beta*C | |
| // do_trans_A == true -> C = alpha * A^T * A + beta*C | | // do_trans_A == true -> C = alpha * A^T * A + beta*C | |
| | | | |
| if(do_trans_A == false) | | if(do_trans_A == false) | |
| { | | { | |
|
| podarray<eT> tmp(A_n_cols); | | Mat<eT> AA; | |
| | | | |
| eT* A_rowdata = tmp.memptr(); | | | |
| | | | |
|
| for(uword row_A=0; row_A < A_n_rows; ++row_A) | | op_strans::apply_noalias(AA, A); | |
| { | | | |
| tmp.copy_row(A, row_A); | | | |
| | | | |
|
| for(uword k=row_A; k < A_n_rows ; ++k) | | syrk_emul<true, use_alpha, use_beta>::apply(C, AA, alpha, beta); | |
| { | | | |
| eT acc1 = eT(0); | | | |
| eT acc2 = eT(0); | | | |
| | | | |
| uword i, j; | | | |
| | | | |
| for(i=0, j=1; j < A_n_cols; i+=2, j+=2) | | | |
| { | | | |
| const eT tmp_i = A.at(k,i); | | | |
| const eT tmp_j = A.at(k,j); | | | |
| | | | |
| acc1 += A_rowdata[i] * tmp_i; | | | |
| acc2 += A_rowdata[j] * tmp_j; | | | |
| } | | | |
| | | | |
| if(i < A_n_cols) | | | |
| { | | | |
| acc1 += A_rowdata[i] * A.at(k,i); | | | |
| } | | | |
| | | | |
| const eT acc = (acc1 + acc2); | | | |
| | | | |
| if( (use_alpha == false) && (use_beta == false) ) | | | |
| { | | | |
| C.at(row_A, k) = acc; | | | |
| C.at(k, row_A) = acc; | | | |
| } | | | |
| else | | | |
| if( (use_alpha == true) && (use_beta == false) ) | | | |
| { | | | |
| const eT val = alpha*acc; | | | |
| | | | |
| C.at(row_A, k) = val; | | | |
| C.at(k, row_A) = val; | | | |
| } | | | |
| else | | | |
| if( (use_alpha == false) && (use_beta == true) ) | | | |
| { | | | |
| C.at(row_A, k) = acc + beta*C.at(row_A, k); | | | |
| if(row_A != k) { C.at(k, row_A) = acc + beta*C.at(k, row_A); } | | | |
| } | | | |
| else | | | |
| if( (use_alpha == true) && (use_beta == true) ) | | | |
| { | | | |
| const eT val = alpha*acc; | | | |
| | | | |
| C.at(row_A, k) = val + beta*C.at(row_A, k); | | | |
| if(row_A != k) { C.at(k, row_A) = val + beta*C.at(k, row_A); } | | | |
| } | | | |
| } | | | |
| } | | | |
| } | | } | |
| else | | else | |
| if(do_trans_A == true) | | if(do_trans_A == true) | |
| { | | { | |
|
| | | const uword A_n_rows = A.n_rows; | |
| | | const uword A_n_cols = A.n_cols; | |
| | | | |
| for(uword col_A=0; col_A < A_n_cols; ++col_A) | | for(uword col_A=0; col_A < A_n_cols; ++col_A) | |
| { | | { | |
| // col_A is interpreted as row_A when storing the results in matrix
C | | // col_A is interpreted as row_A when storing the results in matrix
C | |
| | | | |
| const eT* A_coldata = A.colptr(col_A); | | const eT* A_coldata = A.colptr(col_A); | |
| | | | |
| for(uword k=col_A; k < A_n_cols; ++k) | | for(uword k=col_A; k < A_n_cols; ++k) | |
| { | | { | |
| const eT acc = op_dot::direct_dot_arma(A_n_rows, A_coldata, A.col
ptr(k)); | | const eT acc = op_dot::direct_dot_arma(A_n_rows, A_coldata, A.col
ptr(k)); | |
| | | | |
| | | | |
End of changes. 5 change blocks. |
| 61 lines changed or deleted | | 6 lines changed or added | |
|