skip alias check if element types differ
This commit is contained in:
@@ -396,7 +396,7 @@ struct quasi_unwrap< subview_row<eT> >
|
||||
static constexpr bool has_orig_mem = false; // NOTE: set to false as this is the general case; original memory is only used when the subview is a contiguous chunk
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (sv.m.n_rows == 1) ? (void_ptr(&X) == void_ptr(&(sv.m))) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && ((sv.m.n_rows == 1) ? (void_ptr(&X) == void_ptr(&(sv.m))) : false); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1441,7 +1441,7 @@ struct partial_unwrap< subview_row<eT> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (sv.m.n_rows == 1) ? (void_ptr(&X) == void_ptr(&(sv.m))) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && ((sv.m.n_rows == 1) ? (void_ptr(&X) == void_ptr(&(sv.m))) : false); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = false;
|
||||
|
||||
Reference in New Issue
Block a user