@smake/eigen 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/README.md +1 -1
  2. package/eigen/COPYING.APACHE +203 -0
  3. package/eigen/COPYING.BSD +1 -1
  4. package/eigen/COPYING.MINPACK +51 -52
  5. package/eigen/Eigen/Cholesky +0 -1
  6. package/eigen/Eigen/Core +108 -266
  7. package/eigen/Eigen/Eigenvalues +0 -1
  8. package/eigen/Eigen/Geometry +3 -6
  9. package/eigen/Eigen/Householder +0 -1
  10. package/eigen/Eigen/Jacobi +0 -1
  11. package/eigen/Eigen/KLUSupport +41 -0
  12. package/eigen/Eigen/LU +2 -5
  13. package/eigen/Eigen/OrderingMethods +0 -3
  14. package/eigen/Eigen/PaStiXSupport +1 -0
  15. package/eigen/Eigen/PardisoSupport +0 -0
  16. package/eigen/Eigen/QR +0 -1
  17. package/eigen/Eigen/QtAlignedMalloc +0 -1
  18. package/eigen/Eigen/SVD +0 -1
  19. package/eigen/Eigen/Sparse +0 -2
  20. package/eigen/Eigen/SparseCholesky +0 -8
  21. package/eigen/Eigen/SparseLU +4 -0
  22. package/eigen/Eigen/src/Cholesky/LDLT.h +42 -27
  23. package/eigen/Eigen/src/Cholesky/LLT.h +39 -23
  24. package/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +90 -47
  25. package/eigen/Eigen/src/Core/ArithmeticSequence.h +413 -0
  26. package/eigen/Eigen/src/Core/Array.h +99 -11
  27. package/eigen/Eigen/src/Core/ArrayBase.h +1 -1
  28. package/eigen/Eigen/src/Core/ArrayWrapper.h +21 -21
  29. package/eigen/Eigen/src/Core/Assign.h +1 -1
  30. package/eigen/Eigen/src/Core/AssignEvaluator.h +125 -50
  31. package/eigen/Eigen/src/Core/Assign_MKL.h +10 -10
  32. package/eigen/Eigen/src/Core/BandMatrix.h +16 -16
  33. package/eigen/Eigen/src/Core/Block.h +56 -60
  34. package/eigen/Eigen/src/Core/BooleanRedux.h +29 -31
  35. package/eigen/Eigen/src/Core/CommaInitializer.h +7 -3
  36. package/eigen/Eigen/src/Core/CoreEvaluators.h +325 -272
  37. package/eigen/Eigen/src/Core/CoreIterators.h +5 -0
  38. package/eigen/Eigen/src/Core/CwiseBinaryOp.h +21 -22
  39. package/eigen/Eigen/src/Core/CwiseNullaryOp.h +153 -18
  40. package/eigen/Eigen/src/Core/CwiseUnaryOp.h +6 -6
  41. package/eigen/Eigen/src/Core/CwiseUnaryView.h +12 -10
  42. package/eigen/Eigen/src/Core/DenseBase.h +128 -39
  43. package/eigen/Eigen/src/Core/DenseCoeffsBase.h +25 -21
  44. package/eigen/Eigen/src/Core/DenseStorage.h +150 -68
  45. package/eigen/Eigen/src/Core/Diagonal.h +21 -23
  46. package/eigen/Eigen/src/Core/DiagonalMatrix.h +50 -2
  47. package/eigen/Eigen/src/Core/DiagonalProduct.h +1 -1
  48. package/eigen/Eigen/src/Core/Dot.h +10 -10
  49. package/eigen/Eigen/src/Core/EigenBase.h +10 -9
  50. package/eigen/Eigen/src/Core/ForceAlignedAccess.h +8 -4
  51. package/eigen/Eigen/src/Core/Fuzzy.h +3 -3
  52. package/eigen/Eigen/src/Core/GeneralProduct.h +20 -10
  53. package/eigen/Eigen/src/Core/GenericPacketMath.h +597 -147
  54. package/eigen/Eigen/src/Core/GlobalFunctions.h +40 -33
  55. package/eigen/Eigen/src/Core/IO.h +40 -7
  56. package/eigen/Eigen/src/Core/IndexedView.h +237 -0
  57. package/eigen/Eigen/src/Core/Inverse.h +9 -10
  58. package/eigen/Eigen/src/Core/Map.h +7 -7
  59. package/eigen/Eigen/src/Core/MapBase.h +5 -3
  60. package/eigen/Eigen/src/Core/MathFunctions.h +756 -120
  61. package/eigen/Eigen/src/Core/MathFunctionsImpl.h +118 -19
  62. package/eigen/Eigen/src/Core/Matrix.h +131 -25
  63. package/eigen/Eigen/src/Core/MatrixBase.h +19 -2
  64. package/eigen/Eigen/src/Core/NestByValue.h +25 -50
  65. package/eigen/Eigen/src/Core/NoAlias.h +4 -3
  66. package/eigen/Eigen/src/Core/NumTraits.h +107 -20
  67. package/eigen/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
  68. package/eigen/Eigen/src/Core/PermutationMatrix.h +3 -3
  69. package/eigen/Eigen/src/Core/PlainObjectBase.h +145 -54
  70. package/eigen/Eigen/src/Core/Product.h +30 -25
  71. package/eigen/Eigen/src/Core/ProductEvaluators.h +183 -142
  72. package/eigen/Eigen/src/Core/Random.h +37 -1
  73. package/eigen/Eigen/src/Core/Redux.h +180 -170
  74. package/eigen/Eigen/src/Core/Ref.h +118 -21
  75. package/eigen/Eigen/src/Core/Replicate.h +8 -8
  76. package/eigen/Eigen/src/Core/Reshaped.h +454 -0
  77. package/eigen/Eigen/src/Core/ReturnByValue.h +7 -5
  78. package/eigen/Eigen/src/Core/Reverse.h +18 -12
  79. package/eigen/Eigen/src/Core/Select.h +8 -6
  80. package/eigen/Eigen/src/Core/SelfAdjointView.h +33 -20
  81. package/eigen/Eigen/src/Core/Solve.h +14 -14
  82. package/eigen/Eigen/src/Core/SolveTriangular.h +13 -13
  83. package/eigen/Eigen/src/Core/SolverBase.h +41 -3
  84. package/eigen/Eigen/src/Core/StableNorm.h +100 -70
  85. package/eigen/Eigen/src/Core/StlIterators.h +463 -0
  86. package/eigen/Eigen/src/Core/Stride.h +9 -4
  87. package/eigen/Eigen/src/Core/Swap.h +5 -4
  88. package/eigen/Eigen/src/Core/Transpose.h +86 -27
  89. package/eigen/Eigen/src/Core/Transpositions.h +26 -8
  90. package/eigen/Eigen/src/Core/TriangularMatrix.h +88 -72
  91. package/eigen/Eigen/src/Core/VectorBlock.h +5 -5
  92. package/eigen/Eigen/src/Core/VectorwiseOp.h +159 -70
  93. package/eigen/Eigen/src/Core/Visitor.h +137 -29
  94. package/eigen/Eigen/src/Core/arch/AVX/Complex.h +50 -129
  95. package/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +126 -337
  96. package/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +1092 -155
  97. package/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +65 -1
  98. package/eigen/Eigen/src/Core/arch/AVX512/Complex.h +422 -0
  99. package/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +186 -213
  100. package/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +1250 -252
  101. package/eigen/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
  102. package/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +152 -165
  103. package/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +19 -251
  104. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2937 -0
  105. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
  106. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +629 -0
  107. package/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +2042 -392
  108. package/eigen/Eigen/src/Core/arch/CUDA/Complex.h +235 -80
  109. package/eigen/Eigen/src/Core/arch/Default/BFloat16.h +700 -0
  110. package/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +102 -14
  111. package/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1649 -0
  112. package/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +110 -0
  113. package/eigen/Eigen/src/Core/arch/Default/Half.h +942 -0
  114. package/eigen/Eigen/src/Core/arch/Default/Settings.h +1 -1
  115. package/eigen/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
  116. package/eigen/Eigen/src/Core/arch/{CUDA → GPU}/MathFunctions.h +16 -4
  117. package/eigen/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
  118. package/eigen/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
  119. package/eigen/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
  120. package/eigen/Eigen/src/Core/arch/MSA/Complex.h +648 -0
  121. package/eigen/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
  122. package/eigen/Eigen/src/Core/arch/MSA/PacketMath.h +1233 -0
  123. package/eigen/Eigen/src/Core/arch/NEON/Complex.h +313 -219
  124. package/eigen/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
  125. package/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +54 -70
  126. package/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +4376 -549
  127. package/eigen/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
  128. package/eigen/Eigen/src/Core/arch/SSE/Complex.h +59 -179
  129. package/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +65 -428
  130. package/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +893 -283
  131. package/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +65 -0
  132. package/eigen/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
  133. package/eigen/Eigen/src/Core/arch/SVE/PacketMath.h +752 -0
  134. package/eigen/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
  135. package/eigen/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
  136. package/eigen/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
  137. package/eigen/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
  138. package/eigen/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
  139. package/eigen/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
  140. package/eigen/Eigen/src/Core/arch/ZVector/Complex.h +212 -183
  141. package/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +101 -5
  142. package/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +510 -395
  143. package/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +11 -2
  144. package/eigen/Eigen/src/Core/functors/BinaryFunctors.h +112 -46
  145. package/eigen/Eigen/src/Core/functors/NullaryFunctors.h +31 -30
  146. package/eigen/Eigen/src/Core/functors/StlFunctors.h +32 -2
  147. package/eigen/Eigen/src/Core/functors/UnaryFunctors.h +354 -15
  148. package/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +1073 -585
  149. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +29 -7
  150. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +4 -4
  151. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +1 -1
  152. package/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +382 -483
  153. package/eigen/Eigen/src/Core/products/Parallelizer.h +23 -9
  154. package/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +23 -6
  155. package/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +8 -6
  156. package/eigen/Eigen/src/Core/products/SelfadjointProduct.h +2 -2
  157. package/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +5 -4
  158. package/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +3 -3
  159. package/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +5 -3
  160. package/eigen/Eigen/src/Core/products/TriangularSolverVector.h +13 -10
  161. package/eigen/Eigen/src/Core/util/BlasUtil.h +208 -124
  162. package/eigen/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
  163. package/eigen/Eigen/src/Core/util/Constants.h +25 -9
  164. package/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +14 -2
  165. package/eigen/Eigen/src/Core/util/ForwardDeclarations.h +28 -4
  166. package/eigen/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
  167. package/eigen/Eigen/src/Core/util/IntegralConstant.h +272 -0
  168. package/eigen/Eigen/src/Core/util/MKL_support.h +8 -1
  169. package/eigen/Eigen/src/Core/util/Macros.h +661 -250
  170. package/eigen/Eigen/src/Core/util/Memory.h +222 -52
  171. package/eigen/Eigen/src/Core/util/Meta.h +349 -105
  172. package/eigen/Eigen/src/Core/util/ReshapedHelper.h +51 -0
  173. package/eigen/Eigen/src/Core/util/StaticAssert.h +8 -5
  174. package/eigen/Eigen/src/Core/util/SymbolicIndex.h +293 -0
  175. package/eigen/Eigen/src/Core/util/XprHelper.h +48 -30
  176. package/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +1 -1
  177. package/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +1 -1
  178. package/eigen/Eigen/src/Eigenvalues/EigenSolver.h +2 -2
  179. package/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +1 -1
  180. package/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +2 -2
  181. package/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +2 -2
  182. package/eigen/Eigen/src/Eigenvalues/RealQZ.h +9 -6
  183. package/eigen/Eigen/src/Eigenvalues/RealSchur.h +10 -5
  184. package/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +75 -42
  185. package/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +20 -15
  186. package/eigen/Eigen/src/Geometry/AlignedBox.h +99 -5
  187. package/eigen/Eigen/src/Geometry/AngleAxis.h +4 -4
  188. package/eigen/Eigen/src/Geometry/EulerAngles.h +3 -3
  189. package/eigen/Eigen/src/Geometry/Homogeneous.h +15 -11
  190. package/eigen/Eigen/src/Geometry/Hyperplane.h +1 -1
  191. package/eigen/Eigen/src/Geometry/OrthoMethods.h +3 -2
  192. package/eigen/Eigen/src/Geometry/ParametrizedLine.h +39 -2
  193. package/eigen/Eigen/src/Geometry/Quaternion.h +52 -14
  194. package/eigen/Eigen/src/Geometry/Rotation2D.h +3 -3
  195. package/eigen/Eigen/src/Geometry/Scaling.h +22 -4
  196. package/eigen/Eigen/src/Geometry/Transform.h +86 -65
  197. package/eigen/Eigen/src/Geometry/Translation.h +6 -6
  198. package/eigen/Eigen/src/Geometry/arch/Geometry_SIMD.h +168 -0
  199. package/eigen/Eigen/src/Householder/BlockHouseholder.h +9 -2
  200. package/eigen/Eigen/src/Householder/Householder.h +8 -4
  201. package/eigen/Eigen/src/Householder/HouseholderSequence.h +123 -48
  202. package/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +15 -15
  203. package/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +7 -23
  204. package/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +5 -22
  205. package/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +41 -47
  206. package/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +51 -60
  207. package/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +70 -20
  208. package/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +2 -20
  209. package/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +11 -9
  210. package/eigen/Eigen/src/Jacobi/Jacobi.h +31 -10
  211. package/eigen/Eigen/src/KLUSupport/KLUSupport.h +358 -0
  212. package/eigen/Eigen/src/LU/Determinant.h +35 -19
  213. package/eigen/Eigen/src/LU/FullPivLU.h +29 -43
  214. package/eigen/Eigen/src/LU/InverseImpl.h +25 -8
  215. package/eigen/Eigen/src/LU/PartialPivLU.h +67 -57
  216. package/eigen/Eigen/src/LU/arch/InverseSize4.h +351 -0
  217. package/eigen/Eigen/src/OrderingMethods/Amd.h +7 -17
  218. package/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +297 -277
  219. package/eigen/Eigen/src/OrderingMethods/Ordering.h +6 -10
  220. package/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +1 -1
  221. package/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +10 -9
  222. package/eigen/Eigen/src/QR/ColPivHouseholderQR.h +41 -20
  223. package/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +100 -27
  224. package/eigen/Eigen/src/QR/FullPivHouseholderQR.h +59 -22
  225. package/eigen/Eigen/src/QR/HouseholderQR.h +48 -23
  226. package/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +25 -3
  227. package/eigen/Eigen/src/SVD/BDCSVD.h +137 -48
  228. package/eigen/Eigen/src/SVD/JacobiSVD.h +22 -14
  229. package/eigen/Eigen/src/SVD/SVDBase.h +82 -21
  230. package/eigen/Eigen/src/SVD/UpperBidiagonalization.h +3 -3
  231. package/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +16 -8
  232. package/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +11 -36
  233. package/eigen/Eigen/src/SparseCore/CompressedStorage.h +16 -0
  234. package/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +6 -6
  235. package/eigen/Eigen/src/SparseCore/SparseAssign.h +81 -27
  236. package/eigen/Eigen/src/SparseCore/SparseBlock.h +25 -57
  237. package/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +40 -11
  238. package/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +11 -15
  239. package/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +2 -2
  240. package/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +30 -8
  241. package/eigen/Eigen/src/SparseCore/SparseMatrix.h +124 -10
  242. package/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +5 -12
  243. package/eigen/Eigen/src/SparseCore/SparseProduct.h +13 -1
  244. package/eigen/Eigen/src/SparseCore/SparseRef.h +7 -7
  245. package/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +3 -0
  246. package/eigen/Eigen/src/SparseCore/SparseUtil.h +8 -0
  247. package/eigen/Eigen/src/SparseCore/SparseVector.h +1 -1
  248. package/eigen/Eigen/src/SparseLU/SparseLU.h +160 -10
  249. package/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +1 -1
  250. package/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +76 -2
  251. package/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +2 -2
  252. package/eigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +1 -1
  253. package/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +1 -1
  254. package/eigen/Eigen/src/SparseQR/SparseQR.h +19 -6
  255. package/eigen/Eigen/src/StlSupport/StdDeque.h +2 -14
  256. package/eigen/Eigen/src/StlSupport/StdList.h +2 -2
  257. package/eigen/Eigen/src/StlSupport/StdVector.h +2 -2
  258. package/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +6 -8
  259. package/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +175 -39
  260. package/eigen/Eigen/src/misc/lapacke.h +5 -4
  261. package/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.h +27 -1
  262. package/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.h +155 -11
  263. package/eigen/Eigen/src/plugins/BlockMethods.h +626 -242
  264. package/eigen/Eigen/src/plugins/CommonCwiseUnaryOps.h +14 -0
  265. package/eigen/Eigen/src/plugins/IndexedViewMethods.h +262 -0
  266. package/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.h +4 -4
  267. package/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.h +10 -0
  268. package/eigen/Eigen/src/plugins/ReshapedMethods.h +149 -0
  269. package/eigen/README.md +2 -0
  270. package/lib/LibEigen.d.ts +4 -0
  271. package/lib/LibEigen.js +14 -0
  272. package/lib/index.d.ts +1 -1
  273. package/lib/index.js +7 -3
  274. package/package.json +2 -10
  275. package/eigen/Eigen/CMakeLists.txt +0 -19
  276. package/eigen/Eigen/src/Core/arch/CUDA/Half.h +0 -675
  277. package/eigen/Eigen/src/Core/arch/CUDA/PacketMath.h +0 -333
  278. package/eigen/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +0 -1124
  279. package/eigen/Eigen/src/Core/arch/CUDA/TypeCasting.h +0 -212
  280. package/eigen/Eigen/src/Geometry/arch/Geometry_SSE.h +0 -161
  281. package/eigen/Eigen/src/LU/arch/Inverse_SSE.h +0 -338
  282. package/lib/eigen.d.ts +0 -2
  283. package/lib/eigen.js +0 -15
