forgeo-gmlib 0.6.2__cp314-cp314-musllinux_1_2_x86_64.whl

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 (554) hide show
  1. forgeo/gmlib/GeologicalModel3D.py +758 -0
  2. forgeo/gmlib/__init__.py +9 -0
  3. forgeo/gmlib/_version.py +34 -0
  4. forgeo/gmlib/architecture/__init__.py +1 -0
  5. forgeo/gmlib/architecture/core.py +130 -0
  6. forgeo/gmlib/common.abi3.so +0 -0
  7. forgeo/gmlib/fault_network.py +171 -0
  8. forgeo/gmlib/geomodeller_data.py +101 -0
  9. forgeo/gmlib/geomodeller_project.py +396 -0
  10. forgeo/gmlib/myxmltools.py +30 -0
  11. forgeo/gmlib/pypotential2D.abi3.so +0 -0
  12. forgeo/gmlib/pypotential3D.abi3.so +0 -0
  13. forgeo/gmlib/tesselate.py +236 -0
  14. forgeo/gmlib/tesselate_deprecated.py +249 -0
  15. forgeo/gmlib/topography_reader.py +198 -0
  16. forgeo/gmlib/utils/__init__.py +0 -0
  17. forgeo/gmlib/utils/append_data.py +508 -0
  18. forgeo/gmlib/utils/export.py +45 -0
  19. forgeo/gmlib/utils/normalized_gradient.py +40 -0
  20. forgeo/gmlib/utils/tools.py +35 -0
  21. forgeo_gmlib-0.6.2.dist-info/METADATA +23 -0
  22. forgeo_gmlib-0.6.2.dist-info/RECORD +554 -0
  23. forgeo_gmlib-0.6.2.dist-info/WHEEL +5 -0
  24. forgeo_gmlib-0.6.2.dist-info/licenses/LICENSE +661 -0
  25. include/eigen3/Eigen/Cholesky +45 -0
  26. include/eigen3/Eigen/CholmodSupport +48 -0
  27. include/eigen3/Eigen/Core +385 -0
  28. include/eigen3/Eigen/Dense +7 -0
  29. include/eigen3/Eigen/Eigen +2 -0
  30. include/eigen3/Eigen/Eigenvalues +60 -0
  31. include/eigen3/Eigen/Geometry +59 -0
  32. include/eigen3/Eigen/Householder +29 -0
  33. include/eigen3/Eigen/IterativeLinearSolvers +48 -0
  34. include/eigen3/Eigen/Jacobi +32 -0
  35. include/eigen3/Eigen/KLUSupport +41 -0
  36. include/eigen3/Eigen/LU +47 -0
  37. include/eigen3/Eigen/MetisSupport +35 -0
  38. include/eigen3/Eigen/OrderingMethods +70 -0
  39. include/eigen3/Eigen/PaStiXSupport +49 -0
  40. include/eigen3/Eigen/PardisoSupport +35 -0
  41. include/eigen3/Eigen/QR +50 -0
  42. include/eigen3/Eigen/QtAlignedMalloc +39 -0
  43. include/eigen3/Eigen/SPQRSupport +34 -0
  44. include/eigen3/Eigen/SVD +50 -0
  45. include/eigen3/Eigen/Sparse +34 -0
  46. include/eigen3/Eigen/SparseCholesky +37 -0
  47. include/eigen3/Eigen/SparseCore +69 -0
  48. include/eigen3/Eigen/SparseLU +48 -0
  49. include/eigen3/Eigen/SparseQR +36 -0
  50. include/eigen3/Eigen/StdDeque +27 -0
  51. include/eigen3/Eigen/StdList +26 -0
  52. include/eigen3/Eigen/StdVector +27 -0
  53. include/eigen3/Eigen/SuperLUSupport +64 -0
  54. include/eigen3/Eigen/UmfPackSupport +40 -0
  55. include/eigen3/Eigen/src/Cholesky/LDLT.h +688 -0
  56. include/eigen3/Eigen/src/Cholesky/LLT.h +558 -0
  57. include/eigen3/Eigen/src/Cholesky/LLT_LAPACKE.h +99 -0
  58. include/eigen3/Eigen/src/CholmodSupport/CholmodSupport.h +682 -0
  59. include/eigen3/Eigen/src/Core/ArithmeticSequence.h +406 -0
  60. include/eigen3/Eigen/src/Core/Array.h +425 -0
  61. include/eigen3/Eigen/src/Core/ArrayBase.h +226 -0
  62. include/eigen3/Eigen/src/Core/ArrayWrapper.h +209 -0
  63. include/eigen3/Eigen/src/Core/Assign.h +90 -0
  64. include/eigen3/Eigen/src/Core/AssignEvaluator.h +1010 -0
  65. include/eigen3/Eigen/src/Core/Assign_MKL.h +178 -0
  66. include/eigen3/Eigen/src/Core/BandMatrix.h +353 -0
  67. include/eigen3/Eigen/src/Core/Block.h +463 -0
  68. include/eigen3/Eigen/src/Core/BooleanRedux.h +164 -0
  69. include/eigen3/Eigen/src/Core/CommaInitializer.h +164 -0
  70. include/eigen3/Eigen/src/Core/ConditionEstimator.h +175 -0
  71. include/eigen3/Eigen/src/Core/CoreEvaluators.h +1741 -0
  72. include/eigen3/Eigen/src/Core/CoreIterators.h +132 -0
  73. include/eigen3/Eigen/src/Core/CwiseBinaryOp.h +183 -0
  74. include/eigen3/Eigen/src/Core/CwiseNullaryOp.h +1001 -0
  75. include/eigen3/Eigen/src/Core/CwiseTernaryOp.h +197 -0
  76. include/eigen3/Eigen/src/Core/CwiseUnaryOp.h +103 -0
  77. include/eigen3/Eigen/src/Core/CwiseUnaryView.h +132 -0
  78. include/eigen3/Eigen/src/Core/DenseBase.h +701 -0
  79. include/eigen3/Eigen/src/Core/DenseCoeffsBase.h +685 -0
  80. include/eigen3/Eigen/src/Core/DenseStorage.h +652 -0
  81. include/eigen3/Eigen/src/Core/Diagonal.h +259 -0
  82. include/eigen3/Eigen/src/Core/DiagonalMatrix.h +391 -0
  83. include/eigen3/Eigen/src/Core/DiagonalProduct.h +28 -0
  84. include/eigen3/Eigen/src/Core/Dot.h +313 -0
  85. include/eigen3/Eigen/src/Core/EigenBase.h +160 -0
  86. include/eigen3/Eigen/src/Core/ForceAlignedAccess.h +150 -0
  87. include/eigen3/Eigen/src/Core/Fuzzy.h +155 -0
  88. include/eigen3/Eigen/src/Core/GeneralProduct.h +465 -0
  89. include/eigen3/Eigen/src/Core/GenericPacketMath.h +1040 -0
  90. include/eigen3/Eigen/src/Core/GlobalFunctions.h +194 -0
  91. include/eigen3/Eigen/src/Core/IO.h +258 -0
  92. include/eigen3/Eigen/src/Core/IndexedView.h +247 -0
  93. include/eigen3/Eigen/src/Core/Inverse.h +117 -0
  94. include/eigen3/Eigen/src/Core/Map.h +171 -0
  95. include/eigen3/Eigen/src/Core/MapBase.h +310 -0
  96. include/eigen3/Eigen/src/Core/MathFunctions.h +2212 -0
  97. include/eigen3/Eigen/src/Core/MathFunctionsImpl.h +200 -0
  98. include/eigen3/Eigen/src/Core/Matrix.h +578 -0
  99. include/eigen3/Eigen/src/Core/MatrixBase.h +541 -0
  100. include/eigen3/Eigen/src/Core/NestByValue.h +85 -0
  101. include/eigen3/Eigen/src/Core/NoAlias.h +109 -0
  102. include/eigen3/Eigen/src/Core/NumTraits.h +351 -0
  103. include/eigen3/Eigen/src/Core/PartialReduxEvaluator.h +237 -0
  104. include/eigen3/Eigen/src/Core/PermutationMatrix.h +605 -0
  105. include/eigen3/Eigen/src/Core/PlainObjectBase.h +1128 -0
  106. include/eigen3/Eigen/src/Core/Product.h +191 -0
  107. include/eigen3/Eigen/src/Core/ProductEvaluators.h +1179 -0
  108. include/eigen3/Eigen/src/Core/Random.h +218 -0
  109. include/eigen3/Eigen/src/Core/Redux.h +515 -0
  110. include/eigen3/Eigen/src/Core/Ref.h +381 -0
  111. include/eigen3/Eigen/src/Core/Replicate.h +142 -0
  112. include/eigen3/Eigen/src/Core/Reshaped.h +454 -0
  113. include/eigen3/Eigen/src/Core/ReturnByValue.h +119 -0
  114. include/eigen3/Eigen/src/Core/Reverse.h +217 -0
  115. include/eigen3/Eigen/src/Core/Select.h +164 -0
  116. include/eigen3/Eigen/src/Core/SelfAdjointView.h +365 -0
  117. include/eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h +47 -0
  118. include/eigen3/Eigen/src/Core/Solve.h +188 -0
  119. include/eigen3/Eigen/src/Core/SolveTriangular.h +235 -0
  120. include/eigen3/Eigen/src/Core/SolverBase.h +168 -0
  121. include/eigen3/Eigen/src/Core/StableNorm.h +251 -0
  122. include/eigen3/Eigen/src/Core/StlIterators.h +463 -0
  123. include/eigen3/Eigen/src/Core/Stride.h +120 -0
  124. include/eigen3/Eigen/src/Core/Swap.h +68 -0
  125. include/eigen3/Eigen/src/Core/Transpose.h +464 -0
  126. include/eigen3/Eigen/src/Core/Transpositions.h +386 -0
  127. include/eigen3/Eigen/src/Core/TriangularMatrix.h +994 -0
  128. include/eigen3/Eigen/src/Core/VectorBlock.h +96 -0
  129. include/eigen3/Eigen/src/Core/VectorwiseOp.h +784 -0
  130. include/eigen3/Eigen/src/Core/Visitor.h +381 -0
  131. include/eigen3/Eigen/src/Core/arch/AVX/Complex.h +368 -0
  132. include/eigen3/Eigen/src/Core/arch/AVX/MathFunctions.h +228 -0
  133. include/eigen3/Eigen/src/Core/arch/AVX/PacketMath.h +1588 -0
  134. include/eigen3/Eigen/src/Core/arch/AVX/TypeCasting.h +115 -0
  135. include/eigen3/Eigen/src/Core/arch/AVX512/Complex.h +384 -0
  136. include/eigen3/Eigen/src/Core/arch/AVX512/MathFunctions.h +361 -0
  137. include/eigen3/Eigen/src/Core/arch/AVX512/PacketMath.h +2270 -0
  138. include/eigen3/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
  139. include/eigen3/Eigen/src/Core/arch/AltiVec/Complex.h +415 -0
  140. include/eigen3/Eigen/src/Core/arch/AltiVec/MathFunctions.h +119 -0
  141. include/eigen3/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2776 -0
  142. include/eigen3/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +159 -0
  143. include/eigen3/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +627 -0
  144. include/eigen3/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.h +2400 -0
  145. include/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h +2743 -0
  146. include/eigen3/Eigen/src/Core/arch/CUDA/Complex.h +269 -0
  147. include/eigen3/Eigen/src/Core/arch/Default/BFloat16.h +688 -0
  148. include/eigen3/Eigen/src/Core/arch/Default/ConjHelper.h +117 -0
  149. include/eigen3/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1662 -0
  150. include/eigen3/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +116 -0
  151. include/eigen3/Eigen/src/Core/arch/Default/Half.h +950 -0
  152. include/eigen3/Eigen/src/Core/arch/Default/Settings.h +49 -0
  153. include/eigen3/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
  154. include/eigen3/Eigen/src/Core/arch/GPU/MathFunctions.h +103 -0
  155. include/eigen3/Eigen/src/Core/arch/GPU/PacketMath.h +1646 -0
  156. include/eigen3/Eigen/src/Core/arch/GPU/TypeCasting.h +79 -0
  157. include/eigen3/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
  158. include/eigen3/Eigen/src/Core/arch/MSA/Complex.h +645 -0
  159. include/eigen3/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
  160. include/eigen3/Eigen/src/Core/arch/MSA/PacketMath.h +1233 -0
  161. include/eigen3/Eigen/src/Core/arch/NEON/Complex.h +560 -0
  162. include/eigen3/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
  163. include/eigen3/Eigen/src/Core/arch/NEON/MathFunctions.h +75 -0
  164. include/eigen3/Eigen/src/Core/arch/NEON/PacketMath.h +4653 -0
  165. include/eigen3/Eigen/src/Core/arch/NEON/TypeCasting.h +1424 -0
  166. include/eigen3/Eigen/src/Core/arch/SSE/Complex.h +338 -0
  167. include/eigen3/Eigen/src/Core/arch/SSE/MathFunctions.h +199 -0
  168. include/eigen3/Eigen/src/Core/arch/SSE/PacketMath.h +1505 -0
  169. include/eigen3/Eigen/src/Core/arch/SSE/TypeCasting.h +142 -0
  170. include/eigen3/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
  171. include/eigen3/Eigen/src/Core/arch/SVE/PacketMath.h +752 -0
  172. include/eigen3/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
  173. include/eigen3/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
  174. include/eigen3/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
  175. include/eigen3/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
  176. include/eigen3/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
  177. include/eigen3/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
  178. include/eigen3/Eigen/src/Core/arch/ZVector/Complex.h +428 -0
  179. include/eigen3/Eigen/src/Core/arch/ZVector/MathFunctions.h +233 -0
  180. include/eigen3/Eigen/src/Core/arch/ZVector/PacketMath.h +1060 -0
  181. include/eigen3/Eigen/src/Core/functors/AssignmentFunctors.h +177 -0
  182. include/eigen3/Eigen/src/Core/functors/BinaryFunctors.h +541 -0
  183. include/eigen3/Eigen/src/Core/functors/NullaryFunctors.h +189 -0
  184. include/eigen3/Eigen/src/Core/functors/StlFunctors.h +166 -0
  185. include/eigen3/Eigen/src/Core/functors/TernaryFunctors.h +25 -0
  186. include/eigen3/Eigen/src/Core/functors/UnaryFunctors.h +1131 -0
  187. include/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h +2645 -0
  188. include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h +517 -0
  189. include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +322 -0
  190. include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +145 -0
  191. include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +124 -0
  192. include/eigen3/Eigen/src/Core/products/GeneralMatrixVector.h +523 -0
  193. include/eigen3/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +136 -0
  194. include/eigen3/Eigen/src/Core/products/Parallelizer.h +180 -0
  195. include/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +544 -0
  196. include/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +295 -0
  197. include/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector.h +262 -0
  198. include/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +118 -0
  199. include/eigen3/Eigen/src/Core/products/SelfadjointProduct.h +133 -0
  200. include/eigen3/Eigen/src/Core/products/SelfadjointRank2Update.h +94 -0
  201. include/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix.h +472 -0
  202. include/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +317 -0
  203. include/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h +350 -0
  204. include/eigen3/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +255 -0
  205. include/eigen3/Eigen/src/Core/products/TriangularSolverMatrix.h +337 -0
  206. include/eigen3/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +167 -0
  207. include/eigen3/Eigen/src/Core/products/TriangularSolverVector.h +148 -0
  208. include/eigen3/Eigen/src/Core/util/BlasUtil.h +583 -0
  209. include/eigen3/Eigen/src/Core/util/ConfigureVectorization.h +521 -0
  210. include/eigen3/Eigen/src/Core/util/Constants.h +563 -0
  211. include/eigen3/Eigen/src/Core/util/DisableStupidWarnings.h +138 -0
  212. include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h +322 -0
  213. include/eigen3/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
  214. include/eigen3/Eigen/src/Core/util/IntegralConstant.h +272 -0
  215. include/eigen3/Eigen/src/Core/util/MKL_support.h +137 -0
  216. include/eigen3/Eigen/src/Core/util/Macros.h +1511 -0
  217. include/eigen3/Eigen/src/Core/util/Memory.h +1202 -0
  218. include/eigen3/Eigen/src/Core/util/Meta.h +812 -0
  219. include/eigen3/Eigen/src/Core/util/NonMPL2.h +3 -0
  220. include/eigen3/Eigen/src/Core/util/ReenableStupidWarnings.h +31 -0
  221. include/eigen3/Eigen/src/Core/util/ReshapedHelper.h +51 -0
  222. include/eigen3/Eigen/src/Core/util/StaticAssert.h +221 -0
  223. include/eigen3/Eigen/src/Core/util/SymbolicIndex.h +293 -0
  224. include/eigen3/Eigen/src/Core/util/XprHelper.h +856 -0
  225. include/eigen3/Eigen/src/Eigenvalues/ComplexEigenSolver.h +345 -0
  226. include/eigen3/Eigen/src/Eigenvalues/ComplexSchur.h +462 -0
  227. include/eigen3/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +91 -0
  228. include/eigen3/Eigen/src/Eigenvalues/EigenSolver.h +622 -0
  229. include/eigen3/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +417 -0
  230. include/eigen3/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +226 -0
  231. include/eigen3/Eigen/src/Eigenvalues/HessenbergDecomposition.h +374 -0
  232. include/eigen3/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +158 -0
  233. include/eigen3/Eigen/src/Eigenvalues/RealQZ.h +657 -0
  234. include/eigen3/Eigen/src/Eigenvalues/RealSchur.h +557 -0
  235. include/eigen3/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +77 -0
  236. include/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +904 -0
  237. include/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +87 -0
  238. include/eigen3/Eigen/src/Eigenvalues/Tridiagonalization.h +560 -0
  239. include/eigen3/Eigen/src/Geometry/AlignedBox.h +486 -0
  240. include/eigen3/Eigen/src/Geometry/AngleAxis.h +247 -0
  241. include/eigen3/Eigen/src/Geometry/EulerAngles.h +114 -0
  242. include/eigen3/Eigen/src/Geometry/Homogeneous.h +501 -0
  243. include/eigen3/Eigen/src/Geometry/Hyperplane.h +282 -0
  244. include/eigen3/Eigen/src/Geometry/OrthoMethods.h +235 -0
  245. include/eigen3/Eigen/src/Geometry/ParametrizedLine.h +232 -0
  246. include/eigen3/Eigen/src/Geometry/Quaternion.h +870 -0
  247. include/eigen3/Eigen/src/Geometry/Rotation2D.h +199 -0
  248. include/eigen3/Eigen/src/Geometry/RotationBase.h +206 -0
  249. include/eigen3/Eigen/src/Geometry/Scaling.h +188 -0
  250. include/eigen3/Eigen/src/Geometry/Transform.h +1566 -0
  251. include/eigen3/Eigen/src/Geometry/Translation.h +202 -0
  252. include/eigen3/Eigen/src/Geometry/Umeyama.h +168 -0
  253. include/eigen3/Eigen/src/Geometry/arch/Geometry_SIMD.h +168 -0
  254. include/eigen3/Eigen/src/Householder/BlockHouseholder.h +110 -0
  255. include/eigen3/Eigen/src/Householder/Householder.h +176 -0
  256. include/eigen3/Eigen/src/Householder/HouseholderSequence.h +553 -0
  257. include/eigen3/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +226 -0
  258. include/eigen3/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +212 -0
  259. include/eigen3/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +227 -0
  260. include/eigen3/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +394 -0
  261. include/eigen3/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +453 -0
  262. include/eigen3/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +444 -0
  263. include/eigen3/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +198 -0
  264. include/eigen3/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +117 -0
  265. include/eigen3/Eigen/src/Jacobi/Jacobi.h +483 -0
  266. include/eigen3/Eigen/src/KLUSupport/KLUSupport.h +358 -0
  267. include/eigen3/Eigen/src/LU/Determinant.h +117 -0
  268. include/eigen3/Eigen/src/LU/FullPivLU.h +877 -0
  269. include/eigen3/Eigen/src/LU/InverseImpl.h +432 -0
  270. include/eigen3/Eigen/src/LU/PartialPivLU.h +624 -0
  271. include/eigen3/Eigen/src/LU/PartialPivLU_LAPACKE.h +83 -0
  272. include/eigen3/Eigen/src/LU/arch/InverseSize4.h +363 -0
  273. include/eigen3/Eigen/src/MetisSupport/MetisSupport.h +137 -0
  274. include/eigen3/Eigen/src/OrderingMethods/Amd.h +435 -0
  275. include/eigen3/Eigen/src/OrderingMethods/Eigen_Colamd.h +1863 -0
  276. include/eigen3/Eigen/src/OrderingMethods/Ordering.h +153 -0
  277. include/eigen3/Eigen/src/PaStiXSupport/PaStiXSupport.h +678 -0
  278. include/eigen3/Eigen/src/PardisoSupport/PardisoSupport.h +545 -0
  279. include/eigen3/Eigen/src/QR/ColPivHouseholderQR.h +674 -0
  280. include/eigen3/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +97 -0
  281. include/eigen3/Eigen/src/QR/CompleteOrthogonalDecomposition.h +635 -0
  282. include/eigen3/Eigen/src/QR/FullPivHouseholderQR.h +713 -0
  283. include/eigen3/Eigen/src/QR/HouseholderQR.h +434 -0
  284. include/eigen3/Eigen/src/QR/HouseholderQR_LAPACKE.h +68 -0
  285. include/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +335 -0
  286. include/eigen3/Eigen/src/SVD/BDCSVD.h +1377 -0
  287. include/eigen3/Eigen/src/SVD/JacobiSVD.h +813 -0
  288. include/eigen3/Eigen/src/SVD/JacobiSVD_LAPACKE.h +91 -0
  289. include/eigen3/Eigen/src/SVD/SVDBase.h +376 -0
  290. include/eigen3/Eigen/src/SVD/UpperBidiagonalization.h +415 -0
  291. include/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky.h +697 -0
  292. include/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +174 -0
  293. include/eigen3/Eigen/src/SparseCore/AmbiVector.h +378 -0
  294. include/eigen3/Eigen/src/SparseCore/CompressedStorage.h +274 -0
  295. include/eigen3/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +352 -0
  296. include/eigen3/Eigen/src/SparseCore/MappedSparseMatrix.h +67 -0
  297. include/eigen3/Eigen/src/SparseCore/SparseAssign.h +270 -0
  298. include/eigen3/Eigen/src/SparseCore/SparseBlock.h +566 -0
  299. include/eigen3/Eigen/src/SparseCore/SparseColEtree.h +206 -0
  300. include/eigen3/Eigen/src/SparseCore/SparseCompressedBase.h +370 -0
  301. include/eigen3/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +722 -0
  302. include/eigen3/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +150 -0
  303. include/eigen3/Eigen/src/SparseCore/SparseDenseProduct.h +342 -0
  304. include/eigen3/Eigen/src/SparseCore/SparseDiagonalProduct.h +138 -0
  305. include/eigen3/Eigen/src/SparseCore/SparseDot.h +98 -0
  306. include/eigen3/Eigen/src/SparseCore/SparseFuzzy.h +29 -0
  307. include/eigen3/Eigen/src/SparseCore/SparseMap.h +306 -0
  308. include/eigen3/Eigen/src/SparseCore/SparseMatrix.h +1518 -0
  309. include/eigen3/Eigen/src/SparseCore/SparseMatrixBase.h +399 -0
  310. include/eigen3/Eigen/src/SparseCore/SparsePermutation.h +178 -0
  311. include/eigen3/Eigen/src/SparseCore/SparseProduct.h +182 -0
  312. include/eigen3/Eigen/src/SparseCore/SparseRedux.h +49 -0
  313. include/eigen3/Eigen/src/SparseCore/SparseRef.h +397 -0
  314. include/eigen3/Eigen/src/SparseCore/SparseSelfAdjointView.h +659 -0
  315. include/eigen3/Eigen/src/SparseCore/SparseSolverBase.h +124 -0
  316. include/eigen3/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +198 -0
  317. include/eigen3/Eigen/src/SparseCore/SparseTranspose.h +92 -0
  318. include/eigen3/Eigen/src/SparseCore/SparseTriangularView.h +189 -0
  319. include/eigen3/Eigen/src/SparseCore/SparseUtil.h +186 -0
  320. include/eigen3/Eigen/src/SparseCore/SparseVector.h +480 -0
  321. include/eigen3/Eigen/src/SparseCore/SparseView.h +254 -0
  322. include/eigen3/Eigen/src/SparseCore/TriangularSolver.h +315 -0
  323. include/eigen3/Eigen/src/SparseLU/SparseLU.h +925 -0
  324. include/eigen3/Eigen/src/SparseLU/SparseLUImpl.h +66 -0
  325. include/eigen3/Eigen/src/SparseLU/SparseLU_Memory.h +226 -0
  326. include/eigen3/Eigen/src/SparseLU/SparseLU_Structs.h +110 -0
  327. include/eigen3/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +374 -0
  328. include/eigen3/Eigen/src/SparseLU/SparseLU_Utils.h +80 -0
  329. include/eigen3/Eigen/src/SparseLU/SparseLU_column_bmod.h +181 -0
  330. include/eigen3/Eigen/src/SparseLU/SparseLU_column_dfs.h +179 -0
  331. include/eigen3/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +107 -0
  332. include/eigen3/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +121 -0
  333. include/eigen3/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +129 -0
  334. include/eigen3/Eigen/src/SparseLU/SparseLU_panel_bmod.h +222 -0
  335. include/eigen3/Eigen/src/SparseLU/SparseLU_panel_dfs.h +258 -0
  336. include/eigen3/Eigen/src/SparseLU/SparseLU_pivotL.h +137 -0
  337. include/eigen3/Eigen/src/SparseLU/SparseLU_pruneL.h +136 -0
  338. include/eigen3/Eigen/src/SparseLU/SparseLU_relax_snode.h +83 -0
  339. include/eigen3/Eigen/src/SparseQR/SparseQR.h +758 -0
  340. include/eigen3/Eigen/src/StlSupport/StdDeque.h +116 -0
  341. include/eigen3/Eigen/src/StlSupport/StdList.h +106 -0
  342. include/eigen3/Eigen/src/StlSupport/StdVector.h +131 -0
  343. include/eigen3/Eigen/src/StlSupport/details.h +84 -0
  344. include/eigen3/Eigen/src/SuperLUSupport/SuperLUSupport.h +1025 -0
  345. include/eigen3/Eigen/src/UmfPackSupport/UmfPackSupport.h +642 -0
  346. include/eigen3/Eigen/src/misc/Image.h +82 -0
  347. include/eigen3/Eigen/src/misc/Kernel.h +79 -0
  348. include/eigen3/Eigen/src/misc/RealSvd2x2.h +55 -0
  349. include/eigen3/Eigen/src/misc/blas.h +440 -0
  350. include/eigen3/Eigen/src/misc/lapack.h +152 -0
  351. include/eigen3/Eigen/src/misc/lapacke.h +16292 -0
  352. include/eigen3/Eigen/src/misc/lapacke_mangling.h +17 -0
  353. include/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h +431 -0
  354. include/eigen3/Eigen/src/plugins/ArrayCwiseUnaryOps.h +696 -0
  355. include/eigen3/Eigen/src/plugins/BlockMethods.h +1442 -0
  356. include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h +115 -0
  357. include/eigen3/Eigen/src/plugins/CommonCwiseUnaryOps.h +177 -0
  358. include/eigen3/Eigen/src/plugins/IndexedViewMethods.h +262 -0
  359. include/eigen3/Eigen/src/plugins/MatrixCwiseBinaryOps.h +184 -0
  360. include/eigen3/Eigen/src/plugins/MatrixCwiseUnaryOps.h +95 -0
  361. include/eigen3/Eigen/src/plugins/ReshapedMethods.h +149 -0
  362. include/eigen3/signature_of_eigen3_matrix_library +1 -0
  363. include/eigen3/unsupported/Eigen/AdolcForward +159 -0
  364. include/eigen3/unsupported/Eigen/AlignedVector3 +234 -0
  365. include/eigen3/unsupported/Eigen/ArpackSupport +30 -0
  366. include/eigen3/unsupported/Eigen/AutoDiff +48 -0
  367. include/eigen3/unsupported/Eigen/BVH +95 -0
  368. include/eigen3/unsupported/Eigen/CXX11/Tensor +137 -0
  369. include/eigen3/unsupported/Eigen/CXX11/TensorSymmetry +42 -0
  370. include/eigen3/unsupported/Eigen/CXX11/ThreadPool +74 -0
  371. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/Tensor.h +554 -0
  372. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorArgMax.h +327 -0
  373. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h +242 -0
  374. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h +1176 -0
  375. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h +1559 -0
  376. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h +1083 -0
  377. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h +510 -0
  378. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConcatenation.h +373 -0
  379. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h +1019 -0
  380. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionBlocking.h +73 -0
  381. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionCuda.h +6 -0
  382. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionGpu.h +1413 -0
  383. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h +575 -0
  384. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionSycl.h +1650 -0
  385. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h +1679 -0
  386. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConversion.h +455 -0
  387. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h +1126 -0
  388. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConvolutionSycl.h +536 -0
  389. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h +213 -0
  390. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorCustomOp.h +342 -0
  391. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h +137 -0
  392. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h +6 -0
  393. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceDefault.h +104 -0
  394. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h +389 -0
  395. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h +1048 -0
  396. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h +409 -0
  397. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDimensionList.h +234 -0
  398. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h +493 -0
  399. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h +229 -0
  400. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h +980 -0
  401. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h +701 -0
  402. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExpr.h +389 -0
  403. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorFFT.h +669 -0
  404. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorFixedSize.h +377 -0
  405. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h +232 -0
  406. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h +191 -0
  407. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h +488 -0
  408. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h +297 -0
  409. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGlobalFunctions.h +33 -0
  410. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h +99 -0
  411. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaUndefines.h +44 -0
  412. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h +79 -0
  413. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h +602 -0
  414. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h +735 -0
  415. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorInflation.h +244 -0
  416. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorInitializer.h +82 -0
  417. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h +257 -0
  418. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorLayoutSwap.h +213 -0
  419. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h +98 -0
  420. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h +327 -0
  421. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h +311 -0
  422. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h +1098 -0
  423. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h +705 -0
  424. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h +286 -0
  425. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h +317 -0
  426. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h +1000 -0
  427. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h +6 -0
  428. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +973 -0
  429. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReductionSycl.h +582 -0
  430. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorRef.h +454 -0
  431. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h +462 -0
  432. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorScan.h +528 -0
  433. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorScanSycl.h +513 -0
  434. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorShuffling.h +466 -0
  435. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h +157 -0
  436. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStriding.h +341 -0
  437. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorTrace.h +299 -0
  438. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h +264 -0
  439. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h +249 -0
  440. include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h +628 -0
  441. include/eigen3/unsupported/Eigen/CXX11/src/TensorSymmetry/DynamicSymmetry.h +293 -0
  442. include/eigen3/unsupported/Eigen/CXX11/src/TensorSymmetry/StaticSymmetry.h +236 -0
  443. include/eigen3/unsupported/Eigen/CXX11/src/TensorSymmetry/Symmetry.h +338 -0
  444. include/eigen3/unsupported/Eigen/CXX11/src/TensorSymmetry/util/TemplateGroupTheory.h +669 -0
  445. include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/Barrier.h +67 -0
  446. include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h +249 -0
  447. include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h +486 -0
  448. include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h +236 -0
  449. include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadCancel.h +23 -0
  450. include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadEnvironment.h +40 -0
  451. include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h +301 -0
  452. include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h +48 -0
  453. include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadYield.h +20 -0
  454. include/eigen3/unsupported/Eigen/CXX11/src/util/CXX11Meta.h +538 -0
  455. include/eigen3/unsupported/Eigen/CXX11/src/util/CXX11Workarounds.h +88 -0
  456. include/eigen3/unsupported/Eigen/CXX11/src/util/EmulateArray.h +261 -0
  457. include/eigen3/unsupported/Eigen/CXX11/src/util/MaxSizeVector.h +158 -0
  458. include/eigen3/unsupported/Eigen/EulerAngles +43 -0
  459. include/eigen3/unsupported/Eigen/FFT +420 -0
  460. include/eigen3/unsupported/Eigen/IterativeSolvers +51 -0
  461. include/eigen3/unsupported/Eigen/KroneckerProduct +36 -0
  462. include/eigen3/unsupported/Eigen/LevenbergMarquardt +49 -0
  463. include/eigen3/unsupported/Eigen/MPRealSupport +213 -0
  464. include/eigen3/unsupported/Eigen/MatrixFunctions +504 -0
  465. include/eigen3/unsupported/Eigen/MoreVectorization +24 -0
  466. include/eigen3/unsupported/Eigen/NonLinearOptimization +140 -0
  467. include/eigen3/unsupported/Eigen/NumericalDiff +56 -0
  468. include/eigen3/unsupported/Eigen/OpenGLSupport +322 -0
  469. include/eigen3/unsupported/Eigen/Polynomials +137 -0
  470. include/eigen3/unsupported/Eigen/Skyline +39 -0
  471. include/eigen3/unsupported/Eigen/SparseExtra +54 -0
  472. include/eigen3/unsupported/Eigen/SpecialFunctions +103 -0
  473. include/eigen3/unsupported/Eigen/Splines +35 -0
  474. include/eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h +108 -0
  475. include/eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h +730 -0
  476. include/eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffVector.h +220 -0
  477. include/eigen3/unsupported/Eigen/src/BVH/BVAlgorithms.h +293 -0
  478. include/eigen3/unsupported/Eigen/src/BVH/KdBVH.h +223 -0
  479. include/eigen3/unsupported/Eigen/src/Eigenvalues/ArpackSelfAdjointEigenSolver.h +790 -0
  480. include/eigen3/unsupported/Eigen/src/EulerAngles/EulerAngles.h +356 -0
  481. include/eigen3/unsupported/Eigen/src/EulerAngles/EulerSystem.h +306 -0
  482. include/eigen3/unsupported/Eigen/src/FFT/ei_fftw_impl.h +261 -0
  483. include/eigen3/unsupported/Eigen/src/FFT/ei_kissfft_impl.h +449 -0
  484. include/eigen3/unsupported/Eigen/src/IterativeSolvers/ConstrainedConjGrad.h +187 -0
  485. include/eigen3/unsupported/Eigen/src/IterativeSolvers/DGMRES.h +511 -0
  486. include/eigen3/unsupported/Eigen/src/IterativeSolvers/GMRES.h +335 -0
  487. include/eigen3/unsupported/Eigen/src/IterativeSolvers/IDRS.h +436 -0
  488. include/eigen3/unsupported/Eigen/src/IterativeSolvers/IncompleteLU.h +90 -0
  489. include/eigen3/unsupported/Eigen/src/IterativeSolvers/IterationController.h +154 -0
  490. include/eigen3/unsupported/Eigen/src/IterativeSolvers/MINRES.h +267 -0
  491. include/eigen3/unsupported/Eigen/src/IterativeSolvers/Scaling.h +193 -0
  492. include/eigen3/unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h +305 -0
  493. include/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LMcovar.h +84 -0
  494. include/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LMonestep.h +202 -0
  495. include/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LMpar.h +160 -0
  496. include/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LMqrsolv.h +188 -0
  497. include/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h +396 -0
  498. include/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h +441 -0
  499. include/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h +569 -0
  500. include/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixLogarithm.h +373 -0
  501. include/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h +705 -0
  502. include/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h +368 -0
  503. include/eigen3/unsupported/Eigen/src/MatrixFunctions/StemFunction.h +117 -0
  504. include/eigen3/unsupported/Eigen/src/MoreVectorization/MathFunctions.h +95 -0
  505. include/eigen3/unsupported/Eigen/src/NonLinearOptimization/HybridNonLinearSolver.h +601 -0
  506. include/eigen3/unsupported/Eigen/src/NonLinearOptimization/LevenbergMarquardt.h +657 -0
  507. include/eigen3/unsupported/Eigen/src/NonLinearOptimization/chkder.h +66 -0
  508. include/eigen3/unsupported/Eigen/src/NonLinearOptimization/covar.h +70 -0
  509. include/eigen3/unsupported/Eigen/src/NonLinearOptimization/dogleg.h +107 -0
  510. include/eigen3/unsupported/Eigen/src/NonLinearOptimization/fdjac1.h +79 -0
  511. include/eigen3/unsupported/Eigen/src/NonLinearOptimization/lmpar.h +298 -0
  512. include/eigen3/unsupported/Eigen/src/NonLinearOptimization/qrsolv.h +91 -0
  513. include/eigen3/unsupported/Eigen/src/NonLinearOptimization/r1mpyq.h +30 -0
  514. include/eigen3/unsupported/Eigen/src/NonLinearOptimization/r1updt.h +99 -0
  515. include/eigen3/unsupported/Eigen/src/NonLinearOptimization/rwupdt.h +49 -0
  516. include/eigen3/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h +130 -0
  517. include/eigen3/unsupported/Eigen/src/Polynomials/Companion.h +280 -0
  518. include/eigen3/unsupported/Eigen/src/Polynomials/PolynomialSolver.h +429 -0
  519. include/eigen3/unsupported/Eigen/src/Polynomials/PolynomialUtils.h +143 -0
  520. include/eigen3/unsupported/Eigen/src/Skyline/SkylineInplaceLU.h +352 -0
  521. include/eigen3/unsupported/Eigen/src/Skyline/SkylineMatrix.h +862 -0
  522. include/eigen3/unsupported/Eigen/src/Skyline/SkylineMatrixBase.h +212 -0
  523. include/eigen3/unsupported/Eigen/src/Skyline/SkylineProduct.h +295 -0
  524. include/eigen3/unsupported/Eigen/src/Skyline/SkylineStorage.h +259 -0
  525. include/eigen3/unsupported/Eigen/src/Skyline/SkylineUtil.h +89 -0
  526. include/eigen3/unsupported/Eigen/src/SparseExtra/BlockOfDynamicSparseMatrix.h +122 -0
  527. include/eigen3/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h +1079 -0
  528. include/eigen3/unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h +404 -0
  529. include/eigen3/unsupported/Eigen/src/SparseExtra/MarketIO.h +282 -0
  530. include/eigen3/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h +247 -0
  531. include/eigen3/unsupported/Eigen/src/SparseExtra/RandomSetter.h +349 -0
  532. include/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsArrayAPI.h +286 -0
  533. include/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsBFloat16.h +68 -0
  534. include/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsFunctors.h +357 -0
  535. include/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsHalf.h +66 -0
  536. include/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsImpl.h +1959 -0
  537. include/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsPacketMath.h +118 -0
  538. include/eigen3/unsupported/Eigen/src/SpecialFunctions/HipVectorCompatibility.h +67 -0
  539. include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsArrayAPI.h +167 -0
  540. include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsBFloat16.h +58 -0
  541. include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsFunctors.h +330 -0
  542. include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsHalf.h +58 -0
  543. include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsImpl.h +2051 -0
  544. include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsPacketMath.h +79 -0
  545. include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/AVX/BesselFunctions.h +46 -0
  546. include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/AVX/SpecialFunctions.h +16 -0
  547. include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/AVX512/BesselFunctions.h +51 -0
  548. include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/AVX512/SpecialFunctions.h +16 -0
  549. include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/GPU/SpecialFunctions.h +369 -0
  550. include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/NEON/BesselFunctions.h +54 -0
  551. include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/NEON/SpecialFunctions.h +34 -0
  552. include/eigen3/unsupported/Eigen/src/Splines/Spline.h +507 -0
  553. include/eigen3/unsupported/Eigen/src/Splines/SplineFitting.h +431 -0
  554. include/eigen3/unsupported/Eigen/src/Splines/SplineFwd.h +93 -0
