avoid unnecessary alias checks
This commit is contained in:
@@ -29,6 +29,9 @@ struct spop_trimat
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T1,spop_trimat>& in);
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply(SpMat_noalias<typename T1::elem_type>& out, const SpOp<T1,spop_trimat>& in);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -141,6 +141,26 @@ spop_trimat::apply(SpMat<typename T1::elem_type>& out, const SpOp<T1,spop_trimat
|
||||
|
||||
|
||||
|
||||
template<typename T1>
|
||||
inline
|
||||
void
|
||||
spop_trimat::apply(SpMat_noalias<typename T1::elem_type>& out, const SpOp<T1,spop_trimat>& in)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
typedef typename T1::elem_type eT;
|
||||
|
||||
const SpProxy<T1> P(in.m);
|
||||
|
||||
arma_conform_check( (P.get_n_rows() != P.get_n_cols()), "trimatu()/trimatl(): given matrix must be square sized" );
|
||||
|
||||
const bool upper = (in.aux_uword_a == 0);
|
||||
|
||||
spop_trimat::apply_noalias(out, P, upper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user