@@ -11,12 +11,12 @@
11
11
  #ifndef EIGEN_TRIANGULARMATRIX_H
12
12
  #define EIGEN_TRIANGULARMATRIX_H
13
13
 
14
- namespace Eigen {
14
+ namespace Eigen {
15
15
 
16
16
  namespace internal {
17
-
17
+
18
18
  template<int Side, typename TriangularType, typename Rhs> struct triangular_solve_retval;
19
-
19
+
20
20
  }
21
21
 
22
22
  /** \class TriangularBase
@@ -34,16 +34,16 @@ template<typename Derived> class TriangularBase : public EigenBase<Derived>
34
34
  ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
35
35
  MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,
36
36
  MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,
37
-
37
+
38
38
  SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,
39
39
  internal::traits<Derived>::ColsAtCompileTime>::ret),
40
40
  /**< This is equal to the number of coefficients, i.e. the number of
41
41
  * rows times the number of columns, or to \a Dynamic if this is not
42
42
  * known at compile-time. \sa RowsAtCompileTime, ColsAtCompileTime */
43
-
43
+
44
44
  MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,
45
45
  internal::traits<Derived>::MaxColsAtCompileTime>::ret)
46
-
46
+
47
47
  };
48
48
  typedef typename internal::traits<Derived>::Scalar Scalar;
