tomoto 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +8 -10
- data/ext/tomoto/ct.cpp +11 -11
- data/ext/tomoto/dmr.cpp +14 -13
- data/ext/tomoto/dt.cpp +14 -14
- data/ext/tomoto/extconf.rb +7 -5
- data/ext/tomoto/gdmr.cpp +7 -7
- data/ext/tomoto/hdp.cpp +9 -9
- data/ext/tomoto/hlda.cpp +13 -13
- data/ext/tomoto/hpa.cpp +5 -5
- data/ext/tomoto/lda.cpp +42 -39
- data/ext/tomoto/llda.cpp +6 -6
- data/ext/tomoto/mglda.cpp +15 -15
- data/ext/tomoto/pa.cpp +6 -6
- data/ext/tomoto/plda.cpp +6 -6
- data/ext/tomoto/slda.cpp +8 -8
- data/ext/tomoto/{ext.cpp → tomoto.cpp} +8 -8
- data/ext/tomoto/utils.h +16 -70
- data/lib/tomoto/version.rb +1 -1
- data/lib/tomoto.rb +5 -1
- data/vendor/EigenRand/EigenRand/Core.h +10 -10
- data/vendor/EigenRand/EigenRand/Dists/Basic.h +208 -9
- data/vendor/EigenRand/EigenRand/Dists/Discrete.h +52 -31
- data/vendor/EigenRand/EigenRand/Dists/GammaPoisson.h +9 -8
- data/vendor/EigenRand/EigenRand/Dists/NormalExp.h +28 -21
- data/vendor/EigenRand/EigenRand/EigenRand +11 -6
- data/vendor/EigenRand/EigenRand/Macro.h +13 -7
- data/vendor/EigenRand/EigenRand/MorePacketMath.h +348 -740
- data/vendor/EigenRand/EigenRand/MvDists/Multinomial.h +5 -3
- data/vendor/EigenRand/EigenRand/MvDists/MvNormal.h +9 -3
- data/vendor/EigenRand/EigenRand/PacketFilter.h +11 -253
- data/vendor/EigenRand/EigenRand/PacketRandomEngine.h +21 -47
- data/vendor/EigenRand/EigenRand/RandUtils.h +50 -344
- data/vendor/EigenRand/EigenRand/arch/AVX/MorePacketMath.h +619 -0
- data/vendor/EigenRand/EigenRand/arch/AVX/PacketFilter.h +149 -0
- data/vendor/EigenRand/EigenRand/arch/AVX/RandUtils.h +228 -0
- data/vendor/EigenRand/EigenRand/arch/NEON/MorePacketMath.h +473 -0
- data/vendor/EigenRand/EigenRand/arch/NEON/PacketFilter.h +142 -0
- data/vendor/EigenRand/EigenRand/arch/NEON/RandUtils.h +126 -0
- data/vendor/EigenRand/EigenRand/arch/SSE/MorePacketMath.h +501 -0
- data/vendor/EigenRand/EigenRand/arch/SSE/PacketFilter.h +133 -0
- data/vendor/EigenRand/EigenRand/arch/SSE/RandUtils.h +120 -0
- data/vendor/EigenRand/EigenRand/doc.h +24 -12
- data/vendor/EigenRand/README.md +57 -4
- data/vendor/eigen/COPYING.APACHE +203 -0
- data/vendor/eigen/COPYING.BSD +1 -1
- data/vendor/eigen/COPYING.MINPACK +51 -52
- data/vendor/eigen/Eigen/Cholesky +0 -1
- data/vendor/eigen/Eigen/Core +112 -265
- data/vendor/eigen/Eigen/Eigenvalues +2 -3
- data/vendor/eigen/Eigen/Geometry +5 -8
- data/vendor/eigen/Eigen/Householder +0 -1
- data/vendor/eigen/Eigen/Jacobi +0 -1
- data/vendor/eigen/Eigen/KLUSupport +41 -0
- data/vendor/eigen/Eigen/LU +2 -5
- data/vendor/eigen/Eigen/OrderingMethods +0 -3
- data/vendor/eigen/Eigen/PaStiXSupport +1 -0
- data/vendor/eigen/Eigen/PardisoSupport +0 -0
- data/vendor/eigen/Eigen/QR +2 -3
- data/vendor/eigen/Eigen/QtAlignedMalloc +0 -1
- data/vendor/eigen/Eigen/SVD +0 -1
- data/vendor/eigen/Eigen/Sparse +0 -2
- data/vendor/eigen/Eigen/SparseCholesky +0 -8
- data/vendor/eigen/Eigen/SparseLU +4 -0
- data/vendor/eigen/Eigen/SparseQR +0 -1
- data/vendor/eigen/Eigen/src/Cholesky/LDLT.h +42 -27
- data/vendor/eigen/Eigen/src/Cholesky/LLT.h +39 -23
- data/vendor/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +90 -47
- data/vendor/eigen/Eigen/src/Core/ArithmeticSequence.h +413 -0
- data/vendor/eigen/Eigen/src/Core/Array.h +99 -11
- data/vendor/eigen/Eigen/src/Core/ArrayBase.h +3 -3
- data/vendor/eigen/Eigen/src/Core/ArrayWrapper.h +21 -21
- data/vendor/eigen/Eigen/src/Core/Assign.h +1 -1
- data/vendor/eigen/Eigen/src/Core/AssignEvaluator.h +125 -50
- data/vendor/eigen/Eigen/src/Core/Assign_MKL.h +10 -10
- data/vendor/eigen/Eigen/src/Core/BandMatrix.h +16 -16
- data/vendor/eigen/Eigen/src/Core/Block.h +56 -60
- data/vendor/eigen/Eigen/src/Core/BooleanRedux.h +29 -31
- data/vendor/eigen/Eigen/src/Core/CommaInitializer.h +7 -3
- data/vendor/eigen/Eigen/src/Core/CoreEvaluators.h +325 -272
- data/vendor/eigen/Eigen/src/Core/CoreIterators.h +5 -0
- data/vendor/eigen/Eigen/src/Core/CwiseBinaryOp.h +21 -22
- data/vendor/eigen/Eigen/src/Core/CwiseNullaryOp.h +153 -18
- data/vendor/eigen/Eigen/src/Core/CwiseUnaryOp.h +6 -6
- data/vendor/eigen/Eigen/src/Core/CwiseUnaryView.h +14 -10
- data/vendor/eigen/Eigen/src/Core/DenseBase.h +132 -42
- data/vendor/eigen/Eigen/src/Core/DenseCoeffsBase.h +25 -21
- data/vendor/eigen/Eigen/src/Core/DenseStorage.h +153 -71
- data/vendor/eigen/Eigen/src/Core/Diagonal.h +21 -23
- data/vendor/eigen/Eigen/src/Core/DiagonalMatrix.h +50 -2
- data/vendor/eigen/Eigen/src/Core/DiagonalProduct.h +1 -1
- data/vendor/eigen/Eigen/src/Core/Dot.h +10 -10
- data/vendor/eigen/Eigen/src/Core/EigenBase.h +10 -9
- data/vendor/eigen/Eigen/src/Core/ForceAlignedAccess.h +8 -4
- data/vendor/eigen/Eigen/src/Core/Fuzzy.h +3 -3
- data/vendor/eigen/Eigen/src/Core/GeneralProduct.h +20 -10
- data/vendor/eigen/Eigen/src/Core/GenericPacketMath.h +599 -152
- data/vendor/eigen/Eigen/src/Core/GlobalFunctions.h +40 -33
- data/vendor/eigen/Eigen/src/Core/IO.h +40 -7
- data/vendor/eigen/Eigen/src/Core/IndexedView.h +237 -0
- data/vendor/eigen/Eigen/src/Core/Inverse.h +9 -10
- data/vendor/eigen/Eigen/src/Core/Map.h +7 -7
- data/vendor/eigen/Eigen/src/Core/MapBase.h +10 -3
- data/vendor/eigen/Eigen/src/Core/MathFunctions.h +767 -125
- data/vendor/eigen/Eigen/src/Core/MathFunctionsImpl.h +118 -19
- data/vendor/eigen/Eigen/src/Core/Matrix.h +131 -25
- data/vendor/eigen/Eigen/src/Core/MatrixBase.h +21 -3
- data/vendor/eigen/Eigen/src/Core/NestByValue.h +25 -50
- data/vendor/eigen/Eigen/src/Core/NoAlias.h +4 -3
- data/vendor/eigen/Eigen/src/Core/NumTraits.h +107 -20
- data/vendor/eigen/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
- data/vendor/eigen/Eigen/src/Core/PermutationMatrix.h +3 -31
- data/vendor/eigen/Eigen/src/Core/PlainObjectBase.h +152 -59
- data/vendor/eigen/Eigen/src/Core/Product.h +30 -25
- data/vendor/eigen/Eigen/src/Core/ProductEvaluators.h +192 -125
- data/vendor/eigen/Eigen/src/Core/Random.h +37 -1
- data/vendor/eigen/Eigen/src/Core/Redux.h +180 -170
- data/vendor/eigen/Eigen/src/Core/Ref.h +121 -23
- data/vendor/eigen/Eigen/src/Core/Replicate.h +8 -8
- data/vendor/eigen/Eigen/src/Core/Reshaped.h +454 -0
- data/vendor/eigen/Eigen/src/Core/ReturnByValue.h +7 -5
- data/vendor/eigen/Eigen/src/Core/Reverse.h +18 -12
- data/vendor/eigen/Eigen/src/Core/Select.h +8 -6
- data/vendor/eigen/Eigen/src/Core/SelfAdjointView.h +33 -20
- data/vendor/eigen/Eigen/src/Core/Solve.h +14 -14
- data/vendor/eigen/Eigen/src/Core/SolveTriangular.h +16 -16
- data/vendor/eigen/Eigen/src/Core/SolverBase.h +41 -3
- data/vendor/eigen/Eigen/src/Core/StableNorm.h +100 -70
- data/vendor/eigen/Eigen/src/Core/StlIterators.h +463 -0
- data/vendor/eigen/Eigen/src/Core/Stride.h +9 -4
- data/vendor/eigen/Eigen/src/Core/Swap.h +5 -4
- data/vendor/eigen/Eigen/src/Core/Transpose.h +88 -27
- data/vendor/eigen/Eigen/src/Core/Transpositions.h +26 -47
- data/vendor/eigen/Eigen/src/Core/TriangularMatrix.h +93 -75
- data/vendor/eigen/Eigen/src/Core/VectorBlock.h +5 -5
- data/vendor/eigen/Eigen/src/Core/VectorwiseOp.h +159 -70
- data/vendor/eigen/Eigen/src/Core/Visitor.h +137 -29
- data/vendor/eigen/Eigen/src/Core/arch/AVX/Complex.h +50 -129
- data/vendor/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +126 -337
- data/vendor/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +1092 -155
- data/vendor/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +65 -1
- data/vendor/eigen/Eigen/src/Core/arch/AVX512/Complex.h +422 -0
- data/vendor/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +207 -236
- data/vendor/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +1482 -495
- data/vendor/eigen/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
- data/vendor/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +152 -165
- data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +19 -251
- data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2937 -0
- data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
- data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +629 -0
- data/vendor/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +2042 -392
- data/vendor/eigen/Eigen/src/Core/arch/CUDA/Complex.h +235 -80
- data/vendor/eigen/Eigen/src/Core/arch/Default/BFloat16.h +700 -0
- data/vendor/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +102 -14
- data/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1649 -0
- data/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +110 -0
- data/vendor/eigen/Eigen/src/Core/arch/Default/Half.h +942 -0
- data/vendor/eigen/Eigen/src/Core/arch/Default/Settings.h +1 -1
- data/vendor/eigen/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
- data/vendor/eigen/Eigen/src/Core/arch/{CUDA → GPU}/MathFunctions.h +16 -4
- data/vendor/eigen/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
- data/vendor/eigen/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
- data/vendor/eigen/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
- data/vendor/eigen/Eigen/src/Core/arch/MSA/Complex.h +648 -0
- data/vendor/eigen/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
- data/vendor/eigen/Eigen/src/Core/arch/MSA/PacketMath.h +1233 -0
- data/vendor/eigen/Eigen/src/Core/arch/NEON/Complex.h +313 -219
- data/vendor/eigen/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
- data/vendor/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +54 -70
- data/vendor/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +4376 -549
- data/vendor/eigen/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
- data/vendor/eigen/Eigen/src/Core/arch/SSE/Complex.h +59 -179
- data/vendor/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +65 -428
- data/vendor/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +893 -283
- data/vendor/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +65 -0
- data/vendor/eigen/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
- data/vendor/eigen/Eigen/src/Core/arch/SVE/PacketMath.h +752 -0
- data/vendor/eigen/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
- data/vendor/eigen/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
- data/vendor/eigen/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
- data/vendor/eigen/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
- data/vendor/eigen/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
- data/vendor/eigen/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
- data/vendor/eigen/Eigen/src/Core/arch/ZVector/Complex.h +212 -183
- data/vendor/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +101 -5
- data/vendor/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +510 -395
- data/vendor/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +11 -2
- data/vendor/eigen/Eigen/src/Core/functors/BinaryFunctors.h +112 -46
- data/vendor/eigen/Eigen/src/Core/functors/NullaryFunctors.h +31 -30
- data/vendor/eigen/Eigen/src/Core/functors/StlFunctors.h +32 -2
- data/vendor/eigen/Eigen/src/Core/functors/UnaryFunctors.h +355 -16
- data/vendor/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +1075 -586
- data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +49 -24
- data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +41 -35
- data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +6 -6
- data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +4 -2
- data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +382 -483
- data/vendor/eigen/Eigen/src/Core/products/Parallelizer.h +22 -5
- data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +53 -30
- data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +16 -8
- data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +8 -6
- data/vendor/eigen/Eigen/src/Core/products/SelfadjointProduct.h +4 -4
- data/vendor/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +5 -4
- data/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +33 -27
- data/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +14 -12
- data/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +36 -34
- data/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +8 -4
- data/vendor/eigen/Eigen/src/Core/products/TriangularSolverVector.h +13 -10
- data/vendor/eigen/Eigen/src/Core/util/BlasUtil.h +304 -119
- data/vendor/eigen/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
- data/vendor/eigen/Eigen/src/Core/util/Constants.h +25 -9
- data/vendor/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +26 -3
- data/vendor/eigen/Eigen/src/Core/util/ForwardDeclarations.h +29 -9
- data/vendor/eigen/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
- data/vendor/eigen/Eigen/src/Core/util/IntegralConstant.h +272 -0
- data/vendor/eigen/Eigen/src/Core/util/MKL_support.h +8 -1
- data/vendor/eigen/Eigen/src/Core/util/Macros.h +709 -246
- data/vendor/eigen/Eigen/src/Core/util/Memory.h +222 -52
- data/vendor/eigen/Eigen/src/Core/util/Meta.h +355 -77
- data/vendor/eigen/Eigen/src/Core/util/ReenableStupidWarnings.h +5 -1
- data/vendor/eigen/Eigen/src/Core/util/ReshapedHelper.h +51 -0
- data/vendor/eigen/Eigen/src/Core/util/StaticAssert.h +8 -5
- data/vendor/eigen/Eigen/src/Core/util/SymbolicIndex.h +293 -0
- data/vendor/eigen/Eigen/src/Core/util/XprHelper.h +65 -30
- data/vendor/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +1 -1
- data/vendor/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +7 -4
- data/vendor/eigen/Eigen/src/Eigenvalues/EigenSolver.h +2 -2
- data/vendor/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +1 -1
- data/vendor/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +2 -2
- data/vendor/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +2 -2
- data/vendor/eigen/Eigen/src/Eigenvalues/RealQZ.h +9 -6
- data/vendor/eigen/Eigen/src/Eigenvalues/RealSchur.h +21 -9
- data/vendor/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +77 -43
- data/vendor/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +20 -15
- data/vendor/eigen/Eigen/src/Geometry/AlignedBox.h +99 -5
- data/vendor/eigen/Eigen/src/Geometry/AngleAxis.h +4 -4
- data/vendor/eigen/Eigen/src/Geometry/EulerAngles.h +3 -3
- data/vendor/eigen/Eigen/src/Geometry/Homogeneous.h +15 -11
- data/vendor/eigen/Eigen/src/Geometry/Hyperplane.h +1 -1
- data/vendor/eigen/Eigen/src/Geometry/OrthoMethods.h +3 -2
- data/vendor/eigen/Eigen/src/Geometry/ParametrizedLine.h +39 -2
- data/vendor/eigen/Eigen/src/Geometry/Quaternion.h +70 -14
- data/vendor/eigen/Eigen/src/Geometry/Rotation2D.h +3 -3
- data/vendor/eigen/Eigen/src/Geometry/Scaling.h +23 -5
- data/vendor/eigen/Eigen/src/Geometry/Transform.h +88 -67
- data/vendor/eigen/Eigen/src/Geometry/Translation.h +6 -12
- data/vendor/eigen/Eigen/src/Geometry/Umeyama.h +1 -1
- data/vendor/eigen/Eigen/src/Geometry/arch/Geometry_SIMD.h +168 -0
- data/vendor/eigen/Eigen/src/Householder/BlockHouseholder.h +9 -2
- data/vendor/eigen/Eigen/src/Householder/Householder.h +8 -4
- data/vendor/eigen/Eigen/src/Householder/HouseholderSequence.h +123 -48
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +15 -15
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +7 -23
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +5 -22
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +41 -47
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +51 -60
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +70 -20
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +2 -20
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +11 -9
- data/vendor/eigen/Eigen/src/Jacobi/Jacobi.h +31 -10
- data/vendor/eigen/Eigen/src/KLUSupport/KLUSupport.h +358 -0
- data/vendor/eigen/Eigen/src/LU/Determinant.h +35 -19
- data/vendor/eigen/Eigen/src/LU/FullPivLU.h +29 -43
- data/vendor/eigen/Eigen/src/LU/InverseImpl.h +25 -8
- data/vendor/eigen/Eigen/src/LU/PartialPivLU.h +71 -58
- data/vendor/eigen/Eigen/src/LU/arch/InverseSize4.h +351 -0
- data/vendor/eigen/Eigen/src/OrderingMethods/Amd.h +7 -17
- data/vendor/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +297 -277
- data/vendor/eigen/Eigen/src/OrderingMethods/Ordering.h +6 -10
- data/vendor/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +1 -1
- data/vendor/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +9 -7
- data/vendor/eigen/Eigen/src/QR/ColPivHouseholderQR.h +41 -20
- data/vendor/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +100 -27
- data/vendor/eigen/Eigen/src/QR/FullPivHouseholderQR.h +59 -22
- data/vendor/eigen/Eigen/src/QR/HouseholderQR.h +48 -23
- data/vendor/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +25 -3
- data/vendor/eigen/Eigen/src/SVD/BDCSVD.h +183 -63
- data/vendor/eigen/Eigen/src/SVD/JacobiSVD.h +22 -14
- data/vendor/eigen/Eigen/src/SVD/SVDBase.h +83 -22
- data/vendor/eigen/Eigen/src/SVD/UpperBidiagonalization.h +3 -3
- data/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +17 -9
- data/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +12 -37
- data/vendor/eigen/Eigen/src/SparseCore/AmbiVector.h +3 -2
- data/vendor/eigen/Eigen/src/SparseCore/CompressedStorage.h +16 -0
- data/vendor/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +6 -6
- data/vendor/eigen/Eigen/src/SparseCore/SparseAssign.h +81 -27
- data/vendor/eigen/Eigen/src/SparseCore/SparseBlock.h +25 -57
- data/vendor/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +40 -11
- data/vendor/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +11 -15
- data/vendor/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +4 -2
- data/vendor/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +30 -8
- data/vendor/eigen/Eigen/src/SparseCore/SparseMatrix.h +126 -11
- data/vendor/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +5 -12
- data/vendor/eigen/Eigen/src/SparseCore/SparseProduct.h +13 -1
- data/vendor/eigen/Eigen/src/SparseCore/SparseRef.h +7 -7
- data/vendor/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +5 -2
- data/vendor/eigen/Eigen/src/SparseCore/SparseUtil.h +8 -0
- data/vendor/eigen/Eigen/src/SparseCore/SparseVector.h +1 -1
- data/vendor/eigen/Eigen/src/SparseCore/SparseView.h +1 -0
- data/vendor/eigen/Eigen/src/SparseLU/SparseLU.h +162 -12
- data/vendor/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +1 -1
- data/vendor/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +76 -2
- data/vendor/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +2 -2
- data/vendor/eigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +1 -1
- data/vendor/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +1 -1
- data/vendor/eigen/Eigen/src/SparseQR/SparseQR.h +19 -6
- data/vendor/eigen/Eigen/src/StlSupport/StdDeque.h +2 -12
- data/vendor/eigen/Eigen/src/StlSupport/StdList.h +2 -2
- data/vendor/eigen/Eigen/src/StlSupport/StdVector.h +2 -2
- data/vendor/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +6 -8
- data/vendor/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +175 -39
- data/vendor/eigen/Eigen/src/misc/lapacke.h +5 -4
- data/vendor/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.h +28 -2
- data/vendor/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.h +155 -11
- data/vendor/eigen/Eigen/src/plugins/BlockMethods.h +626 -242
- data/vendor/eigen/Eigen/src/plugins/CommonCwiseUnaryOps.h +14 -0
- data/vendor/eigen/Eigen/src/plugins/IndexedViewMethods.h +262 -0
- data/vendor/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.h +4 -4
- data/vendor/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.h +10 -0
- data/vendor/eigen/Eigen/src/plugins/ReshapedMethods.h +149 -0
- data/vendor/eigen/README.md +2 -0
- data/vendor/eigen/bench/btl/README +1 -1
- data/vendor/eigen/bench/tensors/README +6 -7
- data/vendor/eigen/ci/README.md +56 -0
- data/vendor/eigen/demos/mix_eigen_and_c/README +1 -1
- data/vendor/eigen/unsupported/Eigen/CXX11/src/Tensor/README.md +213 -158
- data/vendor/eigen/unsupported/README.txt +1 -1
- data/vendor/tomotopy/README.kr.rst +78 -0
- data/vendor/tomotopy/README.rst +75 -0
- data/vendor/tomotopy/src/Labeling/FoRelevance.cpp +2 -2
- data/vendor/tomotopy/src/Labeling/Phraser.hpp +4 -4
- data/vendor/tomotopy/src/TopicModel/CTModel.hpp +7 -3
- data/vendor/tomotopy/src/TopicModel/DMRModel.hpp +7 -3
- data/vendor/tomotopy/src/TopicModel/DTModel.hpp +6 -3
- data/vendor/tomotopy/src/TopicModel/GDMRModel.hpp +2 -2
- data/vendor/tomotopy/src/TopicModel/HDP.h +1 -0
- data/vendor/tomotopy/src/TopicModel/HDPModel.hpp +57 -6
- data/vendor/tomotopy/src/TopicModel/HLDAModel.hpp +6 -3
- data/vendor/tomotopy/src/TopicModel/HPAModel.hpp +3 -2
- data/vendor/tomotopy/src/TopicModel/LDA.h +3 -3
- data/vendor/tomotopy/src/TopicModel/LDACVB0Model.hpp +5 -5
- data/vendor/tomotopy/src/TopicModel/LDAModel.hpp +50 -19
- data/vendor/tomotopy/src/TopicModel/LLDAModel.hpp +6 -2
- data/vendor/tomotopy/src/TopicModel/MGLDAModel.hpp +3 -2
- data/vendor/tomotopy/src/TopicModel/PAModel.hpp +1 -1
- data/vendor/tomotopy/src/TopicModel/PLDAModel.hpp +6 -2
- data/vendor/tomotopy/src/TopicModel/PT.h +3 -1
- data/vendor/tomotopy/src/TopicModel/PTModel.hpp +36 -3
- data/vendor/tomotopy/src/TopicModel/SLDAModel.hpp +6 -3
- data/vendor/tomotopy/src/TopicModel/TopicModel.hpp +55 -26
- data/vendor/tomotopy/src/Utils/AliasMethod.hpp +5 -4
- data/vendor/tomotopy/src/Utils/Dictionary.h +2 -2
- data/vendor/tomotopy/src/Utils/EigenAddonOps.hpp +36 -1
- data/vendor/tomotopy/src/Utils/MultiNormalDistribution.hpp +1 -1
- data/vendor/tomotopy/src/Utils/TruncMultiNormal.hpp +1 -1
- data/vendor/tomotopy/src/Utils/exception.h +6 -0
- data/vendor/tomotopy/src/Utils/math.h +2 -2
- data/vendor/tomotopy/src/Utils/sample.hpp +14 -12
- data/vendor/tomotopy/src/Utils/serializer.hpp +30 -5
- data/vendor/tomotopy/src/Utils/sse_gamma.h +0 -3
- metadata +64 -18
- data/vendor/eigen/Eigen/CMakeLists.txt +0 -19
- data/vendor/eigen/Eigen/src/Core/arch/CUDA/Half.h +0 -674
- data/vendor/eigen/Eigen/src/Core/arch/CUDA/PacketMath.h +0 -333
- data/vendor/eigen/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +0 -1124
- data/vendor/eigen/Eigen/src/Core/arch/CUDA/TypeCasting.h +0 -212
- data/vendor/eigen/Eigen/src/Geometry/arch/Geometry_SSE.h +0 -161
- data/vendor/eigen/Eigen/src/LU/arch/Inverse_SSE.h +0 -338
|
@@ -11,13 +11,54 @@
|
|
|
11
11
|
#ifndef EIGEN_META_H
|
|
12
12
|
#define EIGEN_META_H
|
|
13
13
|
|
|
14
|
-
#if defined(
|
|
15
|
-
|
|
16
|
-
#include <
|
|
14
|
+
#if defined(EIGEN_GPU_COMPILE_PHASE)
|
|
15
|
+
|
|
16
|
+
#include <cfloat>
|
|
17
|
+
|
|
18
|
+
#if defined(EIGEN_CUDA_ARCH)
|
|
19
|
+
#include <math_constants.h>
|
|
20
|
+
#endif
|
|
21
|
+
|
|
22
|
+
#if defined(EIGEN_HIP_DEVICE_COMPILE)
|
|
23
|
+
#include "Eigen/src/Core/arch/HIP/hcc/math_constants.h"
|
|
24
|
+
#endif
|
|
25
|
+
|
|
17
26
|
#endif
|
|
18
27
|
|
|
19
|
-
|
|
28
|
+
// Recent versions of ICC require <cstdint> for pointer types below.
|
|
29
|
+
#define EIGEN_ICC_NEEDS_CSTDINT (EIGEN_COMP_ICC>=1600 && EIGEN_COMP_CXXVER >= 11)
|
|
30
|
+
|
|
31
|
+
// Define portable (u)int{32,64} types
|
|
32
|
+
#if EIGEN_HAS_CXX11 || EIGEN_ICC_NEEDS_CSTDINT
|
|
20
33
|
#include <cstdint>
|
|
34
|
+
namespace Eigen {
|
|
35
|
+
namespace numext {
|
|
36
|
+
typedef std::uint8_t uint8_t;
|
|
37
|
+
typedef std::int8_t int8_t;
|
|
38
|
+
typedef std::uint16_t uint16_t;
|
|
39
|
+
typedef std::int16_t int16_t;
|
|
40
|
+
typedef std::uint32_t uint32_t;
|
|
41
|
+
typedef std::int32_t int32_t;
|
|
42
|
+
typedef std::uint64_t uint64_t;
|
|
43
|
+
typedef std::int64_t int64_t;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
#else
|
|
47
|
+
// Without c++11, all compilers able to compile Eigen also
|
|
48
|
+
// provide the C99 stdint.h header file.
|
|
49
|
+
#include <stdint.h>
|
|
50
|
+
namespace Eigen {
|
|
51
|
+
namespace numext {
|
|
52
|
+
typedef ::uint8_t uint8_t;
|
|
53
|
+
typedef ::int8_t int8_t;
|
|
54
|
+
typedef ::uint16_t uint16_t;
|
|
55
|
+
typedef ::int16_t int16_t;
|
|
56
|
+
typedef ::uint32_t uint32_t;
|
|
57
|
+
typedef ::int32_t int32_t;
|
|
58
|
+
typedef ::uint64_t uint64_t;
|
|
59
|
+
typedef ::int64_t int64_t;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
21
62
|
#endif
|
|
22
63
|
|
|
23
64
|
namespace Eigen {
|
|
@@ -43,26 +84,33 @@ namespace internal {
|
|
|
43
84
|
|
|
44
85
|
// Only recent versions of ICC complain about using ptrdiff_t to hold pointers,
|
|
45
86
|
// and older versions do not provide *intptr_t types.
|
|
46
|
-
#if
|
|
87
|
+
#if EIGEN_ICC_NEEDS_CSTDINT
|
|
47
88
|
typedef std::intptr_t IntPtr;
|
|
48
89
|
typedef std::uintptr_t UIntPtr;
|
|
49
90
|
#else
|
|
50
91
|
typedef std::ptrdiff_t IntPtr;
|
|
51
92
|
typedef std::size_t UIntPtr;
|
|
52
93
|
#endif
|
|
94
|
+
#undef EIGEN_ICC_NEEDS_CSTDINT
|
|
53
95
|
|
|
54
96
|
struct true_type { enum { value = 1 }; };
|
|
55
97
|
struct false_type { enum { value = 0 }; };
|
|
56
98
|
|
|
99
|
+
template<bool Condition>
|
|
100
|
+
struct bool_constant;
|
|
101
|
+
|
|
102
|
+
template<>
|
|
103
|
+
struct bool_constant<true> : true_type {};
|
|
104
|
+
|
|
105
|
+
template<>
|
|
106
|
+
struct bool_constant<false> : false_type {};
|
|
107
|
+
|
|
57
108
|
template<bool Condition, typename Then, typename Else>
|
|
58
109
|
struct conditional { typedef Then type; };
|
|
59
110
|
|
|
60
111
|
template<typename Then, typename Else>
|
|
61
112
|
struct conditional <false, Then, Else> { typedef Else type; };
|
|
62
113
|
|
|
63
|
-
template<typename T, typename U> struct is_same { enum { value = 0 }; };
|
|
64
|
-
template<typename T> struct is_same<T,T> { enum { value = 1 }; };
|
|
65
|
-
|
|
66
114
|
template<typename T> struct remove_reference { typedef T type; };
|
|
67
115
|
template<typename T> struct remove_reference<T&> { typedef T type; };
|
|
68
116
|
|
|
@@ -97,17 +145,33 @@ template<> struct is_arithmetic<unsigned int> { enum { value = true }; };
|
|
|
97
145
|
template<> struct is_arithmetic<signed long> { enum { value = true }; };
|
|
98
146
|
template<> struct is_arithmetic<unsigned long> { enum { value = true }; };
|
|
99
147
|
|
|
100
|
-
template<typename T> struct
|
|
101
|
-
template
|
|
102
|
-
|
|
103
|
-
template
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
template<> struct
|
|
108
|
-
template<> struct
|
|
109
|
-
|
|
110
|
-
|
|
148
|
+
template<typename T, typename U> struct is_same { enum { value = 0 }; };
|
|
149
|
+
template<typename T> struct is_same<T,T> { enum { value = 1 }; };
|
|
150
|
+
|
|
151
|
+
template< class T >
|
|
152
|
+
struct is_void : is_same<void, typename remove_const<T>::type> {};
|
|
153
|
+
|
|
154
|
+
#if EIGEN_HAS_CXX11
|
|
155
|
+
template<> struct is_arithmetic<signed long long> { enum { value = true }; };
|
|
156
|
+
template<> struct is_arithmetic<unsigned long long> { enum { value = true }; };
|
|
157
|
+
using std::is_integral;
|
|
158
|
+
#else
|
|
159
|
+
template<typename T> struct is_integral { enum { value = false }; };
|
|
160
|
+
template<> struct is_integral<bool> { enum { value = true }; };
|
|
161
|
+
template<> struct is_integral<char> { enum { value = true }; };
|
|
162
|
+
template<> struct is_integral<signed char> { enum { value = true }; };
|
|
163
|
+
template<> struct is_integral<unsigned char> { enum { value = true }; };
|
|
164
|
+
template<> struct is_integral<signed short> { enum { value = true }; };
|
|
165
|
+
template<> struct is_integral<unsigned short> { enum { value = true }; };
|
|
166
|
+
template<> struct is_integral<signed int> { enum { value = true }; };
|
|
167
|
+
template<> struct is_integral<unsigned int> { enum { value = true }; };
|
|
168
|
+
template<> struct is_integral<signed long> { enum { value = true }; };
|
|
169
|
+
template<> struct is_integral<unsigned long> { enum { value = true }; };
|
|
170
|
+
#if EIGEN_COMP_MSVC
|
|
171
|
+
template<> struct is_integral<signed __int64> { enum { value = true }; };
|
|
172
|
+
template<> struct is_integral<unsigned __int64> { enum { value = true }; };
|
|
173
|
+
#endif
|
|
174
|
+
#endif
|
|
111
175
|
|
|
112
176
|
#if EIGEN_HAS_CXX11
|
|
113
177
|
using std::make_unsigned;
|
|
@@ -129,6 +193,16 @@ template<> struct make_unsigned<unsigned long> { typedef unsigned long type;
|
|
|
129
193
|
template<> struct make_unsigned<signed __int64> { typedef unsigned __int64 type; };
|
|
130
194
|
template<> struct make_unsigned<unsigned __int64> { typedef unsigned __int64 type; };
|
|
131
195
|
#endif
|
|
196
|
+
|
|
197
|
+
// Some platforms define int64_t as `long long` even for C++03, where
|
|
198
|
+
// `long long` is not guaranteed by the standard. In this case we are missing
|
|
199
|
+
// the definition for make_unsigned. If we just define it, we run into issues
|
|
200
|
+
// where `long long` doesn't exist in some compilers for C++03. We therefore add
|
|
201
|
+
// the specialization for these platforms only.
|
|
202
|
+
#if EIGEN_OS_MAC || EIGEN_COMP_MINGW
|
|
203
|
+
template<> struct make_unsigned<unsigned long long> { typedef unsigned long long type; };
|
|
204
|
+
template<> struct make_unsigned<long long> { typedef unsigned long long type; };
|
|
205
|
+
#endif
|
|
132
206
|
#endif
|
|
133
207
|
|
|
134
208
|
template <typename T> struct add_const { typedef const T type; };
|
|
@@ -143,6 +217,11 @@ template<typename T> struct add_const_on_value_type<T*> { typedef T const
|
|
|
143
217
|
template<typename T> struct add_const_on_value_type<T* const> { typedef T const* const type; };
|
|
144
218
|
template<typename T> struct add_const_on_value_type<T const* const> { typedef T const* const type; };
|
|
145
219
|
|
|
220
|
+
#if EIGEN_HAS_CXX11
|
|
221
|
+
|
|
222
|
+
using std::is_convertible;
|
|
223
|
+
|
|
224
|
+
#else
|
|
146
225
|
|
|
147
226
|
template<typename From, typename To>
|
|
148
227
|
struct is_convertible_impl
|
|
@@ -156,16 +235,19 @@ private:
|
|
|
156
235
|
struct yes {int a[1];};
|
|
157
236
|
struct no {int a[2];};
|
|
158
237
|
|
|
159
|
-
|
|
238
|
+
template<typename T>
|
|
239
|
+
static yes test(T, int);
|
|
240
|
+
|
|
241
|
+
template<typename T>
|
|
160
242
|
static no test(any_conversion, ...);
|
|
161
243
|
|
|
162
244
|
public:
|
|
163
|
-
static From ms_from;
|
|
245
|
+
static typename internal::remove_reference<From>::type* ms_from;
|
|
164
246
|
#ifdef __INTEL_COMPILER
|
|
165
247
|
#pragma warning push
|
|
166
248
|
#pragma warning ( disable : 2259 )
|
|
167
249
|
#endif
|
|
168
|
-
enum { value = sizeof(test(ms_from, 0))==sizeof(yes) };
|
|
250
|
+
enum { value = sizeof(test<To>(*ms_from, 0))==sizeof(yes) };
|
|
169
251
|
#ifdef __INTEL_COMPILER
|
|
170
252
|
#pragma warning pop
|
|
171
253
|
#endif
|
|
@@ -174,10 +256,17 @@ public:
|
|
|
174
256
|
template<typename From, typename To>
|
|
175
257
|
struct is_convertible
|
|
176
258
|
{
|
|
177
|
-
enum { value = is_convertible_impl<
|
|
178
|
-
typename remove_all<To >::type>::value };
|
|
259
|
+
enum { value = is_convertible_impl<From,To>::value };
|
|
179
260
|
};
|
|
180
261
|
|
|
262
|
+
template<typename T>
|
|
263
|
+
struct is_convertible<T,T&> { enum { value = false }; };
|
|
264
|
+
|
|
265
|
+
template<typename T>
|
|
266
|
+
struct is_convertible<const T,const T&> { enum { value = true }; };
|
|
267
|
+
|
|
268
|
+
#endif
|
|
269
|
+
|
|
181
270
|
/** \internal Allows to enable/disable an overload
|
|
182
271
|
* according to a compile time condition.
|
|
183
272
|
*/
|
|
@@ -186,7 +275,7 @@ template<bool Condition, typename T=void> struct enable_if;
|
|
|
186
275
|
template<typename T> struct enable_if<true,T>
|
|
187
276
|
{ typedef T type; };
|
|
188
277
|
|
|
189
|
-
#if defined(
|
|
278
|
+
#if defined(EIGEN_GPU_COMPILE_PHASE) && !EIGEN_HAS_CXX11
|
|
190
279
|
#if !defined(__FLT_EPSILON__)
|
|
191
280
|
#define __FLT_EPSILON__ FLT_EPSILON
|
|
192
281
|
#define __DBL_EPSILON__ DBL_EPSILON
|
|
@@ -197,7 +286,7 @@ namespace device {
|
|
|
197
286
|
template<typename T> struct numeric_limits
|
|
198
287
|
{
|
|
199
288
|
EIGEN_DEVICE_FUNC
|
|
200
|
-
static T epsilon() { return 0; }
|
|
289
|
+
static EIGEN_CONSTEXPR T epsilon() { return 0; }
|
|
201
290
|
static T (max)() { assert(false && "Highest not supported for this type"); }
|
|
202
291
|
static T (min)() { assert(false && "Lowest not supported for this type"); }
|
|
203
292
|
static T infinity() { assert(false && "Infinity not supported for this type"); }
|
|
@@ -205,91 +294,130 @@ template<typename T> struct numeric_limits
|
|
|
205
294
|
};
|
|
206
295
|
template<> struct numeric_limits<float>
|
|
207
296
|
{
|
|
208
|
-
EIGEN_DEVICE_FUNC
|
|
297
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
209
298
|
static float epsilon() { return __FLT_EPSILON__; }
|
|
210
299
|
EIGEN_DEVICE_FUNC
|
|
211
|
-
static float (max)() {
|
|
212
|
-
|
|
300
|
+
static float (max)() {
|
|
301
|
+
#if defined(EIGEN_CUDA_ARCH)
|
|
302
|
+
return CUDART_MAX_NORMAL_F;
|
|
303
|
+
#else
|
|
304
|
+
return HIPRT_MAX_NORMAL_F;
|
|
305
|
+
#endif
|
|
306
|
+
}
|
|
307
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
213
308
|
static float (min)() { return FLT_MIN; }
|
|
214
309
|
EIGEN_DEVICE_FUNC
|
|
215
|
-
static float infinity() {
|
|
310
|
+
static float infinity() {
|
|
311
|
+
#if defined(EIGEN_CUDA_ARCH)
|
|
312
|
+
return CUDART_INF_F;
|
|
313
|
+
#else
|
|
314
|
+
return HIPRT_INF_F;
|
|
315
|
+
#endif
|
|
316
|
+
}
|
|
216
317
|
EIGEN_DEVICE_FUNC
|
|
217
|
-
static float quiet_NaN() {
|
|
318
|
+
static float quiet_NaN() {
|
|
319
|
+
#if defined(EIGEN_CUDA_ARCH)
|
|
320
|
+
return CUDART_NAN_F;
|
|
321
|
+
#else
|
|
322
|
+
return HIPRT_NAN_F;
|
|
323
|
+
#endif
|
|
324
|
+
}
|
|
218
325
|
};
|
|
219
326
|
template<> struct numeric_limits<double>
|
|
220
327
|
{
|
|
221
|
-
EIGEN_DEVICE_FUNC
|
|
328
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
222
329
|
static double epsilon() { return __DBL_EPSILON__; }
|
|
223
|
-
EIGEN_DEVICE_FUNC
|
|
330
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
224
331
|
static double (max)() { return DBL_MAX; }
|
|
225
|
-
EIGEN_DEVICE_FUNC
|
|
332
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
226
333
|
static double (min)() { return DBL_MIN; }
|
|
227
334
|
EIGEN_DEVICE_FUNC
|
|
228
|
-
static double infinity() {
|
|
335
|
+
static double infinity() {
|
|
336
|
+
#if defined(EIGEN_CUDA_ARCH)
|
|
337
|
+
return CUDART_INF;
|
|
338
|
+
#else
|
|
339
|
+
return HIPRT_INF;
|
|
340
|
+
#endif
|
|
341
|
+
}
|
|
229
342
|
EIGEN_DEVICE_FUNC
|
|
230
|
-
static double quiet_NaN() {
|
|
343
|
+
static double quiet_NaN() {
|
|
344
|
+
#if defined(EIGEN_CUDA_ARCH)
|
|
345
|
+
return CUDART_NAN;
|
|
346
|
+
#else
|
|
347
|
+
return HIPRT_NAN;
|
|
348
|
+
#endif
|
|
349
|
+
}
|
|
231
350
|
};
|
|
232
351
|
template<> struct numeric_limits<int>
|
|
233
352
|
{
|
|
234
|
-
EIGEN_DEVICE_FUNC
|
|
353
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
235
354
|
static int epsilon() { return 0; }
|
|
236
|
-
EIGEN_DEVICE_FUNC
|
|
355
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
237
356
|
static int (max)() { return INT_MAX; }
|
|
238
|
-
EIGEN_DEVICE_FUNC
|
|
357
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
239
358
|
static int (min)() { return INT_MIN; }
|
|
240
359
|
};
|
|
241
360
|
template<> struct numeric_limits<unsigned int>
|
|
242
361
|
{
|
|
243
|
-
EIGEN_DEVICE_FUNC
|
|
362
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
244
363
|
static unsigned int epsilon() { return 0; }
|
|
245
|
-
EIGEN_DEVICE_FUNC
|
|
364
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
246
365
|
static unsigned int (max)() { return UINT_MAX; }
|
|
247
|
-
EIGEN_DEVICE_FUNC
|
|
366
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
248
367
|
static unsigned int (min)() { return 0; }
|
|
249
368
|
};
|
|
250
369
|
template<> struct numeric_limits<long>
|
|
251
370
|
{
|
|
252
|
-
EIGEN_DEVICE_FUNC
|
|
371
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
253
372
|
static long epsilon() { return 0; }
|
|
254
|
-
EIGEN_DEVICE_FUNC
|
|
373
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
255
374
|
static long (max)() { return LONG_MAX; }
|
|
256
|
-
EIGEN_DEVICE_FUNC
|
|
375
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
257
376
|
static long (min)() { return LONG_MIN; }
|
|
258
377
|
};
|
|
259
378
|
template<> struct numeric_limits<unsigned long>
|
|
260
379
|
{
|
|
261
|
-
EIGEN_DEVICE_FUNC
|
|
380
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
262
381
|
static unsigned long epsilon() { return 0; }
|
|
263
|
-
EIGEN_DEVICE_FUNC
|
|
382
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
264
383
|
static unsigned long (max)() { return ULONG_MAX; }
|
|
265
|
-
EIGEN_DEVICE_FUNC
|
|
384
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
266
385
|
static unsigned long (min)() { return 0; }
|
|
267
386
|
};
|
|
268
387
|
template<> struct numeric_limits<long long>
|
|
269
388
|
{
|
|
270
|
-
EIGEN_DEVICE_FUNC
|
|
389
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
271
390
|
static long long epsilon() { return 0; }
|
|
272
|
-
EIGEN_DEVICE_FUNC
|
|
391
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
273
392
|
static long long (max)() { return LLONG_MAX; }
|
|
274
|
-
EIGEN_DEVICE_FUNC
|
|
393
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
275
394
|
static long long (min)() { return LLONG_MIN; }
|
|
276
395
|
};
|
|
277
396
|
template<> struct numeric_limits<unsigned long long>
|
|
278
397
|
{
|
|
279
|
-
EIGEN_DEVICE_FUNC
|
|
398
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
280
399
|
static unsigned long long epsilon() { return 0; }
|
|
281
|
-
EIGEN_DEVICE_FUNC
|
|
400
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
282
401
|
static unsigned long long (max)() { return ULLONG_MAX; }
|
|
283
|
-
EIGEN_DEVICE_FUNC
|
|
402
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
284
403
|
static unsigned long long (min)() { return 0; }
|
|
285
404
|
};
|
|
405
|
+
template<> struct numeric_limits<bool>
|
|
406
|
+
{
|
|
407
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
408
|
+
static bool epsilon() { return false; }
|
|
409
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
410
|
+
static bool (max)() { return true; }
|
|
411
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
|
412
|
+
static bool (min)() { return false; }
|
|
413
|
+
};
|
|
286
414
|
|
|
287
415
|
}
|
|
288
416
|
|
|
289
|
-
#endif
|
|
417
|
+
#endif // defined(EIGEN_GPU_COMPILE_PHASE) && !EIGEN_HAS_CXX11
|
|
290
418
|
|
|
291
419
|
/** \internal
|
|
292
|
-
* A base class do disable default copy ctor and copy
|
|
420
|
+
* A base class do disable default copy ctor and copy assignment operator.
|
|
293
421
|
*/
|
|
294
422
|
class noncopyable
|
|
295
423
|
{
|
|
@@ -301,13 +429,82 @@ protected:
|
|
|
301
429
|
};
|
|
302
430
|
|
|
303
431
|
/** \internal
|
|
304
|
-
*
|
|
432
|
+
* Provides access to the number of elements in the object of as a compile-time constant expression.
|
|
433
|
+
* It "returns" Eigen::Dynamic if the size cannot be resolved at compile-time (default).
|
|
434
|
+
*
|
|
435
|
+
* Similar to std::tuple_size, but more general.
|
|
436
|
+
*
|
|
437
|
+
* It currently supports:
|
|
438
|
+
* - any types T defining T::SizeAtCompileTime
|
|
439
|
+
* - plain C arrays as T[N]
|
|
440
|
+
* - std::array (c++11)
|
|
441
|
+
* - some internal types such as SingleRange and AllRange
|
|
442
|
+
*
|
|
443
|
+
* The second template parameter eases SFINAE-based specializations.
|
|
444
|
+
*/
|
|
445
|
+
template<typename T, typename EnableIf = void> struct array_size {
|
|
446
|
+
enum { value = Dynamic };
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
template<typename T> struct array_size<T,typename internal::enable_if<((T::SizeAtCompileTime&0)==0)>::type> {
|
|
450
|
+
enum { value = T::SizeAtCompileTime };
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
template<typename T, int N> struct array_size<const T (&)[N]> {
|
|
454
|
+
enum { value = N };
|
|
455
|
+
};
|
|
456
|
+
template<typename T, int N> struct array_size<T (&)[N]> {
|
|
457
|
+
enum { value = N };
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
#if EIGEN_HAS_CXX11
|
|
461
|
+
template<typename T, std::size_t N> struct array_size<const std::array<T,N> > {
|
|
462
|
+
enum { value = N };
|
|
463
|
+
};
|
|
464
|
+
template<typename T, std::size_t N> struct array_size<std::array<T,N> > {
|
|
465
|
+
enum { value = N };
|
|
466
|
+
};
|
|
467
|
+
#endif
|
|
468
|
+
|
|
469
|
+
/** \internal
|
|
470
|
+
* Analogue of the std::size free function.
|
|
471
|
+
* It returns the size of the container or view \a x of type \c T
|
|
472
|
+
*
|
|
473
|
+
* It currently supports:
|
|
474
|
+
* - any types T defining a member T::size() const
|
|
475
|
+
* - plain C arrays as T[N]
|
|
305
476
|
*
|
|
306
|
-
* It supports both the current STL mechanism (using the result_type member) as well as
|
|
307
|
-
* upcoming next STL generation (using a templated result member).
|
|
308
|
-
* If none of these members is provided, then the type of the first argument is returned. FIXME, that behavior is a pretty bad hack.
|
|
309
477
|
*/
|
|
310
|
-
|
|
478
|
+
template<typename T>
|
|
479
|
+
EIGEN_CONSTEXPR Index size(const T& x) { return x.size(); }
|
|
480
|
+
|
|
481
|
+
template<typename T,std::size_t N>
|
|
482
|
+
EIGEN_CONSTEXPR Index size(const T (&) [N]) { return N; }
|
|
483
|
+
|
|
484
|
+
/** \internal
|
|
485
|
+
* Convenient struct to get the result type of a nullary, unary, binary, or
|
|
486
|
+
* ternary functor.
|
|
487
|
+
*
|
|
488
|
+
* Pre C++11:
|
|
489
|
+
* Supports both a Func::result_type member and templated
|
|
490
|
+
* Func::result<Func(ArgTypes...)>::type member.
|
|
491
|
+
*
|
|
492
|
+
* If none of these members is provided, then the type of the first
|
|
493
|
+
* argument is returned.
|
|
494
|
+
*
|
|
495
|
+
* Post C++11:
|
|
496
|
+
* This uses std::result_of. However, note the `type` member removes
|
|
497
|
+
* const and converts references/pointers to their corresponding value type.
|
|
498
|
+
*/
|
|
499
|
+
#if EIGEN_HAS_STD_INVOKE_RESULT
|
|
500
|
+
template<typename T> struct result_of;
|
|
501
|
+
|
|
502
|
+
template<typename F, typename... ArgTypes>
|
|
503
|
+
struct result_of<F(ArgTypes...)> {
|
|
504
|
+
typedef typename std::invoke_result<F, ArgTypes...>::type type1;
|
|
505
|
+
typedef typename remove_all<type1>::type type;
|
|
506
|
+
};
|
|
507
|
+
#elif EIGEN_HAS_STD_RESULT_OF
|
|
311
508
|
template<typename T> struct result_of {
|
|
312
509
|
typedef typename std::result_of<T>::type type1;
|
|
313
510
|
typedef typename remove_all<type1>::type type;
|
|
@@ -319,6 +516,28 @@ struct has_none {int a[1];};
|
|
|
319
516
|
struct has_std_result_type {int a[2];};
|
|
320
517
|
struct has_tr1_result {int a[3];};
|
|
321
518
|
|
|
519
|
+
template<typename Func, int SizeOf>
|
|
520
|
+
struct nullary_result_of_select {};
|
|
521
|
+
|
|
522
|
+
template<typename Func>
|
|
523
|
+
struct nullary_result_of_select<Func, sizeof(has_std_result_type)> {typedef typename Func::result_type type;};
|
|
524
|
+
|
|
525
|
+
template<typename Func>
|
|
526
|
+
struct nullary_result_of_select<Func, sizeof(has_tr1_result)> {typedef typename Func::template result<Func()>::type type;};
|
|
527
|
+
|
|
528
|
+
template<typename Func>
|
|
529
|
+
struct result_of<Func()> {
|
|
530
|
+
template<typename T>
|
|
531
|
+
static has_std_result_type testFunctor(T const *, typename T::result_type const * = 0);
|
|
532
|
+
template<typename T>
|
|
533
|
+
static has_tr1_result testFunctor(T const *, typename T::template result<T()>::type const * = 0);
|
|
534
|
+
static has_none testFunctor(...);
|
|
535
|
+
|
|
536
|
+
// note that the following indirection is needed for gcc-3.3
|
|
537
|
+
enum {FunctorType = sizeof(testFunctor(static_cast<Func*>(0)))};
|
|
538
|
+
typedef typename nullary_result_of_select<Func, FunctorType>::type type;
|
|
539
|
+
};
|
|
540
|
+
|
|
322
541
|
template<typename Func, typename ArgType, int SizeOf=sizeof(has_none)>
|
|
323
542
|
struct unary_result_of_select {typedef typename internal::remove_all<ArgType>::type type;};
|
|
324
543
|
|
|
@@ -388,6 +607,45 @@ struct result_of<Func(ArgType0,ArgType1,ArgType2)> {
|
|
|
388
607
|
enum {FunctorType = sizeof(testFunctor(static_cast<Func*>(0)))};
|
|
389
608
|
typedef typename ternary_result_of_select<Func, ArgType0, ArgType1, ArgType2, FunctorType>::type type;
|
|
390
609
|
};
|
|
610
|
+
|
|
611
|
+
#endif
|
|
612
|
+
|
|
613
|
+
#if EIGEN_HAS_STD_INVOKE_RESULT
|
|
614
|
+
template<typename F, typename... ArgTypes>
|
|
615
|
+
struct invoke_result {
|
|
616
|
+
typedef typename std::invoke_result<F, ArgTypes...>::type type1;
|
|
617
|
+
typedef typename remove_all<type1>::type type;
|
|
618
|
+
};
|
|
619
|
+
#elif EIGEN_HAS_CXX11
|
|
620
|
+
template<typename F, typename... ArgTypes>
|
|
621
|
+
struct invoke_result {
|
|
622
|
+
typedef typename result_of<F(ArgTypes...)>::type type1;
|
|
623
|
+
typedef typename remove_all<type1>::type type;
|
|
624
|
+
};
|
|
625
|
+
#else
|
|
626
|
+
template<typename F, typename ArgType0 = void, typename ArgType1 = void, typename ArgType2 = void>
|
|
627
|
+
struct invoke_result {
|
|
628
|
+
typedef typename result_of<F(ArgType0, ArgType1, ArgType2)>::type type1;
|
|
629
|
+
typedef typename remove_all<type1>::type type;
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
template<typename F>
|
|
633
|
+
struct invoke_result<F, void, void, void> {
|
|
634
|
+
typedef typename result_of<F()>::type type1;
|
|
635
|
+
typedef typename remove_all<type1>::type type;
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
template<typename F, typename ArgType0>
|
|
639
|
+
struct invoke_result<F, ArgType0, void, void> {
|
|
640
|
+
typedef typename result_of<F(ArgType0)>::type type1;
|
|
641
|
+
typedef typename remove_all<type1>::type type;
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
template<typename F, typename ArgType0, typename ArgType1>
|
|
645
|
+
struct invoke_result<F, ArgType0, ArgType1, void> {
|
|
646
|
+
typedef typename result_of<F(ArgType0, ArgType1)>::type type1;
|
|
647
|
+
typedef typename remove_all<type1>::type type;
|
|
648
|
+
};
|
|
391
649
|
#endif
|
|
392
650
|
|
|
393
651
|
struct meta_yes { char a[1]; };
|
|
@@ -397,10 +655,10 @@ struct meta_no { char a[2]; };
|
|
|
397
655
|
template <typename T>
|
|
398
656
|
struct has_ReturnType
|
|
399
657
|
{
|
|
400
|
-
template <typename C> static meta_yes testFunctor(typename C::ReturnType const *);
|
|
401
|
-
template <typename C> static meta_no
|
|
658
|
+
template <typename C> static meta_yes testFunctor(C const *, typename C::ReturnType const * = 0);
|
|
659
|
+
template <typename C> static meta_no testFunctor(...);
|
|
402
660
|
|
|
403
|
-
enum { value = sizeof(testFunctor<T>(0)) == sizeof(meta_yes) };
|
|
661
|
+
enum { value = sizeof(testFunctor<T>(static_cast<T*>(0))) == sizeof(meta_yes) };
|
|
404
662
|
};
|
|
405
663
|
|
|
406
664
|
template<typename T> const T* return_ptr();
|
|
@@ -457,20 +715,25 @@ class meta_sqrt<Y, InfX, SupX, true> { public: enum { ret = (SupX*SupX <= Y) ?
|
|
|
457
715
|
|
|
458
716
|
|
|
459
717
|
/** \internal Computes the least common multiple of two positive integer A and B
|
|
460
|
-
* at compile-time.
|
|
461
|
-
* It thus works better if A>=B.
|
|
718
|
+
* at compile-time.
|
|
462
719
|
*/
|
|
463
|
-
template<int A, int B, int K=1, bool Done = ((A*K)%B)==0>
|
|
720
|
+
template<int A, int B, int K=1, bool Done = ((A*K)%B)==0, bool Big=(A>=B)>
|
|
464
721
|
struct meta_least_common_multiple
|
|
465
722
|
{
|
|
466
723
|
enum { ret = meta_least_common_multiple<A,B,K+1>::ret };
|
|
467
724
|
};
|
|
725
|
+
template<int A, int B, int K, bool Done>
|
|
726
|
+
struct meta_least_common_multiple<A,B,K,Done,false>
|
|
727
|
+
{
|
|
728
|
+
enum { ret = meta_least_common_multiple<B,A,K>::ret };
|
|
729
|
+
};
|
|
468
730
|
template<int A, int B, int K>
|
|
469
|
-
struct meta_least_common_multiple<A,B,K,true>
|
|
731
|
+
struct meta_least_common_multiple<A,B,K,true,true>
|
|
470
732
|
{
|
|
471
733
|
enum { ret = A*K };
|
|
472
734
|
};
|
|
473
735
|
|
|
736
|
+
|
|
474
737
|
/** \internal determines whether the product of two numeric types is allowed and what the return type is */
|
|
475
738
|
template<typename T, typename U> struct scalar_product_traits
|
|
476
739
|
{
|
|
@@ -483,17 +746,27 @@ template<typename T, typename U> struct scalar_product_traits
|
|
|
483
746
|
// typedef typename scalar_product_traits<typename remove_all<ArgType0>::type, typename remove_all<ArgType1>::type>::ReturnType type;
|
|
484
747
|
// };
|
|
485
748
|
|
|
749
|
+
/** \internal Obtains a POD type suitable to use as storage for an object of a size
|
|
750
|
+
* of at most Len bytes, aligned as specified by \c Align.
|
|
751
|
+
*/
|
|
752
|
+
template<unsigned Len, unsigned Align>
|
|
753
|
+
struct aligned_storage {
|
|
754
|
+
struct type {
|
|
755
|
+
EIGEN_ALIGN_TO_BOUNDARY(Align) unsigned char data[Len];
|
|
756
|
+
};
|
|
757
|
+
};
|
|
758
|
+
|
|
486
759
|
} // end namespace internal
|
|
487
760
|
|
|
488
761
|
namespace numext {
|
|
489
|
-
|
|
490
|
-
#if defined(
|
|
762
|
+
|
|
763
|
+
#if defined(EIGEN_GPU_COMPILE_PHASE)
|
|
491
764
|
template<typename T> EIGEN_DEVICE_FUNC void swap(T &a, T &b) { T tmp = b; b = a; a = tmp; }
|
|
492
765
|
#else
|
|
493
766
|
template<typename T> EIGEN_STRONG_INLINE void swap(T &a, T &b) { std::swap(a,b); }
|
|
494
767
|
#endif
|
|
495
768
|
|
|
496
|
-
#if defined(
|
|
769
|
+
#if defined(EIGEN_GPU_COMPILE_PHASE) && !EIGEN_HAS_CXX11
|
|
497
770
|
using internal::device::numeric_limits;
|
|
498
771
|
#else
|
|
499
772
|
using std::numeric_limits;
|
|
@@ -502,6 +775,7 @@ using std::numeric_limits;
|
|
|
502
775
|
// Integer division with rounding up.
|
|
503
776
|
// T is assumed to be an integer type with a>=0, and b>0
|
|
504
777
|
template<typename T>
|
|
778
|
+
EIGEN_DEVICE_FUNC
|
|
505
779
|
T div_ceil(const T &a, const T &b)
|
|
506
780
|
{
|
|
507
781
|
return (a+b-1) / b;
|
|
@@ -509,23 +783,27 @@ T div_ceil(const T &a, const T &b)
|
|
|
509
783
|
|
|
510
784
|
// The aim of the following functions is to bypass -Wfloat-equal warnings
|
|
511
785
|
// when we really want a strict equality comparison on floating points.
|
|
512
|
-
template<typename X, typename Y> EIGEN_STRONG_INLINE
|
|
786
|
+
template<typename X, typename Y> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
|
|
513
787
|
bool equal_strict(const X& x,const Y& y) { return x == y; }
|
|
514
788
|
|
|
515
|
-
|
|
789
|
+
#if !defined(EIGEN_GPU_COMPILE_PHASE) || (!defined(EIGEN_CUDA_ARCH) && defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))
|
|
790
|
+
template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
|
|
516
791
|
bool equal_strict(const float& x,const float& y) { return std::equal_to<float>()(x,y); }
|
|
517
792
|
|
|
518
|
-
template<> EIGEN_STRONG_INLINE
|
|
793
|
+
template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
|
|
519
794
|
bool equal_strict(const double& x,const double& y) { return std::equal_to<double>()(x,y); }
|
|
795
|
+
#endif
|
|
520
796
|
|
|
521
|
-
template<typename X, typename Y> EIGEN_STRONG_INLINE
|
|
797
|
+
template<typename X, typename Y> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
|
|
522
798
|
bool not_equal_strict(const X& x,const Y& y) { return x != y; }
|
|
523
799
|
|
|
524
|
-
|
|
800
|
+
#if !defined(EIGEN_GPU_COMPILE_PHASE) || (!defined(EIGEN_CUDA_ARCH) && defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))
|
|
801
|
+
template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
|
|
525
802
|
bool not_equal_strict(const float& x,const float& y) { return std::not_equal_to<float>()(x,y); }
|
|
526
803
|
|
|
527
|
-
template<> EIGEN_STRONG_INLINE
|
|
804
|
+
template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
|
|
528
805
|
bool not_equal_strict(const double& x,const double& y) { return std::not_equal_to<double>()(x,y); }
|
|
806
|
+
#endif
|
|
529
807
|
|
|
530
808
|
} // end namespace numext
|
|
531
809
|
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
#ifdef
|
|
1
|
+
#ifdef EIGEN_WARNINGS_DISABLED_2
|
|
2
|
+
// "DisableStupidWarnings.h" was included twice recursively: Do not reenable warnings yet!
|
|
3
|
+
# undef EIGEN_WARNINGS_DISABLED_2
|
|
4
|
+
|
|
5
|
+
#elif defined(EIGEN_WARNINGS_DISABLED)
|
|
2
6
|
#undef EIGEN_WARNINGS_DISABLED
|
|
3
7
|
|
|
4
8
|
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
|