25 #ifndef EIGEN_SKYLINEUTIL_H
26 #define EIGEN_SKYLINEUTIL_H
31 #define EIGEN_DBG_SKYLINE(X)
33 #define EIGEN_DBG_SKYLINE(X) X
36 const unsigned int SkylineBit = 0x1200;
37 template<
typename Lhs,
typename Rhs,
int ProductMode>
class SkylineProduct;
38 enum AdditionalProductEvaluationMode {SkylineTimeDenseProduct, SkylineTimeSkylineProduct, DenseTimeSkylineProduct};
39 enum {IsSkyline = SkylineBit};
42 #define EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, Op) \
43 template<typename OtherDerived> \
44 EIGEN_STRONG_INLINE Derived& operator Op(const Eigen::SkylineMatrixBase<OtherDerived>& other) \
46 return Base::operator Op(other.derived()); \
48 EIGEN_STRONG_INLINE Derived& operator Op(const Derived& other) \
50 return Base::operator Op(other); \
53 #define EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \
54 template<typename Other> \
55 EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \
57 return Base::operator Op(scalar); \
60 #define EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
61 EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, =) \
62 EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, +=) \
63 EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, -=) \
64 EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, *=) \
65 EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, /=)
67 #define _EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, BaseClass) \
68 typedef BaseClass Base; \
69 typedef typename Eigen::internal::traits<Derived>::Scalar Scalar; \
70 typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \
71 typedef typename Eigen::internal::traits<Derived>::StorageKind StorageKind; \
72 typedef typename Eigen::internal::index<StorageKind>::type Index; \
73 enum { Flags = Eigen::internal::traits<Derived>::Flags, };
75 #define EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived) \
76 _EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::SkylineMatrixBase<Derived>)
78 template<
typename Derived>
class SkylineMatrixBase;
79 template<
typename _Scalar,
int _Flags = 0>
class SkylineMatrix;
80 template<
typename _Scalar,
int _Flags = 0>
class DynamicSkylineMatrix;
81 template<
typename _Scalar,
int _Flags = 0>
class SkylineVector;
82 template<
typename _Scalar,
int _Flags = 0>
class MappedSkylineMatrix;
86 template<
typename Lhs,
typename Rhs>
struct skyline_product_mode;
87 template<typename Lhs, typename Rhs, int ProductMode = skyline_product_mode<Lhs,Rhs>::value>
struct SkylineProductReturnType;
89 template<
typename T>
class eval<T,IsSkyline>
91 typedef typename traits<T>::Scalar _Scalar;
93 _Flags = traits<T>::Flags
97 typedef SkylineMatrix<_Scalar, _Flags> type;
104 #endif // EIGEN_SKYLINEUTIL_H