rename op_inv_sympd to op_inv_spd_default
This commit is contained in:
@@ -84,7 +84,7 @@ class op_strans;
|
||||
class op_htrans;
|
||||
class op_htrans2;
|
||||
class op_inv_gen_default;
|
||||
class op_inv_sympd;
|
||||
class op_inv_spd_default;
|
||||
class op_diagmat;
|
||||
class op_trimat;
|
||||
class op_vectorise_row;
|
||||
|
||||
@@ -64,7 +64,7 @@ inv
|
||||
template<typename T1>
|
||||
arma_warn_unused
|
||||
arma_inline
|
||||
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, const Op<T1, op_inv_sympd> >::result
|
||||
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, const Op<T1, op_inv_spd_default> >::result
|
||||
inv_sympd
|
||||
(
|
||||
const Base<typename T1::elem_type, T1>& X
|
||||
@@ -72,7 +72,7 @@ inv_sympd
|
||||
{
|
||||
arma_extra_debug_sigprint();
|
||||
|
||||
return Op<T1, op_inv_sympd>(X.get_ref());
|
||||
return Op<T1, op_inv_spd_default>(X.get_ref());
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ inv_sympd
|
||||
{
|
||||
arma_extra_debug_sigprint();
|
||||
|
||||
const bool status = op_inv_sympd::apply_direct(out, X.get_ref());
|
||||
const bool status = op_inv_spd_default::apply_direct(out, X.get_ref());
|
||||
|
||||
if(status == false)
|
||||
{
|
||||
|
||||
@@ -141,10 +141,10 @@ glue_times_redirect2_helper<true>::apply(Mat<typename T1::elem_type>& out, const
|
||||
{
|
||||
if(strip_inv<T2>::do_inv_sympd)
|
||||
{
|
||||
// replace A*inv_sympd(B) with trans( solve(trans(B),trans(A)) )
|
||||
// replace A*inv_spd_default(B) with trans( solve(trans(B),trans(A)) )
|
||||
// transpose of B is avoided as B is explicitly marked as symmetric
|
||||
|
||||
arma_extra_debug_print("glue_times_redirect<2>::apply(): detected A*inv_sympd(B)");
|
||||
arma_extra_debug_print("glue_times_redirect<2>::apply(): detected A*inv_spd_default(B)");
|
||||
|
||||
const Mat<eT> At = trans(X.A);
|
||||
|
||||
@@ -556,7 +556,7 @@ glue_times::apply_inplace_plus(Mat<typename T1::elem_type>& out, const Glue<T1,
|
||||
typedef typename T1::elem_type eT;
|
||||
typedef typename get_pod_type<eT>::result T;
|
||||
|
||||
if( (is_outer_product<T1>::value) || (has_op_inv_gen_default<T1>::value) || (has_op_inv_gen_default<T2>::value) || (has_op_inv_sympd<T1>::value) || (has_op_inv_sympd<T2>::value) )
|
||||
if( (is_outer_product<T1>::value) || (has_op_inv_gen_default<T1>::value) || (has_op_inv_gen_default<T2>::value) || (has_op_inv_spd_default<T1>::value) || (has_op_inv_spd_default<T2>::value) )
|
||||
{
|
||||
// partial workaround for corner cases
|
||||
|
||||
|
||||
@@ -49,13 +49,13 @@ class op_inv_gen_default
|
||||
|
||||
|
||||
|
||||
class op_inv_sympd
|
||||
class op_inv_spd_default
|
||||
: public traits_op_default
|
||||
{
|
||||
public:
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_inv_sympd>& in);
|
||||
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_inv_spd_default>& in);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool apply_direct(Mat<typename T1::elem_type>& out, const Base<typename T1::elem_type,T1>& expr);
|
||||
|
||||
@@ -287,11 +287,11 @@ op_inv_gen_default::apply_tiny_noalias(Mat<eT>& out, const Mat<eT>& X)
|
||||
template<typename T1>
|
||||
inline
|
||||
void
|
||||
op_inv_sympd::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_inv_sympd>& X)
|
||||
op_inv_spd_default::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_inv_spd_default>& X)
|
||||
{
|
||||
arma_extra_debug_sigprint();
|
||||
|
||||
const bool status = op_inv_sympd::apply_direct(out, X.m);
|
||||
const bool status = op_inv_spd_default::apply_direct(out, X.m);
|
||||
|
||||
if(status == false)
|
||||
{
|
||||
@@ -305,7 +305,7 @@ op_inv_sympd::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_inv_sympd>&
|
||||
template<typename T1>
|
||||
inline
|
||||
bool
|
||||
op_inv_sympd::apply_direct(Mat<typename T1::elem_type>& out, const Base<typename T1::elem_type,T1>& expr)
|
||||
op_inv_spd_default::apply_direct(Mat<typename T1::elem_type>& out, const Base<typename T1::elem_type,T1>& expr)
|
||||
{
|
||||
arma_extra_debug_sigprint();
|
||||
|
||||
@@ -331,7 +331,7 @@ op_inv_sympd::apply_direct(Mat<typename T1::elem_type>& out, const Base<typename
|
||||
|
||||
if((out.n_rows <= 4) && is_cx<eT>::no)
|
||||
{
|
||||
arma_extra_debug_print("op_inv_sympd: attempting tinymatrix optimisation");
|
||||
arma_extra_debug_print("op_inv_spd_default: attempting tinymatrix optimisation");
|
||||
|
||||
Mat<eT> tmp(out.n_rows, out.n_rows, arma_nozeros_indicator());
|
||||
|
||||
@@ -339,14 +339,14 @@ op_inv_sympd::apply_direct(Mat<typename T1::elem_type>& out, const Base<typename
|
||||
|
||||
if(status) { arrayops::copy(out.memptr(), tmp.memptr(), tmp.n_elem); return true; }
|
||||
|
||||
arma_extra_debug_print("op_inv_sympd: tinymatrix optimisation failed");
|
||||
arma_extra_debug_print("op_inv_spd_default: tinymatrix optimisation failed");
|
||||
|
||||
// fallthrough if optimisation failed
|
||||
}
|
||||
|
||||
if((is_cx<eT>::no) && (is_op_diagmat<T1>::value || out.is_diagmat()))
|
||||
{
|
||||
arma_extra_debug_print("op_inv_sympd: detected diagonal matrix");
|
||||
arma_extra_debug_print("op_inv_spd_default: detected diagonal matrix");
|
||||
|
||||
// specialised handling of real matrices only;
|
||||
// currently auxlib::inv_sympd() does not enforce that
|
||||
|
||||
@@ -100,12 +100,12 @@ struct strip_inv< Op<T1, op_inv_gen_default> >
|
||||
|
||||
|
||||
template<typename T1>
|
||||
struct strip_inv< Op<T1, op_inv_sympd> >
|
||||
struct strip_inv< Op<T1, op_inv_spd_default> >
|
||||
{
|
||||
typedef T1 stored_type;
|
||||
|
||||
inline
|
||||
strip_inv(const Op<T1, op_inv_sympd>& X)
|
||||
strip_inv(const Op<T1, op_inv_spd_default>& X)
|
||||
: M(X.m)
|
||||
{
|
||||
arma_extra_debug_sigprint();
|
||||
|
||||
@@ -1225,19 +1225,19 @@ struct has_op_inv_gen_default< Glue<T1, Op<T2,op_inv_gen_default>, glue_times> >
|
||||
|
||||
|
||||
template<typename T1>
|
||||
struct has_op_inv_sympd
|
||||
struct has_op_inv_spd_default
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
template<typename T1>
|
||||
struct has_op_inv_sympd< Op<T1,op_inv_sympd> >
|
||||
struct has_op_inv_spd_default< Op<T1,op_inv_spd_default> >
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
template<typename T1, typename T2>
|
||||
struct has_op_inv_sympd< Glue<Op<T1,op_inv_sympd>, T2, glue_times> >
|
||||
struct has_op_inv_spd_default< Glue<Op<T1,op_inv_spd_default>, T2, glue_times> >
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
template<typename T1, typename T2>
|
||||
struct has_op_inv_sympd< Glue<T1, Op<T2,op_inv_sympd>, glue_times> >
|
||||
struct has_op_inv_spd_default< Glue<T1, Op<T2,op_inv_spd_default>, glue_times> >
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user