49
49
  typedef typename internal::traits<Derived>::StorageKind StorageKind;
@@ -53,18 +53,19 @@ template<typename Derived> class TriangularBase : public EigenBase<Derived>
53
53
  typedef Derived const& Nested;
54
54
 
55
55
  EIGEN_DEVICE_FUNC
56
- inline TriangularBase() { eigen_assert(!((Mode&UnitDiag) && (Mode&ZeroDiag))); }
56
+ inline TriangularBase() { eigen_assert(!((int(Mode) & int(UnitDiag)) && (int(Mode) & int(ZeroDiag)))); }
57
+
58
+ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
59
+ inline Index rows() const EIGEN_NOEXCEPT { return derived().rows(); }
60
+ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
61
+ inline Index cols() const EIGEN_NOEXCEPT { return derived().cols(); }
62
+ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
63
+ inline Index outerStride() const EIGEN_NOEXCEPT { return derived().outerStride(); }
64
+ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
65
+ inline Index innerStride() const EIGEN_NOEXCEPT { return derived().innerStride(); }
57
66
 
58
- EIGEN_DEVICE_FUNC
59
- inline Index rows() const { return derived().rows(); }
60
- EIGEN_DEVICE_FUNC
61
- inline Index cols() const { return derived().cols(); }
62
- EIGEN_DEVICE_FUNC
63
- inline Index outerStride() const { return derived().outerStride(); }
64
- EIGEN_DEVICE_FUNC
65
- inline Index innerStride() const { return derived().innerStride(); }
66
-
67
67
  // dummy resize function
