@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.
- package/README.md +1 -1
- package/eigen/Eigen/AccelerateSupport +52 -0
- package/eigen/Eigen/Cholesky +18 -20
- package/eigen/Eigen/CholmodSupport +28 -28
- package/eigen/Eigen/Core +187 -120
- package/eigen/Eigen/Eigenvalues +16 -13
- package/eigen/Eigen/Geometry +18 -18
- package/eigen/Eigen/Householder +9 -7
- package/eigen/Eigen/IterativeLinearSolvers +8 -4
- package/eigen/Eigen/Jacobi +14 -13
- package/eigen/Eigen/KLUSupport +23 -21
- package/eigen/Eigen/LU +15 -16
- package/eigen/Eigen/MetisSupport +12 -12
- package/eigen/Eigen/OrderingMethods +54 -51
- package/eigen/Eigen/PaStiXSupport +23 -21
- package/eigen/Eigen/PardisoSupport +17 -14
- package/eigen/Eigen/QR +18 -20
- package/eigen/Eigen/QtAlignedMalloc +5 -12
- package/eigen/Eigen/SPQRSupport +21 -14
- package/eigen/Eigen/SVD +23 -17
- package/eigen/Eigen/Sparse +1 -2
- package/eigen/Eigen/SparseCholesky +18 -15
- package/eigen/Eigen/SparseCore +18 -17
- package/eigen/Eigen/SparseLU +9 -9
- package/eigen/Eigen/SparseQR +16 -14
- package/eigen/Eigen/StdDeque +5 -2
- package/eigen/Eigen/StdList +5 -2
- package/eigen/Eigen/StdVector +5 -2
- package/eigen/Eigen/SuperLUSupport +30 -24
- package/eigen/Eigen/ThreadPool +80 -0
- package/eigen/Eigen/UmfPackSupport +19 -17
- package/eigen/Eigen/Version +14 -0
- package/eigen/Eigen/src/AccelerateSupport/AccelerateSupport.h +423 -0
- package/eigen/Eigen/src/AccelerateSupport/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/Cholesky/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/Cholesky/LDLT.h +366 -405
- package/eigen/Eigen/src/Cholesky/LLT.h +323 -367
- package/eigen/Eigen/src/Cholesky/LLT_LAPACKE.h +81 -56
- package/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +585 -529
- package/eigen/Eigen/src/CholmodSupport/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/Core/ArithmeticSequence.h +143 -317
- package/eigen/Eigen/src/Core/Array.h +329 -370
- package/eigen/Eigen/src/Core/ArrayBase.h +190 -203
- package/eigen/Eigen/src/Core/ArrayWrapper.h +126 -170
- package/eigen/Eigen/src/Core/Assign.h +30 -40
- package/eigen/Eigen/src/Core/AssignEvaluator.h +651 -604
- package/eigen/Eigen/src/Core/Assign_MKL.h +125 -120
- package/eigen/Eigen/src/Core/BandMatrix.h +267 -282
- package/eigen/Eigen/src/Core/Block.h +371 -390
- package/eigen/Eigen/src/Core/CommaInitializer.h +85 -100
- package/eigen/Eigen/src/Core/ConditionEstimator.h +51 -53
- package/eigen/Eigen/src/Core/CoreEvaluators.h +1214 -937
- package/eigen/Eigen/src/Core/CoreIterators.h +72 -63
- package/eigen/Eigen/src/Core/CwiseBinaryOp.h +112 -129
- package/eigen/Eigen/src/Core/CwiseNullaryOp.h +676 -702
- package/eigen/Eigen/src/Core/CwiseTernaryOp.h +77 -103
- package/eigen/Eigen/src/Core/CwiseUnaryOp.h +55 -67
- package/eigen/Eigen/src/Core/CwiseUnaryView.h +127 -92
- package/eigen/Eigen/src/Core/DenseBase.h +630 -658
- package/eigen/Eigen/src/Core/DenseCoeffsBase.h +511 -628
- package/eigen/Eigen/src/Core/DenseStorage.h +511 -590
- package/eigen/Eigen/src/Core/DeviceWrapper.h +153 -0
- package/eigen/Eigen/src/Core/Diagonal.h +168 -207
- package/eigen/Eigen/src/Core/DiagonalMatrix.h +346 -317
- package/eigen/Eigen/src/Core/DiagonalProduct.h +12 -10
- package/eigen/Eigen/src/Core/Dot.h +167 -217
- package/eigen/Eigen/src/Core/EigenBase.h +74 -85
- package/eigen/Eigen/src/Core/Fill.h +138 -0
- package/eigen/Eigen/src/Core/FindCoeff.h +464 -0
- package/eigen/Eigen/src/Core/ForceAlignedAccess.h +90 -113
- package/eigen/Eigen/src/Core/Fuzzy.h +82 -105
- package/eigen/Eigen/src/Core/GeneralProduct.h +315 -261
- package/eigen/Eigen/src/Core/GenericPacketMath.h +1182 -520
- package/eigen/Eigen/src/Core/GlobalFunctions.h +193 -157
- package/eigen/Eigen/src/Core/IO.h +131 -156
- package/eigen/Eigen/src/Core/IndexedView.h +209 -125
- package/eigen/Eigen/src/Core/InnerProduct.h +260 -0
- package/eigen/Eigen/src/Core/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/Core/Inverse.h +50 -59
- package/eigen/Eigen/src/Core/Map.h +123 -141
- package/eigen/Eigen/src/Core/MapBase.h +255 -282
- package/eigen/Eigen/src/Core/MathFunctions.h +1247 -1201
- package/eigen/Eigen/src/Core/MathFunctionsImpl.h +162 -99
- package/eigen/Eigen/src/Core/Matrix.h +463 -494
- package/eigen/Eigen/src/Core/MatrixBase.h +468 -470
- package/eigen/Eigen/src/Core/NestByValue.h +58 -52
- package/eigen/Eigen/src/Core/NoAlias.h +79 -86
- package/eigen/Eigen/src/Core/NumTraits.h +206 -206
- package/eigen/Eigen/src/Core/PartialReduxEvaluator.h +163 -142
- package/eigen/Eigen/src/Core/PermutationMatrix.h +461 -511
- package/eigen/Eigen/src/Core/PlainObjectBase.h +858 -972
- package/eigen/Eigen/src/Core/Product.h +246 -130
- package/eigen/Eigen/src/Core/ProductEvaluators.h +779 -671
- package/eigen/Eigen/src/Core/Random.h +153 -164
- package/eigen/Eigen/src/Core/RandomImpl.h +262 -0
- package/eigen/Eigen/src/Core/RealView.h +250 -0
- package/eigen/Eigen/src/Core/Redux.h +334 -314
- package/eigen/Eigen/src/Core/Ref.h +259 -257
- package/eigen/Eigen/src/Core/Replicate.h +92 -104
- package/eigen/Eigen/src/Core/Reshaped.h +215 -271
- package/eigen/Eigen/src/Core/ReturnByValue.h +47 -55
- package/eigen/Eigen/src/Core/Reverse.h +133 -148
- package/eigen/Eigen/src/Core/Select.h +68 -140
- package/eigen/Eigen/src/Core/SelfAdjointView.h +254 -290
- package/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h +23 -20
- package/eigen/Eigen/src/Core/SkewSymmetricMatrix3.h +382 -0
- package/eigen/Eigen/src/Core/Solve.h +88 -102
- package/eigen/Eigen/src/Core/SolveTriangular.h +126 -124
- package/eigen/Eigen/src/Core/SolverBase.h +132 -133
- package/eigen/Eigen/src/Core/StableNorm.h +113 -147
- package/eigen/Eigen/src/Core/StlIterators.h +404 -248
- package/eigen/Eigen/src/Core/Stride.h +90 -92
- package/eigen/Eigen/src/Core/Swap.h +70 -39
- package/eigen/Eigen/src/Core/Transpose.h +258 -295
- package/eigen/Eigen/src/Core/Transpositions.h +270 -333
- package/eigen/Eigen/src/Core/TriangularMatrix.h +642 -743
- package/eigen/Eigen/src/Core/VectorBlock.h +59 -72
- package/eigen/Eigen/src/Core/VectorwiseOp.h +653 -704
- package/eigen/Eigen/src/Core/Visitor.h +464 -308
- package/eigen/Eigen/src/Core/arch/AVX/Complex.h +380 -187
- package/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +65 -163
- package/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +2145 -638
- package/eigen/Eigen/src/Core/arch/AVX/Reductions.h +353 -0
- package/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +253 -60
- package/eigen/Eigen/src/Core/arch/AVX512/Complex.h +278 -228
- package/eigen/Eigen/src/Core/arch/AVX512/GemmKernel.h +1245 -0
- package/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +48 -269
- package/eigen/Eigen/src/Core/arch/AVX512/MathFunctionsFP16.h +75 -0
- package/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +1597 -754
- package/eigen/Eigen/src/Core/arch/AVX512/PacketMathFP16.h +1413 -0
- package/eigen/Eigen/src/Core/arch/AVX512/Reductions.h +297 -0
- package/eigen/Eigen/src/Core/arch/AVX512/TrsmKernel.h +1167 -0
- package/eigen/Eigen/src/Core/arch/AVX512/TrsmUnrolls.inc +1219 -0
- package/eigen/Eigen/src/Core/arch/AVX512/TypeCasting.h +229 -41
- package/eigen/Eigen/src/Core/arch/AVX512/TypeCastingFP16.h +130 -0
- package/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +420 -184
- package/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +40 -49
- package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2962 -2213
- package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +196 -212
- package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +713 -441
- package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMAbfloat16.h +742 -0
- package/eigen/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.inc +2818 -0
- package/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +2380 -1362
- package/eigen/Eigen/src/Core/arch/AltiVec/TypeCasting.h +153 -0
- package/eigen/Eigen/src/Core/arch/Default/BFloat16.h +390 -224
- package/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +78 -67
- package/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1784 -799
- package/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +167 -50
- package/eigen/Eigen/src/Core/arch/Default/Half.h +528 -379
- package/eigen/Eigen/src/Core/arch/Default/Settings.h +10 -12
- package/eigen/Eigen/src/Core/arch/GPU/Complex.h +244 -0
- package/eigen/Eigen/src/Core/arch/GPU/MathFunctions.h +41 -40
- package/eigen/Eigen/src/Core/arch/GPU/PacketMath.h +550 -523
- package/eigen/Eigen/src/Core/arch/GPU/Tuple.h +268 -0
- package/eigen/Eigen/src/Core/arch/GPU/TypeCasting.h +27 -30
- package/eigen/Eigen/src/Core/arch/HIP/hcc/math_constants.h +8 -8
- package/eigen/Eigen/src/Core/arch/HVX/PacketMath.h +1088 -0
- package/eigen/Eigen/src/Core/arch/LSX/Complex.h +520 -0
- package/eigen/Eigen/src/Core/arch/LSX/GeneralBlockPanelKernel.h +23 -0
- package/eigen/Eigen/src/Core/arch/LSX/MathFunctions.h +43 -0
- package/eigen/Eigen/src/Core/arch/LSX/PacketMath.h +2866 -0
- package/eigen/Eigen/src/Core/arch/LSX/TypeCasting.h +526 -0
- package/eigen/Eigen/src/Core/arch/MSA/Complex.h +54 -82
- package/eigen/Eigen/src/Core/arch/MSA/MathFunctions.h +84 -92
- package/eigen/Eigen/src/Core/arch/MSA/PacketMath.h +51 -47
- package/eigen/Eigen/src/Core/arch/NEON/Complex.h +454 -306
- package/eigen/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +175 -115
- package/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +23 -30
- package/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +4366 -2857
- package/eigen/Eigen/src/Core/arch/NEON/TypeCasting.h +616 -393
- package/eigen/Eigen/src/Core/arch/NEON/UnaryFunctors.h +57 -0
- package/eigen/Eigen/src/Core/arch/SSE/Complex.h +350 -198
- package/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +38 -149
- package/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +1791 -912
- package/eigen/Eigen/src/Core/arch/SSE/Reductions.h +324 -0
- package/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +128 -40
- package/eigen/Eigen/src/Core/arch/SVE/MathFunctions.h +10 -6
- package/eigen/Eigen/src/Core/arch/SVE/PacketMath.h +156 -234
- package/eigen/Eigen/src/Core/arch/SVE/TypeCasting.h +6 -3
- package/eigen/Eigen/src/Core/arch/SYCL/InteropHeaders.h +27 -32
- package/eigen/Eigen/src/Core/arch/SYCL/MathFunctions.h +119 -117
- package/eigen/Eigen/src/Core/arch/SYCL/PacketMath.h +325 -419
- package/eigen/Eigen/src/Core/arch/SYCL/TypeCasting.h +15 -17
- package/eigen/Eigen/src/Core/arch/ZVector/Complex.h +325 -181
- package/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +94 -83
- package/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +811 -458
- package/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +121 -124
- package/eigen/Eigen/src/Core/functors/BinaryFunctors.h +576 -370
- package/eigen/Eigen/src/Core/functors/NullaryFunctors.h +194 -109
- package/eigen/Eigen/src/Core/functors/StlFunctors.h +95 -112
- package/eigen/Eigen/src/Core/functors/TernaryFunctors.h +34 -7
- package/eigen/Eigen/src/Core/functors/UnaryFunctors.h +1038 -749
- package/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +1883 -1375
- package/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +312 -370
- package/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +189 -176
- package/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +84 -81
- package/eigen/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +154 -73
- package/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +292 -337
- package/eigen/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +80 -77
- package/eigen/Eigen/src/Core/products/Parallelizer.h +207 -105
- package/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +327 -388
- package/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +206 -224
- package/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +138 -147
- package/eigen/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +58 -61
- package/eigen/Eigen/src/Core/products/SelfadjointProduct.h +71 -71
- package/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +48 -47
- package/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +294 -369
- package/eigen/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +246 -238
- package/eigen/Eigen/src/Core/products/TriangularMatrixVector.h +244 -247
- package/eigen/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +212 -192
- package/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +328 -277
- package/eigen/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +108 -109
- package/eigen/Eigen/src/Core/products/TriangularSolverVector.h +68 -94
- package/eigen/Eigen/src/Core/util/Assert.h +158 -0
- package/eigen/Eigen/src/Core/util/BlasUtil.h +342 -303
- package/eigen/Eigen/src/Core/util/ConfigureVectorization.h +348 -317
- package/eigen/Eigen/src/Core/util/Constants.h +297 -262
- package/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +130 -90
- package/eigen/Eigen/src/Core/util/EmulateArray.h +270 -0
- package/eigen/Eigen/src/Core/util/ForwardDeclarations.h +449 -247
- package/eigen/Eigen/src/Core/util/GpuHipCudaDefines.inc +101 -0
- package/eigen/Eigen/src/Core/util/GpuHipCudaUndefines.inc +45 -0
- package/eigen/Eigen/src/Core/util/IndexedViewHelper.h +417 -116
- package/eigen/Eigen/src/Core/util/IntegralConstant.h +211 -204
- package/eigen/Eigen/src/Core/util/MKL_support.h +39 -37
- package/eigen/Eigen/src/Core/util/Macros.h +655 -773
- package/eigen/Eigen/src/Core/util/MaxSizeVector.h +139 -0
- package/eigen/Eigen/src/Core/util/Memory.h +970 -748
- package/eigen/Eigen/src/Core/util/Meta.h +581 -633
- package/eigen/Eigen/src/Core/util/MoreMeta.h +638 -0
- package/eigen/Eigen/src/Core/util/ReenableStupidWarnings.h +32 -19
- package/eigen/Eigen/src/Core/util/ReshapedHelper.h +17 -17
- package/eigen/Eigen/src/Core/util/Serializer.h +209 -0
- package/eigen/Eigen/src/Core/util/StaticAssert.h +50 -166
- package/eigen/Eigen/src/Core/util/SymbolicIndex.h +377 -225
- package/eigen/Eigen/src/Core/util/XprHelper.h +784 -547
- package/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +246 -277
- package/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +299 -319
- package/eigen/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +52 -48
- package/eigen/Eigen/src/Eigenvalues/EigenSolver.h +413 -456
- package/eigen/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +309 -325
- package/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +157 -171
- package/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +292 -310
- package/eigen/Eigen/src/Eigenvalues/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +89 -105
- package/eigen/Eigen/src/Eigenvalues/RealQZ.h +537 -607
- package/eigen/Eigen/src/Eigenvalues/RealSchur.h +342 -381
- package/eigen/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +41 -35
- package/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +541 -595
- package/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +47 -44
- package/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +430 -462
- package/eigen/Eigen/src/Geometry/AlignedBox.h +226 -227
- package/eigen/Eigen/src/Geometry/AngleAxis.h +131 -133
- package/eigen/Eigen/src/Geometry/EulerAngles.h +163 -74
- package/eigen/Eigen/src/Geometry/Homogeneous.h +285 -333
- package/eigen/Eigen/src/Geometry/Hyperplane.h +151 -160
- package/eigen/Eigen/src/Geometry/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/Geometry/OrthoMethods.h +168 -146
- package/eigen/Eigen/src/Geometry/ParametrizedLine.h +127 -127
- package/eigen/Eigen/src/Geometry/Quaternion.h +566 -506
- package/eigen/Eigen/src/Geometry/Rotation2D.h +107 -105
- package/eigen/Eigen/src/Geometry/RotationBase.h +148 -145
- package/eigen/Eigen/src/Geometry/Scaling.h +113 -106
- package/eigen/Eigen/src/Geometry/Transform.h +858 -936
- package/eigen/Eigen/src/Geometry/Translation.h +94 -92
- package/eigen/Eigen/src/Geometry/Umeyama.h +79 -84
- package/eigen/Eigen/src/Geometry/arch/Geometry_SIMD.h +90 -104
- package/eigen/Eigen/src/Householder/BlockHouseholder.h +51 -46
- package/eigen/Eigen/src/Householder/Householder.h +102 -124
- package/eigen/Eigen/src/Householder/HouseholderSequence.h +412 -453
- package/eigen/Eigen/src/Householder/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +149 -162
- package/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +124 -119
- package/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +92 -104
- package/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +251 -243
- package/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +224 -228
- package/eigen/Eigen/src/IterativeLinearSolvers/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +178 -227
- package/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +79 -84
- package/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +54 -60
- package/eigen/Eigen/src/Jacobi/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/Jacobi/Jacobi.h +252 -308
- package/eigen/Eigen/src/KLUSupport/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/KLUSupport/KLUSupport.h +208 -227
- package/eigen/Eigen/src/LU/Determinant.h +50 -69
- package/eigen/Eigen/src/LU/FullPivLU.h +545 -596
- package/eigen/Eigen/src/LU/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/LU/InverseImpl.h +206 -285
- package/eigen/Eigen/src/LU/PartialPivLU.h +390 -428
- package/eigen/Eigen/src/LU/PartialPivLU_LAPACKE.h +54 -40
- package/eigen/Eigen/src/LU/arch/InverseSize4.h +72 -70
- package/eigen/Eigen/src/MetisSupport/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/MetisSupport/MetisSupport.h +81 -93
- package/eigen/Eigen/src/OrderingMethods/Amd.h +243 -265
- package/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +831 -1004
- package/eigen/Eigen/src/OrderingMethods/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/OrderingMethods/Ordering.h +112 -119
- package/eigen/Eigen/src/PaStiXSupport/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +524 -570
- package/eigen/Eigen/src/PardisoSupport/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +385 -430
- package/eigen/Eigen/src/QR/ColPivHouseholderQR.h +479 -479
- package/eigen/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +120 -56
- package/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +166 -153
- package/eigen/Eigen/src/QR/FullPivHouseholderQR.h +495 -475
- package/eigen/Eigen/src/QR/HouseholderQR.h +394 -285
- package/eigen/Eigen/src/QR/HouseholderQR_LAPACKE.h +32 -23
- package/eigen/Eigen/src/QR/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/SPQRSupport/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +244 -264
- package/eigen/Eigen/src/SVD/BDCSVD.h +817 -713
- package/eigen/Eigen/src/SVD/BDCSVD_LAPACKE.h +174 -0
- package/eigen/Eigen/src/SVD/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/SVD/JacobiSVD.h +577 -543
- package/eigen/Eigen/src/SVD/JacobiSVD_LAPACKE.h +85 -49
- package/eigen/Eigen/src/SVD/SVDBase.h +242 -182
- package/eigen/Eigen/src/SVD/UpperBidiagonalization.h +200 -235
- package/eigen/Eigen/src/SparseCholesky/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +765 -594
- package/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +308 -94
- package/eigen/Eigen/src/SparseCore/AmbiVector.h +202 -251
- package/eigen/Eigen/src/SparseCore/CompressedStorage.h +184 -252
- package/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +134 -178
- package/eigen/Eigen/src/SparseCore/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/SparseCore/SparseAssign.h +149 -140
- package/eigen/Eigen/src/SparseCore/SparseBlock.h +403 -440
- package/eigen/Eigen/src/SparseCore/SparseColEtree.h +100 -112
- package/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +525 -303
- package/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +555 -339
- package/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +100 -108
- package/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +169 -197
- package/eigen/Eigen/src/SparseCore/SparseDiagonalProduct.h +71 -71
- package/eigen/Eigen/src/SparseCore/SparseDot.h +49 -47
- package/eigen/Eigen/src/SparseCore/SparseFuzzy.h +13 -11
- package/eigen/Eigen/src/SparseCore/SparseMap.h +243 -253
- package/eigen/Eigen/src/SparseCore/SparseMatrix.h +1603 -1245
- package/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +403 -350
- package/eigen/Eigen/src/SparseCore/SparsePermutation.h +186 -115
- package/eigen/Eigen/src/SparseCore/SparseProduct.h +94 -97
- package/eigen/Eigen/src/SparseCore/SparseRedux.h +22 -24
- package/eigen/Eigen/src/SparseCore/SparseRef.h +268 -295
- package/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +370 -416
- package/eigen/Eigen/src/SparseCore/SparseSolverBase.h +78 -87
- package/eigen/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +81 -95
- package/eigen/Eigen/src/SparseCore/SparseTranspose.h +62 -71
- package/eigen/Eigen/src/SparseCore/SparseTriangularView.h +132 -144
- package/eigen/Eigen/src/SparseCore/SparseUtil.h +138 -115
- package/eigen/Eigen/src/SparseCore/SparseVector.h +426 -372
- package/eigen/Eigen/src/SparseCore/SparseView.h +164 -193
- package/eigen/Eigen/src/SparseCore/TriangularSolver.h +129 -170
- package/eigen/Eigen/src/SparseLU/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/SparseLU/SparseLU.h +756 -710
- package/eigen/Eigen/src/SparseLU/SparseLUImpl.h +61 -48
- package/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +102 -118
- package/eigen/Eigen/src/SparseLU/SparseLU_Structs.h +38 -35
- package/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +245 -301
- package/eigen/Eigen/src/SparseLU/SparseLU_Utils.h +44 -49
- package/eigen/Eigen/src/SparseLU/SparseLU_column_bmod.h +104 -108
- package/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +89 -100
- package/eigen/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +57 -58
- package/eigen/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +43 -55
- package/eigen/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +74 -71
- package/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +124 -132
- package/eigen/Eigen/src/SparseLU/SparseLU_panel_dfs.h +136 -159
- package/eigen/Eigen/src/SparseLU/SparseLU_pivotL.h +51 -52
- package/eigen/Eigen/src/SparseLU/SparseLU_pruneL.h +67 -73
- package/eigen/Eigen/src/SparseLU/SparseLU_relax_snode.h +24 -26
- package/eigen/Eigen/src/SparseQR/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/SparseQR/SparseQR.h +450 -502
- package/eigen/Eigen/src/StlSupport/StdDeque.h +28 -93
- package/eigen/Eigen/src/StlSupport/StdList.h +28 -84
- package/eigen/Eigen/src/StlSupport/StdVector.h +28 -108
- package/eigen/Eigen/src/StlSupport/details.h +48 -50
- package/eigen/Eigen/src/SuperLUSupport/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +634 -730
- package/eigen/Eigen/src/ThreadPool/Barrier.h +70 -0
- package/eigen/Eigen/src/ThreadPool/CoreThreadPoolDevice.h +336 -0
- package/eigen/Eigen/src/ThreadPool/EventCount.h +241 -0
- package/eigen/Eigen/src/ThreadPool/ForkJoin.h +140 -0
- package/eigen/Eigen/src/ThreadPool/InternalHeaderCheck.h +4 -0
- package/eigen/Eigen/src/ThreadPool/NonBlockingThreadPool.h +587 -0
- package/eigen/Eigen/src/ThreadPool/RunQueue.h +230 -0
- package/eigen/Eigen/src/ThreadPool/ThreadCancel.h +21 -0
- package/eigen/Eigen/src/ThreadPool/ThreadEnvironment.h +43 -0
- package/eigen/Eigen/src/ThreadPool/ThreadLocal.h +289 -0
- package/eigen/Eigen/src/ThreadPool/ThreadPoolInterface.h +50 -0
- package/eigen/Eigen/src/ThreadPool/ThreadYield.h +16 -0
- package/eigen/Eigen/src/UmfPackSupport/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +428 -464
- package/eigen/Eigen/src/misc/Image.h +41 -43
- package/eigen/Eigen/src/misc/InternalHeaderCheck.h +3 -0
- package/eigen/Eigen/src/misc/Kernel.h +39 -41
- package/eigen/Eigen/src/misc/RealSvd2x2.h +19 -21
- package/eigen/Eigen/src/misc/blas.h +83 -426
- package/eigen/Eigen/src/misc/lapacke.h +9972 -16179
- package/eigen/Eigen/src/misc/lapacke_helpers.h +163 -0
- package/eigen/Eigen/src/misc/lapacke_mangling.h +4 -5
- package/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.inc +344 -0
- package/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.inc +544 -0
- package/eigen/Eigen/src/plugins/{BlockMethods.h → BlockMethods.inc} +434 -506
- package/eigen/Eigen/src/plugins/CommonCwiseBinaryOps.inc +116 -0
- package/eigen/Eigen/src/plugins/{CommonCwiseUnaryOps.h → CommonCwiseUnaryOps.inc} +58 -68
- package/eigen/Eigen/src/plugins/IndexedViewMethods.inc +192 -0
- package/eigen/Eigen/src/plugins/InternalHeaderCheck.inc +3 -0
- package/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.inc +331 -0
- package/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.inc +118 -0
- package/eigen/Eigen/src/plugins/ReshapedMethods.inc +133 -0
- package/package.json +1 -1
- package/eigen/COPYING.APACHE +0 -203
- package/eigen/COPYING.BSD +0 -26
- package/eigen/COPYING.GPL +0 -674
- package/eigen/COPYING.LGPL +0 -502
- package/eigen/COPYING.MINPACK +0 -51
- package/eigen/COPYING.MPL2 +0 -373
- package/eigen/COPYING.README +0 -18
- package/eigen/Eigen/src/Core/BooleanRedux.h +0 -162
- package/eigen/Eigen/src/Core/arch/CUDA/Complex.h +0 -258
- package/eigen/Eigen/src/Core/arch/Default/TypeCasting.h +0 -120
- package/eigen/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +0 -694
- package/eigen/Eigen/src/Core/util/NonMPL2.h +0 -3
- package/eigen/Eigen/src/SparseCore/MappedSparseMatrix.h +0 -67
- package/eigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +0 -280
- package/eigen/Eigen/src/misc/lapack.h +0 -152
- package/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.h +0 -358
- package/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.h +0 -696
- package/eigen/Eigen/src/plugins/CommonCwiseBinaryOps.h +0 -115
- package/eigen/Eigen/src/plugins/IndexedViewMethods.h +0 -262
- package/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.h +0 -152
- package/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.h +0 -95
- package/eigen/Eigen/src/plugins/ReshapedMethods.h +0 -149
- package/eigen/README.md +0 -5
|
@@ -10,18 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
#ifndef EIGEN_MACROS_H
|
|
12
12
|
#define EIGEN_MACROS_H
|
|
13
|
+
// IWYU pragma: private
|
|
14
|
+
#include "../InternalHeaderCheck.h"
|
|
13
15
|
|
|
14
16
|
//------------------------------------------------------------------------------------------
|
|
15
17
|
// Eigen version and basic defaults
|
|
16
18
|
//------------------------------------------------------------------------------------------
|
|
17
19
|
|
|
18
|
-
#define
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
#define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \
|
|
23
|
-
(EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \
|
|
24
|
-
EIGEN_MINOR_VERSION>=z))))
|
|
20
|
+
#define EIGEN_VERSION_AT_LEAST(x, y, z) \
|
|
21
|
+
(EIGEN_MAJOR_VERSION > x || \
|
|
22
|
+
(EIGEN_MAJOR_VERSION >= x && (EIGEN_MINOR_VERSION > y || (EIGEN_MINOR_VERSION >= y && EIGEN_PATCH_VERSION >= z))))
|
|
25
23
|
|
|
26
24
|
#ifdef EIGEN_DEFAULT_TO_ROW_MAJOR
|
|
27
25
|
#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Eigen::RowMajor
|
|
@@ -41,10 +39,10 @@
|
|
|
41
39
|
#endif
|
|
42
40
|
|
|
43
41
|
/** Allows to disable some optimizations which might affect the accuracy of the result.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
* Such optimization are enabled by default, and set EIGEN_FAST_MATH to 0 to disable them.
|
|
43
|
+
* They currently include:
|
|
44
|
+
* - single precision ArrayBase::sin() and ArrayBase::cos() for SSE and AVX vectorization.
|
|
45
|
+
*/
|
|
48
46
|
#ifndef EIGEN_FAST_MATH
|
|
49
47
|
#define EIGEN_FAST_MATH 1
|
|
50
48
|
#endif
|
|
@@ -54,84 +52,115 @@
|
|
|
54
52
|
#define EIGEN_STACK_ALLOCATION_LIMIT 131072
|
|
55
53
|
#endif
|
|
56
54
|
|
|
55
|
+
/* Specify whether to use std::fma for scalar multiply-add instructions.
|
|
56
|
+
*
|
|
57
|
+
* On machines that have FMA as a single instruction, this will generally
|
|
58
|
+
* improve precision without significant performance implications.
|
|
59
|
+
*
|
|
60
|
+
* Without a single instruction, performance has been found to be reduced 2-3x
|
|
61
|
+
* on Intel CPUs, and up to 30x for WASM.
|
|
62
|
+
*
|
|
63
|
+
* If unspecified, defaults to using FMA if hardware support is available.
|
|
64
|
+
* The default should be used in most cases to ensure consistency between
|
|
65
|
+
* vectorized and non-vectorized paths.
|
|
66
|
+
*/
|
|
67
|
+
#ifndef EIGEN_SCALAR_MADD_USE_FMA
|
|
68
|
+
#ifdef EIGEN_VECTORIZE_FMA
|
|
69
|
+
#define EIGEN_SCALAR_MADD_USE_FMA 1
|
|
70
|
+
#else
|
|
71
|
+
#define EIGEN_SCALAR_MADD_USE_FMA 0
|
|
72
|
+
#endif
|
|
73
|
+
#endif
|
|
74
|
+
|
|
57
75
|
//------------------------------------------------------------------------------------------
|
|
58
76
|
// Compiler identification, EIGEN_COMP_*
|
|
59
77
|
//------------------------------------------------------------------------------------------
|
|
60
78
|
|
|
61
|
-
/// \internal EIGEN_COMP_GNUC set to 1 for all compilers compatible with GCC
|
|
79
|
+
/// \internal EIGEN_COMP_GNUC set to version (e.g., 951 for GCC 9.5.1) for all compilers compatible with GCC
|
|
62
80
|
#ifdef __GNUC__
|
|
63
|
-
|
|
81
|
+
#define EIGEN_COMP_GNUC (__GNUC__ * 100 + __GNUC_MINOR__ * 10 + __GNUC_PATCHLEVEL__)
|
|
64
82
|
#else
|
|
65
|
-
|
|
83
|
+
#define EIGEN_COMP_GNUC 0
|
|
66
84
|
#endif
|
|
67
85
|
|
|
68
|
-
/// \internal EIGEN_COMP_CLANG set to
|
|
86
|
+
/// \internal EIGEN_COMP_CLANG set to version (e.g., 372 for clang 3.7.2) if the compiler is clang
|
|
69
87
|
#if defined(__clang__)
|
|
70
|
-
|
|
88
|
+
#define EIGEN_COMP_CLANG (__clang_major__ * 100 + __clang_minor__ * 10 + __clang_patchlevel__)
|
|
71
89
|
#else
|
|
72
|
-
|
|
90
|
+
#define EIGEN_COMP_CLANG 0
|
|
91
|
+
#endif
|
|
92
|
+
|
|
93
|
+
/// \internal EIGEN_COMP_CLANGAPPLE set to the version number (e.g. 9000000 for AppleClang 9.0) if the compiler is
|
|
94
|
+
/// AppleClang
|
|
95
|
+
#if defined(__clang__) && defined(__apple_build_version__)
|
|
96
|
+
#define EIGEN_COMP_CLANGAPPLE __apple_build_version__
|
|
97
|
+
#else
|
|
98
|
+
#define EIGEN_COMP_CLANGAPPLE 0
|
|
73
99
|
#endif
|
|
74
100
|
|
|
75
101
|
/// \internal EIGEN_COMP_CASTXML set to 1 if being preprocessed by CastXML
|
|
76
102
|
#if defined(__castxml__)
|
|
77
|
-
|
|
103
|
+
#define EIGEN_COMP_CASTXML 1
|
|
78
104
|
#else
|
|
79
|
-
|
|
105
|
+
#define EIGEN_COMP_CASTXML 0
|
|
80
106
|
#endif
|
|
81
107
|
|
|
82
108
|
/// \internal EIGEN_COMP_LLVM set to 1 if the compiler backend is llvm
|
|
83
109
|
#if defined(__llvm__)
|
|
84
|
-
|
|
110
|
+
#define EIGEN_COMP_LLVM 1
|
|
85
111
|
#else
|
|
86
|
-
|
|
112
|
+
#define EIGEN_COMP_LLVM 0
|
|
87
113
|
#endif
|
|
88
114
|
|
|
89
|
-
/// \internal EIGEN_COMP_ICC set to __INTEL_COMPILER if the compiler is Intel compiler, 0 otherwise
|
|
115
|
+
/// \internal EIGEN_COMP_ICC set to __INTEL_COMPILER if the compiler is Intel icc compiler, 0 otherwise
|
|
90
116
|
#if defined(__INTEL_COMPILER)
|
|
91
|
-
|
|
117
|
+
#define EIGEN_COMP_ICC __INTEL_COMPILER
|
|
92
118
|
#else
|
|
93
|
-
|
|
119
|
+
#define EIGEN_COMP_ICC 0
|
|
120
|
+
#endif
|
|
121
|
+
|
|
122
|
+
/// \internal EIGEN_COMP_CLANGICC set to __INTEL_CLANG_COMPILER if the compiler is Intel icx compiler, 0 otherwise
|
|
123
|
+
#if defined(__INTEL_CLANG_COMPILER)
|
|
124
|
+
#define EIGEN_COMP_CLANGICC __INTEL_CLANG_COMPILER
|
|
125
|
+
#else
|
|
126
|
+
#define EIGEN_COMP_CLANGICC 0
|
|
94
127
|
#endif
|
|
95
128
|
|
|
96
129
|
/// \internal EIGEN_COMP_MINGW set to 1 if the compiler is mingw
|
|
97
130
|
#if defined(__MINGW32__)
|
|
98
|
-
|
|
131
|
+
#define EIGEN_COMP_MINGW 1
|
|
99
132
|
#else
|
|
100
|
-
|
|
133
|
+
#define EIGEN_COMP_MINGW 0
|
|
101
134
|
#endif
|
|
102
135
|
|
|
103
136
|
/// \internal EIGEN_COMP_SUNCC set to 1 if the compiler is Solaris Studio
|
|
104
137
|
#if defined(__SUNPRO_CC)
|
|
105
|
-
|
|
138
|
+
#define EIGEN_COMP_SUNCC 1
|
|
106
139
|
#else
|
|
107
|
-
|
|
140
|
+
#define EIGEN_COMP_SUNCC 0
|
|
108
141
|
#endif
|
|
109
142
|
|
|
110
143
|
/// \internal EIGEN_COMP_MSVC set to _MSC_VER if the compiler is Microsoft Visual C++, 0 otherwise.
|
|
111
144
|
#if defined(_MSC_VER)
|
|
112
|
-
|
|
145
|
+
#define EIGEN_COMP_MSVC _MSC_VER
|
|
113
146
|
#else
|
|
114
|
-
|
|
147
|
+
#define EIGEN_COMP_MSVC 0
|
|
115
148
|
#endif
|
|
116
149
|
|
|
117
150
|
#if defined(__NVCC__)
|
|
118
151
|
#if defined(__CUDACC_VER_MAJOR__) && (__CUDACC_VER_MAJOR__ >= 9)
|
|
119
|
-
|
|
152
|
+
#define EIGEN_COMP_NVCC ((__CUDACC_VER_MAJOR__ * 10000) + (__CUDACC_VER_MINOR__ * 100))
|
|
120
153
|
#elif defined(__CUDACC_VER__)
|
|
121
|
-
|
|
154
|
+
#define EIGEN_COMP_NVCC __CUDACC_VER__
|
|
122
155
|
#else
|
|
123
|
-
|
|
156
|
+
#error "NVCC did not define compiler version."
|
|
124
157
|
#endif
|
|
125
158
|
#else
|
|
126
|
-
|
|
159
|
+
#define EIGEN_COMP_NVCC 0
|
|
127
160
|
#endif
|
|
128
161
|
|
|
129
162
|
// For the record, here is a table summarizing the possible values for EIGEN_COMP_MSVC:
|
|
130
163
|
// name ver MSC_VER
|
|
131
|
-
// 2008 9 1500
|
|
132
|
-
// 2010 10 1600
|
|
133
|
-
// 2012 11 1700
|
|
134
|
-
// 2013 12 1800
|
|
135
164
|
// 2015 14 1900
|
|
136
165
|
// "15" 15 1900
|
|
137
166
|
// 2017-14.1 15.0 1910
|
|
@@ -139,12 +168,15 @@
|
|
|
139
168
|
// 2017-14.12 15.5 1912
|
|
140
169
|
// 2017-14.13 15.6 1913
|
|
141
170
|
// 2017-14.14 15.7 1914
|
|
171
|
+
// 2017 15.8 1915
|
|
172
|
+
// 2017 15.9 1916
|
|
173
|
+
// 2019 RTW 16.0 1920
|
|
142
174
|
|
|
143
175
|
/// \internal EIGEN_COMP_MSVC_LANG set to _MSVC_LANG if the compiler is Microsoft Visual C++, 0 otherwise.
|
|
144
176
|
#if defined(_MSVC_LANG)
|
|
145
|
-
|
|
177
|
+
#define EIGEN_COMP_MSVC_LANG _MSVC_LANG
|
|
146
178
|
#else
|
|
147
|
-
|
|
179
|
+
#define EIGEN_COMP_MSVC_LANG 0
|
|
148
180
|
#endif
|
|
149
181
|
|
|
150
182
|
// For the record, here is a table summarizing the possible values for EIGEN_COMP_MSVC_LANG:
|
|
@@ -153,11 +185,12 @@
|
|
|
153
185
|
// /std:c++17 C++17 201703L
|
|
154
186
|
// /std:c++latest >C++17 >201703L
|
|
155
187
|
|
|
156
|
-
/// \internal EIGEN_COMP_MSVC_STRICT set to 1 if the compiler is really Microsoft Visual C++ and not ,e.g., ICC or
|
|
188
|
+
/// \internal EIGEN_COMP_MSVC_STRICT set to 1 if the compiler is really Microsoft Visual C++ and not ,e.g., ICC or
|
|
189
|
+
/// clang-cl
|
|
157
190
|
#if EIGEN_COMP_MSVC && !(EIGEN_COMP_ICC || EIGEN_COMP_LLVM || EIGEN_COMP_CLANG)
|
|
158
|
-
|
|
191
|
+
#define EIGEN_COMP_MSVC_STRICT _MSC_VER
|
|
159
192
|
#else
|
|
160
|
-
|
|
193
|
+
#define EIGEN_COMP_MSVC_STRICT 0
|
|
161
194
|
#endif
|
|
162
195
|
|
|
163
196
|
/// \internal EIGEN_COMP_IBM set to xlc version if the compiler is IBM XL C++
|
|
@@ -167,102 +200,170 @@
|
|
|
167
200
|
// 5.0 0x0500
|
|
168
201
|
// 12.1 0x0C01
|
|
169
202
|
#if defined(__IBMCPP__) || defined(__xlc__) || defined(__ibmxl__)
|
|
170
|
-
|
|
203
|
+
#define EIGEN_COMP_IBM __xlC__
|
|
171
204
|
#else
|
|
172
|
-
|
|
205
|
+
#define EIGEN_COMP_IBM 0
|
|
173
206
|
#endif
|
|
174
207
|
|
|
175
208
|
/// \internal EIGEN_COMP_PGI set to PGI version if the compiler is Portland Group Compiler
|
|
176
209
|
#if defined(__PGI)
|
|
177
|
-
|
|
210
|
+
#define EIGEN_COMP_PGI (__PGIC__ * 100 + __PGIC_MINOR__)
|
|
178
211
|
#else
|
|
179
|
-
|
|
212
|
+
#define EIGEN_COMP_PGI 0
|
|
213
|
+
#endif
|
|
214
|
+
|
|
215
|
+
/// \internal EIGEN_COMP_NVHPC set to NVHPC version if the compiler is nvc++
|
|
216
|
+
#if defined(__NVCOMPILER)
|
|
217
|
+
#define EIGEN_COMP_NVHPC (__NVCOMPILER_MAJOR__ * 100 + __NVCOMPILER_MINOR__)
|
|
218
|
+
#else
|
|
219
|
+
#define EIGEN_COMP_NVHPC 0
|
|
180
220
|
#endif
|
|
181
221
|
|
|
182
222
|
/// \internal EIGEN_COMP_ARM set to 1 if the compiler is ARM Compiler
|
|
183
223
|
#if defined(__CC_ARM) || defined(__ARMCC_VERSION)
|
|
184
|
-
|
|
224
|
+
#define EIGEN_COMP_ARM 1
|
|
185
225
|
#else
|
|
186
|
-
|
|
226
|
+
#define EIGEN_COMP_ARM 0
|
|
187
227
|
#endif
|
|
188
228
|
|
|
189
229
|
/// \internal EIGEN_COMP_EMSCRIPTEN set to 1 if the compiler is Emscripten Compiler
|
|
190
230
|
#if defined(__EMSCRIPTEN__)
|
|
191
|
-
|
|
231
|
+
#define EIGEN_COMP_EMSCRIPTEN 1
|
|
192
232
|
#else
|
|
193
|
-
|
|
233
|
+
#define EIGEN_COMP_EMSCRIPTEN 0
|
|
194
234
|
#endif
|
|
195
235
|
|
|
236
|
+
/// \internal EIGEN_COMP_FCC set to FCC version if the compiler is Fujitsu Compiler (traditional mode)
|
|
237
|
+
/// \note The Fujitsu C/C++ compiler uses the traditional mode based
|
|
238
|
+
/// on EDG g++ 6.1 by default or if invoked with the -Nnoclang flag
|
|
239
|
+
#if defined(__FUJITSU)
|
|
240
|
+
#define EIGEN_COMP_FCC (__FCC_major__ * 100 + __FCC_minor__ * 10 + __FCC_patchlevel__)
|
|
241
|
+
#else
|
|
242
|
+
#define EIGEN_COMP_FCC 0
|
|
243
|
+
#endif
|
|
196
244
|
|
|
197
|
-
/// \internal
|
|
198
|
-
|
|
199
|
-
|
|
245
|
+
/// \internal EIGEN_COMP_CLANGFCC set to FCC version if the compiler is Fujitsu Compiler (Clang mode)
|
|
246
|
+
/// \note The Fujitsu C/C++ compiler uses the non-traditional mode
|
|
247
|
+
/// based on Clang 7.1.0 if invoked with the -Nclang flag
|
|
248
|
+
#if defined(__CLANG_FUJITSU)
|
|
249
|
+
#define EIGEN_COMP_CLANGFCC (__FCC_major__ * 100 + __FCC_minor__ * 10 + __FCC_patchlevel__)
|
|
200
250
|
#else
|
|
201
|
-
|
|
251
|
+
#define EIGEN_COMP_CLANGFCC 0
|
|
202
252
|
#endif
|
|
203
253
|
|
|
254
|
+
/// \internal EIGEN_COMP_CPE set to CPE version if the compiler is HPE Cray Compiler (GCC based)
|
|
255
|
+
/// \note This is the SVE-enabled C/C++ compiler from the HPE Cray
|
|
256
|
+
/// Programming Environment (CPE) based on Cray GCC 8.1
|
|
257
|
+
#if defined(_CRAYC) && !defined(__clang__)
|
|
258
|
+
#define EIGEN_COMP_CPE (_RELEASE_MAJOR * 100 + _RELEASE_MINOR * 10 + _RELEASE_PATCHLEVEL)
|
|
259
|
+
#else
|
|
260
|
+
#define EIGEN_COMP_CPE 0
|
|
261
|
+
#endif
|
|
204
262
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
263
|
+
/// \internal EIGEN_COMP_CLANGCPE set to CPE version if the compiler is HPE Cray Compiler (Clang based)
|
|
264
|
+
/// \note This is the C/C++ compiler from the HPE Cray Programming
|
|
265
|
+
/// Environment (CPE) based on Cray Clang 11.0 without SVE-support
|
|
266
|
+
#if defined(_CRAYC) && defined(__clang__)
|
|
267
|
+
#define EIGEN_COMP_CLANGCPE (_RELEASE_MAJOR * 100 + _RELEASE_MINOR * 10 + _RELEASE_PATCHLEVEL)
|
|
209
268
|
#else
|
|
210
|
-
|
|
211
|
-
#define EIGEN_GNUC_AT_MOST(x,y) 0
|
|
212
|
-
#define EIGEN_GNUC_AT(x,y) 0
|
|
269
|
+
#define EIGEN_COMP_CLANGCPE 0
|
|
213
270
|
#endif
|
|
214
271
|
|
|
215
|
-
|
|
216
|
-
#if
|
|
217
|
-
#define
|
|
272
|
+
/// \internal EIGEN_COMP_LCC set to 1 if the compiler is MCST-LCC (MCST eLbrus Compiler Collection)
|
|
273
|
+
#if defined(__LCC__) && defined(__MCST__)
|
|
274
|
+
#define EIGEN_COMP_LCC (__LCC__ * 100 + __LCC_MINOR__)
|
|
218
275
|
#else
|
|
219
|
-
#define
|
|
276
|
+
#define EIGEN_COMP_LCC 0
|
|
220
277
|
#endif
|
|
221
278
|
|
|
279
|
+
/// \internal EIGEN_COMP_GNUC_STRICT set to 1 if the compiler is really GCC and not a compatible compiler (e.g., ICC,
|
|
280
|
+
/// clang, mingw, etc.)
|
|
281
|
+
#if EIGEN_COMP_GNUC && \
|
|
282
|
+
!(EIGEN_COMP_CLANG || EIGEN_COMP_ICC || EIGEN_COMP_CLANGICC || EIGEN_COMP_MINGW || EIGEN_COMP_PGI || \
|
|
283
|
+
EIGEN_COMP_IBM || EIGEN_COMP_ARM || EIGEN_COMP_EMSCRIPTEN || EIGEN_COMP_FCC || EIGEN_COMP_CLANGFCC || \
|
|
284
|
+
EIGEN_COMP_CPE || EIGEN_COMP_CLANGCPE || EIGEN_COMP_LCC)
|
|
285
|
+
#define EIGEN_COMP_GNUC_STRICT 1
|
|
286
|
+
#else
|
|
287
|
+
#define EIGEN_COMP_GNUC_STRICT 0
|
|
288
|
+
#endif
|
|
222
289
|
|
|
290
|
+
// GCC, and compilers that pretend to be it, have different version schemes, so this only makes sense to use with the
|
|
291
|
+
// real GCC.
|
|
292
|
+
#if EIGEN_COMP_GNUC_STRICT
|
|
293
|
+
#define EIGEN_GNUC_STRICT_AT_LEAST(x, y, z) \
|
|
294
|
+
((__GNUC__ > x) || (__GNUC__ == x && __GNUC_MINOR__ > y) || \
|
|
295
|
+
(__GNUC__ == x && __GNUC_MINOR__ == y && __GNUC_PATCHLEVEL__ >= z))
|
|
296
|
+
#define EIGEN_GNUC_STRICT_LESS_THAN(x, y, z) \
|
|
297
|
+
((__GNUC__ < x) || (__GNUC__ == x && __GNUC_MINOR__ < y) || \
|
|
298
|
+
(__GNUC__ == x && __GNUC_MINOR__ == y && __GNUC_PATCHLEVEL__ < z))
|
|
299
|
+
#else
|
|
300
|
+
#define EIGEN_GNUC_STRICT_AT_LEAST(x, y, z) 0
|
|
301
|
+
#define EIGEN_GNUC_STRICT_LESS_THAN(x, y, z) 0
|
|
302
|
+
#endif
|
|
303
|
+
|
|
304
|
+
/// \internal EIGEN_COMP_CLANG_STRICT set to 1 if the compiler is really Clang and not a compatible compiler (e.g.,
|
|
305
|
+
/// AppleClang, etc.)
|
|
306
|
+
#if EIGEN_COMP_CLANG && !(EIGEN_COMP_CLANGAPPLE || EIGEN_COMP_CLANGICC || EIGEN_COMP_CLANGFCC || EIGEN_COMP_CLANGCPE)
|
|
307
|
+
#define EIGEN_COMP_CLANG_STRICT 1
|
|
308
|
+
#else
|
|
309
|
+
#define EIGEN_COMP_CLANG_STRICT 0
|
|
310
|
+
#endif
|
|
311
|
+
|
|
312
|
+
// Clang, and compilers forked from it, have different version schemes, so this only makes sense to use with the real
|
|
313
|
+
// Clang.
|
|
314
|
+
#if EIGEN_COMP_CLANG_STRICT
|
|
315
|
+
#define EIGEN_CLANG_STRICT_AT_LEAST(x, y, z) \
|
|
316
|
+
((__clang_major__ > x) || (__clang_major__ == x && __clang_minor__ > y) || \
|
|
317
|
+
(__clang_major__ == x && __clang_minor__ == y && __clang_patchlevel__ >= z))
|
|
318
|
+
#define EIGEN_CLANG_STRICT_LESS_THAN(x, y, z) \
|
|
319
|
+
((__clang_major__ < x) || (__clang_major__ == x && __clang_minor__ < y) || \
|
|
320
|
+
(__clang_major__ == x && __clang_minor__ == y && __clang_patchlevel__ < z))
|
|
321
|
+
#else
|
|
322
|
+
#define EIGEN_CLANG_STRICT_AT_LEAST(x, y, z) 0
|
|
323
|
+
#define EIGEN_CLANG_STRICT_LESS_THAN(x, y, z) 0
|
|
324
|
+
#endif
|
|
223
325
|
|
|
224
326
|
//------------------------------------------------------------------------------------------
|
|
225
327
|
// Architecture identification, EIGEN_ARCH_*
|
|
226
328
|
//------------------------------------------------------------------------------------------
|
|
227
329
|
|
|
228
|
-
|
|
229
330
|
#if defined(__x86_64__) || (defined(_M_X64) && !defined(_M_ARM64EC)) || defined(__amd64)
|
|
230
|
-
|
|
331
|
+
#define EIGEN_ARCH_x86_64 1
|
|
231
332
|
#else
|
|
232
|
-
|
|
333
|
+
#define EIGEN_ARCH_x86_64 0
|
|
233
334
|
#endif
|
|
234
335
|
|
|
235
336
|
#if defined(__i386__) || defined(_M_IX86) || defined(_X86_) || defined(__i386)
|
|
236
|
-
|
|
337
|
+
#define EIGEN_ARCH_i386 1
|
|
237
338
|
#else
|
|
238
|
-
|
|
339
|
+
#define EIGEN_ARCH_i386 0
|
|
239
340
|
#endif
|
|
240
341
|
|
|
241
342
|
#if EIGEN_ARCH_x86_64 || EIGEN_ARCH_i386
|
|
242
|
-
|
|
343
|
+
#define EIGEN_ARCH_i386_OR_x86_64 1
|
|
243
344
|
#else
|
|
244
|
-
|
|
345
|
+
#define EIGEN_ARCH_i386_OR_x86_64 0
|
|
245
346
|
#endif
|
|
246
347
|
|
|
247
348
|
/// \internal EIGEN_ARCH_ARM set to 1 if the architecture is ARM
|
|
248
349
|
#if defined(__arm__)
|
|
249
|
-
|
|
350
|
+
#define EIGEN_ARCH_ARM 1
|
|
250
351
|
#else
|
|
251
|
-
|
|
352
|
+
#define EIGEN_ARCH_ARM 0
|
|
252
353
|
#endif
|
|
253
354
|
|
|
254
355
|
/// \internal EIGEN_ARCH_ARM64 set to 1 if the architecture is ARM64
|
|
255
356
|
#if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
|
|
256
|
-
|
|
357
|
+
#define EIGEN_ARCH_ARM64 1
|
|
257
358
|
#else
|
|
258
|
-
|
|
359
|
+
#define EIGEN_ARCH_ARM64 0
|
|
259
360
|
#endif
|
|
260
361
|
|
|
261
362
|
/// \internal EIGEN_ARCH_ARM_OR_ARM64 set to 1 if the architecture is ARM or ARM64
|
|
262
363
|
#if EIGEN_ARCH_ARM || EIGEN_ARCH_ARM64
|
|
263
|
-
|
|
364
|
+
#define EIGEN_ARCH_ARM_OR_ARM64 1
|
|
264
365
|
#else
|
|
265
|
-
|
|
366
|
+
#define EIGEN_ARCH_ARM_OR_ARM64 0
|
|
266
367
|
#endif
|
|
267
368
|
|
|
268
369
|
/// \internal EIGEN_ARCH_ARMV8 set to 1 if the architecture is armv8 or greater.
|
|
@@ -272,158 +373,150 @@
|
|
|
272
373
|
#define EIGEN_ARCH_ARMV8 0
|
|
273
374
|
#endif
|
|
274
375
|
|
|
275
|
-
|
|
276
376
|
/// \internal EIGEN_HAS_ARM64_FP16 set to 1 if the architecture provides an IEEE
|
|
277
377
|
/// compliant Arm fp16 type
|
|
278
|
-
#if
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
#endif
|
|
285
|
-
#endif
|
|
378
|
+
#if EIGEN_ARCH_ARM_OR_ARM64
|
|
379
|
+
#ifndef EIGEN_HAS_ARM64_FP16
|
|
380
|
+
#if defined(__ARM_FP16_FORMAT_IEEE)
|
|
381
|
+
#define EIGEN_HAS_ARM64_FP16 1
|
|
382
|
+
#else
|
|
383
|
+
#define EIGEN_HAS_ARM64_FP16 0
|
|
286
384
|
#endif
|
|
287
|
-
|
|
288
|
-
/// \internal EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC set to 1 if the architecture
|
|
289
|
-
/// supports Neon vector intrinsics for fp16.
|
|
290
|
-
#if EIGEN_ARCH_ARM64
|
|
291
|
-
#ifndef EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
|
|
292
|
-
#if defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)
|
|
293
|
-
#define EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC 1
|
|
294
|
-
#else
|
|
295
|
-
#define EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC 0
|
|
296
|
-
#endif
|
|
297
|
-
#endif
|
|
298
385
|
#endif
|
|
299
|
-
|
|
300
|
-
/// \internal EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC set to 1 if the architecture
|
|
301
|
-
/// supports Neon scalar intrinsics for fp16.
|
|
302
|
-
#if EIGEN_ARCH_ARM64
|
|
303
|
-
#ifndef EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC
|
|
304
|
-
#if defined(__ARM_FEATURE_FP16_SCALAR_ARITHMETIC)
|
|
305
|
-
#define EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC 1
|
|
306
|
-
#endif
|
|
307
|
-
#endif
|
|
308
386
|
#endif
|
|
309
387
|
|
|
310
388
|
/// \internal EIGEN_ARCH_MIPS set to 1 if the architecture is MIPS
|
|
311
389
|
#if defined(__mips__) || defined(__mips)
|
|
312
|
-
|
|
390
|
+
#define EIGEN_ARCH_MIPS 1
|
|
313
391
|
#else
|
|
314
|
-
|
|
392
|
+
#define EIGEN_ARCH_MIPS 0
|
|
393
|
+
#endif
|
|
394
|
+
|
|
395
|
+
/// \internal EIGEN_ARCH_LOONGARCH64 set to 1 if the architecture is LOONGARCH64
|
|
396
|
+
#if defined(__loongarch64)
|
|
397
|
+
#define EIGEN_ARCH_LOONGARCH64 1
|
|
398
|
+
#else
|
|
399
|
+
#define EIGEN_ARCH_LOONGARCH64 0
|
|
315
400
|
#endif
|
|
316
401
|
|
|
317
402
|
/// \internal EIGEN_ARCH_SPARC set to 1 if the architecture is SPARC
|
|
318
403
|
#if defined(__sparc__) || defined(__sparc)
|
|
319
|
-
|
|
404
|
+
#define EIGEN_ARCH_SPARC 1
|
|
320
405
|
#else
|
|
321
|
-
|
|
406
|
+
#define EIGEN_ARCH_SPARC 0
|
|
322
407
|
#endif
|
|
323
408
|
|
|
324
409
|
/// \internal EIGEN_ARCH_IA64 set to 1 if the architecture is Intel Itanium
|
|
325
410
|
#if defined(__ia64__)
|
|
326
|
-
|
|
411
|
+
#define EIGEN_ARCH_IA64 1
|
|
327
412
|
#else
|
|
328
|
-
|
|
413
|
+
#define EIGEN_ARCH_IA64 0
|
|
329
414
|
#endif
|
|
330
415
|
|
|
331
416
|
/// \internal EIGEN_ARCH_PPC set to 1 if the architecture is PowerPC
|
|
332
|
-
#if defined(__powerpc__) || defined(__ppc__) || defined(_M_PPC)
|
|
333
|
-
|
|
417
|
+
#if defined(__powerpc__) || defined(__ppc__) || defined(_M_PPC) || defined(__POWERPC__)
|
|
418
|
+
#define EIGEN_ARCH_PPC 1
|
|
334
419
|
#else
|
|
335
|
-
|
|
420
|
+
#define EIGEN_ARCH_PPC 0
|
|
336
421
|
#endif
|
|
337
422
|
|
|
338
|
-
|
|
339
|
-
|
|
340
423
|
//------------------------------------------------------------------------------------------
|
|
341
424
|
// Operating system identification, EIGEN_OS_*
|
|
342
425
|
//------------------------------------------------------------------------------------------
|
|
343
426
|
|
|
344
427
|
/// \internal EIGEN_OS_UNIX set to 1 if the OS is a unix variant
|
|
345
428
|
#if defined(__unix__) || defined(__unix)
|
|
346
|
-
|
|
429
|
+
#define EIGEN_OS_UNIX 1
|
|
347
430
|
#else
|
|
348
|
-
|
|
431
|
+
#define EIGEN_OS_UNIX 0
|
|
349
432
|
#endif
|
|
350
433
|
|
|
351
434
|
/// \internal EIGEN_OS_LINUX set to 1 if the OS is based on Linux kernel
|
|
352
435
|
#if defined(__linux__)
|
|
353
|
-
|
|
436
|
+
#define EIGEN_OS_LINUX 1
|
|
354
437
|
#else
|
|
355
|
-
|
|
438
|
+
#define EIGEN_OS_LINUX 0
|
|
356
439
|
#endif
|
|
357
440
|
|
|
358
441
|
/// \internal EIGEN_OS_ANDROID set to 1 if the OS is Android
|
|
359
442
|
// note: ANDROID is defined when using ndk_build, __ANDROID__ is defined when using a standalone toolchain.
|
|
360
443
|
#if defined(__ANDROID__) || defined(ANDROID)
|
|
361
|
-
|
|
444
|
+
#define EIGEN_OS_ANDROID 1
|
|
445
|
+
|
|
446
|
+
// Since NDK r16, `__NDK_MAJOR__` and `__NDK_MINOR__` are defined in
|
|
447
|
+
// <android/ndk-version.h>. For NDK < r16, users should define these macros,
|
|
448
|
+
// e.g. `-D__NDK_MAJOR__=11 -D__NKD_MINOR__=0` for NDK r11.
|
|
449
|
+
#if defined __has_include
|
|
450
|
+
#if __has_include(<android/ndk-version.h>)
|
|
451
|
+
#include <android/ndk-version.h>
|
|
452
|
+
#endif
|
|
453
|
+
#endif
|
|
454
|
+
|
|
362
455
|
#else
|
|
363
|
-
|
|
456
|
+
#define EIGEN_OS_ANDROID 0
|
|
364
457
|
#endif
|
|
365
458
|
|
|
366
459
|
/// \internal EIGEN_OS_GNULINUX set to 1 if the OS is GNU Linux and not Linux-based OS (e.g., not android)
|
|
367
460
|
#if defined(__gnu_linux__) && !(EIGEN_OS_ANDROID)
|
|
368
|
-
|
|
461
|
+
#define EIGEN_OS_GNULINUX 1
|
|
369
462
|
#else
|
|
370
|
-
|
|
463
|
+
#define EIGEN_OS_GNULINUX 0
|
|
371
464
|
#endif
|
|
372
465
|
|
|
373
466
|
/// \internal EIGEN_OS_BSD set to 1 if the OS is a BSD variant
|
|
374
467
|
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__)
|
|
375
|
-
|
|
468
|
+
#define EIGEN_OS_BSD 1
|
|
376
469
|
#else
|
|
377
|
-
|
|
470
|
+
#define EIGEN_OS_BSD 0
|
|
378
471
|
#endif
|
|
379
472
|
|
|
380
473
|
/// \internal EIGEN_OS_MAC set to 1 if the OS is MacOS
|
|
381
474
|
#if defined(__APPLE__)
|
|
382
|
-
|
|
475
|
+
#define EIGEN_OS_MAC 1
|
|
383
476
|
#else
|
|
384
|
-
|
|
477
|
+
#define EIGEN_OS_MAC 0
|
|
385
478
|
#endif
|
|
386
479
|
|
|
387
480
|
/// \internal EIGEN_OS_QNX set to 1 if the OS is QNX
|
|
388
481
|
#if defined(__QNX__)
|
|
389
|
-
|
|
482
|
+
#define EIGEN_OS_QNX 1
|
|
390
483
|
#else
|
|
391
|
-
|
|
484
|
+
#define EIGEN_OS_QNX 0
|
|
392
485
|
#endif
|
|
393
486
|
|
|
394
487
|
/// \internal EIGEN_OS_WIN set to 1 if the OS is Windows based
|
|
395
488
|
#if defined(_WIN32)
|
|
396
|
-
|
|
489
|
+
#define EIGEN_OS_WIN 1
|
|
397
490
|
#else
|
|
398
|
-
|
|
491
|
+
#define EIGEN_OS_WIN 0
|
|
399
492
|
#endif
|
|
400
493
|
|
|
401
494
|
/// \internal EIGEN_OS_WIN64 set to 1 if the OS is Windows 64bits
|
|
402
495
|
#if defined(_WIN64)
|
|
403
|
-
|
|
496
|
+
#define EIGEN_OS_WIN64 1
|
|
404
497
|
#else
|
|
405
|
-
|
|
498
|
+
#define EIGEN_OS_WIN64 0
|
|
406
499
|
#endif
|
|
407
500
|
|
|
408
501
|
/// \internal EIGEN_OS_WINCE set to 1 if the OS is Windows CE
|
|
409
502
|
#if defined(_WIN32_WCE)
|
|
410
|
-
|
|
503
|
+
#define EIGEN_OS_WINCE 1
|
|
411
504
|
#else
|
|
412
|
-
|
|
505
|
+
#define EIGEN_OS_WINCE 0
|
|
413
506
|
#endif
|
|
414
507
|
|
|
415
508
|
/// \internal EIGEN_OS_CYGWIN set to 1 if the OS is Windows/Cygwin
|
|
416
509
|
#if defined(__CYGWIN__)
|
|
417
|
-
|
|
510
|
+
#define EIGEN_OS_CYGWIN 1
|
|
418
511
|
#else
|
|
419
|
-
|
|
512
|
+
#define EIGEN_OS_CYGWIN 0
|
|
420
513
|
#endif
|
|
421
514
|
|
|
422
515
|
/// \internal EIGEN_OS_WIN_STRICT set to 1 if the OS is really Windows and not some variants
|
|
423
|
-
#if EIGEN_OS_WIN && !(
|
|
424
|
-
|
|
516
|
+
#if EIGEN_OS_WIN && !(EIGEN_OS_WINCE || EIGEN_OS_CYGWIN)
|
|
517
|
+
#define EIGEN_OS_WIN_STRICT 1
|
|
425
518
|
#else
|
|
426
|
-
|
|
519
|
+
#define EIGEN_OS_WIN_STRICT 0
|
|
427
520
|
#endif
|
|
428
521
|
|
|
429
522
|
/// \internal EIGEN_OS_SUN set to __SUNPRO_C if the OS is SUN
|
|
@@ -436,19 +529,18 @@
|
|
|
436
529
|
// 5.11 12.2 0x5110
|
|
437
530
|
// 5.12 12.3 0x5120
|
|
438
531
|
#if (defined(sun) || defined(__sun)) && !(defined(__SVR4) || defined(__svr4__))
|
|
439
|
-
|
|
532
|
+
#define EIGEN_OS_SUN __SUNPRO_C
|
|
440
533
|
#else
|
|
441
|
-
|
|
534
|
+
#define EIGEN_OS_SUN 0
|
|
442
535
|
#endif
|
|
443
536
|
|
|
444
537
|
/// \internal EIGEN_OS_SOLARIS set to 1 if the OS is Solaris
|
|
445
538
|
#if (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))
|
|
446
|
-
|
|
539
|
+
#define EIGEN_OS_SOLARIS 1
|
|
447
540
|
#else
|
|
448
|
-
|
|
541
|
+
#define EIGEN_OS_SOLARIS 0
|
|
449
542
|
#endif
|
|
450
543
|
|
|
451
|
-
|
|
452
544
|
//------------------------------------------------------------------------------------------
|
|
453
545
|
// Detect GPU compilers and architectures
|
|
454
546
|
//------------------------------------------------------------------------------------------
|
|
@@ -456,59 +548,59 @@
|
|
|
456
548
|
// NVCC is not supported as the target platform for HIPCC
|
|
457
549
|
// Note that this also makes EIGEN_CUDACC and EIGEN_HIPCC mutually exclusive
|
|
458
550
|
#if defined(__NVCC__) && defined(__HIPCC__)
|
|
459
|
-
|
|
551
|
+
#error "NVCC as the target platform for HIPCC is currently not supported."
|
|
460
552
|
#endif
|
|
461
553
|
|
|
462
|
-
#if defined(__CUDACC__) && !defined(EIGEN_NO_CUDA)
|
|
463
|
-
|
|
464
|
-
|
|
554
|
+
#if defined(__CUDACC__) && !defined(EIGEN_NO_CUDA) && !defined(__SYCL_DEVICE_ONLY__)
|
|
555
|
+
// Means the compiler is either nvcc or clang with CUDA enabled
|
|
556
|
+
#define EIGEN_CUDACC __CUDACC__
|
|
465
557
|
#endif
|
|
466
558
|
|
|
467
|
-
#if defined(__CUDA_ARCH__) && !defined(EIGEN_NO_CUDA)
|
|
468
|
-
|
|
469
|
-
|
|
559
|
+
#if defined(__CUDA_ARCH__) && !defined(EIGEN_NO_CUDA) && !defined(__SYCL_DEVICE_ONLY__)
|
|
560
|
+
// Means we are generating code for the device
|
|
561
|
+
#define EIGEN_CUDA_ARCH __CUDA_ARCH__
|
|
470
562
|
#endif
|
|
471
563
|
|
|
472
564
|
#if defined(EIGEN_CUDACC)
|
|
473
565
|
#include <cuda.h>
|
|
474
|
-
|
|
566
|
+
#define EIGEN_CUDA_SDK_VER (CUDA_VERSION * 10)
|
|
475
567
|
#else
|
|
476
|
-
|
|
568
|
+
#define EIGEN_CUDA_SDK_VER 0
|
|
477
569
|
#endif
|
|
478
570
|
|
|
479
|
-
#if defined(__HIPCC__) && !defined(EIGEN_NO_HIP)
|
|
480
|
-
|
|
481
|
-
|
|
571
|
+
#if defined(__HIPCC__) && !defined(EIGEN_NO_HIP) && !defined(__SYCL_DEVICE_ONLY__)
|
|
572
|
+
// Means the compiler is HIPCC (analogous to EIGEN_CUDACC, but for HIP)
|
|
573
|
+
#define EIGEN_HIPCC __HIPCC__
|
|
482
574
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
575
|
+
// We need to include hip_runtime.h here because it pulls in
|
|
576
|
+
// ++ hip_common.h which contains the define for __HIP_DEVICE_COMPILE__
|
|
577
|
+
// ++ host_defines.h which contains the defines for the __host__ and __device__ macros
|
|
578
|
+
#include <hip/hip_runtime.h>
|
|
487
579
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
580
|
+
#if defined(__HIP_DEVICE_COMPILE__) && !defined(__SYCL_DEVICE_ONLY__)
|
|
581
|
+
// analogous to EIGEN_CUDA_ARCH, but for HIP
|
|
582
|
+
#define EIGEN_HIP_DEVICE_COMPILE __HIP_DEVICE_COMPILE__
|
|
583
|
+
#endif
|
|
492
584
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
585
|
+
// For HIP (ROCm 3.5 and higher), we need to explicitly set the launch_bounds attribute
|
|
586
|
+
// value to 1024. The compiler assigns a default value of 256 when the attribute is not
|
|
587
|
+
// specified. This results in failures on the HIP platform, for cases when a GPU kernel
|
|
588
|
+
// without an explicit launch_bounds attribute is called with a threads_per_block value
|
|
589
|
+
// greater than 256.
|
|
590
|
+
//
|
|
591
|
+
// This is a regression in functioanlity and is expected to be fixed within the next
|
|
592
|
+
// couple of ROCm releases (compiler will go back to using 1024 value as the default)
|
|
593
|
+
//
|
|
594
|
+
// In the meantime, we will use a "only enabled for HIP" macro to set the launch_bounds
|
|
595
|
+
// attribute.
|
|
504
596
|
|
|
505
|
-
|
|
597
|
+
#define EIGEN_HIP_LAUNCH_BOUNDS_1024 __launch_bounds__(1024)
|
|
506
598
|
|
|
507
599
|
#endif
|
|
508
600
|
|
|
509
601
|
#if !defined(EIGEN_HIP_LAUNCH_BOUNDS_1024)
|
|
510
602
|
#define EIGEN_HIP_LAUNCH_BOUNDS_1024
|
|
511
|
-
#endif
|
|
603
|
+
#endif // !defined(EIGEN_HIP_LAUNCH_BOUNDS_1024)
|
|
512
604
|
|
|
513
605
|
// Unify CUDA/HIPCC
|
|
514
606
|
|
|
@@ -565,6 +657,32 @@
|
|
|
565
657
|
//
|
|
566
658
|
#endif
|
|
567
659
|
|
|
660
|
+
/// \internal EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC set to 1 if the architecture
|
|
661
|
+
/// supports Neon vector intrinsics for fp16.
|
|
662
|
+
#if EIGEN_ARCH_ARM_OR_ARM64
|
|
663
|
+
#ifndef EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
|
|
664
|
+
// Clang only supports FP16 on aarch64, and not all intrinsics are available
|
|
665
|
+
// on A32 anyways even in GCC (e.g. vdiv_f16, vsqrt_f16).
|
|
666
|
+
#if EIGEN_ARCH_ARM64 && defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && !defined(EIGEN_GPU_COMPILE_PHASE)
|
|
667
|
+
#define EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC 1
|
|
668
|
+
#else
|
|
669
|
+
#define EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC 0
|
|
670
|
+
#endif
|
|
671
|
+
#endif
|
|
672
|
+
#endif
|
|
673
|
+
|
|
674
|
+
/// \internal EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC set to 1 if the architecture
|
|
675
|
+
/// supports Neon scalar intrinsics for fp16.
|
|
676
|
+
#if EIGEN_ARCH_ARM_OR_ARM64
|
|
677
|
+
#ifndef EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC
|
|
678
|
+
// Clang only supports FP16 on aarch64, and not all intrinsics are available
|
|
679
|
+
// on A32 anyways, even in GCC (e.g. vceqh_f16).
|
|
680
|
+
#if EIGEN_ARCH_ARM64 && defined(__ARM_FEATURE_FP16_SCALAR_ARITHMETIC) && !defined(EIGEN_GPU_COMPILE_PHASE)
|
|
681
|
+
#define EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC 1
|
|
682
|
+
#endif
|
|
683
|
+
#endif
|
|
684
|
+
#endif
|
|
685
|
+
|
|
568
686
|
#if defined(EIGEN_USE_SYCL) && defined(__SYCL_DEVICE_ONLY__)
|
|
569
687
|
// EIGEN_USE_SYCL is a user-defined macro while __SYCL_DEVICE_ONLY__ is a compiler-defined macro.
|
|
570
688
|
// In most cases we want to check if both macros are defined which can be done using the define below.
|
|
@@ -575,34 +693,17 @@
|
|
|
575
693
|
// Detect Compiler/Architecture/OS specific features
|
|
576
694
|
//------------------------------------------------------------------------------------------
|
|
577
695
|
|
|
578
|
-
#if EIGEN_GNUC_AT_MOST(4,3) && !EIGEN_COMP_CLANG
|
|
579
|
-
// see bug 89
|
|
580
|
-
#define EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO 0
|
|
581
|
-
#else
|
|
582
|
-
#define EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO 1
|
|
583
|
-
#endif
|
|
584
|
-
|
|
585
696
|
// Cross compiler wrapper around LLVM's __has_builtin
|
|
586
697
|
#ifdef __has_builtin
|
|
587
|
-
#
|
|
698
|
+
#define EIGEN_HAS_BUILTIN(x) __has_builtin(x)
|
|
588
699
|
#else
|
|
589
|
-
#
|
|
700
|
+
#define EIGEN_HAS_BUILTIN(x) 0
|
|
590
701
|
#endif
|
|
591
702
|
|
|
592
703
|
// A Clang feature extension to determine compiler features.
|
|
593
704
|
// We use it to determine 'cxx_rvalue_references'
|
|
594
705
|
#ifndef __has_feature
|
|
595
|
-
#
|
|
596
|
-
#endif
|
|
597
|
-
|
|
598
|
-
// Some old compilers do not support template specializations like:
|
|
599
|
-
// template<typename T,int N> void foo(const T x[N]);
|
|
600
|
-
#if !( EIGEN_COMP_CLANG && ( (EIGEN_COMP_CLANG<309) \
|
|
601
|
-
|| (defined(__apple_build_version__) && (__apple_build_version__ < 9000000))) \
|
|
602
|
-
|| EIGEN_COMP_GNUC_STRICT && EIGEN_COMP_GNUC<49)
|
|
603
|
-
#define EIGEN_HAS_STATIC_ARRAY_TEMPLATE 1
|
|
604
|
-
#else
|
|
605
|
-
#define EIGEN_HAS_STATIC_ARRAY_TEMPLATE 0
|
|
706
|
+
#define __has_feature(x) 0
|
|
606
707
|
#endif
|
|
607
708
|
|
|
608
709
|
// The macro EIGEN_CPLUSPLUS is a replacement for __cplusplus/_MSVC_LANG that
|
|
@@ -622,80 +723,42 @@
|
|
|
622
723
|
#define EIGEN_CPLUSPLUS 0
|
|
623
724
|
#endif
|
|
624
725
|
|
|
625
|
-
// The macro EIGEN_COMP_CXXVER defines the c++
|
|
726
|
+
// The macro EIGEN_COMP_CXXVER defines the c++ version expected by the compiler.
|
|
626
727
|
// For instance, if compiling with gcc and -std=c++17, then EIGEN_COMP_CXXVER
|
|
627
728
|
// is defined to 17.
|
|
628
|
-
#if EIGEN_CPLUSPLUS
|
|
629
|
-
|
|
630
|
-
#elif EIGEN_CPLUSPLUS
|
|
631
|
-
|
|
632
|
-
#elif EIGEN_CPLUSPLUS
|
|
633
|
-
|
|
729
|
+
#if EIGEN_CPLUSPLUS >= 202002L
|
|
730
|
+
#define EIGEN_COMP_CXXVER 20
|
|
731
|
+
#elif EIGEN_CPLUSPLUS >= 201703L
|
|
732
|
+
#define EIGEN_COMP_CXXVER 17
|
|
733
|
+
#elif EIGEN_CPLUSPLUS >= 201402L
|
|
734
|
+
#define EIGEN_COMP_CXXVER 14
|
|
634
735
|
#elif EIGEN_CPLUSPLUS >= 201103L
|
|
635
|
-
|
|
736
|
+
#define EIGEN_COMP_CXXVER 11
|
|
636
737
|
#else
|
|
637
|
-
|
|
638
|
-
#endif
|
|
639
|
-
|
|
640
|
-
#ifndef EIGEN_HAS_CXX14_VARIABLE_TEMPLATES
|
|
641
|
-
#if defined(__cpp_variable_templates) && __cpp_variable_templates >= 201304 && EIGEN_MAX_CPP_VER>=14
|
|
642
|
-
#define EIGEN_HAS_CXX14_VARIABLE_TEMPLATES 1
|
|
643
|
-
#else
|
|
644
|
-
#define EIGEN_HAS_CXX14_VARIABLE_TEMPLATES 0
|
|
645
|
-
#endif
|
|
738
|
+
#define EIGEN_COMP_CXXVER 03
|
|
646
739
|
#endif
|
|
647
740
|
|
|
648
|
-
|
|
649
741
|
// The macros EIGEN_HAS_CXX?? defines a rough estimate of available c++ features
|
|
650
|
-
// but in practice we should not rely on them but rather on the
|
|
742
|
+
// but in practice we should not rely on them but rather on the availability of
|
|
651
743
|
// individual features as defined later.
|
|
652
744
|
// This is why there is no EIGEN_HAS_CXX17.
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
#
|
|
658
|
-
#endif
|
|
659
|
-
|
|
660
|
-
#if EIGEN_MAX_CPP_VER>=14 && EIGEN_COMP_CXXVER>=14
|
|
661
|
-
#define EIGEN_HAS_CXX14 1
|
|
662
|
-
#else
|
|
663
|
-
#define EIGEN_HAS_CXX14 0
|
|
664
|
-
#endif
|
|
665
|
-
|
|
666
|
-
// Do we support r-value references?
|
|
667
|
-
#ifndef EIGEN_HAS_RVALUE_REFERENCES
|
|
668
|
-
#if EIGEN_MAX_CPP_VER>=11 && \
|
|
669
|
-
(__has_feature(cxx_rvalue_references) || \
|
|
670
|
-
(EIGEN_COMP_CXXVER >= 11) || (EIGEN_COMP_MSVC >= 1600))
|
|
671
|
-
#define EIGEN_HAS_RVALUE_REFERENCES 1
|
|
672
|
-
#else
|
|
673
|
-
#define EIGEN_HAS_RVALUE_REFERENCES 0
|
|
674
|
-
#endif
|
|
745
|
+
#if EIGEN_MAX_CPP_VER < 14 || EIGEN_COMP_CXXVER < 14 || (EIGEN_COMP_MSVC && EIGEN_COMP_MSVC < 1900) || \
|
|
746
|
+
(EIGEN_COMP_ICC && EIGEN_COMP_ICC < 1500) || (EIGEN_COMP_NVCC && EIGEN_COMP_NVCC < 80000) || \
|
|
747
|
+
(EIGEN_COMP_CLANG_STRICT && EIGEN_COMP_CLANG < 390) || \
|
|
748
|
+
(EIGEN_COMP_CLANGAPPLE && EIGEN_COMP_CLANGAPPLE < 9000000) || (EIGEN_COMP_GNUC_STRICT && EIGEN_COMP_GNUC < 510)
|
|
749
|
+
#error Eigen requires at least c++14 support.
|
|
675
750
|
#endif
|
|
676
751
|
|
|
677
752
|
// Does the compiler support C99?
|
|
678
753
|
// Need to include <cmath> to make sure _GLIBCXX_USE_C99 gets defined
|
|
679
754
|
#include <cmath>
|
|
680
755
|
#ifndef EIGEN_HAS_C99_MATH
|
|
681
|
-
#if
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|| (EIGEN_COMP_MSVC >= 1900) || defined(SYCL_DEVICE_ONLY))
|
|
686
|
-
#define EIGEN_HAS_C99_MATH 1
|
|
756
|
+
#if ((defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)) || \
|
|
757
|
+
(defined(__GNUC__) && defined(_GLIBCXX_USE_C99)) || (defined(_LIBCPP_VERSION) && !defined(_MSC_VER)) || \
|
|
758
|
+
(EIGEN_COMP_MSVC) || defined(SYCL_DEVICE_ONLY))
|
|
759
|
+
#define EIGEN_HAS_C99_MATH 1
|
|
687
760
|
#else
|
|
688
|
-
|
|
689
|
-
#endif
|
|
690
|
-
#endif
|
|
691
|
-
|
|
692
|
-
// Does the compiler support result_of?
|
|
693
|
-
// result_of was deprecated in c++17 and removed in c++ 20
|
|
694
|
-
#ifndef EIGEN_HAS_STD_RESULT_OF
|
|
695
|
-
#if EIGEN_HAS_CXX11 && EIGEN_COMP_CXXVER < 17
|
|
696
|
-
#define EIGEN_HAS_STD_RESULT_OF 1
|
|
697
|
-
#else
|
|
698
|
-
#define EIGEN_HAS_STD_RESULT_OF 0
|
|
761
|
+
#define EIGEN_HAS_C99_MATH 0
|
|
699
762
|
#endif
|
|
700
763
|
#endif
|
|
701
764
|
|
|
@@ -703,7 +766,7 @@
|
|
|
703
766
|
#ifndef EIGEN_HAS_STD_HASH
|
|
704
767
|
// The std::hash struct is defined in C++11 but is not labelled as a __device__
|
|
705
768
|
// function and is not constexpr, so cannot be used on device.
|
|
706
|
-
#if
|
|
769
|
+
#if !defined(EIGEN_GPU_COMPILE_PHASE)
|
|
707
770
|
#define EIGEN_HAS_STD_HASH 1
|
|
708
771
|
#else
|
|
709
772
|
#define EIGEN_HAS_STD_HASH 0
|
|
@@ -718,157 +781,37 @@
|
|
|
718
781
|
#endif
|
|
719
782
|
#endif
|
|
720
783
|
|
|
721
|
-
#ifndef EIGEN_HAS_ALIGNAS
|
|
722
|
-
#if EIGEN_MAX_CPP_VER>=11 && EIGEN_HAS_CXX11 && \
|
|
723
|
-
( __has_feature(cxx_alignas) \
|
|
724
|
-
|| EIGEN_HAS_CXX14 \
|
|
725
|
-
|| (EIGEN_COMP_MSVC >= 1800) \
|
|
726
|
-
|| (EIGEN_GNUC_AT_LEAST(4,8)) \
|
|
727
|
-
|| (EIGEN_COMP_CLANG>=305) \
|
|
728
|
-
|| (EIGEN_COMP_ICC>=1500) \
|
|
729
|
-
|| (EIGEN_COMP_PGI>=1500) \
|
|
730
|
-
|| (EIGEN_COMP_SUNCC>=0x5130))
|
|
731
|
-
#define EIGEN_HAS_ALIGNAS 1
|
|
732
|
-
#else
|
|
733
|
-
#define EIGEN_HAS_ALIGNAS 0
|
|
734
|
-
#endif
|
|
735
|
-
#endif
|
|
736
|
-
|
|
737
|
-
// Does the compiler support type_traits?
|
|
738
|
-
// - full support of type traits was added only to GCC 5.1.0.
|
|
739
|
-
// - 20150626 corresponds to the last release of 4.x libstdc++
|
|
740
|
-
#ifndef EIGEN_HAS_TYPE_TRAITS
|
|
741
|
-
#if EIGEN_MAX_CPP_VER>=11 && (EIGEN_HAS_CXX11 || EIGEN_COMP_MSVC >= 1700) \
|
|
742
|
-
&& ((!EIGEN_COMP_GNUC_STRICT) || EIGEN_GNUC_AT_LEAST(5, 1)) \
|
|
743
|
-
&& ((!defined(__GLIBCXX__)) || __GLIBCXX__ > 20150626)
|
|
744
|
-
#define EIGEN_HAS_TYPE_TRAITS 1
|
|
745
|
-
#define EIGEN_INCLUDE_TYPE_TRAITS
|
|
746
|
-
#else
|
|
747
|
-
#define EIGEN_HAS_TYPE_TRAITS 0
|
|
748
|
-
#endif
|
|
749
|
-
#endif
|
|
750
|
-
|
|
751
|
-
// Does the compiler support variadic templates?
|
|
752
|
-
#ifndef EIGEN_HAS_VARIADIC_TEMPLATES
|
|
753
|
-
#if EIGEN_MAX_CPP_VER>=11 && (EIGEN_COMP_CXXVER >= 11) \
|
|
754
|
-
&& (!defined(__NVCC__) || !EIGEN_ARCH_ARM_OR_ARM64 || (EIGEN_COMP_NVCC >= 80000) )
|
|
755
|
-
// ^^ Disable the use of variadic templates when compiling with versions of nvcc older than 8.0 on ARM devices:
|
|
756
|
-
// this prevents nvcc from crashing when compiling Eigen on Tegra X1
|
|
757
|
-
#define EIGEN_HAS_VARIADIC_TEMPLATES 1
|
|
758
|
-
#elif EIGEN_MAX_CPP_VER>=11 && (EIGEN_COMP_CXXVER >= 11) && defined(SYCL_DEVICE_ONLY)
|
|
759
|
-
#define EIGEN_HAS_VARIADIC_TEMPLATES 1
|
|
760
|
-
#else
|
|
761
|
-
#define EIGEN_HAS_VARIADIC_TEMPLATES 0
|
|
762
|
-
#endif
|
|
763
|
-
#endif
|
|
764
|
-
|
|
765
|
-
// Does the compiler fully support const expressions? (as in c++14)
|
|
766
|
-
#ifndef EIGEN_HAS_CONSTEXPR
|
|
767
|
-
#if defined(EIGEN_CUDACC)
|
|
768
|
-
// Const expressions are supported provided that c++11 is enabled and we're using either clang or nvcc 7.5 or above
|
|
769
|
-
#if EIGEN_MAX_CPP_VER>=14 && (EIGEN_COMP_CXXVER >= 11 && (EIGEN_COMP_CLANG || EIGEN_COMP_NVCC >= 70500))
|
|
770
|
-
#define EIGEN_HAS_CONSTEXPR 1
|
|
771
|
-
#endif
|
|
772
|
-
#elif EIGEN_MAX_CPP_VER>=14 && (__has_feature(cxx_relaxed_constexpr) || (EIGEN_COMP_CXXVER >= 14) || \
|
|
773
|
-
(EIGEN_GNUC_AT_LEAST(4,8) && (EIGEN_COMP_CXXVER >= 11)) || \
|
|
774
|
-
(EIGEN_COMP_CLANG >= 306 && (EIGEN_COMP_CXXVER >= 11)))
|
|
775
|
-
#define EIGEN_HAS_CONSTEXPR 1
|
|
776
|
-
#endif
|
|
777
|
-
|
|
778
|
-
#ifndef EIGEN_HAS_CONSTEXPR
|
|
779
|
-
#define EIGEN_HAS_CONSTEXPR 0
|
|
780
|
-
#endif
|
|
781
|
-
|
|
782
|
-
#endif // EIGEN_HAS_CONSTEXPR
|
|
783
|
-
|
|
784
|
-
#if EIGEN_HAS_CONSTEXPR
|
|
785
784
|
#define EIGEN_CONSTEXPR constexpr
|
|
786
|
-
#else
|
|
787
|
-
#define EIGEN_CONSTEXPR
|
|
788
|
-
#endif
|
|
789
|
-
|
|
790
|
-
// Does the compiler support C++11 math?
|
|
791
|
-
// Let's be conservative and enable the default C++11 implementation only if we are sure it exists
|
|
792
|
-
#ifndef EIGEN_HAS_CXX11_MATH
|
|
793
|
-
#if EIGEN_MAX_CPP_VER>=11 && ((EIGEN_COMP_CXXVER > 11) || (EIGEN_COMP_CXXVER == 11) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_CLANG || EIGEN_COMP_MSVC || EIGEN_COMP_ICC) \
|
|
794
|
-
&& (EIGEN_ARCH_i386_OR_x86_64) && (EIGEN_OS_GNULINUX || EIGEN_OS_WIN_STRICT || EIGEN_OS_MAC))
|
|
795
|
-
#define EIGEN_HAS_CXX11_MATH 1
|
|
796
|
-
#else
|
|
797
|
-
#define EIGEN_HAS_CXX11_MATH 0
|
|
798
|
-
#endif
|
|
799
|
-
#endif
|
|
800
|
-
|
|
801
|
-
// Does the compiler support proper C++11 containers?
|
|
802
|
-
#ifndef EIGEN_HAS_CXX11_CONTAINERS
|
|
803
|
-
#if EIGEN_MAX_CPP_VER>=11 && \
|
|
804
|
-
((EIGEN_COMP_CXXVER > 11) \
|
|
805
|
-
|| ((EIGEN_COMP_CXXVER == 11) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_CLANG || EIGEN_COMP_MSVC || EIGEN_COMP_ICC>=1400)))
|
|
806
|
-
#define EIGEN_HAS_CXX11_CONTAINERS 1
|
|
807
|
-
#else
|
|
808
|
-
#define EIGEN_HAS_CXX11_CONTAINERS 0
|
|
809
|
-
#endif
|
|
810
|
-
#endif
|
|
811
|
-
|
|
812
|
-
// Does the compiler support C++11 noexcept?
|
|
813
|
-
#ifndef EIGEN_HAS_CXX11_NOEXCEPT
|
|
814
|
-
#if EIGEN_MAX_CPP_VER>=11 && \
|
|
815
|
-
(__has_feature(cxx_noexcept) \
|
|
816
|
-
|| (EIGEN_COMP_CXXVER > 11) \
|
|
817
|
-
|| ((EIGEN_COMP_CXXVER == 11) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_CLANG || EIGEN_COMP_MSVC || EIGEN_COMP_ICC>=1400)))
|
|
818
|
-
#define EIGEN_HAS_CXX11_NOEXCEPT 1
|
|
819
|
-
#else
|
|
820
|
-
#define EIGEN_HAS_CXX11_NOEXCEPT 0
|
|
821
|
-
#endif
|
|
822
|
-
#endif
|
|
823
|
-
|
|
824
|
-
#ifndef EIGEN_HAS_CXX11_ATOMIC
|
|
825
|
-
#if EIGEN_MAX_CPP_VER>=11 && \
|
|
826
|
-
(__has_feature(cxx_atomic) \
|
|
827
|
-
|| (EIGEN_COMP_CXXVER > 11) \
|
|
828
|
-
|| ((EIGEN_COMP_CXXVER == 11) && (EIGEN_COMP_MSVC==0 || EIGEN_COMP_MSVC >= 1700)))
|
|
829
|
-
#define EIGEN_HAS_CXX11_ATOMIC 1
|
|
830
|
-
#else
|
|
831
|
-
#define EIGEN_HAS_CXX11_ATOMIC 0
|
|
832
|
-
#endif
|
|
833
|
-
#endif
|
|
834
|
-
|
|
835
|
-
#ifndef EIGEN_HAS_CXX11_OVERRIDE_FINAL
|
|
836
|
-
#if EIGEN_MAX_CPP_VER>=11 && \
|
|
837
|
-
(EIGEN_COMP_CXXVER >= 11 || EIGEN_COMP_MSVC >= 1700)
|
|
838
|
-
#define EIGEN_HAS_CXX11_OVERRIDE_FINAL 1
|
|
839
|
-
#else
|
|
840
|
-
#define EIGEN_HAS_CXX11_OVERRIDE_FINAL 0
|
|
841
|
-
#endif
|
|
842
|
-
#endif
|
|
843
785
|
|
|
844
786
|
// NOTE: the required Apple's clang version is very conservative
|
|
845
787
|
// and it could be that XCode 9 works just fine.
|
|
846
788
|
// NOTE: the MSVC version is based on https://en.cppreference.com/w/cpp/compiler_support
|
|
847
789
|
// and not tested.
|
|
790
|
+
// NOTE: Intel C++ Compiler Classic (icc) Version 19.0 and later supports dynamic allocation
|
|
791
|
+
// for over-aligned data, but not in a manner that is compatible with Eigen.
|
|
792
|
+
// See https://gitlab.com/libeigen/eigen/-/issues/2575
|
|
848
793
|
#ifndef EIGEN_HAS_CXX17_OVERALIGN
|
|
849
|
-
#if EIGEN_MAX_CPP_VER>=17 && EIGEN_COMP_CXXVER>=17 &&
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|| (( defined(__apple_build_version__)) && (__apple_build_version__>=10000000)) \
|
|
854
|
-
)
|
|
794
|
+
#if EIGEN_MAX_CPP_VER >= 17 && EIGEN_COMP_CXXVER >= 17 && \
|
|
795
|
+
((EIGEN_COMP_MSVC >= 1912) || (EIGEN_GNUC_STRICT_AT_LEAST(7, 0, 0)) || (EIGEN_CLANG_STRICT_AT_LEAST(5, 0, 0)) || \
|
|
796
|
+
(EIGEN_COMP_CLANGAPPLE && EIGEN_COMP_CLANGAPPLE >= 10000000)) && \
|
|
797
|
+
!EIGEN_COMP_ICC
|
|
855
798
|
#define EIGEN_HAS_CXX17_OVERALIGN 1
|
|
856
799
|
#else
|
|
857
800
|
#define EIGEN_HAS_CXX17_OVERALIGN 0
|
|
858
801
|
#endif
|
|
859
802
|
#endif
|
|
860
803
|
|
|
861
|
-
#if defined(EIGEN_CUDACC)
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
804
|
+
#if defined(EIGEN_CUDACC)
|
|
805
|
+
// While available already with c++11, this is useful mostly starting with c++14 and relaxed constexpr rules
|
|
806
|
+
#if defined(__NVCC__)
|
|
807
|
+
// nvcc considers constexpr functions as __host__ __device__ with the option --expt-relaxed-constexpr
|
|
808
|
+
#ifdef __CUDACC_RELAXED_CONSTEXPR__
|
|
809
|
+
#define EIGEN_CONSTEXPR_ARE_DEVICE_FUNC
|
|
810
|
+
#endif
|
|
811
|
+
#elif defined(__clang__) && defined(__CUDA__) && __has_feature(cxx_relaxed_constexpr)
|
|
812
|
+
// clang++ always considers constexpr functions as implicitly __host__ __device__
|
|
813
|
+
#define EIGEN_CONSTEXPR_ARE_DEVICE_FUNC
|
|
814
|
+
#endif
|
|
872
815
|
#endif
|
|
873
816
|
|
|
874
817
|
// Does the compiler support the __int128 and __uint128_t extensions for 128-bit
|
|
@@ -898,8 +841,8 @@
|
|
|
898
841
|
#define EIGEN_DEBUG_VAR(x) std::cerr << #x << " = " << x << std::endl;
|
|
899
842
|
|
|
900
843
|
// concatenate two tokens
|
|
901
|
-
#define EIGEN_CAT2(a,b) a
|
|
902
|
-
#define EIGEN_CAT(a,b) EIGEN_CAT2(a,b)
|
|
844
|
+
#define EIGEN_CAT2(a, b) a##b
|
|
845
|
+
#define EIGEN_CAT(a, b) EIGEN_CAT2(a, b)
|
|
903
846
|
|
|
904
847
|
#define EIGEN_COMMA ,
|
|
905
848
|
|
|
@@ -918,15 +861,11 @@
|
|
|
918
861
|
#endif
|
|
919
862
|
#endif
|
|
920
863
|
|
|
921
|
-
// EIGEN_ALWAYS_INLINE is the
|
|
864
|
+
// EIGEN_ALWAYS_INLINE is the strongest, it has the effect of making the function inline and adding every possible
|
|
922
865
|
// attribute to maximize inlining. This should only be used when really necessary: in particular,
|
|
923
866
|
// it uses __attribute__((always_inline)) on GCC, which most of the time is useless and can severely harm compile times.
|
|
924
867
|
// FIXME with the always_inline attribute,
|
|
925
|
-
|
|
926
|
-
// Eval.h:91: sorry, unimplemented: inlining failed in call to 'const Eigen::Eval<Derived> Eigen::MatrixBase<Scalar, Derived>::eval() const'
|
|
927
|
-
// : function body not available
|
|
928
|
-
// See also bug 1367
|
|
929
|
-
#if EIGEN_GNUC_AT_LEAST(4,2) && !defined(SYCL_DEVICE_ONLY)
|
|
868
|
+
#if EIGEN_COMP_GNUC && !defined(SYCL_DEVICE_ONLY)
|
|
930
869
|
#define EIGEN_ALWAYS_INLINE __attribute__((always_inline)) inline
|
|
931
870
|
#else
|
|
932
871
|
#define EIGEN_ALWAYS_INLINE EIGEN_STRONG_INLINE
|
|
@@ -948,35 +887,37 @@
|
|
|
948
887
|
|
|
949
888
|
// GPU stuff
|
|
950
889
|
|
|
951
|
-
// Disable some features when compiling with GPU compilers (
|
|
952
|
-
#if defined(
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
890
|
+
// Disable some features when compiling with GPU compilers (SYCL/HIPCC)
|
|
891
|
+
#if defined(SYCL_DEVICE_ONLY) || defined(EIGEN_HIP_DEVICE_COMPILE)
|
|
892
|
+
// Do not try asserts on device code
|
|
893
|
+
#ifndef EIGEN_NO_DEBUG
|
|
894
|
+
#define EIGEN_NO_DEBUG
|
|
895
|
+
#endif
|
|
957
896
|
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
897
|
+
#ifdef EIGEN_INTERNAL_DEBUGGING
|
|
898
|
+
#undef EIGEN_INTERNAL_DEBUGGING
|
|
899
|
+
#endif
|
|
900
|
+
#endif
|
|
961
901
|
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
902
|
+
// No exceptions on device.
|
|
903
|
+
#if defined(SYCL_DEVICE_ONLY) || defined(EIGEN_GPU_COMPILE_PHASE)
|
|
904
|
+
#ifdef EIGEN_EXCEPTIONS
|
|
905
|
+
#undef EIGEN_EXCEPTIONS
|
|
906
|
+
#endif
|
|
965
907
|
#endif
|
|
966
908
|
|
|
967
909
|
#if defined(SYCL_DEVICE_ONLY)
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
910
|
+
#ifndef EIGEN_DONT_VECTORIZE
|
|
911
|
+
#define EIGEN_DONT_VECTORIZE
|
|
912
|
+
#endif
|
|
913
|
+
#define EIGEN_DEVICE_FUNC __attribute__((flatten)) __attribute__((always_inline))
|
|
972
914
|
// All functions callable from CUDA/HIP code must be qualified with __device__
|
|
973
915
|
#elif defined(EIGEN_GPUCC)
|
|
974
|
-
|
|
916
|
+
#define EIGEN_DEVICE_FUNC __host__ __device__
|
|
975
917
|
#else
|
|
976
|
-
|
|
918
|
+
#define EIGEN_DEVICE_FUNC
|
|
977
919
|
#endif
|
|
978
920
|
|
|
979
|
-
|
|
980
921
|
// this macro allows to get rid of linking errors about multiply defined functions.
|
|
981
922
|
// - static is not very good because it prevents definitions from different object files to be merged.
|
|
982
923
|
// So static causes the resulting linked executable to be bloated with multiple copies of the same function.
|
|
@@ -985,51 +926,9 @@
|
|
|
985
926
|
#define EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_DEVICE_FUNC inline
|
|
986
927
|
|
|
987
928
|
#ifdef NDEBUG
|
|
988
|
-
#
|
|
989
|
-
#
|
|
990
|
-
#
|
|
991
|
-
#endif
|
|
992
|
-
|
|
993
|
-
// eigen_plain_assert is where we implement the workaround for the assert() bug in GCC <= 4.3, see bug 89
|
|
994
|
-
#ifdef EIGEN_NO_DEBUG
|
|
995
|
-
#ifdef SYCL_DEVICE_ONLY // used to silence the warning on SYCL device
|
|
996
|
-
#define eigen_plain_assert(x) EIGEN_UNUSED_VARIABLE(x)
|
|
997
|
-
#else
|
|
998
|
-
#define eigen_plain_assert(x)
|
|
999
|
-
#endif
|
|
1000
|
-
#else
|
|
1001
|
-
#if EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO
|
|
1002
|
-
namespace Eigen {
|
|
1003
|
-
namespace internal {
|
|
1004
|
-
inline bool copy_bool(bool b) { return b; }
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
#define eigen_plain_assert(x) assert(x)
|
|
1008
|
-
#else
|
|
1009
|
-
// work around bug 89
|
|
1010
|
-
#include <cstdlib> // for abort
|
|
1011
|
-
#include <iostream> // for std::cerr
|
|
1012
|
-
|
|
1013
|
-
namespace Eigen {
|
|
1014
|
-
namespace internal {
|
|
1015
|
-
// trivial function copying a bool. Must be EIGEN_DONT_INLINE, so we implement it after including Eigen headers.
|
|
1016
|
-
// see bug 89.
|
|
1017
|
-
namespace {
|
|
1018
|
-
EIGEN_DONT_INLINE bool copy_bool(bool b) { return b; }
|
|
1019
|
-
}
|
|
1020
|
-
inline void assert_fail(const char *condition, const char *function, const char *file, int line)
|
|
1021
|
-
{
|
|
1022
|
-
std::cerr << "assertion failed: " << condition << " in function " << function << " at " << file << ":" << line << std::endl;
|
|
1023
|
-
abort();
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
#define eigen_plain_assert(x) \
|
|
1028
|
-
do { \
|
|
1029
|
-
if(!Eigen::internal::copy_bool(x)) \
|
|
1030
|
-
Eigen::internal::assert_fail(EIGEN_MAKESTRING(x), __PRETTY_FUNCTION__, __FILE__, __LINE__); \
|
|
1031
|
-
} while(false)
|
|
1032
|
-
#endif
|
|
929
|
+
#ifndef EIGEN_NO_DEBUG
|
|
930
|
+
#define EIGEN_NO_DEBUG
|
|
931
|
+
#endif
|
|
1033
932
|
#endif
|
|
1034
933
|
|
|
1035
934
|
// eigen_assert can be overridden
|
|
@@ -1040,25 +939,37 @@
|
|
|
1040
939
|
#ifdef EIGEN_INTERNAL_DEBUGGING
|
|
1041
940
|
#define eigen_internal_assert(x) eigen_assert(x)
|
|
1042
941
|
#else
|
|
1043
|
-
#define eigen_internal_assert(x)
|
|
942
|
+
#define eigen_internal_assert(x) ((void)0)
|
|
1044
943
|
#endif
|
|
1045
944
|
|
|
1046
|
-
#
|
|
945
|
+
#if defined(EIGEN_NO_DEBUG) || (defined(EIGEN_GPU_COMPILE_PHASE) && defined(EIGEN_NO_DEBUG_GPU))
|
|
1047
946
|
#define EIGEN_ONLY_USED_FOR_DEBUG(x) EIGEN_UNUSED_VARIABLE(x)
|
|
1048
947
|
#else
|
|
1049
948
|
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
|
|
1050
949
|
#endif
|
|
1051
950
|
|
|
1052
951
|
#ifndef EIGEN_NO_DEPRECATED_WARNING
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
952
|
+
#if EIGEN_COMP_GNUC
|
|
953
|
+
#define EIGEN_DEPRECATED __attribute__((deprecated))
|
|
954
|
+
#elif EIGEN_COMP_MSVC
|
|
955
|
+
#define EIGEN_DEPRECATED __declspec(deprecated)
|
|
956
|
+
#else
|
|
957
|
+
#define EIGEN_DEPRECATED
|
|
958
|
+
#endif
|
|
959
|
+
#else
|
|
960
|
+
#define EIGEN_DEPRECATED
|
|
961
|
+
#endif
|
|
962
|
+
|
|
963
|
+
#ifndef EIGEN_NO_DEPRECATED_WARNING
|
|
964
|
+
#if EIGEN_COMP_GNUC
|
|
965
|
+
#define EIGEN_DEPRECATED_WITH_REASON(message) __attribute__((deprecated(message)))
|
|
966
|
+
#elif EIGEN_COMP_MSVC
|
|
967
|
+
#define EIGEN_DEPRECATED_WITH_REASON(message) __declspec(deprecated(message))
|
|
968
|
+
#else
|
|
969
|
+
#define EIGEN_DEPRECATED_WITH_REASON(message)
|
|
970
|
+
#endif
|
|
1060
971
|
#else
|
|
1061
|
-
|
|
972
|
+
#define EIGEN_DEPRECATED_WITH_REASON(message)
|
|
1062
973
|
#endif
|
|
1063
974
|
|
|
1064
975
|
#if EIGEN_COMP_GNUC
|
|
@@ -1067,100 +978,134 @@
|
|
|
1067
978
|
#define EIGEN_UNUSED
|
|
1068
979
|
#endif
|
|
1069
980
|
|
|
981
|
+
#if EIGEN_COMP_GNUC
|
|
982
|
+
#define EIGEN_PRAGMA(tokens) _Pragma(#tokens)
|
|
983
|
+
#define EIGEN_DIAGNOSTICS(tokens) EIGEN_PRAGMA(GCC diagnostic tokens)
|
|
984
|
+
#define EIGEN_DIAGNOSTICS_OFF(msc, gcc) EIGEN_DIAGNOSTICS(gcc)
|
|
985
|
+
#elif EIGEN_COMP_MSVC
|
|
986
|
+
#define EIGEN_PRAGMA(tokens) __pragma(tokens)
|
|
987
|
+
#define EIGEN_DIAGNOSTICS(tokens) EIGEN_PRAGMA(warning(tokens))
|
|
988
|
+
#define EIGEN_DIAGNOSTICS_OFF(msc, gcc) EIGEN_DIAGNOSTICS(msc)
|
|
989
|
+
#else
|
|
990
|
+
#define EIGEN_PRAGMA(tokens)
|
|
991
|
+
#define EIGEN_DIAGNOSTICS(tokens)
|
|
992
|
+
#define EIGEN_DIAGNOSTICS_OFF(msc, gcc)
|
|
993
|
+
#endif
|
|
994
|
+
|
|
995
|
+
#define EIGEN_DISABLE_DEPRECATED_WARNING EIGEN_DIAGNOSTICS_OFF(disable : 4996, ignored "-Wdeprecated-declarations")
|
|
996
|
+
|
|
1070
997
|
// Suppresses 'unused variable' warnings.
|
|
1071
998
|
namespace Eigen {
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
}
|
|
999
|
+
namespace internal {
|
|
1000
|
+
template <typename T>
|
|
1001
|
+
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr void ignore_unused_variable(const T&) {}
|
|
1002
|
+
} // namespace internal
|
|
1003
|
+
} // namespace Eigen
|
|
1076
1004
|
#define EIGEN_UNUSED_VARIABLE(var) Eigen::internal::ignore_unused_variable(var);
|
|
1077
1005
|
|
|
1078
1006
|
#if !defined(EIGEN_ASM_COMMENT)
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1007
|
+
#if EIGEN_COMP_GNUC && (EIGEN_ARCH_i386_OR_x86_64 || EIGEN_ARCH_ARM_OR_ARM64)
|
|
1008
|
+
#define EIGEN_ASM_COMMENT(X) __asm__("#" X)
|
|
1009
|
+
#else
|
|
1010
|
+
#define EIGEN_ASM_COMMENT(X)
|
|
1011
|
+
#endif
|
|
1084
1012
|
#endif
|
|
1085
|
-
|
|
1086
1013
|
|
|
1087
1014
|
// Acts as a barrier preventing operations involving `X` from crossing. This
|
|
1088
1015
|
// occurs, for example, in the fast rounding trick where a magic constant is
|
|
1089
1016
|
// added then subtracted, which is otherwise compiled away with -ffast-math.
|
|
1090
1017
|
//
|
|
1091
1018
|
// See bug 1674
|
|
1019
|
+
#if defined(EIGEN_GPU_COMPILE_PHASE)
|
|
1020
|
+
#define EIGEN_OPTIMIZATION_BARRIER(X)
|
|
1021
|
+
#endif
|
|
1022
|
+
|
|
1092
1023
|
#if !defined(EIGEN_OPTIMIZATION_BARRIER)
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1024
|
+
// Implement the barrier on GNUC compilers or clang-cl.
|
|
1025
|
+
#if EIGEN_COMP_GNUC || (defined(__clang__) && defined(_MSC_VER))
|
|
1026
|
+
// According to https://gcc.gnu.org/onlinedocs/gcc/Constraints.html:
|
|
1027
|
+
// X: Any operand whatsoever.
|
|
1028
|
+
// r: A register operand is allowed provided that it is in a general
|
|
1029
|
+
// register.
|
|
1030
|
+
// g: Any register, memory or immediate integer operand is allowed, except
|
|
1031
|
+
// for registers that are not general registers.
|
|
1032
|
+
// w: (AArch32/AArch64) Floating point register, Advanced SIMD vector
|
|
1033
|
+
// register or SVE vector register.
|
|
1034
|
+
// x: (SSE) Any SSE register.
|
|
1035
|
+
// (AArch64) Like w, but restricted to registers 0 to 15 inclusive.
|
|
1036
|
+
// v: (PowerPC) An Altivec vector register.
|
|
1037
|
+
// wa:(PowerPC) A VSX register.
|
|
1038
|
+
//
|
|
1039
|
+
// "X" (uppercase) should work for all cases, though this seems to fail for
|
|
1040
|
+
// some versions of GCC for arm/aarch64 with
|
|
1041
|
+
// "error: inconsistent operand constraints in an 'asm'"
|
|
1042
|
+
// Clang x86_64/arm/aarch64 seems to require "g" to support both scalars and
|
|
1043
|
+
// vectors, otherwise
|
|
1044
|
+
// "error: non-trivial scalar-to-vector conversion, possible invalid
|
|
1045
|
+
// constraint for vector type"
|
|
1046
|
+
//
|
|
1047
|
+
// GCC for ppc64le generates an internal compiler error with x/X/g.
|
|
1048
|
+
// GCC for AVX generates an internal compiler error with X.
|
|
1049
|
+
//
|
|
1050
|
+
// Tested on icc/gcc/clang for sse, avx, avx2, avx512dq
|
|
1051
|
+
// gcc for arm, aarch64,
|
|
1052
|
+
// gcc for ppc64le,
|
|
1053
|
+
// both vectors and scalars.
|
|
1054
|
+
//
|
|
1055
|
+
// Note that this is restricted to plain types - this will not work
|
|
1056
|
+
// directly for std::complex<T>, Eigen::half, Eigen::bfloat16. For these,
|
|
1057
|
+
// you will need to apply to the underlying POD type.
|
|
1058
|
+
#if EIGEN_ARCH_PPC && EIGEN_COMP_GNUC_STRICT
|
|
1059
|
+
// This seems to be broken on clang. Packet4f is loaded into a single
|
|
1060
|
+
// register rather than a vector, zeroing out some entries. Integer
|
|
1061
|
+
// types also generate a compile error.
|
|
1062
|
+
#if EIGEN_OS_MAC
|
|
1063
|
+
// General, Altivec for Apple (VSX were added in ISA v2.06):
|
|
1064
|
+
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__("" : "+r,v"(X));
|
|
1065
|
+
#else
|
|
1066
|
+
// General, Altivec, VSX otherwise:
|
|
1067
|
+
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__("" : "+r,v,wa"(X));
|
|
1068
|
+
#endif
|
|
1069
|
+
#elif EIGEN_ARCH_ARM_OR_ARM64
|
|
1070
|
+
#ifdef __ARM_FP
|
|
1071
|
+
// General, VFP or NEON.
|
|
1072
|
+
// Clang doesn't like "r",
|
|
1073
|
+
// error: non-trivial scalar-to-vector conversion, possible invalid
|
|
1074
|
+
// constraint for vector typ
|
|
1075
|
+
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__("" : "+g,w"(X));
|
|
1076
|
+
#else
|
|
1077
|
+
// Arm without VFP or NEON.
|
|
1078
|
+
// "w" constraint will not compile.
|
|
1079
|
+
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__("" : "+g"(X));
|
|
1080
|
+
#endif
|
|
1081
|
+
#elif EIGEN_ARCH_i386_OR_x86_64
|
|
1082
|
+
// General, SSE.
|
|
1083
|
+
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__("" : "+g,x"(X));
|
|
1084
|
+
#else
|
|
1085
|
+
// Not implemented for other architectures.
|
|
1086
|
+
#define EIGEN_OPTIMIZATION_BARRIER(X)
|
|
1087
|
+
#endif
|
|
1088
|
+
#else
|
|
1089
|
+
// Not implemented for other compilers.
|
|
1090
|
+
#define EIGEN_OPTIMIZATION_BARRIER(X)
|
|
1091
|
+
#endif
|
|
1146
1092
|
#endif
|
|
1147
1093
|
|
|
1148
1094
|
#if EIGEN_COMP_MSVC
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
#
|
|
1095
|
+
// NOTE MSVC often gives C4127 warnings with compiletime if statements. See bug 1362.
|
|
1096
|
+
// This workaround is ugly, but it does the job.
|
|
1097
|
+
#define EIGEN_CONST_CONDITIONAL(cond) (void)0, cond
|
|
1152
1098
|
#else
|
|
1153
|
-
#
|
|
1099
|
+
#define EIGEN_CONST_CONDITIONAL(cond) cond
|
|
1154
1100
|
#endif
|
|
1155
1101
|
|
|
1156
1102
|
#ifdef EIGEN_DONT_USE_RESTRICT_KEYWORD
|
|
1157
|
-
|
|
1103
|
+
#define EIGEN_RESTRICT
|
|
1158
1104
|
#endif
|
|
1159
1105
|
#ifndef EIGEN_RESTRICT
|
|
1160
|
-
|
|
1106
|
+
#define EIGEN_RESTRICT __restrict
|
|
1161
1107
|
#endif
|
|
1162
1108
|
|
|
1163
|
-
|
|
1164
1109
|
#ifndef EIGEN_DEFAULT_IO_FORMAT
|
|
1165
1110
|
#ifdef EIGEN_MAKING_DOCS
|
|
1166
1111
|
// format used in Eigen's documentation
|
|
@@ -1174,63 +1119,52 @@ namespace Eigen {
|
|
|
1174
1119
|
// just an empty macro !
|
|
1175
1120
|
#define EIGEN_EMPTY
|
|
1176
1121
|
|
|
1177
|
-
|
|
1178
1122
|
// When compiling CUDA/HIP device code with NVCC or HIPCC
|
|
1179
1123
|
// pull in math functions from the global namespace.
|
|
1180
1124
|
// In host mode, and when device code is compiled with clang,
|
|
1181
1125
|
// use the std versions.
|
|
1182
1126
|
#if (defined(EIGEN_CUDA_ARCH) && defined(__NVCC__)) || defined(EIGEN_HIP_DEVICE_COMPILE)
|
|
1183
|
-
|
|
1184
|
-
#else
|
|
1185
|
-
|
|
1186
|
-
#endif
|
|
1187
|
-
|
|
1188
|
-
#if
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
template <typename OtherDerived> \
|
|
1201
|
-
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
|
|
1127
|
+
#define EIGEN_USING_STD(FUNC) using ::FUNC;
|
|
1128
|
+
#else
|
|
1129
|
+
#define EIGEN_USING_STD(FUNC) using std::FUNC;
|
|
1130
|
+
#endif
|
|
1131
|
+
|
|
1132
|
+
#if EIGEN_COMP_CLANG // workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653)
|
|
1133
|
+
#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
|
|
1134
|
+
using Base::operator=; \
|
|
1135
|
+
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) { \
|
|
1136
|
+
Base::operator=(other); \
|
|
1137
|
+
return *this; \
|
|
1138
|
+
} \
|
|
1139
|
+
template <typename OtherDerived> \
|
|
1140
|
+
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { \
|
|
1141
|
+
Base::operator=(other.derived()); \
|
|
1142
|
+
return *this; \
|
|
1143
|
+
}
|
|
1202
1144
|
#else
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
}
|
|
1145
|
+
#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
|
|
1146
|
+
using Base::operator=; \
|
|
1147
|
+
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) { \
|
|
1148
|
+
Base::operator=(other); \
|
|
1149
|
+
return *this; \
|
|
1150
|
+
}
|
|
1210
1151
|
#endif
|
|
1211
1152
|
|
|
1212
|
-
|
|
1213
1153
|
/**
|
|
1214
1154
|
* \internal
|
|
1215
1155
|
* \brief Macro to explicitly define the default copy constructor.
|
|
1216
1156
|
* This is necessary, because the implicit definition is deprecated if the copy-assignment is overridden.
|
|
1217
1157
|
*/
|
|
1218
|
-
#
|
|
1219
|
-
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS) CLASS(const CLASS&) = default;
|
|
1220
|
-
#else
|
|
1221
|
-
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)
|
|
1222
|
-
#endif
|
|
1223
|
-
|
|
1224
|
-
|
|
1158
|
+
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS) EIGEN_DEVICE_FUNC CLASS(const CLASS&) = default;
|
|
1225
1159
|
|
|
1226
1160
|
/** \internal
|
|
1227
1161
|
* \brief Macro to manually inherit assignment operators.
|
|
1228
|
-
* This is necessary, because the implicitly defined assignment operator gets deleted when a custom operator= is
|
|
1229
|
-
* With C++11 or later this also default-implements the copy-constructor
|
|
1162
|
+
* This is necessary, because the implicitly defined assignment operator gets deleted when a custom operator= is
|
|
1163
|
+
* defined. With C++11 or later this also default-implements the copy-constructor
|
|
1230
1164
|
*/
|
|
1231
|
-
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived)
|
|
1232
|
-
|
|
1233
|
-
|
|
1165
|
+
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
|
|
1166
|
+
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
|
|
1167
|
+
EIGEN_DEFAULT_COPY_CONSTRUCTOR(Derived)
|
|
1234
1168
|
|
|
1235
1169
|
/** \internal
|
|
1236
1170
|
* \brief Macro to manually define default constructors and destructors.
|
|
@@ -1239,81 +1173,47 @@ namespace Eigen {
|
|
|
1239
1173
|
*
|
|
1240
1174
|
* Hiding the default destructor lead to problems in C++03 mode together with boost::multiprecision
|
|
1241
1175
|
*/
|
|
1242
|
-
#
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
~Derived() = default;
|
|
1246
|
-
#else
|
|
1247
|
-
#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived) \
|
|
1248
|
-
Derived() {}; \
|
|
1249
|
-
/* ~Derived() {}; */
|
|
1250
|
-
#endif
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1176
|
+
#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived) \
|
|
1177
|
+
EIGEN_DEVICE_FUNC Derived() = default; \
|
|
1178
|
+
EIGEN_DEVICE_FUNC ~Derived() = default;
|
|
1255
1179
|
|
|
1256
1180
|
/**
|
|
1257
|
-
* Just a side note. Commenting within defines works only by documenting
|
|
1258
|
-
* behind the object (via '!<'). Comments cannot be multi-line and thus
|
|
1259
|
-
* we have these extra long lines. What is confusing doxygen over here is
|
|
1260
|
-
* that we use '\' and basically have a bunch of typedefs with their
|
|
1261
|
-
* documentation in a single line.
|
|
1262
|
-
**/
|
|
1263
|
-
|
|
1264
|
-
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
|
|
1265
|
-
typedef typename Eigen::internal::traits<Derived>::Scalar
|
|
1266
|
-
|
|
1267
|
-
typedef typename
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
typedef typename
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1181
|
+
* Just a side note. Commenting within defines works only by documenting
|
|
1182
|
+
* behind the object (via '!<'). Comments cannot be multi-line and thus
|
|
1183
|
+
* we have these extra long lines. What is confusing doxygen over here is
|
|
1184
|
+
* that we use '\' and basically have a bunch of typedefs with their
|
|
1185
|
+
* documentation in a single line.
|
|
1186
|
+
**/
|
|
1187
|
+
|
|
1188
|
+
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) \
|
|
1189
|
+
typedef typename Eigen::internal::traits<Derived>::Scalar \
|
|
1190
|
+
Scalar; /*!< \brief Numeric type, e.g. float, double, int or std::complex<float>. */ \
|
|
1191
|
+
typedef typename Eigen::NumTraits<Scalar>::Real \
|
|
1192
|
+
RealScalar; /*!< \brief The underlying numeric type for composed scalar types. \details In cases where Scalar is \
|
|
1193
|
+
e.g. std::complex<T>, T were corresponding to RealScalar. */ \
|
|
1194
|
+
typedef typename Base::CoeffReturnType \
|
|
1195
|
+
CoeffReturnType; /*!< \brief The return type for coefficient access. \details Depending on whether the object \
|
|
1196
|
+
allows direct coefficient access (e.g. for a MatrixXd), this type is either 'const Scalar&' \
|
|
1197
|
+
or simply 'Scalar' for objects that do not allow direct coefficient access. */ \
|
|
1198
|
+
typedef typename Eigen::internal::ref_selector<Derived>::type Nested; \
|
|
1199
|
+
typedef typename Eigen::internal::traits<Derived>::StorageKind StorageKind; \
|
|
1200
|
+
typedef typename Eigen::internal::traits<Derived>::StorageIndex StorageIndex; \
|
|
1201
|
+
enum CompileTimeTraits { \
|
|
1202
|
+
RowsAtCompileTime = Eigen::internal::traits<Derived>::RowsAtCompileTime, \
|
|
1203
|
+
ColsAtCompileTime = Eigen::internal::traits<Derived>::ColsAtCompileTime, \
|
|
1204
|
+
Flags = Eigen::internal::traits<Derived>::Flags, \
|
|
1205
|
+
SizeAtCompileTime = Base::SizeAtCompileTime, \
|
|
1206
|
+
MaxSizeAtCompileTime = Base::MaxSizeAtCompileTime, \
|
|
1207
|
+
IsVectorAtCompileTime = Base::IsVectorAtCompileTime \
|
|
1208
|
+
}; \
|
|
1209
|
+
using Base::derived; \
|
|
1279
1210
|
using Base::const_cast_derived;
|
|
1280
1211
|
|
|
1281
|
-
|
|
1282
1212
|
// FIXME Maybe the EIGEN_DENSE_PUBLIC_INTERFACE could be removed as importing PacketScalar is rarely needed
|
|
1283
1213
|
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived) \
|
|
1284
|
-
EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
|
|
1214
|
+
EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) \
|
|
1285
1215
|
typedef typename Base::PacketScalar PacketScalar;
|
|
1286
1216
|
|
|
1287
|
-
|
|
1288
|
-
#define EIGEN_PLAIN_ENUM_MIN(a,b) (((int)a <= (int)b) ? (int)a : (int)b)
|
|
1289
|
-
#define EIGEN_PLAIN_ENUM_MAX(a,b) (((int)a >= (int)b) ? (int)a : (int)b)
|
|
1290
|
-
|
|
1291
|
-
// EIGEN_SIZE_MIN_PREFER_DYNAMIC gives the min between compile-time sizes. 0 has absolute priority, followed by 1,
|
|
1292
|
-
// followed by Dynamic, followed by other finite values. The reason for giving Dynamic the priority over
|
|
1293
|
-
// finite values is that min(3, Dynamic) should be Dynamic, since that could be anything between 0 and 3.
|
|
1294
|
-
#define EIGEN_SIZE_MIN_PREFER_DYNAMIC(a,b) (((int)a == 0 || (int)b == 0) ? 0 \
|
|
1295
|
-
: ((int)a == 1 || (int)b == 1) ? 1 \
|
|
1296
|
-
: ((int)a == Dynamic || (int)b == Dynamic) ? Dynamic \
|
|
1297
|
-
: ((int)a <= (int)b) ? (int)a : (int)b)
|
|
1298
|
-
|
|
1299
|
-
// EIGEN_SIZE_MIN_PREFER_FIXED is a variant of EIGEN_SIZE_MIN_PREFER_DYNAMIC comparing MaxSizes. The difference is that finite values
|
|
1300
|
-
// now have priority over Dynamic, so that min(3, Dynamic) gives 3. Indeed, whatever the actual value is
|
|
1301
|
-
// (between 0 and 3), it is not more than 3.
|
|
1302
|
-
#define EIGEN_SIZE_MIN_PREFER_FIXED(a,b) (((int)a == 0 || (int)b == 0) ? 0 \
|
|
1303
|
-
: ((int)a == 1 || (int)b == 1) ? 1 \
|
|
1304
|
-
: ((int)a == Dynamic && (int)b == Dynamic) ? Dynamic \
|
|
1305
|
-
: ((int)a == Dynamic) ? (int)b \
|
|
1306
|
-
: ((int)b == Dynamic) ? (int)a \
|
|
1307
|
-
: ((int)a <= (int)b) ? (int)a : (int)b)
|
|
1308
|
-
|
|
1309
|
-
// see EIGEN_SIZE_MIN_PREFER_DYNAMIC. No need for a separate variant for MaxSizes here.
|
|
1310
|
-
#define EIGEN_SIZE_MAX(a,b) (((int)a == Dynamic || (int)b == Dynamic) ? Dynamic \
|
|
1311
|
-
: ((int)a >= (int)b) ? (int)a : (int)b)
|
|
1312
|
-
|
|
1313
|
-
#define EIGEN_LOGICAL_XOR(a,b) (((a) || (b)) && !((a) && (b)))
|
|
1314
|
-
|
|
1315
|
-
#define EIGEN_IMPLIES(a,b) (!(a) || (b))
|
|
1316
|
-
|
|
1317
1217
|
#if EIGEN_HAS_BUILTIN(__builtin_expect) || EIGEN_COMP_GNUC
|
|
1318
1218
|
#define EIGEN_PREDICT_FALSE(x) (__builtin_expect(x, false))
|
|
1319
1219
|
#define EIGEN_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
|
|
@@ -1323,142 +1223,124 @@ namespace Eigen {
|
|
|
1323
1223
|
#endif
|
|
1324
1224
|
|
|
1325
1225
|
// the expression type of a standard coefficient wise binary operation
|
|
1326
|
-
#define EIGEN_CWISE_BINARY_RETURN_TYPE(LHS,RHS,OPNAME)
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
#define EIGEN_MAKE_CWISE_BINARY_OP(METHOD,OPNAME) \
|
|
1337
|
-
template<typename OtherDerived> \
|
|
1338
|
-
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME) \
|
|
1339
|
-
(METHOD)(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
|
|
1340
|
-
{ \
|
|
1341
|
-
return EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME)(derived(), other.derived()); \
|
|
1226
|
+
#define EIGEN_CWISE_BINARY_RETURN_TYPE(LHS, RHS, OPNAME) \
|
|
1227
|
+
CwiseBinaryOp<EIGEN_CAT(EIGEN_CAT(internal::scalar_, OPNAME), _op) < typename internal::traits<LHS>::Scalar, \
|
|
1228
|
+
typename internal::traits<RHS>::Scalar>, \
|
|
1229
|
+
const LHS, const RHS >
|
|
1230
|
+
|
|
1231
|
+
#define EIGEN_MAKE_CWISE_BINARY_OP(METHOD, OPNAME) \
|
|
1232
|
+
template <typename OtherDerived> \
|
|
1233
|
+
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE( \
|
|
1234
|
+
Derived, OtherDerived, OPNAME)(METHOD)(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other) const { \
|
|
1235
|
+
return EIGEN_CWISE_BINARY_RETURN_TYPE(Derived, OtherDerived, OPNAME)(derived(), other.derived()); \
|
|
1342
1236
|
}
|
|
1343
1237
|
|
|
1344
|
-
#define EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,TYPEA,TYPEB)
|
|
1345
|
-
(Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
#
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
return EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,PromotedT,OPNAME)(
|
|
1368
|
-
|
|
1238
|
+
#define EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME, TYPEA, TYPEB) \
|
|
1239
|
+
(Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits< \
|
|
1240
|
+
TYPEA, TYPEB, EIGEN_CAT(EIGEN_CAT(Eigen::internal::scalar_, OPNAME), _op) < TYPEA, TYPEB> > > ::value)
|
|
1241
|
+
|
|
1242
|
+
#define EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(EXPR, SCALAR, OPNAME) \
|
|
1243
|
+
CwiseBinaryOp<EIGEN_CAT(EIGEN_CAT(internal::scalar_, OPNAME), _op) < typename internal::traits<EXPR>::Scalar, \
|
|
1244
|
+
SCALAR>, \
|
|
1245
|
+
const EXPR, const typename internal::plain_constant_type<EXPR, SCALAR>::type >
|
|
1246
|
+
|
|
1247
|
+
#define EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(SCALAR, EXPR, OPNAME) \
|
|
1248
|
+
CwiseBinaryOp<EIGEN_CAT(EIGEN_CAT(internal::scalar_, OPNAME), _op) < SCALAR, \
|
|
1249
|
+
typename internal::traits<EXPR>::Scalar>, \
|
|
1250
|
+
const typename internal::plain_constant_type<EXPR, SCALAR>::type, const EXPR >
|
|
1251
|
+
|
|
1252
|
+
#define EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD, OPNAME) \
|
|
1253
|
+
template <typename T> \
|
|
1254
|
+
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE( \
|
|
1255
|
+
Derived, \
|
|
1256
|
+
typename internal::promote_scalar_arg<Scalar EIGEN_COMMA T EIGEN_COMMA EIGEN_SCALAR_BINARY_SUPPORTED( \
|
|
1257
|
+
OPNAME, Scalar, T)>::type, \
|
|
1258
|
+
OPNAME)(METHOD)(const T& scalar) const { \
|
|
1259
|
+
typedef typename internal::promote_scalar_arg<Scalar, T, EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME, Scalar, T)>::type \
|
|
1260
|
+
PromotedT; \
|
|
1261
|
+
return EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived, PromotedT, OPNAME)( \
|
|
1262
|
+
derived(), typename internal::plain_constant_type<Derived, PromotedT>::type( \
|
|
1263
|
+
derived().rows(), derived().cols(), internal::scalar_constant_op<PromotedT>(scalar))); \
|
|
1369
1264
|
}
|
|
1370
1265
|
|
|
1371
|
-
#define EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(METHOD,OPNAME)
|
|
1372
|
-
template <typename T>
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1266
|
+
#define EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(METHOD, OPNAME) \
|
|
1267
|
+
template <typename T> \
|
|
1268
|
+
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE friend const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE( \
|
|
1269
|
+
typename internal::promote_scalar_arg<Scalar EIGEN_COMMA T EIGEN_COMMA EIGEN_SCALAR_BINARY_SUPPORTED( \
|
|
1270
|
+
OPNAME, T, Scalar)>::type, \
|
|
1271
|
+
Derived, OPNAME)(METHOD)(const T& scalar, const StorageBaseType& matrix) { \
|
|
1272
|
+
typedef typename internal::promote_scalar_arg<Scalar, T, EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME, T, Scalar)>::type \
|
|
1273
|
+
PromotedT; \
|
|
1274
|
+
return EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(PromotedT, Derived, OPNAME)( \
|
|
1275
|
+
typename internal::plain_constant_type<Derived, PromotedT>::type( \
|
|
1276
|
+
matrix.derived().rows(), matrix.derived().cols(), internal::scalar_constant_op<PromotedT>(scalar)), \
|
|
1277
|
+
matrix.derived()); \
|
|
1378
1278
|
}
|
|
1379
1279
|
|
|
1380
|
-
#define EIGEN_MAKE_SCALAR_BINARY_OP(METHOD,OPNAME)
|
|
1381
|
-
EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(METHOD,OPNAME) \
|
|
1382
|
-
EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD,OPNAME)
|
|
1280
|
+
#define EIGEN_MAKE_SCALAR_BINARY_OP(METHOD, OPNAME) \
|
|
1281
|
+
EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(METHOD, OPNAME) \
|
|
1282
|
+
EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD, OPNAME)
|
|
1383
1283
|
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1284
|
+
#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_CUDA_ARCH) && !defined(EIGEN_EXCEPTIONS) && \
|
|
1285
|
+
!defined(EIGEN_USE_SYCL) && !defined(EIGEN_HIP_DEVICE_COMPILE)
|
|
1286
|
+
#define EIGEN_EXCEPTIONS
|
|
1387
1287
|
#endif
|
|
1388
1288
|
|
|
1389
|
-
|
|
1390
1289
|
#ifdef EIGEN_EXCEPTIONS
|
|
1391
|
-
#
|
|
1392
|
-
#
|
|
1393
|
-
#
|
|
1394
|
-
#
|
|
1395
|
-
#else
|
|
1396
|
-
#
|
|
1397
|
-
#
|
|
1398
|
-
#
|
|
1399
|
-
#
|
|
1400
|
-
#
|
|
1401
|
-
#
|
|
1402
|
-
#
|
|
1403
|
-
#
|
|
1404
|
-
#
|
|
1405
|
-
#
|
|
1406
|
-
#
|
|
1407
|
-
#
|
|
1408
|
-
#endif
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
#if EIGEN_HAS_CXX11_NOEXCEPT
|
|
1412
|
-
# define EIGEN_INCLUDE_TYPE_TRAITS
|
|
1413
|
-
# define EIGEN_NOEXCEPT noexcept
|
|
1414
|
-
# define EIGEN_NOEXCEPT_IF(x) noexcept(x)
|
|
1415
|
-
# define EIGEN_NO_THROW noexcept(true)
|
|
1416
|
-
# define EIGEN_EXCEPTION_SPEC(X) noexcept(false)
|
|
1417
|
-
#else
|
|
1418
|
-
# define EIGEN_NOEXCEPT
|
|
1419
|
-
# define EIGEN_NOEXCEPT_IF(x)
|
|
1420
|
-
# define EIGEN_NO_THROW throw()
|
|
1421
|
-
# if EIGEN_COMP_MSVC || EIGEN_COMP_CXXVER>=17
|
|
1422
|
-
// MSVC does not support exception specifications (warning C4290),
|
|
1423
|
-
// and they are deprecated in c++11 anyway. This is even an error in c++17.
|
|
1424
|
-
# define EIGEN_EXCEPTION_SPEC(X) throw()
|
|
1425
|
-
# else
|
|
1426
|
-
# define EIGEN_EXCEPTION_SPEC(X) throw(X)
|
|
1427
|
-
# endif
|
|
1428
|
-
#endif
|
|
1429
|
-
|
|
1430
|
-
#if EIGEN_HAS_VARIADIC_TEMPLATES
|
|
1290
|
+
#define EIGEN_THROW_X(X) throw X
|
|
1291
|
+
#define EIGEN_THROW throw
|
|
1292
|
+
#define EIGEN_TRY try
|
|
1293
|
+
#define EIGEN_CATCH(X) catch (X)
|
|
1294
|
+
#else
|
|
1295
|
+
#if defined(EIGEN_CUDA_ARCH)
|
|
1296
|
+
#define EIGEN_THROW_X(X) asm("trap;")
|
|
1297
|
+
#define EIGEN_THROW asm("trap;")
|
|
1298
|
+
#elif defined(EIGEN_HIP_DEVICE_COMPILE)
|
|
1299
|
+
#define EIGEN_THROW_X(X) asm("s_trap 0")
|
|
1300
|
+
#define EIGEN_THROW asm("s_trap 0")
|
|
1301
|
+
#else
|
|
1302
|
+
#define EIGEN_THROW_X(X) std::abort()
|
|
1303
|
+
#define EIGEN_THROW std::abort()
|
|
1304
|
+
#endif
|
|
1305
|
+
#define EIGEN_TRY if (true)
|
|
1306
|
+
#define EIGEN_CATCH(X) else
|
|
1307
|
+
#endif
|
|
1308
|
+
|
|
1431
1309
|
// The all function is used to enable a variadic version of eigen_assert which can take a parameter pack as its input.
|
|
1432
1310
|
namespace Eigen {
|
|
1433
1311
|
namespace internal {
|
|
1434
1312
|
|
|
1435
|
-
inline bool all(){ return true; }
|
|
1436
|
-
|
|
1437
|
-
template<typename T, typename ...Ts>
|
|
1438
|
-
bool all(T t, Ts ... ts){ return t && all(ts...); }
|
|
1313
|
+
EIGEN_DEVICE_FUNC inline bool all() { return true; }
|
|
1439
1314
|
|
|
1315
|
+
template <typename T, typename... Ts>
|
|
1316
|
+
EIGEN_DEVICE_FUNC bool all(T t, Ts... ts) {
|
|
1317
|
+
return t && all(ts...);
|
|
1440
1318
|
}
|
|
1441
|
-
}
|
|
1442
|
-
#endif
|
|
1443
1319
|
|
|
1444
|
-
|
|
1320
|
+
} // namespace internal
|
|
1321
|
+
} // namespace Eigen
|
|
1322
|
+
|
|
1445
1323
|
// provide override and final specifiers if they are available:
|
|
1446
|
-
#
|
|
1447
|
-
#
|
|
1448
|
-
#else
|
|
1449
|
-
# define EIGEN_OVERRIDE
|
|
1450
|
-
# define EIGEN_FINAL
|
|
1451
|
-
#endif
|
|
1324
|
+
#define EIGEN_OVERRIDE override
|
|
1325
|
+
#define EIGEN_FINAL final
|
|
1452
1326
|
|
|
1453
1327
|
// Wrapping #pragma unroll in a macro since it is required for SYCL
|
|
1454
1328
|
#if defined(SYCL_DEVICE_ONLY)
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1329
|
+
#if defined(_MSC_VER)
|
|
1330
|
+
#define EIGEN_UNROLL_LOOP __pragma(unroll)
|
|
1331
|
+
#else
|
|
1332
|
+
#define EIGEN_UNROLL_LOOP _Pragma("unroll")
|
|
1333
|
+
#endif
|
|
1334
|
+
#else
|
|
1335
|
+
#define EIGEN_UNROLL_LOOP
|
|
1336
|
+
#endif
|
|
1337
|
+
|
|
1338
|
+
// Notice: Use this macro with caution. The code in the if body should still
|
|
1339
|
+
// compile with C++14.
|
|
1340
|
+
#if defined(EIGEN_HAS_CXX17_IFCONSTEXPR)
|
|
1341
|
+
#define EIGEN_IF_CONSTEXPR(X) if constexpr (X)
|
|
1460
1342
|
#else
|
|
1461
|
-
|
|
1343
|
+
#define EIGEN_IF_CONSTEXPR(X) if (X)
|
|
1462
1344
|
#endif
|
|
1463
1345
|
|
|
1464
|
-
#endif
|
|
1346
|
+
#endif // EIGEN_MACROS_H
|