@smake/eigen 1.0.2 → 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 (287) hide show
  1. package/README.md +1 -1
  2. package/eigen/COPYING.APACHE +203 -0
  3. package/eigen/COPYING.BSD +26 -0
  4. package/eigen/COPYING.GPL +674 -0
  5. package/eigen/COPYING.LGPL +502 -0
  6. package/eigen/COPYING.MINPACK +51 -0
  7. package/eigen/COPYING.MPL2 +373 -0
  8. package/eigen/COPYING.README +18 -0
  9. package/eigen/Eigen/Cholesky +0 -1
  10. package/eigen/Eigen/Core +108 -266
  11. package/eigen/Eigen/Eigenvalues +0 -1
  12. package/eigen/Eigen/Geometry +3 -6
  13. package/eigen/Eigen/Householder +0 -1
  14. package/eigen/Eigen/Jacobi +0 -1
  15. package/eigen/Eigen/KLUSupport +41 -0
  16. package/eigen/Eigen/LU +2 -5
  17. package/eigen/Eigen/OrderingMethods +0 -3
  18. package/eigen/Eigen/PaStiXSupport +1 -0
  19. package/eigen/Eigen/PardisoSupport +0 -0
  20. package/eigen/Eigen/QR +0 -1
  21. package/eigen/Eigen/QtAlignedMalloc +0 -1
  22. package/eigen/Eigen/SVD +0 -1
  23. package/eigen/Eigen/Sparse +0 -2
  24. package/eigen/Eigen/SparseCholesky +0 -8
  25. package/eigen/Eigen/SparseLU +4 -0
  26. package/eigen/Eigen/src/Cholesky/LDLT.h +42 -27
  27. package/eigen/Eigen/src/Cholesky/LLT.h +39 -23
  28. package/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +90 -47
  29. package/eigen/Eigen/src/Core/ArithmeticSequence.h +413 -0
  30. package/eigen/Eigen/src/Core/Array.h +99 -11
  31. package/eigen/Eigen/src/Core/ArrayBase.h +1 -1
  32. package/eigen/Eigen/src/Core/ArrayWrapper.h +21 -21
  33. package/eigen/Eigen/src/Core/Assign.h +1 -1
  34. package/eigen/Eigen/src/Core/AssignEvaluator.h +125 -50
  35. package/eigen/Eigen/src/Core/Assign_MKL.h +10 -10
  36. package/eigen/Eigen/src/Core/BandMatrix.h +16 -16
  37. package/eigen/Eigen/src/Core/Block.h +56 -60
  38. package/eigen/Eigen/src/Core/BooleanRedux.h +29 -31
  39. package/eigen/Eigen/src/Core/CommaInitializer.h +7 -3
  40. package/eigen/Eigen/src/Core/CoreEvaluators.h +325 -272
  41. package/eigen/Eigen/src/Core/CoreIterators.h +5 -0
  42. package/eigen/Eigen/src/Core/CwiseBinaryOp.h +21 -22
  43. package/eigen/Eigen/src/Core/CwiseNullaryOp.h +153 -18
  44. package/eigen/Eigen/src/Core/CwiseUnaryOp.h +6 -6
  45. package/eigen/Eigen/src/Core/CwiseUnaryView.h +12 -10
  46. package/eigen/Eigen/src/Core/DenseBase.h +128 -39
  47. package/eigen/Eigen/src/Core/DenseCoeffsBase.h +25 -21
  48. package/eigen/Eigen/src/Core/DenseStorage.h +150 -68
  49. package/eigen/Eigen/src/Core/Diagonal.h +21 -23
  50. package/eigen/Eigen/src/Core/DiagonalMatrix.h +50 -2
  51. package/eigen/Eigen/src/Core/DiagonalProduct.h +1 -1
  52. package/eigen/Eigen/src/Core/Dot.h +10 -10
  53. package/eigen/Eigen/src/Core/EigenBase.h +10 -9
  54. package/eigen/Eigen/src/Core/ForceAlignedAccess.h +8 -4
  55. package/eigen/Eigen/src/Core/Fuzzy.h +3 -3
  56. package/eigen/Eigen/src/Core/GeneralProduct.h +20 -10
  57. package/eigen/Eigen/src/Core/GenericPacketMath.h +597 -147
  58. package/eigen/Eigen/src/Core/GlobalFunctions.h +40 -33
  59. package/eigen/Eigen/src/Core/IO.h +40 -7
  60. package/eigen/Eigen/src/Core/IndexedView.h +237 -0
  61. package/eigen/Eigen/src/Core/Inverse.h +9 -10
  62. package/eigen/Eigen/src/Core/Map.h +7 -7
  63. package/eigen/Eigen/src/Core/MapBase.h +5 -3
  64. package/eigen/Eigen/src/Core/MathFunctions.h +756 -120
  65. package/eigen/Eigen/src/Core/MathFunctionsImpl.h +118 -19
  66. package/eigen/Eigen/src/Core/Matrix.h +131 -25
  67. package/eigen/Eigen/src/Core/MatrixBase.h +19 -2
  68. package/eigen/Eigen/src/Core/NestByValue.h +25 -50
  69. package/eigen/Eigen/src/Core/NoAlias.h +4 -3
  70. package/eigen/Eigen/src/Core/NumTraits.h +107 -20
  71. package/eigen/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
  72. package/eigen/Eigen/src/Core/PermutationMatrix.h +3 -3
  73. package/eigen/Eigen/src/Core/PlainObjectBase.h +145 -54
  74. package/eigen/Eigen/src/Core/Product.h +30 -25
  75. package/eigen/Eigen/src/Core/ProductEvaluators.h +183 -142
  76. package/eigen/Eigen/src/Core/Random.h +37 -1
  77. package/eigen/Eigen/src/Core/Redux.h +180 -170
  78. package/eigen/Eigen/src/Core/Ref.h +118 -21
  79. package/eigen/Eigen/src/Core/Replicate.h +8 -8
  80. package/eigen/Eigen/src/Core/Reshaped.h +454 -0
  81. package/eigen/Eigen/src/Core/ReturnByValue.h +7 -5
  82. package/eigen/Eigen/src/Core/Reverse.h +18 -12
  83. package/eigen/Eigen/src/Core/Select.h +8 -6
  84. package/eigen/Eigen/src/Core/SelfAdjointView.h +33 -20
  85. package/eigen/Eigen/src/Core/Solve.h +14 -14
  86. package/eigen/Eigen/src/Core/SolveTriangular.h +13 -13
  87. package/eigen/Eigen/src/Core/SolverBase.h +41 -3
  88. package/eigen/Eigen/src/Core/StableNorm.h +100 -70
  89. package/eigen/Eigen/src/Core/StlIterators.h +463 -0
  90. package/eigen/Eigen/src/Core/Stride.h +9 -4
  91. package/eigen/Eigen/src/Core/Swap.h +5 -4
  92. package/eigen/Eigen/src/Core/Transpose.h +86 -27
  93. package/eigen/Eigen/src/Core/Transpositions.h +26 -8
  94. package/eigen/Eigen/src/Core/TriangularMatrix.h +88 -72
  95. package/eigen/Eigen/src/Core/VectorBlock.h +5 -5
  96. package/eigen/Eigen/src/Core/VectorwiseOp.h +159 -70
  97. package/eigen/Eigen/src/Core/Visitor.h +137 -29
  98. package/eigen/Eigen/src/Core/arch/AVX/Complex.h +50 -129
  99. package/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +126 -337
  100. package/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +1092 -155
  101. package/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +65 -1
  102. package/eigen/Eigen/src/Core/arch/AVX512/Complex.h +422 -0
  103. package/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +186 -213
  104. package/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +1250 -252
  105. package/eigen/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
  106. package/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +152 -165
  107. package/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +19 -251
  108. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2937 -0
  109. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
  110. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +629 -0
  111. package/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +2042 -392
  112. package/eigen/Eigen/src/Core/arch/CUDA/Complex.h +235 -80
  113. package/eigen/Eigen/src/Core/arch/Default/BFloat16.h +700 -0
  114. package/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +102 -14
  115. package/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1649 -0
  116. package/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +110 -0
  117. package/eigen/Eigen/src/Core/arch/Default/Half.h +942 -0
  118. package/eigen/Eigen/src/Core/arch/Default/Settings.h +1 -1
  119. package/eigen/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
  120. package/eigen/Eigen/src/Core/arch/{CUDA → GPU}/MathFunctions.h +16 -4
  121. package/eigen/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
  122. package/eigen/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
  123. package/eigen/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
  124. package/eigen/Eigen/src/Core/arch/MSA/Complex.h +648 -0
  125. package/eigen/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
  126. package/eigen/Eigen/src/Core/arch/MSA/PacketMath.h +1233 -0
  127. package/eigen/Eigen/src/Core/arch/NEON/Complex.h +313 -219
  128. package/eigen/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
  129. package/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +54 -70
  130. package/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +4376 -549
  131. package/eigen/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
  132. package/eigen/Eigen/src/Core/arch/SSE/Complex.h +59 -179
  133. package/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +65 -428
  134. package/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +893 -283
  135. package/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +65 -0
  136. package/eigen/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
  137. package/eigen/Eigen/src/Core/arch/SVE/PacketMath.h +752 -0
  138. package/eigen/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
  139. package/eigen/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
  140. package/eigen/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
  141. package/eigen/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
  142. package/eigen/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
  143. package/eigen/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
  144. package/eigen/Eigen/src/Core/arch/ZVector/Complex.h +212 -183
  145. package/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +101 -5
  146. package/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +510 -395
  147. package/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +11 -2
  148. package/eigen/Eigen/src/Core/functors/BinaryFunctors.h +112 -46
  149. package/eigen/Eigen/src/Core/functors/NullaryFunctors.h +31 -30
  150. package/eigen/Eigen/src/Core/functors/StlFunctors.h +32 -2
  151. package/eigen/Eigen/src/Core/functors/UnaryFunctors.h +354 -15
  152. package/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +1073 -585
  153. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +29 -7
  154. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +4 -4
  155. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +1 -1
  156. package/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +382 -483
  157. package/eigen/Eigen/src/Core/products/Parallelizer.h +23 -9
  158. package/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +23 -6
  159. package/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +8 -6
  160. package/eigen/Eigen/src/Core/products/SelfadjointProduct.h +2 -2
  161. package/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +5 -4
  162. package/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +3 -3
  163. package/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +5 -3
  164. package/eigen/Eigen/src/Core/products/TriangularSolverVector.h +13 -10
  165. package/eigen/Eigen/src/Core/util/BlasUtil.h +208 -124
  166. package/eigen/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
  167. package/eigen/Eigen/src/Core/util/Constants.h +25 -9
  168. package/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +14 -2
  169. package/eigen/Eigen/src/Core/util/ForwardDeclarations.h +28 -4
  170. package/eigen/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
  171. package/eigen/Eigen/src/Core/util/IntegralConstant.h +272 -0
  172. package/eigen/Eigen/src/Core/util/MKL_support.h +8 -1
  173. package/eigen/Eigen/src/Core/util/Macros.h +661 -250
  174. package/eigen/Eigen/src/Core/util/Memory.h +222 -52
  175. package/eigen/Eigen/src/Core/util/Meta.h +349 -105
  176. package/eigen/Eigen/src/Core/util/ReshapedHelper.h +51 -0
  177. package/eigen/Eigen/src/Core/util/StaticAssert.h +8 -5
  178. package/eigen/Eigen/src/Core/util/SymbolicIndex.h +293 -0
  179. package/eigen/Eigen/src/Core/util/XprHelper.h +48 -30
  180. package/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +1 -1
  181. package/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +1 -1
  182. package/eigen/Eigen/src/Eigenvalues/EigenSolver.h +2 -2
  183. package/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +1 -1
  184. package/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +2 -2
  185. package/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +2 -2
  186. package/eigen/Eigen/src/Eigenvalues/RealQZ.h +9 -6
  187. package/eigen/Eigen/src/Eigenvalues/RealSchur.h +10 -5
  188. package/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +75 -42
  189. package/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +20 -15
  190. package/eigen/Eigen/src/Geometry/AlignedBox.h +99 -5
  191. package/eigen/Eigen/src/Geometry/AngleAxis.h +4 -4
  192. package/eigen/Eigen/src/Geometry/EulerAngles.h +3 -3
  193. package/eigen/Eigen/src/Geometry/Homogeneous.h +15 -11
  194. package/eigen/Eigen/src/Geometry/Hyperplane.h +1 -1
  195. package/eigen/Eigen/src/Geometry/OrthoMethods.h +3 -2
  196. package/eigen/Eigen/src/Geometry/ParametrizedLine.h +39 -2
  197. package/eigen/Eigen/src/Geometry/Quaternion.h +52 -14
  198. package/eigen/Eigen/src/Geometry/Rotation2D.h +3 -3
  199. package/eigen/Eigen/src/Geometry/Scaling.h +22 -4
  200. package/eigen/Eigen/src/Geometry/Transform.h +86 -65
  201. package/eigen/Eigen/src/Geometry/Translation.h +6 -6
  202. package/eigen/Eigen/src/Geometry/arch/Geometry_SIMD.h +168 -0
  203. package/eigen/Eigen/src/Householder/BlockHouseholder.h +9 -2
  204. package/eigen/Eigen/src/Householder/Householder.h +8 -4
  205. package/eigen/Eigen/src/Householder/HouseholderSequence.h +123 -48
  206. package/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +15 -15
  207. package/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +7 -23
  208. package/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +5 -22
  209. package/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +41 -47
  210. package/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +51 -60
  211. package/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +70 -20
  212. package/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +2 -20
  213. package/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +11 -9
  214. package/eigen/Eigen/src/Jacobi/Jacobi.h +31 -10
  215. package/eigen/Eigen/src/KLUSupport/KLUSupport.h +358 -0
  216. package/eigen/Eigen/src/LU/Determinant.h +35 -19
  217. package/eigen/Eigen/src/LU/FullPivLU.h +29 -43
  218. package/eigen/Eigen/src/LU/InverseImpl.h +25 -8
  219. package/eigen/Eigen/src/LU/PartialPivLU.h +67 -57
  220. package/eigen/Eigen/src/LU/arch/InverseSize4.h +351 -0
  221. package/eigen/Eigen/src/OrderingMethods/Amd.h +7 -17
  222. package/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +297 -277
  223. package/eigen/Eigen/src/OrderingMethods/Ordering.h +6 -10
  224. package/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +1 -1
  225. package/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +10 -9
  226. package/eigen/Eigen/src/QR/ColPivHouseholderQR.h +41 -20
  227. package/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +100 -27
  228. package/eigen/Eigen/src/QR/FullPivHouseholderQR.h +59 -22
  229. package/eigen/Eigen/src/QR/HouseholderQR.h +48 -23
  230. package/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +25 -3
  231. package/eigen/Eigen/src/SVD/BDCSVD.h +137 -48
  232. package/eigen/Eigen/src/SVD/JacobiSVD.h +22 -14
  233. package/eigen/Eigen/src/SVD/SVDBase.h +82 -21
  234. package/eigen/Eigen/src/SVD/UpperBidiagonalization.h +3 -3
  235. package/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +16 -8
  236. package/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +11 -36
  237. package/eigen/Eigen/src/SparseCore/CompressedStorage.h +16 -0
  238. package/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +6 -6
  239. package/eigen/Eigen/src/SparseCore/SparseAssign.h +81 -27
  240. package/eigen/Eigen/src/SparseCore/SparseBlock.h +25 -57
  241. package/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +40 -11
  242. package/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +11 -15
  243. package/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +2 -2
  244. package/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +30 -8
  245. package/eigen/Eigen/src/SparseCore/SparseMatrix.h +124 -10
  246. package/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +5 -12
  247. package/eigen/Eigen/src/SparseCore/SparseProduct.h +13 -1
  248. package/eigen/Eigen/src/SparseCore/SparseRef.h +7 -7
  249. package/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +3 -0
  250. package/eigen/Eigen/src/SparseCore/SparseUtil.h +8 -0
  251. package/eigen/Eigen/src/SparseCore/SparseVector.h +1 -1
  252. package/eigen/Eigen/src/SparseLU/SparseLU.h +160 -10
  253. package/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +1 -1
  254. package/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +76 -2
  255. package/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +2 -2
  256. package/eigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +1 -1
  257. package/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +1 -1
  258. package/eigen/Eigen/src/SparseQR/SparseQR.h +19 -6
  259. package/eigen/Eigen/src/StlSupport/StdDeque.h +2 -14
  260. package/eigen/Eigen/src/StlSupport/StdList.h +2 -2
  261. package/eigen/Eigen/src/StlSupport/StdVector.h +2 -2
  262. package/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +6 -8
  263. package/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +175 -39
  264. package/eigen/Eigen/src/misc/lapacke.h +5 -4
  265. package/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.h +27 -1
  266. package/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.h +155 -11
  267. package/eigen/Eigen/src/plugins/BlockMethods.h +626 -242
  268. package/eigen/Eigen/src/plugins/CommonCwiseUnaryOps.h +14 -0
  269. package/eigen/Eigen/src/plugins/IndexedViewMethods.h +262 -0
  270. package/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.h +4 -4
  271. package/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.h +10 -0
  272. package/eigen/Eigen/src/plugins/ReshapedMethods.h +149 -0
  273. package/eigen/README.md +5 -0
  274. package/lib/LibEigen.d.ts +4 -0
  275. package/lib/LibEigen.js +14 -0
  276. package/lib/index.d.ts +1 -1
  277. package/lib/index.js +7 -3
  278. package/package.json +2 -10
  279. package/eigen/Eigen/CMakeLists.txt +0 -19
  280. package/eigen/Eigen/src/Core/arch/CUDA/Half.h +0 -675
  281. package/eigen/Eigen/src/Core/arch/CUDA/PacketMath.h +0 -333
  282. package/eigen/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +0 -1124
  283. package/eigen/Eigen/src/Core/arch/CUDA/TypeCasting.h +0 -212
  284. package/eigen/Eigen/src/Geometry/arch/Geometry_SSE.h +0 -161
  285. package/eigen/Eigen/src/LU/arch/Inverse_SSE.h +0 -338
  286. package/lib/eigen.d.ts +0 -2
  287. package/lib/eigen.js +0 -15
