revert modified alias checking due to ill-defined use case
This commit is contained in:
@@ -19506,7 +19506,6 @@ List of additions and changes for each version:
|
||||
<ul>
|
||||
<li>faster handling of sparse submatrix column views by <a href="#norm">norm()</a>, <a href="#accu">accu()</a>, <a href="#nonzeros">nonzeros()</a></li>
|
||||
<li>extended <a href="#randu">randu()</a> and <a href="#randn">randn()</a> to allow specification of distribution parameters</li>
|
||||
<li>stricter handling of aliasing involving matrices that directly use auxiliary memory</li>
|
||||
</ul>
|
||||
</li>
|
||||
<br>
|
||||
|
||||
@@ -188,7 +188,7 @@ struct Proxy< Mat<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(Q.mem) == void_ptr(X.mem)): false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&Q) == void_ptr(&X)) : false; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -235,7 +235,7 @@ struct Proxy< Col<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(Q.mem) == void_ptr(X.mem)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&Q) == void_ptr(&X)) : false; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -282,7 +282,7 @@ struct Proxy< Row<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(Q.mem) == void_ptr(X.mem)): false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&Q) == void_ptr(&X)) : false; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -966,7 +966,7 @@ struct Proxy< subview<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(Q.m.mem) == void_ptr(X.mem)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return Q.check_overlap(X); }
|
||||
@@ -1013,7 +1013,7 @@ struct Proxy< subview_col<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(Q.m.mem) == void_ptr(X.mem)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return Q.check_overlap(X); }
|
||||
@@ -1062,7 +1062,7 @@ struct Proxy< subview_cols<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(sv.m.mem) == void_ptr(X.mem)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(sv.m)) == void_ptr(&X)) : false; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return sv.check_overlap(X); }
|
||||
@@ -1109,7 +1109,7 @@ struct Proxy< subview_row<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(Q.m.mem) == void_ptr(X.mem)): false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return Q.check_overlap(X); }
|
||||
@@ -1257,7 +1257,7 @@ struct Proxy< diagview<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(Q.m.mem) == void_ptr(X.mem)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -1313,7 +1313,7 @@ struct Proxy_diagvec_mat< Op<T1, op_diagvec> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(R.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&R) == void_ptr(&X)); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -1490,7 +1490,7 @@ struct Proxy_xtrans_default< Op<T1, op_htrans> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(U.M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return void_ptr(&(U.M)) == void_ptr(&X); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -1531,7 +1531,7 @@ struct Proxy_xtrans_default< Op<T1, op_strans> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(U.M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return void_ptr(&(U.M)) == void_ptr(&X); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -1997,7 +1997,7 @@ struct Proxy< Op< Row< std::complex<T> >, op_htrans> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(src.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return void_ptr(&src) == void_ptr(&X); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -2048,7 +2048,7 @@ struct Proxy< Op< Col< std::complex<T> >, op_htrans> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(src.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return void_ptr(&src) == void_ptr(&X); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -2099,7 +2099,7 @@ struct Proxy< Op< subview_col< std::complex<T> >, op_htrans> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(src.m.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return void_ptr(&src.m) == void_ptr(&X); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -2394,7 +2394,7 @@ struct Proxy_vectorise_col_mat< Op<T1, op_vectorise_col> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(U.M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return ( void_ptr(&X) == void_ptr(&(U.M)) ); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
|
||||
@@ -70,7 +70,7 @@ struct ProxyCube< Cube<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Cube<eT2>& X) const { return (void_ptr(Q.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Cube<eT2>& X) const { return (void_ptr(&Q) == void_ptr(&X)); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview_cube<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -250,7 +250,7 @@ struct ProxyCube< subview_cube<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Cube<eT2>& X) const { return (void_ptr(Q.m.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Cube<eT2>& X) const { return (void_ptr(&(Q.m)) == void_ptr(&X)); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview_cube<eT2>& X) const { return Q.check_overlap(X); }
|
||||
|
||||
@@ -201,7 +201,7 @@ class diagmat_proxy< Mat<eT> >
|
||||
arma_inline elem_type operator[] (const uword i) const { return P_is_vec ? P[i] : P.at(i,i); }
|
||||
arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? ( P_is_vec ? P[row] : P.at(row,row) ) : elem_type(0); }
|
||||
|
||||
arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(P.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&P)); }
|
||||
|
||||
const Mat<eT>& P;
|
||||
const bool P_is_vec;
|
||||
@@ -232,7 +232,7 @@ class diagmat_proxy< Row<eT> >
|
||||
arma_inline elem_type operator[] (const uword i) const { return P[i]; }
|
||||
arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? P[row] : elem_type(0); }
|
||||
|
||||
arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(P.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&P)); }
|
||||
|
||||
static constexpr bool P_is_vec = true;
|
||||
|
||||
@@ -264,7 +264,7 @@ class diagmat_proxy< Col<eT> >
|
||||
arma_inline elem_type operator[] (const uword i) const { return P[i]; }
|
||||
arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? P[row] : elem_type(0); }
|
||||
|
||||
arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(P.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&P)); }
|
||||
|
||||
static constexpr bool P_is_vec = true;
|
||||
|
||||
@@ -296,7 +296,7 @@ class diagmat_proxy< subview_row<eT> >
|
||||
arma_inline elem_type operator[] (const uword i) const { return P[i]; }
|
||||
arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? P[row] : elem_type(0); }
|
||||
|
||||
arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(P.m.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&(P.m))); }
|
||||
|
||||
static constexpr bool P_is_vec = true;
|
||||
|
||||
@@ -328,7 +328,7 @@ class diagmat_proxy< subview_col<eT> >
|
||||
arma_inline elem_type operator[] (const uword i) const { return P[i]; }
|
||||
arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? P[row] : elem_type(0); }
|
||||
|
||||
arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(P.m.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&(P.m))); }
|
||||
|
||||
static constexpr bool P_is_vec = true;
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ struct quasi_unwrap< Mat<eT> >
|
||||
static constexpr bool has_orig_mem = true;
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&M) == void_ptr(&X)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ struct quasi_unwrap< Row<eT> >
|
||||
static constexpr bool has_orig_mem = true;
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&M) == void_ptr(&X)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -348,7 +348,7 @@ struct quasi_unwrap< Col<eT> >
|
||||
static constexpr bool has_orig_mem = true;
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&M) == void_ptr(&X)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ struct quasi_unwrap< subview<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.aux_row1 == 0) && (sv.n_rows == sv.m.n_rows)) ? (void_ptr(sv.m.mem) == void_ptr(X.mem)) : false ); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return ( ((sv.aux_row1 == 0) && (sv.n_rows == sv.m.n_rows)) ? (void_ptr(&(sv.m)) == void_ptr(&X)) : false ); }
|
||||
};
|
||||
|
||||
|
||||
@@ -405,7 +405,7 @@ struct quasi_unwrap< subview_col<eT> >
|
||||
inline
|
||||
quasi_unwrap(const subview_col<eT>& A)
|
||||
: orig( A.m )
|
||||
, M ( const_cast<eT*>( A.colmem ), A.n_rows, false, false )
|
||||
, M ( const_cast<eT*>( A.colmem ), A.n_rows, false, false )
|
||||
{
|
||||
arma_extra_debug_sigprint();
|
||||
}
|
||||
@@ -418,7 +418,7 @@ struct quasi_unwrap< subview_col<eT> >
|
||||
static constexpr bool has_orig_mem = true;
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&orig) == void_ptr(&X)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ struct quasi_unwrap< subview_cols<eT> >
|
||||
static constexpr bool has_orig_mem = true;
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&orig) == void_ptr(&X)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -536,7 +536,7 @@ struct quasi_unwrap< Op<Col<eT>, op_strans> >
|
||||
static constexpr bool has_orig_mem = true;
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&orig) == void_ptr(&X)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -560,7 +560,7 @@ struct quasi_unwrap< Op<Row<eT>, op_strans> >
|
||||
static constexpr bool has_orig_mem = true;
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&orig) == void_ptr(&X)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -584,7 +584,7 @@ struct quasi_unwrap< Op<subview_col<eT>, op_strans> >
|
||||
static constexpr bool has_orig_mem = true;
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&orig)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -616,7 +616,7 @@ struct quasi_unwrap_Col_htrans< Op<Col<eT>, op_htrans> >
|
||||
static constexpr bool has_orig_mem = true;
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&orig) == void_ptr(&X)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -680,7 +680,7 @@ struct quasi_unwrap_Row_htrans< Op<Row<eT>, op_htrans> >
|
||||
static constexpr bool has_orig_mem = true;
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&orig) == void_ptr(&X)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -744,7 +744,7 @@ struct quasi_unwrap_subview_col_htrans< Op<subview_col<eT>, op_htrans> >
|
||||
static constexpr bool has_orig_mem = true;
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&orig) == void_ptr(&X)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1276,7 +1276,7 @@ struct partial_unwrap< Mat<eT> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = false;
|
||||
@@ -1301,7 +1301,7 @@ struct partial_unwrap< Row<eT> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = false;
|
||||
@@ -1326,7 +1326,7 @@ struct partial_unwrap< Col<eT> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = false;
|
||||
@@ -1352,7 +1352,7 @@ struct partial_unwrap< subview<eT> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return ( ((sv.aux_row1 == 0) && (sv.n_rows == sv.m.n_rows)) ? (void_ptr(sv.m.mem) == void_ptr(X.mem)) : false ); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return ( ((sv.aux_row1 == 0) && (sv.n_rows == sv.m.n_rows)) ? (void_ptr(&(sv.m)) == void_ptr(&X)) : false ); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = false;
|
||||
@@ -1379,7 +1379,7 @@ struct partial_unwrap< subview_col<eT> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&orig)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = false;
|
||||
@@ -1406,7 +1406,7 @@ struct partial_unwrap< subview_cols<eT> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&orig)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = false;
|
||||
@@ -1528,7 +1528,7 @@ struct partial_unwrap< Op< Mat<eT>, op_htrans> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = true;
|
||||
static constexpr bool do_times = false;
|
||||
@@ -1553,7 +1553,7 @@ struct partial_unwrap< Op< Row<eT>, op_htrans> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = true;
|
||||
static constexpr bool do_times = false;
|
||||
@@ -1578,7 +1578,7 @@ struct partial_unwrap< Op< Col<eT>, op_htrans> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = true;
|
||||
static constexpr bool do_times = false;
|
||||
@@ -1604,7 +1604,7 @@ struct partial_unwrap< Op< subview<eT>, op_htrans> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return ( ((sv.aux_row1 == 0) && (sv.n_rows == sv.m.n_rows)) ? (void_ptr(sv.m.mem) == void_ptr(X.mem)) : false ); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return ( ((sv.aux_row1 == 0) && (sv.n_rows == sv.m.n_rows)) ? (void_ptr(&(sv.m)) == void_ptr(&X)) : false ); }
|
||||
|
||||
static constexpr bool do_trans = true;
|
||||
static constexpr bool do_times = false;
|
||||
@@ -1631,7 +1631,7 @@ struct partial_unwrap< Op< subview_cols<eT>, op_htrans> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&orig) == void_ptr(&X)); }
|
||||
|
||||
static constexpr bool do_trans = true;
|
||||
static constexpr bool do_times = false;
|
||||
@@ -1658,7 +1658,7 @@ struct partial_unwrap< Op< subview_col<eT>, op_htrans> >
|
||||
constexpr eT get_val() const { return eT(1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&orig)); }
|
||||
|
||||
static constexpr bool do_trans = true;
|
||||
static constexpr bool do_times = false;
|
||||
@@ -1785,7 +1785,7 @@ struct partial_unwrap< Op< Mat<eT>, op_htrans2> >
|
||||
inline eT get_val() const { return val; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = true;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -1812,7 +1812,7 @@ struct partial_unwrap< Op< Row<eT>, op_htrans2> >
|
||||
inline eT get_val() const { return val; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = true;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -1839,7 +1839,7 @@ struct partial_unwrap< Op< Col<eT>, op_htrans2> >
|
||||
inline eT get_val() const { return val; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = true;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -1867,7 +1867,7 @@ struct partial_unwrap< Op< subview<eT>, op_htrans2> >
|
||||
inline eT get_val() const { return val; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return ( ((sv.aux_row1 == 0) && (sv.n_rows == sv.m.n_rows)) ? (void_ptr(sv.m.mem) == void_ptr(X.mem)) : false ); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return ( ((sv.aux_row1 == 0) && (sv.n_rows == sv.m.n_rows)) ? (void_ptr(&(sv.m)) == void_ptr(&X)) : false ); }
|
||||
|
||||
static constexpr bool do_trans = true;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -1896,7 +1896,7 @@ struct partial_unwrap< Op< subview_cols<eT>, op_htrans2> >
|
||||
inline eT get_val() const { return val; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&orig) == void_ptr(&X)); }
|
||||
|
||||
static constexpr bool do_trans = true;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -1925,7 +1925,7 @@ struct partial_unwrap< Op< subview_col<eT>, op_htrans2> >
|
||||
inline eT get_val() const { return val; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&orig)); }
|
||||
|
||||
static constexpr bool do_trans = true;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -2061,7 +2061,7 @@ struct partial_unwrap< eOp<Mat<eT>, eop_scalar_times> >
|
||||
inline eT get_val() const { return val; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -2088,7 +2088,7 @@ struct partial_unwrap< eOp<Row<eT>, eop_scalar_times> >
|
||||
inline eT get_val() const { return val; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -2115,7 +2115,7 @@ struct partial_unwrap< eOp<Col<eT>, eop_scalar_times> >
|
||||
inline eT get_val() const { return val; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -2143,7 +2143,7 @@ struct partial_unwrap< eOp<subview_col<eT>, eop_scalar_times> >
|
||||
arma_inline eT get_val() const { return val; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&orig)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -2274,7 +2274,7 @@ struct partial_unwrap< eOp<Mat<eT>, eop_neg> >
|
||||
constexpr eT get_val() const { return eT(-1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -2299,7 +2299,7 @@ struct partial_unwrap< eOp<Row<eT>, eop_neg> >
|
||||
constexpr eT get_val() const { return eT(-1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -2324,7 +2324,7 @@ struct partial_unwrap< eOp<Col<eT>, eop_neg> >
|
||||
constexpr eT get_val() const { return eT(-1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = true;
|
||||
@@ -2350,7 +2350,7 @@ struct partial_unwrap< eOp<subview_col<eT>, eop_neg> >
|
||||
constexpr eT get_val() const { return eT(-1); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(orig.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&X) == void_ptr(&orig)); }
|
||||
|
||||
static constexpr bool do_trans = false;
|
||||
static constexpr bool do_times = true;
|
||||
|
||||
@@ -54,7 +54,7 @@ struct unwrap_cube< Cube<eT> >
|
||||
const Cube<eT>& M;
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Cube<eT2>& X) const { return (void_ptr(M.mem) == void_ptr(X.mem)); }
|
||||
arma_inline bool is_alias(const Cube<eT2>& X) const { return (void_ptr(&M) == void_ptr(&X)); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user