Col_bones.hpp   Col_bones.hpp 
skipping to change at line 96 skipping to change at line 96
arma_inline subview_col<eT> rows(const span& row_span); arma_inline subview_col<eT> rows(const span& row_span);
arma_inline const subview_col<eT> rows(const span& row_span) const; arma_inline const subview_col<eT> rows(const span& row_span) const;
arma_inline subview_col<eT> subvec(const span& row_span); arma_inline subview_col<eT> subvec(const span& row_span);
arma_inline const subview_col<eT> subvec(const span& row_span) const; arma_inline const subview_col<eT> subvec(const span& row_span) const;
arma_inline subview_col<eT> operator()(const span& row_span); arma_inline subview_col<eT> operator()(const span& row_span);
arma_inline const subview_col<eT> operator()(const span& row_span) const; arma_inline const subview_col<eT> operator()(const span& row_span) const;
arma_inline subview_col<eT> head(const uword N);
arma_inline const subview_col<eT> head(const uword N) const;
arma_inline subview_col<eT> tail(const uword N);
arma_inline const subview_col<eT> tail(const uword N) const;
inline void shed_row (const uword row_num); inline void shed_row (const uword row_num);
inline void shed_rows(const uword in_row1, const uword in_row2); inline void shed_rows(const uword in_row1, const uword in_row2);
inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero = true); inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero = true);
template<typename T1> inline void insert_rows(const uword row_num, const Base<eT,T1>& X); template<typename T1> inline void insert_rows(const uword row_num, const Base<eT,T1>& X);
arma_inline arma_warn_unused eT& at(const uword i); arma_inline arma_warn_unused eT& at(const uword i);
arma_inline arma_warn_unused const eT& at(const uword i) const; arma_inline arma_warn_unused const eT& at(const uword i) const;
arma_inline arma_warn_unused eT& at(const uword in_row, const uword in_col); arma_inline arma_warn_unused eT& at(const uword in_row, const uword in_col);
 End of changes. 1 change blocks. 
0 lines changed or deleted 6 lines changed or added


 Col_meat.hpp   Col_meat.hpp 
skipping to change at line 611 skipping to change at line 611
template<typename eT> template<typename eT>
arma_inline arma_inline
const subview_col<eT> const subview_col<eT>
Col<eT>::operator()(const span& row_span) const Col<eT>::operator()(const span& row_span) const
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return subvec(row_span); return subvec(row_span);
} }
template<typename eT>
arma_inline
subview_col<eT>
Col<eT>::head(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_rows), "Col::head(): size out of bounds
");
return subview_col<eT>(*this, 0, 0, N);
}
template<typename eT>
arma_inline
const subview_col<eT>
Col<eT>::head(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_rows), "Col::head(): size out of bounds
");
return subview_col<eT>(*this, 0, 0, N);
}
template<typename eT>
arma_inline
subview_col<eT>
Col<eT>::tail(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_rows), "Col::tail(): size out of bounds
");
const uword start_row = Mat<eT>::n_rows - N;
return subview_col<eT>(*this, 0, start_row, N);
}
template<typename eT>
arma_inline
const subview_col<eT>
Col<eT>::tail(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_rows), "Col::tail(): size out of bounds
");
const uword start_row = Mat<eT>::n_rows - N;
return subview_col<eT>(*this, 0, start_row, N);
}
//! remove specified row //! remove specified row
template<typename eT> template<typename eT>
inline inline
void void
Col<eT>::shed_row(const uword row_num) Col<eT>::shed_row(const uword row_num)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( row_num >= Mat<eT>::n_rows, "Col::shed_row(): index out of bounds"); arma_debug_check( row_num >= Mat<eT>::n_rows, "Col::shed_row(): index out of bounds");
 End of changes. 1 change blocks. 
0 lines changed or deleted 56 lines changed or added


 Mat_bones.hpp   Mat_bones.hpp 
skipping to change at line 359 skipping to change at line 359
template<typename eT2, typename expr> template<typename eT2, typename expr>
inline void copy_size(const Base<eT2,expr>& X); inline void copy_size(const Base<eT2,expr>& X);
inline void set_size(const uword in_elem); inline void set_size(const uword in_elem);
inline void set_size(const uword in_rows, const uword in_cols); inline void set_size(const uword in_rows, const uword in_cols);
inline void resize(const uword in_elem); inline void resize(const uword in_elem);
inline void resize(const uword in_rows, const uword in_cols); inline void resize(const uword in_rows, const uword in_cols);
inline void reshape(const uword in_rows, const uword in_cols, const uwor inline void reshape(const uword in_rows, const uword in_cols);
d dim = 0); inline void reshape(const uword in_rows, const uword in_cols, const uwor
d dim);
template<typename functor> template<typename functor>
inline const Mat& transform(functor F); inline const Mat& transform(functor F);
template<typename functor> template<typename functor>
inline const Mat& imbue(functor F); inline const Mat& imbue(functor F);
arma_hot inline const Mat& fill(const eT val); arma_hot inline const Mat& fill(const eT val);
template<typename fill_type> template<typename fill_type>
 End of changes. 1 change blocks. 
2 lines changed or deleted 3 lines changed or added


 Mat_meat.hpp   Mat_meat.hpp 
skipping to change at line 4947 skipping to change at line 4947
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
*this = arma::resize(*this, in_rows, in_cols); *this = arma::resize(*this, in_rows, in_cols);
} }
//! change the matrix to have user specified dimensions (data is preserved) //! change the matrix to have user specified dimensions (data is preserved)
template<typename eT> template<typename eT>
inline inline
void void
Mat<eT>::reshape(const uword in_rows, const uword in_cols)
{
arma_extra_debug_sigprint();
*this = arma::reshape(*this, in_rows, in_cols);
}
//!< don't use this in new code; kept only for compatibility with old code
template<typename eT>
inline
void
Mat<eT>::reshape(const uword in_rows, const uword in_cols, const uword dim) Mat<eT>::reshape(const uword in_rows, const uword in_cols, const uword dim)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
*this = arma::reshape(*this, in_rows, in_cols, dim); *this = arma::reshape(*this, in_rows, in_cols, dim);
} }
//! change the matrix (without preserving data) to have the same dimensions as the given expression //! change the matrix (without preserving data) to have the same dimensions as the given expression
template<typename eT> template<typename eT>
template<typename eT2, typename expr> template<typename eT2, typename expr>
 End of changes. 1 change blocks. 
0 lines changed or deleted 11 lines changed or added


 Proxy.hpp   Proxy.hpp 