@@ -0,0 +1,51 @@
1
+ // This file is part of Eigen, a lightweight C++ template library
2
+ // for linear algebra.
3
+ //
4
+ // Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.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
+
11
+ #ifndef EIGEN_RESHAPED_HELPER_H
12
+ #define EIGEN_RESHAPED_HELPER_H
13
+
14
+ namespace Eigen {
15
+
16
+ enum AutoSize_t { AutoSize };
17
+ const int AutoOrder = 2;
18
+
19
+ namespace internal {
20
+
21
+ template<typename SizeType,typename OtherSize, int TotalSize>
22
+ struct get_compiletime_reshape_size {
23
+ enum { value = get_fixed_value<SizeType>::value };
24
+ };
25
+
26
+ template<typename SizeType>
27
+ Index get_runtime_reshape_size(SizeType size, Index /*other*/, Index /*total*/) {
28
+ return internal::get_runtime_value(size);
29
+ }
30
+
31
+ template<typename OtherSize, int TotalSize>
32
+ struct get_compiletime_reshape_size<AutoSize_t,OtherSize,TotalSize> {
33
+ enum {
34
+ other_size = get_fixed_value<OtherSize>::value,
35
+ value = (TotalSize==Dynamic || other_size==Dynamic) ? Dynamic : TotalSize / other_size };
36
+ };
37
+
38
+ inline Index get_runtime_reshape_size(AutoSize_t /*size*/, Index other, Index total) {
39
+ return total/other;
40
+ }
41
+
42
+ template<int Flags, int Order>
43
+ struct get_compiletime_reshape_order {
44
+ enum { value = Order == AutoOrder ? Flags & RowMajorBit : Order };
45
+ };
46
+
47
+ }
48
+
49
+ } // end namespace Eigen
50
+
51
+ #endif // EIGEN_RESHAPED_HELPER_H
@@ -27,7 +27,7 @@
27
27
  #ifndef EIGEN_STATIC_ASSERT
28
28
  #ifndef EIGEN_NO_STATIC_ASSERT
29
29
 
30
- #if EIGEN_MAX_CPP_VER>=11 && (__has_feature(cxx_static_assert) || (defined(__cplusplus) && __cplusplus >= 201103L) || (EIGEN_COMP_MSVC >= 1600))
30
+ #if EIGEN_MAX_CPP_VER>=11 && (__has_feature(cxx_static_assert) || (EIGEN_COMP_CXXVER >= 11) || (EIGEN_COMP_MSVC >= 1600))
31
31
 
32
32
  // if native static_assert is enabled, let's use it
33
33
  #define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
@@ -103,7 +103,10 @@
103
103
  STORAGE_KIND_MUST_MATCH=1,
104
104
  STORAGE_INDEX_MUST_MATCH=1,
105
105
  CHOLMOD_SUPPORTS_DOUBLE_PRECISION_ONLY=1,
106
- SELFADJOINTVIEW_ACCEPTS_UPPER_AND_LOWER_MODE_ONLY=1
106
+ SELFADJOINTVIEW_ACCEPTS_UPPER_AND_LOWER_MODE_ONLY=1,
107
+ INVALID_TEMPLATE_PARAMETER=1,
108
+ GPU_TENSOR_CONTRACTION_DOES_NOT_SUPPORT_OUTPUT_KERNELS=1,
109
+ THE_ARRAY_SIZE_SHOULD_EQUAL_WITH_PACKET_SIZE=1
107
110
  };