68
+ EIGEN_DEVICE_FUNC
68
69
  void resize(Index rows, Index cols)
69
70
  {
70
71
  EIGEN_UNUSED_VARIABLE(rows);
@@ -155,7 +156,7 @@ template<typename Derived> class TriangularBase : public EigenBase<Derived>
155
156
  * \param MatrixType the type of the object in which we are taking the triangular part
156
157
  * \param Mode the kind of triangular matrix expression to construct. Can be #Upper,
157
158
  * #Lower, #UnitUpper, #UnitLower, #StrictlyUpper, or #StrictlyLower.
158
- * This is in fact a bit field; it must have either #Upper or #Lower,
159
+ * This is in fact a bit field; it must have either #Upper or #Lower,
159
160
  * and additionally it may have #UnitDiag or #ZeroDiag or neither.
160
161
  *
161
162
  * This class represents a triangular part of a matrix, not necessarily square. Strictly speaking, for rectangular
@@ -197,7 +198,8 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
197
198
  typedef typename internal::traits<TriangularView>::MatrixTypeNestedNonRef MatrixTypeNestedNonRef;
198
199
 
199
200
  typedef typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type MatrixConjugateReturnType;
200
-
201
+ typedef TriangularView<typename internal::add_const<MatrixType>::type, _Mode> ConstTriangularView;
202
+
201
203
  public:
202
204
 
203
205
  typedef typename internal::traits<TriangularView>::StorageKind StorageKind;
@@ -216,15 +218,15 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
216
218
  EIGEN_DEVICE_FUNC
217
219
  explicit inline TriangularView(MatrixType& matrix) : m_matrix(matrix)
218
220
  {}
219
-
221
+
220
222
  EIGEN_INHERIT_ASSIGNMENT_OPERATORS(TriangularView)
221
223
 
222
224
  /** \copydoc EigenBase::rows() */
223
- EIGEN_DEVICE_FUNC
224
- inline Index rows() const { return m_matrix.rows(); }
225
+ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
226
+ inline Index rows() const EIGEN_NOEXCEPT { return m_matrix.rows(); }
225
227
  /** \copydoc EigenBase::cols() */
226
- EIGEN_DEVICE_FUNC
227
- inline Index cols() const { return m_matrix.cols(); }
228
+ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
229
+ inline Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); }
228
230
 
