10 #ifndef EIGEN_SKYLINEUTIL_H
11 #define EIGEN_SKYLINEUTIL_H
16 #define EIGEN_DBG_SKYLINE(X)
18 #define EIGEN_DBG_SKYLINE(X) X
21 const unsigned int SkylineBit = 0x1200;
22 template<
typename Lhs,
typename Rhs,
int ProductMode>
class SkylineProduct;
23 enum AdditionalProductEvaluationMode {SkylineTimeDenseProduct, SkylineTimeSkylineProduct, DenseTimeSkylineProduct};
24 enum {IsSkyline = SkylineBit};
27 #define EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, Op) \
28 template<typename OtherDerived> \
29 EIGEN_STRONG_INLINE Derived& operator Op(const Eigen::SkylineMatrixBase<OtherDerived>& other) \
31 return Base::operator Op(other.derived()); \
33 EIGEN_STRONG_INLINE Derived& operator Op(const Derived& other) \
35 return Base::operator Op(other); \
38 #define EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \
39 template<typename Other> \
40 EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \
42 return Base::operator Op(scalar); \
45 #define EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
46 EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, =) \
47 EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, +=) \
48 EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, -=) \
49 EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, *=) \
50 EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, /=)
52 #define _EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, BaseClass) \
53 typedef BaseClass Base; \
54 typedef typename Eigen::internal::traits<Derived>::Scalar Scalar; \
55 typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \
56 typedef typename Eigen::internal::traits<Derived>::StorageKind StorageKind; \
57 typedef typename Eigen::internal::index<StorageKind>::type Index; \
58 enum { Flags = Eigen::internal::traits<Derived>::Flags, };
60 #define EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived) \
61 _EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::SkylineMatrixBase<Derived>)
63 template<
typename Derived>
class SkylineMatrixBase;
64 template<
typename _Scalar,
int _Flags = 0>
class SkylineMatrix;
65 template<
typename _Scalar,
int _Flags = 0>
class DynamicSkylineMatrix;
66 template<
typename _Scalar,
int _Flags = 0>
class SkylineVector;
67 template<
typename _Scalar,
int _Flags = 0>
class MappedSkylineMatrix;
71 template<
typename Lhs,
typename Rhs>
struct skyline_product_mode;
72 template<typename Lhs, typename Rhs, int ProductMode = skyline_product_mode<Lhs,Rhs>::value>
struct SkylineProductReturnType;
74 template<
typename T>
class eval<T,IsSkyline>
76 typedef typename traits<T>::Scalar _Scalar;
78 _Flags = traits<T>::Flags
82 typedef SkylineMatrix<_Scalar, _Flags> type;
89 #endif // EIGEN_SKYLINEUTIL_H