| glue_times_meat.hpp | | glue_times_meat.hpp | |
| | | | |
| skipping to change at line 16 | | skipping to change at line 16 | |
| // for any purpose. You can redistribute this file | | // for any purpose. You can redistribute this file | |
| // and/or modify it under the terms of the GNU | | // and/or modify it under the terms of the GNU | |
| // Lesser General Public License (LGPL) as published | | // Lesser General Public License (LGPL) as published | |
| // by the Free Software Foundation, either version 3 | | // by the Free Software Foundation, either version 3 | |
| // of the License or (at your option) any later version. | | // of the License or (at your option) any later version. | |
| // (see http://www.opensource.org/licenses for more info) | | // (see http://www.opensource.org/licenses for more info) | |
| | | | |
| //! \addtogroup glue_times | | //! \addtogroup glue_times | |
| //! @{ | | //! @{ | |
| | | | |
|
| template<uword N> | | template<bool is_eT_blas_type> | |
| template<typename T1, typename T2> | | template<typename T1, typename T2> | |
| arma_hot | | arma_hot | |
| inline | | inline | |
| void | | void | |
|
| glue_times_redirect<N>::apply(Mat<typename T1::elem_type>& out, const Glue<
T1,T2,glue_times>& X) | | glue_times_redirect2_helper<is_eT_blas_type>::apply(Mat<typename T1::elem_t
ype>& out, const Glue<T1,T2,glue_times>& X) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
| typedef typename T1::elem_type eT; | | typedef typename T1::elem_type eT; | |
| | | | |
| const partial_unwrap_check<T1> tmp1(X.A, out); | | const partial_unwrap_check<T1> tmp1(X.A, out); | |
| const partial_unwrap_check<T2> tmp2(X.B, out); | | const partial_unwrap_check<T2> tmp2(X.B, out); | |
| | | | |
| const Mat<eT>& A = tmp1.M; | | const Mat<eT>& A = tmp1.M; | |
| const Mat<eT>& B = tmp2.M; | | const Mat<eT>& B = tmp2.M; | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 50 | |
| partial_unwrap_check<T2>::do_trans, | | partial_unwrap_check<T2>::do_trans, | |
| (partial_unwrap_check<T1>::do_times || partial_unwrap_check<T2>::do_tim
es) | | (partial_unwrap_check<T1>::do_times || partial_unwrap_check<T2>::do_tim
es) | |
| > | | > | |
| (out, A, B, alpha); | | (out, A, B, alpha); | |
| } | | } | |
| | | | |
| template<typename T1, typename T2> | | template<typename T1, typename T2> | |
| arma_hot | | arma_hot | |
| inline | | inline | |
| void | | void | |
|
| glue_times_redirect<2>::apply(Mat<typename T1::elem_type>& out, const Glue<
T1,T2,glue_times>& X, const typename arma_blas_type_only<typename T1::elem_
type>::result* junk) | | glue_times_redirect2_helper<true>::apply(Mat<typename T1::elem_type>& out,
const Glue<T1,T2,glue_times>& X) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
|
| arma_ignore(junk); | | | |
| | | | |
| typedef typename T1::elem_type eT; | | typedef typename T1::elem_type eT; | |
| | | | |
| if(strip_inv<T1>::do_inv == false) | | if(strip_inv<T1>::do_inv == false) | |
| { | | { | |
| const partial_unwrap_check<T1> tmp1(X.A, out); | | const partial_unwrap_check<T1> tmp1(X.A, out); | |
| const partial_unwrap_check<T2> tmp2(X.B, out); | | const partial_unwrap_check<T2> tmp2(X.B, out); | |
| | | | |
| const Mat<eT>& A = tmp1.M; | | const Mat<eT>& A = tmp1.M; | |
| const Mat<eT>& B = tmp2.M; | | const Mat<eT>& B = tmp2.M; | |
| | | | |
| skipping to change at line 96 | | skipping to change at line 95 | |
| | | | |
| arma_debug_check( (A.is_square() == false), "inv(): given matrix is not
square" ); | | arma_debug_check( (A.is_square() == false), "inv(): given matrix is not
square" ); | |
| | | | |
| const unwrap_check<T2> B_tmp(X.B, out); | | const unwrap_check<T2> B_tmp(X.B, out); | |
| const Mat<eT>& B = B_tmp.M; | | const Mat<eT>& B = B_tmp.M; | |
| | | | |
| glue_solve::solve_direct( out, A, B, A_strip.slow ); | | glue_solve::solve_direct( out, A, B, A_strip.slow ); | |
| } | | } | |
| } | | } | |
| | | | |
|
| | | template<uword N> | |
| template<typename T1, typename T2> | | template<typename T1, typename T2> | |
| arma_hot | | arma_hot | |
| inline | | inline | |
| void | | void | |
|
| glue_times_redirect<2>::apply(Mat<typename T1::elem_type>& out, const Glue<
T1,T2,glue_times>& X, const typename arma_not_blas_type<typename T1::elem_t
ype>::result* junk) | | glue_times_redirect<N>::apply(Mat<typename T1::elem_type>& out, const Glue<
T1,T2,glue_times>& X) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
|
| arma_ignore(junk); | | | |
| | | | |
| typedef typename T1::elem_type eT; | | typedef typename T1::elem_type eT; | |
| | | | |
| const partial_unwrap_check<T1> tmp1(X.A, out); | | const partial_unwrap_check<T1> tmp1(X.A, out); | |
| const partial_unwrap_check<T2> tmp2(X.B, out); | | const partial_unwrap_check<T2> tmp2(X.B, out); | |
| | | | |
| const Mat<eT>& A = tmp1.M; | | const Mat<eT>& A = tmp1.M; | |
| const Mat<eT>& B = tmp2.M; | | const Mat<eT>& B = tmp2.M; | |
| | | | |
| const bool use_alpha = partial_unwrap_check<T1>::do_times || partial_unwr
ap_check<T2>::do_times; | | const bool use_alpha = partial_unwrap_check<T1>::do_times || partial_unwr
ap_check<T2>::do_times; | |
| | | | |
| skipping to change at line 126 | | skipping to change at line 125 | |
| glue_times::apply | | glue_times::apply | |
| < | | < | |
| eT, | | eT, | |
| partial_unwrap_check<T1>::do_trans, | | partial_unwrap_check<T1>::do_trans, | |
| partial_unwrap_check<T2>::do_trans, | | partial_unwrap_check<T2>::do_trans, | |
| (partial_unwrap_check<T1>::do_times || partial_unwrap_check<T2>::do_tim
es) | | (partial_unwrap_check<T1>::do_times || partial_unwrap_check<T2>::do_tim
es) | |
| > | | > | |
| (out, A, B, alpha); | | (out, A, B, alpha); | |
| } | | } | |
| | | | |
|
| | | template<typename T1, typename T2> | |
| | | arma_hot | |
| | | inline | |
| | | void | |
| | | glue_times_redirect<2>::apply(Mat<typename T1::elem_type>& out, const Glue< | |
| | | T1,T2,glue_times>& X) | |
| | | { | |
| | | arma_extra_debug_sigprint(); | |
| | | | |
| | | typedef typename T1::elem_type eT; | |
| | | | |
| | | glue_times_redirect2_helper< is_supported_blas_type<eT>::value >::apply(o | |
| | | ut, X); | |
| | | } | |
| | | | |
| template<typename T1, typename T2, typename T3> | | template<typename T1, typename T2, typename T3> | |
| arma_hot | | arma_hot | |
| inline | | inline | |
| void | | void | |
| glue_times_redirect<3>::apply(Mat<typename T1::elem_type>& out, const Glue<
Glue<T1,T2,glue_times>, T3, glue_times>& X) | | glue_times_redirect<3>::apply(Mat<typename T1::elem_type>& out, const Glue<
Glue<T1,T2,glue_times>, T3, glue_times>& X) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
| typedef typename T1::elem_type eT; | | typedef typename T1::elem_type eT; | |
| | | | |
| | | | |
End of changes. 8 change blocks. |
| 6 lines changed or deleted | | 20 lines changed or added | |
|
| unwrap.hpp | | unwrap.hpp | |
| | | | |
| skipping to change at line 114 | | skipping to change at line 114 | |
| // | | // | |
| | | | |
| template<typename T1> | | template<typename T1> | |
| class unwrap_check | | class unwrap_check | |
| { | | { | |
| public: | | public: | |
| | | | |
| typedef typename T1::elem_type eT; | | typedef typename T1::elem_type eT; | |
| | | | |
| inline | | inline | |
|
| unwrap_check(const T1& A, const Mat<eT>& B) | | unwrap_check(const T1& A, const Mat<eT>&) | |
| : M(A) | | : M(A) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
|
| arma_ignore(B); | | | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~unwrap_check() | | ~unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
| const Mat<eT> M; | | const Mat<eT> M; | |
| }; | | }; | |
| | | | |
| skipping to change at line 231 | | skipping to change at line 230 | |
| | | | |
| template<typename T1> | | template<typename T1> | |
| class unwrap_check_mixed | | class unwrap_check_mixed | |
| { | | { | |
| public: | | public: | |
| | | | |
| typedef typename T1::elem_type eT1; | | typedef typename T1::elem_type eT1; | |
| | | | |
| template<typename eT2> | | template<typename eT2> | |
| inline | | inline | |
|
| unwrap_check_mixed(const T1& A, const Mat<eT2>& B) | | unwrap_check_mixed(const T1& A, const Mat<eT2>&) | |
| : M(A) | | : M(A) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
|
| arma_ignore(B); | | | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~unwrap_check_mixed() | | ~unwrap_check_mixed() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
| const Mat<eT1> M; | | const Mat<eT1> M; | |
| }; | | }; | |
| | | | |
| skipping to change at line 787 | | skipping to change at line 785 | |
| | | | |
| // | | // | |
| | | | |
| template<typename T1> | | template<typename T1> | |
| class partial_unwrap_check | | class partial_unwrap_check | |
| { | | { | |
| public: | | public: | |
| | | | |
| typedef typename T1::elem_type eT; | | typedef typename T1::elem_type eT; | |
| | | | |
|
| inline partial_unwrap_check(const T1& A, const Mat<eT>& B) | | arma_hot inline | |
| | | partial_unwrap_check(const T1& A, const Mat<eT>&) | |
| : M(A) | | : M(A) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
|
| arma_ignore(B); | | | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return eT(1); } | | arma_hot arma_inline eT get_val() const { return eT(1); } | |
| | | | |
| static const bool do_trans = false; | | static const bool do_trans = false; | |
| static const bool do_times = false; | | static const bool do_times = false; | |
| | | | |
| const Mat<eT> M; | | const Mat<eT> M; | |
| }; | | }; | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| class partial_unwrap_check< Mat<eT> > | | class partial_unwrap_check< Mat<eT> > | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const Mat<eT>& A, const Mat<eT>& B) | | partial_unwrap_check(const Mat<eT>& A, const Mat<eT>& B) | |
| : M_local ( (&A == &B) ? new Mat<eT>(A) : 0 ) | | : M_local ( (&A == &B) ? new Mat<eT>(A) : 0 ) | |
| , M ( (&A == &B) ? (*M_local) : A ) | | , M ( (&A == &B) ? (*M_local) : A ) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
| if(M_local) | | if(M_local) | |
| { | | { | |
| delete M_local; | | delete M_local; | |
| } | | } | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return eT(1); } | | arma_hot arma_inline eT get_val() const { return eT(1); } | |
| | | | |
| static const bool do_trans = false; | | static const bool do_trans = false; | |
| static const bool do_times = false; | | static const bool do_times = false; | |
| | | | |
| // the order below is important | | // the order below is important | |
| const Mat<eT>* M_local; | | const Mat<eT>* M_local; | |
| const Mat<eT>& M; | | const Mat<eT>& M; | |
| }; | | }; | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| class partial_unwrap_check< Row<eT> > | | class partial_unwrap_check< Row<eT> > | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const Row<eT>& A, const Mat<eT>& B) | | partial_unwrap_check(const Row<eT>& A, const Mat<eT>& B) | |
| : M_local ( (&A == &B) ? new Mat<eT>(A) : 0 ) | | : M_local ( (&A == &B) ? new Mat<eT>(A) : 0 ) | |
| , M ( (&A == &B) ? (*M_local) : A ) | | , M ( (&A == &B) ? (*M_local) : A ) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
| if(M_local) | | if(M_local) | |
| { | | { | |
| delete M_local; | | delete M_local; | |
| } | | } | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return eT(1); } | | arma_hot arma_inline eT get_val() const { return eT(1); } | |
| | | | |
| static const bool do_trans = false; | | static const bool do_trans = false; | |
| static const bool do_times = false; | | static const bool do_times = false; | |
| | | | |
| // the order below is important | | // the order below is important | |
| const Mat<eT>* M_local; | | const Mat<eT>* M_local; | |
| const Mat<eT>& M; | | const Mat<eT>& M; | |
| }; | | }; | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| class partial_unwrap_check< Col<eT> > | | class partial_unwrap_check< Col<eT> > | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const Col<eT>& A, const Mat<eT>& B) | | partial_unwrap_check(const Col<eT>& A, const Mat<eT>& B) | |
| : M_local ( (&A == &B) ? new Mat<eT>(A) : 0 ) | | : M_local ( (&A == &B) ? new Mat<eT>(A) : 0 ) | |
| , M ( (&A == &B) ? (*M_local) : A ) | | , M ( (&A == &B) ? (*M_local) : A ) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
| if(M_local) | | if(M_local) | |
| { | | { | |
| delete M_local; | | delete M_local; | |
| } | | } | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return eT(1); } | | arma_hot arma_inline eT get_val() const { return eT(1); } | |
| | | | |
| static const bool do_trans = false; | | static const bool do_trans = false; | |
| static const bool do_times = false; | | static const bool do_times = false; | |
| | | | |
| // the order below is important | | // the order below is important | |
| const Mat<eT>* M_local; | | const Mat<eT>* M_local; | |
| const Mat<eT>& M; | | const Mat<eT>& M; | |
| }; | | }; | |
| | | | |
| template<typename T1> | | template<typename T1> | |
| class partial_unwrap_check< Op<T1, op_htrans> > | | class partial_unwrap_check< Op<T1, op_htrans> > | |
| { | | { | |
| public: | | public: | |
| | | | |
| typedef typename T1::elem_type eT; | | typedef typename T1::elem_type eT; | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const Op<T1,op_htrans>& A, const Mat<eT>& B) | | partial_unwrap_check(const Op<T1,op_htrans>& A, const Mat<eT>&) | |
| : M(A.m) | | : M(A.m) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
|
| arma_ignore(B); | | | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return eT(1); } | | arma_hot arma_inline eT get_val() const { return eT(1); } | |
| | | | |
| static const bool do_trans = true; | | static const bool do_trans = true; | |
| static const bool do_times = false; | | static const bool do_times = false; | |
| | | | |
| const Mat<eT> M; | | const Mat<eT> M; | |
| }; | | }; | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| class partial_unwrap_check< Op< Mat<eT>, op_htrans> > | | class partial_unwrap_check< Op< Mat<eT>, op_htrans> > | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const Op< Mat<eT>, op_htrans>& A, const Mat<eT>& B) | | partial_unwrap_check(const Op< Mat<eT>, op_htrans>& A, const Mat<eT>& B) | |
| : M_local ( (&A.m == &B) ? new Mat<eT>(A.m) : 0 ) | | : M_local ( (&A.m == &B) ? new Mat<eT>(A.m) : 0 ) | |
| , M ( (&A.m == &B) ? (*M_local) : A.m ) | | , M ( (&A.m == &B) ? (*M_local) : A.m ) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
| if(M_local) | | if(M_local) | |
| { | | { | |
| delete M_local; | | delete M_local; | |
| } | | } | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return eT(1); } | | arma_hot arma_inline eT get_val() const { return eT(1); } | |
| | | | |
| static const bool do_trans = true; | | static const bool do_trans = true; | |
| static const bool do_times = false; | | static const bool do_times = false; | |
| | | | |
| // the order below is important | | // the order below is important | |
| const Mat<eT>* M_local; | | const Mat<eT>* M_local; | |
| const Mat<eT>& M; | | const Mat<eT>& M; | |
| }; | | }; | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| class partial_unwrap_check< Op< Row<eT>, op_htrans> > | | class partial_unwrap_check< Op< Row<eT>, op_htrans> > | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const Op< Row<eT>, op_htrans>& A, const Mat<eT>& B) | | partial_unwrap_check(const Op< Row<eT>, op_htrans>& A, const Mat<eT>& B) | |
| : M_local ( (&A.m == &B) ? new Mat<eT>(A.m) : 0 ) | | : M_local ( (&A.m == &B) ? new Mat<eT>(A.m) : 0 ) | |
| , M ( (&A.m == &B) ? (*M_local) : A.m ) | | , M ( (&A.m == &B) ? (*M_local) : A.m ) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
| if(M_local) | | if(M_local) | |
| { | | { | |
| delete M_local; | | delete M_local; | |
| } | | } | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return eT(1); } | | arma_hot arma_inline eT get_val() const { return eT(1); } | |
| | | | |
| static const bool do_trans = true; | | static const bool do_trans = true; | |
| static const bool do_times = false; | | static const bool do_times = false; | |
| | | | |
| // the order below is important | | // the order below is important | |
| const Mat<eT>* M_local; | | const Mat<eT>* M_local; | |
| const Mat<eT>& M; | | const Mat<eT>& M; | |
| }; | | }; | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| class partial_unwrap_check< Op< Col<eT>, op_htrans> > | | class partial_unwrap_check< Op< Col<eT>, op_htrans> > | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const Op< Col<eT>, op_htrans>& A, const Mat<eT>& B) | | partial_unwrap_check(const Op< Col<eT>, op_htrans>& A, const Mat<eT>& B) | |
| : M_local ( (&A.m == &B) ? new Mat<eT>(A.m) : 0 ) | | : M_local ( (&A.m == &B) ? new Mat<eT>(A.m) : 0 ) | |
| , M ( (&A.m == &B) ? (*M_local) : A.m ) | | , M ( (&A.m == &B) ? (*M_local) : A.m ) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
| if(M_local) | | if(M_local) | |
| { | | { | |
| delete M_local; | | delete M_local; | |
| } | | } | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return eT(1); } | | arma_hot arma_inline eT get_val() const { return eT(1); } | |
| | | | |
| static const bool do_trans = true; | | static const bool do_trans = true; | |
| static const bool do_times = false; | | static const bool do_times = false; | |
| | | | |
| // the order below is important | | // the order below is important | |
| const Mat<eT>* M_local; | | const Mat<eT>* M_local; | |
| const Mat<eT>& M; | | const Mat<eT>& M; | |
| }; | | }; | |
| | | | |
| template<typename T1> | | template<typename T1> | |
| class partial_unwrap_check< Op<T1, op_htrans2> > | | class partial_unwrap_check< Op<T1, op_htrans2> > | |
| { | | { | |
| public: | | public: | |
| | | | |
| typedef typename T1::elem_type eT; | | typedef typename T1::elem_type eT; | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const Op<T1,op_htrans2>& A, const Mat<eT>&) | | partial_unwrap_check(const Op<T1,op_htrans2>& A, const Mat<eT>&) | |
| : val(A.aux) | | : val(A.aux) | |
| , M (A.m) | | , M (A.m) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return val; } | | arma_hot arma_inline eT get_val() const { return val; } | |
| | | | |
| static const bool do_trans = true; | | static const bool do_trans = true; | |
| static const bool do_times = true; | | static const bool do_times = true; | |
| | | | |
| const eT val; | | const eT val; | |
| const Mat<eT> M; | | const Mat<eT> M; | |
| }; | | }; | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| class partial_unwrap_check< Op< Mat<eT>, op_htrans2> > | | class partial_unwrap_check< Op< Mat<eT>, op_htrans2> > | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const Op< Mat<eT>, op_htrans2>& A, const Mat<eT>& B) | | partial_unwrap_check(const Op< Mat<eT>, op_htrans2>& A, const Mat<eT>& B) | |
| : val (A.aux) | | : val (A.aux) | |
| , M_local ( (&A.m == &B) ? new Mat<eT>(A.m) : 0 ) | | , M_local ( (&A.m == &B) ? new Mat<eT>(A.m) : 0 ) | |
| , M ( (&A.m == &B) ? (*M_local) : A.m ) | | , M ( (&A.m == &B) ? (*M_local) : A.m ) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
| if(M_local) | | if(M_local) | |
| { | | { | |
| delete M_local; | | delete M_local; | |
| } | | } | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return val; } | | arma_hot arma_inline eT get_val() const { return val; } | |
| | | | |
| static const bool do_trans = true; | | static const bool do_trans = true; | |
| static const bool do_times = true; | | static const bool do_times = true; | |
| | | | |
| // the order below is important | | // the order below is important | |
| const eT val; | | const eT val; | |
| const Mat<eT>* M_local; | | const Mat<eT>* M_local; | |
| const Mat<eT>& M; | | const Mat<eT>& M; | |
| }; | | }; | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| class partial_unwrap_check< Op< Row<eT>, op_htrans2> > | | class partial_unwrap_check< Op< Row<eT>, op_htrans2> > | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const Op< Row<eT>, op_htrans2>& A, const Mat<eT>& B) | | partial_unwrap_check(const Op< Row<eT>, op_htrans2>& A, const Mat<eT>& B) | |
| : val (A.aux) | | : val (A.aux) | |
| , M_local ( (&A.m == &B) ? new Mat<eT>(A.m) : 0 ) | | , M_local ( (&A.m == &B) ? new Mat<eT>(A.m) : 0 ) | |
| , M ( (&A.m == &B) ? (*M_local) : A.m ) | | , M ( (&A.m == &B) ? (*M_local) : A.m ) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
| if(M_local) | | if(M_local) | |
| { | | { | |
| delete M_local; | | delete M_local; | |
| } | | } | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return val; } | | arma_hot arma_inline eT get_val() const { return val; } | |
| | | | |
| static const bool do_trans = true; | | static const bool do_trans = true; | |
| static const bool do_times = true; | | static const bool do_times = true; | |
| | | | |
| // the order below is important | | // the order below is important | |
| const eT val; | | const eT val; | |
| const Mat<eT>* M_local; | | const Mat<eT>* M_local; | |
| const Mat<eT>& M; | | const Mat<eT>& M; | |
| }; | | }; | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| class partial_unwrap_check< Op< Col<eT>, op_htrans2> > | | class partial_unwrap_check< Op< Col<eT>, op_htrans2> > | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const Op< Mat<eT>, op_htrans2>& A, const Mat<eT>& B) | | partial_unwrap_check(const Op< Mat<eT>, op_htrans2>& A, const Mat<eT>& B) | |
| : val (A.aux) | | : val (A.aux) | |
| , M_local ( (&A.m == &B) ? new Mat<eT>(A.m) : 0 ) | | , M_local ( (&A.m == &B) ? new Mat<eT>(A.m) : 0 ) | |
| , M ( (&A.m == &B) ? (*M_local) : A.m ) | | , M ( (&A.m == &B) ? (*M_local) : A.m ) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| | | | |
| if(M_local) | | if(M_local) | |
| { | | { | |
| delete M_local; | | delete M_local; | |
| } | | } | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return val; } | | arma_hot arma_inline eT get_val() const { return val; } | |
| | | | |
| static const bool do_trans = true; | | static const bool do_trans = true; | |
| static const bool do_times = true; | | static const bool do_times = true; | |
| | | | |
| // the order below is important | | // the order below is important | |
| const eT val; | | const eT val; | |
| const Mat<eT>* M_local; | | const Mat<eT>* M_local; | |
| const Mat<eT>& M; | | const Mat<eT>& M; | |
| }; | | }; | |
| | | | |
| template<typename T1> | | template<typename T1> | |
| class partial_unwrap_check< eOp<T1, eop_scalar_times> > | | class partial_unwrap_check< eOp<T1, eop_scalar_times> > | |
| { | | { | |
| public: | | public: | |
| | | | |
| typedef typename T1::elem_type eT; | | typedef typename T1::elem_type eT; | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const eOp<T1,eop_scalar_times>& A, const Mat<eT>& B) | | partial_unwrap_check(const eOp<T1,eop_scalar_times>& A, const Mat<eT>&) | |
| : val(A.aux) | | : val(A.aux) | |
| , M (A.P.Q) | | , M (A.P.Q) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
|
| arma_ignore(B); | | | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return val; } | | arma_hot arma_inline eT get_val() const { return val; } | |
| | | | |
| static const bool do_trans = false; | | static const bool do_trans = false; | |
| static const bool do_times = true; | | static const bool do_times = true; | |
| | | | |
| const eT val; | | const eT val; | |
| const Mat<eT> M; | | const Mat<eT> M; | |
| }; | | }; | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| class partial_unwrap_check< eOp<Mat<eT>, eop_scalar_times> > | | class partial_unwrap_check< eOp<Mat<eT>, eop_scalar_times> > | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const eOp<Mat<eT>,eop_scalar_times>& A, const Mat<eT | | partial_unwrap_check(const eOp<Mat<eT>,eop_scalar_times>& A, const Mat<eT | |
| >& B) | | >&) | |
| : val(A.aux) | | : val(A.aux) | |
| , M (A.P.Q) | | , M (A.P.Q) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
|
| arma_ignore(B); | | | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return val; } | | arma_hot arma_inline eT get_val() const { return val; } | |
| | | | |
| static const bool do_trans = false; | | static const bool do_trans = false; | |
| static const bool do_times = true; | | static const bool do_times = true; | |
| | | | |
| const eT val; | | const eT val; | |
| const Mat<eT>& M; | | const Mat<eT>& M; | |
| }; | | }; | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| class partial_unwrap_check< eOp<Row<eT>, eop_scalar_times> > | | class partial_unwrap_check< eOp<Row<eT>, eop_scalar_times> > | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const eOp<Row<eT>,eop_scalar_times>& A, const Mat<eT | | partial_unwrap_check(const eOp<Row<eT>,eop_scalar_times>& A, const Mat<eT | |
| >& B) | | >&) | |
| : val(A.aux) | | : val(A.aux) | |
| , M (A.P.Q) | | , M (A.P.Q) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
|
| arma_ignore(B); | | | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return val; } | | arma_hot arma_inline eT get_val() const { return val; } | |
| | | | |
| static const bool do_trans = false; | | static const bool do_trans = false; | |
| static const bool do_times = true; | | static const bool do_times = true; | |
| | | | |
| const eT val; | | const eT val; | |
| const Mat<eT>& M; | | const Mat<eT>& M; | |
| }; | | }; | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| class partial_unwrap_check< eOp<Col<eT>, eop_scalar_times> > | | class partial_unwrap_check< eOp<Col<eT>, eop_scalar_times> > | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| inline | | arma_hot inline | |
| partial_unwrap_check(const eOp<Col<eT>,eop_scalar_times>& A, const Mat<eT | | partial_unwrap_check(const eOp<Col<eT>,eop_scalar_times>& A, const Mat<eT | |
| >& B) | | >&) | |
| : val(A.aux) | | : val(A.aux) | |
| , M (A.P.Q) | | , M (A.P.Q) | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
|
| arma_ignore(B); | | | |
| } | | } | |
| | | | |
| inline | | inline | |
| ~partial_unwrap_check() | | ~partial_unwrap_check() | |
| { | | { | |
| arma_extra_debug_sigprint(); | | arma_extra_debug_sigprint(); | |
| } | | } | |
| | | | |
|
| inline eT get_val() const { return val; } | | arma_hot arma_inline eT get_val() const { return val; } | |
| | | | |
| static const bool do_trans = false; | | static const bool do_trans = false; | |
| static const bool do_times = true; | | static const bool do_times = true; | |
| | | | |
| const eT val; | | const eT val; | |
| const Mat<eT>& M; | | const Mat<eT>& M; | |
| }; | | }; | |
| | | | |
| //! @} | | //! @} | |
| | | | |
End of changes. 42 change blocks. |
| 50 lines changed or deleted | | 43 lines changed or added | |
|