229
231
  /** \returns a const reference to the nested expression */
230
232
  EIGEN_DEVICE_FUNC
@@ -233,13 +235,25 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
233
235
  /** \returns a reference to the nested expression */
234
236
  EIGEN_DEVICE_FUNC
235
237
  NestedExpression& nestedExpression() { return m_matrix; }
236
-
238
+
237
239
  typedef TriangularView<const MatrixConjugateReturnType,Mode> ConjugateReturnType;
238
240
  /** \sa MatrixBase::conjugate() const */
239
241
  EIGEN_DEVICE_FUNC
240
242
  inline const ConjugateReturnType conjugate() const
241
243
  { return ConjugateReturnType(m_matrix.conjugate()); }
242
244
 
245
+ /** \returns an expression of the complex conjugate of \c *this if Cond==true,
246
+ * returns \c *this otherwise.
247
+ */
248
+ template<bool Cond>
249
+ EIGEN_DEVICE_FUNC
250
+ inline typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type
251
+ conjugateIf() const
252
+ {
253
+ typedef typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type ReturnType;
254
+ return ReturnType(m_matrix.template conjugateIf<Cond>());
255
+ }
256
+
243
257
  typedef TriangularView<const typename MatrixType::AdjointReturnType,TransposeMode> AdjointReturnType;
244
258
  /** \sa MatrixBase::adjoint() const */
245
259
  EIGEN_DEVICE_FUNC
@@ -255,7 +269,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
255
269
  typename MatrixType::TransposeReturnType tmp(m_matrix);
256
270
  return TransposeReturnType(tmp);
257
271
  }
258
-
272
+
259
273
  typedef TriangularView<const typename MatrixType::ConstTransposeReturnType,TransposeMode> ConstTransposeReturnType;
260
274
  /** \sa MatrixBase::transpose() const */
261
275
  EIGEN_DEVICE_FUNC
@@ -266,10 +280,10 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
266
280
 
267
281
  template<typename Other>
268
282
  EIGEN_DEVICE_FUNC
269
- inline const Solve<TriangularView, Other>
283
+ inline const Solve<TriangularView, Other>
270
284
  solve(const MatrixBase<Other>& other) const
271
285
  { return Solve<TriangularView, Other>(*this, other.derived()); }
272
-
286
+
273
287
  // workaround MSVC ICE
274
288
  #if EIGEN_COMP_MSVC
275
289
  template<int Side, typename Other>
@@ -313,7 +327,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
313
327
  else
314
328
  return m_matrix.diagonal().prod();
315
329
  }
316
-
330
+
317
331
  protected:
318
332
 
319
333
  MatrixTypeNested m_matrix;
@@ -375,7 +389,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
375
389
  internal::call_assignment_no_alias(derived(), other.derived(), internal::sub_assign_op<Scalar,typename Other::Scalar>());
376
390
  return derived();
377
391
  }
378
-
392
+
379
393
  /** \sa MatrixBase::operator*=() */
380
394
  EIGEN_DEVICE_FUNC
381
395
  TriangularViewType& operator*=(const typename internal::traits<MatrixType>::Scalar& other) { return *this = derived().nestedExpression() * other; }
@@ -433,14 +447,14 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
433
447
  TriangularViewType& operator=(const TriangularViewImpl& other)
434
448
  { return *this = other.derived().nestedExpression(); }
435
449
 
436
- /** \deprecated */
437
450
  template<typename OtherDerived>
438
- EIGEN_DEVICE_FUNC
451
+ /** \deprecated */
452
+ EIGEN_DEPRECATED EIGEN_DEVICE_FUNC
439
453
  void lazyAssign(const TriangularBase<OtherDerived>& other);
440
454
 
441
- /** \deprecated */
442
455
  template<typename OtherDerived>
443
- EIGEN_DEVICE_FUNC
456
+ /** \deprecated */
457
+ EIGEN_DEPRECATED EIGEN_DEVICE_FUNC
444
458
  void lazyAssign(const MatrixBase<OtherDerived>& other);
445
459
  #endif
446
460
 
