SkylineUtil.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2009 Guillaume Saupin <guillaume.saupin@cea.fr>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #ifndef EIGEN_SKYLINEUTIL_H
11 #define EIGEN_SKYLINEUTIL_H
12 
13 #include "./InternalHeaderCheck.h"
14 
15 namespace Eigen {
16 
17 #ifdef NDEBUG
18 #define EIGEN_DBG_SKYLINE(X)
19 #else
20 #define EIGEN_DBG_SKYLINE(X) X
21 #endif
22 
23 const unsigned int SkylineBit = 0x1200;
24 template<typename Lhs, typename Rhs, int ProductMode> class SkylineProduct;
27 
28 
29 #define EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, Op) \
30 template<typename OtherDerived> \
31 EIGEN_STRONG_INLINE Derived& operator Op(const Eigen::SkylineMatrixBase<OtherDerived>& other) \
32 { \
33  return Base::operator Op(other.derived()); \
34 } \
35 EIGEN_STRONG_INLINE Derived& operator Op(const Derived& other) \
36 { \
37  return Base::operator Op(other); \
38 }
39 
40 #define EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \
41 template<typename Other> \
42 EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \
43 { \
44  return Base::operator Op(scalar); \
45 }
46 
47 #define EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
48  EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, =) \
49  EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, +=) \
50  EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, -=) \
51  EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, *=) \
52  EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, /=)
53 
54 #define EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE_(Derived, BaseClass) \
55  typedef BaseClass Base; \
56  typedef typename Eigen::internal::traits<Derived>::Scalar Scalar; \
57  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \
58  typedef typename Eigen::internal::traits<Derived>::StorageKind StorageKind; \
59  typedef typename Eigen::internal::index<StorageKind>::type Index; \
60  enum { Flags = Eigen::internal::traits<Derived>::Flags, };
61 
62 #define EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived) \
63  EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE_(Derived, Eigen::SkylineMatrixBase<Derived>)
64 
65 template<typename Derived> class SkylineMatrixBase;
66 template<typename Scalar_, int Flags_ = 0> class SkylineMatrix;
67 template<typename Scalar_, int Flags_ = 0> class DynamicSkylineMatrix;
68 template<typename Scalar_, int Flags_ = 0> class SkylineVector;
69 template<typename Scalar_, int Flags_ = 0> class MappedSkylineMatrix;
70 
71 namespace internal {
72 
73 template<typename Lhs, typename Rhs> struct skyline_product_mode;
74 template<typename Lhs, typename Rhs, int ProductMode = skyline_product_mode<Lhs,Rhs>::value> struct SkylineProductReturnType;
75 
76 template<typename T> class eval<T,IsSkyline>
77 {
78  typedef typename traits<T>::Scalar Scalar_;
79  enum {
80  Flags_ = traits<T>::Flags
81  };
82 
83  public:
84  typedef SkylineMatrix<Scalar_, Flags_> type;
85 };
86 
87 } // end namespace internal
88 
89 } // end namespace Eigen
90 
91 #endif // EIGEN_SKYLINEUTIL_H
The main skyline matrix class.
Definition: SkylineMatrix.h:54
: TensorContractionSycl.h, provides various tensor contraction kernel for SYCL backend
AdditionalProductEvaluationMode
Definition: SkylineUtil.h:25
@ SkylineTimeSkylineProduct
Definition: SkylineUtil.h:25
@ SkylineTimeDenseProduct
Definition: SkylineUtil.h:25
@ DenseTimeSkylineProduct
Definition: SkylineUtil.h:25
@ IsSkyline
Definition: SkylineUtil.h:26
const unsigned int SkylineBit
Definition: SkylineUtil.h:23