108
111
  };
109
112
 
@@ -182,7 +185,7 @@
182
185
  )
183
186
 
184
187
  #define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE) \
185
- EIGEN_STATIC_ASSERT(!NumTraits<TYPE>::IsInteger, THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES)
188
+ EIGEN_STATIC_ASSERT(!Eigen::NumTraits<TYPE>::IsInteger, THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES)
186
189
 
187
190
 
188
191
  // static assertion failing if it is guaranteed at compile-time that the two matrix expression types have different sizes
@@ -192,8 +195,8 @@
192
195
  YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES)
193
196
 
194
197
  #define EIGEN_STATIC_ASSERT_SIZE_1x1(TYPE) \
195
- EIGEN_STATIC_ASSERT((TYPE::RowsAtCompileTime == 1 || TYPE::RowsAtCompileTime == Dynamic) && \
196
- (TYPE::ColsAtCompileTime == 1 || TYPE::ColsAtCompileTime == Dynamic), \
198
+ EIGEN_STATIC_ASSERT((TYPE::RowsAtCompileTime == 1 || TYPE::RowsAtCompileTime == Eigen::Dynamic) && \
199
+ (TYPE::ColsAtCompileTime == 1 || TYPE::ColsAtCompileTime == Eigen::Dynamic), \
197
200
  THIS_METHOD_IS_ONLY_FOR_1x1_EXPRESSIONS)
198
201
 
199
202
  #define EIGEN_STATIC_ASSERT_LVALUE(Derived) \
@@ -0,0 +1,293 @@
1
+ // This file is part of Eigen, a lightweight C++ template library
2
+ // for linear algebra.
3
+ //
4
+ // Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.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_SYMBOLIC_INDEX_H
11
+ #define EIGEN_SYMBOLIC_INDEX_H
12
+
13
+ namespace Eigen {
14
+
15
+ /** \namespace Eigen::symbolic
16
+ * \ingroup Core_Module
17
+ *
18
+ * This namespace defines a set of classes and functions to build and evaluate symbolic expressions of scalar type Index.
19
+ * Here is a simple example:
20
+ *
21
+ * \code
22
+ * // First step, defines symbols:
23
+ * struct x_tag {}; static const symbolic::SymbolExpr<x_tag> x;
24
+ * struct y_tag {}; static const symbolic::SymbolExpr<y_tag> y;
25
+ * struct z_tag {}; static const symbolic::SymbolExpr<z_tag> z;
26
+ *
27
+ * // Defines an expression:
28
+ * auto expr = (x+3)/y+z;
29
+ *
30
+ * // And evaluate it: (c++14)
31
+ * std::cout << expr.eval(x=6,y=3,z=-13) << "\n";
32
+ *
33
+ * // In c++98/11, only one symbol per expression is supported for now:
34
+ * auto expr98 = (3-x)/2;
35
+ * std::cout << expr98.eval(x=6) << "\n";
36
+ * \endcode
37
+ *
38
+ * It is currently only used internally to define and manipulate the Eigen::last and Eigen::lastp1 symbols in Eigen::seq and Eigen::seqN.
39
+ *
40
+ */
41
+ namespace symbolic {
42
+
43
+ template<typename Tag> class Symbol;
44
+ template<typename Arg0> class NegateExpr;
45
+ template<typename Arg1,typename Arg2> class AddExpr;
46
+ template<typename Arg1,typename Arg2> class ProductExpr;
47
+ template<typename Arg1,typename Arg2> class QuotientExpr;
48
+
49
+ // A simple wrapper around an integral value to provide the eval method.
50
+ // We could also use a free-function symbolic_eval...
51
+ template<typename IndexType=Index>
52
+ class ValueExpr {
53
+ public:
54
+ ValueExpr(IndexType val) : m_value(val) {}
55
+ template<typename T>
56
+ IndexType eval_impl(const T&) const { return m_value; }
57
+ protected:
58
+ IndexType m_value;
59
+ };
60
+
61
+ // Specialization for compile-time value,
62
+ // It is similar to ValueExpr(N) but this version helps the compiler to generate better code.
63
+ template<int N>
64
+ class ValueExpr<internal::FixedInt<N> > {
65
+ public:
66
+ ValueExpr() {}
67
+ template<typename T>
68
+ EIGEN_CONSTEXPR Index eval_impl(const T&) const { return N; }
69
+ };
70
+
71
+
72
+ /** \class BaseExpr
73
+ * \ingroup Core_Module
74
+ * Common base class of any symbolic expressions
75
+ */
76
+ template<typename Derived>
77
+ class BaseExpr
78
+ {
79
+ public:
80
+ const Derived& derived() const { return *static_cast<const Derived*>(this); }
81
+
82
+ /** Evaluate the expression given the \a values of the symbols.
83
+ *
84
+ * \param values defines the values of the symbols, it can either be a SymbolValue or a std::tuple of SymbolValue
85
+ * as constructed by SymbolExpr::operator= operator.
86
+ *
87
+ */
88
+ template<typename T>
89
+ Index eval(const T& values) const { return derived().eval_impl(values); }
90
+
91
+ #if EIGEN_HAS_CXX14
92
+ template<typename... Types>
93
+ Index eval(Types&&... values) const { return derived().eval_impl(std::make_tuple(values...)); }
94
+ #endif
95
+
96
+ NegateExpr<Derived> operator-() const { return NegateExpr<Derived>(derived()); }
97
+
98
+ AddExpr<Derived,ValueExpr<> > operator+(Index b) const
99
+ { return AddExpr<Derived,ValueExpr<> >(derived(), b); }
100
+ AddExpr<Derived,ValueExpr<> > operator-(Index a) const
101
+ { return AddExpr<Derived,ValueExpr<> >(derived(), -a); }
102
+ ProductExpr<Derived,ValueExpr<> > operator*(Index a) const
103
+ { return ProductExpr<Derived,ValueExpr<> >(derived(),a); }
104
+ QuotientExpr<Derived,ValueExpr<> > operator/(Index a) const
105
+ { return QuotientExpr<Derived,ValueExpr<> >(derived(),a); }
106
+
107
+ friend AddExpr<Derived,ValueExpr<> > operator+(Index a, const BaseExpr& b)
108
+ { return AddExpr<Derived,ValueExpr<> >(b.derived(), a); }
109
+ friend AddExpr<NegateExpr<Derived>,ValueExpr<> > operator-(Index a, const BaseExpr& b)
110
+ { return AddExpr<NegateExpr<Derived>,ValueExpr<> >(-b.derived(), a); }
111
+ friend ProductExpr<ValueExpr<>,Derived> operator*(Index a, const BaseExpr& b)
112
+ { return ProductExpr<ValueExpr<>,Derived>(a,b.derived()); }
113
+ friend QuotientExpr<ValueExpr<>,Derived> operator/(Index a, const BaseExpr& b)
114
+ { return QuotientExpr<ValueExpr<>,Derived>(a,b.derived()); }
115
+
116
+ template<int N>
117
+ AddExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator+(internal::FixedInt<N>) const
118
+ { return AddExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(), ValueExpr<internal::FixedInt<N> >()); }
119
+ template<int N>
120
+ AddExpr<Derived,ValueExpr<internal::FixedInt<-N> > > operator-(internal::FixedInt<N>) const
121
+ { return AddExpr<Derived,ValueExpr<internal::FixedInt<-N> > >(derived(), ValueExpr<internal::FixedInt<-N> >()); }
122
+ template<int N>
123
+ ProductExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator*(internal::FixedInt<N>) const
124
+ { return ProductExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(),ValueExpr<internal::FixedInt<N> >()); }
125
+ template<int N>
126
+ QuotientExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator/(internal::FixedInt<N>) const
127
+ { return QuotientExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(),ValueExpr<internal::FixedInt<N> >()); }
128
+
129
+ template<int N>
130
+ friend AddExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator+(internal::FixedInt<N>, const BaseExpr& b)
131
+ { return AddExpr<Derived,ValueExpr<internal::FixedInt<N> > >(b.derived(), ValueExpr<internal::FixedInt<N> >()); }
132
+ template<int N>
133
+ friend AddExpr<NegateExpr<Derived>,ValueExpr<internal::FixedInt<N> > > operator-(internal::FixedInt<N>, const BaseExpr& b)
134
+ { return AddExpr<NegateExpr<Derived>,ValueExpr<internal::FixedInt<N> > >(-b.derived(), ValueExpr<internal::FixedInt<N> >()); }
135
+ template<int N>
136
+ friend ProductExpr<ValueExpr<internal::FixedInt<N> >,Derived> operator*(internal::FixedInt<N>, const BaseExpr& b)
137
+ { return ProductExpr<ValueExpr<internal::FixedInt<N> >,Derived>(ValueExpr<internal::FixedInt<N> >(),b.derived()); }
138
+ template<int N>
139
+ friend QuotientExpr<ValueExpr<internal::FixedInt<N> >,Derived> operator/(internal::FixedInt<N>, const BaseExpr& b)
140
+ { return QuotientExpr<ValueExpr<internal::FixedInt<N> > ,Derived>(ValueExpr<internal::FixedInt<N> >(),b.derived()); }
141
+
142
+ #if (!EIGEN_HAS_CXX14)
143
+ template<int N>
144
+ AddExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator+(internal::FixedInt<N> (*)()) const
145
+ { return AddExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(), ValueExpr<internal::FixedInt<N> >()); }
146
+ template<int N>
147
+ AddExpr<Derived,ValueExpr<internal::FixedInt<-N> > > operator-(internal::FixedInt<N> (*)()) const
148
+ { return AddExpr<Derived,ValueExpr<internal::FixedInt<-N> > >(derived(), ValueExpr<internal::FixedInt<-N> >()); }
149
+ template<int N>
150
+ ProductExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator*(internal::FixedInt<N> (*)()) const
151
+ { return ProductExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(),ValueExpr<internal::FixedInt<N> >()); }
152
+ template<int N>
153
+ QuotientExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator/(internal::FixedInt<N> (*)()) const
154
+ { return QuotientExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(),ValueExpr<internal::FixedInt<N> >()); }
155
+
156
+ template<int N>
157
+ friend AddExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator+(internal::FixedInt<N> (*)(), const BaseExpr& b)
158
+ { return AddExpr<Derived,ValueExpr<internal::FixedInt<N> > >(b.derived(), ValueExpr<internal::FixedInt<N> >()); }
159
+ template<int N>
160
+ friend AddExpr<NegateExpr<Derived>,ValueExpr<internal::FixedInt<N> > > operator-(internal::FixedInt<N> (*)(), const BaseExpr& b)
161
+ { return AddExpr<NegateExpr<Derived>,ValueExpr<internal::FixedInt<N> > >(-b.derived(), ValueExpr<internal::FixedInt<N> >()); }
162
+ template<int N>
163
+ friend ProductExpr<ValueExpr<internal::FixedInt<N> >,Derived> operator*(internal::FixedInt<N> (*)(), const BaseExpr& b)
164
+ { return ProductExpr<ValueExpr<internal::FixedInt<N> >,Derived>(ValueExpr<internal::FixedInt<N> >(),b.derived()); }
165
+ template<int N>
166
+ friend QuotientExpr<ValueExpr<internal::FixedInt<N> >,Derived> operator/(internal::FixedInt<N> (*)(), const BaseExpr& b)
167
+ { return QuotientExpr<ValueExpr<internal::FixedInt<N> > ,Derived>(ValueExpr<internal::FixedInt<N> >(),b.derived()); }
168
+ #endif
169
+
170
+
171
+ template<typename OtherDerived>
172
+ AddExpr<Derived,OtherDerived> operator+(const BaseExpr<OtherDerived> &b) const
173
+ { return AddExpr<Derived,OtherDerived>(derived(), b.derived()); }
174
+
175
+ template<typename OtherDerived>
176
+ AddExpr<Derived,NegateExpr<OtherDerived> > operator-(const BaseExpr<OtherDerived> &b) const
177
+ { return AddExpr<Derived,NegateExpr<OtherDerived> >(derived(), -b.derived()); }
178
+
179
+ template<typename OtherDerived>
180
+ ProductExpr<Derived,OtherDerived> operator*(const BaseExpr<OtherDerived> &b) const
181
+ { return ProductExpr<Derived,OtherDerived>(derived(), b.derived()); }
182
+
183
+ template<typename OtherDerived>
184
+ QuotientExpr<Derived,OtherDerived> operator/(const BaseExpr<OtherDerived> &b) const
185
+ { return QuotientExpr<Derived,OtherDerived>(derived(), b.derived()); }
186
+ };
187
+
188
+ template<typename T>
189
+ struct is_symbolic {
190
+ // BaseExpr has no conversion ctor, so we only have to check whether T can be statically cast to its base class BaseExpr<T>.
191
+ enum { value = internal::is_convertible<T,BaseExpr<T> >::value };
192
+ };
193
+
194
+ /** Represents the actual value of a symbol identified by its tag
195
+ *
196
+ * It is the return type of SymbolValue::operator=, and most of the time this is only way it is used.
197
+ */
198
+ template<typename Tag>
199
+ class SymbolValue
200
+ {
201
+ public:
202
+ /** Default constructor from the value \a val */
203
+ SymbolValue(Index val) : m_value(val) {}
204
+
205
+ /** \returns the stored value of the symbol */
206
+ Index value() const { return m_value; }
207
+ protected:
208
+ Index m_value;
209
+ };
210
+
211
+ /** Expression of a symbol uniquely identified by the template parameter type \c tag */
212
+ template<typename tag>
213
+ class SymbolExpr : public BaseExpr<SymbolExpr<tag> >
214
+ {
215
+ public:
216
+ /** Alias to the template parameter \c tag */
217
+ typedef tag Tag;
218
+
219
+ SymbolExpr() {}
220
+
221
+ /** Associate the value \a val to the given symbol \c *this, uniquely identified by its \c Tag.
222
+ *
223
+ * The returned object should be passed to ExprBase::eval() to evaluate a given expression with this specified runtime-time value.
224
+ */
225
+ SymbolValue<Tag> operator=(Index val) const {
226
+ return SymbolValue<Tag>(val);
227
+ }
228
+
229
+ Index eval_impl(const SymbolValue<Tag> &values) const { return values.value(); }
230
+
231
+ #if EIGEN_HAS_CXX14
232
+ // C++14 versions suitable for multiple symbols
233
+ template<typename... Types>
234
+ Index eval_impl(const std::tuple<Types...>& values) const { return std::get<SymbolValue<Tag> >(values).value(); }
235
+ #endif
236
+ };
237
+
238
+ template<typename Arg0>
239
+ class NegateExpr : public BaseExpr<NegateExpr<Arg0> >
240
+ {
241
+ public:
242
+ NegateExpr(const Arg0& arg0) : m_arg0(arg0) {}
243
+
244
+ template<typename T>
245
+ Index eval_impl(const T& values) const { return -m_arg0.eval_impl(values); }
246
+ protected:
247
+ Arg0 m_arg0;
248
+ };
249
+
250
+ template<typename Arg0, typename Arg1>
251
+ class AddExpr : public BaseExpr<AddExpr<Arg0,Arg1> >
252
+ {
253
+ public:
254
+ AddExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {}
255
+
256
+ template<typename T>
257
+ Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) + m_arg1.eval_impl(values); }
258
+ protected:
259
+ Arg0 m_arg0;
260
+ Arg1 m_arg1;
261
+ };
262
+
263
+ template<typename Arg0, typename Arg1>
264
+ class ProductExpr : public BaseExpr<ProductExpr<Arg0,Arg1> >
265
+ {
266
+ public:
267
+ ProductExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {}
268
+
269
+ template<typename T>
270
+ Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) * m_arg1.eval_impl(values); }
271
+ protected:
272
+ Arg0 m_arg0;
273
+ Arg1 m_arg1;
274
+ };
275
+
276
+ template<typename Arg0, typename Arg1>
277
+ class QuotientExpr : public BaseExpr<QuotientExpr<Arg0,Arg1> >
278
+ {
279
+ public:
280
+ QuotientExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {}
281
+
282
+ template<typename T>
283
+ Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) / m_arg1.eval_impl(values); }
284
+ protected:
285
+ Arg0 m_arg0;
286
+ Arg1 m_arg1;
287
+ };
288
+
289
+ } // end namespace symbolic
290
+
291
+ } // end namespace Eigen
292
+
293
+ #endif // EIGEN_SYMBOLIC_INDEX_H
@@ -49,6 +49,12 @@ template<typename T> struct is_valid_index_type
49
49
  };