@@ -468,7 +482,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
468
482
  * \a Side==OnTheLeft (the default), or the right-inverse-multiply \a other * inverse(\c *this) if
469
483
  * \a Side==OnTheRight.
470
484
  *
471
- * Note that the template parameter \c Side can be ommitted, in which case \c Side==OnTheLeft
485
+ * Note that the template parameter \c Side can be omitted, in which case \c Side==OnTheLeft
472
486
  *
473
487
  * The matrix \c *this must be triangular and invertible (i.e., all the coefficients of the
474
488
  * diagonal must be non zero). It works as a forward (resp. backward) substitution if \c *this
@@ -486,7 +500,6 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
486
500
  * \sa TriangularView::solveInPlace()
487
501
  */
488
502
  template<int Side, typename Other>
489
- EIGEN_DEVICE_FUNC
490
503
  inline const internal::triangular_solve_retval<Side,TriangularViewType, Other>
491
504
  solve(const MatrixBase<Other>& other) const;
492
505
 
@@ -495,7 +508,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
495
508
  * \warning The parameter is only marked 'const' to make the C++ compiler accept a temporary expression here.
496
509
  * This function will const_cast it, so constness isn't honored here.
497
510
  *
498
- * Note that the template parameter \c Side can be ommitted, in which case \c Side==OnTheLeft
511
+ * Note that the template parameter \c Side can be omitted, in which case \c Side==OnTheLeft
499
512
  *
500
513
  * See TriangularView:solve() for the details.
501
514
  */
@@ -521,10 +534,10 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
521
534
  call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
522
535
  }
523
536
 
524
- /** \deprecated
525
- * Shortcut for \code (*this).swap(other.triangularView<(*this)::Mode>()) \endcode */
537
+ /** Shortcut for \code (*this).swap(other.triangularView<(*this)::Mode>()) \endcode */
526
538
  template<typename OtherDerived>
527
- EIGEN_DEVICE_FUNC
539
+ /** \deprecated */
540
+ EIGEN_DEPRECATED EIGEN_DEVICE_FUNC
528
541
  void swap(MatrixBase<OtherDerived> const & other)