skipping to change at line 34 skipping to change at line 34
struct Proxy_fixed struct Proxy_fixed
{ {
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef T1 stored_type; typedef T1 stored_type;
typedef const elem_type* ea_type; typedef const elem_type* ea_type;
typedef const T1& aligned_ea_type; typedef const T1& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = true;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = T1::is_row; static const bool is_row = T1::is_row;
static const bool is_col = T1::is_col; static const bool is_col = T1::is_col;
arma_aligned const T1& Q; arma_aligned const T1& Q;
inline explicit Proxy_fixed(const T1& A) inline explicit Proxy_fixed(const T1& A)
: Q(A) : Q(A)
{ {
skipping to change at line 104 skipping to change at line 103
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
typedef const eT* ea_type; typedef const eT* ea_type;
typedef const Mat<eT>& aligned_ea_type; typedef const Mat<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = false; static const bool is_col = false;
arma_aligned const Mat<eT>& Q; arma_aligned const Mat<eT>& Q;
inline explicit Proxy(const Mat<eT>& A) inline explicit Proxy(const Mat<eT>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 148 skipping to change at line 146
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Col<eT> stored_type; typedef Col<eT> stored_type;
typedef const eT* ea_type; typedef const eT* ea_type;
typedef const Col<eT>& aligned_ea_type; typedef const Col<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const Col<eT>& Q; arma_aligned const Col<eT>& Q;
inline explicit Proxy(const Col<eT>& A) inline explicit Proxy(const Col<eT>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 192 skipping to change at line 189
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Row<eT> stored_type; typedef Row<eT> stored_type;
typedef const eT* ea_type; typedef const eT* ea_type;
typedef const Row<eT>& aligned_ea_type; typedef const Row<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = true; static const bool is_row = true;
static const bool is_col = false; static const bool is_col = false;
arma_aligned const Row<eT>& Q; arma_aligned const Row<eT>& Q;
inline explicit Proxy(const Row<eT>& A) inline explicit Proxy(const Row<eT>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 236 skipping to change at line 232
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Gen<T1, gen_type> stored_type; typedef Gen<T1, gen_type> stored_type;
typedef const Gen<T1, gen_type>& ea_type; typedef const Gen<T1, gen_type>& ea_type;
typedef const Gen<T1, gen_type>& aligned_ea_type; typedef const Gen<T1, gen_type>& aligned_ea_type;
static const bool prefer_at_accessor = Gen<T1, gen_type>::prefer_at_acces sor; static const bool prefer_at_accessor = Gen<T1, gen_type>::prefer_at_acces sor;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = Gen<T1, gen_type>::is_row; static const bool is_row = Gen<T1, gen_type>::is_row;
static const bool is_col = Gen<T1, gen_type>::is_col; static const bool is_col = Gen<T1, gen_type>::is_col;
arma_aligned const Gen<T1, gen_type>& Q; arma_aligned const Gen<T1, gen_type>& Q;
inline explicit Proxy(const Gen<T1, gen_type>& A) inline explicit Proxy(const Gen<T1, gen_type>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 280 skipping to change at line 275
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<elem_type> stored_type; typedef Mat<elem_type> stored_type;
typedef const elem_type* ea_type; typedef const elem_type* ea_type;
typedef const Mat<elem_type>& aligned_ea_type; typedef const Mat<elem_type>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = Op<T1, op_type>::is_row; static const bool is_row = Op<T1, op_type>::is_row;
static const bool is_col = Op<T1, op_type>::is_col; static const bool is_col = Op<T1, op_type>::is_col;
arma_aligned const Mat<elem_type> Q; arma_aligned const Mat<elem_type> Q;
inline explicit Proxy(const Op<T1, op_type>& A) inline explicit Proxy(const Op<T1, op_type>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 330 skipping to change at line 324
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef diagview<elem_type> stored_type; typedef diagview<elem_type> stored_type;
typedef const diagview<elem_type>& ea_type; typedef const diagview<elem_type>& ea_type;
typedef const diagview<elem_type>& aligned_ea_type; typedef const diagview<elem_type>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const Mat<elem_type>& R; arma_aligned const Mat<elem_type>& R;
arma_aligned const diagview<elem_type> Q; arma_aligned const diagview<elem_type> Q;
inline explicit Proxy_diagvec_mat(const Op<T1, op_diagvec>& A) inline explicit Proxy_diagvec_mat(const Op<T1, op_diagvec>& A)
: R(A.m), Q( R.diag( (A.aux_uword_b > 0) ? -sword(A.aux_uword_a) : swor d(A.aux_uword_a) ) ) : R(A.m), Q( R.diag( (A.aux_uword_b > 0) ? -sword(A.aux_uword_a) : swor d(A.aux_uword_a) ) )
skipping to change at line 381 skipping to change at line 374
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<elem_type> stored_type; typedef Mat<elem_type> stored_type;
typedef const elem_type* ea_type; typedef const elem_type* ea_type;
typedef const Mat<elem_type>& aligned_ea_type; typedef const Mat<elem_type>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const Mat<elem_type> Q; arma_aligned const Mat<elem_type> Q;
inline explicit Proxy_diagvec_expr(const Op<T1, op_diagvec>& A) inline explicit Proxy_diagvec_expr(const Op<T1, op_diagvec>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 455 skipping to change at line 447
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef xtrans_mat<elem_type,true> stored_type; typedef xtrans_mat<elem_type,true> stored_type;
typedef const xtrans_mat<elem_type,true>& ea_type; typedef const xtrans_mat<elem_type,true>& ea_type;
typedef const xtrans_mat<elem_type,true>& aligned_ea_type; typedef const xtrans_mat<elem_type,true>& aligned_ea_type;
static const bool prefer_at_accessor = true; static const bool prefer_at_accessor = true;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = false; static const bool is_col = false;
const unwrap<T1> U; const unwrap<T1> U;
const xtrans_mat<elem_type,true> Q; const xtrans_mat<elem_type,true> Q;
inline explicit Proxy_xtrans_default(const Op<T1, op_htrans>& A) inline explicit Proxy_xtrans_default(const Op<T1, op_htrans>& A)
: U(A.m) : U(A.m)
skipping to change at line 493 skipping to change at line 484
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef xtrans_mat<elem_type,false> stored_type; typedef xtrans_mat<elem_type,false> stored_type;
typedef const xtrans_mat<elem_type,false>& ea_type; typedef const xtrans_mat<elem_type,false>& ea_type;
typedef const xtrans_mat<elem_type,false>& aligned_ea_type; typedef const xtrans_mat<elem_type,false>& aligned_ea_type;
static const bool prefer_at_accessor = true; static const bool prefer_at_accessor = true;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = false; static const bool is_col = false;
const unwrap<T1> U; const unwrap<T1> U;
const xtrans_mat<elem_type,false> Q; const xtrans_mat<elem_type,false> Q;
inline explicit Proxy_xtrans_default(const Op<T1, op_strans>& A) inline explicit Proxy_xtrans_default(const Op<T1, op_strans>& A)
: U(A.m) : U(A.m)
skipping to change at line 535 skipping to change at line 525
struct Proxy_xtrans_vector< Op<T1, op_htrans> > struct Proxy_xtrans_vector< Op<T1, op_htrans> >
{ {
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<elem_type> stored_type; typedef Mat<elem_type> stored_type;
typedef const elem_type* ea_type; typedef const elem_type* ea_type;
typedef const Mat<elem_type>& aligned_ea_type; typedef const Mat<elem_type>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = quasi_unwrap<T1>::has_subview; static const bool has_subview = quasi_unwrap<T1>::has_subview;
static const bool is_fixed = false;
static const bool fake_mat = true; static const bool fake_mat = true;
// NOTE: the Op class takes care of swapping row and col for op_htrans // NOTE: the Op class takes care of swapping row and col for op_htrans
static const bool is_row = Op<T1, op_htrans>::is_row; static const bool is_row = Op<T1, op_htrans>::is_row;
static const bool is_col = Op<T1, op_htrans>::is_col; static const bool is_col = Op<T1, op_htrans>::is_col;
arma_aligned const quasi_unwrap<T1> U; // avoid copy if T1 is a Row, Col or subview_col arma_aligned const quasi_unwrap<T1> U; // avoid copy if T1 is a Row, Col or subview_col
arma_aligned const Mat<elem_type> Q; arma_aligned const Mat<elem_type> Q;
inline Proxy_xtrans_vector(const Op<T1, op_htrans>& A) inline Proxy_xtrans_vector(const Op<T1, op_htrans>& A)
skipping to change at line 572 skipping to change at line 561
struct Proxy_xtrans_vector< Op<T1, op_strans> > struct Proxy_xtrans_vector< Op<T1, op_strans> >
{ {
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<elem_type> stored_type; typedef Mat<elem_type> stored_type;
typedef const elem_type* ea_type; typedef const elem_type* ea_type;
typedef const Mat<elem_type>& aligned_ea_type; typedef const Mat<elem_type>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = quasi_unwrap<T1>::has_subview; static const bool has_subview = quasi_unwrap<T1>::has_subview;
static const bool is_fixed = false;
static const bool fake_mat = true; static const bool fake_mat = true;
// NOTE: the Op class takes care of swapping row and col for op_htrans // NOTE: the Op class takes care of swapping row and col for op_htrans
static const bool is_row = Op<T1, op_htrans>::is_row; static const bool is_row = Op<T1, op_htrans>::is_row;
static const bool is_col = Op<T1, op_htrans>::is_col; static const bool is_col = Op<T1, op_htrans>::is_col;
arma_aligned const quasi_unwrap<T1> U; // avoid copy if T1 is a Row, Col or subview_col arma_aligned const quasi_unwrap<T1> U; // avoid copy if T1 is a Row, Col or subview_col
arma_aligned const Mat<elem_type> Q; arma_aligned const Mat<elem_type> Q;
inline Proxy_xtrans_vector(const Op<T1, op_strans>& A) inline Proxy_xtrans_vector(const Op<T1, op_strans>& A)
skipping to change at line 635 skipping to change at line 623
Proxy_xtrans; Proxy_xtrans;
typedef typename Proxy_xtrans::elem_type elem_type; typedef typename Proxy_xtrans::elem_type elem_type;
typedef typename Proxy_xtrans::pod_type pod_type; typedef typename Proxy_xtrans::pod_type pod_type;
typedef typename Proxy_xtrans::stored_type stored_type; typedef typename Proxy_xtrans::stored_type stored_type;
typedef typename Proxy_xtrans::ea_type ea_type; typedef typename Proxy_xtrans::ea_type ea_type;
typedef typename Proxy_xtrans::aligned_ea_type aligned_ea_type; typedef typename Proxy_xtrans::aligned_ea_type aligned_ea_type;
static const bool prefer_at_accessor = Proxy_xtrans::prefer_at_accessor; static const bool prefer_at_accessor = Proxy_xtrans::prefer_at_accessor;
static const bool has_subview = Proxy_xtrans::has_subview; static const bool has_subview = Proxy_xtrans::has_subview;
static const bool is_fixed = Proxy_xtrans::is_fixed;
static const bool fake_mat = Proxy_xtrans::fake_mat; static const bool fake_mat = Proxy_xtrans::fake_mat;
static const bool is_row = Proxy_xtrans::is_row; static const bool is_row = Proxy_xtrans::is_row;
static const bool is_col = Proxy_xtrans::is_col; static const bool is_col = Proxy_xtrans::is_col;
using Proxy_xtrans::Q; using Proxy_xtrans::Q;
inline explicit Proxy(const Op<T1, op_htrans>& A) inline explicit Proxy(const Op<T1, op_htrans>& A)
: Proxy_xtrans(A) : Proxy_xtrans(A)
{ {
skipping to change at line 694 skipping to change at line 681
Proxy_xtrans; Proxy_xtrans;
typedef typename Proxy_xtrans::elem_type elem_type; typedef typename Proxy_xtrans::elem_type elem_type;
typedef typename Proxy_xtrans::pod_type pod_type; typedef typename Proxy_xtrans::pod_type pod_type;
typedef typename Proxy_xtrans::stored_type stored_type; typedef typename Proxy_xtrans::stored_type stored_type;
typedef typename Proxy_xtrans::ea_type ea_type; typedef typename Proxy_xtrans::ea_type ea_type;
typedef typename Proxy_xtrans::aligned_ea_type aligned_ea_type; typedef typename Proxy_xtrans::aligned_ea_type aligned_ea_type;
static const bool prefer_at_accessor = Proxy_xtrans::prefer_at_accessor; static const bool prefer_at_accessor = Proxy_xtrans::prefer_at_accessor;
static const bool has_subview = Proxy_xtrans::has_subview; static const bool has_subview = Proxy_xtrans::has_subview;
static const bool is_fixed = Proxy_xtrans::is_fixed;
static const bool fake_mat = Proxy_xtrans::fake_mat; static const bool fake_mat = Proxy_xtrans::fake_mat;
static const bool is_row = Proxy_xtrans::is_row; static const bool is_row = Proxy_xtrans::is_row;
static const bool is_col = Proxy_xtrans::is_col; static const bool is_col = Proxy_xtrans::is_col;
using Proxy_xtrans::Q; using Proxy_xtrans::Q;
inline explicit Proxy(const Op<T1, op_strans>& A) inline explicit Proxy(const Op<T1, op_strans>& A)
: Proxy_xtrans(A) : Proxy_xtrans(A)
{ {
skipping to change at line 736 skipping to change at line 722
struct Proxy_subview_row_htrans_cx struct Proxy_subview_row_htrans_cx
{ {
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<eT>::result pod_type; typedef typename get_pod_type<eT>::result pod_type;
typedef subview_row_htrans<eT> stored_type; typedef subview_row_htrans<eT> stored_type;
typedef const subview_row_htrans<eT>& ea_type; typedef const subview_row_htrans<eT>& ea_type;
typedef const subview_row_htrans<eT>& aligned_ea_type; typedef const subview_row_htrans<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const subview_row_htrans<eT> Q; arma_aligned const subview_row_htrans<eT> Q;
inline explicit Proxy_subview_row_htrans_cx(const Op<subview_row<eT>, op_ htrans>& A) inline explicit Proxy_subview_row_htrans_cx(const Op<subview_row<eT>, op_ htrans>& A)
: Q(A.m) : Q(A.m)
{ {
skipping to change at line 765 skipping to change at line 750
struct Proxy_subview_row_htrans_non_cx struct Proxy_subview_row_htrans_non_cx
{ {
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<eT>::result pod_type; typedef typename get_pod_type<eT>::result pod_type;
typedef subview_row_strans<eT> stored_type; typedef subview_row_strans<eT> stored_type;
typedef const subview_row_strans<eT>& ea_type; typedef const subview_row_strans<eT>& ea_type;
typedef const subview_row_strans<eT>& aligned_ea_type; typedef const subview_row_strans<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const subview_row_strans<eT> Q; arma_aligned const subview_row_strans<eT> Q;
inline explicit Proxy_subview_row_htrans_non_cx(const Op<subview_row<eT>, op_htrans>& A) inline explicit Proxy_subview_row_htrans_non_cx(const Op<subview_row<eT>, op_htrans>& A)
: Q(A.m) : Q(A.m)
{ {
skipping to change at line 820 skipping to change at line 804
Proxy_sv_row_ht; Proxy_sv_row_ht;
typedef typename Proxy_sv_row_ht::elem_type elem_type; typedef typename Proxy_sv_row_ht::elem_type elem_type;
typedef typename Proxy_sv_row_ht::pod_type pod_type; typedef typename Proxy_sv_row_ht::pod_type pod_type;
typedef typename Proxy_sv_row_ht::stored_type stored_type; typedef typename Proxy_sv_row_ht::stored_type stored_type;
typedef typename Proxy_sv_row_ht::ea_type ea_type; typedef typename Proxy_sv_row_ht::ea_type ea_type;
typedef typename Proxy_sv_row_ht::ea_type aligned_ea_type; typedef typename Proxy_sv_row_ht::ea_type aligned_ea_type;
static const bool prefer_at_accessor = Proxy_sv_row_ht::prefer_at_accesso r; static const bool prefer_at_accessor = Proxy_sv_row_ht::prefer_at_accesso r;
static const bool has_subview = Proxy_sv_row_ht::has_subview; static const bool has_subview = Proxy_sv_row_ht::has_subview;
static const bool is_fixed = Proxy_sv_row_ht::is_fixed;
static const bool fake_mat = Proxy_sv_row_ht::fake_mat; static const bool fake_mat = Proxy_sv_row_ht::fake_mat;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
using Proxy_sv_row_ht::Q; using Proxy_sv_row_ht::Q;
inline explicit Proxy(const Op<subview_row<eT>, op_htrans>& A) inline explicit Proxy(const Op<subview_row<eT>, op_htrans>& A)
: Proxy_sv_row_ht(A) : Proxy_sv_row_ht(A)
{ {
skipping to change at line 864 skipping to change at line 847
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<eT>::result pod_type; typedef typename get_pod_type<eT>::result pod_type;
typedef subview_row_strans<eT> stored_type; typedef subview_row_strans<eT> stored_type;
typedef const subview_row_strans<eT>& ea_type; typedef const subview_row_strans<eT>& ea_type;
typedef const subview_row_strans<eT>& aligned_ea_type; typedef const subview_row_strans<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const subview_row_strans<eT> Q; arma_aligned const subview_row_strans<eT> Q;
inline explicit Proxy(const Op<subview_row<eT>, op_strans>& A) inline explicit Proxy(const Op<subview_row<eT>, op_strans>& A)
: Q(A.m) : Q(A.m)
{ {
skipping to change at line 910 skipping to change at line 892
typedef typename std::complex<T> eT; typedef typename std::complex<T> eT;
typedef typename std::complex<T> elem_type; typedef typename std::complex<T> elem_type;
typedef T pod_type; typedef T pod_type;
typedef xvec_htrans<eT> stored_type; typedef xvec_htrans<eT> stored_type;
typedef const xvec_htrans<eT>& ea_type; typedef const xvec_htrans<eT>& ea_type;
typedef const xvec_htrans<eT>& aligned_ea_type; typedef const xvec_htrans<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
const xvec_htrans<eT> Q; const xvec_htrans<eT> Q;
const Row<eT>& src; const Row<eT>& src;
inline explicit Proxy(const Op< Row< std::complex<T> >, op_htrans>& A) inline explicit Proxy(const Op< Row< std::complex<T> >, op_htrans>& A)
: Q (A.m.memptr(), A.m.n_rows, A.m.n_cols) : Q (A.m.memptr(), A.m.n_rows, A.m.n_cols)
skipping to change at line 958 skipping to change at line 939
typedef typename std::complex<T> eT; typedef typename std::complex<T> eT;
typedef typename std::complex<T> elem_type; typedef typename std::complex<T> elem_type;
typedef T pod_type; typedef T pod_type;
typedef xvec_htrans<eT> stored_type; typedef xvec_htrans<eT> stored_type;
typedef const xvec_htrans<eT>& ea_type; typedef const xvec_htrans<eT>& ea_type;
typedef const xvec_htrans<eT>& aligned_ea_type; typedef const xvec_htrans<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = true; static const bool is_row = true;
static const bool is_col = false; static const bool is_col = false;
const xvec_htrans<eT> Q; const xvec_htrans<eT> Q;
const Col<eT>& src; const Col<eT>& src;
inline explicit Proxy(const Op< Col< std::complex<T> >, op_htrans>& A) inline explicit Proxy(const Op< Col< std::complex<T> >, op_htrans>& A)
: Q (A.m.memptr(), A.m.n_rows, A.m.n_cols) : Q (A.m.memptr(), A.m.n_rows, A.m.n_cols)
skipping to change at line 1006 skipping to change at line 986
typedef typename std::complex<T> eT; typedef typename std::complex<T> eT;
typedef typename std::complex<T> elem_type; typedef typename std::complex<T> elem_type;
typedef T pod_type; typedef T pod_type;
typedef xvec_htrans<eT> stored_type; typedef xvec_htrans<eT> stored_type;
typedef const xvec_htrans<eT>& ea_type; typedef const xvec_htrans<eT>& ea_type;
typedef const xvec_htrans<eT>& aligned_ea_type; typedef const xvec_htrans<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = true; static const bool is_row = true;
static const bool is_col = false; static const bool is_col = false;
const xvec_htrans<eT> Q; const xvec_htrans<eT> Q;
const subview_col<eT>& src; const subview_col<eT>& src;
inline explicit Proxy(const Op< subview_col< std::complex<T> >, op_htrans >& A) inline explicit Proxy(const Op< subview_col< std::complex<T> >, op_htrans >& A)
: Q (A.m.colptr(0), A.m.n_rows, A.m.n_cols) : Q (A.m.colptr(0), A.m.n_rows, A.m.n_cols)
skipping to change at line 1040 skipping to change at line 1019
arma_inline ea_type get_ea() const { return Q; } arma_inline ea_type get_ea() const { return Q; }
arma_inline aligned_ea_type get_aligned_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
template<typename eT2> template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return void_ptr(&src .m) == void_ptr(&X); } arma_inline bool is_alias(const Mat<eT2>& X) const { return void_ptr(&src .m) == void_ptr(&X); }
arma_inline bool is_aligned() const { return false; } arma_inline bool is_aligned() const { return false; }
}; };
template<typename T1> template<typename T1>
struct Proxy_htrans2_default class Proxy< Op<T1, op_htrans2> >
{
typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<elem_type> stored_type;
typedef const elem_type* ea_type;
typedef const Mat<elem_type>& aligned_ea_type;
static const bool prefer_at_accessor = false;
static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false;
static const bool is_row = false;
static const bool is_col = false;
arma_aligned const Mat<elem_type> Q;
arma_hot
inline Proxy_htrans2_default(const T1& A)
: Q(A)
{
arma_extra_debug_sigprint();
}
arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline ea_type get_ea() const { return Q.memptr(); }
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr(
)); }
};
template<typename T1>
struct Proxy_htrans2_vector
{
inline Proxy_htrans2_vector(const T1&) {}
};
template<typename T1>
struct Proxy_htrans2_vector< Op<T1, op_htrans2> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef eOp< Op<T1, op_htrans>, eop_scalar_times> stored_type; typedef eOp< Op<T1, op_htrans>, eop_scalar_times> stored_type;
typedef const eOp< Op<T1, op_htrans>, eop_scalar_times>& ea_type; typedef const eOp< Op<T1, op_htrans>, eop_scalar_times>& ea_type;
typedef const eOp< Op<T1, op_htrans>, eop_scalar_times>& aligned_ea_type; typedef const eOp< Op<T1, op_htrans>, eop_scalar_times>& aligned_ea_type;
static const bool prefer_at_accessor = eOp< Op<T1, op_htrans>, eop_scalar _times>::prefer_at_accessor; static const bool prefer_at_accessor = eOp< Op<T1, op_htrans>, eop_scalar _times>::prefer_at_accessor;
static const bool has_subview = eOp< Op<T1, op_htrans>, eop_scalar _times>::has_subview; static const bool has_subview = eOp< Op<T1, op_htrans>, eop_scalar _times>::has_subview;
static const bool is_fixed = eOp< Op<T1, op_htrans>, eop_scalar _times>::is_fixed;
static const bool fake_mat = eOp< Op<T1, op_htrans>, eop_scalar _times>::fake_mat; static const bool fake_mat = eOp< Op<T1, op_htrans>, eop_scalar _times>::fake_mat;
// NOTE: the Op class takes care of swapping row and col for op_htrans // NOTE: the Op class takes care of swapping row and col for op_htrans
static const bool is_row = eOp< Op<T1, op_htrans>, eop_scalar_times>::is_ row; static const bool is_row = eOp< Op<T1, op_htrans>, eop_scalar_times>::is_ row;
static const bool is_col = eOp< Op<T1, op_htrans>, eop_scalar_times>::is_ col; static const bool is_col = eOp< Op<T1, op_htrans>, eop_scalar_times>::is_ col;
arma_aligned const Op<T1, op_htrans> R; arma_aligned const Op<T1, op_htrans> R;
arma_aligned const eOp< Op<T1, op_htrans>, eop_scalar_times > Q; arma_aligned const eOp< Op<T1, op_htrans>, eop_scalar_times > Q;
inline explicit Proxy_htrans2_vector(const Op<T1, op_htrans2>& A) inline explicit Proxy(const Op<T1, op_htrans2>& A)
: R(A.m) : R(A.m)
, Q(R, A.aux) , Q(R, A.aux)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return is_row ? 1 : Q.get_n_rows() ; } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.get_n_rows() ; }
arma_inline uword get_n_cols() const { return is_col ? 1 : Q.get_n_cols() ; } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.get_n_cols() ; }
arma_inline uword get_n_elem() const { return Q.get_n_elem(); } arma_inline uword get_n_elem() const { return Q.get_n_elem(); }
arma_inline ea_type get_ea() const { return Q; }
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 Q.P.is_alias(
X); }
arma_inline bool is_aligned() const { return Q.P.is_aligned(); }
};
template<typename T1, bool condition>
struct Proxy_htrans2_redirect {};
template<typename T1>
struct Proxy_htrans2_redirect<T1, false> { typedef Proxy_htrans2_default<T1
> result; };
template<typename T1>
struct Proxy_htrans2_redirect<T1, true> { typedef Proxy_htrans2_vector<T1>
result; };
template<typename T1>
class Proxy< Op<T1, op_htrans2> >
: public
Proxy_htrans2_redirect
<
Op<T1, op_htrans2>,
( (Op<T1, op_htrans2>::is_row) || (Op<T1, op_htrans2>::is_col) )
>::result
{
public:
typedef
typename
Proxy_htrans2_redirect
<
Op<T1, op_htrans2>,
( (Op<T1, op_htrans2>::is_row) || (Op<T1, op_htrans2>::is_col) )
>::result
Proxy_htrans2;
typedef typename Proxy_htrans2::elem_type elem_type;
typedef typename Proxy_htrans2::pod_type pod_type;
typedef typename Proxy_htrans2::stored_type stored_type;
typedef typename Proxy_htrans2::ea_type ea_type;
typedef typename Proxy_htrans2::aligned_ea_type aligned_ea_type;
static const bool prefer_at_accessor = Proxy_htrans2::prefer_at_accessor;
static const bool has_subview = Proxy_htrans2::has_subview;
static const bool is_fixed = Proxy_htrans2::is_fixed;
static const bool fake_mat = Proxy_htrans2::fake_mat;
static const bool is_row = Proxy_htrans2::is_row;
static const bool is_col = Proxy_htrans2::is_col;
using Proxy_htrans2::Q;
inline explicit Proxy(const Op<T1, op_htrans2>& A)
: Proxy_htrans2(A)
{
arma_extra_debug_sigprint();
}
arma_inline uword get_n_rows() const { return Proxy_htrans2::get_n_rows()
; }
arma_inline uword get_n_cols() const { return Proxy_htrans2::get_n_cols()
; }
arma_inline uword get_n_elem() const { return Proxy_htrans2::get_n_elem()
; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); }
arma_inline ea_type get_ea() const { return Proxy_htrans2 arma_inline ea_type get_ea() const { return Q; }
::get_ea(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
arma_inline aligned_ea_type get_aligned_ea() const { return Proxy_htrans2
::get_aligned_ea(); }
template<typename eT2> template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return Proxy_htrans2 ::is_alias(X); } arma_inline bool is_alias(const Mat<eT2>& X) const { return Q.P.is_alias( X); }
arma_inline bool is_aligned() const { return Proxy_htrans2::is_aligned(); } arma_inline bool is_aligned() const { return Q.P.is_aligned(); }
}; };
template<typename T1> template<typename T1>
class Proxy< Op<T1, op_vectorise_col> > class Proxy< Op<T1, op_vectorise_col> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<elem_type> stored_type; typedef Mat<elem_type> stored_type;
typedef const elem_type* ea_type; typedef const elem_type* ea_type;
typedef const Mat<elem_type>& aligned_ea_type; typedef const Mat<elem_type>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = true; static const bool fake_mat = true;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const unwrap<T1> U; arma_aligned const unwrap<T1> U;
arma_aligned const Mat<elem_type> Q; arma_aligned const Mat<elem_type> Q;
inline explicit Proxy(const Op<T1, op_vectorise_col>& A) inline explicit Proxy(const Op<T1, op_vectorise_col>& A)
: U(A.m) : U(A.m)
skipping to change at line 1254 skipping to change at line 1122
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<elem_type> stored_type; typedef Mat<elem_type> stored_type;
typedef const elem_type* ea_type; typedef const elem_type* ea_type;
typedef const Mat<elem_type>& aligned_ea_type; typedef const Mat<elem_type>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = true; static const bool fake_mat = true;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const unwrap_cube<T1> U; arma_aligned const unwrap_cube<T1> U;
arma_aligned const Mat<elem_type> Q; arma_aligned const Mat<elem_type> Q;
inline explicit Proxy(const Op<T1, op_vectorise_cube_col>& A) inline explicit Proxy(const Op<T1, op_vectorise_cube_col>& A)
: U(A.m) : U(A.m)
skipping to change at line 1300 skipping to change at line 1167
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<elem_type> stored_type; typedef Mat<elem_type> stored_type;
typedef const elem_type* ea_type; typedef const elem_type* ea_type;
typedef const Mat<elem_type>& aligned_ea_type; typedef const Mat<elem_type>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = Glue<T1, T2, glue_type>::is_row; static const bool is_row = Glue<T1, T2, glue_type>::is_row;
static const bool is_col = Glue<T1, T2, glue_type>::is_col; static const bool is_col = Glue<T1, T2, glue_type>::is_col;
arma_aligned const Mat<elem_type> Q; arma_aligned const Mat<elem_type> Q;
inline explicit Proxy(const Glue<T1, T2, glue_type>& A) inline explicit Proxy(const Glue<T1, T2, glue_type>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1344 skipping to change at line 1210
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef subview<eT> stored_type; typedef subview<eT> stored_type;
typedef const subview<eT>& ea_type; typedef const subview<eT>& ea_type;
typedef const subview<eT>& aligned_ea_type; typedef const subview<eT>& aligned_ea_type;
static const bool prefer_at_accessor = true; static const bool prefer_at_accessor = true;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = false; static const bool is_col = false;
arma_aligned const subview<eT>& Q; arma_aligned const subview<eT>& Q;
inline explicit Proxy(const subview<eT>& A) inline explicit Proxy(const subview<eT>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1388 skipping to change at line 1253
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef subview_col<eT> stored_type; typedef subview_col<eT> stored_type;
typedef const eT* ea_type; typedef const eT* ea_type;
typedef const subview_col<eT>& aligned_ea_type; typedef const subview_col<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const subview_col<eT>& Q; arma_aligned const subview_col<eT>& Q;
inline explicit Proxy(const subview_col<eT>& A) inline explicit Proxy(const subview_col<eT>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1432 skipping to change at line 1296
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef subview_row<eT> stored_type; typedef subview_row<eT> stored_type;
typedef const subview_row<eT>& ea_type; typedef const subview_row<eT>& ea_type;
typedef const subview_row<eT>& aligned_ea_type; typedef const subview_row<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = true; static const bool is_row = true;
static const bool is_col = false; static const bool is_col = false;
arma_aligned const subview_row<eT>& Q; arma_aligned const subview_row<eT>& Q;
inline explicit Proxy(const subview_row<eT>& A) inline explicit Proxy(const subview_row<eT>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1476 skipping to change at line 1339
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef subview_row_strans<eT> stored_type; typedef subview_row_strans<eT> stored_type;
typedef const subview_row_strans<eT>& ea_type; typedef const subview_row_strans<eT>& ea_type;
typedef const subview_row_strans<eT>& aligned_ea_type; typedef const subview_row_strans<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const subview_row_strans<eT>& Q; arma_aligned const subview_row_strans<eT>& Q;
inline explicit Proxy(const subview_row_strans<eT>& A) inline explicit Proxy(const subview_row_strans<eT>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1520 skipping to change at line 1382
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef subview_row_htrans<eT> stored_type; typedef subview_row_htrans<eT> stored_type;
typedef const subview_row_htrans<eT>& ea_type; typedef const subview_row_htrans<eT>& ea_type;
typedef const subview_row_htrans<eT>& aligned_ea_type; typedef const subview_row_htrans<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const subview_row_htrans<eT>& Q; arma_aligned const subview_row_htrans<eT>& Q;
inline explicit Proxy(const subview_row_htrans<eT>& A) inline explicit Proxy(const subview_row_htrans<eT>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1564 skipping to change at line 1425
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
typedef const eT* ea_type; typedef const eT* ea_type;
typedef const Mat<eT>& aligned_ea_type; typedef const Mat<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = false; static const bool is_col = false;
arma_aligned const Mat<eT> Q; arma_aligned const Mat<eT> Q;
inline explicit Proxy(const xtrans_mat<eT, do_conj>& A) inline explicit Proxy(const xtrans_mat<eT, do_conj>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1608 skipping to change at line 1468
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
typedef const eT* ea_type; typedef const eT* ea_type;
typedef const Mat<eT>& aligned_ea_type; typedef const Mat<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = false; static const bool is_col = false;
arma_aligned const Mat<eT> Q; arma_aligned const Mat<eT> Q;
inline explicit Proxy(const xvec_htrans<eT>& A) inline explicit Proxy(const xvec_htrans<eT>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1652 skipping to change at line 1511
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
typedef const eT* ea_type; typedef const eT* ea_type;
typedef const Mat<eT>& aligned_ea_type; typedef const Mat<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const Mat<eT> Q; arma_aligned const Mat<eT> Q;
inline explicit Proxy(const subview_elem1<eT,T1>& A) inline explicit Proxy(const subview_elem1<eT,T1>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1696 skipping to change at line 1554
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
typedef const eT* ea_type; typedef const eT* ea_type;
typedef const Mat<eT>& aligned_ea_type; typedef const Mat<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = false; static const bool is_col = false;
arma_aligned const Mat<eT> Q; arma_aligned const Mat<eT> Q;
inline explicit Proxy(const subview_elem2<eT,T1,T2>& A) inline explicit Proxy(const subview_elem2<eT,T1,T2>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1740 skipping to change at line 1597
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef diagview<eT> stored_type; typedef diagview<eT> stored_type;
typedef const diagview<eT>& ea_type; typedef const diagview<eT>& ea_type;
typedef const diagview<eT>& aligned_ea_type; typedef const diagview<eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = true; static const bool has_subview = true;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = false; static const bool is_row = false;
static const bool is_col = true; static const bool is_col = true;
arma_aligned const diagview<eT>& Q; arma_aligned const diagview<eT>& Q;
inline explicit Proxy(const diagview<eT>& A) inline explicit Proxy(const diagview<eT>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1784 skipping to change at line 1640
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef eOp<T1, eop_type> stored_type; typedef eOp<T1, eop_type> stored_type;
typedef const eOp<T1, eop_type>& ea_type; typedef const eOp<T1, eop_type>& ea_type;
typedef const eOp<T1, eop_type>& aligned_ea_type; typedef const eOp<T1, eop_type>& aligned_ea_type;
static const bool prefer_at_accessor = eOp<T1, eop_type>::prefer_at_acces sor; static const bool prefer_at_accessor = eOp<T1, eop_type>::prefer_at_acces sor;
static const bool has_subview = eOp<T1, eop_type>::has_subview; static const bool has_subview = eOp<T1, eop_type>::has_subview;
static const bool is_fixed = eOp<T1, eop_type>::is_fixed;
static const bool fake_mat = eOp<T1, eop_type>::fake_mat; static const bool fake_mat = eOp<T1, eop_type>::fake_mat;
static const bool is_row = eOp<T1, eop_type>::is_row; static const bool is_row = eOp<T1, eop_type>::is_row;
static const bool is_col = eOp<T1, eop_type>::is_col; static const bool is_col = eOp<T1, eop_type>::is_col;
arma_aligned const eOp<T1, eop_type>& Q; arma_aligned const eOp<T1, eop_type>& Q;
inline explicit Proxy(const eOp<T1, eop_type>& A) inline explicit Proxy(const eOp<T1, eop_type>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1828 skipping to change at line 1683
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef eGlue<T1, T2, eglue_type> stored_type; typedef eGlue<T1, T2, eglue_type> stored_type;
typedef const eGlue<T1, T2, eglue_type>& ea_type; typedef const eGlue<T1, T2, eglue_type>& ea_type;
typedef const eGlue<T1, T2, eglue_type>& aligned_ea_type; typedef const eGlue<T1, T2, eglue_type>& aligned_ea_type;
static const bool prefer_at_accessor = eGlue<T1, T2, eglue_type>::prefer_ at_accessor; static const bool prefer_at_accessor = eGlue<T1, T2, eglue_type>::prefer_ at_accessor;
static const bool has_subview = eGlue<T1, T2, eglue_type>::has_sub view; static const bool has_subview = eGlue<T1, T2, eglue_type>::has_sub view;
static const bool is_fixed = eGlue<T1, T2, eglue_type>::is_fixe d;
static const bool fake_mat = eGlue<T1, T2, eglue_type>::fake_ma t; static const bool fake_mat = eGlue<T1, T2, eglue_type>::fake_ma t;
static const bool is_row = eGlue<T1, T2, eglue_type>::is_row; static const bool is_row = eGlue<T1, T2, eglue_type>::is_row;
static const bool is_col = eGlue<T1, T2, eglue_type>::is_col; static const bool is_col = eGlue<T1, T2, eglue_type>::is_col;
arma_aligned const eGlue<T1, T2, eglue_type>& Q; arma_aligned const eGlue<T1, T2, eglue_type>& Q;
inline explicit Proxy(const eGlue<T1, T2, eglue_type>& A) inline explicit Proxy(const eGlue<T1, T2, eglue_type>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1872 skipping to change at line 1726
public: public:
typedef out_eT elem_type; typedef out_eT elem_type;
typedef typename get_pod_type<out_eT>::result pod_type; typedef typename get_pod_type<out_eT>::result pod_type;
typedef Mat<out_eT> stored_type; typedef Mat<out_eT> stored_type;
typedef const elem_type* ea_type; typedef const elem_type* ea_type;
typedef const Mat<out_eT>& aligned_ea_type; typedef const Mat<out_eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = mtOp<out_eT, T1, op_type>::is_row; static const bool is_row = mtOp<out_eT, T1, op_type>::is_row;
static const bool is_col = mtOp<out_eT, T1, op_type>::is_col; static const bool is_col = mtOp<out_eT, T1, op_type>::is_col;
arma_aligned const Mat<out_eT> Q; arma_aligned const Mat<out_eT> Q;
inline explicit Proxy(const mtOp<out_eT, T1, op_type>& A) inline explicit Proxy(const mtOp<out_eT, T1, op_type>& A)
: Q(A) : Q(A)
{ {
skipping to change at line 1916 skipping to change at line 1769
public: public:
typedef out_eT elem_type; typedef out_eT elem_type;
typedef typename get_pod_type<out_eT>::result pod_type; typedef typename get_pod_type<out_eT>::result pod_type;
typedef Mat<out_eT> stored_type; typedef Mat<out_eT> stored_type;
typedef const elem_type* ea_type; typedef const elem_type* ea_type;
typedef const Mat<out_eT>& aligned_ea_type; typedef const Mat<out_eT>& aligned_ea_type;
static const bool prefer_at_accessor = false; static const bool prefer_at_accessor = false;
static const bool has_subview = false; static const bool has_subview = false;
static const bool is_fixed = false;
static const bool fake_mat = false; static const bool fake_mat = false;
static const bool is_row = mtGlue<out_eT, T1, T2, glue_type>::is_row; static const bool is_row = mtGlue<out_eT, T1, T2, glue_type>::is_row;
static const bool is_col = mtGlue<out_eT, T1, T2, glue_type>::is_col; static const bool is_col = mtGlue<out_eT, T1, T2, glue_type>::is_col;
arma_aligned const Mat<out_eT> Q; arma_aligned const Mat<out_eT> Q;
inline explicit Proxy(const mtGlue<out_eT, T1, T2, glue_type>& A) inline explicit Proxy(const mtGlue<out_eT, T1, T2, glue_type>& A)
: Q(A) : Q(A)
{ {
 End of changes. 45 change blocks. 
163 lines changed or deleted 6 lines changed or added


 Row_bones.hpp   Row_bones.hpp 
skipping to change at line 96 skipping to change at line 96
arma_inline subview_row<eT> cols(const span& col_span); arma_inline subview_row<eT> cols(const span& col_span);
arma_inline const subview_row<eT> cols(const span& col_span) const; arma_inline const subview_row<eT> cols(const span& col_span) const;
arma_inline subview_row<eT> subvec(const span& col_span); arma_inline subview_row<eT> subvec(const span& col_span);
arma_inline const subview_row<eT> subvec(const span& col_span) const; arma_inline const subview_row<eT> subvec(const span& col_span) const;
arma_inline subview_row<eT> operator()(const span& col_span); arma_inline subview_row<eT> operator()(const span& col_span);
arma_inline const subview_row<eT> operator()(const span& col_span) const; arma_inline const subview_row<eT> operator()(const span& col_span) const;
arma_inline subview_row<eT> head(const uword N);
arma_inline const subview_row<eT> head(const uword N) const;
arma_inline subview_row<eT> tail(const uword N);
arma_inline const subview_row<eT> tail(const uword N) const;
inline void shed_col (const uword col_num); inline void shed_col (const uword col_num);
inline void shed_cols(const uword in_col1, const uword in_col2); inline void shed_cols(const uword in_col1, const uword in_col2);
inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero = true); inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero = true);
template<typename T1> inline void insert_cols(const uword col_num, const Base<eT,T1>& X); template<typename T1> inline void insert_cols(const uword col_num, const Base<eT,T1>& X);
arma_inline arma_warn_unused eT& at(const uword i); arma_inline arma_warn_unused eT& at(const uword i);
arma_inline arma_warn_unused const eT& at(const uword i) const; arma_inline arma_warn_unused const eT& at(const uword i) const;
arma_inline arma_warn_unused eT& at(const uword in_row, const uword in_col); arma_inline arma_warn_unused eT& at(const uword in_row, const uword in_col);
 End of changes. 1 change blocks. 
0 lines changed or deleted 6 lines changed or added


 Row_meat.hpp   Row_meat.hpp 
skipping to change at line 577 skipping to change at line 577
template<typename eT> template<typename eT>
arma_inline arma_inline
const subview_row<eT> const subview_row<eT>
Row<eT>::operator()(const span& col_span) const Row<eT>::operator()(const span& col_span) const
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return subvec(col_span); return subvec(col_span);
} }
template<typename eT>
arma_inline
subview_row<eT>
Row<eT>::head(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_cols), "Row::head(): size out of bounds
");
return subview_row<eT>(*this, 0, 0, N);
}
template<typename eT>
arma_inline
const subview_row<eT>
Row<eT>::head(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_cols), "Row::head(): size out of bounds
");
return subview_row<eT>(*this, 0, 0, N);
}
template<typename eT>
arma_inline
subview_row<eT>
Row<eT>::tail(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_cols), "Row::tail(): size out of bounds
");
const uword start_col = Mat<eT>::n_cols - N;
return subview_row<eT>(*this, 0, start_col, N);
}
template<typename eT>
arma_inline
const subview_row<eT>
Row<eT>::tail(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_cols), "Row::tail(): size out of bounds
");
const uword start_col = Mat<eT>::n_cols - N;
return subview_row<eT>(*this, 0, start_col, N);
}
//! remove specified columns //! remove specified columns
template<typename eT> template<typename eT>
inline inline
void void
Row<eT>::shed_col(const uword col_num) Row<eT>::shed_col(const uword col_num)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( col_num >= Mat<eT>::n_cols, "Row::shed_col(): index out of bounds"); arma_debug_check( col_num >= Mat<eT>::n_cols, "Row::shed_col(): index out of bounds");
 End of changes. 1 change blocks. 
0 lines changed or deleted 56 lines changed or added


 arma_version.hpp   arma_version.hpp 
skipping to change at line 12 skipping to change at line 12
// Copyright (C) 2009-2014 NICTA (www.nicta.com.au) // Copyright (C) 2009-2014 NICTA (www.nicta.com.au)
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! \addtogroup arma_version //! \addtogroup arma_version
//! @{ //! @{
#define ARMA_VERSION_MAJOR 4 #define ARMA_VERSION_MAJOR 4
#define ARMA_VERSION_MINOR 550 #define ARMA_VERSION_MINOR 600
#define ARMA_VERSION_PATCH 4 #define ARMA_VERSION_PATCH 0
#define ARMA_VERSION_NAME "Singapore Sling Deluxe" #define ARMA_VERSION_NAME "Off The Reservation"
struct arma_version struct arma_version
{ {
static const unsigned int major = ARMA_VERSION_MAJOR; static const unsigned int major = ARMA_VERSION_MAJOR;
static const unsigned int minor = ARMA_VERSION_MINOR; static const unsigned int minor = ARMA_VERSION_MINOR;
static const unsigned int patch = ARMA_VERSION_PATCH; static const unsigned int patch = ARMA_VERSION_PATCH;
static static
inline inline
std::string std::string
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added


 arrayops_meat.hpp   arrayops_meat.hpp 
skipping to change at line 839 skipping to change at line 839
#endif #endif
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
arma_pure arma_pure
inline inline
eT eT
arrayops::accumulate(const eT* src, const uword n_elem) arrayops::accumulate(const eT* src, const uword n_elem)
{ {
uword i,j; #if defined(__FINITE_MATH_ONLY__) && (__FINITE_MATH_ONLY__ > 0)
{
eT acc = eT(0);
eT acc1 = eT(0); if(memory::is_aligned(src))
eT acc2 = eT(0); {
memory::mark_as_aligned(src);
for(uword i=0; i<n_elem; ++i) { acc += src[i]; }
}
else
{
for(uword i=0; i<n_elem; ++i) { acc += src[i]; }
}
for(i=0, j=1; j<n_elem; i+=2, j+=2) return acc;
{
acc1 += src[i];
acc2 += src[j];
} }
#else
if(i < n_elem)
{ {
acc1 += src[i]; eT acc1 = eT(0);
} eT acc2 = eT(0);
return acc1 + acc2; uword j;
for(j=1; j<n_elem; j+=2)
{
acc1 += (*src); src++;
acc2 += (*src); src++;
}
if((j-1) < n_elem)
{
acc1 += (*src);
}
return acc1 + acc2;
}
#endif
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
arma_pure arma_pure
inline inline
eT eT
arrayops::product(const eT* src, const uword n_elem) arrayops::product(const eT* src, const uword n_elem)
{ {
eT val1 = eT(1); eT val1 = eT(1);
 End of changes. 6 change blocks. 
12 lines changed or deleted 32 lines changed or added


 compiler_setup.hpp   compiler_setup.hpp 
// Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 Conrad Sanderson
// Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // Copyright (C) 2008-2014 NICTA (www.nicta.com.au)
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
#undef arma_hot
#undef arma_cold
#undef arma_pure
#undef arma_const
#undef arma_aligned
#undef arma_align_mem
#undef arma_warn_unused
#undef arma_deprecated
#undef arma_malloc
#undef arma_inline
#undef arma_noinline
#undef arma_ignore
#define arma_hot #define arma_hot
#define arma_cold #define arma_cold
#define arma_pure #define arma_pure
#define arma_const #define arma_const
#define arma_aligned #define arma_aligned
#define arma_align_mem #define arma_align_mem
#define arma_warn_unused #define arma_warn_unused
#define arma_deprecated #define arma_deprecated
#define arma_malloc #define arma_malloc
#define arma_inline inline #define arma_inline inline
#define arma_noinline #define arma_noinline
#define arma_ignore(variable) ((void)(variable)) #define arma_ignore(variable) ((void)(variable))
#undef arma_fortran_noprefix
#undef arma_fortran_prefix
#undef arma_fortran2_noprefix
#undef arma_fortran2_prefix
#if defined(ARMA_BLAS_UNDERSCORE) #if defined(ARMA_BLAS_UNDERSCORE)
#define arma_fortran2_noprefix(function) function##_ #define arma_fortran2_noprefix(function) function##_
#define arma_fortran2_prefix(function) wrapper_##function##_ #define arma_fortran2_prefix(function) wrapper_##function##_
#else #else
#define arma_fortran2_noprefix(function) function #define arma_fortran2_noprefix(function) function
#define arma_fortran2_prefix(function) wrapper_##function #define arma_fortran2_prefix(function) wrapper_##function
#endif #endif
#if defined(ARMA_USE_WRAPPER) #if defined(ARMA_USE_WRAPPER)
#define arma_fortran(function) arma_fortran2_prefix(function) #define arma_fortran(function) arma_fortran2_prefix(function)
#define arma_atlas(function) wrapper_##function #define arma_atlas(function) wrapper_##function
#else #else
#define arma_fortran(function) arma_fortran2_noprefix(function) #define arma_fortran(function) arma_fortran2_noprefix(function)
#define arma_atlas(function) function #define arma_atlas(function) function
#endif #endif
#define arma_fortran_prefix(function) arma_fortran2_prefix(function) #define arma_fortran_prefix(function) arma_fortran2_prefix(function)
#define arma_fortran_noprefix(function) arma_fortran2_noprefix(function) #define arma_fortran_noprefix(function) arma_fortran2_noprefix(function)
#undef ARMA_INCFILE_WRAP
#define ARMA_INCFILE_WRAP(x) <x> #define ARMA_INCFILE_WRAP(x) <x>
#if defined(ARMA_USE_CXX11) #if defined(ARMA_USE_CXX11)
#undef ARMA_USE_U64S64 #undef ARMA_USE_U64S64
#define ARMA_USE_U64S64 #define ARMA_USE_U64S64
#endif #endif
#if defined(ARMA_64BIT_WORD) #if defined(ARMA_64BIT_WORD)
#undef ARMA_USE_U64S64 #undef ARMA_USE_U64S64
#define ARMA_USE_U64S64 #define ARMA_USE_U64S64
#endif #endif
#undef ARMA_HAVE_GETTIMEOFDAY
#undef ARMA_HAVE_SNPRINTF
#undef ARMA_HAVE_ISFINITE
#undef ARMA_HAVE_LOG1P
#undef ARMA_HAVE_ISINF
#undef ARMA_HAVE_ISNAN
#if (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) #if (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L))
#define ARMA_HAVE_GETTIMEOFDAY #define ARMA_HAVE_GETTIMEOFDAY
#if defined(__GNUG__) #if defined(__GNUG__)
#define ARMA_HAVE_SNPRINTF #define ARMA_HAVE_SNPRINTF
#define ARMA_HAVE_ISFINITE #define ARMA_HAVE_ISFINITE
#define ARMA_HAVE_LOG1P #define ARMA_HAVE_LOG1P
#define ARMA_HAVE_ISINF #define ARMA_HAVE_ISINF
#define ARMA_HAVE_ISNAN #define ARMA_HAVE_ISNAN
#endif #endif
#endif #endif
// posix_memalign() is part of IEEE standard 1003.1 // posix_memalign() is part of IEEE standard 1003.1
// http://pubs.opengroup.org/onlinepubs/009696899/functions/posix_memalign. html // http://pubs.opengroup.org/onlinepubs/009696899/functions/posix_memalign. html
// http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html // http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html
// http://sourceforge.net/p/predef/wiki/Standards/ // http://sourceforge.net/p/predef/wiki/Standards/
#if ( defined(_POSIX_ADVISORY_INFO) && (_POSIX_ADVISORY_INFO >= 200112L) ) #if ( defined(_POSIX_ADVISORY_INFO) && (_POSIX_ADVISORY_INFO >= 200112L) )
#undef ARMA_HAVE_POSIX_MEMALIGN
#define ARMA_HAVE_POSIX_MEMALIGN #define ARMA_HAVE_POSIX_MEMALIGN
#endif #endif
#if defined(__APPLE__) #if defined(__APPLE__)
#undef ARMA_BLAS_SDOT_BUG
#define ARMA_BLAS_SDOT_BUG #define ARMA_BLAS_SDOT_BUG
#undef ARMA_HAVE_POSIX_MEMALIGN #undef ARMA_HAVE_POSIX_MEMALIGN
#endif #endif
#if defined(__MINGW32__) #if defined(__MINGW32__)
#undef ARMA_HAVE_POSIX_MEMALIGN #undef ARMA_HAVE_POSIX_MEMALIGN
#endif #endif
#undef ARMA_FNSIG
#if defined (__GNUG__) #if defined (__GNUG__)
#define ARMA_FNSIG __PRETTY_FUNCTION__ #define ARMA_FNSIG __PRETTY_FUNCTION__
#elif defined (_MSC_VER) #elif defined (_MSC_VER)
#define ARMA_FNSIG __FUNCSIG__ #define ARMA_FNSIG __FUNCSIG__
#elif defined(__INTEL_COMPILER) #elif defined(__INTEL_COMPILER)
#define ARMA_FNSIG __FUNCTION__ #define ARMA_FNSIG __FUNCTION__
#elif defined(ARMA_USE_CXX11) #elif defined(ARMA_USE_CXX11)
#define ARMA_FNSIG __func__ #define ARMA_FNSIG __func__
#else #else
#define ARMA_FNSIG "(unknown)" #define ARMA_FNSIG "(unknown)"
#endif #endif
#if defined(__INTEL_COMPILER) #if defined(__GNUG__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
&& !defined(__NVCC__)
#if (__INTEL_COMPILER_BUILD_DATE < 20090623)
#error "*** Need a newer compiler ***"
#endif
#define ARMA_HAVE_ICC_ASSUME_ALIGNED
#endif
#if defined(__GNUG__)
#undef ARMA_GCC_VERSION
#define ARMA_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNU C_PATCHLEVEL__) #define ARMA_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNU C_PATCHLEVEL__)
#if (ARMA_GCC_VERSION < 40200) && !defined(__INTEL_COMPILER) #if (ARMA_GCC_VERSION < 40200)
#error "*** Need a newer compiler ***" #error "*** Need a newer compiler ***"
#endif #endif
#if ( (ARMA_GCC_VERSION >= 40700) && (ARMA_GCC_VERSION <= 40701) ) && !de fined(__INTEL_COMPILER) #if ( (ARMA_GCC_VERSION >= 40700) && (ARMA_GCC_VERSION <= 40701) )
#error "gcc versions 4.7.0 and 4.7.1 are unsupported; use 4.7.2 or late r" #error "gcc versions 4.7.0 and 4.7.1 are unsupported; use 4.7.2 or late r"
// due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53549 // due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53549
#endif #endif
#undef ARMA_GOOD_COMPILER
#define ARMA_GOOD_COMPILER #define ARMA_GOOD_COMPILER
#undef ARMA_HAVE_TR1
#undef arma_pure #undef arma_pure
#undef arma_const #undef arma_const
#undef arma_aligned #undef arma_aligned
#undef arma_align_mem #undef arma_align_mem
#undef arma_warn_unused #undef arma_warn_unused
#undef arma_deprecated #undef arma_deprecated
#undef arma_malloc #undef arma_malloc
#undef arma_inline #undef arma_inline
#undef arma_noinline #undef arma_noinline
skipping to change at line 139 skipping to change at line 161
#define arma_pure __attribute__((__pure__)) #define arma_pure __attribute__((__pure__))
#define arma_const __attribute__((__const__)) #define arma_const __attribute__((__const__))
#define arma_aligned __attribute__((__aligned__)) #define arma_aligned __attribute__((__aligned__))
#define arma_align_mem __attribute__((__aligned__(16))) #define arma_align_mem __attribute__((__aligned__(16)))
#define arma_warn_unused __attribute__((__warn_unused_result__)) #define arma_warn_unused __attribute__((__warn_unused_result__))
#define arma_deprecated __attribute__((__deprecated__)) #define arma_deprecated __attribute__((__deprecated__))
#define arma_malloc __attribute__((__malloc__)) #define arma_malloc __attribute__((__malloc__))
#define arma_inline inline __attribute__((__always_inline__)) #define arma_inline inline __attribute__((__always_inline__))
#define arma_noinline __attribute__((__noinline__)) #define arma_noinline __attribute__((__noinline__))
#undef ARMA_HAVE_ALIGNED_ATTRIBUTE
#define ARMA_HAVE_ALIGNED_ATTRIBUTE #define ARMA_HAVE_ALIGNED_ATTRIBUTE
#if defined(ARMA_USE_CXX11) #if defined(ARMA_USE_CXX11)
#if (ARMA_GCC_VERSION < 40800) && !defined(__clang__) #if (ARMA_GCC_VERSION < 40800)
#pragma message ("WARNING: your C++ compiler is in C++11 mode, but it has incomplete support for C++11 features; if something breaks, you get to keep all the pieces") #pragma message ("WARNING: your C++ compiler is in C++11 mode, but it has incomplete support for C++11 features; if something breaks, you get to keep all the pieces")
#pragma message ("WARNING: to forcefully prevent Armadillo from using C++11 features, #define ARMA_DONT_USE_CXX11 before #include <armadillo>") #pragma message ("WARNING: to forcefully prevent Armadillo from using C++11 features, #define ARMA_DONT_USE_CXX11 before #include <armadillo>")
#define ARMA_DONT_USE_CXX11_CHRONO #define ARMA_DONT_USE_CXX11_CHRONO
#endif #endif
#endif #endif
#undef ARMA_HAVE_TR1
#if !defined(ARMA_USE_CXX11) #if !defined(ARMA_USE_CXX11)
#if defined(_GLIBCXX_USE_C99_MATH_TR1) && defined(_GLIBCXX_USE_C99_COMP LEX_TR1) #if defined(_GLIBCXX_USE_C99_MATH_TR1) && defined(_GLIBCXX_USE_C99_COMP LEX_TR1)
#define ARMA_HAVE_TR1 #define ARMA_HAVE_TR1
#endif #endif
#endif #endif
#if (ARMA_GCC_VERSION >= 40300) #if (ARMA_GCC_VERSION >= 40300)
#undef arma_hot #undef arma_hot
#undef arma_cold #undef arma_cold
skipping to change at line 172 skipping to change at line 197
#if (ARMA_GCC_VERSION >= 40700) #if (ARMA_GCC_VERSION >= 40700)
#define ARMA_HAVE_GCC_ASSUME_ALIGNED #define ARMA_HAVE_GCC_ASSUME_ALIGNED
#endif #endif
#if defined(__OPTIMIZE_SIZE__) #if defined(__OPTIMIZE_SIZE__)
#undef ARMA_SIMPLE_LOOPS #undef ARMA_SIMPLE_LOOPS
#define ARMA_SIMPLE_LOOPS #define ARMA_SIMPLE_LOOPS
#endif #endif
#if defined(__clang__) #undef ARMA_GCC_VERSION
// TODO: future versions of clang may also have __builtin_assume_aligne
d #endif
#undef ARMA_HAVE_GCC_ASSUME_ALIGNED
#undef ARMA_HAVE_TR1 #if defined(__clang__) && !defined(__INTEL_COMPILER)
#undef ARMA_HAVE_TR1
#undef ARMA_GOOD_COMPILER
#define ARMA_GOOD_COMPILER
// clang's vectoriser has trouble dealing with slightly more elaborate lo
ops
// http://llvm.org/bugs/show_bug.cgi?id=16358
#undef ARMA_SIMPLE_LOOPS
#define ARMA_SIMPLE_LOOPS
#if !defined(__has_attribute)
#define __has_attribute(x) 0
#endif
#if __has_attribute(__pure__)
#undef arma_pure
#define arma_pure __attribute__((__pure__))
#endif
// clang's vectoriser has trouble dealing with slightly more elaborate #if __has_attribute(__const__)
loops #undef arma_const
// http://llvm.org/bugs/show_bug.cgi?id=16358 #define arma_const __attribute__((__const__))
#undef ARMA_SIMPLE_LOOPS
#define ARMA_SIMPLE_LOOPS
#endif #endif
#if defined(__INTEL_COMPILER) #if __has_attribute(__aligned__)
#undef ARMA_HAVE_TR1 #undef arma_aligned
#undef ARMA_HAVE_GCC_ASSUME_ALIGNED #undef arma_align_mem
#define arma_aligned __attribute__((__aligned__))
#define arma_align_mem __attribute__((__aligned__(16)))
#undef ARMA_HAVE_ALIGNED_ATTRIBUTE
#define ARMA_HAVE_ALIGNED_ATTRIBUTE
#endif #endif
#undef ARMA_GCC_VERSION #if __has_attribute(__warn_unused_result__)
#undef arma_warn_unused
#define arma_warn_unused __attribute__((__warn_unused_result__))
#endif
#if __has_attribute(__deprecated__)
#undef arma_deprecated
#define arma_deprecated __attribute__((__deprecated__))
#endif
#if __has_attribute(__malloc__)
#undef arma_malloc
#define arma_malloc __attribute__((__malloc__))
#endif
#if __has_attribute(__always_inline__)
#undef arma_inline
#define arma_inline inline __attribute__((__always_inline__))
#endif
#if __has_attribute(__noinline__)
#undef arma_noinline
#define arma_noinline __attribute__((__noinline__))
#endif
#if __has_attribute(__hot__)
#undef arma_hot
#define arma_hot __attribute__((__hot__))
#endif
#if __has_attribute(__cold__)
#undef arma_cold
#define arma_cold __attribute__((__cold__))
#endif
#if defined(__has_builtin) && __has_builtin(__builtin_assume_aligned)
#undef ARMA_HAVE_GCC_ASSUME_ALIGNED
#define ARMA_HAVE_GCC_ASSUME_ALIGNED
#endif
#endif
#if defined(__INTEL_COMPILER)
#if (__INTEL_COMPILER_BUILD_DATE < 20090623)
#error "*** Need a newer compiler ***"
#endif
#undef ARMA_GOOD_COMPILER
#undef ARMA_HAVE_TR1
#undef ARMA_HAVE_GCC_ASSUME_ALIGNED
#undef ARMA_HAVE_ICC_ASSUME_ALIGNED
#define ARMA_HAVE_ICC_ASSUME_ALIGNED
#undef ARMA_SIMPLE_LOOPS
#define ARMA_SIMPLE_LOOPS
#endif #endif
#if defined(_MSC_VER) #if defined(_MSC_VER)
#if (_MSC_VER < 1600) #if (_MSC_VER < 1600)
#error "*** Need a newer compiler ***" #error "*** Need a newer compiler ***"
#endif #endif
#if (_MSC_VER < 1700) #if (_MSC_VER < 1700)
skipping to change at line 215 skipping to change at line 320
#endif #endif
#endif #endif
#undef ARMA_SIMPLE_LOOPS #undef ARMA_SIMPLE_LOOPS
#define ARMA_SIMPLE_LOOPS #define ARMA_SIMPLE_LOOPS
#undef ARMA_GOOD_COMPILER #undef ARMA_GOOD_COMPILER
#undef ARMA_HAVE_SNPRINTF #undef ARMA_HAVE_SNPRINTF
#undef ARMA_HAVE_ISFINITE #undef ARMA_HAVE_ISFINITE
#undef ARMA_HAVE_LOG1P #undef ARMA_HAVE_LOG1P
#undef ARMA_HAVE_ISINF
#undef ARMA_HAVE_ISNAN
#undef ARMA_HAVE_TR1 #undef ARMA_HAVE_TR1
// #undef arma_inline // #undef arma_inline
// #define arma_inline inline __forceinline // #define arma_inline inline __forceinline
#pragma warning(push) #pragma warning(push)
#pragma warning(disable: 4127) // conditional expression is constant #pragma warning(disable: 4127) // conditional expression is constant
#pragma warning(disable: 4510) // default constructor could not be gener ated #pragma warning(disable: 4510) // default constructor could not be gener ated
#pragma warning(disable: 4511) // copy constructor can't be generated #pragma warning(disable: 4511) // copy constructor can't be generated
skipping to change at line 273 skipping to change at line 380
// http://www.oracle.com/technetwork/server-storage/solarisstudio/trainin g/index-jsp-141991.html // http://www.oracle.com/technetwork/server-storage/solarisstudio/trainin g/index-jsp-141991.html
// http://www.oracle.com/technetwork/server-storage/solarisstudio/documen tation/cplusplus-faq-355066.html // http://www.oracle.com/technetwork/server-storage/solarisstudio/documen tation/cplusplus-faq-355066.html
#if (__SUNPRO_CC < 0x5100) #if (__SUNPRO_CC < 0x5100)
#error "*** Need a newer compiler ***" #error "*** Need a newer compiler ***"
#endif #endif
#undef ARMA_HAVE_SNPRINTF #undef ARMA_HAVE_SNPRINTF
#undef ARMA_HAVE_ISFINITE #undef ARMA_HAVE_ISFINITE
#undef ARMA_HAVE_LOG1P #undef ARMA_HAVE_LOG1P
#undef ARMA_HAVE_ISINF
#undef ARMA_HAVE_ISNAN
#undef ARMA_HAVE_TR1 #undef ARMA_HAVE_TR1
#endif #endif
#if defined(__NVCC__) #if defined(__NVCC__)
#undef ARMA_HAVE_SNPRINTF #undef ARMA_HAVE_SNPRINTF
#undef ARMA_HAVE_ISFINITE #undef ARMA_HAVE_ISFINITE
#undef ARMA_HAVE_LOG1P #undef ARMA_HAVE_LOG1P
#undef ARMA_HAVE_ISINF
#undef ARMA_HAVE_ISNAN
#undef ARMA_HAVE_TR1 #undef ARMA_HAVE_TR1
#undef arma_noinline
#define arma_noinline
#endif #endif
#if defined(log2) #if defined(log2)
#undef log2 #undef log2
#pragma message ("detected 'log2' macro and undefined it") #pragma message ("detected 'log2' macro and undefined it")
#endif #endif
// //
// whoever defined macros with the names "min" and "max" should be permanen tly removed from the gene pool // whoever defined macros with the names "min" and "max" should be permanen tly removed from the gene pool
 End of changes. 25 change blocks. 
33 lines changed or deleted 140 lines changed or added


 eGlue_bones.hpp   eGlue_bones.hpp 
skipping to change at line 23 skipping to change at line 23
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Proxy<T1> proxy1_type; typedef Proxy<T1> proxy1_type;
typedef Proxy<T2> proxy2_type; typedef Proxy<T2> proxy2_type;
static const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T2>::prefer_at_accessor); static const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T2>::prefer_at_accessor);
static const bool has_subview = (Proxy<T1>::has_subview || Proxy<T2>::has_subview ); static const bool has_subview = (Proxy<T1>::has_subview || Proxy<T2>::has_subview );
static const bool is_fixed = (Proxy<T1>::is_fixed || Proxy<T2>::is_fixed );
static const bool fake_mat = (Proxy<T1>::fake_mat || Proxy<T2>::fake_mat ); static const bool fake_mat = (Proxy<T1>::fake_mat || Proxy<T2>::fake_mat );
static const bool is_col = (Proxy<T1>::is_col || Proxy<T2>::is_col); static const bool is_col = (Proxy<T1>::is_col || Proxy<T2>::is_col);
static const bool is_row = (Proxy<T1>::is_row || Proxy<T2>::is_row); static const bool is_row = (Proxy<T1>::is_row || Proxy<T2>::is_row);
arma_aligned const Proxy<T1> P1; arma_aligned const Proxy<T1> P1;
arma_aligned const Proxy<T2> P2; arma_aligned const Proxy<T2> P2;
arma_inline ~eGlue(); arma_inline ~eGlue();
arma_inline eGlue(const T1& in_A, const T2& in_B); arma_inline eGlue(const T1& in_A, const T2& in_B);
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 eGlue_meat.hpp   eGlue_meat.hpp 
skipping to change at line 40 skipping to change at line 40
P2.get_n_rows(), P2.get_n_cols(), P2.get_n_rows(), P2.get_n_cols(),
eglue_type::text() eglue_type::text()
); );
} }
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
arma_inline arma_inline
uword uword
eGlue<T1,T2,eglue_type>::get_n_rows() const eGlue<T1,T2,eglue_type>::get_n_rows() const
{ {
return is_row ? 1 : ( Proxy<T1>::is_fixed ? P1.get_n_rows() : ( Proxy<T2> ::is_fixed ? P2.get_n_rows() : P1.get_n_rows() ) ); return is_row ? 1 : P1.get_n_rows();
} }
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
arma_inline arma_inline
uword uword
eGlue<T1,T2,eglue_type>::get_n_cols() const eGlue<T1,T2,eglue_type>::get_n_cols() const
{ {
return is_col ? 1 : ( Proxy<T1>::is_fixed ? P1.get_n_cols() : ( Proxy<T2> ::is_fixed ? P2.get_n_cols() : P1.get_n_cols() ) ); return is_col ? 1 : P1.get_n_cols();
} }
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
arma_inline arma_inline
uword uword
eGlue<T1,T2,eglue_type>::get_n_elem() const eGlue<T1,T2,eglue_type>::get_n_elem() const
{ {
return Proxy<T1>::is_fixed ? P1.get_n_elem() : ( Proxy<T2>::is_fixed ? P2 .get_n_elem() : P1.get_n_elem() ) ; return P1.get_n_elem();
} }
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
arma_inline arma_inline
typename T1::elem_type typename T1::elem_type
eGlue<T1,T2,eglue_type>::operator[] (const uword ii) const eGlue<T1,T2,eglue_type>::operator[] (const uword ii) const
{ {
// the optimiser will keep only one return statement // the optimiser will keep only one return statement
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 eOp_bones.hpp   eOp_bones.hpp 
skipping to change at line 22 skipping to change at line 22
class eOp : public Base<typename T1::elem_type, eOp<T1, eop_type> > class eOp : public Base<typename T1::elem_type, eOp<T1, eop_type> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Proxy<T1> proxy_type; typedef Proxy<T1> proxy_type;
static const bool prefer_at_accessor = Proxy<T1>::prefer_at_accessor; static const bool prefer_at_accessor = Proxy<T1>::prefer_at_accessor;
static const bool has_subview = Proxy<T1>::has_subview; static const bool has_subview = Proxy<T1>::has_subview;
static const bool is_fixed = Proxy<T1>::is_fixed;
static const bool fake_mat = Proxy<T1>::fake_mat; static const bool fake_mat = Proxy<T1>::fake_mat;
static const bool is_row = Proxy<T1>::is_row; static const bool is_row = Proxy<T1>::is_row;
static const bool is_col = Proxy<T1>::is_col; static const bool is_col = Proxy<T1>::is_col;
arma_aligned const Proxy<T1> P; arma_aligned const Proxy<T1> P;
arma_aligned elem_type aux; //!< storage of auxiliary data , user defined format arma_aligned elem_type aux; //!< storage of auxiliary data , user defined format
arma_aligned uword aux_uword_a; //!< storage of auxiliary data , uword format arma_aligned uword aux_uword_a; //!< storage of auxiliary data , uword format
arma_aligned uword aux_uword_b; //!< storage of auxiliary data , uword format arma_aligned uword aux_uword_b; //!< storage of auxiliary data , uword format
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 eglue_core_meat.hpp   eglue_core_meat.hpp 
skipping to change at line 181 skipping to change at line 181
const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T 2>::prefer_at_accessor); const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T 2>::prefer_at_accessor);
// NOTE: we're assuming that the matrix has already been set to the corre ct size and there is no aliasing; // NOTE: we're assuming that the matrix has already been set to the corre ct size and there is no aliasing;
// size setting and alias checking is done by either the Mat contructor o r operator=() // size setting and alias checking is done by either the Mat contructor o r operator=()
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
if(prefer_at_accessor == false) if(prefer_at_accessor == false)
{ {
const uword n_elem = (Proxy<T1>::is_fixed || Proxy<T2>::is_fixed) ? x.g et_n_elem() : out.n_elem; const uword n_elem = x.get_n_elem();
//if( memory::is_aligned(out_mem) ) if(memory::is_aligned(out_mem))
if( memory::is_aligned(out_mem) && ((Proxy<T1>::is_fixed && Proxy<T2>::
is_fixed) ? (x.get_n_elem() >= 32) : true) )
{ {
memory::mark_as_aligned(out_mem); memory::mark_as_aligned(out_mem);
if(x.P1.is_aligned() && x.P2.is_aligned()) if(x.P1.is_aligned() && x.P2.is_aligned())
{ {
typename Proxy<T1>::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename Proxy<T1>::aligned_ea_type P1 = x.P1.get_aligned_ea();
typename Proxy<T2>::aligned_ea_type P2 = x.P2.get_aligned_ea(); typename Proxy<T2>::aligned_ea_type P2 = x.P2.get_aligned_ea();
if(is_same_type<eglue_type, eglue_plus >::yes) { arma_applier_ 1a(=, +); } if(is_same_type<eglue_type, eglue_plus >::yes) { arma_applier_ 1a(=, +); }
else if(is_same_type<eglue_type, eglue_minus>::yes) { arma_applier_ 1a(=, -); } else if(is_same_type<eglue_type, eglue_minus>::yes) { arma_applier_ 1a(=, -); }
skipping to change at line 257 skipping to change at line 256
arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "addi tion"); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "addi tion");
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T 2>::prefer_at_accessor); const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T 2>::prefer_at_accessor);
if(prefer_at_accessor == false) if(prefer_at_accessor == false)
{ {
const uword n_elem = (Proxy<T1>::is_fixed || Proxy<T2>::is_fixed) ? x.g et_n_elem() : out.n_elem; const uword n_elem = x.get_n_elem();
if(memory::is_aligned(out_mem)) if(memory::is_aligned(out_mem))
{ {
memory::mark_as_aligned(out_mem); memory::mark_as_aligned(out_mem);
if(x.P1.is_aligned() && x.P2.is_aligned()) if(x.P1.is_aligned() && x.P2.is_aligned())
{ {
typename Proxy<T1>::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename Proxy<T1>::aligned_ea_type P1 = x.P1.get_aligned_ea();
typename Proxy<T2>::aligned_ea_type P2 = x.P2.get_aligned_ea(); typename Proxy<T2>::aligned_ea_type P2 = x.P2.get_aligned_ea();
skipping to change at line 329 skipping to change at line 328
arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "subt raction"); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "subt raction");
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T 2>::prefer_at_accessor); const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T 2>::prefer_at_accessor);
if(prefer_at_accessor == false) if(prefer_at_accessor == false)
{ {
const uword n_elem = (Proxy<T1>::is_fixed || Proxy<T2>::is_fixed) ? x.g et_n_elem() : out.n_elem; const uword n_elem = x.get_n_elem();
if(memory::is_aligned(out_mem)) if(memory::is_aligned(out_mem))
{ {
memory::mark_as_aligned(out_mem); memory::mark_as_aligned(out_mem);
if(x.P1.is_aligned() && x.P2.is_aligned()) if(x.P1.is_aligned() && x.P2.is_aligned())
{ {
typename Proxy<T1>::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename Proxy<T1>::aligned_ea_type P1 = x.P1.get_aligned_ea();
typename Proxy<T2>::aligned_ea_type P2 = x.P2.get_aligned_ea(); typename Proxy<T2>::aligned_ea_type P2 = x.P2.get_aligned_ea();
skipping to change at line 401 skipping to change at line 400
arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "elem ent-wise multiplication"); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "elem ent-wise multiplication");
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T 2>::prefer_at_accessor); const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T 2>::prefer_at_accessor);
if(prefer_at_accessor == false) if(prefer_at_accessor == false)
{ {
const uword n_elem = (Proxy<T1>::is_fixed || Proxy<T2>::is_fixed) ? x.g et_n_elem() : out.n_elem; const uword n_elem = x.get_n_elem();
if(memory::is_aligned(out_mem)) if(memory::is_aligned(out_mem))
{ {
memory::mark_as_aligned(out_mem); memory::mark_as_aligned(out_mem);
if(x.P1.is_aligned() && x.P2.is_aligned()) if(x.P1.is_aligned() && x.P2.is_aligned())
{ {
typename Proxy<T1>::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename Proxy<T1>::aligned_ea_type P1 = x.P1.get_aligned_ea();
typename Proxy<T2>::aligned_ea_type P2 = x.P2.get_aligned_ea(); typename Proxy<T2>::aligned_ea_type P2 = x.P2.get_aligned_ea();
skipping to change at line 473 skipping to change at line 472
arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "elem ent-wise division"); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "elem ent-wise division");
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T 2>::prefer_at_accessor); const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T 2>::prefer_at_accessor);
if(prefer_at_accessor == false) if(prefer_at_accessor == false)
{ {
const uword n_elem = (Proxy<T1>::is_fixed || Proxy<T2>::is_fixed) ? x.g et_n_elem() : out.n_elem; const uword n_elem = x.get_n_elem();
if(memory::is_aligned(out_mem)) if(memory::is_aligned(out_mem))
{ {
memory::mark_as_aligned(out_mem); memory::mark_as_aligned(out_mem);
if(x.P1.is_aligned() && x.P2.is_aligned()) if(x.P1.is_aligned() && x.P2.is_aligned())
{ {
typename Proxy<T1>::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename Proxy<T1>::aligned_ea_type P1 = x.P1.get_aligned_ea();
typename Proxy<T2>::aligned_ea_type P2 = x.P2.get_aligned_ea(); typename Proxy<T2>::aligned_ea_type P2 = x.P2.get_aligned_ea();
 End of changes. 6 change blocks. 
8 lines changed or deleted 6 lines changed or added


 eop_core_meat.hpp   eop_core_meat.hpp 
skipping to change at line 166 skipping to change at line 166
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
// NOTE: we're assuming that the matrix has already been set to the corre ct size and there is no aliasing; // NOTE: we're assuming that the matrix has already been set to the corre ct size and there is no aliasing;
// size setting and alias checking is done by either the Mat contructor o r operator=() // size setting and alias checking is done by either the Mat contructor o r operator=()
const eT k = x.aux; const eT k = x.aux;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
if(Proxy<T1>::prefer_at_accessor == false) if(Proxy<T1>::prefer_at_accessor == false)
{ {
const uword n_elem = (Proxy<T1>::is_fixed) ? x.get_n_elem() : out.n_ele m; const uword n_elem = x.get_n_elem();
//if(memory::is_aligned(out_mem)) if(memory::is_aligned(out_mem))
if( memory::is_aligned(out_mem) && ((Proxy<T1>::is_fixed) ? (x.get_n_el
em() >= 32) : true) )
{ {
memory::mark_as_aligned(out_mem); memory::mark_as_aligned(out_mem);
if(x.P.is_aligned()) if(x.P.is_aligned())
{ {
typename Proxy<T1>::aligned_ea_type P = x.P.get_aligned_ea(); typename Proxy<T1>::aligned_ea_type P = x.P.get_aligned_ea();
arma_applier_1a(=); arma_applier_1a(=);
} }
else else
skipping to change at line 225 skipping to change at line 224
const uword n_rows = x.get_n_rows(); const uword n_rows = x.get_n_rows();
const uword n_cols = x.get_n_cols(); const uword n_cols = x.get_n_cols();
arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "addi tion"); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "addi tion");
const eT k = x.aux; const eT k = x.aux;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
if(Proxy<T1>::prefer_at_accessor == false) if(Proxy<T1>::prefer_at_accessor == false)
{ {
const uword n_elem = (Proxy<T1>::is_fixed) ? x.get_n_elem() : out.n_ele m; const uword n_elem = x.get_n_elem();
if(memory::is_aligned(out_mem)) if(memory::is_aligned(out_mem))
{ {
memory::mark_as_aligned(out_mem); memory::mark_as_aligned(out_mem);
if(x.P.is_aligned()) if(x.P.is_aligned())
{ {
typename Proxy<T1>::aligned_ea_type P = x.P.get_aligned_ea(); typename Proxy<T1>::aligned_ea_type P = x.P.get_aligned_ea();
arma_applier_1a(+=); arma_applier_1a(+=);
skipping to change at line 280 skipping to change at line 279
const uword n_rows = x.get_n_rows(); const uword n_rows = x.get_n_rows();
const uword n_cols = x.get_n_cols(); const uword n_cols = x.get_n_cols();
arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "subt raction"); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "subt raction");
const eT k = x.aux; const eT k = x.aux;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
if(Proxy<T1>::prefer_at_accessor == false) if(Proxy<T1>::prefer_at_accessor == false)
{ {
const uword n_elem = (Proxy<T1>::is_fixed) ? x.get_n_elem() : out.n_ele m; const uword n_elem = x.get_n_elem();
if(memory::is_aligned(out_mem)) if(memory::is_aligned(out_mem))
{ {
memory::mark_as_aligned(out_mem); memory::mark_as_aligned(out_mem);
if(x.P.is_aligned()) if(x.P.is_aligned())
{ {
typename Proxy<T1>::aligned_ea_type P = x.P.get_aligned_ea(); typename Proxy<T1>::aligned_ea_type P = x.P.get_aligned_ea();
arma_applier_1a(-=); arma_applier_1a(-=);
skipping to change at line 335 skipping to change at line 334
const uword n_rows = x.get_n_rows(); const uword n_rows = x.get_n_rows();
const uword n_cols = x.get_n_cols(); const uword n_cols = x.get_n_cols();
arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "elem ent-wise multiplication"); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "elem ent-wise multiplication");
const eT k = x.aux; const eT k = x.aux;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
if(Proxy<T1>::prefer_at_accessor == false) if(Proxy<T1>::prefer_at_accessor == false)
{ {
const uword n_elem = (Proxy<T1>::is_fixed) ? x.get_n_elem() : out.n_ele m; const uword n_elem = x.get_n_elem();
if(memory::is_aligned(out_mem)) if(memory::is_aligned(out_mem))
{ {
memory::mark_as_aligned(out_mem); memory::mark_as_aligned(out_mem);
if(x.P.is_aligned()) if(x.P.is_aligned())
{ {
typename Proxy<T1>::aligned_ea_type P = x.P.get_aligned_ea(); typename Proxy<T1>::aligned_ea_type P = x.P.get_aligned_ea();
arma_applier_1a(*=); arma_applier_1a(*=);
skipping to change at line 390 skipping to change at line 389
const uword n_rows = x.get_n_rows(); const uword n_rows = x.get_n_rows();
const uword n_cols = x.get_n_cols(); const uword n_cols = x.get_n_cols();
arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "elem ent-wise division"); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "elem ent-wise division");
const eT k = x.aux; const eT k = x.aux;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
if(Proxy<T1>::prefer_at_accessor == false) if(Proxy<T1>::prefer_at_accessor == false)
{ {
const uword n_elem = (Proxy<T1>::is_fixed) ? x.get_n_elem() : out.n_ele m; const uword n_elem = x.get_n_elem();
if(memory::is_aligned(out_mem)) if(memory::is_aligned(out_mem))
{ {
memory::mark_as_aligned(out_mem); memory::mark_as_aligned(out_mem);
if(x.P.is_aligned()) if(x.P.is_aligned())
{ {
typename Proxy<T1>::aligned_ea_type P = x.P.get_aligned_ea(); typename Proxy<T1>::aligned_ea_type P = x.P.get_aligned_ea();
arma_applier_1a(/=); arma_applier_1a(/=);
 End of changes. 6 change blocks. 
8 lines changed or deleted 6 lines changed or added


 fn_accu.hpp   fn_accu.hpp 
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2014 Conrad Sanderson
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2014 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! \addtogroup fn_accu //! \addtogroup fn_accu
//! @{ //! @{
template<typename T1> template<typename T1>
arma_hot arma_hot
inline inline
typename T1::elem_type typename T1::elem_type
accu_proxy_linear(const Proxy<T1>& P) accu_proxy_linear(const Proxy<T1>& P)
{ {
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef typename Proxy<T1>::ea_type ea_type;
ea_type A = P.get_ea();
const uword n_elem = P.get_n_elem();
eT val1 = eT(0); const uword n_elem = P.get_n_elem();
eT val2 = eT(0);
uword i,j; #if defined(__FINITE_MATH_ONLY__) && (__FINITE_MATH_ONLY__ > 0)
for(i=0, j=1; j < n_elem; i+=2, j+=2)
{ {
val1 += A[i]; eT val = eT(0);
val2 += A[j];
}
if(i < n_elem) if(P.is_aligned())
{
typename Proxy<T1>::aligned_ea_type A = P.get_aligned_ea();
for(uword i=0; i<n_elem; ++i) { val += A.at_alt(i); }
}
else
{
typename Proxy<T1>::ea_type A = P.get_ea();
for(uword i=0; i<n_elem; ++i) { val += A[i]; }
}
return val;
}
#else
{ {
val1 += A[i]; // equivalent to: val1 += A[n_elem-1]; eT val1 = eT(0);
eT val2 = eT(0);
typename Proxy<T1>::ea_type A = P.get_ea();
uword i,j;
for(i=0, j=1; j < n_elem; i+=2, j+=2)
{
val1 += A[i];
val2 += A[j];
}
if(i < n_elem)
{
val1 += A[i]; // equivalent to: val1 += A[n_elem-1];
}
return (val1 + val2);
} }
#endif
}
return (val1 + val2); template<typename T1>
arma_hot
inline
typename T1::elem_type
accu_proxy_mat(const Proxy<T1>& P)
{
const quasi_unwrap<typename Proxy<T1>::stored_type> tmp(P.Q);
return arrayops::accumulate(tmp.M.memptr(), tmp.M.n_elem);
} }
template<typename T1> template<typename T1>
arma_hot arma_hot
inline inline
typename T1::elem_type typename T1::elem_type
accu_proxy_at(const Proxy<T1>& P) accu_proxy_at(const Proxy<T1>& P)
{ {
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
const uword n_rows = P.get_n_rows(); const uword n_rows = P.get_n_rows();
const uword n_cols = P.get_n_cols(); const uword n_cols = P.get_n_cols();
eT val = eT(0); eT val = eT(0);
if(n_rows != 1) if(n_rows != 1)
{ {
eT val1 = eT(0);
eT val2 = eT(0);
for(uword col=0; col < n_cols; ++col) for(uword col=0; col < n_cols; ++col)
for(uword row=0; row < n_rows; ++row)
{ {
val += P.at(row,col); uword i,j;
for(i=0, j=1; j < n_rows; i+=2, j+=2)
{
val1 += P.at(i,col);
val2 += P.at(j,col);
}
if(i < n_rows)
{
val1 += P.at(i,col);
}
} }
val = val1 + val2;
} }
else else
{ {
for(uword col=0; col < n_cols; ++col) for(uword col=0; col < n_cols; ++col)
{ {
val += P.at(0,col); val += P.at(0,col);
} }
} }
return val; return val;
skipping to change at line 85 skipping to change at line 133
template<typename T1> template<typename T1>
arma_hot arma_hot
inline inline
typename enable_if2< is_arma_type<T1>::value, typename T1::elem_type >::res ult typename enable_if2< is_arma_type<T1>::value, typename T1::elem_type >::res ult
accu(const T1& X) accu(const T1& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
const Proxy<T1> P(X); const Proxy<T1> P(X);
return (Proxy<T1>::prefer_at_accessor == false) ? accu_proxy_linear(P) : const bool have_direct_mem = (is_Mat<typename Proxy<T1>::stored_type>::va
accu_proxy_at(P); lue) || (is_subview_col<typename Proxy<T1>::stored_type>::value);
return (Proxy<T1>::prefer_at_accessor) ? accu_proxy_at(P) : (have_direct_
mem ? accu_proxy_mat(P) : accu_proxy_linear(P));
} }
//! explicit handling of Hamming norm (also known as zero norm) //! explicit handling of Hamming norm (also known as zero norm)
template<typename T1> template<typename T1>
inline inline
arma_warn_unused arma_warn_unused
uword uword
accu(const mtOp<uword,T1,op_rel_noteq>& X) accu(const mtOp<uword,T1,op_rel_noteq>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
skipping to change at line 223 skipping to change at line 273
typename T1::elem_type typename T1::elem_type
accu(const BaseCube<typename T1::elem_type,T1>& X) accu(const BaseCube<typename T1::elem_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef typename ProxyCube<T1>::ea_type ea_type; typedef typename ProxyCube<T1>::ea_type ea_type;
const ProxyCube<T1> A(X.get_ref()); const ProxyCube<T1> A(X.get_ref());
if(is_Cube<typename ProxyCube<T1>::stored_type>::value)
{
unwrap_cube<typename ProxyCube<T1>::stored_type> tmp(A.Q);
return arrayops::accumulate(tmp.M.memptr(), tmp.M.n_elem);
}
if(ProxyCube<T1>::prefer_at_accessor == false) if(ProxyCube<T1>::prefer_at_accessor == false)
{ {
ea_type P = A.get_ea(); ea_type P = A.get_ea();
const uword n_elem = A.get_n_elem(); const uword n_elem = A.get_n_elem();
eT val1 = eT(0); eT val1 = eT(0);
eT val2 = eT(0); eT val2 = eT(0);
uword i,j; uword i,j;
skipping to change at line 252 skipping to change at line 309
} }
return val1 + val2; return val1 + val2;
} }
else else
{ {
const uword n_rows = A.get_n_rows(); const uword n_rows = A.get_n_rows();
const uword n_cols = A.get_n_cols(); const uword n_cols = A.get_n_cols();
const uword n_slices = A.get_n_slices(); const uword n_slices = A.get_n_slices();
eT val = eT(0); eT val1 = eT(0);
eT val2 = eT(0);
for(uword slice=0; slice<n_slices; ++slice) for(uword slice=0; slice<n_slices; ++slice)
for(uword col=0; col<n_cols; ++col) for(uword col=0; col<n_cols; ++col)
for(uword row=0; row<n_rows; ++row)
{ {
val += A.at(row,col,slice); uword i,j;
for(i=0, j=1; j<n_rows; i+=2, j+=2)
{
val1 += A.at(i,col,slice);
val2 += A.at(j,col,slice);
}
if(i < n_rows)
{
val1 += A.at(i,col,slice);
}
} }
return val; return val1 + val2;
} }
} }
template<typename T> template<typename T>
arma_inline arma_inline
arma_warn_unused arma_warn_unused
const typename arma_scalar_only<T>::result & const typename arma_scalar_only<T>::result &
accu(const T& x) accu(const T& x)
{ {
return x; return x;
 End of changes. 19 change blocks. 
25 lines changed or deleted 93 lines changed or added


 fn_norm.hpp   fn_norm.hpp 
skipping to change at line 201 skipping to change at line 201
const T a = X.real() / max_val; const T a = X.real() / max_val;
const T b = X.imag() / max_val; const T b = X.imag() / max_val;
alt_acc += std::sqrt( (a*a) + (b*b) ); alt_acc += std::sqrt( (a*a) + (b*b) );
} }
return ( alt_acc * max_val ); return ( alt_acc * max_val );
} }
} }
template<typename eT>
arma_hot
inline
eT
arma_vec_norm_2_direct_mem_robust
(
const Mat<eT>& X
)
{
arma_extra_debug_sigprint();
const uword N = X.n_elem;
const eT* A = X.memptr();
eT max_val = priv::most_neg<eT>();
uword j;
for(j=1; j<N; j+=2)
{
eT val_i = (*A); A++;
eT val_j = (*A); A++;
val_i = std::abs(val_i);
val_j = std::abs(val_j);
if(val_i > max_val) { max_val = val_i; }
if(val_j > max_val) { max_val = val_j; }
}
if((j-1) < N)
{
const eT val_i = std::abs(*A);
if(val_i > max_val) { max_val = val_i; }
}
if(max_val == eT(0)) { return eT(0); }
const eT* B = X.memptr();
eT acc1 = eT(0);
eT acc2 = eT(0);
for(j=1; j<N; j+=2)
{
eT val_i = (*B); B++;
eT val_j = (*B); B++;
val_i /= max_val;
val_j /= max_val;
acc1 += val_i * val_i;
acc2 += val_j * val_j;
}
if((j-1) < N)
{
const eT val_i = (*B) / max_val;
acc1 += val_i * val_i;
}
return ( std::sqrt(acc1 + acc2) * max_val );
}
template<typename eT>
arma_hot
inline
eT
arma_vec_norm_2_direct_mem_fast
(
const Mat<eT>& X
)
{
arma_extra_debug_sigprint();
const uword N = X.n_elem;
const eT* A = X.memptr();
eT acc;
#if defined(__FINITE_MATH_ONLY__) && (__FINITE_MATH_ONLY__ > 0)
{
eT acc1 = eT(0);
if(memory::is_aligned(A))
{
memory::mark_as_aligned(A);
for(uword i=0; i<N; ++i) { const eT tmp_i = A[i]; acc1 += tmp_i * t
mp_i; }
}
else
{
for(uword i=0; i<N; ++i) { const eT tmp_i = A[i]; acc1 += tmp_i * t
mp_i; }
}
acc = acc1;
}
#else
{
eT acc1 = eT(0);
eT acc2 = eT(0);
uword j;
for(j=1; j<N; j+=2)
{
const eT tmp_i = (*A); A++;
const eT tmp_j = (*A); A++;
acc1 += tmp_i * tmp_i;
acc2 += tmp_j * tmp_j;
}
if((j-1) < N)
{
const eT tmp_i = (*A);
acc1 += tmp_i * tmp_i;
}
acc = acc1 + acc2;
}
#endif
const eT sqrt_acc = std::sqrt(acc);
if( (sqrt_acc != eT(0)) && arma_isfinite(sqrt_acc) )
{
return sqrt_acc;
}
else
{
arma_extra_debug_print("arma_vec_norm_2_direct_mem_fast(): detected pos
sible underflow or overflow");
return arma_vec_norm_2_direct_mem_robust(X);
}
}
template<typename T1> template<typename T1>
arma_hot arma_hot
inline inline
typename T1::pod_type typename T1::pod_type
arma_vec_norm_2 arma_vec_norm_2
( (
const Proxy<T1>& P, const Proxy<T1>& P,
const typename arma_not_cx<typename T1::elem_type>::result* junk = 0 const typename arma_not_cx<typename T1::elem_type>::result* junk = 0
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_ignore(junk); arma_ignore(junk);
typedef typename T1::elem_type eT; const bool have_direct_mem = (is_Mat<typename Proxy<T1>::stored_type>::va
typedef typename T1::pod_type T; lue) || (is_subview_col<typename Proxy<T1>::stored_type>::value);
if(have_direct_mem)
{
const quasi_unwrap<typename Proxy<T1>::stored_type> tmp(P.Q);
return arma_vec_norm_2_direct_mem_fast(tmp.M);
}
typedef typename T1::pod_type T;
T acc = T(0); T acc = T(0);
if(Proxy<T1>::prefer_at_accessor == false) if(Proxy<T1>::prefer_at_accessor == false)
{ {
typename Proxy<T1>::ea_type A = P.get_ea(); typename Proxy<T1>::ea_type A = P.get_ea();
const uword N = P.get_n_elem(); const uword N = P.get_n_elem();
T acc1 = T(0); T acc1 = T(0);
skipping to change at line 296 skipping to change at line 444
const T sqrt_acc = std::sqrt(acc); const T sqrt_acc = std::sqrt(acc);
if( (sqrt_acc != T(0)) && arma_isfinite(sqrt_acc) ) if( (sqrt_acc != T(0)) && arma_isfinite(sqrt_acc) )
{ {
return sqrt_acc; return sqrt_acc;
} }
else else
{ {
arma_extra_debug_print("arma_vec_norm_2(): detected possible underflow or overflow"); arma_extra_debug_print("arma_vec_norm_2(): detected possible underflow or overflow");
const quasi_unwrap<typename Proxy<T1>::stored_type> R(P.Q); const quasi_unwrap<typename Proxy<T1>::stored_type> tmp(P.Q);
const uword N = R.M.n_elem;
const eT* R_mem = R.M.memptr();
eT max_val = priv::most_neg<eT>();
uword i,j;
for(i=0, j=1; j<N; i+=2, j+=2)
{
eT val_i = R_mem[i];
eT val_j = R_mem[j];
val_i = std::abs(val_i);
val_j = std::abs(val_j);
if(val_i > max_val) { max_val = val_i; }
if(val_j > max_val) { max_val = val_j; }
}
if(i < N)
{
const eT val_i = std::abs(R_mem[i]);
if(val_i > max_val) { max_val = val_i; }
}
if(max_val == eT(0)) { return eT(0); }
eT alt_acc1 = eT(0);
eT alt_acc2 = eT(0);
for(i=0, j=1; j<N; i+=2, j+=2)
{
eT val_i = R_mem[i];
eT val_j = R_mem[j];
val_i /= max_val;
val_j /= max_val;
alt_acc1 += val_i * val_i;
alt_acc2 += val_j * val_j;
}
if(i < N)
{
const eT val_i = R_mem[i] / max_val;
alt_acc1 += val_i*val_i;
}
return ( std::sqrt(alt_acc1 + alt_acc2) * max_val ); return arma_vec_norm_2_direct_mem_robust(tmp.M);
} }
} }
template<typename T1> template<typename T1>
arma_hot arma_hot
inline inline
typename T1::pod_type typename T1::pod_type
arma_vec_norm_2 arma_vec_norm_2
( (
const Proxy<T1>& P, const Proxy<T1>& P,
 End of changes. 4 change blocks. 
54 lines changed or deleted 156 lines changed or added


 op_dot_meat.hpp   op_dot_meat.hpp 
skipping to change at line 21 skipping to change at line 21
//! for two arrays, generic version for non-complex values //! for two arrays, generic version for non-complex values
template<typename eT> template<typename eT>
arma_hot arma_hot
arma_pure arma_pure
arma_inline arma_inline
typename arma_not_cx<eT>::result typename arma_not_cx<eT>::result
op_dot::direct_dot_arma(const uword n_elem, const eT* const A, const eT* co nst B) op_dot::direct_dot_arma(const uword n_elem, const eT* const A, const eT* co nst B)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
#if (__FINITE_MATH_ONLY__ > 0) #if defined(__FINITE_MATH_ONLY__) && (__FINITE_MATH_ONLY__ > 0)
{ {
eT val = eT(0); eT val = eT(0);
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
val += A[i] * B[i]; val += A[i] * B[i];
} }
return val; return val;
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 op_expmat_meat.hpp   op_expmat_meat.hpp 
skipping to change at line 47 skipping to change at line 47
} }
else else
{ {
const unwrap<T1> tmp(expr.m); const unwrap<T1> tmp(expr.m);
const Mat<eT>& A = tmp.M; const Mat<eT>& A = tmp.M;
arma_debug_check( (A.is_square() == false), "expmat(): given matrix is not square sized" ); arma_debug_check( (A.is_square() == false), "expmat(): given matrix is not square sized" );
const T norm_val = arma::norm(A, "inf"); const T norm_val = arma::norm(A, "inf");
const T log2_val = eop_aux::log2(norm_val); const double log2_val = (norm_val > T(0)) ? double(eop_aux::log2(norm_v al)) : double(0);
const uword s = uword( (std::max)(sword(0), sword(log2_val) + sword(1) int exponent = int(0); std::frexp(log2_val, &exponent);
+ sword(1)) );
const uword s = uword( (std::max)(int(0), exponent + int(1)) );
const Mat<eT> AA = A / eT(eop_aux::pow(double(2), double(s))); const Mat<eT> AA = A / eT(eop_aux::pow(double(2), double(s)));
T c = T(0.5); T c = T(0.5);
Mat<eT> E(AA.n_rows, AA.n_rows, fill::eye); E += c * AA; Mat<eT> E(AA.n_rows, AA.n_rows, fill::eye); E += c * AA;
Mat<eT> D(AA.n_rows, AA.n_rows, fill::eye); D -= c * AA; Mat<eT> D(AA.n_rows, AA.n_rows, fill::eye); D -= c * AA;
Mat<eT> X = AA; Mat<eT> X = AA;
 End of changes. 2 change blocks. 
3 lines changed or deleted 4 lines changed or added


 op_htrans_meat.hpp   op_htrans_meat.hpp 
// Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2014 Conrad Sanderson
// Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // Copyright (C) 2008-2014 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! \addtogroup op_htrans //! \addtogroup op_htrans
//! @{ //! @{
template<typename eT> template<typename eT>
skipping to change at line 52 skipping to change at line 52
const eT* A_mem = A.memptr(); const eT* A_mem = A.memptr();
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i < n_elem; ++i) for(uword i=0; i < n_elem; ++i)
{ {
out_mem[i] = std::conj(A_mem[i]); out_mem[i] = std::conj(A_mem[i]);
} }
} }
else else
{ {
for(uword in_row = 0; in_row < A_n_rows; ++in_row) const uword out_n_rows = out.n_rows;
const eT* colptr = A.memptr();
for(uword k=0; k < A_n_cols; ++k)
{ {
const uword out_col = in_row; eT* outptr = &(out.at(k,0));
for(uword in_col = 0; in_col < A_n_cols; ++in_col) for(uword j=0; j < A_n_rows; ++j)
{ {
const uword out_row = in_col; (*outptr) = std::conj(*colptr);
out.at(out_row, out_col) = std::conj( A.at(in_row, in_col) );
colptr++;
outptr += out_n_rows;
} }
} }
} }
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
arma_inline arma_inline
void void
op_htrans::apply_mat_inplace(Mat<eT>& out, const typename arma_not_cx<eT>:: result* junk) op_htrans::apply_mat_inplace(Mat<eT>& out, const typename arma_not_cx<eT>:: result* junk)
skipping to change at line 217 skipping to change at line 223
out.steal_mem(out2); out.steal_mem(out2);
} }
} }
else else
{ {
if(is_alias == false) if(is_alias == false)
{ {
out.set_size(n_cols, n_rows); out.set_size(n_cols, n_rows);
const uword out_n_rows = out.n_rows;
for(uword k=0; k < n_cols; ++k) for(uword k=0; k < n_cols; ++k)
for(uword i=0; i < n_rows; ++i)
{ {
out.at(k,i) = std::conj(P.at(i,k)); eT* outptr = &(out.at(k,0));
for(uword i=0; i < n_rows; ++i)
{
(*outptr) = std::conj(P.at(i,k));
outptr += out_n_rows;
}
} }
} }
else // aliasing else // aliasing
{ {
Mat<eT> out2(n_cols, n_rows); Mat<eT> out2(n_cols, n_rows);
const uword out2_n_rows = out2.n_rows;
for(uword k=0; k < n_cols; ++k) for(uword k=0; k < n_cols; ++k)
for(uword i=0; i < n_rows; ++i)
{ {
out2.at(k,i) = std::conj(P.at(i,k)); eT* out2ptr = &(out2.at(k,0));
for(uword i=0; i < n_rows; ++i)
{
(*out2ptr) = std::conj(P.at(i,k));
out2ptr += out2_n_rows;
}
} }
out.steal_mem(out2); out.steal_mem(out2);
} }
} }
} }
} }
template<typename T1> template<typename T1>
arma_hot arma_hot
skipping to change at line 311 skipping to change at line 333
const eT* A_mem = A.memptr(); const eT* A_mem = A.memptr();
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i < n_elem; ++i) for(uword i=0; i < n_elem; ++i)
{ {
out_mem[i] = val * std::conj(A_mem[i]); out_mem[i] = val * std::conj(A_mem[i]);
} }
} }
else else
{ {
for(uword in_row = 0; in_row < A_n_rows; ++in_row) const uword out_n_rows = out.n_rows;
const eT* colptr = A.memptr();
for(uword k=0; k < A_n_cols; ++k)
{ {
const uword out_col = in_row; eT* outptr = &(out.at(k,0));
for(uword in_col = 0; in_col < A_n_cols; ++in_col) for(uword j=0; j < A_n_rows; ++j)
{ {
const uword out_row = in_col; (*outptr) = val * std::conj(*colptr);
out.at(out_row, out_col) = val * std::conj( A.at(in_row, in_col) );
colptr++;
outptr += out_n_rows;
} }
} }
} }
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
void void
op_htrans2::apply(Mat<eT>& out, const Mat<eT>& A, const eT val) op_htrans2::apply(Mat<eT>& out, const Mat<eT>& A, const eT val)
skipping to change at line 442 skipping to change at line 470
out.steal_mem(out2); out.steal_mem(out2);
} }
} }
else else
{ {
if(is_alias == false) if(is_alias == false)
{ {
out.set_size(n_cols, n_rows); out.set_size(n_cols, n_rows);
const uword out_n_rows = out.n_rows;
for(uword k=0; k < n_cols; ++k) for(uword k=0; k < n_cols; ++k)
for(uword i=0; i < n_rows; ++i)
{ {
out.at(k,i) = val * std::conj(P.at(i,k)); eT* outptr = &(out.at(k,0));
for(uword i=0; i < n_rows; ++i)
{
(*outptr) = val * std::conj(P.at(i,k));
outptr += out_n_rows;
}
} }
} }
else // aliasing else // aliasing
{ {
Mat<eT> out2(n_cols, n_rows); Mat<eT> out2(n_cols, n_rows);
const uword out2_n_rows = out2.n_rows;
for(uword k=0; k < n_cols; ++k) for(uword k=0; k < n_cols; ++k)
for(uword i=0; i < n_rows; ++i)
{ {
out2.at(k,i) = val * std::conj(P.at(i,k)); eT* out2ptr = &(out2.at(k,0));
for(uword i=0; i < n_rows; ++i)
{
(*out2ptr) = val * std::conj(P.at(i,k));
out2ptr += out2_n_rows;
}
} }
out.steal_mem(out2); out.steal_mem(out2);
} }
} }
} }
} }
template<typename T1> template<typename T1>
arma_hot arma_hot
 End of changes. 21 change blocks. 
20 lines changed or deleted 64 lines changed or added


 op_strans_meat.hpp   op_strans_meat.hpp 
// Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2014 Conrad Sanderson
// Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // Copyright (C) 2008-2014 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! \addtogroup op_strans //! \addtogroup op_strans
//! @{ //! @{
//! for tiny square matrices (size <= 4x4) //! for tiny square matrices (size <= 4x4)
skipping to change at line 112 skipping to change at line 112
arrayops::copy( out.memptr(), A.memptr(), A.n_elem ); arrayops::copy( out.memptr(), A.memptr(), A.n_elem );
} }
else else
{ {
if( (A_n_rows <= 4) && (A_n_rows == A_n_cols) ) if( (A_n_rows <= 4) && (A_n_rows == A_n_cols) )
{ {
op_strans::apply_mat_noalias_tinysq(out, A); op_strans::apply_mat_noalias_tinysq(out, A);
} }
else else
{ {
const uword out_n_rows = out.n_rows;
const eT* colptr = A.memptr();
for(uword k=0; k < A_n_cols; ++k) for(uword k=0; k < A_n_cols; ++k)
{ {
uword i, j; eT* outptr = &(out.at(k,0));
const eT* colptr = A.colptr(k);
for(i=0, j=1; j < A_n_rows; i+=2, j+=2) uword j;
for(j=1; j < A_n_rows; j+=2)
{ {
const eT tmp_i = colptr[i]; const eT tmp_i = (*colptr); colptr++;
const eT tmp_j = colptr[j]; const eT tmp_j = (*colptr); colptr++;
out.at(k, i) = tmp_i; (*outptr) = tmp_i; outptr += out_n_rows;
out.at(k, j) = tmp_j; (*outptr) = tmp_j; outptr += out_n_rows;
} }
const uword i = j-1;
if(i < A_n_rows) if(i < A_n_rows)
{ {
out.at(k, i) = colptr[i]; (*outptr) = (*colptr); colptr++;
} }
} }
} }
} }
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
void void
skipping to change at line 155 skipping to change at line 160
const uword n_cols = out.n_cols; const uword n_cols = out.n_cols;
if(n_rows == n_cols) if(n_rows == n_cols)
{ {
arma_extra_debug_print("op_strans::apply(): doing in-place transpose of a square matrix"); arma_extra_debug_print("op_strans::apply(): doing in-place transpose of a square matrix");
const uword N = n_rows; const uword N = n_rows;
for(uword k=0; k < N; ++k) for(uword k=0; k < N; ++k)
{ {
eT* colptr = out.colptr(k); eT* colptr = &(out.at(k,k));
eT* rowptr = colptr;
colptr++;
rowptr += N;
uword i,j; uword j;
for(i=(k+1), j=(k+2); j < N; i+=2, j+=2) for(j=(k+2); j < N; j+=2)
{ {
std::swap(out.at(k,i), colptr[i]); std::swap( (*rowptr), (*colptr) ); rowptr += N; colptr++;
std::swap(out.at(k,j), colptr[j]); std::swap( (*rowptr), (*colptr) ); rowptr += N; colptr++;
} }
if(i < N) if((j-1) < N)
{ {
std::swap(out.at(k,i), colptr[i]); std::swap( (*rowptr), (*colptr) );
} }
} }
} }
else else
{ {
Mat<eT> tmp; Mat<eT> tmp;
op_strans::apply_mat_noalias(tmp, out); op_strans::apply_mat_noalias(tmp, out);
out.steal_mem(tmp); out.steal_mem(tmp);
skipping to change at line 286 skipping to change at line 295
out.steal_mem(out2); out.steal_mem(out2);
} }
} }
else // general matrix transpose else // general matrix transpose
{ {
if(is_alias == false) if(is_alias == false)
{ {
out.set_size(n_cols, n_rows); out.set_size(n_cols, n_rows);
const uword out_n_rows = out.n_rows;
for(uword k=0; k < n_cols; ++k) for(uword k=0; k < n_cols; ++k)
{ {
uword i, j; eT* outptr = &(out.at(k,0));
for(i=0, j=1; j < n_rows; i+=2, j+=2) uword j;
for(j=1; j < n_rows; j+=2)
{ {
const uword i = j-1;
const eT tmp_i = P.at(i,k); const eT tmp_i = P.at(i,k);
const eT tmp_j = P.at(j,k); const eT tmp_j = P.at(j,k);
out.at(k,i) = tmp_i; (*outptr) = tmp_i; outptr += out_n_rows;
out.at(k,j) = tmp_j; (*outptr) = tmp_j; outptr += out_n_rows;
} }
const uword i = j-1;
if(i < n_rows) if(i < n_rows)
{ {
out.at(k,i) = P.at(i,k); (*outptr) = P.at(i,k);
} }
} }
} }
else // aliasing else // aliasing
{ {
Mat<eT> out2(n_cols, n_rows); Mat<eT> out2(n_cols, n_rows);
const uword out2_n_rows = out2.n_rows;
for(uword k=0; k < n_cols; ++k) for(uword k=0; k < n_cols; ++k)
{ {
uword i, j; eT* out2ptr = &(out2.at(k,0));
for(i=0, j=1; j < n_rows; i+=2, j+=2) uword j;
for(j=1; j < n_rows; j+=2)
{ {
const uword i = j-1;
const eT tmp_i = P.at(i,k); const eT tmp_i = P.at(i,k);
const eT tmp_j = P.at(j,k); const eT tmp_j = P.at(j,k);
out2.at(k,i) = tmp_i; (*out2ptr) = tmp_i; out2ptr += out2_n_rows;
out2.at(k,j) = tmp_j; (*out2ptr) = tmp_j; out2ptr += out2_n_rows;
} }
const uword i = j-1;
if(i < n_rows) if(i < n_rows)
{ {
out2.at(k,i) = P.at(i,k); (*out2ptr) = P.at(i,k);
} }
} }
out.steal_mem(out2); out.steal_mem(out2);
} }
} }
} }
} }
template<typename T1> template<typename T1>
skipping to change at line 465 skipping to change at line 488
} }
} }
else else
{ {
if( (A_n_rows <= 4) && (A_n_rows == A_n_cols) ) if( (A_n_rows <= 4) && (A_n_rows == A_n_cols) )
{ {
op_strans2::apply_noalias_tinysq(out, A, val); op_strans2::apply_noalias_tinysq(out, A, val);
} }
else else
{ {
const uword out_n_rows = out.n_rows;
const eT* colptr = A.memptr();
for(uword k=0; k < A_n_cols; ++k) for(uword k=0; k < A_n_cols; ++k)
{ {
uword i, j; eT* outptr = &(out.at(k,0));
const eT* colptr = A.colptr(k);
for(i=0, j=1; j < A_n_rows; i+=2, j+=2) uword j;
for(j=1; j < A_n_rows; j+=2)
{ {
const eT tmp_i = colptr[i]; const eT tmp_i = (*colptr); colptr++;
const eT tmp_j = colptr[j]; const eT tmp_j = (*colptr); colptr++;
out.at(k, i) = val * tmp_i; (*outptr) = val * tmp_i; outptr += out_n_rows;
out.at(k, j) = val * tmp_j; (*outptr) = val * tmp_j; outptr += out_n_rows;
} }
const uword i = j-1;
if(i < A_n_rows) if(i < A_n_rows)
{ {
out.at(k, i) = val * colptr[i]; (*outptr) = val * (*colptr); colptr++;
} }
} }
} }
} }
} }
template<typename eT, typename TA> template<typename eT, typename TA>
arma_hot arma_hot
inline inline
void void
skipping to change at line 631 skipping to change at line 659
out.steal_mem(out2); out.steal_mem(out2);
} }
} }
else // general matrix transpose else // general matrix transpose
{ {
if(is_alias == false) if(is_alias == false)
{ {
out.set_size(n_cols, n_rows); out.set_size(n_cols, n_rows);
const uword out_n_rows = out.n_rows;
for(uword k=0; k < n_cols; ++k) for(uword k=0; k < n_cols; ++k)
{ {
uword i, j; eT* outptr = &(out.at(k,0));
for(i=0, j=1; j < n_rows; i+=2, j+=2) uword j;
for(j=1; j < n_rows; j+=2)
{ {
const uword i = j-1;
const eT tmp_i = P.at(i,k); const eT tmp_i = P.at(i,k);
const eT tmp_j = P.at(j,k); const eT tmp_j = P.at(j,k);
out.at(k,i) = val * tmp_i; (*outptr) = val * tmp_i; outptr += out_n_rows;
out.at(k,j) = val * tmp_j; (*outptr) = val * tmp_j; outptr += out_n_rows;
} }
const uword i = j-1;
if(i < n_rows) if(i < n_rows)
{ {
out.at(k,i) = val * P.at(i,k); (*outptr) = val * P.at(i,k);
} }
} }
} }
else // aliasing else // aliasing
{ {
Mat<eT> out2(n_cols, n_rows); Mat<eT> out2(n_cols, n_rows);
const uword out2_n_rows = out2.n_rows;
for(uword k=0; k < n_cols; ++k) for(uword k=0; k < n_cols; ++k)
{ {
uword i, j; eT* out2ptr = &(out2.at(k,0));
for(i=0, j=1; j < n_rows; i+=2, j+=2) uword j;
for(j=1; j < n_rows; j+=2)
{ {
const uword i = j-1;
const eT tmp_i = P.at(i,k); const eT tmp_i = P.at(i,k);
const eT tmp_j = P.at(j,k); const eT tmp_j = P.at(j,k);
out2.at(k,i) = val * tmp_i; (*out2ptr) = val * tmp_i; out2ptr += out2_n_rows;
out2.at(k,j) = val * tmp_j; (*out2ptr) = val * tmp_j; out2ptr += out2_n_rows;
} }
const uword i = j-1;
if(i < n_rows) if(i < n_rows)
{ {
out2.at(k,i) = val * P.at(i,k); (*out2ptr) = val * P.at(i,k);
} }
} }
out.steal_mem(out2); out.steal_mem(out2);
} }
} }
} }
} }
//! @} //! @}
 End of changes. 49 change blocks. 
47 lines changed or deleted 89 lines changed or added


 subview_bones.hpp   subview_bones.hpp 
skipping to change at line 150 skipping to change at line 150
template<typename T1> inline subview_each2< subview<eT>, 0, T1 > each_col (const Base<uword, T1>& indices); template<typename T1> inline subview_each2< subview<eT>, 0, T1 > each_col (const Base<uword, T1>& indices);
template<typename T1> inline subview_each2< subview<eT>, 1, T1 > each_row (const Base<uword, T1>& indices); template<typename T1> inline subview_each2< subview<eT>, 1, T1 > each_row (const Base<uword, T1>& indices);
inline diagview<eT> diag(const sword in_id = 0); inline diagview<eT> diag(const sword in_id = 0);
inline const diagview<eT> diag(const sword in_id = 0) const; inline const diagview<eT> diag(const sword in_id = 0) const;
inline void swap_rows(const uword in_row1, const uword in_row2); inline void swap_rows(const uword in_row1, const uword in_row2);
inline void swap_cols(const uword in_col1, const uword in_col2); inline void swap_cols(const uword in_col1, const uword in_col2);
// // primitive forward iterator
// class iter
// {
// public:
//
// inline iter(const subview<eT>& in_M);
//
// arma_inline eT operator* () const;
//
// inline void operator++();
// inline void operator++(int);
//
//
// private:
//
// arma_aligned const eT* mem;
//
// arma_aligned uword n_rows;
//
// arma_aligned uword row_start;
// arma_aligned uword row_end_p1;
//
// arma_aligned uword row;
// arma_aligned uword col;
// arma_aligned uword i;
// };
private: private:
friend class Mat<eT>; friend class Mat<eT>;
subview(); subview();
}; };
template<typename eT> template<typename eT>
class subview_col : public subview<eT> class subview_col : public subview<eT>
{ {
public: public:
skipping to change at line 237 skipping to change at line 210
arma_inline eT* colptr(const uword in_col); arma_inline eT* colptr(const uword in_col);
arma_inline const eT* colptr(const uword in_col) const; arma_inline const eT* colptr(const uword in_col) const;
inline subview_col<eT> rows(const uword in_row1, const uword in_row 2); inline subview_col<eT> rows(const uword in_row1, const uword in_row 2);
inline const subview_col<eT> rows(const uword in_row1, const uword in_row 2) const; inline const subview_col<eT> rows(const uword in_row1, const uword in_row 2) const;
inline subview_col<eT> subvec(const uword in_row1, const uword in_r ow2); inline subview_col<eT> subvec(const uword in_row1, const uword in_r ow2);
inline const subview_col<eT> subvec(const uword in_row1, const uword in_r ow2) const; inline const subview_col<eT> subvec(const uword in_row1, const uword in_r ow2) const;
// TODO: add operator()(span) inline subview_col<eT> head(const uword N);
inline const subview_col<eT> head(const uword N) const;
inline subview_col<eT> tail(const uword N);
inline const subview_col<eT> tail(const uword N) const;
protected: protected:
inline subview_col(const Mat<eT>& in_m, const uword in_col); inline subview_col(const Mat<eT>& in_m, const uword in_col);
inline subview_col(const Mat<eT>& in_m, const uword in_col, const uword i n_row1, const uword in_n_rows); inline subview_col(const Mat<eT>& in_m, const uword in_col, const uword i n_row1, const uword in_n_rows);
private: private:
friend class Mat<eT>; friend class Mat<eT>;
friend class Col<eT>; friend class Col<eT>;
skipping to change at line 298 skipping to change at line 275
inline eT& at(const uword in_row, const uword in_col); inline eT& at(const uword in_row, const uword in_col);
inline eT at(const uword in_row, const uword in_col) const; inline eT at(const uword in_row, const uword in_col) const;
inline subview_row<eT> cols(const uword in_col1, const uword in_col 2); inline subview_row<eT> cols(const uword in_col1, const uword in_col 2);
inline const subview_row<eT> cols(const uword in_col1, const uword in_col 2) const; inline const subview_row<eT> cols(const uword in_col1, const uword in_col 2) const;
inline subview_row<eT> subvec(const uword in_col1, const uword in_c ol2); inline subview_row<eT> subvec(const uword in_col1, const uword in_c ol2);
inline const subview_row<eT> subvec(const uword in_col1, const uword in_c ol2) const; inline const subview_row<eT> subvec(const uword in_col1, const uword in_c ol2) const;
// TODO: add operator()(span) inline subview_row<eT> head(const uword N);
inline const subview_row<eT> head(const uword N) const;
inline subview_row<eT> tail(const uword N);
inline const subview_row<eT> tail(const uword N) const;
protected: protected:
inline subview_row(const Mat<eT>& in_m, const uword in_row); inline subview_row(const Mat<eT>& in_m, const uword in_row);
inline subview_row(const Mat<eT>& in_m, const uword in_row, const uword i n_col1, const uword in_n_cols); inline subview_row(const Mat<eT>& in_m, const uword in_row, const uword i n_col1, const uword in_n_cols);
private: private:
friend class Mat<eT>; friend class Mat<eT>;
friend class Row<eT>; friend class Row<eT>;
 End of changes. 3 change blocks. 
29 lines changed or deleted 10 lines changed or added


 subview_meat.hpp   subview_meat.hpp 
skipping to change at line 2727 skipping to change at line 2727
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview<eT>::n_row s) ), "subview_col::subvec(): indices out of bounds or incorrectly used"); arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview<eT>::n_row s) ), "subview_col::subvec(): indices out of bounds or incorrectly used");
const uword subview_n_rows = in_row2 - in_row1 + 1; const uword subview_n_rows = in_row2 - in_row1 + 1;
const uword base_row1 = this->aux_row1 + in_row1; const uword base_row1 = this->aux_row1 + in_row1;
return subview_col<eT>(this->m, this->aux_col1, base_row1, subview_n_rows ); return subview_col<eT>(this->m, this->aux_col1, base_row1, subview_n_rows );
} }
template<typename eT>
inline
subview_col<eT>
subview_col<eT>::head(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::head(): size o
ut of bounds");
return subview_col<eT>(this->m, this->aux_col1, this->aux_row1, N);
}
template<typename eT>
inline
const subview_col<eT>
subview_col<eT>::head(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::head(): size o
ut of bounds");
return subview_col<eT>(this->m, this->aux_col1, this->aux_row1, N);
}
template<typename eT>
inline
subview_col<eT>
subview_col<eT>::tail(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::tail(): size o
ut of bounds");
const uword start_row = subview<eT>::n_rows - N;
return subview_col<eT>(this->m, this->aux_col1, start_row, N);
}
template<typename eT>
inline
const subview_col<eT>
subview_col<eT>::tail(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::tail(): size o
ut of bounds");
const uword start_row = subview<eT>::n_rows - N;
return subview_col<eT>(this->m, this->aux_col1, start_row, N);
}
// //
// //
// //
template<typename eT> template<typename eT>
inline inline
subview_row<eT>::subview_row(const Mat<eT>& in_m, const uword in_row) subview_row<eT>::subview_row(const Mat<eT>& in_m, const uword in_row)
: subview<eT>(in_m, in_row, 0, 1, in_m.n_cols) : subview<eT>(in_m, in_row, 0, 1, in_m.n_cols)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
skipping to change at line 2987 skipping to change at line 3039
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview<eT>::n_col s) ), "subview_row::subvec(): indices out of bounds or incorrectly used"); arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview<eT>::n_col s) ), "subview_row::subvec(): indices out of bounds or incorrectly used");
const uword subview_n_cols = in_col2 - in_col1 + 1; const uword subview_n_cols = in_col2 - in_col1 + 1;
const uword base_col1 = this->aux_col1 + in_col1; const uword base_col1 = this->aux_col1 + in_col1;
return subview_row<eT>(this->m, this->aux_row1, base_col1, subview_n_cols ); return subview_row<eT>(this->m, this->aux_row1, base_col1, subview_n_cols );
} }
template<typename eT>
inline
subview_row<eT>
subview_row<eT>::head(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::head(): size o
ut of bounds");
return subview_row<eT>(this->m, this->aux_row1, this->aux_col1, N);
}
template<typename eT>
inline
const subview_row<eT>
subview_row<eT>::head(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::head(): size o
ut of bounds");
return subview_row<eT>(this->m, this->aux_row1, this->aux_col1, N);
}
template<typename eT>
inline
subview_row<eT>
subview_row<eT>::tail(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::tail(): size o
ut of bounds");
const uword start_col = subview<eT>::n_cols - N;
return subview_row<eT>(this->m, this->aux_row1, start_col, N);
}
template<typename eT>
inline
const subview_row<eT>
subview_row<eT>::tail(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::tail(): size o
ut of bounds");
const uword start_col = subview<eT>::n_cols - N;
return subview_row<eT>(this->m, this->aux_row1, start_col, N);
}
// //
// //
// //
template<typename eT> template<typename eT>
inline inline
subview_row_strans<eT>::subview_row_strans(const subview_row<eT>& in_sv_row ) subview_row_strans<eT>::subview_row_strans(const subview_row<eT>& in_sv_row )
: sv_row(in_sv_row ) : sv_row(in_sv_row )
, n_rows(in_sv_row.n_cols) , n_rows(in_sv_row.n_cols)
, n_elem(in_sv_row.n_elem) , n_elem(in_sv_row.n_elem)
 End of changes. 2 change blocks. 
0 lines changed or deleted 112 lines changed or added


 unwrap.hpp   unwrap.hpp 
skipping to change at line 651 skipping to change at line 651
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
inline inline
partial_unwrap_default(const T1& A) partial_unwrap_default(const T1& A)
: M(A) : M(A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>&) const { return false; } arma_inline bool is_alias(const Mat<eT>&) const { return false; }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
const Mat<eT> M; const Mat<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_fixed struct partial_unwrap_fixed
{ {
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef T1 stored_type; typedef T1 stored_type;
inline explicit inline explicit
partial_unwrap_fixed(const T1& A) partial_unwrap_fixed(const T1& A)
: M(A) : M(A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&M)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
const T1& M; const T1& M;
}; };
template<typename T1, bool condition> template<typename T1, bool condition>
struct partial_unwrap_redirect {}; struct partial_unwrap_redirect {};
skipping to change at line 715 skipping to change at line 715
{ {
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
inline inline
partial_unwrap(const Mat<eT>& A) partial_unwrap(const Mat<eT>& A)
: M(A) : M(A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return ((&X) == (&M)); } arma_inline bool is_alias(const Mat<eT>& X) const { return ((&X) == (&M)) ; }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
const Mat<eT>& M; const Mat<eT>& M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap< Row<eT> > struct partial_unwrap< Row<eT> >
{ {
typedef Row<eT> stored_type; typedef Row<eT> stored_type;
inline inline
partial_unwrap(const Row<eT>& A) partial_unwrap(const Row<eT>& A)
: M(A) : M(A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&M)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
const Row<eT>& M; const Row<eT>& M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap< Col<eT> > struct partial_unwrap< Col<eT> >
{ {
typedef Col<eT> stored_type; typedef Col<eT> stored_type;
inline inline
partial_unwrap(const Col<eT>& A) partial_unwrap(const Col<eT>& A)
: M(A) : M(A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&M)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
const Col<eT>& M; const Col<eT>& M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap< subview_col<eT> > struct partial_unwrap< subview_col<eT> >
{ {
typedef Col<eT> stored_type; typedef Col<eT> stored_type;
inline inline
partial_unwrap(const subview_col<eT>& A) partial_unwrap(const subview_col<eT>& A)
: orig( A.m ) : orig( A.m )
, M ( const_cast<eT*>( A.colptr(0) ), A.n_rows, false, false ) , M ( const_cast<eT*>( A.colptr(0) ), A.n_rows, false, false )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&orig)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&orig)); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
const Mat<eT>& orig; const Mat<eT>& orig;
const Col<eT> M; const Col<eT> M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap< subview_row<eT> > struct partial_unwrap< subview_row<eT> >
{ {
typedef Row<eT> stored_type; typedef Row<eT> stored_type;
inline inline
partial_unwrap(const subview_row<eT>& A) partial_unwrap(const subview_row<eT>& A)
: M(A) : M(A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>&) const { return false; } arma_inline bool is_alias(const Mat<eT>&) const { return false; }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
const Row<eT> M; const Row<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_htrans_default struct partial_unwrap_htrans_default
{ {
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
inline inline
partial_unwrap_htrans_default(const Op<T1, op_htrans>& A) partial_unwrap_htrans_default(const Op<T1, op_htrans>& A)
: M(A.m) : M(A.m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>&) const { return false; } arma_inline bool is_alias(const Mat<eT>&) const { return false; }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
const Mat<eT> M; const Mat<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_htrans_fixed struct partial_unwrap_htrans_fixed
{ {
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef T1 stored_type; typedef T1 stored_type;
inline explicit inline explicit
partial_unwrap_htrans_fixed(const Op<T1, op_htrans>& A) partial_unwrap_htrans_fixed(const Op<T1, op_htrans>& A)
: M(A.m) : M(A.m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&M)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
const T1& M; const T1& M;
}; };
template<typename T1, bool condition> template<typename T1, bool condition>
struct partial_unwrap_htrans_redirect {}; struct partial_unwrap_htrans_redirect {};
skipping to change at line 893 skipping to change at line 893
inline inline
partial_unwrap(const Op< Mat<eT>, op_htrans>& A) partial_unwrap(const Op< Mat<eT>, op_htrans>& A)
: M(A.m) : M(A.m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&M)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
const Mat<eT>& M; const Mat<eT>& M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap< Op< Row<eT>, op_htrans> > struct partial_unwrap< Op< Row<eT>, op_htrans> >
{ {
skipping to change at line 915 skipping to change at line 915
inline inline
partial_unwrap(const Op< Row<eT>, op_htrans>& A) partial_unwrap(const Op< Row<eT>, op_htrans>& A)
: M(A.m) : M(A.m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&M)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
const Row<eT>& M; const Row<eT>& M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap< Op< Col<eT>, op_htrans> > struct partial_unwrap< Op< Col<eT>, op_htrans> >
{ {
skipping to change at line 937 skipping to change at line 937
inline inline
partial_unwrap(const Op< Col<eT>, op_htrans>& A) partial_unwrap(const Op< Col<eT>, op_htrans>& A)
: M(A.m) : M(A.m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&M)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
const Col<eT>& M; const Col<eT>& M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap< Op< subview_col<eT>, op_htrans> > struct partial_unwrap< Op< subview_col<eT>, op_htrans> >
{ {
skipping to change at line 960 skipping to change at line 960
inline inline
partial_unwrap(const Op< subview_col<eT>, op_htrans>& A) partial_unwrap(const Op< subview_col<eT>, op_htrans>& A)
: orig( A.m.m ) : orig( A.m.m )
, M ( const_cast<eT*>( A.m.colptr(0) ), A.m.n_rows, false, false ) , M ( const_cast<eT*>( A.m.colptr(0) ), A.m.n_rows, false, false )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&orig)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&orig)); }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
const Mat<eT>& orig; const Mat<eT>& orig;
const Col<eT> M; const Col<eT> M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap< Op< subview_row<eT>, op_htrans> > struct partial_unwrap< Op< subview_row<eT>, op_htrans> >
skipping to change at line 983 skipping to change at line 983
inline inline
partial_unwrap(const Op< subview_row<eT>, op_htrans>& A) partial_unwrap(const Op< subview_row<eT>, op_htrans>& A)
: M(A.m) : M(A.m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
arma_hot arma_inline bool is_alias(const Mat<eT>&) const { return false; } arma_inline bool is_alias(const Mat<eT>&) const { return false; }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
const Row<eT> M; const Row<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_htrans2_default struct partial_unwrap_htrans2_default
{ {
skipping to change at line 1007 skipping to change at line 1007
inline inline
partial_unwrap_htrans2_default(const Op<T1, op_htrans2>& A) partial_unwrap_htrans2_default(const Op<T1, op_htrans2>& A)
: val(A.aux) : val(A.aux)
, M (A.m) , M (A.m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline eT get_val() const { return val; } arma_inline eT get_val() const { return val; }
arma_hot arma_inline bool is_alias(const Mat<eT>&) const { return false; } arma_inline bool is_alias(const Mat<eT>&) const { return false; }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = true; static const bool do_times = true;
const eT val; const eT val;
const Mat<eT> M; const Mat<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_htrans2_fixed struct partial_unwrap_htrans2_fixed
skipping to change at line 1171 skipping to change at line 1171
typedef Row<eT> stored_type; typedef Row<eT> stored_type;
inline inline
partial_unwrap(const Op< subview_row<eT>, op_htrans2>& A) partial_unwrap(const Op< subview_row<eT>, op_htrans2>& A)
: val(A.aux) : val(A.aux)
, M (A.m ) , M (A.m )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
inline eT get_val() const { return val; } arma_inline eT get_val() const { return val; }
arma_hot arma_inline bool is_alias(const Mat<eT>&) const { return false; } arma_inline bool is_alias(const Mat<eT>&) const { return false; }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = true; static const bool do_times = true;
const eT val; const eT val;
const Row<eT> M; const Row<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_scalar_times_default struct partial_unwrap_scalar_times_default
skipping to change at line 1196 skipping to change at line 1196
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
inline inline
partial_unwrap_scalar_times_default(const eOp<T1, eop_scalar_times>& A) partial_unwrap_scalar_times_default(const eOp<T1, eop_scalar_times>& A)
: val(A.aux) : val(A.aux)
, M (A.P.Q) , M (A.P.Q)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return val; } arma_inline eT get_val() const { return val; }
arma_hot arma_inline bool is_alias(const Mat<eT>&) const { return false; } arma_inline bool is_alias(const Mat<eT>&) const { return false; }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const eT val; const eT val;
const Mat<eT> M; const Mat<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_scalar_times_fixed struct partial_unwrap_scalar_times_fixed
skipping to change at line 1365 skipping to change at line 1365
typedef Row<eT> stored_type; typedef Row<eT> stored_type;
arma_hot inline arma_hot inline
partial_unwrap(const eOp<subview_row<eT>,eop_scalar_times>& A) partial_unwrap(const eOp<subview_row<eT>,eop_scalar_times>& A)
: val(A.aux) : val(A.aux)
, M (A.P.Q) , M (A.P.Q)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return val; } arma_inline eT get_val() const { return val; }
arma_hot arma_inline bool is_alias(const Mat<eT>&) const { return false; } arma_inline bool is_alias(const Mat<eT>&) const { return false; }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const eT val; const eT val;
const Row<eT> M; const Row<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_neg_default struct partial_unwrap_neg_default
skipping to change at line 1389 skipping to change at line 1389
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
inline inline
partial_unwrap_neg_default(const eOp<T1, eop_neg>& A) partial_unwrap_neg_default(const eOp<T1, eop_neg>& A)
: M(A.P.Q) : M(A.P.Q)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
arma_hot arma_inline bool is_alias(const Mat<eT>&) const { return false; } arma_inline bool is_alias(const Mat<eT>&) const { return false; }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const Mat<eT> M; const Mat<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_neg_fixed struct partial_unwrap_neg_fixed
{ {
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef T1 stored_type; typedef T1 stored_type;
inline explicit inline explicit
partial_unwrap_neg_fixed(const eOp<T1, eop_neg>& A) partial_unwrap_neg_fixed(const eOp<T1, eop_neg>& A)
: M(A.P.Q) : M(A.P.Q)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&M)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const T1& M; const T1& M;
}; };
template<typename T1, bool condition> template<typename T1, bool condition>
struct partial_unwrap_neg_redirect {}; struct partial_unwrap_neg_redirect {};
skipping to change at line 1455 skipping to change at line 1455
{ {
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
inline inline
partial_unwrap(const eOp<Mat<eT>,eop_neg>& A) partial_unwrap(const eOp<Mat<eT>,eop_neg>& A)
: M(A.P.Q) : M(A.P.Q)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&M)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const Mat<eT>& M; const Mat<eT>& M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap< eOp<Row<eT>, eop_neg> > struct partial_unwrap< eOp<Row<eT>, eop_neg> >
{ {
typedef Row<eT> stored_type; typedef Row<eT> stored_type;
inline inline
partial_unwrap(const eOp<Row<eT>,eop_neg>& A) partial_unwrap(const eOp<Row<eT>,eop_neg>& A)
: M(A.P.Q) : M(A.P.Q)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&M)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const Row<eT>& M; const Row<eT>& M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap< eOp<Col<eT>, eop_neg> > struct partial_unwrap< eOp<Col<eT>, eop_neg> >
{ {
typedef Col<eT> stored_type; typedef Col<eT> stored_type;
inline inline
partial_unwrap(const eOp<Col<eT>,eop_neg>& A) partial_unwrap(const eOp<Col<eT>,eop_neg>& A)
: M(A.P.Q) : M(A.P.Q)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&M)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&M)); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const Col<eT>& M; const Col<eT>& M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap< eOp<subview_col<eT>, eop_neg> > struct partial_unwrap< eOp<subview_col<eT>, eop_neg> >
{ {
typedef Col<eT> stored_type; typedef Col<eT> stored_type;
inline inline
partial_unwrap(const eOp<subview_col<eT>,eop_neg>& A) partial_unwrap(const eOp<subview_col<eT>,eop_neg>& A)
: orig( A.P.Q.m ) : orig( A.P.Q.m )
, M ( const_cast<eT*>( A.P.Q.colptr(0) ), A.P.Q.n_rows, false, false ) , M ( const_cast<eT*>( A.P.Q.colptr(0) ), A.P.Q.n_rows, false, false )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
arma_hot arma_inline bool is_alias(const Mat<eT>& X) const { return (void _ptr(&X) == void_ptr(&orig)); } arma_inline bool is_alias(const Mat<eT>& X) const { return (void_ptr(&X) == void_ptr(&orig)); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const Mat<eT>& orig; const Mat<eT>& orig;
const Col<eT> M; const Col<eT> M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap< eOp<subview_row<eT>, eop_neg> > struct partial_unwrap< eOp<subview_row<eT>, eop_neg> >
{ {
typedef Row<eT> stored_type; typedef Row<eT> stored_type;
inline inline
partial_unwrap(const eOp<subview_row<eT>,eop_neg>& A) partial_unwrap(const eOp<subview_row<eT>,eop_neg>& A)
: M(A.P.Q) : M(A.P.Q)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
arma_hot arma_inline bool is_alias(const Mat<eT>&) const { return false; } arma_inline bool is_alias(const Mat<eT>&) const { return false; }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const Row<eT> M; const Row<eT> M;
}; };
// //
template<typename T1> template<typename T1>
skipping to change at line 1570 skipping to change at line 1570
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
inline inline
partial_unwrap_check_default(const T1& A, const Mat<eT>&) partial_unwrap_check_default(const T1& A, const Mat<eT>&)
: M(A) : M(A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
const Mat<eT> M; const Mat<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_check_fixed struct partial_unwrap_check_fixed
{ {
skipping to change at line 1600 skipping to change at line 1600
} }
inline inline
~partial_unwrap_check_fixed() ~partial_unwrap_check_fixed()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(M_local) { delete M_local; } if(M_local) { delete M_local; }
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
const T1* M_local; const T1* M_local;
const T1& M; const T1& M;
}; };
template<typename T1, bool condition> template<typename T1, bool condition>
struct partial_unwrap_check_redirect {}; struct partial_unwrap_check_redirect {};
skipping to change at line 1650 skipping to change at line 1650
} }
inline inline
~partial_unwrap_check() ~partial_unwrap_check()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(M_local) { delete M_local; } if(M_local) { delete M_local; }
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
// the order below is important // the order below is important
const Mat<eT>* M_local; const Mat<eT>* M_local;
const Mat<eT>& M; const Mat<eT>& M;
}; };
template<typename eT> template<typename eT>
skipping to change at line 1681 skipping to change at line 1681
} }
inline inline
~partial_unwrap_check() ~partial_unwrap_check()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(M_local) { delete M_local; } if(M_local) { delete M_local; }
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
// the order below is important // the order below is important
const Row<eT>* M_local; const Row<eT>* M_local;
const Row<eT>& M; const Row<eT>& M;
}; };
template<typename eT> template<typename eT>
skipping to change at line 1712 skipping to change at line 1712
} }
inline inline
~partial_unwrap_check() ~partial_unwrap_check()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(M_local) { delete M_local; } if(M_local) { delete M_local; }
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
// the order below is important // the order below is important
const Col<eT>* M_local; const Col<eT>* M_local;
const Col<eT>& M; const Col<eT>& M;
}; };
// NOTE: we can get away with this shortcut as the partial_unwrap_check cla ss is only used by the glue_times class, // NOTE: we can get away with this shortcut as the partial_unwrap_check cla ss is only used by the glue_times class,
skipping to change at line 1736 skipping to change at line 1736
{ {
typedef Col<eT> stored_type; typedef Col<eT> stored_type;
arma_hot inline arma_hot inline
partial_unwrap_check(const subview_col<eT>& A, const Mat<eT>& B) partial_unwrap_check(const subview_col<eT>& A, const Mat<eT>& B)
: M ( const_cast<eT*>( A.colptr(0) ), A.n_rows, (&(A.m) == &B), false ) : M ( const_cast<eT*>( A.colptr(0) ), A.n_rows, (&(A.m) == &B), false )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = false; static const bool do_times = false;
const Col<eT> M; const Col<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_check_htrans_default struct partial_unwrap_check_htrans_default
{ {
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
inline inline
partial_unwrap_check_htrans_default(const Op<T1, op_htrans>& A, const Mat <eT>&) partial_unwrap_check_htrans_default(const Op<T1, op_htrans>& A, const Mat <eT>&)
: M(A.m) : M(A.m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
const Mat<eT> M; const Mat<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_check_htrans_fixed struct partial_unwrap_check_htrans_fixed
{ {
skipping to change at line 1787 skipping to change at line 1787
} }
inline inline
~partial_unwrap_check_htrans_fixed() ~partial_unwrap_check_htrans_fixed()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(M_local) { delete M_local; } if(M_local) { delete M_local; }
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
const T1* M_local; const T1* M_local;
const T1& M; const T1& M;
}; };
template<typename T1, bool condition> template<typename T1, bool condition>
struct partial_unwrap_check_htrans_redirect {}; struct partial_unwrap_check_htrans_redirect {};
skipping to change at line 1837 skipping to change at line 1837
} }
inline inline
~partial_unwrap_check() ~partial_unwrap_check()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(M_local) { delete M_local; } if(M_local) { delete M_local; }
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
// the order below is important // the order below is important
const Mat<eT>* M_local; const Mat<eT>* M_local;
const Mat<eT>& M; const Mat<eT>& M;
}; };
template<typename eT> template<typename eT>
skipping to change at line 1868 skipping to change at line 1868
} }
inline inline
~partial_unwrap_check() ~partial_unwrap_check()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(M_local) { delete M_local; } if(M_local) { delete M_local; }
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
// the order below is important // the order below is important
const Row<eT>* M_local; const Row<eT>* M_local;
const Row<eT>& M; const Row<eT>& M;
}; };
template<typename eT> template<typename eT>
skipping to change at line 1899 skipping to change at line 1899
} }
inline inline
~partial_unwrap_check() ~partial_unwrap_check()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(M_local) { delete M_local; } if(M_local) { delete M_local; }
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
// the order below is important // the order below is important
const Col<eT>* M_local; const Col<eT>* M_local;
const Col<eT>& M; const Col<eT>& M;
}; };
// NOTE: we can get away with this shortcut as the partial_unwrap_check cla ss is only used by the glue_times class, // NOTE: we can get away with this shortcut as the partial_unwrap_check cla ss is only used by the glue_times class,
skipping to change at line 1923 skipping to change at line 1923
{ {
typedef Col<eT> stored_type; typedef Col<eT> stored_type;
arma_hot inline arma_hot inline
partial_unwrap_check(const Op< subview_col<eT>, op_htrans>& A, const Mat< eT>& B) partial_unwrap_check(const Op< subview_col<eT>, op_htrans>& A, const Mat< eT>& B)
: M ( const_cast<eT*>( A.m.colptr(0) ), A.m.n_rows, (&(A.m.m) == &B), false ) : M ( const_cast<eT*>( A.m.colptr(0) ), A.m.n_rows, (&(A.m.m) == &B), false )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(1); } arma_inline eT get_val() const { return eT(1); }
static const bool do_trans = true; static const bool do_trans = true;
static const bool do_times = false; static const bool do_times = false;
const Col<eT> M; const Col<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_check_htrans2_default struct partial_unwrap_check_htrans2_default
{ {
skipping to change at line 2339 skipping to change at line 2339
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
inline inline
partial_unwrap_check_neg_default(const eOp<T1, eop_neg>& A, const Mat<eT> &) partial_unwrap_check_neg_default(const eOp<T1, eop_neg>& A, const Mat<eT> &)
: M(A.P.Q) : M(A.P.Q)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const Mat<eT> M; const Mat<eT> M;
}; };
template<typename T1> template<typename T1>
struct partial_unwrap_check_neg_fixed struct partial_unwrap_check_neg_fixed
{ {
skipping to change at line 2369 skipping to change at line 2369
} }
inline inline
~partial_unwrap_check_neg_fixed() ~partial_unwrap_check_neg_fixed()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(M_local) { delete M_local; } if(M_local) { delete M_local; }
} }
arma_hot arma_inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const T1* M_local; const T1* M_local;
const T1& M; const T1& M;
}; };
template<typename T1, bool condition> template<typename T1, bool condition>
struct partial_unwrap_check_neg_redirect {}; struct partial_unwrap_check_neg_redirect {};
skipping to change at line 2419 skipping to change at line 2419
} }
inline inline
~partial_unwrap_check() ~partial_unwrap_check()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(M_local) { delete M_local; } if(M_local) { delete M_local; }
} }
arma_hot arma_inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const Mat<eT>* M_local; const Mat<eT>* M_local;
const Mat<eT>& M; const Mat<eT>& M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap_check< eOp<Row<eT>, eop_neg> > struct partial_unwrap_check< eOp<Row<eT>, eop_neg> >
skipping to change at line 2449 skipping to change at line 2449
} }
inline inline
~partial_unwrap_check() ~partial_unwrap_check()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(M_local) { delete M_local; } if(M_local) { delete M_local; }
} }
arma_hot arma_inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const Row<eT>* M_local; const Row<eT>* M_local;
const Row<eT>& M; const Row<eT>& M;
}; };
template<typename eT> template<typename eT>
struct partial_unwrap_check< eOp<Col<eT>, eop_neg> > struct partial_unwrap_check< eOp<Col<eT>, eop_neg> >
skipping to change at line 2479 skipping to change at line 2479
} }
inline inline
~partial_unwrap_check() ~partial_unwrap_check()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(M_local) { delete M_local; } if(M_local) { delete M_local; }
} }
arma_hot arma_inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const Col<eT>* M_local; const Col<eT>* M_local;
const Col<eT>& M; const Col<eT>& M;
}; };
// NOTE: we can get away with this shortcut as the partial_unwrap_check cla ss is only used by the glue_times class, // NOTE: we can get away with this shortcut as the partial_unwrap_check cla ss is only used by the glue_times class,
// NOTE: which relies on partial_unwrap_check to check for aliasing // NOTE: which relies on partial_unwrap_check to check for aliasing
skipping to change at line 2502 skipping to change at line 2502
{ {
typedef Col<eT> stored_type; typedef Col<eT> stored_type;
arma_hot inline arma_hot inline
partial_unwrap_check(const eOp<subview_col<eT>,eop_neg>& A, const Mat<eT> & B) partial_unwrap_check(const eOp<subview_col<eT>,eop_neg>& A, const Mat<eT> & B)
: M ( const_cast<eT*>( A.P.Q.colptr(0) ), A.P.Q.n_rows, (&(A.P.Q.m) == &B), false ) : M ( const_cast<eT*>( A.P.Q.colptr(0) ), A.P.Q.n_rows, (&(A.P.Q.m) == &B), false )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_hot arma_inline eT get_val() const { return eT(-1); } arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const Col<eT> M; const Col<eT> M;
}; };
//! @} //! @}
 End of changes. 62 change blocks. 
62 lines changed or deleted 62 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/