50
50
  };
51
51
 
52
+ // true if both types are not valid index types
53
+ template<typename RowIndices, typename ColIndices>
54
+ struct valid_indexed_view_overload {
55
+ enum { value = !(internal::is_valid_index_type<RowIndices>::value && internal::is_valid_index_type<ColIndices>::value) };
56
+ };
57
+
52
58
  // promote_scalar_arg is an helper used in operation between an expression and a scalar, like:
53
59
  // expression * scalar
54
60
  // Its role is to determine how the type T of the scalar operand should be promoted given the scalar type ExprScalar of the given expression.
@@ -123,19 +129,23 @@ struct promote_index_type
123
129
  template<typename T, int Value> class variable_if_dynamic
124
130
  {
125
131
  public:
126
- EIGEN_EMPTY_STRUCT_CTOR(variable_if_dynamic)
132
+ EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(variable_if_dynamic)
127
133
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T v) { EIGEN_ONLY_USED_FOR_DEBUG(v); eigen_assert(v == T(Value)); }
128
- EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T value() { return T(Value); }
129
- EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T) {}
134
+ EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR
135
+ T value() { return T(Value); }
136
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR
137
+ operator T() const { return T(Value); }
138
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
139
+ void setValue(T v) const { EIGEN_ONLY_USED_FOR_DEBUG(v); eigen_assert(v == T(Value)); }
130
140
  };
131
141
 
132
142
  template<typename T> class variable_if_dynamic<T, Dynamic>
133
143
  {
134
144
  T m_value;
135
- EIGEN_DEVICE_FUNC variable_if_dynamic() { eigen_assert(false); }
136
145
  public:
137
- EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T value) : m_value(value) {}
146
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T value = 0) EIGEN_NO_THROW : m_value(value) {}
138
147
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value() const { return m_value; }
148
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator T() const { return m_value; }
139
149
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value) { m_value = value; }
140
150
  };
141
151
 
@@ -146,8 +156,10 @@ template<typename T, int Value> class variable_if_dynamicindex
146
156
  public:
147
157
  EIGEN_EMPTY_STRUCT_CTOR(variable_if_dynamicindex)
148
158
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamicindex(T v) { EIGEN_ONLY_USED_FOR_DEBUG(v); eigen_assert(v == T(Value)); }
149
- EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T value() { return T(Value); }
150
- EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T) {}
159
+ EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE EIGEN_CONSTEXPR
160
+ T value() { return T(Value); }
161
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
162
+ void setValue(T) {}
151
163
  };
152
164
 
153
165
  template<typename T> class variable_if_dynamicindex<T, DynamicIndex>
@@ -172,16 +184,7 @@ template<typename T> struct functor_traits
172
184
 
173
185
  template<typename T> struct packet_traits;
174
186
 
175
- template<typename T> struct unpacket_traits
176
- {
177
- typedef T type;
178
- typedef T half;
179
- enum
180
- {
181
- size = 1,
182
- alignment = 1
183
- };
184
- };
187
+ template<typename T> struct unpacket_traits;
185
188
 
186
189
  template<int Size, typename PacketType,
187
190
  bool Stop = Size==Dynamic || (Size%unpacket_traits<PacketType>::size)==0 || is_same<PacketType,typename unpacket_traits<PacketType>::half>::value>
@@ -400,7 +403,7 @@ template<typename T> struct plain_matrix_type_row_major
400
403
  typedef Matrix<typename traits<T>::Scalar,
401
404
  Rows,
402
405
  Cols,
403
- (MaxCols==1&&MaxRows!=1) ? RowMajor : ColMajor,
406
+ (MaxCols==1&&MaxRows!=1) ? ColMajor : RowMajor,
404
407
  MaxRows,
405
408
  MaxCols
406
409
  > type;
@@ -417,7 +420,7 @@ struct ref_selector
417
420
  T const&,
418
421
  const T
419
422
  >::type type;
420
-
423
+
421
424
  typedef typename conditional<
422
425
  bool(traits<T>::Flags & NestByRefBit),
423
426
  T &,
@@ -455,7 +458,7 @@ template<typename T, int n, typename PlainObject = typename plain_object_eval<T>
455
458
  {
456
459
  enum {
457
460
  ScalarReadCost = NumTraits<typename traits<T>::Scalar>::ReadCost,
458
- CoeffReadCost = evaluator<T>::CoeffReadCost, // NOTE What if an evaluator evaluate itself into a tempory?
461
+ CoeffReadCost = evaluator<T>::CoeffReadCost, // NOTE What if an evaluator evaluate itself into a temporary?
459
462
  // Then CoeffReadCost will be small (e.g., 1) but we still have to evaluate, especially if n>1.
460
463
  // This situation is already taken care by the EvalBeforeNestingBit flag, which is turned ON
461
464
  // for all evaluator creating a temporary. This flag is then propagated by the parent evaluators.
@@ -596,14 +599,14 @@ template<typename ExpressionType, typename Scalar = typename ExpressionType::Sca
596
599
  struct plain_row_type
597
600
  {
598
601
  typedef Matrix<Scalar, 1, ExpressionType::ColsAtCompileTime,
599
- ExpressionType::PlainObject::Options | RowMajor, 1, ExpressionType::MaxColsAtCompileTime> MatrixRowType;
602
+ int(ExpressionType::PlainObject::Options) | int(RowMajor), 1, ExpressionType::MaxColsAtCompileTime> MatrixRowType;
600
603
  typedef Array<Scalar, 1, ExpressionType::ColsAtCompileTime,
601
- ExpressionType::PlainObject::Options | RowMajor, 1, ExpressionType::MaxColsAtCompileTime> ArrayRowType;
604
+ int(ExpressionType::PlainObject::Options) | int(RowMajor), 1, ExpressionType::MaxColsAtCompileTime> ArrayRowType;
602
605
 
603
606
  typedef typename conditional<
604
607
  is_same< typename traits<ExpressionType>::XprKind, MatrixXpr >::value,
605
608
  MatrixRowType,
606
- ArrayRowType
609
+ ArrayRowType
607
610
  >::type type;
608
611
  };
609
612
 
@@ -618,7 +621,7 @@ struct plain_col_type
618
621
  typedef typename conditional<
619
622
  is_same< typename traits<ExpressionType>::XprKind, MatrixXpr >::value,
620
623
  MatrixColType,
621
- ArrayColType
624
+ ArrayColType
622
625
  >::type type;
623
626
  };
624
627
 
@@ -634,7 +637,7 @@ struct plain_diag_type
634
637
  typedef typename conditional<
635
638
  is_same< typename traits<ExpressionType>::XprKind, MatrixXpr >::value,
636
639
  MatrixDiagType,
637
- ArrayDiagType
640
+ ArrayDiagType
638
641
  >::type type;
639
642
  };
640
643
 
@@ -671,24 +674,39 @@ template<typename T> struct is_diagonal<DiagonalWrapper<T> >
671
674
  template<typename T, int S> struct is_diagonal<DiagonalMatrix<T,S> >
672
675
  { enum { ret = true }; };
673
676
 
677
+
678
+ template<typename T> struct is_identity
679
+ { enum { value = false }; };
680
+
681
+ template<typename T> struct is_identity<CwiseNullaryOp<internal::scalar_identity_op<typename T::Scalar>, T> >
682
+ { enum { value = true }; };
683
+
684
+
674
685
  template<typename S1, typename S2> struct glue_shapes;
675
686
  template<> struct glue_shapes<DenseShape,TriangularShape> { typedef TriangularShape type; };
676
687
 
677
688
  template<typename T1, typename T2>
678
- bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if<has_direct_access<T1>::ret&&has_direct_access<T2>::ret, T1>::type * = 0)
689
+ struct possibly_same_dense {
690
+ enum { value = has_direct_access<T1>::ret && has_direct_access<T2>::ret && is_same<typename T1::Scalar,typename T2::Scalar>::value };
691
+ };
692
+
693
+ template<typename T1, typename T2>
694
+ EIGEN_DEVICE_FUNC
695
+ bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if<possibly_same_dense<T1,T2>::value>::type * = 0)
679
696
  {
680
697
  return (mat1.data()==mat2.data()) && (mat1.innerStride()==mat2.innerStride()) && (mat1.outerStride()==mat2.outerStride());
681
698
  }
682
699
 
683
700
  template<typename T1, typename T2>
684
- bool is_same_dense(const T1 &, const T2 &, typename enable_if<!(has_direct_access<T1>::ret&&has_direct_access<T2>::ret), T1>::type * = 0)
701
+ EIGEN_DEVICE_FUNC
702
+ bool is_same_dense(const T1 &, const T2 &, typename enable_if<!possibly_same_dense<T1,T2>::value>::type * = 0)
685
703
  {
686
704
  return false;
687
705
  }
688
706
 
689
707
  // Internal helper defining the cost of a scalar division for the type T.
690
708
  // The default heuristic can be specialized for each scalar type and architecture.
691
- template<typename T,bool Vectorized=false,typename EnaleIf = void>
709
+ template<typename T,bool Vectorized=false,typename EnableIf = void>
692
710
  struct scalar_div_cost {
693
711
  enum { value = 8*NumTraits<T>::MulCost };
694
712
  };
@@ -735,7 +753,7 @@ std::string demangle_flags(int f)
735
753
  if(f&DirectAccessBit) res += " | Direct";
736
754
  if(f&NestByRefBit) res += " | NestByRef";
737
755
  if(f&NoPreferredStorageOrderBit) res += " | NoPreferredStorageOrderBit";
738
-
756
+
739
757
  return res;
740
758
  }
741
759
  #endif
@@ -832,7 +850,7 @@ struct ScalarBinaryOpTraits<void,void,BinaryOp>
832
850
  #define EIGEN_CHECK_BINARY_COMPATIBILIY(BINOP,LHS,RHS) \
833
851
  EIGEN_STATIC_ASSERT((Eigen::internal::has_ReturnType<ScalarBinaryOpTraits<LHS, RHS,BINOP> >::value), \
834
852
  YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
835
-
853
+
836
854
  } // end namespace Eigen
837
855
 
838
856
  #endif // EIGEN_XPRHELPER_H
@@ -214,7 +214,7 @@ template<typename _MatrixType> class ComplexEigenSolver
214
214
 
215
215
  /** \brief Reports whether previous computation was successful.
216
216
  *
217
- * \returns \c Success if computation was succesful, \c NoConvergence otherwise.
217
+ * \returns \c Success if computation was successful, \c NoConvergence otherwise.
218
218
  */
219
219
  ComputationInfo info() const
220
220
  {
@@ -212,7 +212,7 @@ template<typename _MatrixType> class ComplexSchur
212
212
 
213
213
  /** \brief Reports whether previous computation was successful.
214
214
  *
215
- * \returns \c Success if computation was succesful, \c NoConvergence otherwise.
215
+ * \returns \c Success if computation was successful, \c NoConvergence otherwise.
216
216
  */
217
217
  ComputationInfo info() const
218
218
  {
@@ -110,7 +110,7 @@ template<typename _MatrixType> class EigenSolver
110
110
  *
111
111
  * \sa compute() for an example.
112
112
  */
113
- EigenSolver() : m_eivec(), m_eivalues(), m_isInitialized(false), m_realSchur(), m_matT(), m_tmp() {}
113
+ EigenSolver() : m_eivec(), m_eivalues(), m_isInitialized(false), m_eigenvectorsOk(false), m_realSchur(), m_matT(), m_tmp() {}
114
114
 
115
115
  /** \brief Default constructor with memory preallocation
116
116
  *
@@ -277,7 +277,7 @@ template<typename _MatrixType> class EigenSolver
277
277
  template<typename InputType>
278
278
  EigenSolver& compute(const EigenBase<InputType>& matrix, bool computeEigenvectors = true);
279
279
 
280
- /** \returns NumericalIssue if the input contains INF or NaN values or overflow occured. Returns Success otherwise. */
280
+ /** \returns NumericalIssue if the input contains INF or NaN values or overflow occurred. Returns Success otherwise. */
281
281
  ComputationInfo info() const
282
282
  {
283
283
  eigen_assert(m_isInitialized && "EigenSolver is not initialized.");
@@ -121,7 +121,7 @@ class GeneralizedSelfAdjointEigenSolver : public SelfAdjointEigenSolver<_MatrixT
121
121
  *
122
122
  * \returns Reference to \c *this
123
123
  *
124
- * Accoring to \p options, this function computes eigenvalues and (if requested)
124
+ * According to \p options, this function computes eigenvalues and (if requested)
125
125
  * the eigenvectors of one of the following three generalized eigenproblems:
126
126
  * - \c Ax_lBx: \f$ Ax = \lambda B x \f$
127
127
  * - \c ABx_lx: \f$ ABx = \lambda x \f$
@@ -267,7 +267,7 @@ template<typename _MatrixType> class HessenbergDecomposition
267
267
 
268
268
  private:
269
269
 
270
- typedef Matrix<Scalar, 1, Size, Options | RowMajor, 1, MaxSize> VectorType;
270
+ typedef Matrix<Scalar, 1, Size, int(Options) | int(RowMajor), 1, MaxSize> VectorType;
271
271
  typedef typename NumTraits<Scalar>::Real RealScalar;
272
272
  static void _compute(MatrixType& matA, CoeffVectorType& hCoeffs, VectorType& temp);
273
273
 
@@ -315,7 +315,7 @@ void HessenbergDecomposition<MatrixType>::_compute(MatrixType& matA, CoeffVector
315
315
 
316
316
  // A = A H'
317
317
  matA.rightCols(remainingSize)
318
- .applyHouseholderOnTheRight(matA.col(i).tail(remainingSize-1).conjugate(), numext::conj(h), &temp.coeffRef(0));
318
+ .applyHouseholderOnTheRight(matA.col(i).tail(remainingSize-1), numext::conj(h), &temp.coeffRef(0));
319
319
  }
320
320
  }
321
321
 
@@ -84,7 +84,7 @@ MatrixBase<Derived>::eigenvalues() const
84
84
  * \sa SelfAdjointEigenSolver::eigenvalues(), MatrixBase::eigenvalues()
85
85
  */
86
86
  template<typename MatrixType, unsigned int UpLo>
87
- inline typename SelfAdjointView<MatrixType, UpLo>::EigenvaluesReturnType
87
+ EIGEN_DEVICE_FUNC inline typename SelfAdjointView<MatrixType, UpLo>::EigenvaluesReturnType
88
88
  SelfAdjointView<MatrixType, UpLo>::eigenvalues() const
89
89
  {
90
90
  PlainObject thisAsMatrix(*this);
@@ -147,7 +147,7 @@ MatrixBase<Derived>::operatorNorm() const
147
147
  * \sa eigenvalues(), MatrixBase::operatorNorm()
148
148
  */
149
149
  template<typename MatrixType, unsigned int UpLo>
150
- inline typename SelfAdjointView<MatrixType, UpLo>::RealScalar
150
+ EIGEN_DEVICE_FUNC inline typename SelfAdjointView<MatrixType, UpLo>::RealScalar
151
151
  SelfAdjointView<MatrixType, UpLo>::operatorNorm() const
152
152
  {
153
153
  return eigenvalues().cwiseAbs().maxCoeff();