rework sparse reduction operations
This commit is contained in:
+1
-5
@@ -220,9 +220,7 @@ namespace arma
|
||||
#include "armadillo_bits/CubeToMatOp_bones.hpp"
|
||||
#include "armadillo_bits/OpCube_bones.hpp"
|
||||
#include "armadillo_bits/SpOp_bones.hpp"
|
||||
#include "armadillo_bits/SpReductionOp_bones.hpp"
|
||||
#include "armadillo_bits/SpToDOp_bones.hpp"
|
||||
#include "armadillo_bits/mtSpToDOp_bones.hpp"
|
||||
#include "armadillo_bits/mtSpReductionOp_bones.hpp"
|
||||
|
||||
#include "armadillo_bits/eOp_bones.hpp"
|
||||
@@ -625,14 +623,12 @@ namespace arma
|
||||
#include "armadillo_bits/CubeToMatOp_meat.hpp"
|
||||
#include "armadillo_bits/OpCube_meat.hpp"
|
||||
#include "armadillo_bits/SpOp_meat.hpp"
|
||||
#include "armadillo_bits/SpReductionOp_meat.hpp"
|
||||
#include "armadillo_bits/SpToDOp_meat.hpp"
|
||||
#include "armadillo_bits/mtSpToDOp_meat.hpp"
|
||||
#include "armadillo_bits/mtSpReductionOp_meat.hpp"
|
||||
|
||||
#include "armadillo_bits/mtOp_meat.hpp"
|
||||
#include "armadillo_bits/mtOpCube_meat.hpp"
|
||||
#include "armadillo_bits/mtSpOp_meat.hpp"
|
||||
#include "armadillo_bits/mtSpReductionOp_meat.hpp"
|
||||
|
||||
#include "armadillo_bits/Glue_meat.hpp"
|
||||
#include "armadillo_bits/GlueCube_meat.hpp"
|
||||
|
||||
@@ -32,7 +32,6 @@ class Col : public Mat<eT>
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline Col();
|
||||
inline Col(const Col<eT>& X);
|
||||
@@ -203,7 +202,6 @@ class Col<eT>::fixed : public Col<eT>
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
static const uword n_rows; // value provided below the class definition
|
||||
static const uword n_cols; // value provided below the class definition
|
||||
|
||||
@@ -39,7 +39,6 @@ class CubeToMatOp : public Base< typename T1::elem_type, CubeToMatOp<T1, op_type
|
||||
static constexpr bool is_row = op_type::template traits<T1>::is_row;
|
||||
static constexpr bool is_col = op_type::template traits<T1>::is_col;
|
||||
static constexpr bool is_xvec = op_type::template traits<T1>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ class Gen
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T1::is_col;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const uword n_rows;
|
||||
arma_aligned const uword n_cols;
|
||||
|
||||
@@ -31,7 +31,6 @@ struct Glue_traits<T1, T2, glue_type, true>
|
||||
static constexpr bool is_row = glue_type::template traits<T1,T2>::is_row;
|
||||
static constexpr bool is_col = glue_type::template traits<T1,T2>::is_col;
|
||||
static constexpr bool is_xvec = glue_type::template traits<T1,T2>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2, typename glue_type>
|
||||
@@ -40,7 +39,6 @@ struct Glue_traits<T1, T2, glue_type, false>
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ class MapMat
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
const uword n_rows; //!< number of rows (read-only)
|
||||
const uword n_cols; //!< number of columns (read-only)
|
||||
|
||||
@@ -56,7 +56,6 @@ class Mat : public Base< eT, Mat<eT> >
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline ~Mat();
|
||||
inline Mat();
|
||||
@@ -369,13 +368,13 @@ class Mat : public Base< eT, Mat<eT> >
|
||||
template<typename T1, typename op_type> inline Mat& operator%=(const SpToDOp<T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator/=(const SpToDOp<T1, op_type>& X);
|
||||
|
||||
template<typename T1, typename op_type> inline Mat(const mtSpToDOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator= (const mtSpToDOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator+=(const mtSpToDOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator-=(const mtSpToDOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator*=(const mtSpToDOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator%=(const mtSpToDOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator/=(const mtSpToDOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline explicit Mat(const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator= (const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator+=(const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator-=(const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator*=(const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator%=(const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline Mat& operator/=(const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
|
||||
template<typename T1, typename T2, typename glue_type> inline Mat(const Glue<T1, T2, glue_type>& X);
|
||||
template<typename T1, typename T2, typename glue_type> inline Mat& operator= (const Glue<T1, T2, glue_type>& X);
|
||||
@@ -839,7 +838,6 @@ class Mat<eT>::fixed : public Mat<eT>
|
||||
static constexpr bool is_col = (fixed_n_cols == 1);
|
||||
static constexpr bool is_row = (fixed_n_rows == 1);
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
static const uword n_rows; // value provided below the class definition
|
||||
static const uword n_cols; // value provided below the class definition
|
||||
|
||||
@@ -5658,7 +5658,7 @@ Mat<eT>::operator/=(const SpToDOp<T1, op_type>& X)
|
||||
template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
Mat<eT>::Mat(const mtSpToDOp<eT, T1, op_type>& X)
|
||||
Mat<eT>::Mat(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
: n_rows(0)
|
||||
, n_cols(0)
|
||||
, n_elem(0)
|
||||
@@ -5678,7 +5678,7 @@ template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
Mat<eT>&
|
||||
Mat<eT>::operator=(const mtSpToDOp<eT, T1, op_type>& X)
|
||||
Mat<eT>::operator=(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
@@ -5693,7 +5693,7 @@ template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
Mat<eT>&
|
||||
Mat<eT>::operator+=(const mtSpToDOp<eT, T1, op_type>& X)
|
||||
Mat<eT>::operator+=(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
@@ -5708,7 +5708,7 @@ template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
Mat<eT>&
|
||||
Mat<eT>::operator-=(const mtSpToDOp<eT, T1, op_type>& X)
|
||||
Mat<eT>::operator-=(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
@@ -5723,7 +5723,7 @@ template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
Mat<eT>&
|
||||
Mat<eT>::operator*=(const mtSpToDOp<eT, T1, op_type>& X)
|
||||
Mat<eT>::operator*=(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
@@ -5738,7 +5738,7 @@ template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
Mat<eT>&
|
||||
Mat<eT>::operator%=(const mtSpToDOp<eT, T1, op_type>& X)
|
||||
Mat<eT>::operator%=(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
@@ -5753,7 +5753,7 @@ template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
Mat<eT>&
|
||||
Mat<eT>::operator/=(const mtSpToDOp<eT, T1, op_type>& X)
|
||||
Mat<eT>::operator/=(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ struct Op_traits<T1, op_type, true>
|
||||
static constexpr bool is_row = op_type::template traits<T1>::is_row;
|
||||
static constexpr bool is_col = op_type::template traits<T1>::is_col;
|
||||
static constexpr bool is_xvec = op_type::template traits<T1>::is_xvec;
|
||||
static constexpr bool is_d2sp = op_type::template traits<T1>::is_d2sp;
|
||||
};
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
@@ -40,7 +39,6 @@ struct Op_traits<T1, op_type, false>
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
// is_row = boolean to indicate Q object can be treated a row vector
|
||||
// is_col = boolean to indicate Q object can be treated a column vector
|
||||
// is_xvec = boolean to indicate Q object is a vector with unknown orientation
|
||||
// is_d2sp = boolean to indicate Q object can be implicitly converted from dense to sparse (for backwards compatibility)
|
||||
//
|
||||
// Q = object that can be unwrapped via the unwrap family of classes (ie. Q must be convertible to Mat)
|
||||
//
|
||||
@@ -83,7 +82,6 @@ struct Proxy_fixed
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T1::is_col;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const T1& Q;
|
||||
|
||||
@@ -169,7 +167,6 @@ struct Proxy< Mat<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<eT>& Q;
|
||||
|
||||
@@ -217,7 +214,6 @@ struct Proxy< Col<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Col<eT>& Q;
|
||||
|
||||
@@ -265,7 +261,6 @@ struct Proxy< Row<eT> >
|
||||
static constexpr bool is_row = true;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Row<eT>& Q;
|
||||
|
||||
@@ -313,7 +308,6 @@ struct Proxy< Gen<T1, gen_type> >
|
||||
static constexpr bool is_row = Gen<T1, gen_type>::is_row;
|
||||
static constexpr bool is_col = Gen<T1, gen_type>::is_col;
|
||||
static constexpr bool is_xvec = Gen<T1, gen_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Gen<T1, gen_type>& Q;
|
||||
|
||||
@@ -361,7 +355,6 @@ struct Proxy< eOp<T1, eop_type> >
|
||||
static constexpr bool is_row = eOp<T1, eop_type>::is_row;
|
||||
static constexpr bool is_col = eOp<T1, eop_type>::is_col;
|
||||
static constexpr bool is_xvec = eOp<T1, eop_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = eOp<T1, eop_type>::is_d2sp;
|
||||
|
||||
arma_aligned const eOp<T1, eop_type>& Q;
|
||||
|
||||
@@ -409,7 +402,6 @@ struct Proxy< eGlue<T1, T2, eglue_type> >
|
||||
static constexpr bool is_row = eGlue<T1, T2, eglue_type>::is_row;
|
||||
static constexpr bool is_col = eGlue<T1, T2, eglue_type>::is_col;
|
||||
static constexpr bool is_xvec = eGlue<T1, T2, eglue_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = eGlue<T1, T2, eglue_type>::is_d2sp;
|
||||
|
||||
arma_aligned const eGlue<T1, T2, eglue_type>& Q;
|
||||
|
||||
@@ -457,7 +449,6 @@ struct Proxy< Op<T1, op_type> >
|
||||
static constexpr bool is_row = Op<T1, op_type>::is_row;
|
||||
static constexpr bool is_col = Op<T1, op_type>::is_col;
|
||||
static constexpr bool is_xvec = Op<T1, op_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = Op<T1, op_type>::is_d2sp;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
|
||||
@@ -505,7 +496,6 @@ struct Proxy< Glue<T1, T2, glue_type> >
|
||||
static constexpr bool is_row = Glue<T1, T2, glue_type>::is_row;
|
||||
static constexpr bool is_col = Glue<T1, T2, glue_type>::is_col;
|
||||
static constexpr bool is_xvec = Glue<T1, T2, glue_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
|
||||
@@ -556,7 +546,6 @@ struct Proxy< Glue<T1, T2, glue_min> >
|
||||
static constexpr bool is_row = this_Glue_type::is_row;
|
||||
static constexpr bool is_col = this_Glue_type::is_col;
|
||||
static constexpr bool is_xvec = this_Glue_type::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const this_Glue_type& Q;
|
||||
arma_aligned const Proxy<T1> P1;
|
||||
@@ -615,7 +604,6 @@ struct Proxy< Glue<T1, T2, glue_max> >
|
||||
static constexpr bool is_row = this_Glue_type::is_row;
|
||||
static constexpr bool is_col = this_Glue_type::is_col;
|
||||
static constexpr bool is_xvec = this_Glue_type::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const this_Glue_type& Q;
|
||||
arma_aligned const Proxy<T1> P1;
|
||||
@@ -671,7 +659,6 @@ struct Proxy< mtOp<out_eT, T1, op_type> >
|
||||
static constexpr bool is_row = mtOp<out_eT, T1, op_type>::is_row;
|
||||
static constexpr bool is_col = mtOp<out_eT, T1, op_type>::is_col;
|
||||
static constexpr bool is_xvec = mtOp<out_eT, T1, op_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<out_eT> Q;
|
||||
|
||||
@@ -719,7 +706,6 @@ struct Proxy< mtGlue<out_eT, T1, T2, glue_type> >
|
||||
static constexpr bool is_row = mtGlue<out_eT, T1, T2, glue_type>::is_row;
|
||||
static constexpr bool is_col = mtGlue<out_eT, T1, T2, glue_type>::is_col;
|
||||
static constexpr bool is_xvec = mtGlue<out_eT, T1, T2, glue_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<out_eT> Q;
|
||||
|
||||
@@ -767,7 +753,6 @@ struct Proxy< CubeToMatOp<T1, op_type> >
|
||||
static constexpr bool is_row = CubeToMatOp<T1, op_type>::is_row;
|
||||
static constexpr bool is_col = CubeToMatOp<T1, op_type>::is_col;
|
||||
static constexpr bool is_xvec = CubeToMatOp<T1, op_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
|
||||
@@ -815,7 +800,6 @@ struct Proxy< CubeToMatOp<T1, op_vectorise_cube_col> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const unwrap_cube<T1> U;
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
@@ -865,7 +849,6 @@ struct Proxy< SpToDOp<T1, op_type> >
|
||||
static constexpr bool is_row = SpToDOp<T1, op_type>::is_row;
|
||||
static constexpr bool is_col = SpToDOp<T1, op_type>::is_col;
|
||||
static constexpr bool is_xvec = SpToDOp<T1, op_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = SpToDOp<T1, op_type>::is_d2sp;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
|
||||
@@ -913,7 +896,6 @@ struct Proxy< SpToDOp<SpMat<eT>, op_sp_nonzeros> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpMat<elem_type>& R;
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
@@ -947,54 +929,6 @@ struct Proxy< SpToDOp<SpMat<eT>, op_sp_nonzeros> >
|
||||
|
||||
|
||||
|
||||
template<typename out_eT, typename T1, typename op_type>
|
||||
struct Proxy< mtSpToDOp<out_eT, T1, op_type> >
|
||||
{
|
||||
typedef out_eT elem_type;
|
||||
typedef typename get_pod_type<out_eT>::result pod_type;
|
||||
typedef Mat<out_eT> stored_type;
|
||||
typedef const elem_type* ea_type;
|
||||
typedef const Mat<out_eT>& aligned_ea_type;
|
||||
|
||||
static constexpr bool use_at = false;
|
||||
static constexpr bool use_mp = false;
|
||||
static constexpr bool has_subview = false;
|
||||
|
||||
static constexpr bool is_row = mtSpToDOp<out_eT, T1, op_type>::is_row;
|
||||
static constexpr bool is_col = mtSpToDOp<out_eT, T1, op_type>::is_col;
|
||||
static constexpr bool is_xvec = mtSpToDOp<out_eT, T1, op_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = mtSpToDOp<out_eT, T1, op_type>::is_d2sp;
|
||||
|
||||
arma_aligned const Mat<out_eT> Q;
|
||||
|
||||
inline explicit Proxy(const mtSpToDOp<out_eT, T1, op_type>& A)
|
||||
: Q(A)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
}
|
||||
|
||||
arma_inline uword get_n_rows() const { return is_row ? 1 : Q.n_rows; }
|
||||
arma_inline uword get_n_cols() const { return is_col ? 1 : Q.n_cols; }
|
||||
arma_inline uword get_n_elem() const { return Q.n_elem; }
|
||||
|
||||
arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
|
||||
arma_inline elem_type at (const uword r, const uword c) const { return Q.at(r, c); }
|
||||
arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); }
|
||||
|
||||
arma_inline ea_type get_ea() const { return Q.memptr(); }
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
constexpr bool is_alias(const Mat<eT2>&) const { return false; }
|
||||
|
||||
template<typename eT2>
|
||||
constexpr bool has_overlap(const subview<eT2>&) const { return false; }
|
||||
|
||||
arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
template<typename T1, typename T2, typename glue_type>
|
||||
struct Proxy< SpToDGlue<T1, T2, glue_type> >
|
||||
{
|
||||
@@ -1011,7 +945,6 @@ struct Proxy< SpToDGlue<T1, T2, glue_type> >
|
||||
static constexpr bool is_row = SpToDGlue<T1, T2, glue_type>::is_row;
|
||||
static constexpr bool is_col = SpToDGlue<T1, T2, glue_type>::is_col;
|
||||
static constexpr bool is_xvec = SpToDGlue<T1, T2, glue_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
|
||||
@@ -1059,7 +992,6 @@ struct Proxy< subview<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const subview<eT>& Q;
|
||||
|
||||
@@ -1107,7 +1039,6 @@ struct Proxy< subview_col<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const subview_col<eT>& Q;
|
||||
|
||||
@@ -1155,7 +1086,6 @@ struct Proxy< subview_cols<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const subview_cols<eT>& sv;
|
||||
arma_aligned const Mat<eT> Q;
|
||||
@@ -1205,7 +1135,6 @@ struct Proxy< subview_row<eT> >
|
||||
static constexpr bool is_row = true;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const subview_row<eT>& Q;
|
||||
|
||||
@@ -1253,7 +1182,6 @@ struct Proxy< subview_elem1<eT,T1> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const subview_elem1<eT,T1>& Q;
|
||||
arma_aligned const Proxy<T1> R;
|
||||
@@ -1308,7 +1236,6 @@ struct Proxy< subview_elem2<eT,T1,T2> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<eT> Q;
|
||||
|
||||
@@ -1356,7 +1283,6 @@ struct Proxy< diagview<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const diagview<eT>& Q;
|
||||
|
||||
@@ -1412,7 +1338,6 @@ struct Proxy_diagvec_mat< Op<T1, op_diagvec> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<elem_type>& R;
|
||||
arma_aligned const diagview<elem_type> Q;
|
||||
@@ -1469,7 +1394,6 @@ struct Proxy_diagvec_expr< Op<T1, op_diagvec> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
|
||||
@@ -1543,7 +1467,6 @@ struct Proxy< Op<T1, op_diagvec2> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
|
||||
@@ -1599,7 +1522,6 @@ struct Proxy_xtrans_default< Op<T1, op_htrans> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = T1::is_d2sp;
|
||||
|
||||
const unwrap<T1> U;
|
||||
const xtrans_mat<elem_type,true> Q;
|
||||
@@ -1641,7 +1563,6 @@ struct Proxy_xtrans_default< Op<T1, op_strans> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = T1::is_d2sp;
|
||||
|
||||
const unwrap<T1> U;
|
||||
const xtrans_mat<elem_type,false> Q;
|
||||
@@ -1692,7 +1613,6 @@ struct Proxy_xtrans_vector< Op<T1, op_htrans> >
|
||||
static constexpr bool is_row = Op<T1, op_htrans>::is_row;
|
||||
static constexpr bool is_col = Op<T1, op_htrans>::is_col;
|
||||
static constexpr bool is_xvec = Op<T1, op_htrans>::is_xvec;
|
||||
static constexpr bool is_d2sp = Op<T1, op_htrans>::is_d2sp;
|
||||
|
||||
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;
|
||||
@@ -1735,7 +1655,6 @@ struct Proxy_xtrans_vector< Op<T1, op_strans> >
|
||||
static constexpr bool is_row = Op<T1, op_strans>::is_row;
|
||||
static constexpr bool is_col = Op<T1, op_strans>::is_col;
|
||||
static constexpr bool is_xvec = Op<T1, op_strans>::is_xvec;
|
||||
static constexpr bool is_d2sp = Op<T1, op_strans>::is_d2sp;
|
||||
|
||||
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;
|
||||
@@ -1803,7 +1722,6 @@ struct Proxy< Op<T1, op_htrans> >
|
||||
static constexpr bool is_row = Proxy_xtrans::is_row;
|
||||
static constexpr bool is_col = Proxy_xtrans::is_col;
|
||||
static constexpr bool is_xvec = Proxy_xtrans::is_xvec;
|
||||
static constexpr bool is_d2sp = Proxy_xtrans::is_d2sp;
|
||||
|
||||
using Proxy_xtrans::Q;
|
||||
|
||||
@@ -1866,7 +1784,6 @@ struct Proxy< Op<T1, op_strans> >
|
||||
static constexpr bool is_row = Proxy_xtrans::is_row;
|
||||
static constexpr bool is_col = Proxy_xtrans::is_col;
|
||||
static constexpr bool is_xvec = Proxy_xtrans::is_xvec;
|
||||
static constexpr bool is_d2sp = Proxy_xtrans::is_d2sp;
|
||||
|
||||
using Proxy_xtrans::Q;
|
||||
|
||||
@@ -1914,7 +1831,6 @@ struct Proxy_subview_row_htrans_cx
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const subview_row_htrans<eT> Q;
|
||||
|
||||
@@ -1949,7 +1865,6 @@ struct Proxy_subview_row_htrans_non_cx
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const subview_row_strans<eT> Q;
|
||||
|
||||
@@ -2010,7 +1925,6 @@ struct Proxy< Op<subview_row<eT>, op_htrans> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
using Proxy_sv_row_ht::Q;
|
||||
|
||||
@@ -2058,7 +1972,6 @@ struct Proxy< Op<subview_row<eT>, op_strans> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const subview_row_strans<eT> Q;
|
||||
|
||||
@@ -2108,7 +2021,6 @@ struct Proxy< Op< Row< std::complex<T> >, op_htrans> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
const xvec_htrans<eT> Q;
|
||||
const Row<eT>& src;
|
||||
@@ -2160,7 +2072,6 @@ struct Proxy< Op< Col< std::complex<T> >, op_htrans> >
|
||||
static constexpr bool is_row = true;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
const xvec_htrans<eT> Q;
|
||||
const Col<eT>& src;
|
||||
@@ -2212,7 +2123,6 @@ struct Proxy< Op< subview_col< std::complex<T> >, op_htrans> >
|
||||
static constexpr bool is_row = true;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
const xvec_htrans<eT> Q;
|
||||
const subview_col<eT>& src;
|
||||
@@ -2263,7 +2173,6 @@ struct Proxy< Op<T1, op_htrans2> >
|
||||
static constexpr bool is_row = eOp< Op<T1, op_htrans>, eop_scalar_times>::is_row;
|
||||
static constexpr bool is_col = eOp< Op<T1, op_htrans>, eop_scalar_times>::is_col;
|
||||
static constexpr bool is_xvec = eOp< Op<T1, op_htrans>, eop_scalar_times>::is_xvec;
|
||||
static constexpr bool is_d2sp = eOp< Op<T1, op_htrans>, eop_scalar_times>::is_d2sp;
|
||||
|
||||
arma_aligned const Op<T1, op_htrans> R;
|
||||
arma_aligned const eOp< Op<T1, op_htrans>, eop_scalar_times > Q;
|
||||
@@ -2313,7 +2222,6 @@ struct Proxy< subview_row_strans<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const subview_row_strans<eT>& Q;
|
||||
|
||||
@@ -2361,7 +2269,6 @@ struct Proxy< subview_row_htrans<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const subview_row_htrans<eT>& Q;
|
||||
|
||||
@@ -2409,7 +2316,6 @@ struct Proxy< xtrans_mat<eT, do_conj> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<eT> Q;
|
||||
|
||||
@@ -2457,7 +2363,6 @@ struct Proxy< xvec_htrans<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<eT> Q;
|
||||
|
||||
@@ -2513,7 +2418,6 @@ struct Proxy_vectorise_col_mat< Op<T1, op_vectorise_col> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const unwrap<T1> U;
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
@@ -2571,7 +2475,6 @@ struct Proxy_vectorise_col_expr< Op<T1, op_vectorise_col> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Op<T1, op_vectorise_col>& Q;
|
||||
arma_aligned const Proxy<T1> R;
|
||||
|
||||
@@ -32,7 +32,6 @@ class Row : public Mat<eT>
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_row = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline Row();
|
||||
inline Row(const Row<eT>& X);
|
||||
@@ -203,7 +202,6 @@ class Row<eT>::fixed : public Row<eT>
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_row = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
static const uword n_rows; // value provided below the class definition
|
||||
static const uword n_cols; // value provided below the class definition
|
||||
|
||||
@@ -32,7 +32,6 @@ class SpCol : public SpMat<eT>
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
|
||||
inline SpCol();
|
||||
@@ -50,9 +49,7 @@ class SpCol : public SpMat<eT>
|
||||
|
||||
inline SpCol(const Col<eT>& X); // for backwards compatibility
|
||||
|
||||
// template<typename T1> inline SpCol(const Base<eT,T1>& X);
|
||||
template<typename T1> inline explicit SpCol(const Base<eT,T1>& X, typename enable_if< T1::is_d2sp == false >::result* junk = nullptr);
|
||||
template<typename T1> inline SpCol(const Base<eT,T1>& X, typename enable_if< T1::is_d2sp == true >::result* junk = nullptr); // for backwards compatibility
|
||||
template<typename T1> inline SpCol(const Base<eT,T1>& X);
|
||||
template<typename T1> inline SpCol& operator=(const Base<eT,T1>& X);
|
||||
|
||||
template<typename T1> inline SpCol(const SpBase<eT,T1>& X);
|
||||
|
||||
@@ -129,43 +129,13 @@ SpCol<eT>::operator=(const eT val)
|
||||
|
||||
|
||||
|
||||
// template<typename eT>
|
||||
// template<typename T1>
|
||||
// inline
|
||||
// SpCol<eT>::SpCol(const Base<eT,T1>& X)
|
||||
// : SpMat<eT>(arma_vec_indicator(), 1)
|
||||
// {
|
||||
// arma_debug_sigprint();
|
||||
//
|
||||
// SpMat<eT>::operator=(X.get_ref());
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// marked as explicit
|
||||
template<typename eT>
|
||||
template<typename T1>
|
||||
inline
|
||||
SpCol<eT>::SpCol(const Base<eT,T1>& X, typename enable_if< T1::is_d2sp == false >::result* junk)
|
||||
SpCol<eT>::SpCol(const Base<eT,T1>& X)
|
||||
: SpMat<eT>(arma_vec_indicator(), 1)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
arma_ignore(junk);
|
||||
|
||||
SpMat<eT>::operator=(X.get_ref());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// not marked as explicit
|
||||
template<typename eT>
|
||||
template<typename T1>
|
||||
inline
|
||||
SpCol<eT>::SpCol(const Base<eT,T1>& X, typename enable_if< T1::is_d2sp == true >::result* junk)
|
||||
: SpMat<eT>(arma_vec_indicator(), 1)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
arma_ignore(junk);
|
||||
|
||||
SpMat<eT>::operator=(X.get_ref());
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ class SpGlue : public SpBase< typename T1::elem_type, SpGlue<T1, T2, spglue_type
|
||||
static constexpr bool is_row = spglue_type::template traits<T1,T2>::is_row;
|
||||
static constexpr bool is_col = spglue_type::template traits<T1,T2>::is_col;
|
||||
static constexpr bool is_xvec = spglue_type::template traits<T1,T2>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline SpGlue(const T1& in_A, const T2& in_B);
|
||||
inline SpGlue(const T1& in_A, const T2& in_B, const elem_type in_aux);
|
||||
|
||||
@@ -32,7 +32,6 @@ class SpMat : public SpBase< eT, SpMat<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
const uword n_rows; //!< number of rows (read-only)
|
||||
const uword n_cols; //!< number of columns (read-only)
|
||||
@@ -125,8 +124,7 @@ class SpMat : public SpBase< eT, SpMat<eT> >
|
||||
inline SpMat& operator%=(const SpMat& m);
|
||||
inline SpMat& operator/=(const SpMat& m);
|
||||
|
||||
template<typename T1> inline explicit SpMat(const Base<eT, T1>& m, typename enable_if< T1::is_d2sp == false >::result* junk = nullptr);
|
||||
template<typename T1> inline SpMat(const Base<eT, T1>& m, typename enable_if< T1::is_d2sp == true >::result* junk = nullptr); // for backwards compatibility
|
||||
template<typename T1> inline explicit SpMat(const Base<eT, T1>& m);
|
||||
template<typename T1> inline SpMat& operator= (const Base<eT, T1>& m);
|
||||
template<typename T1> inline SpMat& operator+=(const Base<eT, T1>& m);
|
||||
template<typename T1> inline SpMat& operator-=(const Base<eT, T1>& m);
|
||||
@@ -170,7 +168,6 @@ class SpMat : public SpBase< eT, SpMat<eT> >
|
||||
inline SpMat& operator%=(const spdiagview<eT>& X);
|
||||
inline SpMat& operator/=(const spdiagview<eT>& X);
|
||||
|
||||
// delayed unary ops
|
||||
template<typename T1, typename spop_type> inline SpMat(const SpOp<T1, spop_type>& X);
|
||||
template<typename T1, typename spop_type> inline SpMat& operator= (const SpOp<T1, spop_type>& X);
|
||||
template<typename T1, typename spop_type> inline SpMat& operator+=(const SpOp<T1, spop_type>& X);
|
||||
@@ -179,7 +176,6 @@ class SpMat : public SpBase< eT, SpMat<eT> >
|
||||
template<typename T1, typename spop_type> inline SpMat& operator%=(const SpOp<T1, spop_type>& X);
|
||||
template<typename T1, typename spop_type> inline SpMat& operator/=(const SpOp<T1, spop_type>& X);
|
||||
|
||||
// delayed binary ops
|
||||
template<typename T1, typename T2, typename spglue_type> inline SpMat(const SpGlue<T1, T2, spglue_type>& X);
|
||||
template<typename T1, typename T2, typename spglue_type> inline SpMat& operator= (const SpGlue<T1, T2, spglue_type>& X);
|
||||
template<typename T1, typename T2, typename spglue_type> inline SpMat& operator+=(const SpGlue<T1, T2, spglue_type>& X);
|
||||
@@ -188,7 +184,6 @@ class SpMat : public SpBase< eT, SpMat<eT> >
|
||||
template<typename T1, typename T2, typename spglue_type> inline SpMat& operator%=(const SpGlue<T1, T2, spglue_type>& X);
|
||||
template<typename T1, typename T2, typename spglue_type> inline SpMat& operator/=(const SpGlue<T1, T2, spglue_type>& X);
|
||||
|
||||
// delayed mixed-type unary ops
|
||||
template<typename T1, typename spop_type> inline SpMat(const mtSpOp<eT, T1, spop_type>& X);
|
||||
template<typename T1, typename spop_type> inline SpMat& operator= (const mtSpOp<eT, T1, spop_type>& X);
|
||||
template<typename T1, typename spop_type> inline SpMat& operator+=(const mtSpOp<eT, T1, spop_type>& X);
|
||||
@@ -197,7 +192,6 @@ class SpMat : public SpBase< eT, SpMat<eT> >
|
||||
template<typename T1, typename spop_type> inline SpMat& operator%=(const mtSpOp<eT, T1, spop_type>& X);
|
||||
template<typename T1, typename spop_type> inline SpMat& operator/=(const mtSpOp<eT, T1, spop_type>& X);
|
||||
|
||||
// delayed mixed-type binary ops
|
||||
template<typename T1, typename T2, typename spglue_type> inline SpMat(const mtSpGlue<eT, T1, T2, spglue_type>& X);
|
||||
template<typename T1, typename T2, typename spglue_type> inline SpMat& operator= (const mtSpGlue<eT, T1, T2, spglue_type>& X);
|
||||
template<typename T1, typename T2, typename spglue_type> inline SpMat& operator+=(const mtSpGlue<eT, T1, T2, spglue_type>& X);
|
||||
@@ -206,6 +200,14 @@ class SpMat : public SpBase< eT, SpMat<eT> >
|
||||
template<typename T1, typename T2, typename spglue_type> inline SpMat& operator%=(const mtSpGlue<eT, T1, T2, spglue_type>& X);
|
||||
template<typename T1, typename T2, typename spglue_type> inline SpMat& operator/=(const mtSpGlue<eT, T1, T2, spglue_type>& X);
|
||||
|
||||
template<typename T1, typename op_type> inline SpMat(const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline SpMat& operator= (const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline SpMat& operator+=(const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline SpMat& operator-=(const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline SpMat& operator*=(const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline SpMat& operator%=(const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
template<typename T1, typename op_type> inline SpMat& operator/=(const mtSpReductionOp<eT, T1, op_type>& X);
|
||||
|
||||
|
||||
arma_inline SpSubview_row<eT> row(const uword row_num);
|
||||
arma_inline const SpSubview_row<eT> row(const uword row_num) const;
|
||||
|
||||
@@ -883,11 +883,10 @@ SpMat<eT>::SpMat
|
||||
|
||||
|
||||
|
||||
// marked as explicit
|
||||
template<typename eT>
|
||||
template<typename T1>
|
||||
inline
|
||||
SpMat<eT>::SpMat(const Base<eT, T1>& x, typename enable_if< T1::is_d2sp == false >::result* junk)
|
||||
SpMat<eT>::SpMat(const Base<eT, T1>& x)
|
||||
: n_rows(0)
|
||||
, n_cols(0)
|
||||
, n_elem(0)
|
||||
@@ -898,29 +897,6 @@ SpMat<eT>::SpMat(const Base<eT, T1>& x, typename enable_if< T1::is_d2sp == false
|
||||
, col_ptrs(nullptr)
|
||||
{
|
||||
arma_debug_sigprint_this(this);
|
||||
arma_ignore(junk);
|
||||
|
||||
(*this).operator=(x);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// not marked as explicit
|
||||
template<typename eT>
|
||||
template<typename T1>
|
||||
inline
|
||||
SpMat<eT>::SpMat(const Base<eT, T1>& x, typename enable_if< T1::is_d2sp == true >::result* junk)
|
||||
: n_rows(0)
|
||||
, n_cols(0)
|
||||
, n_elem(0)
|
||||
, n_nonzero(0)
|
||||
, vec_state(0)
|
||||
, values(nullptr)
|
||||
, row_indices(nullptr)
|
||||
, col_ptrs(nullptr)
|
||||
{
|
||||
arma_debug_sigprint_this(this);
|
||||
arma_ignore(junk);
|
||||
|
||||
(*this).operator=(x);
|
||||
}
|
||||
@@ -2212,6 +2188,118 @@ SpMat<eT>::operator/=(const mtSpGlue<eT, T1, T2, spglue_type>& X)
|
||||
|
||||
|
||||
|
||||
template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
SpMat<eT>::SpMat(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
: n_rows(0)
|
||||
, n_cols(0)
|
||||
, n_elem(0)
|
||||
, n_nonzero(0)
|
||||
, vec_state(0)
|
||||
, values(nullptr)
|
||||
, row_indices(nullptr)
|
||||
, col_ptrs(nullptr)
|
||||
{
|
||||
arma_debug_sigprint_this(this);
|
||||
|
||||
const Mat<eT> tmp(X);
|
||||
|
||||
(*this).operator=(tmp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
SpMat<eT>&
|
||||
SpMat<eT>::operator=(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
const Mat<eT> tmp(X);
|
||||
|
||||
return (*this).operator=(tmp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
SpMat<eT>&
|
||||
SpMat<eT>::operator+=(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
const Mat<eT> tmp(X);
|
||||
|
||||
return (*this).operator+=(tmp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
SpMat<eT>&
|
||||
SpMat<eT>::operator-=(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
const Mat<eT> tmp(X);
|
||||
|
||||
return (*this).operator-=(tmp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
SpMat<eT>&
|
||||
SpMat<eT>::operator*=(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
const Mat<eT> tmp(X);
|
||||
|
||||
return (*this).operator*=(tmp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
SpMat<eT>&
|
||||
SpMat<eT>::operator%=(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
const Mat<eT> tmp(X);
|
||||
|
||||
return (*this).operator%=(tmp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename eT>
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
SpMat<eT>&
|
||||
SpMat<eT>::operator/=(const mtSpReductionOp<eT, T1, op_type>& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
const Mat<eT> tmp(X);
|
||||
|
||||
return (*this).operator/=(tmp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
SpSubview_row<eT>
|
||||
|
||||
@@ -32,7 +32,6 @@ class SpOp : public SpBase< typename T1::elem_type, SpOp<T1, op_type> >
|
||||
static constexpr bool is_row = op_type::template traits<T1>::is_row;
|
||||
static constexpr bool is_col = op_type::template traits<T1>::is_col;
|
||||
static constexpr bool is_xvec = op_type::template traits<T1>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline explicit SpOp(const T1& in_m);
|
||||
inline SpOp(const T1& in_m, const elem_type in_aux);
|
||||
|
||||
@@ -81,7 +81,6 @@ struct SpProxy< SpMat<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpMat<eT>& Q;
|
||||
|
||||
@@ -134,7 +133,6 @@ struct SpProxy< SpCol<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpCol<eT>& Q;
|
||||
|
||||
@@ -187,7 +185,6 @@ struct SpProxy< SpRow<eT> >
|
||||
static constexpr bool is_row = true;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpRow<eT>& Q;
|
||||
|
||||
@@ -240,7 +237,6 @@ struct SpProxy< SpSubview<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpSubview<eT>& Q;
|
||||
|
||||
@@ -293,7 +289,6 @@ struct SpProxy< SpSubview_col<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpSubview_col<eT>& Q;
|
||||
|
||||
@@ -346,7 +341,6 @@ struct SpProxy< SpSubview_col_list<eT,T1> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpMat<eT> Q;
|
||||
|
||||
@@ -398,7 +392,6 @@ struct SpProxy< SpSubview_row<eT> >
|
||||
static constexpr bool is_row = true;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpSubview_row<eT>& Q;
|
||||
|
||||
@@ -451,7 +444,6 @@ struct SpProxy< spdiagview<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpMat<eT> Q;
|
||||
|
||||
@@ -504,7 +496,6 @@ struct SpProxy< SpOp<T1, spop_type> >
|
||||
static constexpr bool is_row = SpOp<T1, spop_type>::is_row;
|
||||
static constexpr bool is_col = SpOp<T1, spop_type>::is_col;
|
||||
static constexpr bool is_xvec = SpOp<T1, spop_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpMat<eT> Q;
|
||||
|
||||
@@ -557,7 +548,6 @@ struct SpProxy< SpGlue<T1, T2, spglue_type> >
|
||||
static constexpr bool is_row = SpGlue<T1, T2, spglue_type>::is_row;
|
||||
static constexpr bool is_col = SpGlue<T1, T2, spglue_type>::is_col;
|
||||
static constexpr bool is_xvec = SpGlue<T1, T2, spglue_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpMat<eT> Q;
|
||||
|
||||
@@ -609,7 +599,6 @@ struct SpProxy< mtSpOp<out_eT, T1, spop_type> >
|
||||
static constexpr bool is_row = mtSpOp<out_eT, T1, spop_type>::is_row;
|
||||
static constexpr bool is_col = mtSpOp<out_eT, T1, spop_type>::is_col;
|
||||
static constexpr bool is_xvec = mtSpOp<out_eT, T1, spop_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpMat<out_eT> Q;
|
||||
|
||||
@@ -661,7 +650,6 @@ struct SpProxy< mtSpGlue<out_eT, T1, T2, spglue_type> >
|
||||
static constexpr bool is_row = mtSpGlue<out_eT, T1, T2, spglue_type>::is_row;
|
||||
static constexpr bool is_col = mtSpGlue<out_eT, T1, T2, spglue_type>::is_col;
|
||||
static constexpr bool is_xvec = mtSpGlue<out_eT, T1, T2, spglue_type>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const SpMat<out_eT> Q;
|
||||
|
||||
@@ -697,4 +685,55 @@ struct SpProxy< mtSpGlue<out_eT, T1, T2, spglue_type> >
|
||||
|
||||
|
||||
|
||||
template<typename out_eT, typename T1, typename op_type>
|
||||
struct SpProxy< mtSpReductionOp<out_eT, T1, op_type> >
|
||||
{
|
||||
typedef out_eT elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
typedef SpMat<out_eT> stored_type;
|
||||
|
||||
typedef typename SpMat<out_eT>::const_iterator const_iterator_type;
|
||||
typedef typename SpMat<out_eT>::const_row_iterator const_row_iterator_type;
|
||||
|
||||
static constexpr bool use_iterator = false;
|
||||
static constexpr bool Q_is_generated = true;
|
||||
|
||||
static constexpr bool is_row = mtSpReductionOp<out_eT, T1, op_type>::is_row;
|
||||
static constexpr bool is_col = mtSpReductionOp<out_eT, T1, op_type>::is_col;
|
||||
static constexpr bool is_xvec = mtSpReductionOp<out_eT, T1, op_type>::is_xvec;
|
||||
|
||||
arma_aligned const SpMat<out_eT> Q;
|
||||
|
||||
inline explicit SpProxy(const mtSpReductionOp<out_eT, T1, op_type>& A)
|
||||
: Q(A)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
}
|
||||
|
||||
arma_inline uword get_n_rows() const { return is_row ? 1 : Q.n_rows; }
|
||||
arma_inline uword get_n_cols() const { return is_col ? 1 : Q.n_cols; }
|
||||
arma_inline uword get_n_elem() const { return Q.n_elem; }
|
||||
arma_inline uword get_n_nonzero() const { return Q.n_nonzero; }
|
||||
|
||||
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 const out_eT* get_values() const { return Q.values; }
|
||||
arma_inline const uword* get_row_indices() const { return Q.row_indices; }
|
||||
arma_inline const uword* get_col_ptrs() const { return Q.col_ptrs; }
|
||||
|
||||
arma_inline const_iterator_type begin() const { return Q.begin(); }
|
||||
arma_inline const_iterator_type begin_col(const uword col_num) const { return Q.begin_col(col_num); }
|
||||
arma_inline const_row_iterator_type begin_row(const uword row_num = 0) const { return Q.begin_row(row_num); }
|
||||
|
||||
arma_inline const_iterator_type end() const { return Q.end(); }
|
||||
arma_inline const_row_iterator_type end_row() const { return Q.end_row(); }
|
||||
arma_inline const_row_iterator_type end_row(const uword row_num) const { return Q.end_row(row_num); }
|
||||
|
||||
template<typename eT2>
|
||||
constexpr bool is_alias(const SpMat<eT2>&) const { return false; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
|
||||
//! \addtogroup SpReductionOp
|
||||
//! @{
|
||||
|
||||
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
class SpReductionOp : public SpBase< typename T1::elem_type, SpReductionOp<T1, op_type> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename T1::elem_type elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
|
||||
static constexpr bool is_row = op_type::template traits<T1>::is_row;
|
||||
static constexpr bool is_col = op_type::template traits<T1>::is_col;
|
||||
static constexpr bool is_xvec = op_type::template traits<T1>::is_xvec;
|
||||
|
||||
inline explicit SpReductionOp(const T1& in_m);
|
||||
inline SpReductionOp(const T1& in_m, const elem_type in_aux);
|
||||
inline SpReductionOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b);
|
||||
inline ~SpReductionOp();
|
||||
|
||||
arma_aligned const T1& m; //!< the operand; must be derived from SpBase
|
||||
arma_aligned elem_type aux; //!< auxiliary data, using the element type as used by T1
|
||||
arma_aligned uword aux_uword_a; //!< auxiliary data, uword format
|
||||
arma_aligned uword aux_uword_b; //!< auxiliary data, uword format
|
||||
};
|
||||
|
||||
|
||||
|
||||
//! @}
|
||||
@@ -1,66 +0,0 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
|
||||
//! \addtogroup SpReductionOp
|
||||
//! @{
|
||||
|
||||
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
SpReductionOp<T1, op_type>::SpReductionOp(const T1& in_m)
|
||||
: m(in_m)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
SpReductionOp<T1, op_type>::SpReductionOp(const T1& in_m, const typename T1::elem_type in_aux)
|
||||
: m(in_m)
|
||||
, aux(in_aux)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
SpReductionOp<T1, op_type>::SpReductionOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b)
|
||||
: m(in_m)
|
||||
, aux_uword_a(in_aux_uword_a)
|
||||
, aux_uword_b(in_aux_uword_b)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
inline
|
||||
SpReductionOp<T1, op_type>::~SpReductionOp()
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//! @}
|
||||
@@ -25,14 +25,13 @@ template<typename eT>
|
||||
class SpRow : public SpMat<eT>
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
typedef eT elem_type;
|
||||
typedef typename get_pod_type<eT>::result pod_type;
|
||||
|
||||
static constexpr bool is_row = true;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
|
||||
inline SpRow();
|
||||
@@ -50,9 +49,7 @@ class SpRow : public SpMat<eT>
|
||||
|
||||
inline SpRow(const Row<eT>& X); // for backwards compatibility
|
||||
|
||||
// template<typename T1> inline SpRow(const Base<eT,T1>& X);
|
||||
template<typename T1> inline explicit SpRow(const Base<eT,T1>& X, typename enable_if< T1::is_d2sp == false >::result* junk = nullptr);
|
||||
template<typename T1> inline SpRow(const Base<eT,T1>& X, typename enable_if< T1::is_d2sp == true >::result* junk = nullptr); // for backwards compatibility
|
||||
template<typename T1> inline SpRow(const Base<eT,T1>& X);
|
||||
template<typename T1> inline SpRow& operator=(const Base<eT,T1>& X);
|
||||
|
||||
template<typename T1> inline SpRow(const SpBase<eT,T1>& X);
|
||||
|
||||
@@ -129,49 +129,19 @@ SpRow<eT>::operator=(const eT val)
|
||||
|
||||
|
||||
|
||||
// template<typename eT>
|
||||
// template<typename T1>
|
||||
// inline
|
||||
// SpRow<eT>::SpRow(const Base<eT,T1>& X)
|
||||
// : SpMat<eT>(arma_vec_indicator(), 2)
|
||||
// {
|
||||
// arma_debug_sigprint();
|
||||
//
|
||||
// SpMat<eT>::operator=(X.get_ref());
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
// marked as explicit
|
||||
template<typename eT>
|
||||
template<typename T1>
|
||||
inline
|
||||
SpRow<eT>::SpRow(const Base<eT,T1>& X, typename enable_if< T1::is_d2sp == false >::result* junk)
|
||||
SpRow<eT>::SpRow(const Base<eT,T1>& X)
|
||||
: SpMat<eT>(arma_vec_indicator(), 2)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
arma_ignore(junk);
|
||||
|
||||
SpMat<eT>::operator=(X.get_ref());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// not marked as explicit
|
||||
template<typename eT>
|
||||
template<typename T1>
|
||||
inline
|
||||
SpRow<eT>::SpRow(const Base<eT,T1>& X, typename enable_if< T1::is_d2sp == true >::result* junk)
|
||||
: SpMat<eT>(arma_vec_indicator(), 2)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
arma_ignore(junk);
|
||||
|
||||
SpMat<eT>::operator=(X.get_ref());
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename eT>
|
||||
inline
|
||||
|
||||
@@ -33,7 +33,6 @@ class SpSubview : public SpBase< eT, SpSubview<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
const uword aux_row1;
|
||||
const uword aux_col1;
|
||||
@@ -351,7 +350,6 @@ class SpSubview_col : public SpSubview<eT>
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline void operator= (const SpSubview<eT>& x);
|
||||
inline void operator= (const SpSubview_col& x);
|
||||
@@ -390,7 +388,6 @@ class SpSubview_row : public SpSubview<eT>
|
||||
static constexpr bool is_row = true;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline void operator= (const SpSubview<eT>& x);
|
||||
inline void operator= (const SpSubview_row& x);
|
||||
|
||||
@@ -32,7 +32,6 @@ class SpSubview_col_list : public SpBase< eT, SpSubview_col_list<eT,T1> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
const SpMat<eT>& m;
|
||||
const quasi_unwrap<T1> U_ci;
|
||||
|
||||
@@ -32,7 +32,6 @@ class SpToDGlue : public Base< typename T1::elem_type, SpToDGlue<T1, T2, glue_ty
|
||||
static constexpr bool is_row = glue_type::template traits<T1,T2>::is_row;
|
||||
static constexpr bool is_col = glue_type::template traits<T1,T2>::is_col;
|
||||
static constexpr bool is_xvec = glue_type::template traits<T1,T2>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline explicit SpToDGlue(const T1& in_A, const T2& in_B);
|
||||
inline ~SpToDGlue();
|
||||
|
||||
@@ -32,7 +32,6 @@ class SpToDOp : public Base< typename T1::elem_type, SpToDOp<T1, op_type> >
|
||||
static constexpr bool is_row = op_type::template traits<T1>::is_row;
|
||||
static constexpr bool is_col = op_type::template traits<T1>::is_col;
|
||||
static constexpr bool is_xvec = op_type::template traits<T1>::is_xvec;
|
||||
static constexpr bool is_d2sp = op_type::template traits<T1>::is_d2sp;
|
||||
|
||||
inline explicit SpToDOp(const T1& in_m);
|
||||
inline SpToDOp(const T1& in_m, const elem_type in_aux);
|
||||
|
||||
@@ -156,7 +156,6 @@ struct traits_op_default
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -169,7 +168,6 @@ struct traits_op_xvec
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -182,7 +180,6 @@ struct traits_op_col
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -195,7 +192,6 @@ struct traits_op_row
|
||||
static constexpr bool is_row = true;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -208,7 +204,6 @@ struct traits_op_passthru
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T1::is_col;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -221,7 +216,6 @@ struct traits_glue_default
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -234,7 +228,6 @@ struct traits_glue_or
|
||||
static constexpr bool is_row = (T1::is_row || T2::is_row );
|
||||
static constexpr bool is_col = (T1::is_col || T2::is_col );
|
||||
static constexpr bool is_xvec = (T1::is_xvec || T2::is_xvec);
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -251,7 +244,6 @@ template< typename T1, typename eop_type> class eOp;
|
||||
template< typename T1, typename op_type> class SpToDOp;
|
||||
template< typename T1, typename op_type> class CubeToMatOp;
|
||||
template<typename out_eT, typename T1, typename op_type> class mtOp;
|
||||
template<typename out_eT, typename T1, typename op_type> class mtSpToDOp;
|
||||
|
||||
template< typename T1, typename T2, typename glue_type> class Glue;
|
||||
template< typename T1, typename T2, typename eglue_type> class eGlue;
|
||||
@@ -334,9 +326,7 @@ struct state_type
|
||||
|
||||
template< typename T1, typename spop_type> class SpOp;
|
||||
template<typename out_eT, typename T1, typename spop_type> class mtSpOp;
|
||||
|
||||
template< typename T1, typename spop_type> class SpReductionOp;
|
||||
template<typename out_eT, typename T1, typename spop_type> class mtSpReductionOp;
|
||||
template<typename out_eT, typename T1, typename op_type> class mtSpReductionOp;
|
||||
|
||||
template< typename T1, typename T2, typename spglue_type> class SpGlue;
|
||||
template<typename out_eT, typename T1, typename T2, typename spglue_type> class mtSpGlue;
|
||||
|
||||
@@ -34,7 +34,6 @@ class diagview : public Base< eT, diagview<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
const uword row_offset;
|
||||
const uword col_offset;
|
||||
|
||||
@@ -37,7 +37,6 @@ class eGlue : public Base< typename T1::elem_type, eGlue<T1, T2, eglue_type> >
|
||||
static constexpr bool is_col = (Proxy<T1>::is_col || Proxy<T2>::is_col );
|
||||
static constexpr bool is_row = (Proxy<T1>::is_row || Proxy<T2>::is_row );
|
||||
static constexpr bool is_xvec = (Proxy<T1>::is_xvec || Proxy<T2>::is_xvec);
|
||||
static constexpr bool is_d2sp = (Proxy<T1>::is_d2sp || Proxy<T2>::is_d2sp);
|
||||
|
||||
arma_aligned const Proxy<T1> P1;
|
||||
arma_aligned const Proxy<T2> P2;
|
||||
|
||||
@@ -37,7 +37,6 @@ class eOp : public Base< typename T1::elem_type, eOp<T1, eop_type> >
|
||||
static constexpr bool is_row = Proxy<T1>::is_row;
|
||||
static constexpr bool is_col = Proxy<T1>::is_col;
|
||||
static constexpr bool is_xvec = Proxy<T1>::is_xvec;
|
||||
static constexpr bool is_d2sp = Proxy<T1>::is_d2sp;
|
||||
|
||||
arma_aligned const Proxy<T1> P;
|
||||
|
||||
|
||||
@@ -51,12 +51,12 @@ diagvec(const Base<typename T1::elem_type,T1>& X, const sword diag_id)
|
||||
template<typename T1>
|
||||
arma_warn_unused
|
||||
arma_inline
|
||||
const SpToDOp<T1, op_sp_diagvec>
|
||||
const mtSpReductionOp<typename T1::elem_type, T1, op_sp_diagvec>
|
||||
diagvec(const SpBase<typename T1::elem_type,T1>& X, const sword diag_id = 0)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return SpToDOp<T1, op_sp_diagvec>(X.get_ref(), ((diag_id < 0) ? -diag_id : diag_id), ((diag_id < 0) ? 1 : 0) );
|
||||
return mtSpReductionOp<typename T1::elem_type, T1, op_sp_diagvec>(X.get_ref(), ((diag_id < 0) ? -diag_id : diag_id), ((diag_id < 0) ? 1 : 0) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -152,13 +152,13 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value && resolves_to_sparse_vector<T1>::no,
|
||||
const SpToDOp<T1, op_sp_max>
|
||||
const mtSpReductionOp<typename T1::elem_type, T1, op_sp_max>
|
||||
>::result
|
||||
max(const T1& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return SpToDOp<T1, op_sp_max>(X, 0, 0);
|
||||
return mtSpReductionOp<typename T1::elem_type, T1, op_sp_max>(X, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -170,13 +170,13 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value,
|
||||
const SpToDOp<T1, op_sp_max>
|
||||
const mtSpReductionOp<typename T1::elem_type, T1, op_sp_max>
|
||||
>::result
|
||||
max(const T1& X, const uword dim)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return SpToDOp<T1, op_sp_max>(X, dim, 0);
|
||||
return mtSpReductionOp<typename T1::elem_type, T1, op_sp_max>(X, dim, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -113,13 +113,13 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value && resolves_to_sparse_vector<T1>::no,
|
||||
const SpToDOp<T1,op_sp_mean>
|
||||
const mtSpReductionOp<typename T1::elem_type, T1, op_sp_mean>
|
||||
>::result
|
||||
mean(const T1& x)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return SpToDOp<T1,op_sp_mean>(x, 0, 0);
|
||||
return mtSpReductionOp<typename T1::elem_type, T1, op_sp_mean>(x, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -131,13 +131,13 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value,
|
||||
const SpToDOp<T1,op_sp_mean>
|
||||
const mtSpReductionOp<typename T1::elem_type, T1, op_sp_mean>
|
||||
>::result
|
||||
mean(const T1& x, const uword dim)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return SpToDOp<T1,op_sp_mean>(x, dim, 0);
|
||||
return mtSpReductionOp<typename T1::elem_type, T1, op_sp_mean>(x, dim, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -152,13 +152,13 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value && resolves_to_sparse_vector<T1>::no,
|
||||
const SpToDOp<T1, op_sp_min>
|
||||
const mtSpReductionOp<typename T1::elem_type, T1, op_sp_min>
|
||||
>::result
|
||||
min(const T1& X)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return SpToDOp<T1, op_sp_min>(X, 0, 0);
|
||||
return mtSpReductionOp<typename T1::elem_type, T1, op_sp_min>(X, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -170,13 +170,13 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value,
|
||||
const SpToDOp<T1, op_sp_min>
|
||||
const mtSpReductionOp<typename T1::elem_type, T1, op_sp_min>
|
||||
>::result
|
||||
min(const T1& X, const uword dim)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return SpToDOp<T1, op_sp_min>(X, dim, 0);
|
||||
return mtSpReductionOp<typename T1::elem_type, T1, op_sp_min>(X, dim, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -111,13 +111,13 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value && resolves_to_sparse_vector<T1>::no,
|
||||
const mtSpToDOp<typename T1::pod_type, T1, op_sp_stddev>
|
||||
const mtSpReductionOp<typename T1::pod_type, T1, op_sp_stddev>
|
||||
>::result
|
||||
stddev(const T1& X, const uword norm_type = 0)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return mtSpToDOp<typename T1::pod_type, T1, op_sp_stddev>(X, norm_type, 0);
|
||||
return mtSpReductionOp<typename T1::pod_type, T1, op_sp_stddev>(X, norm_type, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -129,13 +129,13 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value,
|
||||
const mtSpToDOp<typename T1::pod_type, T1, op_sp_stddev>
|
||||
const mtSpReductionOp<typename T1::pod_type, T1, op_sp_stddev>
|
||||
>::result
|
||||
stddev(const T1& X, const uword norm_type, const uword dim)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return mtSpToDOp<typename T1::pod_type, T1, op_sp_stddev>(X, norm_type, dim);
|
||||
return mtSpReductionOp<typename T1::pod_type, T1, op_sp_stddev>(X, norm_type, dim);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -115,13 +115,13 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value && resolves_to_sparse_vector<T1>::no,
|
||||
const SpToDOp<T1,op_sp_sum>
|
||||
const mtSpReductionOp<typename T1::elem_type, T1, op_sp_sum>
|
||||
>::result
|
||||
sum(const T1& x)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return SpToDOp<T1,op_sp_sum>(x, 0, 0);
|
||||
return mtSpReductionOp<typename T1::elem_type, T1, op_sp_sum>(x, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,13 +133,13 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value,
|
||||
const SpToDOp<T1,op_sp_sum>
|
||||
const mtSpReductionOp<typename T1::elem_type, T1, op_sp_sum>
|
||||
>::result
|
||||
sum(const T1& x, const uword dim)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return SpToDOp<T1,op_sp_sum>(x, dim, 0);
|
||||
return mtSpReductionOp<typename T1::elem_type, T1, op_sp_sum>(x, dim, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -111,13 +111,13 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value && resolves_to_sparse_vector<T1>::no,
|
||||
const mtSpToDOp<typename T1::pod_type, T1, op_sp_var>
|
||||
const mtSpReductionOp<typename T1::pod_type, T1, op_sp_var>
|
||||
>::result
|
||||
var(const T1& X, const uword norm_type = 0)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return mtSpToDOp<typename T1::pod_type, T1, op_sp_var>(X, norm_type, 0);
|
||||
return mtSpReductionOp<typename T1::pod_type, T1, op_sp_var>(X, norm_type, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -129,13 +129,13 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value,
|
||||
const mtSpToDOp<typename T1::pod_type, T1, op_sp_var>
|
||||
const mtSpReductionOp<typename T1::pod_type, T1, op_sp_var>
|
||||
>::result
|
||||
var(const T1& X, const uword norm_type, const uword dim)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return mtSpToDOp<typename T1::pod_type, T1, op_sp_var>(X, norm_type, dim);
|
||||
return mtSpReductionOp<typename T1::pod_type, T1, op_sp_var>(X, norm_type, dim);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value && resolves_to_sparse_vector<T1>::no,
|
||||
const mtSpToDOp<typename T1::pod_type, T1, op_sp_vecnorm>
|
||||
const mtSpReductionOp<typename T1::pod_type, T1, op_sp_vecnorm>
|
||||
>::result
|
||||
vecnorm
|
||||
(
|
||||
@@ -265,7 +265,7 @@ vecnorm
|
||||
|
||||
const uword dim = 0;
|
||||
|
||||
return mtSpToDOp<typename T1::pod_type, T1, op_sp_vecnorm>(X, k, dim);
|
||||
return mtSpReductionOp<typename T1::pod_type, T1, op_sp_vecnorm>(X, k, dim);
|
||||
}
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@ vecnorm
|
||||
template<typename T1>
|
||||
arma_warn_unused
|
||||
inline
|
||||
const mtSpToDOp<typename T1::pod_type, T1, op_sp_vecnorm>
|
||||
const mtSpReductionOp<typename T1::pod_type, T1, op_sp_vecnorm>
|
||||
vecnorm
|
||||
(
|
||||
const SpBase<typename T1::elem_type,T1>& X,
|
||||
@@ -285,7 +285,7 @@ vecnorm
|
||||
arma_debug_sigprint();
|
||||
arma_ignore(junk);
|
||||
|
||||
return mtSpToDOp<typename T1::pod_type, T1, op_sp_vecnorm>(X.get_ref(), k, dim);
|
||||
return mtSpReductionOp<typename T1::pod_type, T1, op_sp_vecnorm>(X.get_ref(), k, dim);
|
||||
}
|
||||
|
||||
|
||||
@@ -327,7 +327,7 @@ typename
|
||||
enable_if2
|
||||
<
|
||||
is_arma_sparse_type<T1>::value && resolves_to_sparse_vector<T1>::no,
|
||||
const mtSpToDOp<typename T1::pod_type, T1, op_sp_vecnorm_ext>
|
||||
const mtSpReductionOp<typename T1::pod_type, T1, op_sp_vecnorm_ext>
|
||||
>::result
|
||||
vecnorm
|
||||
(
|
||||
@@ -350,7 +350,7 @@ vecnorm
|
||||
|
||||
const uword dim = 0;
|
||||
|
||||
return mtSpToDOp<typename T1::pod_type, T1, op_sp_vecnorm_ext>(X, method_id, dim);
|
||||
return mtSpReductionOp<typename T1::pod_type, T1, op_sp_vecnorm_ext>(X, method_id, dim);
|
||||
}
|
||||
|
||||
|
||||
@@ -358,7 +358,7 @@ vecnorm
|
||||
template<typename T1>
|
||||
arma_warn_unused
|
||||
inline
|
||||
const mtSpToDOp<typename T1::pod_type, T1, op_sp_vecnorm_ext>
|
||||
const mtSpReductionOp<typename T1::pod_type, T1, op_sp_vecnorm_ext>
|
||||
vecnorm
|
||||
(
|
||||
const SpBase<typename T1::elem_type,T1>& X,
|
||||
@@ -377,7 +377,7 @@ vecnorm
|
||||
if( (sig == 'i') || (sig == 'I') || (sig == '+') ) { method_id = 1; }
|
||||
if( (sig == '-') ) { method_id = 2; }
|
||||
|
||||
return mtSpToDOp<typename T1::pod_type, T1, op_sp_vecnorm_ext>(X.get_ref(), method_id, dim);
|
||||
return mtSpReductionOp<typename T1::pod_type, T1, op_sp_vecnorm_ext>(X.get_ref(), method_id, dim);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ class glue_affmul
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -32,7 +32,6 @@ class glue_conv
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T1::is_col;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename eT> inline static void apply(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, const bool A_is_col);
|
||||
|
||||
@@ -32,7 +32,6 @@ class glue_cor
|
||||
static constexpr bool is_row = false; // T1::is_col; // TODO: check
|
||||
static constexpr bool is_col = false; // T2::is_col; // TODO: check
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_cor>& X);
|
||||
|
||||
@@ -32,7 +32,6 @@ class glue_cov
|
||||
static constexpr bool is_row = false; // T1::is_col; // TODO: check
|
||||
static constexpr bool is_col = false; // T2::is_col; // TODO: check
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_cov>& X);
|
||||
|
||||
@@ -32,7 +32,6 @@ class glue_cross
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T1::is_col;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_cross>& X);
|
||||
|
||||
@@ -44,7 +44,6 @@ class glue_hist_default
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T1::is_col;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -44,7 +44,6 @@ class glue_histc_default
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T1::is_col;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -31,7 +31,6 @@ class glue_intersect
|
||||
static constexpr bool is_row = (T1::is_row && T2::is_row);
|
||||
static constexpr bool is_col = (T1::is_col || T2::is_col);
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -32,7 +32,6 @@ class glue_join_cols
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = (T1::is_col && T2::is_col);
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
@@ -60,7 +59,6 @@ class glue_join_rows
|
||||
static constexpr bool is_row = (T1::is_row && T2::is_row);
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -32,7 +32,6 @@ class glue_kron
|
||||
static constexpr bool is_row = (T1::is_row && T2::is_row);
|
||||
static constexpr bool is_col = (T1::is_col && T2::is_col);
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename eT> inline static void direct_kron(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B);
|
||||
|
||||
@@ -31,7 +31,6 @@ class glue_mixed_times
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -30,7 +30,6 @@ class glue_mvnrnd_vec
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -32,7 +32,6 @@ class glue_polyfit
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename eT> inline static bool apply_noalias(Mat<eT>& out, const Col<eT>& X, const Col<eT>& Y, const uword N);
|
||||
|
||||
@@ -32,7 +32,6 @@ class glue_polyval
|
||||
static constexpr bool is_row = T2::is_row;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = T2::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename eT> inline static void apply_noalias(Mat<eT>& out, const Mat<eT>& P, const Mat<eT>& X);
|
||||
|
||||
@@ -48,7 +48,6 @@ class glue_quantile_default
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T1::is_col;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -32,7 +32,6 @@ class glue_solve_gen_default
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_solve_gen_default>& X);
|
||||
@@ -52,7 +51,6 @@ class glue_solve_gen_full
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_solve_gen_full>& X);
|
||||
@@ -72,7 +70,6 @@ class glue_solve_tri_default
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_solve_tri_default>& X);
|
||||
@@ -92,7 +89,6 @@ class glue_solve_tri_full
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_solve_tri_full>& X);
|
||||
|
||||
@@ -118,7 +118,6 @@ class glue_times
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
@@ -158,7 +157,6 @@ class glue_times_diag
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -44,7 +44,6 @@ class glue_times_dense_sparse
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
@@ -69,7 +68,6 @@ class glue_times_sparse_dense
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -32,7 +32,6 @@ class glue_trapz
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_trapz>& in);
|
||||
|
||||
@@ -32,7 +32,6 @@ class mtGlue : public Base< out_eT, mtGlue<out_eT, T1, T2, glue_type> >
|
||||
static constexpr bool is_row = glue_type::template traits<T1,T2>::is_row;
|
||||
static constexpr bool is_col = glue_type::template traits<T1,T2>::is_col;
|
||||
static constexpr bool is_xvec = glue_type::template traits<T1,T2>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_inline mtGlue(const T1& in_A, const T2& in_B);
|
||||
arma_inline mtGlue(const T1& in_A, const T2& in_B, const uword in_aux_uword);
|
||||
|
||||
@@ -36,7 +36,6 @@ class mtOp : public Base< out_eT, mtOp<out_eT, T1, op_type> >
|
||||
static constexpr bool is_row = op_type::template traits<T1>::is_row;
|
||||
static constexpr bool is_col = op_type::template traits<T1>::is_col;
|
||||
static constexpr bool is_xvec = op_type::template traits<T1>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline explicit mtOp(const T1& in_m);
|
||||
inline mtOp(const T1& in_m, const in_eT in_aux);
|
||||
|
||||
@@ -32,7 +32,6 @@ class mtSpGlue : public SpBase< out_eT, mtSpGlue<out_eT, T1, T2, spglue_type> >
|
||||
static constexpr bool is_row = spglue_type::template traits<T1,T2>::is_row;
|
||||
static constexpr bool is_col = spglue_type::template traits<T1,T2>::is_col;
|
||||
static constexpr bool is_xvec = spglue_type::template traits<T1,T2>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline mtSpGlue(const T1& in_A, const T2& in_B);
|
||||
inline ~mtSpGlue();
|
||||
|
||||
@@ -34,7 +34,6 @@ class mtSpOp : public SpBase< out_eT, mtSpOp<out_eT, T1, spop_type> >
|
||||
static constexpr bool is_row = spop_type::template traits<T1>::is_row;
|
||||
static constexpr bool is_col = spop_type::template traits<T1>::is_col;
|
||||
static constexpr bool is_xvec = spop_type::template traits<T1>::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline explicit mtSpOp(const T1& in_m);
|
||||
inline mtSpOp(const T1& in_m, const uword aux_uword_a, const uword aux_uword_b);
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
|
||||
//! \addtogroup mtSpToDOp
|
||||
//! @{
|
||||
|
||||
|
||||
|
||||
template<typename out_eT, typename T1, typename op_type>
|
||||
class mtSpToDOp : public Base< out_eT, mtSpToDOp<out_eT, T1, op_type> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef out_eT elem_type;
|
||||
typedef typename get_pod_type<out_eT>::result pod_type;
|
||||
|
||||
typedef typename T1::elem_type in_eT;
|
||||
|
||||
static constexpr bool is_row = op_type::template traits<T1>::is_row;
|
||||
static constexpr bool is_col = op_type::template traits<T1>::is_col;
|
||||
static constexpr bool is_xvec = op_type::template traits<T1>::is_xvec;
|
||||
static constexpr bool is_d2sp = op_type::template traits<T1>::is_d2sp;
|
||||
|
||||
inline explicit mtSpToDOp(const T1& in_m);
|
||||
inline mtSpToDOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b);
|
||||
inline ~mtSpToDOp();
|
||||
|
||||
arma_aligned const T1& m; //!< the operand; must be derived from SpBase
|
||||
arma_aligned uword aux_uword_a; //!< auxiliary data, uword format
|
||||
arma_aligned uword aux_uword_b; //!< auxiliary data, uword format
|
||||
};
|
||||
|
||||
|
||||
|
||||
//! @}
|
||||
@@ -1,55 +0,0 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
|
||||
//! \addtogroup mtSpToDOp
|
||||
//! @{
|
||||
|
||||
|
||||
|
||||
template<typename out_eT, typename T1, typename op_type>
|
||||
inline
|
||||
mtSpToDOp<out_eT, T1, op_type>::mtSpToDOp(const T1& in_m)
|
||||
: m(in_m)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename out_eT, typename T1, typename op_type>
|
||||
inline
|
||||
mtSpToDOp<out_eT, T1, op_type>::mtSpToDOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b)
|
||||
: m(in_m)
|
||||
, aux_uword_a(in_aux_uword_a)
|
||||
, aux_uword_b(in_aux_uword_b)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename out_eT, typename T1, typename op_type>
|
||||
inline
|
||||
mtSpToDOp<out_eT, T1, op_type>::~mtSpToDOp()
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//! @}
|
||||
@@ -32,7 +32,6 @@ class op_htrans
|
||||
static constexpr bool is_row = T1::is_col; // deliberately swapped
|
||||
static constexpr bool is_col = T1::is_row;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = T1::is_d2sp;
|
||||
};
|
||||
|
||||
template<typename eT>
|
||||
@@ -94,7 +93,6 @@ class op_htrans2
|
||||
static constexpr bool is_row = T1::is_col; // deliberately swapped
|
||||
static constexpr bool is_col = T1::is_row;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = T1::is_d2sp;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
|
||||
@@ -31,11 +31,10 @@ class op_sp_diagvec
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = true;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1, op_sp_diagvec>& in);
|
||||
inline static void apply(Mat<typename T1::elem_type>& out, const mtSpReductionOp<typename T1::elem_type, T1, op_sp_diagvec>& in);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
template<typename T1>
|
||||
inline
|
||||
void
|
||||
op_sp_diagvec::apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1,op_sp_diagvec>& in)
|
||||
op_sp_diagvec::apply(Mat<typename T1::elem_type>& out, const mtSpReductionOp<typename T1::elem_type, T1,op_sp_diagvec>& in)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
|
||||
@@ -29,11 +29,10 @@ class op_sp_max
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = true;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1, op_sp_max>& in);
|
||||
inline static void apply(Mat<typename T1::elem_type>& out, const mtSpReductionOp<typename T1::elem_type, T1, op_sp_max>& in);
|
||||
|
||||
//
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
template<typename T1>
|
||||
inline
|
||||
void
|
||||
op_sp_max::apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1,op_sp_max>& in)
|
||||
op_sp_max::apply(Mat<typename T1::elem_type>& out, const mtSpReductionOp<typename T1::elem_type, T1, op_sp_max>& in)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
|
||||
@@ -31,12 +31,11 @@ class op_sp_mean
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = true;
|
||||
};
|
||||
|
||||
// Apply mean into an output sparse matrix (or vector).
|
||||
template<typename T1>
|
||||
inline static void apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1, op_sp_mean>& in);
|
||||
inline static void apply(Mat<typename T1::elem_type>& out, const mtSpReductionOp<typename T1::elem_type, T1, op_sp_mean>& in);
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply_fast(Mat<typename T1::elem_type>& out, const SpProxy<T1>& p, const uword dim);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
template<typename T1>
|
||||
inline
|
||||
void
|
||||
op_sp_mean::apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1, op_sp_mean>& in)
|
||||
op_sp_mean::apply(Mat<typename T1::elem_type>& out, const mtSpReductionOp<typename T1::elem_type, T1, op_sp_mean>& in)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
|
||||
@@ -29,11 +29,10 @@ class op_sp_min
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = true;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1, op_sp_min>& in);
|
||||
inline static void apply(Mat<typename T1::elem_type>& out, const mtSpReductionOp<typename T1::elem_type, T1, op_sp_min>& in);
|
||||
|
||||
//
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
template<typename T1>
|
||||
inline
|
||||
void
|
||||
op_sp_min::apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1,op_sp_min>& in)
|
||||
op_sp_min::apply(Mat<typename T1::elem_type>& out, const mtSpReductionOp<typename T1::elem_type, T1, op_sp_min>& in)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ class op_sp_minus_pre
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T1::is_col;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
@@ -64,7 +63,6 @@ class op_sp_minus_post
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T1::is_col;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
|
||||
@@ -32,7 +32,6 @@ class op_sp_plus
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T1::is_col;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
|
||||
@@ -31,11 +31,10 @@ class op_sp_stddev
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = true;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply(Mat<typename T1::pod_type>& out, const mtSpToDOp<typename T1::pod_type, T1, op_sp_stddev>& in);
|
||||
inline static void apply(Mat<typename T1::pod_type>& out, const mtSpReductionOp<typename T1::pod_type, T1, op_sp_stddev>& in);
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply_slow(Mat<typename T1::pod_type>& out, const SpProxy<T1>& p, const uword norm_type, const uword dim);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
template<typename T1>
|
||||
inline
|
||||
void
|
||||
op_sp_stddev::apply(Mat<typename T1::pod_type>& out, const mtSpToDOp<typename T1::pod_type, T1, op_sp_stddev>& in)
|
||||
op_sp_stddev::apply(Mat<typename T1::pod_type>& out, const mtSpReductionOp<typename T1::pod_type, T1, op_sp_stddev>& in)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
|
||||
@@ -30,11 +30,10 @@ class op_sp_sum
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = true;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1, op_sp_sum>& in);
|
||||
inline static void apply(Mat<typename T1::elem_type>& out, const mtSpReductionOp<typename T1::elem_type, T1, op_sp_sum>& in);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
template<typename T1>
|
||||
inline
|
||||
void
|
||||
op_sp_sum::apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1,op_sp_sum>& in)
|
||||
op_sp_sum::apply(Mat<typename T1::elem_type>& out, const mtSpReductionOp<typename T1::elem_type, T1, op_sp_sum>& in)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
|
||||
@@ -32,11 +32,10 @@ class op_sp_var
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = true;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply(Mat<typename T1::pod_type>& out, const mtSpToDOp<typename T1::pod_type, T1, op_sp_var>& in);
|
||||
inline static void apply(Mat<typename T1::pod_type>& out, const mtSpReductionOp<typename T1::pod_type, T1, op_sp_var>& in);
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply_slow(Mat<typename T1::pod_type>& out, const SpProxy<T1>& p, const uword norm_type, const uword dim);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
template<typename T1>
|
||||
inline
|
||||
void
|
||||
op_sp_var::apply(Mat<typename T1::pod_type>& out, const mtSpToDOp<typename T1::pod_type, T1, op_sp_var>& in)
|
||||
op_sp_var::apply(Mat<typename T1::pod_type>& out, const mtSpReductionOp<typename T1::pod_type, T1, op_sp_var>& in)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
|
||||
@@ -30,11 +30,10 @@ class op_sp_vecnorm
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = true;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply(Mat<typename T1::pod_type>& out, const mtSpToDOp<typename T1::pod_type,T1,op_sp_vecnorm>& expr);
|
||||
inline static void apply(Mat<typename T1::pod_type>& out, const mtSpReductionOp<typename T1::pod_type, T1, op_sp_vecnorm>& expr);
|
||||
|
||||
template<typename eT>
|
||||
inline static void apply_direct(Mat< typename get_pod_type<eT>::result >& out, const SpMat<eT>& X, const uword k);
|
||||
@@ -54,11 +53,10 @@ class op_sp_vecnorm_ext
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = true;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
inline static void apply(Mat<typename T1::pod_type>& out, const mtSpToDOp<typename T1::pod_type,T1,op_sp_vecnorm_ext>& expr);
|
||||
inline static void apply(Mat<typename T1::pod_type>& out, const mtSpReductionOp<typename T1::pod_type, T1, op_sp_vecnorm_ext>& expr);
|
||||
|
||||
template<typename eT>
|
||||
inline static void apply_direct(Mat< typename get_pod_type<eT>::result >& out, const SpMat<eT>& X, const uword method_id);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
template<typename T1>
|
||||
inline
|
||||
void
|
||||
op_sp_vecnorm::apply(Mat<typename T1::pod_type>& out, const mtSpToDOp<typename T1::pod_type,T1,op_sp_vecnorm>& expr)
|
||||
op_sp_vecnorm::apply(Mat<typename T1::pod_type>& out, const mtSpReductionOp<typename T1::pod_type, T1, op_sp_vecnorm>& expr)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
@@ -110,7 +110,7 @@ op_sp_vecnorm::apply_direct(Mat< typename get_pod_type<eT>::result >& out, const
|
||||
template<typename T1>
|
||||
inline
|
||||
void
|
||||
op_sp_vecnorm_ext::apply(Mat<typename T1::pod_type>& out, const mtSpToDOp<typename T1::pod_type,T1,op_sp_vecnorm_ext>& expr)
|
||||
op_sp_vecnorm_ext::apply(Mat<typename T1::pod_type>& out, const mtSpReductionOp<typename T1::pod_type, T1, op_sp_vecnorm_ext>& expr)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ class op_strans
|
||||
static constexpr bool is_row = T1::is_col; // deliberately swapped
|
||||
static constexpr bool is_col = T1::is_row;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = T1::is_d2sp;
|
||||
};
|
||||
|
||||
template<const bool do_flip, const uword row, const uword col>
|
||||
|
||||
@@ -34,7 +34,6 @@ class spdiagview : public SpBase< eT, spdiagview<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
const uword row_offset;
|
||||
const uword col_offset;
|
||||
|
||||
@@ -31,7 +31,6 @@ class spglue_join_cols
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = (T1::is_col && T2::is_col);
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
@@ -59,7 +58,6 @@ class spglue_join_rows
|
||||
static constexpr bool is_row = (T1::is_row && T2::is_row);
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -31,7 +31,6 @@ class spglue_kron
|
||||
static constexpr bool is_row = (T1::is_row && T2::is_row);
|
||||
static constexpr bool is_col = (T1::is_col && T2::is_col);
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -31,7 +31,6 @@ class spglue_times
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
@@ -56,7 +55,6 @@ class spglue_times_mixed
|
||||
static constexpr bool is_row = T1::is_row;
|
||||
static constexpr bool is_col = T2::is_col;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
|
||||
@@ -32,7 +32,6 @@ class spop_htrans
|
||||
static constexpr bool is_row = T1::is_col; // deliberately swapped
|
||||
static constexpr bool is_col = T1::is_row;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename T1>
|
||||
|
||||
@@ -32,7 +32,6 @@ class spop_strans
|
||||
static constexpr bool is_row = T1::is_col; // deliberately swapped
|
||||
static constexpr bool is_col = T1::is_row;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
static constexpr bool is_d2sp = false;
|
||||
};
|
||||
|
||||
template<typename eT>
|
||||
|
||||
@@ -35,7 +35,6 @@ class subview : public Base< eT, subview<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
const uword aux_row1;
|
||||
const uword aux_col1;
|
||||
@@ -370,7 +369,6 @@ class subview_col : public subview<eT>
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
const eT* colmem;
|
||||
|
||||
@@ -465,7 +463,6 @@ class subview_cols : public subview<eT>
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline subview_cols(const subview_cols& in);
|
||||
inline subview_cols( subview_cols&& in);
|
||||
@@ -527,7 +524,6 @@ class subview_row : public subview<eT>
|
||||
static constexpr bool is_row = true;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
inline void operator= (const subview<eT>& x);
|
||||
inline void operator= (const subview_row& x);
|
||||
@@ -615,7 +611,6 @@ class subview_row_strans : public Base< eT, subview_row_strans<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const subview_row<eT>& sv_row;
|
||||
|
||||
@@ -651,7 +646,6 @@ class subview_row_htrans : public Base< eT, subview_row_htrans<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const subview_row<eT>& sv_row;
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ class subview_elem1 : public Base< eT, subview_elem1<eT,T1> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<eT> fake_m;
|
||||
arma_aligned const Mat<eT>& m;
|
||||
|
||||
@@ -32,7 +32,6 @@ class subview_elem2 : public Base< eT, subview_elem2<eT,T1,T2> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const Mat<eT>& m;
|
||||
|
||||
|
||||
@@ -342,19 +342,6 @@ struct is_SpToDOp< const SpToDOp<T1,op_type> >
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
|
||||
template<typename T>
|
||||
struct is_mtSpToDOp
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
template<typename eT, typename T1, typename op_type>
|
||||
struct is_mtSpToDOp< mtSpToDOp<eT, T1, op_type> >
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
template<typename eT, typename T1, typename op_type>
|
||||
struct is_mtSpToDOp< const mtSpToDOp<eT, T1, op_type> >
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
|
||||
template<typename T>
|
||||
struct is_SpToDGlue
|
||||
{ static constexpr bool value = false; };
|
||||
@@ -570,7 +557,6 @@ struct is_arma_type2
|
||||
|| is_CubeToMatOp<T1>::value
|
||||
|| is_SpToDOp<T1>::value
|
||||
|| is_SpToDGlue<T1>::value
|
||||
|| is_mtSpToDOp<T1>::value
|
||||
;
|
||||
};
|
||||
|
||||
@@ -704,15 +690,6 @@ struct is_SpOp< SpOp<T1,op_type> >
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
|
||||
template<typename T>
|
||||
struct is_SpReductionOp
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
struct is_SpReductionOp< SpReductionOp<T1,op_type> >
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
|
||||
template<typename T>
|
||||
struct is_SpGlue
|
||||
{ static constexpr bool value = false; };
|
||||
@@ -731,15 +708,6 @@ struct is_mtSpOp< mtSpOp<eT, T1, spop_type> >
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
|
||||
template<typename T>
|
||||
struct is_mtSpReductionOp
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
template<typename eT, typename T1, typename spop_type>
|
||||
struct is_mtSpReductionOp< mtSpReductionOp<eT, T1, spop_type> >
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
|
||||
template<typename T>
|
||||
struct is_mtSpGlue
|
||||
{ static constexpr bool value = false; };
|
||||
@@ -749,6 +717,15 @@ struct is_mtSpGlue< mtSpGlue<eT, T1, T2, spglue_type> >
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
|
||||
template<typename T>
|
||||
struct is_mtSpReductionOp
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
template<typename eT, typename T1, typename op_type>
|
||||
struct is_mtSpReductionOp< mtSpReductionOp<eT, T1, op_type> >
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
|
||||
|
||||
template<typename T1>
|
||||
struct is_arma_sparse_type
|
||||
@@ -761,11 +738,10 @@ struct is_arma_sparse_type
|
||||
|| is_SpSubview_row<T1>::value
|
||||
|| is_spdiagview<T1>::value
|
||||
|| is_SpOp<T1>::value
|
||||
|| is_SpReductionOp<T1>::value
|
||||
|| is_SpGlue<T1>::value
|
||||
|| is_mtSpOp<T1>::value
|
||||
|| is_mtSpReductionOp<T1>::value
|
||||
|| is_mtSpGlue<T1>::value
|
||||
|| is_mtSpReductionOp<T1>::value
|
||||
;
|
||||
};
|
||||
|
||||
|
||||
@@ -193,4 +193,24 @@ struct unwrap_spmat< mtSpGlue<out_eT, T1, T2, spglue_type> >
|
||||
|
||||
|
||||
|
||||
template<typename out_eT, typename T1, typename op_type>
|
||||
struct unwrap_spmat< mtSpReductionOp<out_eT, T1, op_type> >
|
||||
{
|
||||
typedef SpMat<out_eT> stored_type;
|
||||
|
||||
inline
|
||||
unwrap_spmat(const mtSpReductionOp<out_eT, T1, op_type>& A)
|
||||
: M(A)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
}
|
||||
|
||||
const SpMat<out_eT> M;
|
||||
|
||||
template<typename eT2>
|
||||
constexpr bool is_alias(const SpMat<eT2>&) const { return false; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
@@ -31,7 +31,6 @@ class xtrans_mat : public Base< eT, xtrans_mat<eT, do_conj> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
static constexpr bool really_do_conj = (do_conj && is_cx<eT>::yes);
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ class xvec_htrans : public Base< eT, xvec_htrans<eT> >
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
static constexpr bool is_d2sp = false;
|
||||
|
||||
arma_aligned const eT* const mem;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user