avoid unnecessary alias checks

This commit is contained in:
conrad
2025-10-16 15:20:54 +10:00
parent ce914cdf47
commit f447f144fe
2 changed files with 23 additions and 0 deletions
@@ -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);
}
//