529
542
  {
530
543
  EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
@@ -556,7 +569,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
556
569
  // FIXME should we keep that possibility
557
570
  template<typename MatrixType, unsigned int Mode>
558
571
  template<typename OtherDerived>
559
- inline TriangularView<MatrixType, Mode>&
572
+ EIGEN_DEVICE_FUNC inline TriangularView<MatrixType, Mode>&
560
573
  TriangularViewImpl<MatrixType, Mode, Dense>::operator=(const MatrixBase<OtherDerived>& other)
561
574
  {
562
575
  internal::call_assignment_no_alias(derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
@@ -566,7 +579,7 @@ TriangularViewImpl<MatrixType, Mode, Dense>::operator=(const MatrixBase<OtherDer
566
579
  // FIXME should we keep that possibility
567
580
  template<typename MatrixType, unsigned int Mode>
568
581
  template<typename OtherDerived>
569
- void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const MatrixBase<OtherDerived>& other)
582
+ EIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const MatrixBase<OtherDerived>& other)
570
583
  {
571
584
  internal::call_assignment_no_alias(derived(), other.template triangularView<Mode>());
572
585
  }
@@ -575,7 +588,7 @@ void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const MatrixBase<Ot
575
588
 
576
589
  template<typename MatrixType, unsigned int Mode>
577
590
  template<typename OtherDerived>
578
- inline TriangularView<MatrixType, Mode>&
591
+ EIGEN_DEVICE_FUNC inline TriangularView<MatrixType, Mode>&
579
592
  TriangularViewImpl<MatrixType, Mode, Dense>::operator=(const TriangularBase<OtherDerived>& other)
580
593
  {
581
594
  eigen_assert(Mode == int(OtherDerived::Mode));
@@ -585,7 +598,7 @@ TriangularViewImpl<MatrixType, Mode, Dense>::operator=(const TriangularBase<Othe
585
598
 
586
599
  template<typename MatrixType, unsigned int Mode>
587
600
  template<typename OtherDerived>
588
- void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const TriangularBase<OtherDerived>& other)
601
+ EIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const TriangularBase<OtherDerived>& other)
589
602
  {
590
603
  eigen_assert(Mode == int(OtherDerived::Mode));
591
604
  internal::call_assignment_no_alias(derived(), other.derived());
@@ -600,7 +613,7 @@ void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const TriangularBas
600
613
  * If the matrix is triangular, the opposite part is set to zero. */
601
614
  template<typename Derived>
602
615
  template<typename DenseDerived>
603
- void TriangularBase<Derived>::evalTo(MatrixBase<DenseDerived> &other) const
616
+ EIGEN_DEVICE_FUNC void TriangularBase<Derived>::evalTo(MatrixBase<DenseDerived> &other) const
604
617
  {
605
618
  evalToLazy(other.derived());
606
619
  }
@@ -626,6 +639,7 @@ void TriangularBase<Derived>::evalTo(MatrixBase<DenseDerived> &other) const
626
639
  */
627
640
  template<typename Derived>
628
641
  template<unsigned int Mode>
642
+ EIGEN_DEVICE_FUNC
629
643
  typename MatrixBase<Derived>::template TriangularViewReturnType<Mode>::Type
630
644
  MatrixBase<Derived>::triangularView()
631
645
  {
@@ -635,6 +649,7 @@ MatrixBase<Derived>::triangularView()
635
649
  /** This is the const version of MatrixBase::triangularView() */
636
650
  template<typename Derived>
637
651
  template<unsigned int Mode>
652
+ EIGEN_DEVICE_FUNC
638
653
  typename MatrixBase<Derived>::template ConstTriangularViewReturnType<Mode>::Type
639
654
  MatrixBase<Derived>::triangularView() const
640
655
  {
@@ -700,7 +715,7 @@ bool MatrixBase<Derived>::isLowerTriangular(const RealScalar& prec) const
700
715
 
701
716
  namespace internal {
702
717
 
703
-
718
+
704
719
  // TODO currently a triangular expression has the form TriangularView<.,.>
705
720
  // in the future triangular-ness should be defined by the expression traits
706
721
  // such that Transpose<TriangularView<.,.> > is valid. (currently TriangularBase::transpose() is overloaded to make it work)
@@ -717,6 +732,7 @@ struct unary_evaluator<TriangularView<MatrixType,Mode>, IndexBased>
717
732
  {
718
733
  typedef TriangularView<MatrixType,Mode> XprType;
719
734
  typedef evaluator<typename internal::remove_all<MatrixType>::type> Base;
735
+ EIGEN_DEVICE_FUNC
720
736
  unary_evaluator(const XprType &xpr) : Base(xpr.nestedExpression()) {}
721
737
  };
722
738
 
@@ -728,7 +744,7 @@ struct Dense2Triangular {};
728
744
 
729
745
  template<typename Kernel, unsigned int Mode, int UnrollCount, bool ClearOpposite> struct triangular_assignment_loop;
730
746
 
731
-
747
+
732
748
  /** \internal Specialization of the dense assignment kernel for triangular matrices.
733
749
  * The main difference is that the triangular, diagonal, and opposite parts are processed through three different functions.
734
750
  * \tparam UpLo must be either Lower or Upper
@@ -745,17 +761,17 @@ protected:
745
761
  using Base::m_src;
746
762
  using Base::m_functor;
747
763
  public:
748
-
764
+
749
765
  typedef typename Base::DstEvaluatorType DstEvaluatorType;
750
766
  typedef typename Base::SrcEvaluatorType SrcEvaluatorType;
751
767
  typedef typename Base::Scalar Scalar;
752
768
  typedef typename Base::AssignmentTraits AssignmentTraits;
753
-
754
-
769
+
770
+
755
771
  EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType& dstExpr)
756
772
  : Base(dst, src, func, dstExpr)
757
773
  {}
758
-
774
+
759
775
  #ifdef EIGEN_INTERNAL_DEBUGGING
760
776
  EIGEN_DEVICE_FUNC void assignCoeff(Index row, Index col)
761
777
  {
@@ -765,16 +781,16 @@ public:
765
781
  #else
766
782
  using Base::assignCoeff;
767
783
  #endif
768
-
784
+
769
785
  EIGEN_DEVICE_FUNC void assignDiagonalCoeff(Index id)
770
786
  {
771
787
  if(Mode==UnitDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(id,id), Scalar(1));
772
788
  else if(Mode==ZeroDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(id,id), Scalar(0));
773
789
  else if(Mode==0) Base::assignCoeff(id,id);
774
790
  }
775
-
791
+
776
792
  EIGEN_DEVICE_FUNC void assignOppositeCoeff(Index row, Index col)
777
- {
793
+ {
778
794
  eigen_internal_assert(row!=col);
779
795
  if(SetOpposite)
780
796
  m_functor.assignCoeff(m_dst.coeffRef(row,col), Scalar(0));
@@ -795,17 +811,17 @@ void call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src, con
795
811
  if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
796
812
  dst.resize(dstRows, dstCols);
797
813
  DstEvaluatorType dstEvaluator(dst);
798
-
814
+
799
815
  typedef triangular_dense_assignment_kernel< Mode&(Lower|Upper),Mode&(UnitDiag|ZeroDiag|SelfAdjoint),SetOpposite,
800
816
  DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;
801
817
  Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
802
-
818
+
803
819
  enum {
804
820
  unroll = DstXprType::SizeAtCompileTime != Dynamic
805
821
  && SrcEvaluatorType::CoeffReadCost < HugeCost
806
- && DstXprType::SizeAtCompileTime * (DstEvaluatorType::CoeffReadCost+SrcEvaluatorType::CoeffReadCost) / 2 <= EIGEN_UNROLLING_LIMIT
822
+ && DstXprType::SizeAtCompileTime * (int(DstEvaluatorType::CoeffReadCost) + int(SrcEvaluatorType::CoeffReadCost)) / 2 <= EIGEN_UNROLLING_LIMIT
807
823
  };
808
-
824
+
809
825
  triangular_assignment_loop<Kernel, Mode, unroll ? int(DstXprType::SizeAtCompileTime) : Dynamic, SetOpposite>::run(kernel);
810
826
  }
811
827
 
@@ -827,8 +843,8 @@ struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Triangular>
827
843
  EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
828
844
  {
829
845
  eigen_assert(int(DstXprType::Mode) == int(SrcXprType::Mode));
830
-
831
- call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
846
+
847
+ call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
832
848
  }
833
849
  };
834
850
 
@@ -837,7 +853,7 @@ struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Dense>
837
853
  {
838
854
  EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
839
855
  {
840
- call_triangular_assignment_loop<SrcXprType::Mode, (SrcXprType::Mode&SelfAdjoint)==0>(dst, src, func);
856
+ call_triangular_assignment_loop<SrcXprType::Mode, (int(SrcXprType::Mode) & int(SelfAdjoint)) == 0>(dst, src, func);
841
857
  }
842
858
  };
843
859
 
@@ -846,7 +862,7 @@ struct Assignment<DstXprType, SrcXprType, Functor, Dense2Triangular>
846
862
  {
847
863
  EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
848
864
  {
849
- call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
865
+ call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
850
866
  }
851
867
  };
852
868
 
@@ -857,19 +873,19 @@ struct triangular_assignment_loop
857
873
  // FIXME: this is not very clean, perhaps this information should be provided by the kernel?
858
874
  typedef typename Kernel::DstEvaluatorType DstEvaluatorType;
859
875
  typedef typename DstEvaluatorType::XprType DstXprType;
860
-
876
+
861
877
  enum {
862
878
  col = (UnrollCount-1) / DstXprType::RowsAtCompileTime,
863
879
  row = (UnrollCount-1) % DstXprType::RowsAtCompileTime
864
880
  };
865
-
881
+
866
882
  typedef typename Kernel::Scalar Scalar;
867
883
 
868
884
  EIGEN_DEVICE_FUNC
869
885
  static inline void run(Kernel &kernel)
870
886
  {
871
887
  triangular_assignment_loop<Kernel, Mode, UnrollCount-1, SetOpposite>::run(kernel);
872
-
888
+
873
889
  if(row==col)
874
890
  kernel.assignDiagonalCoeff(row);
875
891
  else if( ((Mode&Lower) && row>col) || ((Mode&Upper) && row<col) )
@@ -912,10 +928,10 @@ struct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite>
912
928
  }
913
929
  else
914
930
  i = maxi;
915
-
931
+
916
932
  if(i<kernel.rows()) // then i==j
917
933
  kernel.assignDiagonalCoeff(i++);
918
-
934
+
919
935
  if (((Mode&Upper) && SetOpposite) || (Mode&Lower))
920
936
  {
921
937
  for(; i < kernel.rows(); ++i)
@@ -932,14 +948,14 @@ struct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite>
932
948
  * If the matrix is triangular, the opposite part is set to zero. */
933
949
  template<typename Derived>
934
950
  template<typename DenseDerived>
935
- void TriangularBase<Derived>::evalToLazy(MatrixBase<DenseDerived> &other) const
951
+ EIGEN_DEVICE_FUNC void TriangularBase<Derived>::evalToLazy(MatrixBase<DenseDerived> &other) const
936
952
  {
937
953
  other.derived().resize(this->rows(), this->cols());
938
- internal::call_triangular_assignment_loop<Derived::Mode,(Derived::Mode&SelfAdjoint)==0 /* SetOpposite */>(other.derived(), derived().nestedExpression());
954
+ internal::call_triangular_assignment_loop<Derived::Mode, (int(Derived::Mode) & int(SelfAdjoint)) == 0 /* SetOpposite */>(other.derived(), derived().nestedExpression());
939
955
  }
940
956
 
941
957
  namespace internal {
942
-
958
+
943
959
  // Triangular = Product
944
960
  template< typename DstXprType, typename Lhs, typename Rhs, typename Scalar>
945
961
  struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
@@ -952,7 +968,7 @@ struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::assign_
952
968
  if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
953
969
  dst.resize(dstRows, dstCols);
954
970
 
955
- dst._assignProduct(src, 1, 0);
971
+ dst._assignProduct(src, Scalar(1), false);
956
972
  }
957
973
  };
958
974
 
@@ -963,7 +979,7 @@ struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::add_ass
963
979
  typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
964
980
  static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<Scalar,typename SrcXprType::Scalar> &)
965
981
  {
966
- dst._assignProduct(src, 1, 1);
982
+ dst._assignProduct(src, Scalar(1), true);
967
983
  }
968
984
  };
969
985
 
@@ -974,7 +990,7 @@ struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::sub_ass
974
990
  typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
975
991
  static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<Scalar,typename SrcXprType::Scalar> &)
976
992
  {
977
- dst._assignProduct(src, -1, 1);
993
+ dst._assignProduct(src, Scalar(-1), true);
978
994
  }
979
995
  };
980
996
 
@@ -35,7 +35,7 @@ struct traits<VectorBlock<VectorType, Size> >
35
35
  * It is the return type of DenseBase::segment(Index,Index) and DenseBase::segment<int>(Index) and
36
36
  * most of the time this is the only way it is used.
37
37
  *
38
- * However, if you want to directly maniputate sub-vector expressions,
38
+ * However, if you want to directly manipulate sub-vector expressions,
39
39
  * for instance if you want to write a function returning such an expression, you
40
40
  * will need to use this class.
41
41
  *
@@ -71,8 +71,8 @@ template<typename VectorType, int Size> class VectorBlock
71
71
 
72
72
  /** Dynamic-size constructor
73
73
  */
74
- EIGEN_DEVICE_FUNC
75
- inline VectorBlock(VectorType& vector, Index start, Index size)
74
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
75
+ VectorBlock(VectorType& vector, Index start, Index size)
76
76
  : Base(vector,
77
77
  IsColVector ? start : 0, IsColVector ? 0 : start,
78
78
  IsColVector ? size : 1, IsColVector ? 1 : size)
@@ -82,8 +82,8 @@ template<typename VectorType, int Size> class VectorBlock
82
82
 
83
83
  /** Fixed-size constructor
84
84
  */
85
- EIGEN_DEVICE_FUNC
86
- inline VectorBlock(VectorType& vector, Index start)
85
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
86
+ VectorBlock(VectorType& vector, Index start)
87
87
  : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start)
88
88
  {
89
89
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorBlock);