@smake/eigen 1.1.0 → 1.1.1

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 (431) hide show
  1. package/README.md +1 -1
  2. package/eigen/Eigen/AccelerateSupport +52 -0
  3. package/eigen/Eigen/Cholesky +18 -20
  4. package/eigen/Eigen/CholmodSupport +28 -28
  5. package/eigen/Eigen/Core +187 -120
  6. package/eigen/Eigen/Eigenvalues +16 -13
  7. package/eigen/Eigen/Geometry +18 -18
  8. package/eigen/Eigen/Householder +9 -7
  9. package/eigen/Eigen/IterativeLinearSolvers +8 -4
  10. package/eigen/Eigen/Jacobi +14 -13
  11. package/eigen/Eigen/KLUSupport +23 -21
  12. package/eigen/Eigen/LU +15 -16
  13. package/eigen/Eigen/MetisSupport +12 -12
  14. package/eigen/Eigen/OrderingMethods +54 -51
  15. package/eigen/Eigen/PaStiXSupport +23 -21
  16. package/eigen/Eigen/PardisoSupport +17 -14
  17. package/eigen/Eigen/QR +18 -20
  18. package/eigen/Eigen/QtAlignedMalloc +5 -12
  19. package/eigen/Eigen/SPQRSupport +21 -14
  20. package/eigen/Eigen/SVD +23 -17
  21. package/eigen/Eigen/Sparse +1 -2
  22. package/eigen/Eigen/SparseCholesky +18 -15
  23. package/eigen/Eigen/SparseCore +18 -17
  24. package/eigen/Eigen/SparseLU +9 -9
  25. package/eigen/Eigen/SparseQR +16 -14
  26. package/eigen/Eigen/StdDeque +5 -2
  27. package/eigen/Eigen/StdList +5 -2
  28. package/eigen/Eigen/StdVector +5 -2
  29. package/eigen/Eigen/SuperLUSupport +30 -24
  30. package/eigen/Eigen/ThreadPool +80 -0
  31. package/eigen/Eigen/UmfPackSupport +19 -17
  32. package/eigen/Eigen/Version +14 -0
  33. package/eigen/Eigen/src/AccelerateSupport/AccelerateSupport.h +423 -0
  34. package/eigen/Eigen/src/AccelerateSupport/InternalHeaderCheck.h +3 -0
  35. package/eigen/Eigen/src/Cholesky/InternalHeaderCheck.h +3 -0
  36. package/eigen/Eigen/src/Cholesky/LDLT.h +366 -405
  37. package/eigen/Eigen/src/Cholesky/LLT.h +323 -367
  38. package/eigen/Eigen/src/Cholesky/LLT_LAPACKE.h +81 -56
  39. package/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +585 -529
  40. package/eigen/Eigen/src/CholmodSupport/InternalHeaderCheck.h +3 -0
  41. package/eigen/Eigen/src/Core/ArithmeticSequence.h +143 -317
  42. package/eigen/Eigen/src/Core/Array.h +329 -370
  43. package/eigen/Eigen/src/Core/ArrayBase.h +190 -203
  44. package/eigen/Eigen/src/Core/ArrayWrapper.h +126 -170
  45. package/eigen/Eigen/src/Core/Assign.h +30 -40
  46. package/eigen/Eigen/src/Core/AssignEvaluator.h +651 -604
  47. package/eigen/Eigen/src/Core/Assign_MKL.h +125 -120
  48. package/eigen/Eigen/src/Core/BandMatrix.h +267 -282
  49. package/eigen/Eigen/src/Core/Block.h +371 -390
  50. package/eigen/Eigen/src/Core/CommaInitializer.h +85 -100
  51. package/eigen/Eigen/src/Core/ConditionEstimator.h +51 -53
  52. package/eigen/Eigen/src/Core/CoreEvaluators.h +1214 -937
  53. package/eigen/Eigen/src/Core/CoreIterators.h +72 -63
  54. package/eigen/Eigen/src/Core/CwiseBinaryOp.h +112 -129
  55. package/eigen/Eigen/src/Core/CwiseNullaryOp.h +676 -702
  56. package/eigen/Eigen/src/Core/CwiseTernaryOp.h +77 -103
  57. package/eigen/Eigen/src/Core/CwiseUnaryOp.h +55 -67
  58. package/eigen/Eigen/src/Core/CwiseUnaryView.h +127 -92
  59. package/eigen/Eigen/src/Core/DenseBase.h +630 -658
  60. package/eigen/Eigen/src/Core/DenseCoeffsBase.h +511 -628
  61. package/eigen/Eigen/src/Core/DenseStorage.h +511 -590
  62. package/eigen/Eigen/src/Core/DeviceWrapper.h +153 -0
  63. package/eigen/Eigen/src/Core/Diagonal.h +168 -207
  64. package/eigen/Eigen/src/Core/DiagonalMatrix.h +346 -317
  65. package/eigen/Eigen/src/Core/DiagonalProduct.h +12 -10
  66. package/eigen/Eigen/src/Core/Dot.h +167 -217
  67. package/eigen/Eigen/src/Core/EigenBase.h +74 -85
  68. package/eigen/Eigen/src/Core/Fill.h +138 -0
  69. package/eigen/Eigen/src/Core/FindCoeff.h +464 -0
  70. package/eigen/Eigen/src/Core/ForceAlignedAccess.h +90 -113
  71. package/eigen/Eigen/src/Core/Fuzzy.h +82 -105
  72. package/eigen/Eigen/src/Core/GeneralProduct.h +315 -261
  73. package/eigen/Eigen/src/Core/GenericPacketMath.h +1182 -520
  74. package/eigen/Eigen/src/Core/GlobalFunctions.h +193 -157
  75. package/eigen/Eigen/src/Core/IO.h +131 -156
  76. package/eigen/Eigen/src/Core/IndexedView.h +209 -125
  77. package/eigen/Eigen/src/Core/InnerProduct.h +260 -0
  78. package/eigen/Eigen/src/Core/InternalHeaderCheck.h +3 -0
  79. package/eigen/Eigen/src/Core/Inverse.h +50 -59
  80. package/eigen/Eigen/src/Core/Map.h +123 -141
  81. package/eigen/Eigen/src/Core/MapBase.h +255 -282
  82. package/eigen/Eigen/src/Core/MathFunctions.h +1247 -1201
  83. package/eigen/Eigen/src/Core/MathFunctionsImpl.h +162 -99
  84. package/eigen/Eigen/src/Core/Matrix.h +463 -494
  85. package/eigen/Eigen/src/Core/MatrixBase.h +468 -470
  86. package/eigen/Eigen/src/Core/NestByValue.h +58 -52
  87. package/eigen/Eigen/src/Core/NoAlias.h +79 -86
  88. package/eigen/Eigen/src/Core/NumTraits.h +206 -206
  89. package/eigen/Eigen/src/Core/PartialReduxEvaluator.h +163 -142
  90. package/eigen/Eigen/src/Core/PermutationMatrix.h +461 -511
  91. package/eigen/Eigen/src/Core/PlainObjectBase.h +858 -972
  92. package/eigen/Eigen/src/Core/Product.h +246 -130
  93. package/eigen/Eigen/src/Core/ProductEvaluators.h +779 -671
  94. package/eigen/Eigen/src/Core/Random.h +153 -164
  95. package/eigen/Eigen/src/Core/RandomImpl.h +262 -0
  96. package/eigen/Eigen/src/Core/RealView.h +250 -0
  97. package/eigen/Eigen/src/Core/Redux.h +334 -314
  98. package/eigen/Eigen/src/Core/Ref.h +259 -257
  99. package/eigen/Eigen/src/Core/Replicate.h +92 -104
  100. package/eigen/Eigen/src/Core/Reshaped.h +215 -271
  101. package/eigen/Eigen/src/Core/ReturnByValue.h +47 -55
  102. package/eigen/Eigen/src/Core/Reverse.h +133 -148
  103. package/eigen/Eigen/src/Core/Select.h +68 -140
  104. package/eigen/Eigen/src/Core/SelfAdjointView.h +254 -290
  105. package/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h +23 -20
  106. package/eigen/Eigen/src/Core/SkewSymmetricMatrix3.h +382 -0
  107. package/eigen/Eigen/src/Core/Solve.h +88 -102
  108. package/eigen/Eigen/src/Core/SolveTriangular.h +126 -124
  109. package/eigen/Eigen/src/Core/SolverBase.h +132 -133
  110. package/eigen/Eigen/src/Core/StableNorm.h +113 -147
  111. package/eigen/Eigen/src/Core/StlIterators.h +404 -248
  112. package/eigen/Eigen/src/Core/Stride.h +90 -92
  113. package/eigen/Eigen/src/Core/Swap.h +70 -39
  114. package/eigen/Eigen/src/Core/Transpose.h +258 -295
  115. package/eigen/Eigen/src/Core/Transpositions.h +270 -333
  116. package/eigen/Eigen/src/Core/TriangularMatrix.h +642 -743
  117. package/eigen/Eigen/src/Core/VectorBlock.h +59 -72
  118. package/eigen/Eigen/src/Core/VectorwiseOp.h +653 -704
  119. package/eigen/Eigen/src/Core/Visitor.h +464 -308
  120. package/eigen/Eigen/src/Core/arch/AVX/Complex.h +380 -187
  121. package/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +65 -163
  122. package/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +2145 -638
  123. package/eigen/Eigen/src/Core/arch/AVX/Reductions.h +353 -0
  124. package/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +253 -60
  125. package/eigen/Eigen/src/Core/arch/AVX512/Complex.h +278 -228
  126. package/eigen/Eigen/src/Core/arch/AVX512/GemmKernel.h +1245 -0
  127. package/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +48 -269
  128. package/eigen/Eigen/src/Core/arch/AVX512/MathFunctionsFP16.h +75 -0
  129. package/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +1597 -754
  130. package/eigen/Eigen/src/Core/arch/AVX512/PacketMathFP16.h +1413 -0
  131. package/eigen/Eigen/src/Core/arch/AVX512/Reductions.h +297 -0
  132. package/eigen/Eigen/src/Core/arch/AVX512/TrsmKernel.h +1167 -0
  133. package/eigen/Eigen/src/Core/arch/AVX512/TrsmUnrolls.inc +1219 -0
  134. package/eigen/Eigen/src/Core/arch/AVX512/TypeCasting.h +229 -41
  135. package/eigen/Eigen/src/Core/arch/AVX512/TypeCastingFP16.h +130 -0
  136. package/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +420 -184
  137. package/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +40 -49
  138. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2962 -2213
  139. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +196 -212
  140. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +713 -441
  141. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMAbfloat16.h +742 -0
  142. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.inc +2818 -0
  143. package/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +2380 -1362
  144. package/eigen/Eigen/src/Core/arch/AltiVec/TypeCasting.h +153 -0
  145. package/eigen/Eigen/src/Core/arch/Default/BFloat16.h +390 -224
  146. package/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +78 -67
  147. package/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1784 -799
  148. package/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +167 -50
  149. package/eigen/Eigen/src/Core/arch/Default/Half.h +528 -379
  150. package/eigen/Eigen/src/Core/arch/Default/Settings.h +10 -12
  151. package/eigen/Eigen/src/Core/arch/GPU/Complex.h +244 -0
  152. package/eigen/Eigen/src/Core/arch/GPU/MathFunctions.h +41 -40
  153. package/eigen/Eigen/src/Core/arch/GPU/PacketMath.h +550 -523
  154. package/eigen/Eigen/src/Core/arch/GPU/Tuple.h +268 -0
  155. package/eigen/Eigen/src/Core/arch/GPU/TypeCasting.h +27 -30
  156. package/eigen/Eigen/src/Core/arch/HIP/hcc/math_constants.h +8 -8
  157. package/eigen/Eigen/src/Core/arch/HVX/PacketMath.h +1088 -0
  158. package/eigen/Eigen/src/Core/arch/LSX/Complex.h +520 -0
  159. package/eigen/Eigen/src/Core/arch/LSX/GeneralBlockPanelKernel.h +23 -0
  160. package/eigen/Eigen/src/Core/arch/LSX/MathFunctions.h +43 -0
  161. package/eigen/Eigen/src/Core/arch/LSX/PacketMath.h +2866 -0
  162. package/eigen/Eigen/src/Core/arch/LSX/TypeCasting.h +526 -0
  163. package/eigen/Eigen/src/Core/arch/MSA/Complex.h +54 -82
  164. package/eigen/Eigen/src/Core/arch/MSA/MathFunctions.h +84 -92
  165. package/eigen/Eigen/src/Core/arch/MSA/PacketMath.h +51 -47
  166. package/eigen/Eigen/src/Core/arch/NEON/Complex.h +454 -306
  167. package/eigen/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +175 -115
  168. package/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +23 -30
  169. package/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +4366 -2857
  170. package/eigen/Eigen/src/Core/arch/NEON/TypeCasting.h +616 -393
  171. package/eigen/Eigen/src/Core/arch/NEON/UnaryFunctors.h +57 -0
  172. package/eigen/Eigen/src/Core/arch/SSE/Complex.h +350 -198
  173. package/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +38 -149
  174. package/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +1791 -912
  175. package/eigen/Eigen/src/Core/arch/SSE/Reductions.h +324 -0
  176. package/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +128 -40
  177. package/eigen/Eigen/src/Core/arch/SVE/MathFunctions.h +10 -6
  178. package/eigen/Eigen/src/Core/arch/SVE/PacketMath.h +156 -234
  179. package/eigen/Eigen/src/Core/arch/SVE/TypeCasting.h +6 -3
  180. package/eigen/Eigen/src/Core/arch/SYCL/InteropHeaders.h +27 -32
  181. package/eigen/Eigen/src/Core/arch/SYCL/MathFunctions.h +119 -117
  182. package/eigen/Eigen/src/Core/arch/SYCL/PacketMath.h +325 -419
  183. package/eigen/Eigen/src/Core/arch/SYCL/TypeCasting.h +15 -17
  184. package/eigen/Eigen/src/Core/arch/ZVector/Complex.h +325 -181
  185. package/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +94 -83
  186. package/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +811 -458
  187. package/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +121 -124
  188. package/eigen/Eigen/src/Core/functors/BinaryFunctors.h +576 -370
  189. package/eigen/Eigen/src/Core/functors/NullaryFunctors.h +194 -109
  190. package/eigen/Eigen/src/Core/functors/StlFunctors.h +95 -112
  191. package/eigen/Eigen/src/Core/functors/TernaryFunctors.h +34 -7
  192. package/eigen/Eigen/src/Core/functors/UnaryFunctors.h +1038 -749
  193. package/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +1883 -1375
  194. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +312 -370
  195. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +189 -176
  196. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +84 -81
  197. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +154 -73
  198. package/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +292 -337
  199. package/eigen/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +80 -77
  200. package/eigen/Eigen/src/Core/products/Parallelizer.h +207 -105
  201. package/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +327 -388
  202. package/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +206 -224
  203. package/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +138 -147
  204. package/eigen/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +58 -61
  205. package/eigen/Eigen/src/Core/products/SelfadjointProduct.h +71 -71
  206. package/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +48 -47
  207. package/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +294 -369
  208. package/eigen/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +246 -238
  209. package/eigen/Eigen/src/Core/products/TriangularMatrixVector.h +244 -247
  210. package/eigen/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +212 -192
  211. package/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +328 -277
  212. package/eigen/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +108 -109
  213. package/eigen/Eigen/src/Core/products/TriangularSolverVector.h +68 -94
  214. package/eigen/Eigen/src/Core/util/Assert.h +158 -0
  215. package/eigen/Eigen/src/Core/util/BlasUtil.h +342 -303
  216. package/eigen/Eigen/src/Core/util/ConfigureVectorization.h +348 -317
  217. package/eigen/Eigen/src/Core/util/Constants.h +297 -262
  218. package/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +130 -90
  219. package/eigen/Eigen/src/Core/util/EmulateArray.h +270 -0
  220. package/eigen/Eigen/src/Core/util/ForwardDeclarations.h +449 -247
  221. package/eigen/Eigen/src/Core/util/GpuHipCudaDefines.inc +101 -0
  222. package/eigen/Eigen/src/Core/util/GpuHipCudaUndefines.inc +45 -0
  223. package/eigen/Eigen/src/Core/util/IndexedViewHelper.h +417 -116
  224. package/eigen/Eigen/src/Core/util/IntegralConstant.h +211 -204
  225. package/eigen/Eigen/src/Core/util/MKL_support.h +39 -37
  226. package/eigen/Eigen/src/Core/util/Macros.h +655 -773
  227. package/eigen/Eigen/src/Core/util/MaxSizeVector.h +139 -0
  228. package/eigen/Eigen/src/Core/util/Memory.h +970 -748
  229. package/eigen/Eigen/src/Core/util/Meta.h +581 -633
  230. package/eigen/Eigen/src/Core/util/MoreMeta.h +638 -0
  231. package/eigen/Eigen/src/Core/util/ReenableStupidWarnings.h +32 -19
  232. package/eigen/Eigen/src/Core/util/ReshapedHelper.h +17 -17
  233. package/eigen/Eigen/src/Core/util/Serializer.h +209 -0
  234. package/eigen/Eigen/src/Core/util/StaticAssert.h +50 -166
  235. package/eigen/Eigen/src/Core/util/SymbolicIndex.h +377 -225
  236. package/eigen/Eigen/src/Core/util/XprHelper.h +784 -547
  237. package/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +246 -277
  238. package/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +299 -319
  239. package/eigen/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +52 -48
  240. package/eigen/Eigen/src/Eigenvalues/EigenSolver.h +413 -456
  241. package/eigen/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +309 -325
  242. package/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +157 -171
  243. package/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +292 -310
  244. package/eigen/Eigen/src/Eigenvalues/InternalHeaderCheck.h +3 -0
  245. package/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +89 -105
  246. package/eigen/Eigen/src/Eigenvalues/RealQZ.h +537 -607
  247. package/eigen/Eigen/src/Eigenvalues/RealSchur.h +342 -381
  248. package/eigen/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +41 -35
  249. package/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +541 -595
  250. package/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +47 -44
  251. package/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +430 -462
  252. package/eigen/Eigen/src/Geometry/AlignedBox.h +226 -227
  253. package/eigen/Eigen/src/Geometry/AngleAxis.h +131 -133
  254. package/eigen/Eigen/src/Geometry/EulerAngles.h +163 -74
  255. package/eigen/Eigen/src/Geometry/Homogeneous.h +285 -333
  256. package/eigen/Eigen/src/Geometry/Hyperplane.h +151 -160
  257. package/eigen/Eigen/src/Geometry/InternalHeaderCheck.h +3 -0
  258. package/eigen/Eigen/src/Geometry/OrthoMethods.h +168 -146
  259. package/eigen/Eigen/src/Geometry/ParametrizedLine.h +127 -127
  260. package/eigen/Eigen/src/Geometry/Quaternion.h +566 -506
  261. package/eigen/Eigen/src/Geometry/Rotation2D.h +107 -105
  262. package/eigen/Eigen/src/Geometry/RotationBase.h +148 -145
  263. package/eigen/Eigen/src/Geometry/Scaling.h +113 -106
  264. package/eigen/Eigen/src/Geometry/Transform.h +858 -936
  265. package/eigen/Eigen/src/Geometry/Translation.h +94 -92
  266. package/eigen/Eigen/src/Geometry/Umeyama.h +79 -84
  267. package/eigen/Eigen/src/Geometry/arch/Geometry_SIMD.h +90 -104
  268. package/eigen/Eigen/src/Householder/BlockHouseholder.h +51 -46
  269. package/eigen/Eigen/src/Householder/Householder.h +102 -124
  270. package/eigen/Eigen/src/Householder/HouseholderSequence.h +412 -453
  271. package/eigen/Eigen/src/Householder/InternalHeaderCheck.h +3 -0
  272. package/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +149 -162
  273. package/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +124 -119
  274. package/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +92 -104
  275. package/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +251 -243
  276. package/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +224 -228
  277. package/eigen/Eigen/src/IterativeLinearSolvers/InternalHeaderCheck.h +3 -0
  278. package/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +178 -227
  279. package/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +79 -84
  280. package/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +54 -60
  281. package/eigen/Eigen/src/Jacobi/InternalHeaderCheck.h +3 -0
  282. package/eigen/Eigen/src/Jacobi/Jacobi.h +252 -308
  283. package/eigen/Eigen/src/KLUSupport/InternalHeaderCheck.h +3 -0
  284. package/eigen/Eigen/src/KLUSupport/KLUSupport.h +208 -227
  285. package/eigen/Eigen/src/LU/Determinant.h +50 -69
  286. package/eigen/Eigen/src/LU/FullPivLU.h +545 -596
  287. package/eigen/Eigen/src/LU/InternalHeaderCheck.h +3 -0
  288. package/eigen/Eigen/src/LU/InverseImpl.h +206 -285
  289. package/eigen/Eigen/src/LU/PartialPivLU.h +390 -428
  290. package/eigen/Eigen/src/LU/PartialPivLU_LAPACKE.h +54 -40
  291. package/eigen/Eigen/src/LU/arch/InverseSize4.h +72 -70
  292. package/eigen/Eigen/src/MetisSupport/InternalHeaderCheck.h +3 -0
  293. package/eigen/Eigen/src/MetisSupport/MetisSupport.h +81 -93
  294. package/eigen/Eigen/src/OrderingMethods/Amd.h +243 -265
  295. package/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +831 -1004
  296. package/eigen/Eigen/src/OrderingMethods/InternalHeaderCheck.h +3 -0
  297. package/eigen/Eigen/src/OrderingMethods/Ordering.h +112 -119
  298. package/eigen/Eigen/src/PaStiXSupport/InternalHeaderCheck.h +3 -0
  299. package/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +524 -570
  300. package/eigen/Eigen/src/PardisoSupport/InternalHeaderCheck.h +3 -0
  301. package/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +385 -430
  302. package/eigen/Eigen/src/QR/ColPivHouseholderQR.h +479 -479
  303. package/eigen/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +120 -56
  304. package/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +166 -153
  305. package/eigen/Eigen/src/QR/FullPivHouseholderQR.h +495 -475
  306. package/eigen/Eigen/src/QR/HouseholderQR.h +394 -285
  307. package/eigen/Eigen/src/QR/HouseholderQR_LAPACKE.h +32 -23
  308. package/eigen/Eigen/src/QR/InternalHeaderCheck.h +3 -0
  309. package/eigen/Eigen/src/SPQRSupport/InternalHeaderCheck.h +3 -0
  310. package/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +244 -264
  311. package/eigen/Eigen/src/SVD/BDCSVD.h +817 -713
  312. package/eigen/Eigen/src/SVD/BDCSVD_LAPACKE.h +174 -0
  313. package/eigen/Eigen/src/SVD/InternalHeaderCheck.h +3 -0
  314. package/eigen/Eigen/src/SVD/JacobiSVD.h +577 -543
  315. package/eigen/Eigen/src/SVD/JacobiSVD_LAPACKE.h +85 -49
  316. package/eigen/Eigen/src/SVD/SVDBase.h +242 -182
  317. package/eigen/Eigen/src/SVD/UpperBidiagonalization.h +200 -235
  318. package/eigen/Eigen/src/SparseCholesky/InternalHeaderCheck.h +3 -0
  319. package/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +765 -594
  320. package/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +308 -94
  321. package/eigen/Eigen/src/SparseCore/AmbiVector.h +202 -251
  322. package/eigen/Eigen/src/SparseCore/CompressedStorage.h +184 -252
  323. package/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +134 -178
  324. package/eigen/Eigen/src/SparseCore/InternalHeaderCheck.h +3 -0
  325. package/eigen/Eigen/src/SparseCore/SparseAssign.h +149 -140
  326. package/eigen/Eigen/src/SparseCore/SparseBlock.h +403 -440
  327. package/eigen/Eigen/src/SparseCore/SparseColEtree.h +100 -112
  328. package/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +525 -303
  329. package/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +555 -339
  330. package/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +100 -108
  331. package/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +169 -197
  332. package/eigen/Eigen/src/SparseCore/SparseDiagonalProduct.h +71 -71
  333. package/eigen/Eigen/src/SparseCore/SparseDot.h +49 -47
  334. package/eigen/Eigen/src/SparseCore/SparseFuzzy.h +13 -11
  335. package/eigen/Eigen/src/SparseCore/SparseMap.h +243 -253
  336. package/eigen/Eigen/src/SparseCore/SparseMatrix.h +1603 -1245
  337. package/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +403 -350
  338. package/eigen/Eigen/src/SparseCore/SparsePermutation.h +186 -115
  339. package/eigen/Eigen/src/SparseCore/SparseProduct.h +94 -97
  340. package/eigen/Eigen/src/SparseCore/SparseRedux.h +22 -24
  341. package/eigen/Eigen/src/SparseCore/SparseRef.h +268 -295
  342. package/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +370 -416
  343. package/eigen/Eigen/src/SparseCore/SparseSolverBase.h +78 -87
  344. package/eigen/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +81 -95
  345. package/eigen/Eigen/src/SparseCore/SparseTranspose.h +62 -71
  346. package/eigen/Eigen/src/SparseCore/SparseTriangularView.h +132 -144
  347. package/eigen/Eigen/src/SparseCore/SparseUtil.h +138 -115
  348. package/eigen/Eigen/src/SparseCore/SparseVector.h +426 -372
  349. package/eigen/Eigen/src/SparseCore/SparseView.h +164 -193
  350. package/eigen/Eigen/src/SparseCore/TriangularSolver.h +129 -170
  351. package/eigen/Eigen/src/SparseLU/InternalHeaderCheck.h +3 -0
  352. package/eigen/Eigen/src/SparseLU/SparseLU.h +756 -710
  353. package/eigen/Eigen/src/SparseLU/SparseLUImpl.h +61 -48
  354. package/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +102 -118
  355. package/eigen/Eigen/src/SparseLU/SparseLU_Structs.h +38 -35
  356. package/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +245 -301
  357. package/eigen/Eigen/src/SparseLU/SparseLU_Utils.h +44 -49
  358. package/eigen/Eigen/src/SparseLU/SparseLU_column_bmod.h +104 -108
  359. package/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +89 -100
  360. package/eigen/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +57 -58
  361. package/eigen/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +43 -55
  362. package/eigen/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +74 -71
  363. package/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +124 -132
  364. package/eigen/Eigen/src/SparseLU/SparseLU_panel_dfs.h +136 -159
  365. package/eigen/Eigen/src/SparseLU/SparseLU_pivotL.h +51 -52
  366. package/eigen/Eigen/src/SparseLU/SparseLU_pruneL.h +67 -73
  367. package/eigen/Eigen/src/SparseLU/SparseLU_relax_snode.h +24 -26
  368. package/eigen/Eigen/src/SparseQR/InternalHeaderCheck.h +3 -0
  369. package/eigen/Eigen/src/SparseQR/SparseQR.h +450 -502
  370. package/eigen/Eigen/src/StlSupport/StdDeque.h +28 -93
  371. package/eigen/Eigen/src/StlSupport/StdList.h +28 -84
  372. package/eigen/Eigen/src/StlSupport/StdVector.h +28 -108
  373. package/eigen/Eigen/src/StlSupport/details.h +48 -50
  374. package/eigen/Eigen/src/SuperLUSupport/InternalHeaderCheck.h +3 -0
  375. package/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +634 -730
  376. package/eigen/Eigen/src/ThreadPool/Barrier.h +70 -0
  377. package/eigen/Eigen/src/ThreadPool/CoreThreadPoolDevice.h +336 -0
  378. package/eigen/Eigen/src/ThreadPool/EventCount.h +241 -0
  379. package/eigen/Eigen/src/ThreadPool/ForkJoin.h +140 -0
  380. package/eigen/Eigen/src/ThreadPool/InternalHeaderCheck.h +4 -0
  381. package/eigen/Eigen/src/ThreadPool/NonBlockingThreadPool.h +587 -0
  382. package/eigen/Eigen/src/ThreadPool/RunQueue.h +230 -0
  383. package/eigen/Eigen/src/ThreadPool/ThreadCancel.h +21 -0
  384. package/eigen/Eigen/src/ThreadPool/ThreadEnvironment.h +43 -0
  385. package/eigen/Eigen/src/ThreadPool/ThreadLocal.h +289 -0
  386. package/eigen/Eigen/src/ThreadPool/ThreadPoolInterface.h +50 -0
  387. package/eigen/Eigen/src/ThreadPool/ThreadYield.h +16 -0
  388. package/eigen/Eigen/src/UmfPackSupport/InternalHeaderCheck.h +3 -0
  389. package/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +428 -464
  390. package/eigen/Eigen/src/misc/Image.h +41 -43
  391. package/eigen/Eigen/src/misc/InternalHeaderCheck.h +3 -0
  392. package/eigen/Eigen/src/misc/Kernel.h +39 -41
  393. package/eigen/Eigen/src/misc/RealSvd2x2.h +19 -21
  394. package/eigen/Eigen/src/misc/blas.h +83 -426
  395. package/eigen/Eigen/src/misc/lapacke.h +9972 -16179
  396. package/eigen/Eigen/src/misc/lapacke_helpers.h +163 -0
  397. package/eigen/Eigen/src/misc/lapacke_mangling.h +4 -5
  398. package/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.inc +344 -0
  399. package/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.inc +544 -0
  400. package/eigen/Eigen/src/plugins/{BlockMethods.h → BlockMethods.inc} +434 -506
  401. package/eigen/Eigen/src/plugins/CommonCwiseBinaryOps.inc +116 -0
  402. package/eigen/Eigen/src/plugins/{CommonCwiseUnaryOps.h → CommonCwiseUnaryOps.inc} +58 -68
  403. package/eigen/Eigen/src/plugins/IndexedViewMethods.inc +192 -0
  404. package/eigen/Eigen/src/plugins/InternalHeaderCheck.inc +3 -0
  405. package/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.inc +331 -0
  406. package/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.inc +118 -0
  407. package/eigen/Eigen/src/plugins/ReshapedMethods.inc +133 -0
  408. package/package.json +1 -1
  409. package/eigen/COPYING.APACHE +0 -203
  410. package/eigen/COPYING.BSD +0 -26
  411. package/eigen/COPYING.GPL +0 -674
  412. package/eigen/COPYING.LGPL +0 -502
  413. package/eigen/COPYING.MINPACK +0 -51
  414. package/eigen/COPYING.MPL2 +0 -373
  415. package/eigen/COPYING.README +0 -18
  416. package/eigen/Eigen/src/Core/BooleanRedux.h +0 -162
  417. package/eigen/Eigen/src/Core/arch/CUDA/Complex.h +0 -258
  418. package/eigen/Eigen/src/Core/arch/Default/TypeCasting.h +0 -120
  419. package/eigen/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +0 -694
  420. package/eigen/Eigen/src/Core/util/NonMPL2.h +0 -3
  421. package/eigen/Eigen/src/SparseCore/MappedSparseMatrix.h +0 -67
  422. package/eigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +0 -280
  423. package/eigen/Eigen/src/misc/lapack.h +0 -152
  424. package/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.h +0 -358
  425. package/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.h +0 -696
  426. package/eigen/Eigen/src/plugins/CommonCwiseBinaryOps.h +0 -115
  427. package/eigen/Eigen/src/plugins/IndexedViewMethods.h +0 -262
  428. package/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.h +0 -152
  429. package/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.h +0 -95
  430. package/eigen/Eigen/src/plugins/ReshapedMethods.h +0 -149
  431. package/eigen/README.md +0 -5
@@ -11,55 +11,64 @@
11
11
  #ifndef EIGEN_META_H
12
12
  #define EIGEN_META_H
13
13
 
14
- #if defined(EIGEN_GPU_COMPILE_PHASE)
14
+ // IWYU pragma: private
15
+ #include "../InternalHeaderCheck.h"
15
16
 
16
- #include <cfloat>
17
+ #if defined(EIGEN_GPU_COMPILE_PHASE)
17
18
 
18
- #if defined(EIGEN_CUDA_ARCH)
19
- #include <math_constants.h>
20
- #endif
19
+ #include <cfloat>
21
20
 
22
- #if defined(EIGEN_HIP_DEVICE_COMPILE)
23
- #include "Eigen/src/Core/arch/HIP/hcc/math_constants.h"
24
- #endif
21
+ #if defined(EIGEN_CUDA_ARCH)
22
+ #include <math_constants.h>
23
+ #endif
25
24
 
25
+ #if defined(EIGEN_HIP_DEVICE_COMPILE)
26
+ #include "Eigen/src/Core/arch/HIP/hcc/math_constants.h"
26
27
  #endif
27
28
 
28
- // Recent versions of ICC require <cstdint> for pointer types below.
29
- #define EIGEN_ICC_NEEDS_CSTDINT (EIGEN_COMP_ICC>=1600 && EIGEN_COMP_CXXVER >= 11)
29
+ #endif
30
30
 
31
31
  // Define portable (u)int{32,64} types
32
- #if EIGEN_HAS_CXX11 || EIGEN_ICC_NEEDS_CSTDINT
33
32
  #include <cstdint>
33
+
34
34
  namespace Eigen {
35
35
  namespace numext {
36
- typedef std::uint8_t uint8_t;
37
- typedef std::int8_t int8_t;
36
+ typedef std::uint8_t uint8_t;
37
+ typedef std::int8_t int8_t;
38
38
  typedef std::uint16_t uint16_t;
39
- typedef std::int16_t int16_t;
39
+ typedef std::int16_t int16_t;
40
40
  typedef std::uint32_t uint32_t;
41
- typedef std::int32_t int32_t;
41
+ typedef std::int32_t int32_t;
42
42
  typedef std::uint64_t uint64_t;
43
- typedef std::int64_t int64_t;
44
- }
45
- }
46
- #else
47
- // Without c++11, all compilers able to compile Eigen also
48
- // provide the C99 stdint.h header file.
49
- #include <stdint.h>
50
- namespace Eigen {
51
- namespace numext {
52
- typedef ::uint8_t uint8_t;
53
- typedef ::int8_t int8_t;
54
- typedef ::uint16_t uint16_t;
55
- typedef ::int16_t int16_t;
56
- typedef ::uint32_t uint32_t;
57
- typedef ::int32_t int32_t;
58
- typedef ::uint64_t uint64_t;
59
- typedef ::int64_t int64_t;
60
- }
61
- }
62
- #endif
43
+ typedef std::int64_t int64_t;
44
+
45
+ template <size_t Size>
46
+ struct get_integer_by_size {
47
+ typedef void signed_type;
48
+ typedef void unsigned_type;
49
+ };
50
+ template <>
51
+ struct get_integer_by_size<1> {
52
+ typedef int8_t signed_type;
53
+ typedef uint8_t unsigned_type;
54
+ };
55
+ template <>
56
+ struct get_integer_by_size<2> {
57
+ typedef int16_t signed_type;
58
+ typedef uint16_t unsigned_type;
59
+ };
60
+ template <>
61
+ struct get_integer_by_size<4> {
62
+ typedef int32_t signed_type;
63
+ typedef uint32_t unsigned_type;
64
+ };
65
+ template <>
66
+ struct get_integer_by_size<8> {
67
+ typedef int64_t signed_type;
68
+ typedef uint64_t unsigned_type;
69
+ };
70
+ } // namespace numext
71
+ } // namespace Eigen
63
72
 