@@ -0,0 +1,1202 @@
1
+ // This file is part of Eigen, a lightweight C++ template library
2
+ // for linear algebra.
3
+ //
4
+ // Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>
5
+ // Copyright (C) 2008-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
6
+ // Copyright (C) 2009 Kenneth Riddile <kfriddile@yahoo.com>
7
+ // Copyright (C) 2010 Hauke Heibel <hauke.heibel@gmail.com>
8
+ // Copyright (C) 2010 Thomas Capricelli <orzel@freehackers.org>
9
+ // Copyright (C) 2013 Pavel Holoborodko <pavel@holoborodko.com>
10
+ //
11
+ // This Source Code Form is subject to the terms of the Mozilla
12
+ // Public License v. 2.0. If a copy of the MPL was not distributed
13
+ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
14
+
15
+
16
+ /*****************************************************************************
17
+ *** Platform checks for aligned malloc functions ***
18
+ *****************************************************************************/
19
+
20
+ #ifndef EIGEN_MEMORY_H
21
+ #define EIGEN_MEMORY_H
22
+
23
+ #ifndef EIGEN_MALLOC_ALREADY_ALIGNED
24
+
25
+ // Try to determine automatically if malloc is already aligned.
26
+
27
+ // On 64-bit systems, glibc's malloc returns 16-byte-aligned pointers, see:
28
+ // http://www.gnu.org/s/libc/manual/html_node/Aligned-Memory-Blocks.html
29
+ // This is true at least since glibc 2.8.
30
+ // This leaves the question how to detect 64-bit. According to this document,
31
+ // http://gcc.fyxm.net/summit/2003/Porting%20to%2064%20bit.pdf
32
+ // page 114, "[The] LP64 model [...] is used by all 64-bit UNIX ports" so it's indeed
33
+ // quite safe, at least within the context of glibc, to equate 64-bit with LP64.
34
+ #if defined(__GLIBC__) && ((__GLIBC__>=2 && __GLIBC_MINOR__ >= 8) || __GLIBC__>2) \
35
+ && defined(__LP64__) && ! defined( __SANITIZE_ADDRESS__ ) && (EIGEN_DEFAULT_ALIGN_BYTES == 16)
36
+ #define EIGEN_GLIBC_MALLOC_ALREADY_ALIGNED 1
37
+ #else
38
+ #define EIGEN_GLIBC_MALLOC_ALREADY_ALIGNED 0
39
+ #endif
40
+
41
+ // FreeBSD 6 seems to have 16-byte aligned malloc
42
+ // See http://svn.freebsd.org/viewvc/base/stable/6/lib/libc/stdlib/malloc.c?view=markup
43
+ // FreeBSD 7 seems to have 16-byte aligned malloc except on ARM and MIPS architectures
44
+ // See http://svn.freebsd.org/viewvc/base/stable/7/lib/libc/stdlib/malloc.c?view=markup
45
+ #if defined(__FreeBSD__) && !(EIGEN_ARCH_ARM || EIGEN_ARCH_MIPS) && (EIGEN_DEFAULT_ALIGN_BYTES == 16)
46
+ #define EIGEN_FREEBSD_MALLOC_ALREADY_ALIGNED 1
47
+ #else
48
+ #define EIGEN_FREEBSD_MALLOC_ALREADY_ALIGNED 0
49
+ #endif
50
+
51
+ #if (EIGEN_OS_MAC && (EIGEN_DEFAULT_ALIGN_BYTES == 16)) \
52
+ || (EIGEN_OS_WIN64 && (EIGEN_DEFAULT_ALIGN_BYTES == 16)) \
53
+ || EIGEN_GLIBC_MALLOC_ALREADY_ALIGNED \
54
+ || EIGEN_FREEBSD_MALLOC_ALREADY_ALIGNED
55
+ #define EIGEN_MALLOC_ALREADY_ALIGNED 1
56
+ #else
57
+ #define EIGEN_MALLOC_ALREADY_ALIGNED 0
58
+ #endif
59
+
60
+ #endif
61
+
62
+ namespace Eigen {
63
+
64
+ namespace internal {
65
+
66
+ EIGEN_DEVICE_FUNC
67
+ inline void throw_std_bad_alloc()
68
+ {
69
+ #ifdef EIGEN_EXCEPTIONS
70
+ throw std::bad_alloc();
71
+ #else
72
+ std::size_t huge = static_cast<std::size_t>(-1);
73
+ #if defined(EIGEN_HIPCC)
74
+ //
75
+ // calls to "::operator new" are to be treated as opaque function calls (i.e no inlining),
76
+ // and as a consequence the code in the #else block triggers the hipcc warning :
77
+ // "no overloaded function has restriction specifiers that are compatible with the ambient context"
78
+ //
79
+ // "throw_std_bad_alloc" has the EIGEN_DEVICE_FUNC attribute, so it seems that hipcc expects
80
+ // the same on "operator new"
81
+ // Reverting code back to the old version in this #if block for the hipcc compiler
82
+ //
83
+ new int[huge];
84
+ #else
85
+ void* unused = ::operator new(huge);
86
+ EIGEN_UNUSED_VARIABLE(unused);
87
+ #endif
88
+ #endif
89
+ }
90
+
91
+ /*****************************************************************************
92
+ *** Implementation of handmade aligned functions ***
93
+ *****************************************************************************/
94
+
95
+ /* ----- Hand made implementations of aligned malloc/free and realloc ----- */
96
+
97
+ /** \internal Like malloc, but the returned pointer is guaranteed to be 16-byte aligned.
98
+ * Fast, but wastes 16 additional bytes of memory. Does not throw any exception.
99
+ */
100
+ EIGEN_DEVICE_FUNC inline void* handmade_aligned_malloc(std::size_t size, std::size_t alignment = EIGEN_DEFAULT_ALIGN_BYTES)
101
+ {
102
+ eigen_assert(alignment >= sizeof(void*) && (alignment & (alignment-1)) == 0 && "Alignment must be at least sizeof(void*) and a power of 2");
103
+
104
+ EIGEN_USING_STD(malloc)
105
+ void *original = malloc(size+alignment);
106
+
107
+ if (original == 0) return 0;
108
+ void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(alignment-1))) + alignment);
109
+ *(reinterpret_cast<void**>(aligned) - 1) = original;
110
+ return aligned;
111
+ }
112
+
113
+ /** \internal Frees memory allocated with handmade_aligned_malloc */
114
+ EIGEN_DEVICE_FUNC inline void handmade_aligned_free(void *ptr)
115
+ {
116
+ if (ptr) {
117
+ EIGEN_USING_STD(free)
118
+ free(*(reinterpret_cast<void**>(ptr) - 1));
119
+ }
120
+ }
121
+
122
+ /** \internal
123
+ * \brief Reallocates aligned memory.
124
+ * Since we know that our handmade version is based on std::malloc
125
+ * we can use std::realloc to implement efficient reallocation.
126
+ */
127
+ inline void* handmade_aligned_realloc(void* ptr, std::size_t size, std::size_t = 0)
128
+ {
129
+ if (ptr == 0) return handmade_aligned_malloc(size);
130
+ void *original = *(reinterpret_cast<void**>(ptr) - 1);
131
+ std::ptrdiff_t previous_offset = static_cast<char *>(ptr)-static_cast<char *>(original);
132
+ original = std::realloc(original,size+EIGEN_DEFAULT_ALIGN_BYTES);
133
+ if (original == 0) return 0;
134
+ void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1))) + EIGEN_DEFAULT_ALIGN_BYTES);
135
+ void *previous_aligned = static_cast<char *>(original)+previous_offset;
136
+ if(aligned!=previous_aligned)
137
+ std::memmove(aligned, previous_aligned, size);
138
+
139
+ *(reinterpret_cast<void**>(aligned) - 1) = original;
140
+ return aligned;
141
+ }
142
+
143
+ /*****************************************************************************
144
+ *** Implementation of portable aligned versions of malloc/free/realloc ***
145
+ *****************************************************************************/
146
+
147
+ #ifdef EIGEN_NO_MALLOC
148
+ EIGEN_DEVICE_FUNC inline void check_that_malloc_is_allowed()
149
+ {
150
+ eigen_assert(false && "heap allocation is forbidden (EIGEN_NO_MALLOC is defined)");
151
+ }
152
+ #elif defined EIGEN_RUNTIME_NO_MALLOC
153
+ EIGEN_DEVICE_FUNC inline bool is_malloc_allowed_impl(bool update, bool new_value = false)
154
+ {
155
+ static bool value = true;
156
+ if (update == 1)
157
+ value = new_value;
158
+ return value;
159
+ }
160
+ EIGEN_DEVICE_FUNC inline bool is_malloc_allowed() { return is_malloc_allowed_impl(false); }
161
+ EIGEN_DEVICE_FUNC inline bool set_is_malloc_allowed(bool new_value) { return is_malloc_allowed_impl(true, new_value); }
162
+ EIGEN_DEVICE_FUNC inline void check_that_malloc_is_allowed()
163
+ {
164
+ eigen_assert(is_malloc_allowed() && "heap allocation is forbidden (EIGEN_RUNTIME_NO_MALLOC is defined and g_is_malloc_allowed is false)");
165
+ }
166
+ #else
167
+ EIGEN_DEVICE_FUNC inline void check_that_malloc_is_allowed()
168
+ {}
169
+ #endif
170
+
171
+ /** \internal Allocates \a size bytes. The returned pointer is guaranteed to have 16 or 32 bytes alignment depending on the requirements.
172
+ * On allocation error, the returned pointer is null, and std::bad_alloc is thrown.
173
+ */
174
+ EIGEN_DEVICE_FUNC inline void* aligned_malloc(std::size_t size)
175
+ {
176
+ check_that_malloc_is_allowed();
177
+
178
+ void *result;
179
+ #if (EIGEN_DEFAULT_ALIGN_BYTES==0) || EIGEN_MALLOC_ALREADY_ALIGNED
180
+
181
+ EIGEN_USING_STD(malloc)
182
+ result = malloc(size);
183
+
184
+ #if EIGEN_DEFAULT_ALIGN_BYTES==16
185
+ eigen_assert((size<16 || (std::size_t(result)%16)==0) && "System's malloc returned an unaligned pointer. Compile with EIGEN_MALLOC_ALREADY_ALIGNED=0 to fallback to handmade aligned memory allocator.");
186
+ #endif
187
+ #else
188
+ result = handmade_aligned_malloc(size);
189
+ #endif
190
+
191
+ if(!result && size)
192
+ throw_std_bad_alloc();
193
+
194
+ return result;
195
+ }
196
+
197
+ /** \internal Frees memory allocated with aligned_malloc. */
198
+ EIGEN_DEVICE_FUNC inline void aligned_free(void *ptr)
199
+ {
200
+ #if (EIGEN_DEFAULT_ALIGN_BYTES==0) || EIGEN_MALLOC_ALREADY_ALIGNED
201
+
202
+ EIGEN_USING_STD(free)
203
+ free(ptr);
204
+
205
+ #else
206
+ handmade_aligned_free(ptr);
207
+ #endif
208
+ }
209
+
210
+ /**
211
+ * \internal
212
+ * \brief Reallocates an aligned block of memory.
213
+ * \throws std::bad_alloc on allocation failure
214
+ */
215
+ inline void* aligned_realloc(void *ptr, std::size_t new_size, std::size_t old_size)
216
+ {
217
+ EIGEN_UNUSED_VARIABLE(old_size)
218
+
219
+ void *result;
220
+ #if (EIGEN_DEFAULT_ALIGN_BYTES==0) || EIGEN_MALLOC_ALREADY_ALIGNED
221
+ result = std::realloc(ptr,new_size);
222
+ #else
223
+ result = handmade_aligned_realloc(ptr,new_size,old_size);
224
+ #endif
225
+
226
+ if (!result && new_size)
227
+ throw_std_bad_alloc();
228
+
229
+ return result;
230
+ }
231
+
232
+ /*****************************************************************************
233
+ *** Implementation of conditionally aligned functions ***
234
+ *****************************************************************************/
235
+
236
+ /** \internal Allocates \a size bytes. If Align is true, then the returned ptr is 16-byte-aligned.
237
+ * On allocation error, the returned pointer is null, and a std::bad_alloc is thrown.
238
+ */
239
+ template<bool Align> EIGEN_DEVICE_FUNC inline void* conditional_aligned_malloc(std::size_t size)
240
+ {
241
+ return aligned_malloc(size);
242
+ }
243
+
244
+ template<> EIGEN_DEVICE_FUNC inline void* conditional_aligned_malloc<false>(std::size_t size)
245
+ {
246
+ check_that_malloc_is_allowed();
247
+
248
+ EIGEN_USING_STD(malloc)
249
+ void *result = malloc(size);
250
+
251
+ if(!result && size)
252
+ throw_std_bad_alloc();
253
+ return result;
254
+ }
255
+
256
+ /** \internal Frees memory allocated with conditional_aligned_malloc */
257
+ template<bool Align> EIGEN_DEVICE_FUNC inline void conditional_aligned_free(void *ptr)
258
+ {
259
+ aligned_free(ptr);
260
+ }
261
+
262
+ template<> EIGEN_DEVICE_FUNC inline void conditional_aligned_free<false>(void *ptr)
263
+ {
264
+ EIGEN_USING_STD(free)
265
+ free(ptr);
266
+ }
267
+
268
+ template<bool Align> inline void* conditional_aligned_realloc(void* ptr, std::size_t new_size, std::size_t old_size)
269
+ {
270
+ return aligned_realloc(ptr, new_size, old_size);
271
+ }
272
+
273
+ template<> inline void* conditional_aligned_realloc<false>(void* ptr, std::size_t new_size, std::size_t)
274
+ {
275
+ return std::realloc(ptr, new_size);
276
+ }
277
+
278
+ /*****************************************************************************
279
+ *** Construction/destruction of array elements ***
280
+ *****************************************************************************/
281
+
282
+ /** \internal Destructs the elements of an array.
283
+ * The \a size parameters tells on how many objects to call the destructor of T.
284
+ */
285
+ template<typename T> EIGEN_DEVICE_FUNC inline void destruct_elements_of_array(T *ptr, std::size_t size)
286
+ {
287
+ // always destruct an array starting from the end.
288
+ if(ptr)
289
+ while(size) ptr[--size].~T();
290
+ }
291
+
292
+ /** \internal Constructs the elements of an array.
293
+ * The \a size parameter tells on how many objects to call the constructor of T.
294
+ */
295
+ template<typename T> EIGEN_DEVICE_FUNC inline T* default_construct_elements_of_array(T *ptr, std::size_t size)
296
+ {
297
+ std::size_t i=0;
298
+ EIGEN_TRY
299
+ {
300
+ for (i = 0; i < size; ++i) ::new (ptr + i) T;
301
+ }
302
+ EIGEN_CATCH(...)
303
+ {
304
+ destruct_elements_of_array(ptr, i);
305
+ EIGEN_THROW;
306
+ }
307
+ return ptr;
308
+ }
309
+
310
+ /** \internal Copy-constructs the elements of an array.
311
+ * The \a size parameter tells on how many objects to copy.
312
+ */
313
+ template<typename T> EIGEN_DEVICE_FUNC inline T* copy_construct_elements_of_array(T *ptr, const T* src, std::size_t size)
314
+ {
315
+ std::size_t i=0;
316
+ EIGEN_TRY
317
+ {
318
+ for (i = 0; i < size; ++i) ::new (ptr + i) T(*(src + i));
319
+ }
320
+ EIGEN_CATCH(...)
321
+ {
322
+ destruct_elements_of_array(ptr, i);
323
+ EIGEN_THROW;
324
+ }
325
+ return ptr;
326
+ }
327
+
328
+ /** \internal Move-constructs the elements of an array.
329
+ * The \a size parameter tells on how many objects to move.
330
+ */
331
+ template<typename T> EIGEN_DEVICE_FUNC inline T* move_construct_elements_of_array(T *ptr, T* src, std::size_t size)
332
+ {
333
+ std::size_t i=0;
334
+ EIGEN_TRY
335
+ {
336
+ #if EIGEN_HAS_RVALUE_REFERENCES
337
+ for (i = 0; i < size; ++i) ::new (ptr + i) T(std::move(*(src + i)));
338
+ #else
339
+ for (i = 0; i < size; ++i) ::new (ptr + i) T(*(src + i));
340
+ #endif
341
+ }
342
+ EIGEN_CATCH(...)
343
+ {
344
+ destruct_elements_of_array(ptr, i);
345
+ EIGEN_THROW;
346
+ }
347
+ return ptr;
348
+ }
349
+
350
+ /*****************************************************************************
351
+ *** Implementation of aligned new/delete-like functions ***
352
+ *****************************************************************************/
353
+
354
+ template<typename T>
355
+ EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void check_size_for_overflow(std::size_t size)
356
+ {
357
+ if(size > std::size_t(-1) / sizeof(T))
358
+ throw_std_bad_alloc();
359
+ }
360
+
361
+ /** \internal Allocates \a size objects of type T. The returned pointer is guaranteed to have 16 bytes alignment.
362
+ * On allocation error, the returned pointer is undefined, but a std::bad_alloc is thrown.
363
+ * The default constructor of T is called.
364
+ */
365
+ template<typename T> EIGEN_DEVICE_FUNC inline T* aligned_new(std::size_t size)
366
+ {
367
+ check_size_for_overflow<T>(size);
368
+ T *result = static_cast<T*>(aligned_malloc(sizeof(T)*size));
369
+ EIGEN_TRY
370
+ {
371
+ return default_construct_elements_of_array(result, size);
372
+ }
373
+ EIGEN_CATCH(...)
374
+ {
375
+ aligned_free(result);
376
+ EIGEN_THROW;
377
+ }
378
+ return result;
379
+ }
380
+
381
+ template<typename T, bool Align> EIGEN_DEVICE_FUNC inline T* conditional_aligned_new(std::size_t size)
382
+ {
383
+ check_size_for_overflow<T>(size);
384
+ T *result = static_cast<T*>(conditional_aligned_malloc<Align>(sizeof(T)*size));
385
+ EIGEN_TRY
386
+ {
387
+ return default_construct_elements_of_array(result, size);
388
+ }
389
+ EIGEN_CATCH(...)
390
+ {
391
+ conditional_aligned_free<Align>(result);
392
+ EIGEN_THROW;
393
+ }
394
+ return result;
395
+ }
396
+
397
+ /** \internal Deletes objects constructed with aligned_new
398
+ * The \a size parameters tells on how many objects to call the destructor of T.
399
+ */
400
+ template<typename T> EIGEN_DEVICE_FUNC inline void aligned_delete(T *ptr, std::size_t size)
401
+ {
402
+ destruct_elements_of_array<T>(ptr, size);
403
+ Eigen::internal::aligned_free(ptr);
404
+ }
405
+
406
+ /** \internal Deletes objects constructed with conditional_aligned_new
407
+ * The \a size parameters tells on how many objects to call the destructor of T.
408
+ */
409
+ template<typename T, bool Align> EIGEN_DEVICE_FUNC inline void conditional_aligned_delete(T *ptr, std::size_t size)
410
+ {
411
+ destruct_elements_of_array<T>(ptr, size);
412
+ conditional_aligned_free<Align>(ptr);
413
+ }
414
+
415
+ template<typename T, bool Align> EIGEN_DEVICE_FUNC inline T* conditional_aligned_realloc_new(T* pts, std::size_t new_size, std::size_t old_size)
416
+ {
417
+ check_size_for_overflow<T>(new_size);
418
+ check_size_for_overflow<T>(old_size);
419
+
420
+ // If elements need to be explicitly initialized, we cannot simply realloc
421
+ // (or memcpy) the memory block - each element needs to be reconstructed.
422
+ // Otherwise, objects that contain internal pointers like mpfr or
423
+ // AnnoyingScalar can be pointing to the wrong thing.
424
+ T* result = static_cast<T*>(conditional_aligned_malloc<Align>(sizeof(T)*new_size));
425
+ EIGEN_TRY
426
+ {
427
+ // Move-construct initial elements.
428
+ std::size_t copy_size = (std::min)(old_size, new_size);
429
+ move_construct_elements_of_array(result, pts, copy_size);
430
+
431
+ // Default-construct remaining elements.
432
+ if (new_size > old_size) {
433
+ default_construct_elements_of_array(result + copy_size, new_size - old_size);
434
+ }
435
+
436
+ // Delete old elements.
437
+ conditional_aligned_delete<T, Align>(pts, old_size);
438
+ }
439
+ EIGEN_CATCH(...)
440
+ {
441
+ conditional_aligned_free<Align>(result);
442
+ EIGEN_THROW;
443
+ }
444
+
445
+ return result;
446
+ }
447
+
448
+
449
+ template<typename T, bool Align> EIGEN_DEVICE_FUNC inline T* conditional_aligned_new_auto(std::size_t size)
450
+ {
451
+ if(size==0)
452
+ return 0; // short-cut. Also fixes Bug 884
453
+ check_size_for_overflow<T>(size);
454
+ T *result = static_cast<T*>(conditional_aligned_malloc<Align>(sizeof(T)*size));
455
+ if(NumTraits<T>::RequireInitialization)
456
+ {
457
+ EIGEN_TRY
458
+ {
459
+ default_construct_elements_of_array(result, size);
460
+ }
461
+ EIGEN_CATCH(...)
462
+ {
463
+ conditional_aligned_free<Align>(result);
464
+ EIGEN_THROW;
465
+ }
466
+ }
467
+ return result;
468
+ }
469
+
470
+ template<typename T, bool Align> inline T* conditional_aligned_realloc_new_auto(T* pts, std::size_t new_size, std::size_t old_size)
471
+ {
472
+ if (NumTraits<T>::RequireInitialization) {
473
+ return conditional_aligned_realloc_new<T, Align>(pts, new_size, old_size);
474
+ }
475
+
476
+ check_size_for_overflow<T>(new_size);
477
+ check_size_for_overflow<T>(old_size);
478
+ return static_cast<T*>(conditional_aligned_realloc<Align>(static_cast<void*>(pts), sizeof(T)*new_size, sizeof(T)*old_size));
479
+ }
480
+
481
+ template<typename T, bool Align> EIGEN_DEVICE_FUNC inline void conditional_aligned_delete_auto(T *ptr, std::size_t size)
482
+ {
483
+ if(NumTraits<T>::RequireInitialization)
484
+ destruct_elements_of_array<T>(ptr, size);
485
+ conditional_aligned_free<Align>(ptr);
486
+ }
487
+
488
+ /****************************************************************************/
489
+
490
+ /** \internal Returns the index of the first element of the array that is well aligned with respect to the requested \a Alignment.
491
+ *
492
+ * \tparam Alignment requested alignment in Bytes.
493
+ * \param array the address of the start of the array
494
+ * \param size the size of the array
495
+ *
496
+ * \note If no element of the array is well aligned or the requested alignment is not a multiple of a scalar,
497
+ * the size of the array is returned. For example with SSE, the requested alignment is typically 16-bytes. If
498
+ * packet size for the given scalar type is 1, then everything is considered well-aligned.
499
+ *
500
+ * \note Otherwise, if the Alignment is larger that the scalar size, we rely on the assumptions that sizeof(Scalar) is a
501
+ * power of 2. On the other hand, we do not assume that the array address is a multiple of sizeof(Scalar), as that fails for
502
+ * example with Scalar=double on certain 32-bit platforms, see bug #79.
503
+ *
504
+ * There is also the variant first_aligned(const MatrixBase&) defined in DenseCoeffsBase.h.
505
+ * \sa first_default_aligned()
506
+ */
507
+ template<int Alignment, typename Scalar, typename Index>
508
+ EIGEN_DEVICE_FUNC inline Index first_aligned(const Scalar* array, Index size)
509
+ {
510
+ const Index ScalarSize = sizeof(Scalar);
511
+ const Index AlignmentSize = Alignment / ScalarSize;
512
+ const Index AlignmentMask = AlignmentSize-1;
513
+
514
+ if(AlignmentSize<=1)
515
+ {
516
+ // Either the requested alignment if smaller than a scalar, or it exactly match a 1 scalar
517
+ // so that all elements of the array have the same alignment.
518
+ return 0;
519
+ }
520
+ else if( (UIntPtr(array) & (sizeof(Scalar)-1)) || (Alignment%ScalarSize)!=0)
521
+ {
522
+ // The array is not aligned to the size of a single scalar, or the requested alignment is not a multiple of the scalar size.
523
+ // Consequently, no element of the array is well aligned.
524
+ return size;
525
+ }
526
+ else
527
+ {
528
+ Index first = (AlignmentSize - (Index((UIntPtr(array)/sizeof(Scalar))) & AlignmentMask)) & AlignmentMask;
529
+ return (first < size) ? first : size;
530
+ }
531
+ }
532
+
533
+ /** \internal Returns the index of the first element of the array that is well aligned with respect the largest packet requirement.
534
+ * \sa first_aligned(Scalar*,Index) and first_default_aligned(DenseBase<Derived>) */
535
+ template<typename Scalar, typename Index>
536
+ EIGEN_DEVICE_FUNC inline Index first_default_aligned(const Scalar* array, Index size)
537
+ {
538
+ typedef typename packet_traits<Scalar>::type DefaultPacketType;
539
+ return first_aligned<unpacket_traits<DefaultPacketType>::alignment>(array, size);
540
+ }
541
+
542
+ /** \internal Returns the smallest integer multiple of \a base and greater or equal to \a size
543
+ */
544
+ template<typename Index>
545
+ inline Index first_multiple(Index size, Index base)
546
+ {
547
+ return ((size+base-1)/base)*base;
548
+ }
549
+
550
+ // std::copy is much slower than memcpy, so let's introduce a smart_copy which
551
+ // use memcpy on trivial types, i.e., on types that does not require an initialization ctor.
552
+ template<typename T, bool UseMemcpy> struct smart_copy_helper;
553
+
554
+ template<typename T> EIGEN_DEVICE_FUNC void smart_copy(const T* start, const T* end, T* target)
555
+ {
556
+ smart_copy_helper<T,!NumTraits<T>::RequireInitialization>::run(start, end, target);
557
+ }
558
+
559
+ template<typename T> struct smart_copy_helper<T,true> {
560
+ EIGEN_DEVICE_FUNC static inline void run(const T* start, const T* end, T* target)
561
+ {
562
+ IntPtr size = IntPtr(end)-IntPtr(start);
563
+ if(size==0) return;
564
+ eigen_internal_assert(start!=0 && end!=0 && target!=0);
565
+ EIGEN_USING_STD(memcpy)
566
+ memcpy(target, start, size);
567
+ }
568
+ };
569
+
570
+ template<typename T> struct smart_copy_helper<T,false> {
571
+ EIGEN_DEVICE_FUNC static inline void run(const T* start, const T* end, T* target)
572
+ { std::copy(start, end, target); }
573
+ };
574
+
575
+ // intelligent memmove. falls back to std::memmove for POD types, uses std::copy otherwise.
576
+ template<typename T, bool UseMemmove> struct smart_memmove_helper;
577
+
578
+ template<typename T> void smart_memmove(const T* start, const T* end, T* target)
579
+ {
580
+ smart_memmove_helper<T,!NumTraits<T>::RequireInitialization>::run(start, end, target);
581
+ }
582
+
583
+ template<typename T> struct smart_memmove_helper<T,true> {
584
+ static inline void run(const T* start, const T* end, T* target)
585
+ {
586
+ IntPtr size = IntPtr(end)-IntPtr(start);
587
+ if(size==0) return;
588
+ eigen_internal_assert(start!=0 && end!=0 && target!=0);
589
+ std::memmove(target, start, size);
590
+ }
591
+ };
592
+
593
+ template<typename T> struct smart_memmove_helper<T,false> {
594
+ static inline void run(const T* start, const T* end, T* target)
595
+ {
596
+ if (UIntPtr(target) < UIntPtr(start))
597
+ {
598
+ std::copy(start, end, target);
599
+ }
600
+ else
601
+ {
602
+ std::ptrdiff_t count = (std::ptrdiff_t(end)-std::ptrdiff_t(start)) / sizeof(T);
603
+ std::copy_backward(start, end, target + count);
604
+ }
605
+ }
606
+ };
607
+
608
+ #if EIGEN_HAS_RVALUE_REFERENCES
609
+ template<typename T> EIGEN_DEVICE_FUNC T* smart_move(T* start, T* end, T* target)
610
+ {
611
+ return std::move(start, end, target);
612
+ }
613
+ #else
614
+ template<typename T> EIGEN_DEVICE_FUNC T* smart_move(T* start, T* end, T* target)
615
+ {
616
+ return std::copy(start, end, target);
617
+ }
618
+ #endif
619
+
620
+ /*****************************************************************************
621
+ *** Implementation of runtime stack allocation (falling back to malloc) ***
622
+ *****************************************************************************/
623
+
624
+ // you can overwrite Eigen's default behavior regarding alloca by defining EIGEN_ALLOCA
625
+ // to the appropriate stack allocation function
626
+ #if ! defined EIGEN_ALLOCA && ! defined EIGEN_GPU_COMPILE_PHASE
627
+ #if EIGEN_OS_LINUX || EIGEN_OS_MAC || (defined alloca)
628
+ #define EIGEN_ALLOCA alloca
629
+ #elif EIGEN_COMP_MSVC
630
+ #define EIGEN_ALLOCA _alloca
631
+ #endif
632
+ #endif
633
+
634
+ // With clang -Oz -mthumb, alloca changes the stack pointer in a way that is
635
+ // not allowed in Thumb2. -DEIGEN_STACK_ALLOCATION_LIMIT=0 doesn't work because
636
+ // the compiler still emits bad code because stack allocation checks use "<=".
637
+ // TODO: Eliminate after https://bugs.llvm.org/show_bug.cgi?id=23772
638
+ // is fixed.
639
+ #if defined(__clang__) && defined(__thumb__)
640
+ #undef EIGEN_ALLOCA
641
+ #endif
642
+
643
+ // This helper class construct the allocated memory, and takes care of destructing and freeing the handled data
644
+ // at destruction time. In practice this helper class is mainly useful to avoid memory leak in case of exceptions.
645
+ template<typename T> class aligned_stack_memory_handler : noncopyable
646
+ {
647
+ public:
648
+ /* Creates a stack_memory_handler responsible for the buffer \a ptr of size \a size.
649
+ * Note that \a ptr can be 0 regardless of the other parameters.
650
+ * This constructor takes care of constructing/initializing the elements of the buffer if required by the scalar type T (see NumTraits<T>::RequireInitialization).
651
+ * In this case, the buffer elements will also be destructed when this handler will be destructed.
652
+ * Finally, if \a dealloc is true, then the pointer \a ptr is freed.
653
+ **/
654
+ EIGEN_DEVICE_FUNC
655
+ aligned_stack_memory_handler(T* ptr, std::size_t size, bool dealloc)
656
+ : m_ptr(ptr), m_size(size), m_deallocate(dealloc)
657
+ {
658
+ if(NumTraits<T>::RequireInitialization && m_ptr)
659
+ Eigen::internal::default_construct_elements_of_array(m_ptr, size);
660
+ }
661
+ EIGEN_DEVICE_FUNC
662
+ ~aligned_stack_memory_handler()
663
+ {
664
+ if(NumTraits<T>::RequireInitialization && m_ptr)
665
+ Eigen::internal::destruct_elements_of_array<T>(m_ptr, m_size);
666
+ if(m_deallocate)
667
+ Eigen::internal::aligned_free(m_ptr);
668
+ }
669
+ protected:
670
+ T* m_ptr;
671
+ std::size_t m_size;
672
+ bool m_deallocate;
673
+ };
674
+
675
+ #ifdef EIGEN_ALLOCA
676
+
677
+ template<typename Xpr, int NbEvaluations,
678
+ bool MapExternalBuffer = nested_eval<Xpr,NbEvaluations>::Evaluate && Xpr::MaxSizeAtCompileTime==Dynamic
679
+ >
680
+ struct local_nested_eval_wrapper
681
+ {
682
+ static const bool NeedExternalBuffer = false;
683
+ typedef typename Xpr::Scalar Scalar;
684
+ typedef typename nested_eval<Xpr,NbEvaluations>::type ObjectType;
685
+ ObjectType object;
686
+
687
+ EIGEN_DEVICE_FUNC
688
+ local_nested_eval_wrapper(const Xpr& xpr, Scalar* ptr) : object(xpr)
689
+ {
690
+ EIGEN_UNUSED_VARIABLE(ptr);
691
+ eigen_internal_assert(ptr==0);
692
+ }
693
+ };
694
+
695
+ template<typename Xpr, int NbEvaluations>
696
+ struct local_nested_eval_wrapper<Xpr,NbEvaluations,true>
697
+ {
698
+ static const bool NeedExternalBuffer = true;
699
+ typedef typename Xpr::Scalar Scalar;
700
+ typedef typename plain_object_eval<Xpr>::type PlainObject;
701
+ typedef Map<PlainObject,EIGEN_DEFAULT_ALIGN_BYTES> ObjectType;
702
+ ObjectType object;
703
+
704
+ EIGEN_DEVICE_FUNC
705
+ local_nested_eval_wrapper(const Xpr& xpr, Scalar* ptr)
706
+ : object(ptr==0 ? reinterpret_cast<Scalar*>(Eigen::internal::aligned_malloc(sizeof(Scalar)*xpr.size())) : ptr, xpr.rows(), xpr.cols()),
707
+ m_deallocate(ptr==0)
708
+ {
709
+ if(NumTraits<Scalar>::RequireInitialization && object.data())
710
+ Eigen::internal::default_construct_elements_of_array(object.data(), object.size());
711
+ object = xpr;
712
+ }
713
+
714
+ EIGEN_DEVICE_FUNC
715
+ ~local_nested_eval_wrapper()
716
+ {
717
+ if(NumTraits<Scalar>::RequireInitialization && object.data())
718
+ Eigen::internal::destruct_elements_of_array(object.data(), object.size());
719
+ if(m_deallocate)
720
+ Eigen::internal::aligned_free(object.data());
721
+ }
722
+
723
+ private:
724
+ bool m_deallocate;
725
+ };
726
+
727
+ #endif // EIGEN_ALLOCA
728
+
729
+ template<typename T> class scoped_array : noncopyable
730
+ {
731
+ T* m_ptr;
732
+ public:
733
+ explicit scoped_array(std::ptrdiff_t size)
734
+ {
735
+ m_ptr = new T[size];
736
+ }
737
+ ~scoped_array()
738
+ {
739
+ delete[] m_ptr;
740
+ }
741
+ T& operator[](std::ptrdiff_t i) { return m_ptr[i]; }
742
+ const T& operator[](std::ptrdiff_t i) const { return m_ptr[i]; }
743
+ T* &ptr() { return m_ptr; }
744
+ const T* ptr() const { return m_ptr; }
745
+ operator const T*() const { return m_ptr; }
746
+ };
747
+
748
+ template<typename T> void swap(scoped_array<T> &a,scoped_array<T> &b)
749
+ {
750
+ std::swap(a.ptr(),b.ptr());
751
+ }
752
+
753
+ } // end namespace internal
754
+
755
+ /** \internal
756
+ *
757
+ * The macro ei_declare_aligned_stack_constructed_variable(TYPE,NAME,SIZE,BUFFER) declares, allocates,
758
+ * and construct an aligned buffer named NAME of SIZE elements of type TYPE on the stack
759
+ * if the size in bytes is smaller than EIGEN_STACK_ALLOCATION_LIMIT, and if stack allocation is supported by the platform
760
+ * (currently, this is Linux, OSX and Visual Studio only). Otherwise the memory is allocated on the heap.
761
+ * The allocated buffer is automatically deleted when exiting the scope of this declaration.
762
+ * If BUFFER is non null, then the declared variable is simply an alias for BUFFER, and no allocation/deletion occurs.
763
+ * Here is an example:
764
+ * \code
765
+ * {
766
+ * ei_declare_aligned_stack_constructed_variable(float,data,size,0);
767
+ * // use data[0] to data[size-1]
768
+ * }
769
+ * \endcode
770
+ * The underlying stack allocation function can controlled with the EIGEN_ALLOCA preprocessor token.
771
+ *
772
+ * The macro ei_declare_local_nested_eval(XPR_T,XPR,N,NAME) is analogue to
773
+ * \code
774
+ * typename internal::nested_eval<XPRT_T,N>::type NAME(XPR);
775
+ * \endcode
776
+ * with the advantage of using aligned stack allocation even if the maximal size of XPR at compile time is unknown.
777
+ * This is accomplished through alloca if this later is supported and if the required number of bytes
778
+ * is below EIGEN_STACK_ALLOCATION_LIMIT.
779
+ */
780
+ #ifdef EIGEN_ALLOCA
781
+
782
+ #if EIGEN_DEFAULT_ALIGN_BYTES>0
783
+ // We always manually re-align the result of EIGEN_ALLOCA.
784
+ // If alloca is already aligned, the compiler should be smart enough to optimize away the re-alignment.
785
+ #define EIGEN_ALIGNED_ALLOCA(SIZE) reinterpret_cast<void*>((internal::UIntPtr(EIGEN_ALLOCA(SIZE+EIGEN_DEFAULT_ALIGN_BYTES-1)) + EIGEN_DEFAULT_ALIGN_BYTES-1) & ~(std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1)))
786
+ #else
787
+ #define EIGEN_ALIGNED_ALLOCA(SIZE) EIGEN_ALLOCA(SIZE)
788
+ #endif
789
+
790
+ #define ei_declare_aligned_stack_constructed_variable(TYPE,NAME,SIZE,BUFFER) \
791
+ Eigen::internal::check_size_for_overflow<TYPE>(SIZE); \
792
+ TYPE* NAME = (BUFFER)!=0 ? (BUFFER) \
793
+ : reinterpret_cast<TYPE*>( \
794
+ (sizeof(TYPE)*SIZE<=EIGEN_STACK_ALLOCATION_LIMIT) ? EIGEN_ALIGNED_ALLOCA(sizeof(TYPE)*SIZE) \
795
+ : Eigen::internal::aligned_malloc(sizeof(TYPE)*SIZE) ); \
796
+ Eigen::internal::aligned_stack_memory_handler<TYPE> EIGEN_CAT(NAME,_stack_memory_destructor)((BUFFER)==0 ? NAME : 0,SIZE,sizeof(TYPE)*SIZE>EIGEN_STACK_ALLOCATION_LIMIT)
797
+
798
+
799
+ #define ei_declare_local_nested_eval(XPR_T,XPR,N,NAME) \
800
+ Eigen::internal::local_nested_eval_wrapper<XPR_T,N> EIGEN_CAT(NAME,_wrapper)(XPR, reinterpret_cast<typename XPR_T::Scalar*>( \
801
+ ( (Eigen::internal::local_nested_eval_wrapper<XPR_T,N>::NeedExternalBuffer) && ((sizeof(typename XPR_T::Scalar)*XPR.size())<=EIGEN_STACK_ALLOCATION_LIMIT) ) \
802
+ ? EIGEN_ALIGNED_ALLOCA( sizeof(typename XPR_T::Scalar)*XPR.size() ) : 0 ) ) ; \
803
+ typename Eigen::internal::local_nested_eval_wrapper<XPR_T,N>::ObjectType NAME(EIGEN_CAT(NAME,_wrapper).object)
804
+
805
+ #else
806
+
807
+ #define ei_declare_aligned_stack_constructed_variable(TYPE,NAME,SIZE,BUFFER) \
808
+ Eigen::internal::check_size_for_overflow<TYPE>(SIZE); \
809
+ TYPE* NAME = (BUFFER)!=0 ? BUFFER : reinterpret_cast<TYPE*>(Eigen::internal::aligned_malloc(sizeof(TYPE)*SIZE)); \
810
+ Eigen::internal::aligned_stack_memory_handler<TYPE> EIGEN_CAT(NAME,_stack_memory_destructor)((BUFFER)==0 ? NAME : 0,SIZE,true)
811
+
812
+
813
+ #define ei_declare_local_nested_eval(XPR_T,XPR,N,NAME) typename Eigen::internal::nested_eval<XPR_T,N>::type NAME(XPR)
814
+
815
+ #endif
816
+
817
+
818
+ /*****************************************************************************
819
+ *** Implementation of EIGEN_MAKE_ALIGNED_OPERATOR_NEW [_IF] ***
820
+ *****************************************************************************/
821
+
822
+ #if EIGEN_HAS_CXX17_OVERALIGN
823
+
824
+ // C++17 -> no need to bother about alignment anymore :)
825
+
826
+ #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_NOTHROW(NeedsToAlign)
827
+ #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
828
+ #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW
829
+ #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar,Size)
830
+
831
+ #else
832
+
833
+ // HIP does not support new/delete on device.
834
+ #if EIGEN_MAX_ALIGN_BYTES!=0 && !defined(EIGEN_HIP_DEVICE_COMPILE)
835
+ #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_NOTHROW(NeedsToAlign) \
836
+ EIGEN_DEVICE_FUNC \
837
+ void* operator new(std::size_t size, const std::nothrow_t&) EIGEN_NO_THROW { \
838
+ EIGEN_TRY { return Eigen::internal::conditional_aligned_malloc<NeedsToAlign>(size); } \
839
+ EIGEN_CATCH (...) { return 0; } \
840
+ }
841
+ #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \
842
+ EIGEN_DEVICE_FUNC \
843
+ void *operator new(std::size_t size) { \
844
+ return Eigen::internal::conditional_aligned_malloc<NeedsToAlign>(size); \
845
+ } \
846
+ EIGEN_DEVICE_FUNC \
847
+ void *operator new[](std::size_t size) { \
848
+ return Eigen::internal::conditional_aligned_malloc<NeedsToAlign>(size); \
849
+ } \
850
+ EIGEN_DEVICE_FUNC \
851
+ void operator delete(void * ptr) EIGEN_NO_THROW { Eigen::internal::conditional_aligned_free<NeedsToAlign>(ptr); } \
852
+ EIGEN_DEVICE_FUNC \
853
+ void operator delete[](void * ptr) EIGEN_NO_THROW { Eigen::internal::conditional_aligned_free<NeedsToAlign>(ptr); } \
854
+ EIGEN_DEVICE_FUNC \
855
+ void operator delete(void * ptr, std::size_t /* sz */) EIGEN_NO_THROW { Eigen::internal::conditional_aligned_free<NeedsToAlign>(ptr); } \
856
+ EIGEN_DEVICE_FUNC \
857
+ void operator delete[](void * ptr, std::size_t /* sz */) EIGEN_NO_THROW { Eigen::internal::conditional_aligned_free<NeedsToAlign>(ptr); } \
858
+ /* in-place new and delete. since (at least afaik) there is no actual */ \
859
+ /* memory allocated we can safely let the default implementation handle */ \
860
+ /* this particular case. */ \
861
+ EIGEN_DEVICE_FUNC \
862
+ static void *operator new(std::size_t size, void *ptr) { return ::operator new(size,ptr); } \
863
+ EIGEN_DEVICE_FUNC \
864
+ static void *operator new[](std::size_t size, void* ptr) { return ::operator new[](size,ptr); } \
865
+ EIGEN_DEVICE_FUNC \
866
+ void operator delete(void * memory, void *ptr) EIGEN_NO_THROW { return ::operator delete(memory,ptr); } \
867
+ EIGEN_DEVICE_FUNC \
868
+ void operator delete[](void * memory, void *ptr) EIGEN_NO_THROW { return ::operator delete[](memory,ptr); } \
869
+ /* nothrow-new (returns zero instead of std::bad_alloc) */ \
870
+ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_NOTHROW(NeedsToAlign) \
871
+ EIGEN_DEVICE_FUNC \
872
+ void operator delete(void *ptr, const std::nothrow_t&) EIGEN_NO_THROW { \
873
+ Eigen::internal::conditional_aligned_free<NeedsToAlign>(ptr); \
874
+ } \
875
+ typedef void eigen_aligned_operator_new_marker_type;
876
+ #else
877
+ #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
878
+ #endif
879
+
880
+ #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(true)
881
+ #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar,Size) \
882
+ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(bool( \
883
+ ((Size)!=Eigen::Dynamic) && \
884
+ (((EIGEN_MAX_ALIGN_BYTES>=16) && ((sizeof(Scalar)*(Size))%(EIGEN_MAX_ALIGN_BYTES )==0)) || \
885
+ ((EIGEN_MAX_ALIGN_BYTES>=32) && ((sizeof(Scalar)*(Size))%(EIGEN_MAX_ALIGN_BYTES/2)==0)) || \
886
+ ((EIGEN_MAX_ALIGN_BYTES>=64) && ((sizeof(Scalar)*(Size))%(EIGEN_MAX_ALIGN_BYTES/4)==0)) )))
887
+
888
+ #endif
889
+
890
+ /****************************************************************************/
891
+
892
+ /** \class aligned_allocator
893
+ * \ingroup Core_Module
894
+ *
895
+ * \brief STL compatible allocator to use with types requiring a non standrad alignment.
896
+ *
897
+ * The memory is aligned as for dynamically aligned matrix/array types such as MatrixXd.
898
+ * By default, it will thus provide at least 16 bytes alignment and more in following cases:
899
+ * - 32 bytes alignment if AVX is enabled.
900
+ * - 64 bytes alignment if AVX512 is enabled.
901
+ *
902
+ * This can be controlled using the \c EIGEN_MAX_ALIGN_BYTES macro as documented
903
+ * \link TopicPreprocessorDirectivesPerformance there \endlink.
904
+ *
905
+ * Example:
906
+ * \code
907
+ * // Matrix4f requires 16 bytes alignment:
908
+ * std::map< int, Matrix4f, std::less<int>,
909
+ * aligned_allocator<std::pair<const int, Matrix4f> > > my_map_mat4;
910
+ * // Vector3f does not require 16 bytes alignment, no need to use Eigen's allocator:
911
+ * std::map< int, Vector3f > my_map_vec3;
912
+ * \endcode
913
+ *
914
+ * \sa \blank \ref TopicStlContainers.
915
+ */
916
+ template<class T>
917
+ class aligned_allocator : public std::allocator<T>
918
+ {
919
+ public:
920
+ typedef std::size_t size_type;
921
+ typedef std::ptrdiff_t difference_type;
922
+ typedef T* pointer;
923
+ typedef const T* const_pointer;
924
+ typedef T& reference;
925
+ typedef const T& const_reference;
926
+ typedef T value_type;
927
+
928
+ template<class U>
929
+ struct rebind
930
+ {
931
+ typedef aligned_allocator<U> other;
932
+ };
933
+
934
+ aligned_allocator() : std::allocator<T>() {}
935
+
936
+ aligned_allocator(const aligned_allocator& other) : std::allocator<T>(other) {}
937
+
938
+ template<class U>
939
+ aligned_allocator(const aligned_allocator<U>& other) : std::allocator<T>(other) {}
940
+
941
+ ~aligned_allocator() {}
942
+
943
+ #if EIGEN_COMP_GNUC_STRICT && EIGEN_GNUC_AT_LEAST(7,0)
944
+ // In gcc std::allocator::max_size() is bugged making gcc triggers a warning:
945
+ // eigen/Eigen/src/Core/util/Memory.h:189:12: warning: argument 1 value '18446744073709551612' exceeds maximum object size 9223372036854775807
946
+ // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87544
947
+ size_type max_size() const {
948
+ return (std::numeric_limits<std::ptrdiff_t>::max)()/sizeof(T);
949
+ }
950
+ #endif
951
+
952
+ pointer allocate(size_type num, const void* /*hint*/ = 0)
953
+ {
954
+ internal::check_size_for_overflow<T>(num);
955
+ return static_cast<pointer>( internal::aligned_malloc(num * sizeof(T)) );
956
+ }
957
+
958
+ void deallocate(pointer p, size_type /*num*/)
959
+ {
960
+ internal::aligned_free(p);
961
+ }
962
+ };
963
+
964
+ //---------- Cache sizes ----------
965
+
966
+ #if !defined(EIGEN_NO_CPUID)
967
+ # if EIGEN_COMP_GNUC && EIGEN_ARCH_i386_OR_x86_64
968
+ # if defined(__PIC__) && EIGEN_ARCH_i386
969
+ // Case for x86 with PIC
970
+ # define EIGEN_CPUID(abcd,func,id) \
971
+ __asm__ __volatile__ ("xchgl %%ebx, %k1;cpuid; xchgl %%ebx,%k1": "=a" (abcd[0]), "=&r" (abcd[1]), "=c" (abcd[2]), "=d" (abcd[3]) : "a" (func), "c" (id));
972
+ # elif defined(__PIC__) && EIGEN_ARCH_x86_64
973
+ // Case for x64 with PIC. In theory this is only a problem with recent gcc and with medium or large code model, not with the default small code model.
974
+ // However, we cannot detect which code model is used, and the xchg overhead is negligible anyway.
975
+ # define EIGEN_CPUID(abcd,func,id) \
976
+ __asm__ __volatile__ ("xchg{q}\t{%%}rbx, %q1; cpuid; xchg{q}\t{%%}rbx, %q1": "=a" (abcd[0]), "=&r" (abcd[1]), "=c" (abcd[2]), "=d" (abcd[3]) : "0" (func), "2" (id));
977
+ # else
978
+ // Case for x86_64 or x86 w/o PIC
979
+ # define EIGEN_CPUID(abcd,func,id) \
980
+ __asm__ __volatile__ ("cpuid": "=a" (abcd[0]), "=b" (abcd[1]), "=c" (abcd[2]), "=d" (abcd[3]) : "0" (func), "2" (id) );
981
+ # endif
982
+ # elif EIGEN_COMP_MSVC
983
+ # if (EIGEN_COMP_MSVC > 1500) && EIGEN_ARCH_i386_OR_x86_64
984
+ # define EIGEN_CPUID(abcd,func,id) __cpuidex((int*)abcd,func,id)
985
+ # endif
986
+ # endif
987
+ #endif
988
+
989
+ namespace internal {
990
+
991
+ #ifdef EIGEN_CPUID
992
+
993
+ inline bool cpuid_is_vendor(int abcd[4], const int vendor[3])
994
+ {
995
+ return abcd[1]==vendor[0] && abcd[3]==vendor[1] && abcd[2]==vendor[2];
996
+ }
997
+
998
+ inline void queryCacheSizes_intel_direct(int& l1, int& l2, int& l3)
999
+ {
1000
+ int abcd[4];
1001
+ l1 = l2 = l3 = 0;
1002
+ int cache_id = 0;
1003
+ int cache_type = 0;
1004
+ do {
1005
+ abcd[0] = abcd[1] = abcd[2] = abcd[3] = 0;
1006
+ EIGEN_CPUID(abcd,0x4,cache_id);
1007
+ cache_type = (abcd[0] & 0x0F) >> 0;
1008
+ if(cache_type==1||cache_type==3) // data or unified cache
1009
+ {
1010
+ int cache_level = (abcd[0] & 0xE0) >> 5; // A[7:5]
1011
+ int ways = (abcd[1] & 0xFFC00000) >> 22; // B[31:22]
1012
+ int partitions = (abcd[1] & 0x003FF000) >> 12; // B[21:12]
1013
+ int line_size = (abcd[1] & 0x00000FFF) >> 0; // B[11:0]
1014
+ int sets = (abcd[2]); // C[31:0]
1015
+
1016
+ int cache_size = (ways+1) * (partitions+1) * (line_size+1) * (sets+1);
1017
+
1018
+ switch(cache_level)
1019
+ {
1020
+ case 1: l1 = cache_size; break;
1021
+ case 2: l2 = cache_size; break;
1022
+ case 3: l3 = cache_size; break;
1023
+ default: break;
1024
+ }
1025
+ }
1026
+ cache_id++;
1027
+ } while(cache_type>0 && cache_id<16);
1028
+ }
1029
+
1030
+ inline void queryCacheSizes_intel_codes(int& l1, int& l2, int& l3)
1031
+ {
1032
+ int abcd[4];
1033
+ abcd[0] = abcd[1] = abcd[2] = abcd[3] = 0;
1034
+ l1 = l2 = l3 = 0;
1035
+ EIGEN_CPUID(abcd,0x00000002,0);
1036
+ unsigned char * bytes = reinterpret_cast<unsigned char *>(abcd)+2;
1037
+ bool check_for_p2_core2 = false;
1038
+ for(int i=0; i<14; ++i)
1039
+ {
1040
+ switch(bytes[i])
1041
+ {
1042
+ case 0x0A: l1 = 8; break; // 0Ah data L1 cache, 8 KB, 2 ways, 32 byte lines
1043
+ case 0x0C: l1 = 16; break; // 0Ch data L1 cache, 16 KB, 4 ways, 32 byte lines
1044
+ case 0x0E: l1 = 24; break; // 0Eh data L1 cache, 24 KB, 6 ways, 64 byte lines
1045
+ case 0x10: l1 = 16; break; // 10h data L1 cache, 16 KB, 4 ways, 32 byte lines (IA-64)
1046
+ case 0x15: l1 = 16; break; // 15h code L1 cache, 16 KB, 4 ways, 32 byte lines (IA-64)
1047
+ case 0x2C: l1 = 32; break; // 2Ch data L1 cache, 32 KB, 8 ways, 64 byte lines
1048
+ case 0x30: l1 = 32; break; // 30h code L1 cache, 32 KB, 8 ways, 64 byte lines
1049
+ case 0x60: l1 = 16; break; // 60h data L1 cache, 16 KB, 8 ways, 64 byte lines, sectored
1050
+ case 0x66: l1 = 8; break; // 66h data L1 cache, 8 KB, 4 ways, 64 byte lines, sectored
1051
+ case 0x67: l1 = 16; break; // 67h data L1 cache, 16 KB, 4 ways, 64 byte lines, sectored
1052
+ case 0x68: l1 = 32; break; // 68h data L1 cache, 32 KB, 4 ways, 64 byte lines, sectored
1053
+ case 0x1A: l2 = 96; break; // code and data L2 cache, 96 KB, 6 ways, 64 byte lines (IA-64)
1054
+ case 0x22: l3 = 512; break; // code and data L3 cache, 512 KB, 4 ways (!), 64 byte lines, dual-sectored
1055
+ case 0x23: l3 = 1024; break; // code and data L3 cache, 1024 KB, 8 ways, 64 byte lines, dual-sectored
1056
+ case 0x25: l3 = 2048; break; // code and data L3 cache, 2048 KB, 8 ways, 64 byte lines, dual-sectored
1057
+ case 0x29: l3 = 4096; break; // code and data L3 cache, 4096 KB, 8 ways, 64 byte lines, dual-sectored
1058
+ case 0x39: l2 = 128; break; // code and data L2 cache, 128 KB, 4 ways, 64 byte lines, sectored
1059
+ case 0x3A: l2 = 192; break; // code and data L2 cache, 192 KB, 6 ways, 64 byte lines, sectored
1060
+ case 0x3B: l2 = 128; break; // code and data L2 cache, 128 KB, 2 ways, 64 byte lines, sectored
1061
+ case 0x3C: l2 = 256; break; // code and data L2 cache, 256 KB, 4 ways, 64 byte lines, sectored
1062
+ case 0x3D: l2 = 384; break; // code and data L2 cache, 384 KB, 6 ways, 64 byte lines, sectored
1063
+ case 0x3E: l2 = 512; break; // code and data L2 cache, 512 KB, 4 ways, 64 byte lines, sectored
1064
+ case 0x40: l2 = 0; break; // no integrated L2 cache (P6 core) or L3 cache (P4 core)
1065
+ case 0x41: l2 = 128; break; // code and data L2 cache, 128 KB, 4 ways, 32 byte lines
1066
+ case 0x42: l2 = 256; break; // code and data L2 cache, 256 KB, 4 ways, 32 byte lines
1067
+ case 0x43: l2 = 512; break; // code and data L2 cache, 512 KB, 4 ways, 32 byte lines
1068
+ case 0x44: l2 = 1024; break; // code and data L2 cache, 1024 KB, 4 ways, 32 byte lines
1069
+ case 0x45: l2 = 2048; break; // code and data L2 cache, 2048 KB, 4 ways, 32 byte lines
1070
+ case 0x46: l3 = 4096; break; // code and data L3 cache, 4096 KB, 4 ways, 64 byte lines
1071
+ case 0x47: l3 = 8192; break; // code and data L3 cache, 8192 KB, 8 ways, 64 byte lines
1072
+ case 0x48: l2 = 3072; break; // code and data L2 cache, 3072 KB, 12 ways, 64 byte lines
1073
+ case 0x49: if(l2!=0) l3 = 4096; else {check_for_p2_core2=true; l3 = l2 = 4096;} break;// code and data L3 cache, 4096 KB, 16 ways, 64 byte lines (P4) or L2 for core2
1074
+ case 0x4A: l3 = 6144; break; // code and data L3 cache, 6144 KB, 12 ways, 64 byte lines
1075
+ case 0x4B: l3 = 8192; break; // code and data L3 cache, 8192 KB, 16 ways, 64 byte lines
1076
+ case 0x4C: l3 = 12288; break; // code and data L3 cache, 12288 KB, 12 ways, 64 byte lines
1077
+ case 0x4D: l3 = 16384; break; // code and data L3 cache, 16384 KB, 16 ways, 64 byte lines
1078
+ case 0x4E: l2 = 6144; break; // code and data L2 cache, 6144 KB, 24 ways, 64 byte lines
1079
+ case 0x78: l2 = 1024; break; // code and data L2 cache, 1024 KB, 4 ways, 64 byte lines
1080
+ case 0x79: l2 = 128; break; // code and data L2 cache, 128 KB, 8 ways, 64 byte lines, dual-sectored
1081
+ case 0x7A: l2 = 256; break; // code and data L2 cache, 256 KB, 8 ways, 64 byte lines, dual-sectored
1082
+ case 0x7B: l2 = 512; break; // code and data L2 cache, 512 KB, 8 ways, 64 byte lines, dual-sectored
1083
+ case 0x7C: l2 = 1024; break; // code and data L2 cache, 1024 KB, 8 ways, 64 byte lines, dual-sectored
1084
+ case 0x7D: l2 = 2048; break; // code and data L2 cache, 2048 KB, 8 ways, 64 byte lines
1085
+ case 0x7E: l2 = 256; break; // code and data L2 cache, 256 KB, 8 ways, 128 byte lines, sect. (IA-64)
1086
+ case 0x7F: l2 = 512; break; // code and data L2 cache, 512 KB, 2 ways, 64 byte lines
1087
+ case 0x80: l2 = 512; break; // code and data L2 cache, 512 KB, 8 ways, 64 byte lines
1088
+ case 0x81: l2 = 128; break; // code and data L2 cache, 128 KB, 8 ways, 32 byte lines
1089
+ case 0x82: l2 = 256; break; // code and data L2 cache, 256 KB, 8 ways, 32 byte lines
1090
+ case 0x83: l2 = 512; break; // code and data L2 cache, 512 KB, 8 ways, 32 byte lines
1091
+ case 0x84: l2 = 1024; break; // code and data L2 cache, 1024 KB, 8 ways, 32 byte lines
1092
+ case 0x85: l2 = 2048; break; // code and data L2 cache, 2048 KB, 8 ways, 32 byte lines
1093
+ case 0x86: l2 = 512; break; // code and data L2 cache, 512 KB, 4 ways, 64 byte lines
1094
+ case 0x87: l2 = 1024; break; // code and data L2 cache, 1024 KB, 8 ways, 64 byte lines
1095
+ case 0x88: l3 = 2048; break; // code and data L3 cache, 2048 KB, 4 ways, 64 byte lines (IA-64)
1096
+ case 0x89: l3 = 4096; break; // code and data L3 cache, 4096 KB, 4 ways, 64 byte lines (IA-64)
1097
+ case 0x8A: l3 = 8192; break; // code and data L3 cache, 8192 KB, 4 ways, 64 byte lines (IA-64)
1098
+ case 0x8D: l3 = 3072; break; // code and data L3 cache, 3072 KB, 12 ways, 128 byte lines (IA-64)
1099
+
1100
+ default: break;
1101
+ }
1102
+ }
1103
+ if(check_for_p2_core2 && l2 == l3)
1104
+ l3 = 0;
1105
+ l1 *= 1024;
1106
+ l2 *= 1024;
1107
+ l3 *= 1024;
1108
+ }
1109
+
1110
+ inline void queryCacheSizes_intel(int& l1, int& l2, int& l3, int max_std_funcs)
1111
+ {
1112
+ if(max_std_funcs>=4)
1113
+ queryCacheSizes_intel_direct(l1,l2,l3);
1114
+ else if(max_std_funcs>=2)
1115
+ queryCacheSizes_intel_codes(l1,l2,l3);
1116
+ else
1117
+ l1 = l2 = l3 = 0;
1118
+ }
1119
+
1120
+ inline void queryCacheSizes_amd(int& l1, int& l2, int& l3)
1121
+ {
1122
+ int abcd[4];
1123
+ abcd[0] = abcd[1] = abcd[2] = abcd[3] = 0;
1124
+
1125
+ // First query the max supported function.
1126
+ EIGEN_CPUID(abcd,0x80000000,0);
1127
+ if(static_cast<numext::uint32_t>(abcd[0]) >= static_cast<numext::uint32_t>(0x80000006))
1128
+ {
1129
+ EIGEN_CPUID(abcd,0x80000005,0);
1130
+ l1 = (abcd[2] >> 24) * 1024; // C[31:24] = L1 size in KB
1131
+ abcd[0] = abcd[1] = abcd[2] = abcd[3] = 0;
1132
+ EIGEN_CPUID(abcd,0x80000006,0);
1133
+ l2 = (abcd[2] >> 16) * 1024; // C[31;16] = l2 cache size in KB
1134
+ l3 = ((abcd[3] & 0xFFFC000) >> 18) * 512 * 1024; // D[31;18] = l3 cache size in 512KB
1135
+ }
1136
+ else
1137
+ {
1138
+ l1 = l2 = l3 = 0;
1139
+ }
1140
+ }
1141
+ #endif
1142
+
1143
+ /** \internal
1144
+ * Queries and returns the cache sizes in Bytes of the L1, L2, and L3 data caches respectively */
1145
+ inline void queryCacheSizes(int& l1, int& l2, int& l3)
1146
+ {
1147
+ #ifdef EIGEN_CPUID
1148
+ int abcd[4];
1149
+ const int GenuineIntel[] = {0x756e6547, 0x49656e69, 0x6c65746e};
1150
+ const int AuthenticAMD[] = {0x68747541, 0x69746e65, 0x444d4163};
1151
+ const int AMDisbetter_[] = {0x69444d41, 0x74656273, 0x21726574}; // "AMDisbetter!"
1152
+
1153
+ // identify the CPU vendor
1154
+ EIGEN_CPUID(abcd,0x0,0);
1155
+ int max_std_funcs = abcd[0];
1156
+ if(cpuid_is_vendor(abcd,GenuineIntel))
1157
+ queryCacheSizes_intel(l1,l2,l3,max_std_funcs);
1158
+ else if(cpuid_is_vendor(abcd,AuthenticAMD) || cpuid_is_vendor(abcd,AMDisbetter_))
1159
+ queryCacheSizes_amd(l1,l2,l3);
1160
+ else
1161
+ // by default let's use Intel's API
1162
+ queryCacheSizes_intel(l1,l2,l3,max_std_funcs);
1163
+
1164
+ // here is the list of other vendors:
1165
+ // ||cpuid_is_vendor(abcd,"VIA VIA VIA ")
1166
+ // ||cpuid_is_vendor(abcd,"CyrixInstead")
1167
+ // ||cpuid_is_vendor(abcd,"CentaurHauls")
1168
+ // ||cpuid_is_vendor(abcd,"GenuineTMx86")
1169
+ // ||cpuid_is_vendor(abcd,"TransmetaCPU")
1170
+ // ||cpuid_is_vendor(abcd,"RiseRiseRise")
1171
+ // ||cpuid_is_vendor(abcd,"Geode by NSC")
1172
+ // ||cpuid_is_vendor(abcd,"SiS SiS SiS ")
1173
+ // ||cpuid_is_vendor(abcd,"UMC UMC UMC ")
1174
+ // ||cpuid_is_vendor(abcd,"NexGenDriven")
1175
+ #else
1176
+ l1 = l2 = l3 = -1;
1177
+ #endif
1178
+ }
1179
+
1180
+ /** \internal
1181
+ * \returns the size in Bytes of the L1 data cache */
1182
+ inline int queryL1CacheSize()
1183
+ {
1184
+ int l1(-1), l2, l3;
1185
+ queryCacheSizes(l1,l2,l3);
1186
+ return l1;
1187
+ }
1188
+
1189
+ /** \internal
1190
+ * \returns the size in Bytes of the L2 or L3 cache if this later is present */
1191
+ inline int queryTopLevelCacheSize()
1192
+ {
1193
+ int l1, l2(-1), l3(-1);
1194
+ queryCacheSizes(l1,l2,l3);
1195
+ return (std::max)(l2,l3);
1196
+ }
1197
+
1198
+ } // end namespace internal
1199
+
1200
+ } // end namespace Eigen
1201
+
1202
+ #endif // EIGEN_MEMORY_H