64
73
  namespace Eigen {
65
74
 
@@ -70,743 +79,682 @@ typedef EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex;
70
79
  * \details To change this, \c \#define the preprocessor symbol \c EIGEN_DEFAULT_DENSE_INDEX_TYPE.
71
80
  * \sa \blank \ref TopicPreprocessorDirectives, StorageIndex.
72
81
  */
73
-
74
82
  typedef EIGEN_DEFAULT_DENSE_INDEX_TYPE Index;
75
83
 
76
84
  namespace internal {
77
85
 
78
86
  /** \internal
79
- * \file Meta.h
80
- * This file contains generic metaprogramming classes which are not specifically related to Eigen.
81
- * \note In case you wonder, yes we're aware that Boost already provides all these features,
82
- * we however don't want to add a dependency to Boost.
83
- */
84
-
85
- // Only recent versions of ICC complain about using ptrdiff_t to hold pointers,
86
- // and older versions do not provide *intptr_t types.
87
- #if EIGEN_ICC_NEEDS_CSTDINT
88
- typedef std::intptr_t IntPtr;
89
- typedef std::uintptr_t UIntPtr;
90
- #else
91
- typedef std::ptrdiff_t IntPtr;
92
- typedef std::size_t UIntPtr;
93
- #endif
94
- #undef EIGEN_ICC_NEEDS_CSTDINT
87
+ * \file Meta.h
88
+ * This file contains generic metaprogramming classes which are not specifically related to Eigen.
89
+ * \note In case you wonder, yes we're aware that Boost already provides all these features,
90
+ * we however don't want to add a dependency to Boost.
91
+ */
95
92
 
96
- struct true_type { enum { value = 1 }; };
97
- struct false_type { enum { value = 0 }; };
93
+ using std::false_type;
94
+ using std::true_type;
98
95
 
99
- template<bool Condition>
96
+ template <bool Condition>
100
97
  struct bool_constant;
101
98
 
102
- template<>
99
+ template <>
103
100
  struct bool_constant<true> : true_type {};
104
101
 
105
- template<>
102
+ template <>
106
103
  struct bool_constant<false> : false_type {};
107
104
 
108
- template<bool Condition, typename Then, typename Else>
109
- struct conditional { typedef Then type; };
110
-
111
- template<typename Then, typename Else>
112
- struct conditional <false, Then, Else> { typedef Else type; };
113
-
114
- template<typename T> struct remove_reference { typedef T type; };
115
- template<typename T> struct remove_reference<T&> { typedef T type; };
116
-
117
- template<typename T> struct remove_pointer { typedef T type; };
118
- template<typename T> struct remove_pointer<T*> { typedef T type; };
119
- template<typename T> struct remove_pointer<T*const> { typedef T type; };
120
-
121
- template <class T> struct remove_const { typedef T type; };
122
- template <class T> struct remove_const<const T> { typedef T type; };
123
- template <class T> struct remove_const<const T[]> { typedef T type[]; };
124
- template <class T, unsigned int Size> struct remove_const<const T[Size]> { typedef T type[Size]; };
125
-
126
- template<typename T> struct remove_all { typedef T type; };
127
- template<typename T> struct remove_all<const T> { typedef typename remove_all<T>::type type; };
128
- template<typename T> struct remove_all<T const&> { typedef typename remove_all<T>::type type; };
129
- template<typename T> struct remove_all<T&> { typedef typename remove_all<T>::type type; };
130
- template<typename T> struct remove_all<T const*> { typedef typename remove_all<T>::type type; };
131
- template<typename T> struct remove_all<T*> { typedef typename remove_all<T>::type type; };
132
-
133
- template<typename T> struct is_arithmetic { enum { value = false }; };
134
- template<> struct is_arithmetic<float> { enum { value = true }; };
135
- template<> struct is_arithmetic<double> { enum { value = true }; };
136
- template<> struct is_arithmetic<long double> { enum { value = true }; };
137
- template<> struct is_arithmetic<bool> { enum { value = true }; };
138
- template<> struct is_arithmetic<char> { enum { value = true }; };
139
- template<> struct is_arithmetic<signed char> { enum { value = true }; };
140
- template<> struct is_arithmetic<unsigned char> { enum { value = true }; };
141
- template<> struct is_arithmetic<signed short> { enum { value = true }; };
142
- template<> struct is_arithmetic<unsigned short>{ enum { value = true }; };
143
- template<> struct is_arithmetic<signed int> { enum { value = true }; };
144
- template<> struct is_arithmetic<unsigned int> { enum { value = true }; };
145
- template<> struct is_arithmetic<signed long> { enum { value = true }; };
146
- template<> struct is_arithmetic<unsigned long> { enum { value = true }; };
147
-
148
- template<typename T, typename U> struct is_same { enum { value = 0 }; };
149
- template<typename T> struct is_same<T,T> { enum { value = 1 }; };
150
-
151
- template< class T >
152
- struct is_void : is_same<void, typename remove_const<T>::type> {};
153
-
154
- #if EIGEN_HAS_CXX11
155
- template<> struct is_arithmetic<signed long long> { enum { value = true }; };
156
- template<> struct is_arithmetic<unsigned long long> { enum { value = true }; };
157
- using std::is_integral;
158
- #else
159
- template<typename T> struct is_integral { enum { value = false }; };
160
- template<> struct is_integral<bool> { enum { value = true }; };
161
- template<> struct is_integral<char> { enum { value = true }; };
162
- template<> struct is_integral<signed char> { enum { value = true }; };
163
- template<> struct is_integral<unsigned char> { enum { value = true }; };
164
- template<> struct is_integral<signed short> { enum { value = true }; };
165
- template<> struct is_integral<unsigned short> { enum { value = true }; };
166
- template<> struct is_integral<signed int> { enum { value = true }; };
167
- template<> struct is_integral<unsigned int> { enum { value = true }; };
168
- template<> struct is_integral<signed long> { enum { value = true }; };
169
- template<> struct is_integral<unsigned long> { enum { value = true }; };
170
- #if EIGEN_COMP_MSVC
171
- template<> struct is_integral<signed __int64> { enum { value = true }; };
172
- template<> struct is_integral<unsigned __int64> { enum { value = true }; };
173
- #endif
174
- #endif
175
-
176
- #if EIGEN_HAS_CXX11
177
- using std::make_unsigned;
178
- #else
179
- // TODO: Possibly improve this implementation of make_unsigned.
180
- // It is currently used only by
181
- // template<typename Scalar> struct random_default_impl<Scalar, false, true>.
182
- template<typename> struct make_unsigned;
183
- template<> struct make_unsigned<char> { typedef unsigned char type; };
184
- template<> struct make_unsigned<signed char> { typedef unsigned char type; };
185
- template<> struct make_unsigned<unsigned char> { typedef unsigned char type; };
186
- template<> struct make_unsigned<signed short> { typedef unsigned short type; };
187
- template<> struct make_unsigned<unsigned short> { typedef unsigned short type; };
188
- template<> struct make_unsigned<signed int> { typedef unsigned int type; };
189
- template<> struct make_unsigned<unsigned int> { typedef unsigned int type; };
190
- template<> struct make_unsigned<signed long> { typedef unsigned long type; };
191
- template<> struct make_unsigned<unsigned long> { typedef unsigned long type; };
192
- #if EIGEN_COMP_MSVC
193
- template<> struct make_unsigned<signed __int64> { typedef unsigned __int64 type; };
194
- template<> struct make_unsigned<unsigned __int64> { typedef unsigned __int64 type; };
195
- #endif
105
+ // Third-party libraries rely on these.
106
+ using std::conditional;
107
+ using std::remove_const;
108
+ using std::remove_pointer;
109
+ using std::remove_reference;
196
110
 
197
- // Some platforms define int64_t as `long long` even for C++03, where
198
- // `long long` is not guaranteed by the standard. In this case we are missing
199
- // the definition for make_unsigned. If we just define it, we run into issues
200
- // where `long long` doesn't exist in some compilers for C++03. We therefore add
201
- // the specialization for these platforms only.
202
- #if EIGEN_OS_MAC || EIGEN_COMP_MINGW
203
- template<> struct make_unsigned<unsigned long long> { typedef unsigned long long type; };
204
- template<> struct make_unsigned<long long> { typedef unsigned long long type; };
205
- #endif
206
- #endif
207
-
208
- template <typename T> struct add_const { typedef const T type; };
209
- template <typename T> struct add_const<T&> { typedef T& type; };
210
-
211
- template <typename T> struct is_const { enum { value = 0 }; };
212
- template <typename T> struct is_const<T const> { enum { value = 1 }; };
213
-
214
- template<typename T> struct add_const_on_value_type { typedef const T type; };
215
- template<typename T> struct add_const_on_value_type<T&> { typedef T const& type; };
216
- template<typename T> struct add_const_on_value_type<T*> { typedef T const* type; };
217
- template<typename T> struct add_const_on_value_type<T* const> { typedef T const* const type; };
218
- template<typename T> struct add_const_on_value_type<T const* const> { typedef T const* const type; };
219
-
220
- #if EIGEN_HAS_CXX11
221
-
222
- using std::is_convertible;
223
-
224
- #else
225
-
226
- template<typename From, typename To>
227
- struct is_convertible_impl
228
- {
229
- private:
230
- struct any_conversion
231
- {
232
- template <typename T> any_conversion(const volatile T&);
233
- template <typename T> any_conversion(T&);
234
- };
235
- struct yes {int a[1];};
236
- struct no {int a[2];};
237
-
238
- template<typename T>
239
- static yes test(T, int);
111
+ template <typename T>
112
+ struct remove_all {
113
+ typedef T type;
114
+ };
115
+ template <typename T>
116
+ struct remove_all<const T> {
117
+ typedef typename remove_all<T>::type type;
118
+ };
119
+ template <typename T>
120
+ struct remove_all<T const&> {
121
+ typedef typename remove_all<T>::type type;
122
+ };
123
+ template <typename T>
124
+ struct remove_all<T&> {
125
+ typedef typename remove_all<T>::type type;
126
+ };
127
+ template <typename T>
128
+ struct remove_all<T const*> {
129
+ typedef typename remove_all<T>::type type;
130
+ };
131
+ template <typename T>
132
+ struct remove_all<T*> {
133
+ typedef typename remove_all<T>::type type;
134
+ };
240
135
 
241
- template<typename T>
242
- static no test(any_conversion, ...);
136
+ template <typename T>
137
+ using remove_all_t = typename remove_all<T>::type;
243
138
 
244
- public:
245
- static typename internal::remove_reference<From>::type* ms_from;
246
- #ifdef __INTEL_COMPILER
247
- #pragma warning push
248
- #pragma warning ( disable : 2259 )
249
- #endif
250
- enum { value = sizeof(test<To>(*ms_from, 0))==sizeof(yes) };
251
- #ifdef __INTEL_COMPILER
252
- #pragma warning pop
139
+ template <typename T>
140
+ struct is_arithmetic {
141
+ enum { value = false };
142
+ };
143
+ template <>
144
+ struct is_arithmetic<float> {
145
+ enum { value = true };
146
+ };
147
+ template <>
148
+ struct is_arithmetic<double> {
149
+ enum { value = true };
150
+ };
151
+ // GPU devices treat `long double` as `double`.
152
+ #ifndef EIGEN_GPU_COMPILE_PHASE
153
+ template <>
154
+ struct is_arithmetic<long double> {
155
+ enum { value = true };
156
+ };
253
157
  #endif
158
+ template <>
159
+ struct is_arithmetic<bool> {
160
+ enum { value = true };
254
161
  };
255
-
256
- template<typename From, typename To>
257
- struct is_convertible
258
- {
259
- enum { value = is_convertible_impl<From,To>::value };
162
+ template <>
163
+ struct is_arithmetic<char> {
164
+ enum { value = true };
165
+ };
166
+ template <>
167
+ struct is_arithmetic<signed char> {
168
+ enum { value = true };
169
+ };
170
+ template <>
171
+ struct is_arithmetic<unsigned char> {
172
+ enum { value = true };
173
+ };
174
+ template <>
175
+ struct is_arithmetic<signed short> {
176
+ enum { value = true };
177
+ };
178
+ template <>
179
+ struct is_arithmetic<unsigned short> {
180
+ enum { value = true };
181
+ };
182
+ template <>
183
+ struct is_arithmetic<signed int> {
184
+ enum { value = true };
185
+ };
186
+ template <>
187
+ struct is_arithmetic<unsigned int> {
188
+ enum { value = true };
189
+ };
190
+ template <>
191
+ struct is_arithmetic<signed long> {
192
+ enum { value = true };
193
+ };
194
+ template <>
195
+ struct is_arithmetic<unsigned long> {
196
+ enum { value = true };
260
197
  };
261
198
 
262
- template<typename T>
263
- struct is_convertible<T,T&> { enum { value = false }; };
199
+ template <typename T, typename U>
200
+ struct is_same {
201
+ enum { value = 0 };
202
+ };
203
+ template <typename T>
204
+ struct is_same<T, T> {
205
+ enum { value = 1 };
206
+ };
264
207
 
265
- template<typename T>
266
- struct is_convertible<const T,const T&> { enum { value = true }; };
208
+ template <class T>
209
+ struct is_void : is_same<void, std::remove_const_t<T>> {};
267
210
 
211
+ /** \internal
212
+ * Implementation of std::void_t for SFINAE.
213
+ *
214
+ * Pre C++17:
215
+ * Custom implementation.
216
+ *
217
+ * Post C++17: Uses std::void_t
218
+ */
219
+ #if EIGEN_COMP_CXXVER >= 17 && defined(__cpp_lib_void_t) && __cpp_lib_void_t >= 201411L
220
+ using std::void_t;
221
+ #else
222
+ template <typename...>
223
+ using void_t = void;
268
224
  #endif
269
225
 
270
- /** \internal Allows to enable/disable an overload
271
- * according to a compile time condition.
272
- */
273
- template<bool Condition, typename T=void> struct enable_if;
226
+ template <>
227
+ struct is_arithmetic<signed long long> {
228
+ enum { value = true };
229
+ };
230
+ template <>
231
+ struct is_arithmetic<unsigned long long> {
232
+ enum { value = true };
233
+ };
234
+ using std::is_integral;
274
235
 
275
- template<typename T> struct enable_if<true,T>
276
- { typedef T type; };
236
+ using std::make_unsigned;
277
237
 
278
- #if defined(EIGEN_GPU_COMPILE_PHASE) && !EIGEN_HAS_CXX11
279
- #if !defined(__FLT_EPSILON__)
280
- #define __FLT_EPSILON__ FLT_EPSILON
281
- #define __DBL_EPSILON__ DBL_EPSILON
282
- #endif
238
+ template <typename T>
239
+ struct is_const {
240
+ enum { value = 0 };
241
+ };
242
+ template <typename T>
243
+ struct is_const<T const> {
244
+ enum { value = 1 };
245
+ };
283
246
 
284
- namespace device {
285
-
286
- template<typename T> struct numeric_limits
287
- {
288
- EIGEN_DEVICE_FUNC
289
- static EIGEN_CONSTEXPR T epsilon() { return 0; }
290
- static T (max)() { assert(false && "Highest not supported for this type"); }
291
- static T (min)() { assert(false && "Lowest not supported for this type"); }
292
- static T infinity() { assert(false && "Infinity not supported for this type"); }
293
- static T quiet_NaN() { assert(false && "quiet_NaN not supported for this type"); }
294
- };
295
- template<> struct numeric_limits<float>
296
- {
297
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
298
- static float epsilon() { return __FLT_EPSILON__; }
299
- EIGEN_DEVICE_FUNC
300
- static float (max)() {
301
- #if defined(EIGEN_CUDA_ARCH)
302
- return CUDART_MAX_NORMAL_F;
303
- #else
304
- return HIPRT_MAX_NORMAL_F;
305
- #endif
306
- }
307
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
308
- static float (min)() { return FLT_MIN; }
309
- EIGEN_DEVICE_FUNC
310
- static float infinity() {
311
- #if defined(EIGEN_CUDA_ARCH)
312
- return CUDART_INF_F;
313
- #else
314
- return HIPRT_INF_F;
315
- #endif
316
- }
317
- EIGEN_DEVICE_FUNC
318
- static float quiet_NaN() {
319
- #if defined(EIGEN_CUDA_ARCH)
320
- return CUDART_NAN_F;
321
- #else
322
- return HIPRT_NAN_F;
323
- #endif
324
- }
247
+ template <typename T>
248
+ struct add_const_on_value_type {
249
+ typedef const T type;
325
250
  };
326
- template<> struct numeric_limits<double>
327
- {
328
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
329
- static double epsilon() { return __DBL_EPSILON__; }
330
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
331
- static double (max)() { return DBL_MAX; }
332
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
333
- static double (min)() { return DBL_MIN; }
334
- EIGEN_DEVICE_FUNC
335
- static double infinity() {
336
- #if defined(EIGEN_CUDA_ARCH)
337
- return CUDART_INF;
338
- #else
339
- return HIPRT_INF;
340
- #endif
341
- }
342
- EIGEN_DEVICE_FUNC
343
- static double quiet_NaN() {
344
- #if defined(EIGEN_CUDA_ARCH)
345
- return CUDART_NAN;
346
- #else
347
- return HIPRT_NAN;
348
- #endif
349
- }
251
+ template <typename T>
252
+ struct add_const_on_value_type<T&> {
253
+ typedef T const& type;
254
+ };
255
+ template <typename T>
256
+ struct add_const_on_value_type<T*> {
257
+ typedef T const* type;
350
258
  };
351
- template<> struct numeric_limits<int>
352
- {
353
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
354
- static int epsilon() { return 0; }
355
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
356
- static int (max)() { return INT_MAX; }
357
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
358
- static int (min)() { return INT_MIN; }
359
- };
360
- template<> struct numeric_limits<unsigned int>
361
- {
362
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
363
- static unsigned int epsilon() { return 0; }
364
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
365
- static unsigned int (max)() { return UINT_MAX; }
366
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
367
- static unsigned int (min)() { return 0; }
368
- };
369
- template<> struct numeric_limits<long>
370
- {
371
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
372
- static long epsilon() { return 0; }
373
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
374
- static long (max)() { return LONG_MAX; }
375
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
376
- static long (min)() { return LONG_MIN; }
377
- };
378
- template<> struct numeric_limits<unsigned long>
379
- {
380
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
381
- static unsigned long epsilon() { return 0; }
382
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
383
- static unsigned long (max)() { return ULONG_MAX; }
384
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
385
- static unsigned long (min)() { return 0; }
386
- };
387
- template<> struct numeric_limits<long long>
388
- {
389
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
390
- static long long epsilon() { return 0; }
391
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
392
- static long long (max)() { return LLONG_MAX; }
393
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
394
- static long long (min)() { return LLONG_MIN; }
395
- };
396
- template<> struct numeric_limits<unsigned long long>
397
- {
398
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
399
- static unsigned long long epsilon() { return 0; }
400
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
401
- static unsigned long long (max)() { return ULLONG_MAX; }
402
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
403
- static unsigned long long (min)() { return 0; }
404
- };
405
- template<> struct numeric_limits<bool>
406
- {
407
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
408
- static bool epsilon() { return false; }
409
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
410
- static bool (max)() { return true; }
411
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
412
- static bool (min)() { return false; }
259
+ template <typename T>
260
+ struct add_const_on_value_type<T* const> {
261
+ typedef T const* const type;
262
+ };
263
+ template <typename T>
264
+ struct add_const_on_value_type<T const* const> {
265
+ typedef T const* const type;
413
266
  };
414
267
 
415
- }
268
+ template <typename T>
269
+ using add_const_on_value_type_t = typename add_const_on_value_type<T>::type;
416
270
 
417
- #endif // defined(EIGEN_GPU_COMPILE_PHASE) && !EIGEN_HAS_CXX11
271
+ using std::is_convertible;
418
272
 
419
273
  /** \internal
420
- * A base class do disable default copy ctor and copy assignment operator.
421
- */
422
- class noncopyable
423
- {
274
+ * A base class do disable default copy ctor and copy assignment operator.
275
+ */
276
+ class noncopyable {
424
277
  EIGEN_DEVICE_FUNC noncopyable(const noncopyable&);
425
278
  EIGEN_DEVICE_FUNC const noncopyable& operator=(const noncopyable&);
426
- protected:
279
+
280
+ protected:
427
281
  EIGEN_DEVICE_FUNC noncopyable() {}
428
282
  EIGEN_DEVICE_FUNC ~noncopyable() {}
429
283
  };
430
284
 
431
285
  /** \internal
432
- * Provides access to the number of elements in the object of as a compile-time constant expression.
433
- * It "returns" Eigen::Dynamic if the size cannot be resolved at compile-time (default).
434
- *
435
- * Similar to std::tuple_size, but more general.
436
- *
437
- * It currently supports:
438
- * - any types T defining T::SizeAtCompileTime
439
- * - plain C arrays as T[N]
440
- * - std::array (c++11)
441
- * - some internal types such as SingleRange and AllRange
442
- *
443
- * The second template parameter eases SFINAE-based specializations.
444
- */
445
- template<typename T, typename EnableIf = void> struct array_size {
446
- enum { value = Dynamic };
286
+ * Provides access to the number of elements in the object of as a compile-time constant expression.
287
+ * It "returns" Eigen::Dynamic if the size cannot be resolved at compile-time (default).
288
+ *
289
+ * Similar to std::tuple_size, but more general.
290
+ *
291
+ * It currently supports:
292
+ * - any types T defining T::SizeAtCompileTime
293
+ * - plain C arrays as T[N]
294
+ * - std::array (c++11)
295
+ * - some internal types such as SingleRange and AllRange
296
+ *
297
+ * The second template parameter eases SFINAE-based specializations.
298
+ */
299
+ template <typename T, typename EnableIf = void>
300
+ struct array_size {
301
+ static constexpr Index value = Dynamic;
447
302
  };
448
303
 
449
- template<typename T> struct array_size<T,typename internal::enable_if<((T::SizeAtCompileTime&0)==0)>::type> {
450
- enum { value = T::SizeAtCompileTime };
304
+ template <typename T>
305
+ struct array_size<T, std::enable_if_t<((T::SizeAtCompileTime & 0) == 0)>> {
306
+ static constexpr Index value = T::SizeAtCompileTime;
451
307
  };
452
308
 
453
- template<typename T, int N> struct array_size<const T (&)[N]> {
454
- enum { value = N };
309
+ template <typename T, int N>
310
+ struct array_size<const T (&)[N]> {
311
+ static constexpr Index value = N;
455
312
  };
456
- template<typename T, int N> struct array_size<T (&)[N]> {
457
- enum { value = N };
313
+ template <typename T, int N>
314
+ struct array_size<T (&)[N]> {
315
+ static constexpr Index value = N;
458
316
  };
459
317
 
460
- #if EIGEN_HAS_CXX11
461
- template<typename T, std::size_t N> struct array_size<const std::array<T,N> > {
462
- enum { value = N };
318
+ template <typename T, std::size_t N>
319
+ struct array_size<const std::array<T, N>> {
320
+ static constexpr Index value = N;
463
321
  };
464
- template<typename T, std::size_t N> struct array_size<std::array<T,N> > {
465
- enum { value = N };
322
+ template <typename T, std::size_t N>
323
+ struct array_size<std::array<T, N>> {
324
+ static constexpr Index value = N;
466
325
  };
467
- #endif
468
326
 
469
327
  /** \internal
470
- * Analogue of the std::size free function.
471
- * It returns the size of the container or view \a x of type \c T
472
- *
473
- * It currently supports:
474
- * - any types T defining a member T::size() const
475
- * - plain C arrays as T[N]
476
- *
477
- */
478
- template<typename T>
479
- EIGEN_CONSTEXPR Index size(const T& x) { return x.size(); }
480
-
481
- template<typename T,std::size_t N>
482
- EIGEN_CONSTEXPR Index size(const T (&) [N]) { return N; }
328
+ * Analogue of the std::ssize free function.
329
+ * It returns the signed size of the container or view \a x of type \c T
330
+ *
331
+ * It currently supports:
332
+ * - any types T defining a member T::size() const
333
+ * - plain C arrays as T[N]
334
+ *
335
+ * For C++20, this function just forwards to `std::ssize`, or any ADL discoverable `ssize` function.
336
+ */
337
+ #if EIGEN_COMP_CXXVER >= 20 && defined(__cpp_lib_ssize) && __cpp_lib_ssize >= 201902L
483
338
 
484
- /** \internal
485
- * Convenient struct to get the result type of a nullary, unary, binary, or
486
- * ternary functor.
487
- *
488
- * Pre C++11:
489
- * Supports both a Func::result_type member and templated
490
- * Func::result<Func(ArgTypes...)>::type member.
491
- *
492
- * If none of these members is provided, then the type of the first
493
- * argument is returned.
494
- *
495
- * Post C++11:
496
- * This uses std::result_of. However, note the `type` member removes
497
- * const and converts references/pointers to their corresponding value type.
498
- */
499
- #if EIGEN_HAS_STD_INVOKE_RESULT
500
- template<typename T> struct result_of;
339
+ template <typename T>
340
+ constexpr auto index_list_size(T&& x) {
341
+ using std::ssize;
342
+ return ssize(std::forward<T>(x));
343
+ }
501
344
 
502
- template<typename F, typename... ArgTypes>
503
- struct result_of<F(ArgTypes...)> {
504
- typedef typename std::invoke_result<F, ArgTypes...>::type type1;
505
- typedef typename remove_all<type1>::type type;
506
- };
507
- #elif EIGEN_HAS_STD_RESULT_OF
508
- template<typename T> struct result_of {
509
- typedef typename std::result_of<T>::type type1;
510
- typedef typename remove_all<type1>::type type;
511
- };
512
345
  #else
513
- template<typename T> struct result_of { };
514
-
515
- struct has_none {int a[1];};
516
- struct has_std_result_type {int a[2];};
517
- struct has_tr1_result {int a[3];};
518
-
519
- template<typename Func, int SizeOf>
520
- struct nullary_result_of_select {};
521
-
522
- template<typename Func>
523
- struct nullary_result_of_select<Func, sizeof(has_std_result_type)> {typedef typename Func::result_type type;};
524
-
525
- template<typename Func>
526
- struct nullary_result_of_select<Func, sizeof(has_tr1_result)> {typedef typename Func::template result<Func()>::type type;};
527
-
528
- template<typename Func>
529
- struct result_of<Func()> {
530
- template<typename T>
531
- static has_std_result_type testFunctor(T const *, typename T::result_type const * = 0);
532
- template<typename T>
533
- static has_tr1_result testFunctor(T const *, typename T::template result<T()>::type const * = 0);
534
- static has_none testFunctor(...);
535
346
 
536
- // note that the following indirection is needed for gcc-3.3
537
- enum {FunctorType = sizeof(testFunctor(static_cast<Func*>(0)))};
538
- typedef typename nullary_result_of_select<Func, FunctorType>::type type;
539
- };
540
-
541
- template<typename Func, typename ArgType, int SizeOf=sizeof(has_none)>
542
- struct unary_result_of_select {typedef typename internal::remove_all<ArgType>::type type;};
543
-
544
- template<typename Func, typename ArgType>
545
- struct unary_result_of_select<Func, ArgType, sizeof(has_std_result_type)> {typedef typename Func::result_type type;};
546
-
547
- template<typename Func, typename ArgType>
548
- struct unary_result_of_select<Func, ArgType, sizeof(has_tr1_result)> {typedef typename Func::template result<Func(ArgType)>::type type;};
549
-
550
- template<typename Func, typename ArgType>
551
- struct result_of<Func(ArgType)> {
552
- template<typename T>
553
- static has_std_result_type testFunctor(T const *, typename T::result_type const * = 0);
554
- template<typename T>
555
- static has_tr1_result testFunctor(T const *, typename T::template result<T(ArgType)>::type const * = 0);
556
- static has_none testFunctor(...);
557
-
558
- // note that the following indirection is needed for gcc-3.3
559
- enum {FunctorType = sizeof(testFunctor(static_cast<Func*>(0)))};
560
- typedef typename unary_result_of_select<Func, ArgType, FunctorType>::type type;
561
- };
562
-
563
- template<typename Func, typename ArgType0, typename ArgType1, int SizeOf=sizeof(has_none)>
564
- struct binary_result_of_select {typedef typename internal::remove_all<ArgType0>::type type;};
565
-
566
- template<typename Func, typename ArgType0, typename ArgType1>
567
- struct binary_result_of_select<Func, ArgType0, ArgType1, sizeof(has_std_result_type)>
568
- {typedef typename Func::result_type type;};
569
-
570
- template<typename Func, typename ArgType0, typename ArgType1>
571
- struct binary_result_of_select<Func, ArgType0, ArgType1, sizeof(has_tr1_result)>
572
- {typedef typename Func::template result<Func(ArgType0,ArgType1)>::type type;};
573
-
574
- template<typename Func, typename ArgType0, typename ArgType1>
575
- struct result_of<Func(ArgType0,ArgType1)> {
576
- template<typename T>
577
- static has_std_result_type testFunctor(T const *, typename T::result_type const * = 0);
578
- template<typename T>
579
- static has_tr1_result testFunctor(T const *, typename T::template result<T(ArgType0,ArgType1)>::type const * = 0);
580
- static has_none testFunctor(...);
581
-
582
- // note that the following indirection is needed for gcc-3.3
583
- enum {FunctorType = sizeof(testFunctor(static_cast<Func*>(0)))};
584
- typedef typename binary_result_of_select<Func, ArgType0, ArgType1, FunctorType>::type type;
585
- };
586
-
587
- template<typename Func, typename ArgType0, typename ArgType1, typename ArgType2, int SizeOf=sizeof(has_none)>
588
- struct ternary_result_of_select {typedef typename internal::remove_all<ArgType0>::type type;};
589
-
590
- template<typename Func, typename ArgType0, typename ArgType1, typename ArgType2>
591
- struct ternary_result_of_select<Func, ArgType0, ArgType1, ArgType2, sizeof(has_std_result_type)>
592
- {typedef typename Func::result_type type;};
593
-
594
- template<typename Func, typename ArgType0, typename ArgType1, typename ArgType2>
595
- struct ternary_result_of_select<Func, ArgType0, ArgType1, ArgType2, sizeof(has_tr1_result)>
596
- {typedef typename Func::template result<Func(ArgType0,ArgType1,ArgType2)>::type type;};
597
-
598
- template<typename Func, typename ArgType0, typename ArgType1, typename ArgType2>
599
- struct result_of<Func(ArgType0,ArgType1,ArgType2)> {
600
- template<typename T>
601
- static has_std_result_type testFunctor(T const *, typename T::result_type const * = 0);
602
- template<typename T>
603
- static has_tr1_result testFunctor(T const *, typename T::template result<T(ArgType0,ArgType1,ArgType2)>::type const * = 0);
604
- static has_none testFunctor(...);
605
-
606
- // note that the following indirection is needed for gcc-3.3
607
- enum {FunctorType = sizeof(testFunctor(static_cast<Func*>(0)))};
608
- typedef typename ternary_result_of_select<Func, ArgType0, ArgType1, ArgType2, FunctorType>::type type;
609
- };
347
+ template <typename T>
348
+ constexpr auto index_list_size(const T& x) {
349
+ using R = std::common_type_t<std::ptrdiff_t, std::make_signed_t<decltype(x.size())>>;
350
+ return static_cast<R>(x.size());
351
+ }
610
352
 
353
+ template <typename T, std::ptrdiff_t N>
354
+ constexpr std::ptrdiff_t index_list_size(const T (&)[N]) {
355
+ return N;
356
+ }
611
357
  #endif
612
358
 
359
+ /** \internal
360
+ * Convenient struct to get the result type of a nullary, unary, binary, or
361
+ * ternary functor.
362
+ *
363
+ * Pre C++17:
364
+ * This uses std::result_of. However, note the `type` member removes
365
+ * const and converts references/pointers to their corresponding value type.
366
+ *
367
+ * Post C++17: Uses std::invoke_result
368
+ */
613
369
  #if EIGEN_HAS_STD_INVOKE_RESULT
614
- template<typename F, typename... ArgTypes>
615
- struct invoke_result {
370
+ template <typename T>
371
+ struct result_of;
372
+
373
+ template <typename F, typename... ArgTypes>
374
+ struct result_of<F(ArgTypes...)> {
616
375
  typedef typename std::invoke_result<F, ArgTypes...>::type type1;
617
- typedef typename remove_all<type1>::type type;
376
+ typedef remove_all_t<type1> type;
618
377
  };
619
- #elif EIGEN_HAS_CXX11
620
- template<typename F, typename... ArgTypes>
378
+
379
+ template <typename F, typename... ArgTypes>
621
380
  struct invoke_result {
622
- typedef typename result_of<F(ArgTypes...)>::type type1;
623
- typedef typename remove_all<type1>::type type;
381
+ typedef typename std::invoke_result<F, ArgTypes...>::type type1;
382
+ typedef remove_all_t<type1> type;
624
383
  };
625
384
  #else
626
- template<typename F, typename ArgType0 = void, typename ArgType1 = void, typename ArgType2 = void>
627
- struct invoke_result {
628
- typedef typename result_of<F(ArgType0, ArgType1, ArgType2)>::type type1;
629
- typedef typename remove_all<type1>::type type;
385
+ template <typename T>
386
+ struct result_of {
387
+ typedef typename std::result_of<T>::type type1;
388
+ typedef remove_all_t<type1> type;
630
389
  };
631
390
 
632
- template<typename F>
633
- struct invoke_result<F, void, void, void> {
634
- typedef typename result_of<F()>::type type1;
635
- typedef typename remove_all<type1>::type type;
391
+ template <typename F, typename... ArgTypes>
392
+ struct invoke_result {
393
+ typedef typename result_of<F(ArgTypes...)>::type type1;
394
+ typedef remove_all_t<type1> type;
636
395
  };
396
+ #endif
637
397
 
638
- template<typename F, typename ArgType0>
639
- struct invoke_result<F, ArgType0, void, void> {
640
- typedef typename result_of<F(ArgType0)>::type type1;
641
- typedef typename remove_all<type1>::type type;
642
- };
398
+ // Reduces a sequence of bools to true if all are true, false otherwise.
399
+ template <bool... values>
400
+ using reduce_all =
401
+ std::is_same<std::integer_sequence<bool, values..., true>, std::integer_sequence<bool, true, values...>>;
643
402
 
644
- template<typename F, typename ArgType0, typename ArgType1>
645
- struct invoke_result<F, ArgType0, ArgType1, void> {
646
- typedef typename result_of<F(ArgType0, ArgType1)>::type type1;
647
- typedef typename remove_all<type1>::type type;
648
- };
649
- #endif
403
+ // Reduces a sequence of bools to true if any are true, false if all false.
404
+ template <bool... values>
405
+ using reduce_any = std::integral_constant<bool, !std::is_same<std::integer_sequence<bool, values..., false>,
406
+ std::integer_sequence<bool, false, values...>>::value>;
650
407
 
651
- struct meta_yes { char a[1]; };
652
- struct meta_no { char a[2]; };
408
+ struct meta_yes {
409
+ char a[1];
410
+ };
411
+ struct meta_no {
412
+ char a[2];
413
+ };
653
414
 
654
415
  // Check whether T::ReturnType does exist
655
416
  template <typename T>
656
- struct has_ReturnType
657
- {
658
- template <typename C> static meta_yes testFunctor(C const *, typename C::ReturnType const * = 0);
659
- template <typename C> static meta_no testFunctor(...);
417
+ struct has_ReturnType {
418
+ template <typename C>
419
+ static meta_yes testFunctor(C const*, typename C::ReturnType const* = 0);
420
+ template <typename C>
421
+ static meta_no testFunctor(...);
660
422
 
661
423
  enum { value = sizeof(testFunctor<T>(static_cast<T*>(0))) == sizeof(meta_yes) };
662
424
  };
663
425
 
664
- template<typename T> const T* return_ptr();
426
+ template <typename T>
427
+ const T* return_ptr();
665
428
 
666
- template <typename T, typename IndexType=Index>
667
- struct has_nullary_operator
668
- {
669
- template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ptr<C>()->operator()())>0)>::type * = 0);
429
+ template <typename T, typename IndexType = Index>
430
+ struct has_nullary_operator {
431
+ template <typename C>
432
+ static meta_yes testFunctor(C const*, std::enable_if_t<(sizeof(return_ptr<C>()->operator()()) > 0)>* = 0);
670
433
  static meta_no testFunctor(...);
671
434
 
672
435
  enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
673
436
  };
674
437
 
675
- template <typename T, typename IndexType=Index>
676
- struct has_unary_operator
677
- {
678
- template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ptr<C>()->operator()(IndexType(0)))>0)>::type * = 0);
438
+ template <typename T, typename IndexType = Index>
439
+ struct has_unary_operator {
440
+ template <typename C>
441
+ static meta_yes testFunctor(C const*, std::enable_if_t<(sizeof(return_ptr<C>()->operator()(IndexType(0))) > 0)>* = 0);
679
442
  static meta_no testFunctor(...);
680
443
 
681
444
  enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
682
445
  };
683
446
 
684
- template <typename T, typename IndexType=Index>
685
- struct has_binary_operator
686
- {
687
- template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ptr<C>()->operator()(IndexType(0),IndexType(0)))>0)>::type * = 0);
447
+ template <typename T, typename IndexType = Index>
448
+ struct has_binary_operator {
449
+ template <typename C>
450
+ static meta_yes testFunctor(
451
+ C const*, std::enable_if_t<(sizeof(return_ptr<C>()->operator()(IndexType(0), IndexType(0))) > 0)>* = 0);
688
452
  static meta_no testFunctor(...);
689
453
 
690
454
  enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
691
455
  };
692
456
 
693
457
  /** \internal In short, it computes int(sqrt(\a Y)) with \a Y an integer.
694
- * Usage example: \code meta_sqrt<1023>::ret \endcode
695
- */
696
- template<int Y,
697
- int InfX = 0,
698
- int SupX = ((Y==1) ? 1 : Y/2),
699
- bool Done = ((SupX-InfX)<=1 ? true : ((SupX*SupX <= Y) && ((SupX+1)*(SupX+1) > Y))) >
700
- // use ?: instead of || just to shut up a stupid gcc 4.3 warning
701
- class meta_sqrt
702
- {
703
- enum {
704
- MidX = (InfX+SupX)/2,
705
- TakeInf = MidX*MidX > Y ? 1 : 0,
706
- NewInf = int(TakeInf) ? InfX : int(MidX),
707
- NewSup = int(TakeInf) ? int(MidX) : SupX
708
- };
709
- public:
710
- enum { ret = meta_sqrt<Y,NewInf,NewSup>::ret };
711
- };
712
-
713
- template<int Y, int InfX, int SupX>
714
- class meta_sqrt<Y, InfX, SupX, true> { public: enum { ret = (SupX*SupX <= Y) ? SupX : InfX }; };
458
+ * Usage example: \code meta_sqrt<1023>::ret \endcode
459
+ */
460
+ template <int Y, int InfX = 0, int SupX = ((Y == 1) ? 1 : Y / 2),
461
+ bool Done = ((SupX - InfX) <= 1 || ((SupX * SupX <= Y) && ((SupX + 1) * (SupX + 1) > Y)))>
462
+ class meta_sqrt {
463
+ enum {
464
+ MidX = (InfX + SupX) / 2,
465
+ TakeInf = MidX * MidX > Y ? 1 : 0,
466
+ NewInf = int(TakeInf) ? InfX : int(MidX),
467
+ NewSup = int(TakeInf) ? int(MidX) : SupX
468
+ };
715
469
 
470
+ public:
471
+ enum { ret = meta_sqrt<Y, NewInf, NewSup>::ret };
472
+ };
473
+
474
+ template <int Y, int InfX, int SupX>
475
+ class meta_sqrt<Y, InfX, SupX, true> {
476
+ public:
477
+ enum { ret = (SupX * SupX <= Y) ? SupX : InfX };
478
+ };
716
479
 
717
480
  /** \internal Computes the least common multiple of two positive integer A and B
718
- * at compile-time.
719
- */
720
- template<int A, int B, int K=1, bool Done = ((A*K)%B)==0, bool Big=(A>=B)>
721
- struct meta_least_common_multiple
722
- {
723
- enum { ret = meta_least_common_multiple<A,B,K+1>::ret };
481
+ * at compile-time.
482
+ */
483
+ template <int A, int B, int K = 1, bool Done = ((A * K) % B) == 0, bool Big = (A >= B)>
484
+ struct meta_least_common_multiple {
485
+ enum { ret = meta_least_common_multiple<A, B, K + 1>::ret };
724
486
  };
725
- template<int A, int B, int K, bool Done>
726
- struct meta_least_common_multiple<A,B,K,Done,false>
727
- {
728
- enum { ret = meta_least_common_multiple<B,A,K>::ret };
487
+ template <int A, int B, int K, bool Done>
488
+ struct meta_least_common_multiple<A, B, K, Done, false> {
489
+ enum { ret = meta_least_common_multiple<B, A, K>::ret };
729
490
  };
730
- template<int A, int B, int K>
731
- struct meta_least_common_multiple<A,B,K,true,true>
732
- {
733
- enum { ret = A*K };
491
+ template <int A, int B, int K>
492
+ struct meta_least_common_multiple<A, B, K, true, true> {
493
+ enum { ret = A * K };
734
494
  };
735
495
 
736
-
737
496
  /** \internal determines whether the product of two numeric types is allowed and what the return type is */
738
- template<typename T, typename U> struct scalar_product_traits
739
- {
497
+ template <typename T, typename U>
498
+ struct scalar_product_traits {
740
499
  enum { Defined = 0 };
741
500
  };
742
501
 
743
502
  // FIXME quick workaround around current limitation of result_of
744
503
  // template<typename Scalar, typename ArgType0, typename ArgType1>
745
504
  // struct result_of<scalar_product_op<Scalar>(ArgType0,ArgType1)> {
746
- // typedef typename scalar_product_traits<typename remove_all<ArgType0>::type, typename remove_all<ArgType1>::type>::ReturnType type;
505
+ // typedef typename scalar_product_traits<remove_all_t<ArgType0>, remove_all_t<ArgType1>>::ReturnType type;
747
506
  // };
748
507
 
749
508
  /** \internal Obtains a POD type suitable to use as storage for an object of a size
750
- * of at most Len bytes, aligned as specified by \c Align.
751
- */
752
- template<unsigned Len, unsigned Align>
509
+ * of at most Len bytes, aligned as specified by \c Align.
510
+ */
511
+ template <unsigned Len, unsigned Align>
753
512
  struct aligned_storage {
754
513
  struct type {
755
514
  EIGEN_ALIGN_TO_BOUNDARY(Align) unsigned char data[Len];
756
515
  };
757
516
  };
758
517
 
759
- } // end namespace internal
518
+ } // end namespace internal
519
+
520
+ template <typename T>
521
+ struct NumTraits;
760
522
 
761
523
  namespace numext {
762
524
 
763
525
  #if defined(EIGEN_GPU_COMPILE_PHASE)
764
- template<typename T> EIGEN_DEVICE_FUNC void swap(T &a, T &b) { T tmp = b; b = a; a = tmp; }
526
+ template <typename T>
527
+ EIGEN_DEVICE_FUNC void swap(T& a, T& b) {
528
+ T tmp = b;
529
+ b = a;
530
+ a = tmp;
531
+ }
765
532
  #else
766
- template<typename T> EIGEN_STRONG_INLINE void swap(T &a, T &b) { std::swap(a,b); }
533
+ template <typename T>
534
+ EIGEN_STRONG_INLINE void swap(T& a, T& b) {
535
+ std::swap(a, b);
536
+ }
767
537
  #endif
768
538
 
769
- #if defined(EIGEN_GPU_COMPILE_PHASE) && !EIGEN_HAS_CXX11
770
- using internal::device::numeric_limits;
771
- #else
772
539
  using std::numeric_limits;
773
- #endif
774
540
 
775
- // Integer division with rounding up.
776
- // T is assumed to be an integer type with a>=0, and b>0
777
- template<typename T>
778
- EIGEN_DEVICE_FUNC
779
- T div_ceil(const T &a, const T &b)
780
- {
781
- return (a+b-1) / b;
782
- }
541
+ // Handle integer comparisons of different signedness.
542
+ template <typename X, typename Y, bool XIsInteger = NumTraits<X>::IsInteger, bool XIsSigned = NumTraits<X>::IsSigned,
543
+ bool YIsInteger = NumTraits<Y>::IsInteger, bool YIsSigned = NumTraits<Y>::IsSigned>
544
+ struct equal_strict_impl {
545
+ static EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool run(const X& x, const Y& y) { return x == y; }
546
+ };
547
+ template <typename X, typename Y>
548
+ struct equal_strict_impl<X, Y, true, false, true, true> {
549
+ // X is an unsigned integer
550
+ // Y is a signed integer
551
+ // if Y is non-negative, it may be represented exactly as its unsigned counterpart.
552
+ using UnsignedY = typename internal::make_unsigned<Y>::type;
553
+ static EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool run(const X& x, const Y& y) {
554
+ return y < Y(0) ? false : (x == static_cast<UnsignedY>(y));
555
+ }
556
+ };
557
+ template <typename X, typename Y>
558
+ struct equal_strict_impl<X, Y, true, true, true, false> {
559
+ // X is a signed integer
560
+ // Y is an unsigned integer
561
+ static EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool run(const X& x, const Y& y) {
562
+ return equal_strict_impl<Y, X>::run(y, x);
563
+ }
564
+ };
783
565
 
784
566
  // The aim of the following functions is to bypass -Wfloat-equal warnings
785
567
  // when we really want a strict equality comparison on floating points.
786
- template<typename X, typename Y> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
787
- bool equal_strict(const X& x,const Y& y) { return x == y; }
568
+ template <typename X, typename Y>
569
+ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool equal_strict(const X& x, const Y& y) {
570
+ return equal_strict_impl<X, Y>::run(x, y);
571
+ }
788
572
 
789
573
  #if !defined(EIGEN_GPU_COMPILE_PHASE) || (!defined(EIGEN_CUDA_ARCH) && defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))
790
- template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
791
- bool equal_strict(const float& x,const float& y) { return std::equal_to<float>()(x,y); }
574
+ template <>
575
+ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool equal_strict(const float& x, const float& y) {
576
+ return std::equal_to<float>()(x, y);
577
+ }
792
578
 
793
- template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
794
- bool equal_strict(const double& x,const double& y) { return std::equal_to<double>()(x,y); }
579
+ template <>
580
+ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool equal_strict(const double& x, const double& y) {
581
+ return std::equal_to<double>()(x, y);
582
+ }
795
583
  #endif
796
584
 
797
- template<typename X, typename Y> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
798
- bool not_equal_strict(const X& x,const Y& y) { return x != y; }
585
+ /**
586
+ * \internal Performs an exact comparison of x to zero, e.g. to decide whether a term can be ignored.
587
+ * Use this to to bypass -Wfloat-equal warnings when exact zero is what needs to be tested.
588
+ */
589
+ template <typename X>
590
+ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool is_exactly_zero(const X& x) {
591
+ return equal_strict(x, typename NumTraits<X>::Literal{0});
592
+ }
593
+
594
+ /**
595
+ * \internal Performs an exact comparison of x to one, e.g. to decide whether a factor needs to be multiplied.
596
+ * Use this to to bypass -Wfloat-equal warnings when exact one is what needs to be tested.
597
+ */
598
+ template <typename X>
599
+ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool is_exactly_one(const X& x) {
600
+ return equal_strict(x, typename NumTraits<X>::Literal{1});
601
+ }
602
+
603
+ template <typename X, typename Y>
604
+ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool not_equal_strict(const X& x, const Y& y) {
605
+ return !equal_strict_impl<X, Y>::run(x, y);
606
+ }
799
607
 
800
608
  #if !defined(EIGEN_GPU_COMPILE_PHASE) || (!defined(EIGEN_CUDA_ARCH) && defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))
801
- template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
802
- bool not_equal_strict(const float& x,const float& y) { return std::not_equal_to<float>()(x,y); }
609
+ template <>
610
+ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool not_equal_strict(const float& x, const float& y) {
611
+ return std::not_equal_to<float>()(x, y);
612
+ }
613
+
614
+ template <>
615
+ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool not_equal_strict(const double& x, const double& y) {
616
+ return std::not_equal_to<double>()(x, y);
617
+ }
618
+ #endif
619
+
620
+ } // end namespace numext
621
+
622
+ namespace internal {
623
+
624
+ template <typename Scalar>
625
+ struct is_identically_zero_impl {
626
+ static inline bool run(const Scalar& s) { return numext::is_exactly_zero(s); }
627
+ };
628
+
629
+ template <typename Scalar>
630
+ EIGEN_STRONG_INLINE bool is_identically_zero(const Scalar& s) {
631
+ return is_identically_zero_impl<Scalar>::run(s);
632
+ }
633
+
634
+ /// \internal Returns true if its argument is of integer or enum type.
635
+ /// FIXME this has the same purpose as `is_valid_index_type` in XprHelper.h
636
+ template <typename A>
637
+ constexpr bool is_int_or_enum_v = std::is_enum<A>::value || std::is_integral<A>::value;
638
+
639
+ template <typename A, typename B>
640
+ constexpr void plain_enum_asserts(A, B) {
641
+ static_assert(is_int_or_enum_v<A>, "Argument a must be an integer or enum");
642
+ static_assert(is_int_or_enum_v<B>, "Argument b must be an integer or enum");
643
+ }
803
644
 
804
- template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
805
- bool not_equal_strict(const double& x,const double& y) { return std::not_equal_to<double>()(x,y); }
645
+ /// \internal Gets the minimum of two values which may be integers or enums
646
+ template <typename A, typename B>
647
+ constexpr int plain_enum_min(A a, B b) {
648
+ plain_enum_asserts(a, b);
649
+ return ((int)a <= (int)b) ? (int)a : (int)b;
650
+ }
651
+
652
+ /// \internal Gets the maximum of two values which may be integers or enums
653
+ template <typename A, typename B>
654
+ constexpr int plain_enum_max(A a, B b) {
655
+ plain_enum_asserts(a, b);
656
+ return ((int)a >= (int)b) ? (int)a : (int)b;
657
+ }
658
+
659
+ /**
660
+ * \internal
661
+ * `min_size_prefer_dynamic` gives the min between compile-time sizes. 0 has absolute priority, followed by 1,
662
+ * followed by Dynamic, followed by other finite values. The reason for giving Dynamic the priority over
663
+ * finite values is that min(3, Dynamic) should be Dynamic, since that could be anything between 0 and 3.
664
+ */
665
+ template <typename A, typename B>
666
+ constexpr int min_size_prefer_dynamic(A a, B b) {
667
+ plain_enum_asserts(a, b);
668
+ if ((int)a == 0 || (int)b == 0) return 0;
669
+ if ((int)a == 1 || (int)b == 1) return 1;
670
+ if ((int)a == Dynamic || (int)b == Dynamic) return Dynamic;
671
+ return plain_enum_min(a, b);
672
+ }
673
+
674
+ /**
675
+ * \internal
676
+ * min_size_prefer_fixed is a variant of `min_size_prefer_dynamic` comparing MaxSizes. The difference is that finite
677
+ * values now have priority over Dynamic, so that min(3, Dynamic) gives 3. Indeed, whatever the actual value is (between
678
+ * 0 and 3), it is not more than 3.
679
+ */
680
+ template <typename A, typename B>
681
+ constexpr int min_size_prefer_fixed(A a, B b) {
682
+ plain_enum_asserts(a, b);
683
+ if ((int)a == 0 || (int)b == 0) return 0;
684
+ if ((int)a == 1 || (int)b == 1) return 1;
685
+ if ((int)a == Dynamic && (int)b == Dynamic) return Dynamic;
686
+ if ((int)a == Dynamic) return (int)b;
687
+ if ((int)b == Dynamic) return (int)a;
688
+ return plain_enum_min(a, b);
689
+ }
690
+
691
+ /// \internal see `min_size_prefer_fixed`. No need for a separate variant for MaxSizes here.
692
+ template <typename A, typename B>
693
+ constexpr int max_size_prefer_dynamic(A a, B b) {
694
+ plain_enum_asserts(a, b);
695
+ if ((int)a == Dynamic || (int)b == Dynamic) return Dynamic;
696
+ return plain_enum_max(a, b);
697
+ }
698
+
699
+ template <typename A, typename B>
700
+ inline constexpr int size_prefer_fixed(A a, B b) {
701
+ plain_enum_asserts(a, b);
702
+ return int(a) == Dynamic ? int(b) : int(a);
703
+ }
704
+
705
+ template <typename A, typename B>
706
+ inline constexpr bool enum_eq_not_dynamic(A a, B b) {
707
+ plain_enum_asserts(a, b);
708
+ if ((int)a == Dynamic || (int)b == Dynamic) return false;
709
+ return (int)a == (int)b;
710
+ }
711
+
712
+ template <typename A, typename B>
713
+ constexpr bool enum_lt_not_dynamic(A a, B b) {
714
+ plain_enum_asserts(a, b);
715
+ if ((int)a == Dynamic || (int)b == Dynamic) return false;
716
+ return (int)a < (int)b;
717
+ }
718
+
719
+ template <typename A, typename B>
720
+ constexpr bool enum_le_not_dynamic(A a, B b) {
721
+ plain_enum_asserts(a, b);
722
+ if ((int)a == Dynamic || (int)b == Dynamic) return false;
723
+ return (int)a <= (int)b;
724
+ }
725
+
726
+ template <typename A, typename B>
727
+ constexpr bool enum_gt_not_dynamic(A a, B b) {
728
+ plain_enum_asserts(a, b);
729
+ if ((int)a == Dynamic || (int)b == Dynamic) return false;
730
+ return (int)a > (int)b;
731
+ }
732
+
733
+ template <typename A, typename B>
734
+ constexpr bool enum_ge_not_dynamic(A a, B b) {
735
+ plain_enum_asserts(a, b);
736
+ if ((int)a == Dynamic || (int)b == Dynamic) return false;
737
+ return (int)a >= (int)b;
738
+ }
739
+
740
+ /// \internal Calculate logical XOR at compile time
741
+ constexpr bool logical_xor(bool a, bool b) { return a != b; }
742
+
743
+ /// \internal Calculate logical IMPLIES at compile time
744
+ constexpr bool check_implication(bool a, bool b) { return !a || b; }
745
+
746
+ /// \internal Provide fallback for std::is_constant_evaluated for pre-C++20.
747
+ #if EIGEN_COMP_CXXVER >= 20 && defined(__cpp_lib_is_constant_evaluated) && __cpp_lib_is_constant_evaluated >= 201811L
748
+ using std::is_constant_evaluated;
749
+ #else
750
+ constexpr bool is_constant_evaluated() { return false; }
806
751
  #endif
807
752
 
808
- } // end namespace numext
753
+ template <typename Scalar>
754
+ using make_complex_t = std::conditional_t<NumTraits<Scalar>::IsComplex, Scalar, std::complex<Scalar>>;
755
+
756
+ } // end namespace internal
809
757
 
810
- } // end namespace Eigen
758
+ } // end namespace Eigen
811
759
 
812
- #endif // EIGEN_META_H
760
+ #endif // EIGEN_META_H