diff --git a/include/Rivet/Makefile.am b/include/Rivet/Makefile.am --- a/include/Rivet/Makefile.am +++ b/include/Rivet/Makefile.am @@ -1,458 +1,345 @@ ## Internal headers - not to be installed nobase_dist_noinst_HEADERS = ## Public headers - to be installed nobase_pkginclude_HEADERS = ## Rivet interface nobase_pkginclude_HEADERS += \ Rivet.hh \ Run.hh \ Event.hh \ ParticleBase.hh \ Particle.fhh Particle.hh \ Jet.fhh Jet.hh \ Projection.fhh Projection.hh \ ProjectionApplier.hh \ ProjectionHandler.hh \ Analysis.hh \ AnalysisHandler.hh \ AnalysisInfo.hh \ AnalysisBuilder.hh \ AnalysisLoader.hh ## Build config stuff nobase_pkginclude_HEADERS += \ Config/RivetCommon.hh ## Projections nobase_pkginclude_HEADERS += \ Projections/AxesDefinition.hh \ Projections/Beam.hh \ Projections/BeamThrust.hh \ Projections/CentralEtHCM.hh \ Projections/ChargedFinalState.hh \ Projections/ChargedLeptons.hh \ Projections/ConstLossyFinalState.hh \ Projections/DirectFinalState.hh \ Projections/DISFinalState.hh \ Projections/DISKinematics.hh \ Projections/DISLepton.hh \ Projections/DressedLeptons.hh \ Projections/FastJets.hh \ Projections/FinalPartons.hh \ Projections/FinalState.hh \ Projections/FoxWolframMoments.hh \ Projections/FParameter.hh \ Projections/HadronicFinalState.hh \ Projections/HeavyHadrons.hh \ Projections/Hemispheres.hh \ Projections/IdentifiedFinalState.hh \ Projections/IndirectFinalState.hh \ Projections/InitialQuarks.hh \ Projections/InvMassFinalState.hh \ Projections/JetAlg.hh \ Projections/JetShape.hh \ Projections/LeadingParticlesFinalState.hh \ Projections/LossyFinalState.hh \ Projections/MergedFinalState.hh \ Projections/MissingMomentum.hh \ Projections/NeutralFinalState.hh \ Projections/NonHadronicFinalState.hh \ Projections/NonPromptFinalState.hh \ Projections/ParisiTensor.hh \ Projections/ParticleFinder.hh \ Projections/PartonicTops.hh \ Projections/PrimaryHadrons.hh \ Projections/PromptFinalState.hh \ Projections/SmearedParticles.hh \ Projections/SmearedJets.hh \ Projections/SmearedMET.hh \ Projections/Sphericity.hh \ Projections/Spherocity.hh \ Projections/TauFinder.hh \ Projections/Thrust.hh \ Projections/TriggerCDFRun0Run1.hh \ Projections/TriggerCDFRun2.hh \ Projections/TriggerUA5.hh \ Projections/UnstableFinalState.hh \ Projections/VetoedFinalState.hh \ Projections/VisibleFinalState.hh \ Projections/WFinder.hh \ Projections/ZFinder.hh ## Meta-projection convenience headers nobase_pkginclude_HEADERS += \ Projections/FinalStates.hh \ Projections/Smearing.hh ## Analysis base class headers # TODO: Move to Rivet/AnalysisTools header dir? nobase_pkginclude_HEADERS += \ Analyses/MC_ParticleAnalysis.hh \ Analyses/MC_JetAnalysis.hh \ Analyses/MC_JetSplittings.hh ## Tools nobase_pkginclude_HEADERS += \ Tools/BeamConstraint.hh \ Tools/BinnedHistogram.hh \ Tools/CentralityBinner.hh \ Tools/Cmp.fhh \ Tools/Cmp.hh \ Tools/Cutflow.hh \ Tools/Cuts.fhh \ Tools/Cuts.hh \ Tools/Exceptions.hh \ Tools/JetUtils.hh \ Tools/Logging.hh \ Tools/Random.hh \ Tools/ParticleBaseUtils.hh \ Tools/ParticleIdUtils.hh \ Tools/ParticleUtils.hh \ Tools/ParticleName.hh \ Tools/PrettyPrint.hh \ Tools/RivetPaths.hh \ Tools/RivetSTL.hh \ Tools/RivetFastJet.hh \ Tools/RivetHepMC.hh \ Tools/RivetYODA.hh \ Tools/RivetMT2.hh \ Tools/SmearingFunctions.hh \ Tools/MomentumSmearingFunctions.hh \ Tools/ParticleSmearingFunctions.hh \ Tools/JetSmearingFunctions.hh \ Tools/TypeTraits.hh \ Tools/Utils.hh \ Tools/Nsubjettiness/AxesDefinition.hh \ Tools/Nsubjettiness/ExtraRecombiners.hh \ Tools/Nsubjettiness/MeasureDefinition.hh \ Tools/Nsubjettiness/Njettiness.hh \ Tools/Nsubjettiness/NjettinessPlugin.hh \ Tools/Nsubjettiness/Nsubjettiness.hh \ Tools/Nsubjettiness/TauComponents.hh \ Tools/Nsubjettiness/XConePlugin.hh nobase_dist_noinst_HEADERS += \ Tools/osdir.hh \ Math/eigen3/COPYING.GPL \ Math/eigen3/README.md ## Maths nobase_pkginclude_HEADERS += \ Math/Matrices.hh \ Math/Vector3.hh \ Math/VectorN.hh \ Math/MatrixN.hh \ Math/MatrixDiag.hh \ Math/MathHeader.hh \ Math/Vectors.hh \ Math/LorentzTrans.hh \ Math/Matrix3.hh \ Math/MathUtils.hh \ Math/Vector4.hh \ Math/Math.hh \ Math/Units.hh \ Math/Constants.hh \ Math/eigen3/Cholesky \ - Math/eigen3/CholmodSupport \ Math/eigen3/Core \ Math/eigen3/Dense \ - Math/eigen3/Eigen \ Math/eigen3/Eigenvalues \ Math/eigen3/Geometry \ Math/eigen3/Householder \ - Math/eigen3/IterativeLinearSolvers \ Math/eigen3/Jacobi \ - Math/eigen3/KLUSupport \ Math/eigen3/LU \ - Math/eigen3/MetisSupport \ - Math/eigen3/OrderingMethods \ - Math/eigen3/PardisoSupport \ - Math/eigen3/PaStiXSupport \ Math/eigen3/QR \ - Math/eigen3/QtAlignedMalloc \ - Math/eigen3/Sparse \ - Math/eigen3/SparseCholesky \ - Math/eigen3/SparseCore \ - Math/eigen3/SparseLU \ - Math/eigen3/SparseQR \ - Math/eigen3/SPQRSupport \ Math/eigen3/src/Cholesky/LDLT.h \ Math/eigen3/src/Cholesky/LLT.h \ - Math/eigen3/src/Cholesky/LLT_LAPACKE.h \ - Math/eigen3/src/CholmodSupport/CholmodSupport.h \ Math/eigen3/src/Core/arch/AltiVec/Complex.h \ Math/eigen3/src/Core/arch/AltiVec/MathFunctions.h \ Math/eigen3/src/Core/arch/AltiVec/PacketMath.h \ Math/eigen3/src/Core/arch/AVX/Complex.h \ Math/eigen3/src/Core/arch/AVX/MathFunctions.h \ Math/eigen3/src/Core/arch/AVX/PacketMath.h \ Math/eigen3/src/Core/arch/AVX/TypeCasting.h \ Math/eigen3/src/Core/arch/AVX512/MathFunctions.h \ Math/eigen3/src/Core/arch/AVX512/PacketMath.h \ Math/eigen3/src/Core/arch/CUDA/Complex.h \ Math/eigen3/src/Core/arch/CUDA/Half.h \ Math/eigen3/src/Core/arch/CUDA/MathFunctions.h \ Math/eigen3/src/Core/arch/CUDA/PacketMath.h \ Math/eigen3/src/Core/arch/CUDA/PacketMathHalf.h \ Math/eigen3/src/Core/arch/CUDA/TypeCasting.h \ Math/eigen3/src/Core/arch/Default/Settings.h \ Math/eigen3/src/Core/arch/NEON/Complex.h \ Math/eigen3/src/Core/arch/NEON/MathFunctions.h \ Math/eigen3/src/Core/arch/NEON/PacketMath.h \ Math/eigen3/src/Core/arch/SSE/Complex.h \ Math/eigen3/src/Core/arch/SSE/MathFunctions.h \ Math/eigen3/src/Core/arch/SSE/PacketMath.h \ Math/eigen3/src/Core/arch/SSE/TypeCasting.h \ Math/eigen3/src/Core/arch/ZVector/Complex.h \ Math/eigen3/src/Core/arch/ZVector/MathFunctions.h \ Math/eigen3/src/Core/arch/ZVector/PacketMath.h \ Math/eigen3/src/Core/Array.h \ Math/eigen3/src/Core/ArrayBase.h \ Math/eigen3/src/Core/ArrayWrapper.h \ Math/eigen3/src/Core/Assign.h \ - Math/eigen3/src/Core/Assign_MKL.h \ Math/eigen3/src/Core/AssignEvaluator.h \ Math/eigen3/src/Core/BandMatrix.h \ Math/eigen3/src/Core/Block.h \ Math/eigen3/src/Core/BooleanRedux.h \ Math/eigen3/src/Core/CommaInitializer.h \ Math/eigen3/src/Core/ConditionEstimator.h \ Math/eigen3/src/Core/CoreEvaluators.h \ Math/eigen3/src/Core/CoreIterators.h \ Math/eigen3/src/Core/CwiseBinaryOp.h \ Math/eigen3/src/Core/CwiseNullaryOp.h \ Math/eigen3/src/Core/CwiseTernaryOp.h \ Math/eigen3/src/Core/CwiseUnaryOp.h \ Math/eigen3/src/Core/CwiseUnaryView.h \ Math/eigen3/src/Core/DenseBase.h \ Math/eigen3/src/Core/DenseCoeffsBase.h \ Math/eigen3/src/Core/DenseStorage.h \ Math/eigen3/src/Core/Diagonal.h \ Math/eigen3/src/Core/DiagonalMatrix.h \ Math/eigen3/src/Core/DiagonalProduct.h \ Math/eigen3/src/Core/Dot.h \ Math/eigen3/src/Core/EigenBase.h \ - Math/eigen3/src/Core/ForceAlignedAccess.h \ Math/eigen3/src/Core/functors/AssignmentFunctors.h \ Math/eigen3/src/Core/functors/BinaryFunctors.h \ Math/eigen3/src/Core/functors/NullaryFunctors.h \ Math/eigen3/src/Core/functors/StlFunctors.h \ Math/eigen3/src/Core/functors/TernaryFunctors.h \ Math/eigen3/src/Core/functors/UnaryFunctors.h \ Math/eigen3/src/Core/Fuzzy.h \ Math/eigen3/src/Core/GeneralProduct.h \ Math/eigen3/src/Core/GenericPacketMath.h \ Math/eigen3/src/Core/GlobalFunctions.h \ Math/eigen3/src/Core/Inverse.h \ Math/eigen3/src/Core/IO.h \ Math/eigen3/src/Core/Map.h \ Math/eigen3/src/Core/MapBase.h \ Math/eigen3/src/Core/MathFunctions.h \ Math/eigen3/src/Core/MathFunctionsImpl.h \ Math/eigen3/src/Core/Matrix.h \ Math/eigen3/src/Core/MatrixBase.h \ Math/eigen3/src/Core/NestByValue.h \ Math/eigen3/src/Core/NoAlias.h \ Math/eigen3/src/Core/NumTraits.h \ Math/eigen3/src/Core/PermutationMatrix.h \ Math/eigen3/src/Core/PlainObjectBase.h \ Math/eigen3/src/Core/Product.h \ Math/eigen3/src/Core/ProductEvaluators.h \ Math/eigen3/src/Core/products/GeneralBlockPanelKernel.h \ Math/eigen3/src/Core/products/GeneralMatrixMatrix.h \ - Math/eigen3/src/Core/products/GeneralMatrixMatrix_BLAS.h \ Math/eigen3/src/Core/products/GeneralMatrixMatrixTriangular.h \ - Math/eigen3/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h \ Math/eigen3/src/Core/products/GeneralMatrixVector.h \ - Math/eigen3/src/Core/products/GeneralMatrixVector_BLAS.h \ Math/eigen3/src/Core/products/Parallelizer.h \ Math/eigen3/src/Core/products/SelfadjointMatrixMatrix.h \ - Math/eigen3/src/Core/products/SelfadjointMatrixMatrix_BLAS.h \ Math/eigen3/src/Core/products/SelfadjointMatrixVector.h \ - Math/eigen3/src/Core/products/SelfadjointMatrixVector_BLAS.h \ Math/eigen3/src/Core/products/SelfadjointProduct.h \ Math/eigen3/src/Core/products/SelfadjointRank2Update.h \ Math/eigen3/src/Core/products/TriangularMatrixMatrix.h \ - Math/eigen3/src/Core/products/TriangularMatrixMatrix_BLAS.h \ Math/eigen3/src/Core/products/TriangularMatrixVector.h \ - Math/eigen3/src/Core/products/TriangularMatrixVector_BLAS.h \ Math/eigen3/src/Core/products/TriangularSolverMatrix.h \ - Math/eigen3/src/Core/products/TriangularSolverMatrix_BLAS.h \ Math/eigen3/src/Core/products/TriangularSolverVector.h \ Math/eigen3/src/Core/Random.h \ Math/eigen3/src/Core/Redux.h \ Math/eigen3/src/Core/Ref.h \ Math/eigen3/src/Core/Replicate.h \ Math/eigen3/src/Core/ReturnByValue.h \ Math/eigen3/src/Core/Reverse.h \ Math/eigen3/src/Core/Select.h \ Math/eigen3/src/Core/SelfAdjointView.h \ Math/eigen3/src/Core/SelfCwiseBinaryOp.h \ Math/eigen3/src/Core/Solve.h \ Math/eigen3/src/Core/SolverBase.h \ Math/eigen3/src/Core/SolveTriangular.h \ Math/eigen3/src/Core/StableNorm.h \ Math/eigen3/src/Core/Stride.h \ Math/eigen3/src/Core/Swap.h \ Math/eigen3/src/Core/Transpose.h \ Math/eigen3/src/Core/Transpositions.h \ Math/eigen3/src/Core/TriangularMatrix.h \ Math/eigen3/src/Core/util/BlasUtil.h \ Math/eigen3/src/Core/util/Constants.h \ Math/eigen3/src/Core/util/DisableStupidWarnings.h \ Math/eigen3/src/Core/util/ForwardDeclarations.h \ Math/eigen3/src/Core/util/Macros.h \ Math/eigen3/src/Core/util/Memory.h \ Math/eigen3/src/Core/util/Meta.h \ Math/eigen3/src/Core/util/MKL_support.h \ Math/eigen3/src/Core/util/NonMPL2.h \ Math/eigen3/src/Core/util/ReenableStupidWarnings.h \ Math/eigen3/src/Core/util/StaticAssert.h \ Math/eigen3/src/Core/util/XprHelper.h \ Math/eigen3/src/Core/VectorBlock.h \ Math/eigen3/src/Core/VectorwiseOp.h \ Math/eigen3/src/Core/Visitor.h \ Math/eigen3/src/Eigenvalues/ComplexEigenSolver.h \ Math/eigen3/src/Eigenvalues/ComplexSchur.h \ - Math/eigen3/src/Eigenvalues/ComplexSchur_LAPACKE.h \ Math/eigen3/src/Eigenvalues/EigenSolver.h \ Math/eigen3/src/Eigenvalues/GeneralizedEigenSolver.h \ Math/eigen3/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h \ Math/eigen3/src/Eigenvalues/HessenbergDecomposition.h \ Math/eigen3/src/Eigenvalues/MatrixBaseEigenvalues.h \ Math/eigen3/src/Eigenvalues/RealQZ.h \ Math/eigen3/src/Eigenvalues/RealSchur.h \ - Math/eigen3/src/Eigenvalues/RealSchur_LAPACKE.h \ Math/eigen3/src/Eigenvalues/SelfAdjointEigenSolver.h \ - Math/eigen3/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h \ Math/eigen3/src/Eigenvalues/Tridiagonalization.h \ Math/eigen3/src/Geometry/AlignedBox.h \ Math/eigen3/src/Geometry/AngleAxis.h \ Math/eigen3/src/Geometry/arch/Geometry_SSE.h \ Math/eigen3/src/Geometry/EulerAngles.h \ Math/eigen3/src/Geometry/Homogeneous.h \ Math/eigen3/src/Geometry/Hyperplane.h \ Math/eigen3/src/Geometry/OrthoMethods.h \ Math/eigen3/src/Geometry/ParametrizedLine.h \ Math/eigen3/src/Geometry/Quaternion.h \ Math/eigen3/src/Geometry/Rotation2D.h \ Math/eigen3/src/Geometry/RotationBase.h \ Math/eigen3/src/Geometry/Scaling.h \ Math/eigen3/src/Geometry/Transform.h \ Math/eigen3/src/Geometry/Translation.h \ Math/eigen3/src/Geometry/Umeyama.h \ Math/eigen3/src/Householder/BlockHouseholder.h \ Math/eigen3/src/Householder/Householder.h \ Math/eigen3/src/Householder/HouseholderSequence.h \ - Math/eigen3/src/IterativeLinearSolvers/BasicPreconditioners.h \ - Math/eigen3/src/IterativeLinearSolvers/BiCGSTAB.h \ - Math/eigen3/src/IterativeLinearSolvers/ConjugateGradient.h \ - Math/eigen3/src/IterativeLinearSolvers/IncompleteCholesky.h \ - Math/eigen3/src/IterativeLinearSolvers/IncompleteLUT.h \ - Math/eigen3/src/IterativeLinearSolvers/IterativeSolverBase.h \ - Math/eigen3/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h \ - Math/eigen3/src/IterativeLinearSolvers/SolveWithGuess.h \ Math/eigen3/src/Jacobi/Jacobi.h \ Math/eigen3/src/LU/arch/Inverse_SSE.h \ Math/eigen3/src/LU/Determinant.h \ Math/eigen3/src/LU/FullPivLU.h \ Math/eigen3/src/LU/InverseImpl.h \ Math/eigen3/src/LU/PartialPivLU.h \ - Math/eigen3/src/LU/PartialPivLU_LAPACKE.h \ - Math/eigen3/src/MetisSupport/MetisSupport.h \ - Math/eigen3/src/misc/blas.h \ Math/eigen3/src/misc/Image.h \ Math/eigen3/src/misc/Kernel.h \ - Math/eigen3/src/misc/lapack.h \ - Math/eigen3/src/misc/lapacke.h \ - Math/eigen3/src/misc/lapacke_mangling.h \ Math/eigen3/src/misc/RealSvd2x2.h \ - Math/eigen3/src/OrderingMethods/Amd.h \ - Math/eigen3/src/OrderingMethods/Eigen_Colamd.h \ - Math/eigen3/src/OrderingMethods/Ordering.h \ - Math/eigen3/src/PardisoSupport/PardisoSupport.h \ - Math/eigen3/src/PaStiXSupport/PaStiXSupport.h \ Math/eigen3/src/plugins/ArrayCwiseBinaryOps.h \ Math/eigen3/src/plugins/ArrayCwiseUnaryOps.h \ Math/eigen3/src/plugins/BlockMethods.h \ Math/eigen3/src/plugins/CommonCwiseBinaryOps.h \ Math/eigen3/src/plugins/CommonCwiseUnaryOps.h \ Math/eigen3/src/plugins/MatrixCwiseBinaryOps.h \ Math/eigen3/src/plugins/MatrixCwiseUnaryOps.h \ Math/eigen3/src/QR/ColPivHouseholderQR.h \ - Math/eigen3/src/QR/ColPivHouseholderQR_LAPACKE.h \ Math/eigen3/src/QR/CompleteOrthogonalDecomposition.h \ Math/eigen3/src/QR/FullPivHouseholderQR.h \ Math/eigen3/src/QR/HouseholderQR.h \ - Math/eigen3/src/QR/HouseholderQR_LAPACKE.h \ - Math/eigen3/src/SparseCholesky/SimplicialCholesky.h \ - Math/eigen3/src/SparseCholesky/SimplicialCholesky_impl.h \ - Math/eigen3/src/SparseCore/AmbiVector.h \ - Math/eigen3/src/SparseCore/CompressedStorage.h \ - Math/eigen3/src/SparseCore/ConservativeSparseSparseProduct.h \ - Math/eigen3/src/SparseCore/MappedSparseMatrix.h \ - Math/eigen3/src/SparseCore/SparseAssign.h \ - Math/eigen3/src/SparseCore/SparseBlock.h \ - Math/eigen3/src/SparseCore/SparseColEtree.h \ - Math/eigen3/src/SparseCore/SparseCompressedBase.h \ - Math/eigen3/src/SparseCore/SparseCwiseBinaryOp.h \ - Math/eigen3/src/SparseCore/SparseCwiseUnaryOp.h \ - Math/eigen3/src/SparseCore/SparseDenseProduct.h \ - Math/eigen3/src/SparseCore/SparseDiagonalProduct.h \ - Math/eigen3/src/SparseCore/SparseDot.h \ - Math/eigen3/src/SparseCore/SparseFuzzy.h \ - Math/eigen3/src/SparseCore/SparseMap.h \ - Math/eigen3/src/SparseCore/SparseMatrix.h \ - Math/eigen3/src/SparseCore/SparseMatrixBase.h \ - Math/eigen3/src/SparseCore/SparsePermutation.h \ - Math/eigen3/src/SparseCore/SparseProduct.h \ - Math/eigen3/src/SparseCore/SparseRedux.h \ - Math/eigen3/src/SparseCore/SparseRef.h \ - Math/eigen3/src/SparseCore/SparseSelfAdjointView.h \ - Math/eigen3/src/SparseCore/SparseSolverBase.h \ - Math/eigen3/src/SparseCore/SparseSparseProductWithPruning.h \ - Math/eigen3/src/SparseCore/SparseTranspose.h \ - Math/eigen3/src/SparseCore/SparseTriangularView.h \ - Math/eigen3/src/SparseCore/SparseUtil.h \ - Math/eigen3/src/SparseCore/SparseVector.h \ - Math/eigen3/src/SparseCore/SparseView.h \ - Math/eigen3/src/SparseCore/TriangularSolver.h \ - Math/eigen3/src/SparseLU/SparseLU.h \ - Math/eigen3/src/SparseLU/SparseLU_column_bmod.h \ - Math/eigen3/src/SparseLU/SparseLU_column_dfs.h \ - Math/eigen3/src/SparseLU/SparseLU_copy_to_ucol.h \ - Math/eigen3/src/SparseLU/SparseLU_gemm_kernel.h \ - Math/eigen3/src/SparseLU/SparseLU_heap_relax_snode.h \ - Math/eigen3/src/SparseLU/SparseLU_kernel_bmod.h \ - Math/eigen3/src/SparseLU/SparseLU_Memory.h \ - Math/eigen3/src/SparseLU/SparseLU_panel_bmod.h \ - Math/eigen3/src/SparseLU/SparseLU_panel_dfs.h \ - Math/eigen3/src/SparseLU/SparseLU_pivotL.h \ - Math/eigen3/src/SparseLU/SparseLU_pruneL.h \ - Math/eigen3/src/SparseLU/SparseLU_relax_snode.h \ - Math/eigen3/src/SparseLU/SparseLU_Structs.h \ - Math/eigen3/src/SparseLU/SparseLU_SupernodalMatrix.h \ - Math/eigen3/src/SparseLU/SparseLU_Utils.h \ - Math/eigen3/src/SparseLU/SparseLUImpl.h \ - Math/eigen3/src/SparseQR/SparseQR.h \ - Math/eigen3/src/SPQRSupport/SuiteSparseQRSupport.h \ - Math/eigen3/src/StlSupport/details.h \ - Math/eigen3/src/StlSupport/StdDeque.h \ - Math/eigen3/src/StlSupport/StdList.h \ - Math/eigen3/src/StlSupport/StdVector.h \ - Math/eigen3/src/SuperLUSupport/SuperLUSupport.h \ Math/eigen3/src/SVD/BDCSVD.h \ Math/eigen3/src/SVD/JacobiSVD.h \ - Math/eigen3/src/SVD/JacobiSVD_LAPACKE.h \ Math/eigen3/src/SVD/SVDBase.h \ Math/eigen3/src/SVD/UpperBidiagonalization.h \ - Math/eigen3/src/UmfPackSupport/UmfPackSupport.h \ - Math/eigen3/StdDeque \ - Math/eigen3/StdList \ - Math/eigen3/StdVector \ - Math/eigen3/SuperLUSupport \ - Math/eigen3/SVD \ - Math/eigen3/UmfPackSupport + Math/eigen3/SVD + diff --git a/include/Rivet/Math/eigen3/CholmodSupport b/include/Rivet/Math/eigen3/CholmodSupport deleted file mode 100644 --- a/include/Rivet/Math/eigen3/CholmodSupport +++ /dev/null @@ -1,48 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_CHOLMODSUPPORT_MODULE_H -#define EIGEN_CHOLMODSUPPORT_MODULE_H - -#include "SparseCore" - -#include "src/Core/util/DisableStupidWarnings.h" - -extern "C" { - #include -} - -/** \ingroup Support_modules - * \defgroup CholmodSupport_Module CholmodSupport module - * - * This module provides an interface to the Cholmod library which is part of the suitesparse package. - * It provides the two following main factorization classes: - * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization. - * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial). - * - * For the sake of completeness, this module also propose the two following classes: - * - class CholmodSimplicialLLT - * - class CholmodSimplicialLDLT - * Note that these classes does not bring any particular advantage compared to the built-in - * SimplicialLLT and SimplicialLDLT factorization classes. - * - * \code - * #include - * \endcode - * - * In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies. - * The dependencies depend on how cholmod has been compiled. - * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task. - * - */ - -#include "src/CholmodSupport/CholmodSupport.h" - -#include "src/Core/util/ReenableStupidWarnings.h" - -#endif // EIGEN_CHOLMODSUPPORT_MODULE_H - diff --git a/include/Rivet/Math/eigen3/Eigen b/include/Rivet/Math/eigen3/Eigen deleted file mode 100644 --- a/include/Rivet/Math/eigen3/Eigen +++ /dev/null @@ -1,2 +0,0 @@ -#include "Dense" -#include "Sparse" diff --git a/include/Rivet/Math/eigen3/IterativeLinearSolvers b/include/Rivet/Math/eigen3/IterativeLinearSolvers deleted file mode 100644 --- a/include/Rivet/Math/eigen3/IterativeLinearSolvers +++ /dev/null @@ -1,48 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_ITERATIVELINEARSOLVERS_MODULE_H -#define EIGEN_ITERATIVELINEARSOLVERS_MODULE_H - -#include "SparseCore" -#include "OrderingMethods" - -#include "src/Core/util/DisableStupidWarnings.h" - -/** - * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module - * - * This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse. - * Those solvers are accessible via the following classes: - * - ConjugateGradient for selfadjoint (hermitian) matrices, - * - LeastSquaresConjugateGradient for rectangular least-square problems, - * - BiCGSTAB for general square matrices. - * - * These iterative solvers are associated with some preconditioners: - * - IdentityPreconditioner - not really useful - * - DiagonalPreconditioner - also called Jacobi preconditioner, work very well on diagonal dominant matrices. - * - IncompleteLUT - incomplete LU factorization with dual thresholding - * - * Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport. - * - \code - #include - \endcode - */ - -#include "src/IterativeLinearSolvers/SolveWithGuess.h" -#include "src/IterativeLinearSolvers/IterativeSolverBase.h" -#include "src/IterativeLinearSolvers/BasicPreconditioners.h" -#include "src/IterativeLinearSolvers/ConjugateGradient.h" -#include "src/IterativeLinearSolvers/LeastSquareConjugateGradient.h" -#include "src/IterativeLinearSolvers/BiCGSTAB.h" -#include "src/IterativeLinearSolvers/IncompleteLUT.h" -#include "src/IterativeLinearSolvers/IncompleteCholesky.h" - -#include "src/Core/util/ReenableStupidWarnings.h" - -#endif // EIGEN_ITERATIVELINEARSOLVERS_MODULE_H diff --git a/include/Rivet/Math/eigen3/KLUSupport b/include/Rivet/Math/eigen3/KLUSupport deleted file mode 100644 --- a/include/Rivet/Math/eigen3/KLUSupport +++ /dev/null @@ -1,41 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_KLUSUPPORT_MODULE_H -#define EIGEN_KLUSUPPORT_MODULE_H - -#include - -#include - -extern "C" { -#include -#include - } - -/** \ingroup Support_modules - * \defgroup KLUSupport_Module KLUSupport module - * - * This module provides an interface to the KLU library which is part of the suitesparse package. - * It provides the following factorization class: - * - class KLU: a sparse LU factorization, well-suited for circuit simulation. - * - * \code - * #include - * \endcode - * - * In order to use this module, the klu and btf headers must be accessible from the include paths, and your binary must be linked to the klu library and its dependencies. - * The dependencies depend on how umfpack has been compiled. - * For a cmake based project, you can use our FindKLU.cmake module to help you in this task. - * - */ - -#include "src/KLUSupport/KLUSupport.h" - -#include - -#endif // EIGEN_KLUSUPPORT_MODULE_H diff --git a/include/Rivet/Math/eigen3/MetisSupport b/include/Rivet/Math/eigen3/MetisSupport deleted file mode 100644 --- a/include/Rivet/Math/eigen3/MetisSupport +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_METISSUPPORT_MODULE_H -#define EIGEN_METISSUPPORT_MODULE_H - -#include "SparseCore" - -#include "src/Core/util/DisableStupidWarnings.h" - -extern "C" { -#include -} - - -/** \ingroup Support_modules - * \defgroup MetisSupport_Module MetisSupport module - * - * \code - * #include - * \endcode - * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis). - * It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink - */ - - -#include "src/MetisSupport/MetisSupport.h" - -#include "src/Core/util/ReenableStupidWarnings.h" - -#endif // EIGEN_METISSUPPORT_MODULE_H diff --git a/include/Rivet/Math/eigen3/OrderingMethods b/include/Rivet/Math/eigen3/OrderingMethods deleted file mode 100644 --- a/include/Rivet/Math/eigen3/OrderingMethods +++ /dev/null @@ -1,73 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_ORDERINGMETHODS_MODULE_H -#define EIGEN_ORDERINGMETHODS_MODULE_H - -#include "SparseCore" - -#include "src/Core/util/DisableStupidWarnings.h" - -/** - * \defgroup OrderingMethods_Module OrderingMethods module - * - * This module is currently for internal use only - * - * It defines various built-in and external ordering methods for sparse matrices. - * They are typically used to reduce the number of elements during - * the sparse matrix decomposition (LLT, LU, QR). - * Precisely, in a preprocessing step, a permutation matrix P is computed using - * those ordering methods and applied to the columns of the matrix. - * Using for instance the sparse Cholesky decomposition, it is expected that - * the nonzeros elements in LLT(A*P) will be much smaller than that in LLT(A). - * - * - * Usage : - * \code - * #include - * \endcode - * - * A simple usage is as a template parameter in the sparse decomposition classes : - * - * \code - * SparseLU > solver; - * \endcode - * - * \code - * SparseQR > solver; - * \endcode - * - * It is possible as well to call directly a particular ordering method for your own purpose, - * \code - * AMDOrdering ordering; - * PermutationMatrix perm; - * SparseMatrix A; - * //Fill the matrix ... - * - * ordering(A, perm); // Call AMD - * \endcode - * - * \note Some of these methods (like AMD or METIS), need the sparsity pattern - * of the input matrix to be symmetric. When the matrix is structurally unsymmetric, - * Eigen computes internally the pattern of \f$A^T*A\f$ before calling the method. - * If your matrix is already symmetric (at leat in structure), you can avoid that - * by calling the method with a SelfAdjointView type. - * - * \code - * // Call the ordering on the pattern of the lower triangular matrix A - * ordering(A.selfadjointView(), perm); - * \endcode - */ - -#ifndef EIGEN_MPL2_ONLY -#include "src/OrderingMethods/Amd.h" -#endif - -#include "src/OrderingMethods/Ordering.h" -#include "src/Core/util/ReenableStupidWarnings.h" - -#endif // EIGEN_ORDERINGMETHODS_MODULE_H diff --git a/include/Rivet/Math/eigen3/PaStiXSupport b/include/Rivet/Math/eigen3/PaStiXSupport deleted file mode 100644 --- a/include/Rivet/Math/eigen3/PaStiXSupport +++ /dev/null @@ -1,48 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_PASTIXSUPPORT_MODULE_H -#define EIGEN_PASTIXSUPPORT_MODULE_H - -#include "SparseCore" - -#include "src/Core/util/DisableStupidWarnings.h" - -extern "C" { -#include -#include -} - -#ifdef complex -#undef complex -#endif - -/** \ingroup Support_modules - * \defgroup PaStiXSupport_Module PaStiXSupport module - * - * This module provides an interface to the PaSTiX library. - * PaSTiX is a general \b supernodal, \b parallel and \b opensource sparse solver. - * It provides the two following main factorization classes: - * - class PastixLLT : a supernodal, parallel LLt Cholesky factorization. - * - class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization. - * - class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern). - * - * \code - * #include - * \endcode - * - * In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies. - * The dependencies depend on how PaSTiX has been compiled. - * For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task. - * - */ - -#include "src/PaStiXSupport/PaStiXSupport.h" - -#include "src/Core/util/ReenableStupidWarnings.h" - -#endif // EIGEN_PASTIXSUPPORT_MODULE_H diff --git a/include/Rivet/Math/eigen3/PardisoSupport b/include/Rivet/Math/eigen3/PardisoSupport deleted file mode 100644 --- a/include/Rivet/Math/eigen3/PardisoSupport +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_PARDISOSUPPORT_MODULE_H -#define EIGEN_PARDISOSUPPORT_MODULE_H - -#include "SparseCore" - -#include "src/Core/util/DisableStupidWarnings.h" - -#include - -/** \ingroup Support_modules - * \defgroup PardisoSupport_Module PardisoSupport module - * - * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers. - * - * \code - * #include - * \endcode - * - * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies. - * See this \ref TopicUsingIntelMKL "page" for more information on MKL-Eigen integration. - * - */ - -#include "src/PardisoSupport/PardisoSupport.h" - -#include "src/Core/util/ReenableStupidWarnings.h" - -#endif // EIGEN_PARDISOSUPPORT_MODULE_H diff --git a/include/Rivet/Math/eigen3/QtAlignedMalloc b/include/Rivet/Math/eigen3/QtAlignedMalloc deleted file mode 100644 --- a/include/Rivet/Math/eigen3/QtAlignedMalloc +++ /dev/null @@ -1,40 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_QTMALLOC_MODULE_H -#define EIGEN_QTMALLOC_MODULE_H - -#include "Core" - -#if (!EIGEN_MALLOC_ALREADY_ALIGNED) - -#include "src/Core/util/DisableStupidWarnings.h" - -void *qMalloc(std::size_t size) -{ - return Eigen::internal::aligned_malloc(size); -} - -void qFree(void *ptr) -{ - Eigen::internal::aligned_free(ptr); -} - -void *qRealloc(void *ptr, std::size_t size) -{ - void* newPtr = Eigen::internal::aligned_malloc(size); - memcpy(newPtr, ptr, size); - Eigen::internal::aligned_free(ptr); - return newPtr; -} - -#include "src/Core/util/ReenableStupidWarnings.h" - -#endif - -#endif // EIGEN_QTMALLOC_MODULE_H -/* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/include/Rivet/Math/eigen3/SPQRSupport b/include/Rivet/Math/eigen3/SPQRSupport deleted file mode 100644 --- a/include/Rivet/Math/eigen3/SPQRSupport +++ /dev/null @@ -1,34 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPQRSUPPORT_MODULE_H -#define EIGEN_SPQRSUPPORT_MODULE_H - -#include "SparseCore" - -#include "src/Core/util/DisableStupidWarnings.h" - -#include "SuiteSparseQR.hpp" - -/** \ingroup Support_modules - * \defgroup SPQRSupport_Module SuiteSparseQR module - * - * This module provides an interface to the SPQR library, which is part of the suitesparse package. - * - * \code - * #include - * \endcode - * - * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...). - * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules - * - */ - -#include "src/CholmodSupport/CholmodSupport.h" -#include "src/SPQRSupport/SuiteSparseQRSupport.h" - -#endif diff --git a/include/Rivet/Math/eigen3/Sparse b/include/Rivet/Math/eigen3/Sparse deleted file mode 100644 --- a/include/Rivet/Math/eigen3/Sparse +++ /dev/null @@ -1,36 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_MODULE_H -#define EIGEN_SPARSE_MODULE_H - -/** \defgroup Sparse_Module Sparse meta-module - * - * Meta-module including all related modules: - * - \ref SparseCore_Module - * - \ref OrderingMethods_Module - * - \ref SparseCholesky_Module - * - \ref SparseLU_Module - * - \ref SparseQR_Module - * - \ref IterativeLinearSolvers_Module - * - \code - #include - \endcode - */ - -#include "SparseCore" -#include "OrderingMethods" -#ifndef EIGEN_MPL2_ONLY -#include "SparseCholesky" -#endif -#include "SparseLU" -#include "SparseQR" -#include "IterativeLinearSolvers" - -#endif // EIGEN_SPARSE_MODULE_H - diff --git a/include/Rivet/Math/eigen3/SparseCholesky b/include/Rivet/Math/eigen3/SparseCholesky deleted file mode 100644 --- a/include/Rivet/Math/eigen3/SparseCholesky +++ /dev/null @@ -1,45 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2013 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSECHOLESKY_MODULE_H -#define EIGEN_SPARSECHOLESKY_MODULE_H - -#include "SparseCore" -#include "OrderingMethods" - -#include "src/Core/util/DisableStupidWarnings.h" - -/** - * \defgroup SparseCholesky_Module SparseCholesky module - * - * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices. - * Those decompositions are accessible via the following classes: - * - SimplicialLLt, - * - SimplicialLDLt - * - * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module. - * - * \code - * #include - * \endcode - */ - -#ifdef EIGEN_MPL2_ONLY -#error The SparseCholesky module has nothing to offer in MPL2 only mode -#endif - -#include "src/SparseCholesky/SimplicialCholesky.h" - -#ifndef EIGEN_MPL2_ONLY -#include "src/SparseCholesky/SimplicialCholesky_impl.h" -#endif - -#include "src/Core/util/ReenableStupidWarnings.h" - -#endif // EIGEN_SPARSECHOLESKY_MODULE_H diff --git a/include/Rivet/Math/eigen3/SparseCore b/include/Rivet/Math/eigen3/SparseCore deleted file mode 100644 --- a/include/Rivet/Math/eigen3/SparseCore +++ /dev/null @@ -1,69 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSECORE_MODULE_H -#define EIGEN_SPARSECORE_MODULE_H - -#include "Core" - -#include "src/Core/util/DisableStupidWarnings.h" - -#include -#include -#include -#include -#include - -/** - * \defgroup SparseCore_Module SparseCore module - * - * This module provides a sparse matrix representation, and basic associated matrix manipulations - * and operations. - * - * See the \ref TutorialSparse "Sparse tutorial" - * - * \code - * #include - * \endcode - * - * This module depends on: Core. - */ - -#include "src/SparseCore/SparseUtil.h" -#include "src/SparseCore/SparseMatrixBase.h" -#include "src/SparseCore/SparseAssign.h" -#include "src/SparseCore/CompressedStorage.h" -#include "src/SparseCore/AmbiVector.h" -#include "src/SparseCore/SparseCompressedBase.h" -#include "src/SparseCore/SparseMatrix.h" -#include "src/SparseCore/SparseMap.h" -#include "src/SparseCore/MappedSparseMatrix.h" -#include "src/SparseCore/SparseVector.h" -#include "src/SparseCore/SparseRef.h" -#include "src/SparseCore/SparseCwiseUnaryOp.h" -#include "src/SparseCore/SparseCwiseBinaryOp.h" -#include "src/SparseCore/SparseTranspose.h" -#include "src/SparseCore/SparseBlock.h" -#include "src/SparseCore/SparseDot.h" -#include "src/SparseCore/SparseRedux.h" -#include "src/SparseCore/SparseView.h" -#include "src/SparseCore/SparseDiagonalProduct.h" -#include "src/SparseCore/ConservativeSparseSparseProduct.h" -#include "src/SparseCore/SparseSparseProductWithPruning.h" -#include "src/SparseCore/SparseProduct.h" -#include "src/SparseCore/SparseDenseProduct.h" -#include "src/SparseCore/SparseSelfAdjointView.h" -#include "src/SparseCore/SparseTriangularView.h" -#include "src/SparseCore/TriangularSolver.h" -#include "src/SparseCore/SparsePermutation.h" -#include "src/SparseCore/SparseFuzzy.h" -#include "src/SparseCore/SparseSolverBase.h" - -#include "src/Core/util/ReenableStupidWarnings.h" - -#endif // EIGEN_SPARSECORE_MODULE_H - diff --git a/include/Rivet/Math/eigen3/SparseLU b/include/Rivet/Math/eigen3/SparseLU deleted file mode 100644 --- a/include/Rivet/Math/eigen3/SparseLU +++ /dev/null @@ -1,46 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// Copyright (C) 2012 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSELU_MODULE_H -#define EIGEN_SPARSELU_MODULE_H - -#include "SparseCore" - -/** - * \defgroup SparseLU_Module SparseLU module - * This module defines a supernodal factorization of general sparse matrices. - * The code is fully optimized for supernode-panel updates with specialized kernels. - * Please, see the documentation of the SparseLU class for more details. - */ - -// Ordering interface -#include "OrderingMethods" - -#include "src/SparseLU/SparseLU_gemm_kernel.h" - -#include "src/SparseLU/SparseLU_Structs.h" -#include "src/SparseLU/SparseLU_SupernodalMatrix.h" -#include "src/SparseLU/SparseLUImpl.h" -#include "src/SparseCore/SparseColEtree.h" -#include "src/SparseLU/SparseLU_Memory.h" -#include "src/SparseLU/SparseLU_heap_relax_snode.h" -#include "src/SparseLU/SparseLU_relax_snode.h" -#include "src/SparseLU/SparseLU_pivotL.h" -#include "src/SparseLU/SparseLU_panel_dfs.h" -#include "src/SparseLU/SparseLU_kernel_bmod.h" -#include "src/SparseLU/SparseLU_panel_bmod.h" -#include "src/SparseLU/SparseLU_column_dfs.h" -#include "src/SparseLU/SparseLU_column_bmod.h" -#include "src/SparseLU/SparseLU_copy_to_ucol.h" -#include "src/SparseLU/SparseLU_pruneL.h" -#include "src/SparseLU/SparseLU_Utils.h" -#include "src/SparseLU/SparseLU.h" - -#endif // EIGEN_SPARSELU_MODULE_H diff --git a/include/Rivet/Math/eigen3/SparseQR b/include/Rivet/Math/eigen3/SparseQR deleted file mode 100644 --- a/include/Rivet/Math/eigen3/SparseQR +++ /dev/null @@ -1,37 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSEQR_MODULE_H -#define EIGEN_SPARSEQR_MODULE_H - -#include "SparseCore" -#include "OrderingMethods" -#include "src/Core/util/DisableStupidWarnings.h" - -/** \defgroup SparseQR_Module SparseQR module - * \brief Provides QR decomposition for sparse matrices - * - * This module provides a simplicial version of the left-looking Sparse QR decomposition. - * The columns of the input matrix should be reordered to limit the fill-in during the - * decomposition. Built-in methods (COLAMD, AMD) or external methods (METIS) can be used to this end. - * See the \link OrderingMethods_Module OrderingMethods\endlink module for the list - * of built-in and external ordering methods. - * - * \code - * #include - * \endcode - * - * - */ - -#include "OrderingMethods" -#include "src/SparseCore/SparseColEtree.h" -#include "src/SparseQR/SparseQR.h" - -#include "src/Core/util/ReenableStupidWarnings.h" - -#endif diff --git a/include/Rivet/Math/eigen3/StdDeque b/include/Rivet/Math/eigen3/StdDeque deleted file mode 100644 --- a/include/Rivet/Math/eigen3/StdDeque +++ /dev/null @@ -1,27 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2009 Gael Guennebaud -// Copyright (C) 2009 Hauke Heibel -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_STDDEQUE_MODULE_H -#define EIGEN_STDDEQUE_MODULE_H - -#include "Core" -#include - -#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */ - -#define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) - -#else - -#include "src/StlSupport/StdDeque.h" - -#endif - -#endif // EIGEN_STDDEQUE_MODULE_H diff --git a/include/Rivet/Math/eigen3/StdList b/include/Rivet/Math/eigen3/StdList deleted file mode 100644 --- a/include/Rivet/Math/eigen3/StdList +++ /dev/null @@ -1,26 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2009 Hauke Heibel -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_STDLIST_MODULE_H -#define EIGEN_STDLIST_MODULE_H - -#include "Core" -#include - -#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */ - -#define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) - -#else - -#include "src/StlSupport/StdList.h" - -#endif - -#endif // EIGEN_STDLIST_MODULE_H diff --git a/include/Rivet/Math/eigen3/StdVector b/include/Rivet/Math/eigen3/StdVector deleted file mode 100644 --- a/include/Rivet/Math/eigen3/StdVector +++ /dev/null @@ -1,27 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2009 Gael Guennebaud -// Copyright (C) 2009 Hauke Heibel -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_STDVECTOR_MODULE_H -#define EIGEN_STDVECTOR_MODULE_H - -#include "Core" -#include - -#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */ - -#define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) - -#else - -#include "src/StlSupport/StdVector.h" - -#endif - -#endif // EIGEN_STDVECTOR_MODULE_H diff --git a/include/Rivet/Math/eigen3/SuperLUSupport b/include/Rivet/Math/eigen3/SuperLUSupport deleted file mode 100644 --- a/include/Rivet/Math/eigen3/SuperLUSupport +++ /dev/null @@ -1,64 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SUPERLUSUPPORT_MODULE_H -#define EIGEN_SUPERLUSUPPORT_MODULE_H - -#include "SparseCore" - -#include "src/Core/util/DisableStupidWarnings.h" - -#ifdef EMPTY -#define EIGEN_EMPTY_WAS_ALREADY_DEFINED -#endif - -typedef int int_t; -#include -#include -#include - -// slu_util.h defines a preprocessor token named EMPTY which is really polluting, -// so we remove it in favor of a SUPERLU_EMPTY token. -// If EMPTY was already defined then we don't undef it. - -#if defined(EIGEN_EMPTY_WAS_ALREADY_DEFINED) -# undef EIGEN_EMPTY_WAS_ALREADY_DEFINED -#elif defined(EMPTY) -# undef EMPTY -#endif - -#define SUPERLU_EMPTY (-1) - -namespace Eigen { struct SluMatrix; } - -/** \ingroup Support_modules - * \defgroup SuperLUSupport_Module SuperLUSupport module - * - * This module provides an interface to the SuperLU library. - * It provides the following factorization class: - * - class SuperLU: a supernodal sequential LU factorization. - * - class SuperILU: a supernodal sequential incomplete LU factorization (to be used as a preconditioner for iterative methods). - * - * \warning This wrapper requires at least versions 4.0 of SuperLU. The 3.x versions are not supported. - * - * \warning When including this module, you have to use SUPERLU_EMPTY instead of EMPTY which is no longer defined because it is too polluting. - * - * \code - * #include - * \endcode - * - * In order to use this module, the superlu headers must be accessible from the include paths, and your binary must be linked to the superlu library and its dependencies. - * The dependencies depend on how superlu has been compiled. - * For a cmake based project, you can use our FindSuperLU.cmake module to help you in this task. - * - */ - -#include "src/SuperLUSupport/SuperLUSupport.h" - -#include "src/Core/util/ReenableStupidWarnings.h" - -#endif // EIGEN_SUPERLUSUPPORT_MODULE_H diff --git a/include/Rivet/Math/eigen3/UmfPackSupport b/include/Rivet/Math/eigen3/UmfPackSupport deleted file mode 100644 --- a/include/Rivet/Math/eigen3/UmfPackSupport +++ /dev/null @@ -1,40 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_UMFPACKSUPPORT_MODULE_H -#define EIGEN_UMFPACKSUPPORT_MODULE_H - -#include "SparseCore" - -#include "src/Core/util/DisableStupidWarnings.h" - -extern "C" { -#include -} - -/** \ingroup Support_modules - * \defgroup UmfPackSupport_Module UmfPackSupport module - * - * This module provides an interface to the UmfPack library which is part of the suitesparse package. - * It provides the following factorization class: - * - class UmfPackLU: a multifrontal sequential LU factorization. - * - * \code - * #include - * \endcode - * - * In order to use this module, the umfpack headers must be accessible from the include paths, and your binary must be linked to the umfpack library and its dependencies. - * The dependencies depend on how umfpack has been compiled. - * For a cmake based project, you can use our FindUmfPack.cmake module to help you in this task. - * - */ - -#include "src/UmfPackSupport/UmfPackSupport.h" - -#include "src/Core/util/ReenableStupidWarnings.h" - -#endif // EIGEN_UMFPACKSUPPORT_MODULE_H diff --git a/include/Rivet/Math/eigen3/src/Cholesky/LLT_LAPACKE.h b/include/Rivet/Math/eigen3/src/Cholesky/LLT_LAPACKE.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Cholesky/LLT_LAPACKE.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to LAPACKe - * LLt decomposition based on LAPACKE_?potrf function. - ******************************************************************************** -*/ - -#ifndef EIGEN_LLT_LAPACKE_H -#define EIGEN_LLT_LAPACKE_H - -namespace Eigen { - -namespace internal { - -template struct lapacke_llt; - -#define EIGEN_LAPACKE_LLT(EIGTYPE, BLASTYPE, LAPACKE_PREFIX) \ -template<> struct lapacke_llt \ -{ \ - template \ - static inline Index potrf(MatrixType& m, char uplo) \ - { \ - lapack_int matrix_order; \ - lapack_int size, lda, info, StorageOrder; \ - EIGTYPE* a; \ - eigen_assert(m.rows()==m.cols()); \ - /* Set up parameters for ?potrf */ \ - size = convert_index(m.rows()); \ - StorageOrder = MatrixType::Flags&RowMajorBit?RowMajor:ColMajor; \ - matrix_order = StorageOrder==RowMajor ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \ - a = &(m.coeffRef(0,0)); \ - lda = convert_index(m.outerStride()); \ -\ - info = LAPACKE_##LAPACKE_PREFIX##potrf( matrix_order, uplo, size, (BLASTYPE*)a, lda ); \ - info = (info==0) ? -1 : info>0 ? info-1 : size; \ - return info; \ - } \ -}; \ -template<> struct llt_inplace \ -{ \ - template \ - static Index blocked(MatrixType& m) \ - { \ - return lapacke_llt::potrf(m, 'L'); \ - } \ - template \ - static Index rankUpdate(MatrixType& mat, const VectorType& vec, const typename MatrixType::RealScalar& sigma) \ - { return Eigen::internal::llt_rank_update_lower(mat, vec, sigma); } \ -}; \ -template<> struct llt_inplace \ -{ \ - template \ - static Index blocked(MatrixType& m) \ - { \ - return lapacke_llt::potrf(m, 'U'); \ - } \ - template \ - static Index rankUpdate(MatrixType& mat, const VectorType& vec, const typename MatrixType::RealScalar& sigma) \ - { \ - Transpose matt(mat); \ - return llt_inplace::rankUpdate(matt, vec.conjugate(), sigma); \ - } \ -}; - -EIGEN_LAPACKE_LLT(double, double, d) -EIGEN_LAPACKE_LLT(float, float, s) -EIGEN_LAPACKE_LLT(dcomplex, lapack_complex_double, z) -EIGEN_LAPACKE_LLT(scomplex, lapack_complex_float, c) - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_LLT_LAPACKE_H diff --git a/include/Rivet/Math/eigen3/src/CholmodSupport/CholmodSupport.h b/include/Rivet/Math/eigen3/src/CholmodSupport/CholmodSupport.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/CholmodSupport/CholmodSupport.h +++ /dev/null @@ -1,639 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2010 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_CHOLMODSUPPORT_H -#define EIGEN_CHOLMODSUPPORT_H - -namespace Eigen { - -namespace internal { - -template struct cholmod_configure_matrix; - -template<> struct cholmod_configure_matrix { - template - static void run(CholmodType& mat) { - mat.xtype = CHOLMOD_REAL; - mat.dtype = CHOLMOD_DOUBLE; - } -}; - -template<> struct cholmod_configure_matrix > { - template - static void run(CholmodType& mat) { - mat.xtype = CHOLMOD_COMPLEX; - mat.dtype = CHOLMOD_DOUBLE; - } -}; - -// Other scalar types are not yet suppotred by Cholmod -// template<> struct cholmod_configure_matrix { -// template -// static void run(CholmodType& mat) { -// mat.xtype = CHOLMOD_REAL; -// mat.dtype = CHOLMOD_SINGLE; -// } -// }; -// -// template<> struct cholmod_configure_matrix > { -// template -// static void run(CholmodType& mat) { -// mat.xtype = CHOLMOD_COMPLEX; -// mat.dtype = CHOLMOD_SINGLE; -// } -// }; - -} // namespace internal - -/** Wraps the Eigen sparse matrix \a mat into a Cholmod sparse matrix object. - * Note that the data are shared. - */ -template -cholmod_sparse viewAsCholmod(Ref > mat) -{ - cholmod_sparse res; - res.nzmax = mat.nonZeros(); - res.nrow = mat.rows(); - res.ncol = mat.cols(); - res.p = mat.outerIndexPtr(); - res.i = mat.innerIndexPtr(); - res.x = mat.valuePtr(); - res.z = 0; - res.sorted = 1; - if(mat.isCompressed()) - { - res.packed = 1; - res.nz = 0; - } - else - { - res.packed = 0; - res.nz = mat.innerNonZeroPtr(); - } - - res.dtype = 0; - res.stype = -1; - - if (internal::is_same<_StorageIndex,int>::value) - { - res.itype = CHOLMOD_INT; - } - else if (internal::is_same<_StorageIndex,long>::value) - { - res.itype = CHOLMOD_LONG; - } - else - { - eigen_assert(false && "Index type not supported yet"); - } - - // setup res.xtype - internal::cholmod_configure_matrix<_Scalar>::run(res); - - res.stype = 0; - - return res; -} - -template -const cholmod_sparse viewAsCholmod(const SparseMatrix<_Scalar,_Options,_Index>& mat) -{ - cholmod_sparse res = viewAsCholmod(Ref >(mat.const_cast_derived())); - return res; -} - -template -const cholmod_sparse viewAsCholmod(const SparseVector<_Scalar,_Options,_Index>& mat) -{ - cholmod_sparse res = viewAsCholmod(Ref >(mat.const_cast_derived())); - return res; -} - -/** Returns a view of the Eigen sparse matrix \a mat as Cholmod sparse matrix. - * The data are not copied but shared. */ -template -cholmod_sparse viewAsCholmod(const SparseSelfAdjointView, UpLo>& mat) -{ - cholmod_sparse res = viewAsCholmod(Ref >(mat.matrix().const_cast_derived())); - - if(UpLo==Upper) res.stype = 1; - if(UpLo==Lower) res.stype = -1; - - return res; -} - -/** Returns a view of the Eigen \b dense matrix \a mat as Cholmod dense matrix. - * The data are not copied but shared. */ -template -cholmod_dense viewAsCholmod(MatrixBase& mat) -{ - EIGEN_STATIC_ASSERT((internal::traits::Flags&RowMajorBit)==0,THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES); - typedef typename Derived::Scalar Scalar; - - cholmod_dense res; - res.nrow = mat.rows(); - res.ncol = mat.cols(); - res.nzmax = res.nrow * res.ncol; - res.d = Derived::IsVectorAtCompileTime ? mat.derived().size() : mat.derived().outerStride(); - res.x = (void*)(mat.derived().data()); - res.z = 0; - - internal::cholmod_configure_matrix::run(res); - - return res; -} - -/** Returns a view of the Cholmod sparse matrix \a cm as an Eigen sparse matrix. - * The data are not copied but shared. */ -template -MappedSparseMatrix viewAsEigen(cholmod_sparse& cm) -{ - return MappedSparseMatrix - (cm.nrow, cm.ncol, static_cast(cm.p)[cm.ncol], - static_cast(cm.p), static_cast(cm.i),static_cast(cm.x) ); -} - -enum CholmodMode { - CholmodAuto, CholmodSimplicialLLt, CholmodSupernodalLLt, CholmodLDLt -}; - - -/** \ingroup CholmodSupport_Module - * \class CholmodBase - * \brief The base class for the direct Cholesky factorization of Cholmod - * \sa class CholmodSupernodalLLT, class CholmodSimplicialLDLT, class CholmodSimplicialLLT - */ -template -class CholmodBase : public SparseSolverBase -{ - protected: - typedef SparseSolverBase Base; - using Base::derived; - using Base::m_isInitialized; - public: - typedef _MatrixType MatrixType; - enum { UpLo = _UpLo }; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef MatrixType CholMatrixType; - typedef typename MatrixType::StorageIndex StorageIndex; - enum { - ColsAtCompileTime = MatrixType::ColsAtCompileTime, - MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime - }; - - public: - - CholmodBase() - : m_cholmodFactor(0), m_info(Success), m_factorizationIsOk(false), m_analysisIsOk(false) - { - EIGEN_STATIC_ASSERT((internal::is_same::value), CHOLMOD_SUPPORTS_DOUBLE_PRECISION_ONLY); - m_shiftOffset[0] = m_shiftOffset[1] = 0.0; - cholmod_start(&m_cholmod); - } - - explicit CholmodBase(const MatrixType& matrix) - : m_cholmodFactor(0), m_info(Success), m_factorizationIsOk(false), m_analysisIsOk(false) - { - EIGEN_STATIC_ASSERT((internal::is_same::value), CHOLMOD_SUPPORTS_DOUBLE_PRECISION_ONLY); - m_shiftOffset[0] = m_shiftOffset[1] = 0.0; - cholmod_start(&m_cholmod); - compute(matrix); - } - - ~CholmodBase() - { - if(m_cholmodFactor) - cholmod_free_factor(&m_cholmodFactor, &m_cholmod); - cholmod_finish(&m_cholmod); - } - - inline StorageIndex cols() const { return internal::convert_index(m_cholmodFactor->n); } - inline StorageIndex rows() const { return internal::convert_index(m_cholmodFactor->n); } - - /** \brief Reports whether previous computation was successful. - * - * \returns \c Success if computation was succesful, - * \c NumericalIssue if the matrix.appears to be negative. - */ - ComputationInfo info() const - { - eigen_assert(m_isInitialized && "Decomposition is not initialized."); - return m_info; - } - - /** Computes the sparse Cholesky decomposition of \a matrix */ - Derived& compute(const MatrixType& matrix) - { - analyzePattern(matrix); - factorize(matrix); - return derived(); - } - - /** Performs a symbolic decomposition on the sparsity pattern of \a matrix. - * - * This function is particularly useful when solving for several problems having the same structure. - * - * \sa factorize() - */ - void analyzePattern(const MatrixType& matrix) - { - if(m_cholmodFactor) - { - cholmod_free_factor(&m_cholmodFactor, &m_cholmod); - m_cholmodFactor = 0; - } - cholmod_sparse A = viewAsCholmod(matrix.template selfadjointView()); - m_cholmodFactor = cholmod_analyze(&A, &m_cholmod); - - this->m_isInitialized = true; - this->m_info = Success; - m_analysisIsOk = true; - m_factorizationIsOk = false; - } - - /** Performs a numeric decomposition of \a matrix - * - * The given matrix must have the same sparsity pattern as the matrix on which the symbolic decomposition has been performed. - * - * \sa analyzePattern() - */ - void factorize(const MatrixType& matrix) - { - eigen_assert(m_analysisIsOk && "You must first call analyzePattern()"); - cholmod_sparse A = viewAsCholmod(matrix.template selfadjointView()); - cholmod_factorize_p(&A, m_shiftOffset, 0, 0, m_cholmodFactor, &m_cholmod); - - // If the factorization failed, minor is the column at which it did. On success minor == n. - this->m_info = (m_cholmodFactor->minor == m_cholmodFactor->n ? Success : NumericalIssue); - m_factorizationIsOk = true; - } - - /** Returns a reference to the Cholmod's configuration structure to get a full control over the performed operations. - * See the Cholmod user guide for details. */ - cholmod_common& cholmod() { return m_cholmod; } - - #ifndef EIGEN_PARSED_BY_DOXYGEN - /** \internal */ - template - void _solve_impl(const MatrixBase &b, MatrixBase &dest) const - { - eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()"); - const Index size = m_cholmodFactor->n; - EIGEN_UNUSED_VARIABLE(size); - eigen_assert(size==b.rows()); - - // Cholmod needs column-major stoarge without inner-stride, which corresponds to the default behavior of Ref. - Ref > b_ref(b.derived()); - - cholmod_dense b_cd = viewAsCholmod(b_ref); - cholmod_dense* x_cd = cholmod_solve(CHOLMOD_A, m_cholmodFactor, &b_cd, &m_cholmod); - if(!x_cd) - { - this->m_info = NumericalIssue; - return; - } - // TODO optimize this copy by swapping when possible (be careful with alignment, etc.) - dest = Matrix::Map(reinterpret_cast(x_cd->x),b.rows(),b.cols()); - cholmod_free_dense(&x_cd, &m_cholmod); - } - - /** \internal */ - template - void _solve_impl(const SparseMatrixBase &b, SparseMatrixBase &dest) const - { - eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()"); - const Index size = m_cholmodFactor->n; - EIGEN_UNUSED_VARIABLE(size); - eigen_assert(size==b.rows()); - - // note: cs stands for Cholmod Sparse - Ref > b_ref(b.const_cast_derived()); - cholmod_sparse b_cs = viewAsCholmod(b_ref); - cholmod_sparse* x_cs = cholmod_spsolve(CHOLMOD_A, m_cholmodFactor, &b_cs, &m_cholmod); - if(!x_cs) - { - this->m_info = NumericalIssue; - return; - } - // TODO optimize this copy by swapping when possible (be careful with alignment, etc.) - dest.derived() = viewAsEigen(*x_cs); - cholmod_free_sparse(&x_cs, &m_cholmod); - } - #endif // EIGEN_PARSED_BY_DOXYGEN - - - /** Sets the shift parameter that will be used to adjust the diagonal coefficients during the numerical factorization. - * - * During the numerical factorization, an offset term is added to the diagonal coefficients:\n - * \c d_ii = \a offset + \c d_ii - * - * The default is \a offset=0. - * - * \returns a reference to \c *this. - */ - Derived& setShift(const RealScalar& offset) - { - m_shiftOffset[0] = double(offset); - return derived(); - } - - /** \returns the determinant of the underlying matrix from the current factorization */ - Scalar determinant() const - { - using std::exp; - return exp(logDeterminant()); - } - - /** \returns the log determinant of the underlying matrix from the current factorization */ - Scalar logDeterminant() const - { - using std::log; - using numext::real; - eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()"); - - RealScalar logDet = 0; - Scalar *x = static_cast(m_cholmodFactor->x); - if (m_cholmodFactor->is_super) - { - // Supernodal factorization stored as a packed list of dense column-major blocs, - // as described by the following structure: - - // super[k] == index of the first column of the j-th super node - StorageIndex *super = static_cast(m_cholmodFactor->super); - // pi[k] == offset to the description of row indices - StorageIndex *pi = static_cast(m_cholmodFactor->pi); - // px[k] == offset to the respective dense block - StorageIndex *px = static_cast(m_cholmodFactor->px); - - Index nb_super_nodes = m_cholmodFactor->nsuper; - for (Index k=0; k < nb_super_nodes; ++k) - { - StorageIndex ncols = super[k + 1] - super[k]; - StorageIndex nrows = pi[k + 1] - pi[k]; - - Map, 0, InnerStride<> > sk(x + px[k], ncols, InnerStride<>(nrows+1)); - logDet += sk.real().log().sum(); - } - } - else - { - // Simplicial factorization stored as standard CSC matrix. - StorageIndex *p = static_cast(m_cholmodFactor->p); - Index size = m_cholmodFactor->n; - for (Index k=0; kis_ll) - logDet *= 2.0; - return logDet; - }; - - template - void dumpMemory(Stream& /*s*/) - {} - - protected: - mutable cholmod_common m_cholmod; - cholmod_factor* m_cholmodFactor; - double m_shiftOffset[2]; - mutable ComputationInfo m_info; - int m_factorizationIsOk; - int m_analysisIsOk; -}; - -/** \ingroup CholmodSupport_Module - * \class CholmodSimplicialLLT - * \brief A simplicial direct Cholesky (LLT) factorization and solver based on Cholmod - * - * This class allows to solve for A.X = B sparse linear problems via a simplicial LL^T Cholesky factorization - * using the Cholmod library. - * This simplicial variant is equivalent to Eigen's built-in SimplicialLLT class. Therefore, it has little practical interest. - * The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices - * X and B can be either dense or sparse. - * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower - * or Upper. Default is Lower. - * - * \implsparsesolverconcept - * - * This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed. - * - * \warning Only double precision real and complex scalar types are supported by Cholmod. - * - * \sa \ref TutorialSparseSolverConcept, class CholmodSupernodalLLT, class SimplicialLLT - */ -template -class CholmodSimplicialLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLLT<_MatrixType, _UpLo> > -{ - typedef CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLLT> Base; - using Base::m_cholmod; - - public: - - typedef _MatrixType MatrixType; - - CholmodSimplicialLLT() : Base() { init(); } - - CholmodSimplicialLLT(const MatrixType& matrix) : Base() - { - init(); - this->compute(matrix); - } - - ~CholmodSimplicialLLT() {} - protected: - void init() - { - m_cholmod.final_asis = 0; - m_cholmod.supernodal = CHOLMOD_SIMPLICIAL; - m_cholmod.final_ll = 1; - } -}; - - -/** \ingroup CholmodSupport_Module - * \class CholmodSimplicialLDLT - * \brief A simplicial direct Cholesky (LDLT) factorization and solver based on Cholmod - * - * This class allows to solve for A.X = B sparse linear problems via a simplicial LDL^T Cholesky factorization - * using the Cholmod library. - * This simplicial variant is equivalent to Eigen's built-in SimplicialLDLT class. Therefore, it has little practical interest. - * The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices - * X and B can be either dense or sparse. - * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower - * or Upper. Default is Lower. - * - * \implsparsesolverconcept - * - * This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed. - * - * \warning Only double precision real and complex scalar types are supported by Cholmod. - * - * \sa \ref TutorialSparseSolverConcept, class CholmodSupernodalLLT, class SimplicialLDLT - */ -template -class CholmodSimplicialLDLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLDLT<_MatrixType, _UpLo> > -{ - typedef CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLDLT> Base; - using Base::m_cholmod; - - public: - - typedef _MatrixType MatrixType; - - CholmodSimplicialLDLT() : Base() { init(); } - - CholmodSimplicialLDLT(const MatrixType& matrix) : Base() - { - init(); - this->compute(matrix); - } - - ~CholmodSimplicialLDLT() {} - protected: - void init() - { - m_cholmod.final_asis = 1; - m_cholmod.supernodal = CHOLMOD_SIMPLICIAL; - } -}; - -/** \ingroup CholmodSupport_Module - * \class CholmodSupernodalLLT - * \brief A supernodal Cholesky (LLT) factorization and solver based on Cholmod - * - * This class allows to solve for A.X = B sparse linear problems via a supernodal LL^T Cholesky factorization - * using the Cholmod library. - * This supernodal variant performs best on dense enough problems, e.g., 3D FEM, or very high order 2D FEM. - * The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices - * X and B can be either dense or sparse. - * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower - * or Upper. Default is Lower. - * - * \implsparsesolverconcept - * - * This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed. - * - * \warning Only double precision real and complex scalar types are supported by Cholmod. - * - * \sa \ref TutorialSparseSolverConcept - */ -template -class CholmodSupernodalLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSupernodalLLT<_MatrixType, _UpLo> > -{ - typedef CholmodBase<_MatrixType, _UpLo, CholmodSupernodalLLT> Base; - using Base::m_cholmod; - - public: - - typedef _MatrixType MatrixType; - - CholmodSupernodalLLT() : Base() { init(); } - - CholmodSupernodalLLT(const MatrixType& matrix) : Base() - { - init(); - this->compute(matrix); - } - - ~CholmodSupernodalLLT() {} - protected: - void init() - { - m_cholmod.final_asis = 1; - m_cholmod.supernodal = CHOLMOD_SUPERNODAL; - } -}; - -/** \ingroup CholmodSupport_Module - * \class CholmodDecomposition - * \brief A general Cholesky factorization and solver based on Cholmod - * - * This class allows to solve for A.X = B sparse linear problems via a LL^T or LDL^T Cholesky factorization - * using the Cholmod library. The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices - * X and B can be either dense or sparse. - * - * This variant permits to change the underlying Cholesky method at runtime. - * On the other hand, it does not provide access to the result of the factorization. - * The default is to let Cholmod automatically choose between a simplicial and supernodal factorization. - * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower - * or Upper. Default is Lower. - * - * \implsparsesolverconcept - * - * This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed. - * - * \warning Only double precision real and complex scalar types are supported by Cholmod. - * - * \sa \ref TutorialSparseSolverConcept - */ -template -class CholmodDecomposition : public CholmodBase<_MatrixType, _UpLo, CholmodDecomposition<_MatrixType, _UpLo> > -{ - typedef CholmodBase<_MatrixType, _UpLo, CholmodDecomposition> Base; - using Base::m_cholmod; - - public: - - typedef _MatrixType MatrixType; - - CholmodDecomposition() : Base() { init(); } - - CholmodDecomposition(const MatrixType& matrix) : Base() - { - init(); - this->compute(matrix); - } - - ~CholmodDecomposition() {} - - void setMode(CholmodMode mode) - { - switch(mode) - { - case CholmodAuto: - m_cholmod.final_asis = 1; - m_cholmod.supernodal = CHOLMOD_AUTO; - break; - case CholmodSimplicialLLt: - m_cholmod.final_asis = 0; - m_cholmod.supernodal = CHOLMOD_SIMPLICIAL; - m_cholmod.final_ll = 1; - break; - case CholmodSupernodalLLt: - m_cholmod.final_asis = 1; - m_cholmod.supernodal = CHOLMOD_SUPERNODAL; - break; - case CholmodLDLt: - m_cholmod.final_asis = 1; - m_cholmod.supernodal = CHOLMOD_SIMPLICIAL; - break; - default: - break; - } - } - protected: - void init() - { - m_cholmod.final_asis = 1; - m_cholmod.supernodal = CHOLMOD_AUTO; - } -}; - -} // end namespace Eigen - -#endif // EIGEN_CHOLMODSUPPORT_H diff --git a/include/Rivet/Math/eigen3/src/Core/Assign_MKL.h b/include/Rivet/Math/eigen3/src/Core/Assign_MKL.h deleted file mode 100755 --- a/include/Rivet/Math/eigen3/src/Core/Assign_MKL.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - Copyright (C) 2015 Gael Guennebaud - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to Intel(R) MKL - * MKL VML support for coefficient-wise unary Eigen expressions like a=b.sin() - ******************************************************************************** -*/ - -#ifndef EIGEN_ASSIGN_VML_H -#define EIGEN_ASSIGN_VML_H - -namespace Eigen { - -namespace internal { - -template -class vml_assign_traits -{ - private: - enum { - DstHasDirectAccess = Dst::Flags & DirectAccessBit, - SrcHasDirectAccess = Src::Flags & DirectAccessBit, - StorageOrdersAgree = (int(Dst::IsRowMajor) == int(Src::IsRowMajor)), - InnerSize = int(Dst::IsVectorAtCompileTime) ? int(Dst::SizeAtCompileTime) - : int(Dst::Flags)&RowMajorBit ? int(Dst::ColsAtCompileTime) - : int(Dst::RowsAtCompileTime), - InnerMaxSize = int(Dst::IsVectorAtCompileTime) ? int(Dst::MaxSizeAtCompileTime) - : int(Dst::Flags)&RowMajorBit ? int(Dst::MaxColsAtCompileTime) - : int(Dst::MaxRowsAtCompileTime), - MaxSizeAtCompileTime = Dst::SizeAtCompileTime, - - MightEnableVml = StorageOrdersAgree && DstHasDirectAccess && SrcHasDirectAccess && Src::InnerStrideAtCompileTime==1 && Dst::InnerStrideAtCompileTime==1, - MightLinearize = MightEnableVml && (int(Dst::Flags) & int(Src::Flags) & LinearAccessBit), - VmlSize = MightLinearize ? MaxSizeAtCompileTime : InnerMaxSize, - LargeEnough = VmlSize==Dynamic || VmlSize>=EIGEN_MKL_VML_THRESHOLD - }; - public: - enum { - EnableVml = MightEnableVml && LargeEnough, - Traversal = MightLinearize ? LinearTraversal : DefaultTraversal - }; -}; - -#define EIGEN_PP_EXPAND(ARG) ARG -#if !defined (EIGEN_FAST_MATH) || (EIGEN_FAST_MATH != 1) -#define EIGEN_VMLMODE_EXPAND_LA , VML_HA -#else -#define EIGEN_VMLMODE_EXPAND_LA , VML_LA -#endif - -#define EIGEN_VMLMODE_EXPAND__ - -#define EIGEN_VMLMODE_PREFIX_LA vm -#define EIGEN_VMLMODE_PREFIX__ v -#define EIGEN_VMLMODE_PREFIX(VMLMODE) EIGEN_CAT(EIGEN_VMLMODE_PREFIX_,VMLMODE) - -#define EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, VMLOP, EIGENTYPE, VMLTYPE, VMLMODE) \ - template< typename DstXprType, typename SrcXprNested> \ - struct Assignment, SrcXprNested>, assign_op, \ - Dense2Dense, typename enable_if::EnableVml>::type> { \ - typedef CwiseUnaryOp, SrcXprNested> SrcXprType; \ - static void run(DstXprType &dst, const SrcXprType &src, const assign_op &/*func*/) { \ - eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols()); \ - if(vml_assign_traits::Traversal==LinearTraversal) { \ - VMLOP(dst.size(), (const VMLTYPE*)src.nestedExpression().data(), \ - (VMLTYPE*)dst.data() EIGEN_PP_EXPAND(EIGEN_VMLMODE_EXPAND_##VMLMODE) ); \ - } else { \ - const Index outerSize = dst.outerSize(); \ - for(Index outer = 0; outer < outerSize; ++outer) { \ - const EIGENTYPE *src_ptr = src.IsRowMajor ? &(src.nestedExpression().coeffRef(outer,0)) : \ - &(src.nestedExpression().coeffRef(0, outer)); \ - EIGENTYPE *dst_ptr = dst.IsRowMajor ? &(dst.coeffRef(outer,0)) : &(dst.coeffRef(0, outer)); \ - VMLOP( dst.innerSize(), (const VMLTYPE*)src_ptr, \ - (VMLTYPE*)dst_ptr EIGEN_PP_EXPAND(EIGEN_VMLMODE_EXPAND_##VMLMODE)); \ - } \ - } \ - } \ - }; \ - - -#define EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(EIGENOP, VMLOP, VMLMODE) \ - EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, EIGEN_CAT(EIGEN_VMLMODE_PREFIX(VMLMODE),s##VMLOP), float, float, VMLMODE) \ - EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, EIGEN_CAT(EIGEN_VMLMODE_PREFIX(VMLMODE),d##VMLOP), double, double, VMLMODE) - -#define EIGEN_MKL_VML_DECLARE_UNARY_CALLS_CPLX(EIGENOP, VMLOP, VMLMODE) \ - EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, EIGEN_CAT(EIGEN_VMLMODE_PREFIX(VMLMODE),c##VMLOP), scomplex, MKL_Complex8, VMLMODE) \ - EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, EIGEN_CAT(EIGEN_VMLMODE_PREFIX(VMLMODE),z##VMLOP), dcomplex, MKL_Complex16, VMLMODE) - -#define EIGEN_MKL_VML_DECLARE_UNARY_CALLS(EIGENOP, VMLOP, VMLMODE) \ - EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(EIGENOP, VMLOP, VMLMODE) \ - EIGEN_MKL_VML_DECLARE_UNARY_CALLS_CPLX(EIGENOP, VMLOP, VMLMODE) - - -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(sin, Sin, LA) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(asin, Asin, LA) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(sinh, Sinh, LA) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(cos, Cos, LA) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(acos, Acos, LA) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(cosh, Cosh, LA) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(tan, Tan, LA) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(atan, Atan, LA) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(tanh, Tanh, LA) -// EIGEN_MKL_VML_DECLARE_UNARY_CALLS(abs, Abs, _) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(exp, Exp, LA) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(log, Ln, LA) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(log10, Log10, LA) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS(sqrt, Sqrt, _) - -EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(square, Sqr, _) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS_CPLX(arg, Arg, _) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(round, Round, _) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(floor, Floor, _) -EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(ceil, Ceil, _) - -#define EIGEN_MKL_VML_DECLARE_POW_CALL(EIGENOP, VMLOP, EIGENTYPE, VMLTYPE, VMLMODE) \ - template< typename DstXprType, typename SrcXprNested, typename Plain> \ - struct Assignment, SrcXprNested, \ - const CwiseNullaryOp,Plain> >, assign_op, \ - Dense2Dense, typename enable_if::EnableVml>::type> { \ - typedef CwiseBinaryOp, SrcXprNested, \ - const CwiseNullaryOp,Plain> > SrcXprType; \ - static void run(DstXprType &dst, const SrcXprType &src, const assign_op &/*func*/) { \ - eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols()); \ - VMLTYPE exponent = reinterpret_cast(src.rhs().functor().m_other); \ - if(vml_assign_traits::Traversal==LinearTraversal) \ - { \ - VMLOP( dst.size(), (const VMLTYPE*)src.lhs().data(), exponent, \ - (VMLTYPE*)dst.data() EIGEN_PP_EXPAND(EIGEN_VMLMODE_EXPAND_##VMLMODE) ); \ - } else { \ - const Index outerSize = dst.outerSize(); \ - for(Index outer = 0; outer < outerSize; ++outer) { \ - const EIGENTYPE *src_ptr = src.IsRowMajor ? &(src.lhs().coeffRef(outer,0)) : \ - &(src.lhs().coeffRef(0, outer)); \ - EIGENTYPE *dst_ptr = dst.IsRowMajor ? &(dst.coeffRef(outer,0)) : &(dst.coeffRef(0, outer)); \ - VMLOP( dst.innerSize(), (const VMLTYPE*)src_ptr, exponent, \ - (VMLTYPE*)dst_ptr EIGEN_PP_EXPAND(EIGEN_VMLMODE_EXPAND_##VMLMODE)); \ - } \ - } \ - } \ - }; - -EIGEN_MKL_VML_DECLARE_POW_CALL(pow, vmsPowx, float, float, LA) -EIGEN_MKL_VML_DECLARE_POW_CALL(pow, vmdPowx, double, double, LA) -EIGEN_MKL_VML_DECLARE_POW_CALL(pow, vmcPowx, scomplex, MKL_Complex8, LA) -EIGEN_MKL_VML_DECLARE_POW_CALL(pow, vmzPowx, dcomplex, MKL_Complex16, LA) - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_ASSIGN_VML_H diff --git a/include/Rivet/Math/eigen3/src/Core/ForceAlignedAccess.h b/include/Rivet/Math/eigen3/src/Core/ForceAlignedAccess.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Core/ForceAlignedAccess.h +++ /dev/null @@ -1,146 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2009-2010 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_FORCEALIGNEDACCESS_H -#define EIGEN_FORCEALIGNEDACCESS_H - -namespace Eigen { - -/** \class ForceAlignedAccess - * \ingroup Core_Module - * - * \brief Enforce aligned packet loads and stores regardless of what is requested - * - * \param ExpressionType the type of the object of which we are forcing aligned packet access - * - * This class is the return type of MatrixBase::forceAlignedAccess() - * and most of the time this is the only way it is used. - * - * \sa MatrixBase::forceAlignedAccess() - */ - -namespace internal { -template -struct traits > : public traits -{}; -} - -template class ForceAlignedAccess - : public internal::dense_xpr_base< ForceAlignedAccess >::type -{ - public: - - typedef typename internal::dense_xpr_base::type Base; - EIGEN_DENSE_PUBLIC_INTERFACE(ForceAlignedAccess) - - EIGEN_DEVICE_FUNC explicit inline ForceAlignedAccess(const ExpressionType& matrix) : m_expression(matrix) {} - - EIGEN_DEVICE_FUNC inline Index rows() const { return m_expression.rows(); } - EIGEN_DEVICE_FUNC inline Index cols() const { return m_expression.cols(); } - EIGEN_DEVICE_FUNC inline Index outerStride() const { return m_expression.outerStride(); } - EIGEN_DEVICE_FUNC inline Index innerStride() const { return m_expression.innerStride(); } - - EIGEN_DEVICE_FUNC inline const CoeffReturnType coeff(Index row, Index col) const - { - return m_expression.coeff(row, col); - } - - EIGEN_DEVICE_FUNC inline Scalar& coeffRef(Index row, Index col) - { - return m_expression.const_cast_derived().coeffRef(row, col); - } - - EIGEN_DEVICE_FUNC inline const CoeffReturnType coeff(Index index) const - { - return m_expression.coeff(index); - } - - EIGEN_DEVICE_FUNC inline Scalar& coeffRef(Index index) - { - return m_expression.const_cast_derived().coeffRef(index); - } - - template - inline const PacketScalar packet(Index row, Index col) const - { - return m_expression.template packet(row, col); - } - - template - inline void writePacket(Index row, Index col, const PacketScalar& x) - { - m_expression.const_cast_derived().template writePacket(row, col, x); - } - - template - inline const PacketScalar packet(Index index) const - { - return m_expression.template packet(index); - } - - template - inline void writePacket(Index index, const PacketScalar& x) - { - m_expression.const_cast_derived().template writePacket(index, x); - } - - EIGEN_DEVICE_FUNC operator const ExpressionType&() const { return m_expression; } - - protected: - const ExpressionType& m_expression; - - private: - ForceAlignedAccess& operator=(const ForceAlignedAccess&); -}; - -/** \returns an expression of *this with forced aligned access - * \sa forceAlignedAccessIf(),class ForceAlignedAccess - */ -template -inline const ForceAlignedAccess -MatrixBase::forceAlignedAccess() const -{ - return ForceAlignedAccess(derived()); -} - -/** \returns an expression of *this with forced aligned access - * \sa forceAlignedAccessIf(), class ForceAlignedAccess - */ -template -inline ForceAlignedAccess -MatrixBase::forceAlignedAccess() -{ - return ForceAlignedAccess(derived()); -} - -/** \returns an expression of *this with forced aligned access if \a Enable is true. - * \sa forceAlignedAccess(), class ForceAlignedAccess - */ -template -template -inline typename internal::add_const_on_value_type,Derived&>::type>::type -MatrixBase::forceAlignedAccessIf() const -{ - return derived(); // FIXME This should not work but apparently is never used -} - -/** \returns an expression of *this with forced aligned access if \a Enable is true. - * \sa forceAlignedAccess(), class ForceAlignedAccess - */ -template -template -inline typename internal::conditional,Derived&>::type -MatrixBase::forceAlignedAccessIf() -{ - return derived(); // FIXME This should not work but apparently is never used -} - -} // end namespace Eigen - -#endif // EIGEN_FORCEALIGNEDACCESS_H diff --git a/include/Rivet/Math/eigen3/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h b/include/Rivet/Math/eigen3/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to BLAS F77 - * Level 3 BLAS SYRK/HERK implementation. - ******************************************************************************** -*/ - -#ifndef EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_BLAS_H -#define EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_BLAS_H - -namespace Eigen { - -namespace internal { - -template -struct general_matrix_matrix_rankupdate : - general_matrix_matrix_triangular_product< - Index,Scalar,AStorageOrder,ConjugateA,Scalar,AStorageOrder,ConjugateA,ResStorageOrder,UpLo,BuiltIn> {}; - - -// try to go to BLAS specialization -#define EIGEN_BLAS_RANKUPDATE_SPECIALIZE(Scalar) \ -template \ -struct general_matrix_matrix_triangular_product { \ - static EIGEN_STRONG_INLINE void run(Index size, Index depth,const Scalar* lhs, Index lhsStride, \ - const Scalar* rhs, Index rhsStride, Scalar* res, Index resStride, Scalar alpha, level3_blocking& blocking) \ - { \ - if ( lhs==rhs && ((UpLo&(Lower|Upper)==UpLo)) ) { \ - general_matrix_matrix_rankupdate \ - ::run(size,depth,lhs,lhsStride,rhs,rhsStride,res,resStride,alpha,blocking); \ - } else { \ - general_matrix_matrix_triangular_product \ - ::run(size,depth,lhs,lhsStride,rhs,rhsStride,res,resStride,alpha,blocking); \ - } \ - } \ -}; - -EIGEN_BLAS_RANKUPDATE_SPECIALIZE(double) -EIGEN_BLAS_RANKUPDATE_SPECIALIZE(float) -// TODO handle complex cases -// EIGEN_BLAS_RANKUPDATE_SPECIALIZE(dcomplex) -// EIGEN_BLAS_RANKUPDATE_SPECIALIZE(scomplex) - -// SYRK for float/double -#define EIGEN_BLAS_RANKUPDATE_R(EIGTYPE, BLASTYPE, BLASFUNC) \ -template \ -struct general_matrix_matrix_rankupdate { \ - enum { \ - IsLower = (UpLo&Lower) == Lower, \ - LowUp = IsLower ? Lower : Upper, \ - conjA = ((AStorageOrder==ColMajor) && ConjugateA) ? 1 : 0 \ - }; \ - static EIGEN_STRONG_INLINE void run(Index size, Index depth,const EIGTYPE* lhs, Index lhsStride, \ - const EIGTYPE* /*rhs*/, Index /*rhsStride*/, EIGTYPE* res, Index resStride, EIGTYPE alpha, level3_blocking& /*blocking*/) \ - { \ - /* typedef Matrix MatrixRhs;*/ \ -\ - BlasIndex lda=convert_index(lhsStride), ldc=convert_index(resStride), n=convert_index(size), k=convert_index(depth); \ - char uplo=((IsLower) ? 'L' : 'U'), trans=((AStorageOrder==RowMajor) ? 'T':'N'); \ - EIGTYPE beta(1); \ - BLASFUNC(&uplo, &trans, &n, &k, &numext::real_ref(alpha), lhs, &lda, &numext::real_ref(beta), res, &ldc); \ - } \ -}; - -// HERK for complex data -#define EIGEN_BLAS_RANKUPDATE_C(EIGTYPE, BLASTYPE, RTYPE, BLASFUNC) \ -template \ -struct general_matrix_matrix_rankupdate { \ - enum { \ - IsLower = (UpLo&Lower) == Lower, \ - LowUp = IsLower ? Lower : Upper, \ - conjA = (((AStorageOrder==ColMajor) && ConjugateA) || ((AStorageOrder==RowMajor) && !ConjugateA)) ? 1 : 0 \ - }; \ - static EIGEN_STRONG_INLINE void run(Index size, Index depth,const EIGTYPE* lhs, Index lhsStride, \ - const EIGTYPE* /*rhs*/, Index /*rhsStride*/, EIGTYPE* res, Index resStride, EIGTYPE alpha, level3_blocking& /*blocking*/) \ - { \ - typedef Matrix MatrixType; \ -\ - BlasIndex lda=convert_index(lhsStride), ldc=convert_index(resStride), n=convert_index(size), k=convert_index(depth); \ - char uplo=((IsLower) ? 'L' : 'U'), trans=((AStorageOrder==RowMajor) ? 'C':'N'); \ - RTYPE alpha_, beta_; \ - const EIGTYPE* a_ptr; \ -\ - alpha_ = alpha.real(); \ - beta_ = 1.0; \ -/* Copy with conjugation in some cases*/ \ - MatrixType a; \ - if (conjA) { \ - Map > mapA(lhs,n,k,OuterStride<>(lhsStride)); \ - a = mapA.conjugate(); \ - lda = a.outerStride(); \ - a_ptr = a.data(); \ - } else a_ptr=lhs; \ - BLASFUNC(&uplo, &trans, &n, &k, &alpha_, (BLASTYPE*)a_ptr, &lda, &beta_, (BLASTYPE*)res, &ldc); \ - } \ -}; - - -EIGEN_BLAS_RANKUPDATE_R(double, double, dsyrk_) -EIGEN_BLAS_RANKUPDATE_R(float, float, ssyrk_) - -// TODO hanlde complex cases -// EIGEN_BLAS_RANKUPDATE_C(dcomplex, double, double, zherk_) -// EIGEN_BLAS_RANKUPDATE_C(scomplex, float, float, cherk_) - - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_BLAS_H diff --git a/include/Rivet/Math/eigen3/src/Core/products/GeneralMatrixMatrix_BLAS.h b/include/Rivet/Math/eigen3/src/Core/products/GeneralMatrixMatrix_BLAS.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Core/products/GeneralMatrixMatrix_BLAS.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to BLAS F77 - * General matrix-matrix product functionality based on ?GEMM. - ******************************************************************************** -*/ - -#ifndef EIGEN_GENERAL_MATRIX_MATRIX_BLAS_H -#define EIGEN_GENERAL_MATRIX_MATRIX_BLAS_H - -namespace Eigen { - -namespace internal { - -/********************************************************************** -* This file implements general matrix-matrix multiplication using BLAS -* gemm function via partial specialization of -* general_matrix_matrix_product::run(..) method for float, double, -* std::complex and std::complex types -**********************************************************************/ - -// gemm specialization - -#define GEMM_SPECIALIZATION(EIGTYPE, EIGPREFIX, BLASTYPE, BLASPREFIX) \ -template< \ - typename Index, \ - int LhsStorageOrder, bool ConjugateLhs, \ - int RhsStorageOrder, bool ConjugateRhs> \ -struct general_matrix_matrix_product \ -{ \ -typedef gebp_traits Traits; \ -\ -static void run(Index rows, Index cols, Index depth, \ - const EIGTYPE* _lhs, Index lhsStride, \ - const EIGTYPE* _rhs, Index rhsStride, \ - EIGTYPE* res, Index resStride, \ - EIGTYPE alpha, \ - level3_blocking& /*blocking*/, \ - GemmParallelInfo* /*info = 0*/) \ -{ \ - using std::conj; \ -\ - char transa, transb; \ - BlasIndex m, n, k, lda, ldb, ldc; \ - const EIGTYPE *a, *b; \ - EIGTYPE beta(1); \ - MatrixX##EIGPREFIX a_tmp, b_tmp; \ -\ -/* Set transpose options */ \ - transa = (LhsStorageOrder==RowMajor) ? ((ConjugateLhs) ? 'C' : 'T') : 'N'; \ - transb = (RhsStorageOrder==RowMajor) ? ((ConjugateRhs) ? 'C' : 'T') : 'N'; \ -\ -/* Set m, n, k */ \ - m = convert_index(rows); \ - n = convert_index(cols); \ - k = convert_index(depth); \ -\ -/* Set lda, ldb, ldc */ \ - lda = convert_index(lhsStride); \ - ldb = convert_index(rhsStride); \ - ldc = convert_index(resStride); \ -\ -/* Set a, b, c */ \ - if ((LhsStorageOrder==ColMajor) && (ConjugateLhs)) { \ - Map > lhs(_lhs,m,k,OuterStride<>(lhsStride)); \ - a_tmp = lhs.conjugate(); \ - a = a_tmp.data(); \ - lda = convert_index(a_tmp.outerStride()); \ - } else a = _lhs; \ -\ - if ((RhsStorageOrder==ColMajor) && (ConjugateRhs)) { \ - Map > rhs(_rhs,k,n,OuterStride<>(rhsStride)); \ - b_tmp = rhs.conjugate(); \ - b = b_tmp.data(); \ - ldb = convert_index(b_tmp.outerStride()); \ - } else b = _rhs; \ -\ - BLASPREFIX##gemm_(&transa, &transb, &m, &n, &k, &numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, &numext::real_ref(beta), (BLASTYPE*)res, &ldc); \ -}}; - -GEMM_SPECIALIZATION(double, d, double, d) -GEMM_SPECIALIZATION(float, f, float, s) -GEMM_SPECIALIZATION(dcomplex, cd, double, z) -GEMM_SPECIALIZATION(scomplex, cf, float, c) - -} // end namespase internal - -} // end namespace Eigen - -#endif // EIGEN_GENERAL_MATRIX_MATRIX_BLAS_H diff --git a/include/Rivet/Math/eigen3/src/Core/products/GeneralMatrixVector_BLAS.h b/include/Rivet/Math/eigen3/src/Core/products/GeneralMatrixVector_BLAS.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Core/products/GeneralMatrixVector_BLAS.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to BLAS F77 - * General matrix-vector product functionality based on ?GEMV. - ******************************************************************************** -*/ - -#ifndef EIGEN_GENERAL_MATRIX_VECTOR_BLAS_H -#define EIGEN_GENERAL_MATRIX_VECTOR_BLAS_H - -namespace Eigen { - -namespace internal { - -/********************************************************************** -* This file implements general matrix-vector multiplication using BLAS -* gemv function via partial specialization of -* general_matrix_vector_product::run(..) method for float, double, -* std::complex and std::complex types -**********************************************************************/ - -// gemv specialization - -template -struct general_matrix_vector_product_gemv; - -#define EIGEN_BLAS_GEMV_SPECIALIZE(Scalar) \ -template \ -struct general_matrix_vector_product,ColMajor,ConjugateLhs,Scalar,const_blas_data_mapper,ConjugateRhs,Specialized> { \ -static void run( \ - Index rows, Index cols, \ - const const_blas_data_mapper &lhs, \ - const const_blas_data_mapper &rhs, \ - Scalar* res, Index resIncr, Scalar alpha) \ -{ \ - if (ConjugateLhs) { \ - general_matrix_vector_product,ColMajor,ConjugateLhs,Scalar,const_blas_data_mapper,ConjugateRhs,BuiltIn>::run( \ - rows, cols, lhs, rhs, res, resIncr, alpha); \ - } else { \ - general_matrix_vector_product_gemv::run( \ - rows, cols, lhs.data(), lhs.stride(), rhs.data(), rhs.stride(), res, resIncr, alpha); \ - } \ -} \ -}; \ -template \ -struct general_matrix_vector_product,RowMajor,ConjugateLhs,Scalar,const_blas_data_mapper,ConjugateRhs,Specialized> { \ -static void run( \ - Index rows, Index cols, \ - const const_blas_data_mapper &lhs, \ - const const_blas_data_mapper &rhs, \ - Scalar* res, Index resIncr, Scalar alpha) \ -{ \ - general_matrix_vector_product_gemv::run( \ - rows, cols, lhs.data(), lhs.stride(), rhs.data(), rhs.stride(), res, resIncr, alpha); \ -} \ -}; \ - -EIGEN_BLAS_GEMV_SPECIALIZE(double) -EIGEN_BLAS_GEMV_SPECIALIZE(float) -EIGEN_BLAS_GEMV_SPECIALIZE(dcomplex) -EIGEN_BLAS_GEMV_SPECIALIZE(scomplex) - -#define EIGEN_BLAS_GEMV_SPECIALIZATION(EIGTYPE,BLASTYPE,BLASPREFIX) \ -template \ -struct general_matrix_vector_product_gemv \ -{ \ -typedef Matrix GEMVVector;\ -\ -static void run( \ - Index rows, Index cols, \ - const EIGTYPE* lhs, Index lhsStride, \ - const EIGTYPE* rhs, Index rhsIncr, \ - EIGTYPE* res, Index resIncr, EIGTYPE alpha) \ -{ \ - BlasIndex m=convert_index(rows), n=convert_index(cols), \ - lda=convert_index(lhsStride), incx=convert_index(rhsIncr), incy=convert_index(resIncr); \ - const EIGTYPE beta(1); \ - const EIGTYPE *x_ptr; \ - char trans=(LhsStorageOrder==ColMajor) ? 'N' : (ConjugateLhs) ? 'C' : 'T'; \ - if (LhsStorageOrder==RowMajor) { \ - m = convert_index(cols); \ - n = convert_index(rows); \ - }\ - GEMVVector x_tmp; \ - if (ConjugateRhs) { \ - Map > map_x(rhs,cols,1,InnerStride<>(incx)); \ - x_tmp=map_x.conjugate(); \ - x_ptr=x_tmp.data(); \ - incx=1; \ - } else x_ptr=rhs; \ - BLASPREFIX##gemv_(&trans, &m, &n, &numext::real_ref(alpha), (const BLASTYPE*)lhs, &lda, (const BLASTYPE*)x_ptr, &incx, &numext::real_ref(beta), (BLASTYPE*)res, &incy); \ -}\ -}; - -EIGEN_BLAS_GEMV_SPECIALIZATION(double, double, d) -EIGEN_BLAS_GEMV_SPECIALIZATION(float, float, s) -EIGEN_BLAS_GEMV_SPECIALIZATION(dcomplex, double, z) -EIGEN_BLAS_GEMV_SPECIALIZATION(scomplex, float, c) - -} // end namespase internal - -} // end namespace Eigen - -#endif // EIGEN_GENERAL_MATRIX_VECTOR_BLAS_H diff --git a/include/Rivet/Math/eigen3/src/Core/products/SelfadjointMatrixMatrix_BLAS.h b/include/Rivet/Math/eigen3/src/Core/products/SelfadjointMatrixMatrix_BLAS.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +++ /dev/null @@ -1,275 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - ******************************************************************************** - * Content : Eigen bindings to BLAS F77 - * Self adjoint matrix * matrix product functionality based on ?SYMM/?HEMM. - ******************************************************************************** -*/ - -#ifndef EIGEN_SELFADJOINT_MATRIX_MATRIX_BLAS_H -#define EIGEN_SELFADJOINT_MATRIX_MATRIX_BLAS_H - -namespace Eigen { - -namespace internal { - - -/* Optimized selfadjoint matrix * matrix (?SYMM/?HEMM) product */ - -#define EIGEN_BLAS_SYMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASPREFIX) \ -template \ -struct product_selfadjoint_matrix \ -{\ -\ - static void run( \ - Index rows, Index cols, \ - const EIGTYPE* _lhs, Index lhsStride, \ - const EIGTYPE* _rhs, Index rhsStride, \ - EIGTYPE* res, Index resStride, \ - EIGTYPE alpha, level3_blocking& /*blocking*/) \ - { \ - char side='L', uplo='L'; \ - BlasIndex m, n, lda, ldb, ldc; \ - const EIGTYPE *a, *b; \ - EIGTYPE beta(1); \ - MatrixX##EIGPREFIX b_tmp; \ -\ -/* Set transpose options */ \ -/* Set m, n, k */ \ - m = convert_index(rows); \ - n = convert_index(cols); \ -\ -/* Set lda, ldb, ldc */ \ - lda = convert_index(lhsStride); \ - ldb = convert_index(rhsStride); \ - ldc = convert_index(resStride); \ -\ -/* Set a, b, c */ \ - if (LhsStorageOrder==RowMajor) uplo='U'; \ - a = _lhs; \ -\ - if (RhsStorageOrder==RowMajor) { \ - Map > rhs(_rhs,n,m,OuterStride<>(rhsStride)); \ - b_tmp = rhs.adjoint(); \ - b = b_tmp.data(); \ - ldb = convert_index(b_tmp.outerStride()); \ - } else b = _rhs; \ -\ - BLASPREFIX##symm_(&side, &uplo, &m, &n, &numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, &numext::real_ref(beta), (BLASTYPE*)res, &ldc); \ -\ - } \ -}; - - -#define EIGEN_BLAS_HEMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASPREFIX) \ -template \ -struct product_selfadjoint_matrix \ -{\ - static void run( \ - Index rows, Index cols, \ - const EIGTYPE* _lhs, Index lhsStride, \ - const EIGTYPE* _rhs, Index rhsStride, \ - EIGTYPE* res, Index resStride, \ - EIGTYPE alpha, level3_blocking& /*blocking*/) \ - { \ - char side='L', uplo='L'; \ - BlasIndex m, n, lda, ldb, ldc; \ - const EIGTYPE *a, *b; \ - EIGTYPE beta(1); \ - MatrixX##EIGPREFIX b_tmp; \ - Matrix a_tmp; \ -\ -/* Set transpose options */ \ -/* Set m, n, k */ \ - m = convert_index(rows); \ - n = convert_index(cols); \ -\ -/* Set lda, ldb, ldc */ \ - lda = convert_index(lhsStride); \ - ldb = convert_index(rhsStride); \ - ldc = convert_index(resStride); \ -\ -/* Set a, b, c */ \ - if (((LhsStorageOrder==ColMajor) && ConjugateLhs) || ((LhsStorageOrder==RowMajor) && (!ConjugateLhs))) { \ - Map, 0, OuterStride<> > lhs(_lhs,m,m,OuterStride<>(lhsStride)); \ - a_tmp = lhs.conjugate(); \ - a = a_tmp.data(); \ - lda = convert_index(a_tmp.outerStride()); \ - } else a = _lhs; \ - if (LhsStorageOrder==RowMajor) uplo='U'; \ -\ - if (RhsStorageOrder==ColMajor && (!ConjugateRhs)) { \ - b = _rhs; } \ - else { \ - if (RhsStorageOrder==ColMajor && ConjugateRhs) { \ - Map > rhs(_rhs,m,n,OuterStride<>(rhsStride)); \ - b_tmp = rhs.conjugate(); \ - } else \ - if (ConjugateRhs) { \ - Map > rhs(_rhs,n,m,OuterStride<>(rhsStride)); \ - b_tmp = rhs.adjoint(); \ - } else { \ - Map > rhs(_rhs,n,m,OuterStride<>(rhsStride)); \ - b_tmp = rhs.transpose(); \ - } \ - b = b_tmp.data(); \ - ldb = convert_index(b_tmp.outerStride()); \ - } \ -\ - BLASPREFIX##hemm_(&side, &uplo, &m, &n, &numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, &numext::real_ref(beta), (BLASTYPE*)res, &ldc); \ -\ - } \ -}; - -EIGEN_BLAS_SYMM_L(double, double, d, d) -EIGEN_BLAS_SYMM_L(float, float, f, s) -EIGEN_BLAS_HEMM_L(dcomplex, double, cd, z) -EIGEN_BLAS_HEMM_L(scomplex, float, cf, c) - - -/* Optimized matrix * selfadjoint matrix (?SYMM/?HEMM) product */ - -#define EIGEN_BLAS_SYMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASPREFIX) \ -template \ -struct product_selfadjoint_matrix \ -{\ -\ - static void run( \ - Index rows, Index cols, \ - const EIGTYPE* _lhs, Index lhsStride, \ - const EIGTYPE* _rhs, Index rhsStride, \ - EIGTYPE* res, Index resStride, \ - EIGTYPE alpha, level3_blocking& /*blocking*/) \ - { \ - char side='R', uplo='L'; \ - BlasIndex m, n, lda, ldb, ldc; \ - const EIGTYPE *a, *b; \ - EIGTYPE beta(1); \ - MatrixX##EIGPREFIX b_tmp; \ -\ -/* Set m, n, k */ \ - m = convert_index(rows); \ - n = convert_index(cols); \ -\ -/* Set lda, ldb, ldc */ \ - lda = convert_index(rhsStride); \ - ldb = convert_index(lhsStride); \ - ldc = convert_index(resStride); \ -\ -/* Set a, b, c */ \ - if (RhsStorageOrder==RowMajor) uplo='U'; \ - a = _rhs; \ -\ - if (LhsStorageOrder==RowMajor) { \ - Map > lhs(_lhs,n,m,OuterStride<>(rhsStride)); \ - b_tmp = lhs.adjoint(); \ - b = b_tmp.data(); \ - ldb = convert_index(b_tmp.outerStride()); \ - } else b = _lhs; \ -\ - BLASPREFIX##symm_(&side, &uplo, &m, &n, &numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, &numext::real_ref(beta), (BLASTYPE*)res, &ldc); \ -\ - } \ -}; - - -#define EIGEN_BLAS_HEMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASPREFIX) \ -template \ -struct product_selfadjoint_matrix \ -{\ - static void run( \ - Index rows, Index cols, \ - const EIGTYPE* _lhs, Index lhsStride, \ - const EIGTYPE* _rhs, Index rhsStride, \ - EIGTYPE* res, Index resStride, \ - EIGTYPE alpha, level3_blocking& /*blocking*/) \ - { \ - char side='R', uplo='L'; \ - BlasIndex m, n, lda, ldb, ldc; \ - const EIGTYPE *a, *b; \ - EIGTYPE beta(1); \ - MatrixX##EIGPREFIX b_tmp; \ - Matrix a_tmp; \ -\ -/* Set m, n, k */ \ - m = convert_index(rows); \ - n = convert_index(cols); \ -\ -/* Set lda, ldb, ldc */ \ - lda = convert_index(rhsStride); \ - ldb = convert_index(lhsStride); \ - ldc = convert_index(resStride); \ -\ -/* Set a, b, c */ \ - if (((RhsStorageOrder==ColMajor) && ConjugateRhs) || ((RhsStorageOrder==RowMajor) && (!ConjugateRhs))) { \ - Map, 0, OuterStride<> > rhs(_rhs,n,n,OuterStride<>(rhsStride)); \ - a_tmp = rhs.conjugate(); \ - a = a_tmp.data(); \ - lda = convert_index(a_tmp.outerStride()); \ - } else a = _rhs; \ - if (RhsStorageOrder==RowMajor) uplo='U'; \ -\ - if (LhsStorageOrder==ColMajor && (!ConjugateLhs)) { \ - b = _lhs; } \ - else { \ - if (LhsStorageOrder==ColMajor && ConjugateLhs) { \ - Map > lhs(_lhs,m,n,OuterStride<>(lhsStride)); \ - b_tmp = lhs.conjugate(); \ - } else \ - if (ConjugateLhs) { \ - Map > lhs(_lhs,n,m,OuterStride<>(lhsStride)); \ - b_tmp = lhs.adjoint(); \ - } else { \ - Map > lhs(_lhs,n,m,OuterStride<>(lhsStride)); \ - b_tmp = lhs.transpose(); \ - } \ - b = b_tmp.data(); \ - ldb = convert_index(b_tmp.outerStride()); \ - } \ -\ - BLASPREFIX##hemm_(&side, &uplo, &m, &n, &numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, &numext::real_ref(beta), (BLASTYPE*)res, &ldc); \ - } \ -}; - -EIGEN_BLAS_SYMM_R(double, double, d, d) -EIGEN_BLAS_SYMM_R(float, float, f, s) -EIGEN_BLAS_HEMM_R(dcomplex, double, cd, z) -EIGEN_BLAS_HEMM_R(scomplex, float, cf, c) - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_SELFADJOINT_MATRIX_MATRIX_BLAS_H diff --git a/include/Rivet/Math/eigen3/src/Core/products/SelfadjointMatrixVector_BLAS.h b/include/Rivet/Math/eigen3/src/Core/products/SelfadjointMatrixVector_BLAS.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Core/products/SelfadjointMatrixVector_BLAS.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to BLAS F77 - * Selfadjoint matrix-vector product functionality based on ?SYMV/HEMV. - ******************************************************************************** -*/ - -#ifndef EIGEN_SELFADJOINT_MATRIX_VECTOR_BLAS_H -#define EIGEN_SELFADJOINT_MATRIX_VECTOR_BLAS_H - -namespace Eigen { - -namespace internal { - -/********************************************************************** -* This file implements selfadjoint matrix-vector multiplication using BLAS -**********************************************************************/ - -// symv/hemv specialization - -template -struct selfadjoint_matrix_vector_product_symv : - selfadjoint_matrix_vector_product {}; - -#define EIGEN_BLAS_SYMV_SPECIALIZE(Scalar) \ -template \ -struct selfadjoint_matrix_vector_product { \ -static void run( \ - Index size, const Scalar* lhs, Index lhsStride, \ - const Scalar* _rhs, Scalar* res, Scalar alpha) { \ - enum {\ - IsColMajor = StorageOrder==ColMajor \ - }; \ - if (IsColMajor == ConjugateLhs) {\ - selfadjoint_matrix_vector_product::run( \ - size, lhs, lhsStride, _rhs, res, alpha); \ - } else {\ - selfadjoint_matrix_vector_product_symv::run( \ - size, lhs, lhsStride, _rhs, res, alpha); \ - }\ - } \ -}; \ - -EIGEN_BLAS_SYMV_SPECIALIZE(double) -EIGEN_BLAS_SYMV_SPECIALIZE(float) -EIGEN_BLAS_SYMV_SPECIALIZE(dcomplex) -EIGEN_BLAS_SYMV_SPECIALIZE(scomplex) - -#define EIGEN_BLAS_SYMV_SPECIALIZATION(EIGTYPE,BLASTYPE,BLASFUNC) \ -template \ -struct selfadjoint_matrix_vector_product_symv \ -{ \ -typedef Matrix SYMVVector;\ -\ -static void run( \ -Index size, const EIGTYPE* lhs, Index lhsStride, \ -const EIGTYPE* _rhs, EIGTYPE* res, EIGTYPE alpha) \ -{ \ - enum {\ - IsRowMajor = StorageOrder==RowMajor ? 1 : 0, \ - IsLower = UpLo == Lower ? 1 : 0 \ - }; \ - BlasIndex n=convert_index(size), lda=convert_index(lhsStride), incx=1, incy=1; \ - EIGTYPE beta(1); \ - const EIGTYPE *x_ptr; \ - char uplo=(IsRowMajor) ? (IsLower ? 'U' : 'L') : (IsLower ? 'L' : 'U'); \ - SYMVVector x_tmp; \ - if (ConjugateRhs) { \ - Map map_x(_rhs,size,1); \ - x_tmp=map_x.conjugate(); \ - x_ptr=x_tmp.data(); \ - } else x_ptr=_rhs; \ - BLASFUNC(&uplo, &n, &numext::real_ref(alpha), (const BLASTYPE*)lhs, &lda, (const BLASTYPE*)x_ptr, &incx, &numext::real_ref(beta), (BLASTYPE*)res, &incy); \ -}\ -}; - -EIGEN_BLAS_SYMV_SPECIALIZATION(double, double, dsymv_) -EIGEN_BLAS_SYMV_SPECIALIZATION(float, float, ssymv_) -EIGEN_BLAS_SYMV_SPECIALIZATION(dcomplex, double, zhemv_) -EIGEN_BLAS_SYMV_SPECIALIZATION(scomplex, float, chemv_) - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_SELFADJOINT_MATRIX_VECTOR_BLAS_H diff --git a/include/Rivet/Math/eigen3/src/Core/products/TriangularMatrixMatrix_BLAS.h b/include/Rivet/Math/eigen3/src/Core/products/TriangularMatrixMatrix_BLAS.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Core/products/TriangularMatrixMatrix_BLAS.h +++ /dev/null @@ -1,302 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to BLAS F77 - * Triangular matrix * matrix product functionality based on ?TRMM. - ******************************************************************************** -*/ - -#ifndef EIGEN_TRIANGULAR_MATRIX_MATRIX_BLAS_H -#define EIGEN_TRIANGULAR_MATRIX_MATRIX_BLAS_H - -namespace Eigen { - -namespace internal { - - -template -struct product_triangular_matrix_matrix_trmm : - product_triangular_matrix_matrix {}; - - -// try to go to BLAS specialization -#define EIGEN_BLAS_TRMM_SPECIALIZE(Scalar, LhsIsTriangular) \ -template \ -struct product_triangular_matrix_matrix { \ - static inline void run(Index _rows, Index _cols, Index _depth, const Scalar* _lhs, Index lhsStride,\ - const Scalar* _rhs, Index rhsStride, Scalar* res, Index resStride, Scalar alpha, level3_blocking& blocking) { \ - product_triangular_matrix_matrix_trmm::run( \ - _rows, _cols, _depth, _lhs, lhsStride, _rhs, rhsStride, res, resStride, alpha, blocking); \ - } \ -}; - -EIGEN_BLAS_TRMM_SPECIALIZE(double, true) -EIGEN_BLAS_TRMM_SPECIALIZE(double, false) -EIGEN_BLAS_TRMM_SPECIALIZE(dcomplex, true) -EIGEN_BLAS_TRMM_SPECIALIZE(dcomplex, false) -EIGEN_BLAS_TRMM_SPECIALIZE(float, true) -EIGEN_BLAS_TRMM_SPECIALIZE(float, false) -EIGEN_BLAS_TRMM_SPECIALIZE(scomplex, true) -EIGEN_BLAS_TRMM_SPECIALIZE(scomplex, false) - -// implements col-major += alpha * op(triangular) * op(general) -#define EIGEN_BLAS_TRMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASPREFIX) \ -template \ -struct product_triangular_matrix_matrix_trmm \ -{ \ - enum { \ - IsLower = (Mode&Lower) == Lower, \ - SetDiag = (Mode&(ZeroDiag|UnitDiag)) ? 0 : 1, \ - IsUnitDiag = (Mode&UnitDiag) ? 1 : 0, \ - IsZeroDiag = (Mode&ZeroDiag) ? 1 : 0, \ - LowUp = IsLower ? Lower : Upper, \ - conjA = ((LhsStorageOrder==ColMajor) && ConjugateLhs) ? 1 : 0 \ - }; \ -\ - static void run( \ - Index _rows, Index _cols, Index _depth, \ - const EIGTYPE* _lhs, Index lhsStride, \ - const EIGTYPE* _rhs, Index rhsStride, \ - EIGTYPE* res, Index resStride, \ - EIGTYPE alpha, level3_blocking& blocking) \ - { \ - Index diagSize = (std::min)(_rows,_depth); \ - Index rows = IsLower ? _rows : diagSize; \ - Index depth = IsLower ? diagSize : _depth; \ - Index cols = _cols; \ -\ - typedef Matrix MatrixLhs; \ - typedef Matrix MatrixRhs; \ -\ -/* Non-square case - doesn't fit to BLAS ?TRMM. Fall to default triangular product or call BLAS ?GEMM*/ \ - if (rows != depth) { \ -\ - /* FIXME handle mkl_domain_get_max_threads */ \ - /*int nthr = mkl_domain_get_max_threads(EIGEN_BLAS_DOMAIN_BLAS);*/ int nthr = 1;\ -\ - if (((nthr==1) && (((std::max)(rows,depth)-diagSize)/(double)diagSize < 0.5))) { \ - /* Most likely no benefit to call TRMM or GEMM from BLAS */ \ - product_triangular_matrix_matrix::run( \ - _rows, _cols, _depth, _lhs, lhsStride, _rhs, rhsStride, res, resStride, alpha, blocking); \ - /*std::cout << "TRMM_L: A is not square! Go to Eigen TRMM implementation!\n";*/ \ - } else { \ - /* Make sense to call GEMM */ \ - Map > lhsMap(_lhs,rows,depth,OuterStride<>(lhsStride)); \ - MatrixLhs aa_tmp=lhsMap.template triangularView(); \ - BlasIndex aStride = convert_index(aa_tmp.outerStride()); \ - gemm_blocking_space gemm_blocking(_rows,_cols,_depth, 1, true); \ - general_matrix_matrix_product::run( \ - rows, cols, depth, aa_tmp.data(), aStride, _rhs, rhsStride, res, resStride, alpha, gemm_blocking, 0); \ -\ - /*std::cout << "TRMM_L: A is not square! Go to BLAS GEMM implementation! " << nthr<<" \n";*/ \ - } \ - return; \ - } \ - char side = 'L', transa, uplo, diag = 'N'; \ - EIGTYPE *b; \ - const EIGTYPE *a; \ - BlasIndex m, n, lda, ldb; \ -\ -/* Set m, n */ \ - m = convert_index(diagSize); \ - n = convert_index(cols); \ -\ -/* Set trans */ \ - transa = (LhsStorageOrder==RowMajor) ? ((ConjugateLhs) ? 'C' : 'T') : 'N'; \ -\ -/* Set b, ldb */ \ - Map > rhs(_rhs,depth,cols,OuterStride<>(rhsStride)); \ - MatrixX##EIGPREFIX b_tmp; \ -\ - if (ConjugateRhs) b_tmp = rhs.conjugate(); else b_tmp = rhs; \ - b = b_tmp.data(); \ - ldb = convert_index(b_tmp.outerStride()); \ -\ -/* Set uplo */ \ - uplo = IsLower ? 'L' : 'U'; \ - if (LhsStorageOrder==RowMajor) uplo = (uplo == 'L') ? 'U' : 'L'; \ -/* Set a, lda */ \ - Map > lhs(_lhs,rows,depth,OuterStride<>(lhsStride)); \ - MatrixLhs a_tmp; \ -\ - if ((conjA!=0) || (SetDiag==0)) { \ - if (conjA) a_tmp = lhs.conjugate(); else a_tmp = lhs; \ - if (IsZeroDiag) \ - a_tmp.diagonal().setZero(); \ - else if (IsUnitDiag) \ - a_tmp.diagonal().setOnes();\ - a = a_tmp.data(); \ - lda = convert_index(a_tmp.outerStride()); \ - } else { \ - a = _lhs; \ - lda = convert_index(lhsStride); \ - } \ - /*std::cout << "TRMM_L: A is square! Go to BLAS TRMM implementation! \n";*/ \ -/* call ?trmm*/ \ - BLASPREFIX##trmm_(&side, &uplo, &transa, &diag, &m, &n, &numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (BLASTYPE*)b, &ldb); \ -\ -/* Add op(a_triangular)*b into res*/ \ - Map > res_tmp(res,rows,cols,OuterStride<>(resStride)); \ - res_tmp=res_tmp+b_tmp; \ - } \ -}; - -EIGEN_BLAS_TRMM_L(double, double, d, d) -EIGEN_BLAS_TRMM_L(dcomplex, double, cd, z) -EIGEN_BLAS_TRMM_L(float, float, f, s) -EIGEN_BLAS_TRMM_L(scomplex, float, cf, c) - -// implements col-major += alpha * op(general) * op(triangular) -#define EIGEN_BLAS_TRMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASPREFIX) \ -template \ -struct product_triangular_matrix_matrix_trmm \ -{ \ - enum { \ - IsLower = (Mode&Lower) == Lower, \ - SetDiag = (Mode&(ZeroDiag|UnitDiag)) ? 0 : 1, \ - IsUnitDiag = (Mode&UnitDiag) ? 1 : 0, \ - IsZeroDiag = (Mode&ZeroDiag) ? 1 : 0, \ - LowUp = IsLower ? Lower : Upper, \ - conjA = ((RhsStorageOrder==ColMajor) && ConjugateRhs) ? 1 : 0 \ - }; \ -\ - static void run( \ - Index _rows, Index _cols, Index _depth, \ - const EIGTYPE* _lhs, Index lhsStride, \ - const EIGTYPE* _rhs, Index rhsStride, \ - EIGTYPE* res, Index resStride, \ - EIGTYPE alpha, level3_blocking& blocking) \ - { \ - Index diagSize = (std::min)(_cols,_depth); \ - Index rows = _rows; \ - Index depth = IsLower ? _depth : diagSize; \ - Index cols = IsLower ? diagSize : _cols; \ -\ - typedef Matrix MatrixLhs; \ - typedef Matrix MatrixRhs; \ -\ -/* Non-square case - doesn't fit to BLAS ?TRMM. Fall to default triangular product or call BLAS ?GEMM*/ \ - if (cols != depth) { \ -\ - int nthr = 1 /*mkl_domain_get_max_threads(EIGEN_BLAS_DOMAIN_BLAS)*/; \ -\ - if ((nthr==1) && (((std::max)(cols,depth)-diagSize)/(double)diagSize < 0.5)) { \ - /* Most likely no benefit to call TRMM or GEMM from BLAS*/ \ - product_triangular_matrix_matrix::run( \ - _rows, _cols, _depth, _lhs, lhsStride, _rhs, rhsStride, res, resStride, alpha, blocking); \ - /*std::cout << "TRMM_R: A is not square! Go to Eigen TRMM implementation!\n";*/ \ - } else { \ - /* Make sense to call GEMM */ \ - Map > rhsMap(_rhs,depth,cols, OuterStride<>(rhsStride)); \ - MatrixRhs aa_tmp=rhsMap.template triangularView(); \ - BlasIndex aStride = convert_index(aa_tmp.outerStride()); \ - gemm_blocking_space gemm_blocking(_rows,_cols,_depth, 1, true); \ - general_matrix_matrix_product::run( \ - rows, cols, depth, _lhs, lhsStride, aa_tmp.data(), aStride, res, resStride, alpha, gemm_blocking, 0); \ -\ - /*std::cout << "TRMM_R: A is not square! Go to BLAS GEMM implementation! " << nthr<<" \n";*/ \ - } \ - return; \ - } \ - char side = 'R', transa, uplo, diag = 'N'; \ - EIGTYPE *b; \ - const EIGTYPE *a; \ - BlasIndex m, n, lda, ldb; \ -\ -/* Set m, n */ \ - m = convert_index(rows); \ - n = convert_index(diagSize); \ -\ -/* Set trans */ \ - transa = (RhsStorageOrder==RowMajor) ? ((ConjugateRhs) ? 'C' : 'T') : 'N'; \ -\ -/* Set b, ldb */ \ - Map > lhs(_lhs,rows,depth,OuterStride<>(lhsStride)); \ - MatrixX##EIGPREFIX b_tmp; \ -\ - if (ConjugateLhs) b_tmp = lhs.conjugate(); else b_tmp = lhs; \ - b = b_tmp.data(); \ - ldb = convert_index(b_tmp.outerStride()); \ -\ -/* Set uplo */ \ - uplo = IsLower ? 'L' : 'U'; \ - if (RhsStorageOrder==RowMajor) uplo = (uplo == 'L') ? 'U' : 'L'; \ -/* Set a, lda */ \ - Map > rhs(_rhs,depth,cols, OuterStride<>(rhsStride)); \ - MatrixRhs a_tmp; \ -\ - if ((conjA!=0) || (SetDiag==0)) { \ - if (conjA) a_tmp = rhs.conjugate(); else a_tmp = rhs; \ - if (IsZeroDiag) \ - a_tmp.diagonal().setZero(); \ - else if (IsUnitDiag) \ - a_tmp.diagonal().setOnes();\ - a = a_tmp.data(); \ - lda = convert_index(a_tmp.outerStride()); \ - } else { \ - a = _rhs; \ - lda = convert_index(rhsStride); \ - } \ - /*std::cout << "TRMM_R: A is square! Go to BLAS TRMM implementation! \n";*/ \ -/* call ?trmm*/ \ - BLASPREFIX##trmm_(&side, &uplo, &transa, &diag, &m, &n, &numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (BLASTYPE*)b, &ldb); \ -\ -/* Add op(a_triangular)*b into res*/ \ - Map > res_tmp(res,rows,cols,OuterStride<>(resStride)); \ - res_tmp=res_tmp+b_tmp; \ - } \ -}; - -EIGEN_BLAS_TRMM_R(double, double, d, d) -EIGEN_BLAS_TRMM_R(dcomplex, double, cd, z) -EIGEN_BLAS_TRMM_R(float, float, f, s) -EIGEN_BLAS_TRMM_R(scomplex, float, cf, c) - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_TRIANGULAR_MATRIX_MATRIX_BLAS_H diff --git a/include/Rivet/Math/eigen3/src/Core/products/TriangularMatrixVector_BLAS.h b/include/Rivet/Math/eigen3/src/Core/products/TriangularMatrixVector_BLAS.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Core/products/TriangularMatrixVector_BLAS.h +++ /dev/null @@ -1,241 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to BLAS F77 - * Triangular matrix-vector product functionality based on ?TRMV. - ******************************************************************************** -*/ - -#ifndef EIGEN_TRIANGULAR_MATRIX_VECTOR_BLAS_H -#define EIGEN_TRIANGULAR_MATRIX_VECTOR_BLAS_H - -namespace Eigen { - -namespace internal { - -/********************************************************************** -* This file implements triangular matrix-vector multiplication using BLAS -**********************************************************************/ - -// trmv/hemv specialization - -template -struct triangular_matrix_vector_product_trmv : - triangular_matrix_vector_product {}; - -#define EIGEN_BLAS_TRMV_SPECIALIZE(Scalar) \ -template \ -struct triangular_matrix_vector_product { \ - static void run(Index _rows, Index _cols, const Scalar* _lhs, Index lhsStride, \ - const Scalar* _rhs, Index rhsIncr, Scalar* _res, Index resIncr, Scalar alpha) { \ - triangular_matrix_vector_product_trmv::run( \ - _rows, _cols, _lhs, lhsStride, _rhs, rhsIncr, _res, resIncr, alpha); \ - } \ -}; \ -template \ -struct triangular_matrix_vector_product { \ - static void run(Index _rows, Index _cols, const Scalar* _lhs, Index lhsStride, \ - const Scalar* _rhs, Index rhsIncr, Scalar* _res, Index resIncr, Scalar alpha) { \ - triangular_matrix_vector_product_trmv::run( \ - _rows, _cols, _lhs, lhsStride, _rhs, rhsIncr, _res, resIncr, alpha); \ - } \ -}; - -EIGEN_BLAS_TRMV_SPECIALIZE(double) -EIGEN_BLAS_TRMV_SPECIALIZE(float) -EIGEN_BLAS_TRMV_SPECIALIZE(dcomplex) -EIGEN_BLAS_TRMV_SPECIALIZE(scomplex) - -// implements col-major: res += alpha * op(triangular) * vector -#define EIGEN_BLAS_TRMV_CM(EIGTYPE, BLASTYPE, EIGPREFIX, BLASPREFIX) \ -template \ -struct triangular_matrix_vector_product_trmv { \ - enum { \ - IsLower = (Mode&Lower) == Lower, \ - SetDiag = (Mode&(ZeroDiag|UnitDiag)) ? 0 : 1, \ - IsUnitDiag = (Mode&UnitDiag) ? 1 : 0, \ - IsZeroDiag = (Mode&ZeroDiag) ? 1 : 0, \ - LowUp = IsLower ? Lower : Upper \ - }; \ - static void run(Index _rows, Index _cols, const EIGTYPE* _lhs, Index lhsStride, \ - const EIGTYPE* _rhs, Index rhsIncr, EIGTYPE* _res, Index resIncr, EIGTYPE alpha) \ - { \ - if (ConjLhs || IsZeroDiag) { \ - triangular_matrix_vector_product::run( \ - _rows, _cols, _lhs, lhsStride, _rhs, rhsIncr, _res, resIncr, alpha); \ - return; \ - }\ - Index size = (std::min)(_rows,_cols); \ - Index rows = IsLower ? _rows : size; \ - Index cols = IsLower ? size : _cols; \ -\ - typedef VectorX##EIGPREFIX VectorRhs; \ - EIGTYPE *x, *y;\ -\ -/* Set x*/ \ - Map > rhs(_rhs,cols,InnerStride<>(rhsIncr)); \ - VectorRhs x_tmp; \ - if (ConjRhs) x_tmp = rhs.conjugate(); else x_tmp = rhs; \ - x = x_tmp.data(); \ -\ -/* Square part handling */\ -\ - char trans, uplo, diag; \ - BlasIndex m, n, lda, incx, incy; \ - EIGTYPE const *a; \ - EIGTYPE beta(1); \ -\ -/* Set m, n */ \ - n = convert_index(size); \ - lda = convert_index(lhsStride); \ - incx = 1; \ - incy = convert_index(resIncr); \ -\ -/* Set uplo, trans and diag*/ \ - trans = 'N'; \ - uplo = IsLower ? 'L' : 'U'; \ - diag = IsUnitDiag ? 'U' : 'N'; \ -\ -/* call ?TRMV*/ \ - BLASPREFIX##trmv_(&uplo, &trans, &diag, &n, (const BLASTYPE*)_lhs, &lda, (BLASTYPE*)x, &incx); \ -\ -/* Add op(a_tr)rhs into res*/ \ - BLASPREFIX##axpy_(&n, &numext::real_ref(alpha),(const BLASTYPE*)x, &incx, (BLASTYPE*)_res, &incy); \ -/* Non-square case - doesn't fit to BLAS ?TRMV. Fall to default triangular product*/ \ - if (size<(std::max)(rows,cols)) { \ - if (ConjRhs) x_tmp = rhs.conjugate(); else x_tmp = rhs; \ - x = x_tmp.data(); \ - if (size(rows-size); \ - n = convert_index(size); \ - } \ - else { \ - x += size; \ - y = _res; \ - a = _lhs + size*lda; \ - m = convert_index(size); \ - n = convert_index(cols-size); \ - } \ - BLASPREFIX##gemv_(&trans, &m, &n, &numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)x, &incx, &numext::real_ref(beta), (BLASTYPE*)y, &incy); \ - } \ - } \ -}; - -EIGEN_BLAS_TRMV_CM(double, double, d, d) -EIGEN_BLAS_TRMV_CM(dcomplex, double, cd, z) -EIGEN_BLAS_TRMV_CM(float, float, f, s) -EIGEN_BLAS_TRMV_CM(scomplex, float, cf, c) - -// implements row-major: res += alpha * op(triangular) * vector -#define EIGEN_BLAS_TRMV_RM(EIGTYPE, BLASTYPE, EIGPREFIX, BLASPREFIX) \ -template \ -struct triangular_matrix_vector_product_trmv { \ - enum { \ - IsLower = (Mode&Lower) == Lower, \ - SetDiag = (Mode&(ZeroDiag|UnitDiag)) ? 0 : 1, \ - IsUnitDiag = (Mode&UnitDiag) ? 1 : 0, \ - IsZeroDiag = (Mode&ZeroDiag) ? 1 : 0, \ - LowUp = IsLower ? Lower : Upper \ - }; \ - static void run(Index _rows, Index _cols, const EIGTYPE* _lhs, Index lhsStride, \ - const EIGTYPE* _rhs, Index rhsIncr, EIGTYPE* _res, Index resIncr, EIGTYPE alpha) \ - { \ - if (IsZeroDiag) { \ - triangular_matrix_vector_product::run( \ - _rows, _cols, _lhs, lhsStride, _rhs, rhsIncr, _res, resIncr, alpha); \ - return; \ - }\ - Index size = (std::min)(_rows,_cols); \ - Index rows = IsLower ? _rows : size; \ - Index cols = IsLower ? size : _cols; \ -\ - typedef VectorX##EIGPREFIX VectorRhs; \ - EIGTYPE *x, *y;\ -\ -/* Set x*/ \ - Map > rhs(_rhs,cols,InnerStride<>(rhsIncr)); \ - VectorRhs x_tmp; \ - if (ConjRhs) x_tmp = rhs.conjugate(); else x_tmp = rhs; \ - x = x_tmp.data(); \ -\ -/* Square part handling */\ -\ - char trans, uplo, diag; \ - BlasIndex m, n, lda, incx, incy; \ - EIGTYPE const *a; \ - EIGTYPE beta(1); \ -\ -/* Set m, n */ \ - n = convert_index(size); \ - lda = convert_index(lhsStride); \ - incx = 1; \ - incy = convert_index(resIncr); \ -\ -/* Set uplo, trans and diag*/ \ - trans = ConjLhs ? 'C' : 'T'; \ - uplo = IsLower ? 'U' : 'L'; \ - diag = IsUnitDiag ? 'U' : 'N'; \ -\ -/* call ?TRMV*/ \ - BLASPREFIX##trmv_(&uplo, &trans, &diag, &n, (const BLASTYPE*)_lhs, &lda, (BLASTYPE*)x, &incx); \ -\ -/* Add op(a_tr)rhs into res*/ \ - BLASPREFIX##axpy_(&n, &numext::real_ref(alpha),(const BLASTYPE*)x, &incx, (BLASTYPE*)_res, &incy); \ -/* Non-square case - doesn't fit to BLAS ?TRMV. Fall to default triangular product*/ \ - if (size<(std::max)(rows,cols)) { \ - if (ConjRhs) x_tmp = rhs.conjugate(); else x_tmp = rhs; \ - x = x_tmp.data(); \ - if (size(rows-size); \ - n = convert_index(size); \ - } \ - else { \ - x += size; \ - y = _res; \ - a = _lhs + size; \ - m = convert_index(size); \ - n = convert_index(cols-size); \ - } \ - BLASPREFIX##gemv_(&trans, &n, &m, &numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)x, &incx, &numext::real_ref(beta), (BLASTYPE*)y, &incy); \ - } \ - } \ -}; - -EIGEN_BLAS_TRMV_RM(double, double, d, d) -EIGEN_BLAS_TRMV_RM(dcomplex, double, cd, z) -EIGEN_BLAS_TRMV_RM(float, float, f, s) -EIGEN_BLAS_TRMV_RM(scomplex, float, cf, c) - -} // end namespase internal - -} // end namespace Eigen - -#endif // EIGEN_TRIANGULAR_MATRIX_VECTOR_BLAS_H diff --git a/include/Rivet/Math/eigen3/src/Core/products/TriangularSolverMatrix_BLAS.h b/include/Rivet/Math/eigen3/src/Core/products/TriangularSolverMatrix_BLAS.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Core/products/TriangularSolverMatrix_BLAS.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to BLAS F77 - * Triangular matrix * matrix product functionality based on ?TRMM. - ******************************************************************************** -*/ - -#ifndef EIGEN_TRIANGULAR_SOLVER_MATRIX_BLAS_H -#define EIGEN_TRIANGULAR_SOLVER_MATRIX_BLAS_H - -namespace Eigen { - -namespace internal { - -// implements LeftSide op(triangular)^-1 * general -#define EIGEN_BLAS_TRSM_L(EIGTYPE, BLASTYPE, BLASPREFIX) \ -template \ -struct triangular_solve_matrix \ -{ \ - enum { \ - IsLower = (Mode&Lower) == Lower, \ - IsUnitDiag = (Mode&UnitDiag) ? 1 : 0, \ - IsZeroDiag = (Mode&ZeroDiag) ? 1 : 0, \ - conjA = ((TriStorageOrder==ColMajor) && Conjugate) ? 1 : 0 \ - }; \ - static void run( \ - Index size, Index otherSize, \ - const EIGTYPE* _tri, Index triStride, \ - EIGTYPE* _other, Index otherStride, level3_blocking& /*blocking*/) \ - { \ - BlasIndex m = convert_index(size), n = convert_index(otherSize), lda, ldb; \ - char side = 'L', uplo, diag='N', transa; \ - /* Set alpha_ */ \ - EIGTYPE alpha(1); \ - ldb = convert_index(otherStride);\ -\ - const EIGTYPE *a; \ -/* Set trans */ \ - transa = (TriStorageOrder==RowMajor) ? ((Conjugate) ? 'C' : 'T') : 'N'; \ -/* Set uplo */ \ - uplo = IsLower ? 'L' : 'U'; \ - if (TriStorageOrder==RowMajor) uplo = (uplo == 'L') ? 'U' : 'L'; \ -/* Set a, lda */ \ - typedef Matrix MatrixTri; \ - Map > tri(_tri,size,size,OuterStride<>(triStride)); \ - MatrixTri a_tmp; \ -\ - if (conjA) { \ - a_tmp = tri.conjugate(); \ - a = a_tmp.data(); \ - lda = convert_index(a_tmp.outerStride()); \ - } else { \ - a = _tri; \ - lda = convert_index(triStride); \ - } \ - if (IsUnitDiag) diag='U'; \ -/* call ?trsm*/ \ - BLASPREFIX##trsm_(&side, &uplo, &transa, &diag, &m, &n, &numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (BLASTYPE*)_other, &ldb); \ - } \ -}; - -EIGEN_BLAS_TRSM_L(double, double, d) -EIGEN_BLAS_TRSM_L(dcomplex, double, z) -EIGEN_BLAS_TRSM_L(float, float, s) -EIGEN_BLAS_TRSM_L(scomplex, float, c) - - -// implements RightSide general * op(triangular)^-1 -#define EIGEN_BLAS_TRSM_R(EIGTYPE, BLASTYPE, BLASPREFIX) \ -template \ -struct triangular_solve_matrix \ -{ \ - enum { \ - IsLower = (Mode&Lower) == Lower, \ - IsUnitDiag = (Mode&UnitDiag) ? 1 : 0, \ - IsZeroDiag = (Mode&ZeroDiag) ? 1 : 0, \ - conjA = ((TriStorageOrder==ColMajor) && Conjugate) ? 1 : 0 \ - }; \ - static void run( \ - Index size, Index otherSize, \ - const EIGTYPE* _tri, Index triStride, \ - EIGTYPE* _other, Index otherStride, level3_blocking& /*blocking*/) \ - { \ - BlasIndex m = convert_index(otherSize), n = convert_index(size), lda, ldb; \ - char side = 'R', uplo, diag='N', transa; \ - /* Set alpha_ */ \ - EIGTYPE alpha(1); \ - ldb = convert_index(otherStride);\ -\ - const EIGTYPE *a; \ -/* Set trans */ \ - transa = (TriStorageOrder==RowMajor) ? ((Conjugate) ? 'C' : 'T') : 'N'; \ -/* Set uplo */ \ - uplo = IsLower ? 'L' : 'U'; \ - if (TriStorageOrder==RowMajor) uplo = (uplo == 'L') ? 'U' : 'L'; \ -/* Set a, lda */ \ - typedef Matrix MatrixTri; \ - Map > tri(_tri,size,size,OuterStride<>(triStride)); \ - MatrixTri a_tmp; \ -\ - if (conjA) { \ - a_tmp = tri.conjugate(); \ - a = a_tmp.data(); \ - lda = convert_index(a_tmp.outerStride()); \ - } else { \ - a = _tri; \ - lda = convert_index(triStride); \ - } \ - if (IsUnitDiag) diag='U'; \ -/* call ?trsm*/ \ - BLASPREFIX##trsm_(&side, &uplo, &transa, &diag, &m, &n, &numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (BLASTYPE*)_other, &ldb); \ - /*std::cout << "TRMS_L specialization!\n";*/ \ - } \ -}; - -EIGEN_BLAS_TRSM_R(double, double, d) -EIGEN_BLAS_TRSM_R(dcomplex, double, z) -EIGEN_BLAS_TRSM_R(float, float, s) -EIGEN_BLAS_TRSM_R(scomplex, float, c) - - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_TRIANGULAR_SOLVER_MATRIX_BLAS_H diff --git a/include/Rivet/Math/eigen3/src/Eigenvalues/ComplexSchur_LAPACKE.h b/include/Rivet/Math/eigen3/src/Eigenvalues/ComplexSchur_LAPACKE.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Eigenvalues/ComplexSchur_LAPACKE.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to LAPACKe - * Complex Schur needed to complex unsymmetrical eigenvalues/eigenvectors. - ******************************************************************************** -*/ - -#ifndef EIGEN_COMPLEX_SCHUR_LAPACKE_H -#define EIGEN_COMPLEX_SCHUR_LAPACKE_H - -namespace Eigen { - -/** \internal Specialization for the data types supported by LAPACKe */ - -#define EIGEN_LAPACKE_SCHUR_COMPLEX(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX, LAPACKE_PREFIX_U, EIGCOLROW, LAPACKE_COLROW) \ -template<> template inline \ -ComplexSchur >& \ -ComplexSchur >::compute(const EigenBase& matrix, bool computeU) \ -{ \ - typedef Matrix MatrixType; \ - typedef MatrixType::RealScalar RealScalar; \ - typedef std::complex ComplexScalar; \ -\ - eigen_assert(matrix.cols() == matrix.rows()); \ -\ - m_matUisUptodate = false; \ - if(matrix.cols() == 1) \ - { \ - m_matT = matrix.derived().template cast(); \ - if(computeU) m_matU = ComplexMatrixType::Identity(1,1); \ - m_info = Success; \ - m_isInitialized = true; \ - m_matUisUptodate = computeU; \ - return *this; \ - } \ - lapack_int n = internal::convert_index(matrix.cols()), sdim, info; \ - lapack_int matrix_order = LAPACKE_COLROW; \ - char jobvs, sort='N'; \ - LAPACK_##LAPACKE_PREFIX_U##_SELECT1 select = 0; \ - jobvs = (computeU) ? 'V' : 'N'; \ - m_matU.resize(n, n); \ - lapack_int ldvs = internal::convert_index(m_matU.outerStride()); \ - m_matT = matrix; \ - lapack_int lda = internal::convert_index(m_matT.outerStride()); \ - Matrix w; \ - w.resize(n, 1);\ - info = LAPACKE_##LAPACKE_PREFIX##gees( matrix_order, jobvs, sort, select, n, (LAPACKE_TYPE*)m_matT.data(), lda, &sdim, (LAPACKE_TYPE*)w.data(), (LAPACKE_TYPE*)m_matU.data(), ldvs ); \ - if(info == 0) \ - m_info = Success; \ - else \ - m_info = NoConvergence; \ -\ - m_isInitialized = true; \ - m_matUisUptodate = computeU; \ - return *this; \ -\ -} - -EIGEN_LAPACKE_SCHUR_COMPLEX(dcomplex, lapack_complex_double, z, Z, ColMajor, LAPACK_COL_MAJOR) -EIGEN_LAPACKE_SCHUR_COMPLEX(scomplex, lapack_complex_float, c, C, ColMajor, LAPACK_COL_MAJOR) -EIGEN_LAPACKE_SCHUR_COMPLEX(dcomplex, lapack_complex_double, z, Z, RowMajor, LAPACK_ROW_MAJOR) -EIGEN_LAPACKE_SCHUR_COMPLEX(scomplex, lapack_complex_float, c, C, RowMajor, LAPACK_ROW_MAJOR) - -} // end namespace Eigen - -#endif // EIGEN_COMPLEX_SCHUR_LAPACKE_H diff --git a/include/Rivet/Math/eigen3/src/Eigenvalues/RealSchur_LAPACKE.h b/include/Rivet/Math/eigen3/src/Eigenvalues/RealSchur_LAPACKE.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Eigenvalues/RealSchur_LAPACKE.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to LAPACKe - * Real Schur needed to real unsymmetrical eigenvalues/eigenvectors. - ******************************************************************************** -*/ - -#ifndef EIGEN_REAL_SCHUR_LAPACKE_H -#define EIGEN_REAL_SCHUR_LAPACKE_H - -namespace Eigen { - -/** \internal Specialization for the data types supported by LAPACKe */ - -#define EIGEN_LAPACKE_SCHUR_REAL(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX, LAPACKE_PREFIX_U, EIGCOLROW, LAPACKE_COLROW) \ -template<> template inline \ -RealSchur >& \ -RealSchur >::compute(const EigenBase& matrix, bool computeU) \ -{ \ - eigen_assert(matrix.cols() == matrix.rows()); \ -\ - lapack_int n = internal::convert_index(matrix.cols()), sdim, info; \ - lapack_int matrix_order = LAPACKE_COLROW; \ - char jobvs, sort='N'; \ - LAPACK_##LAPACKE_PREFIX_U##_SELECT2 select = 0; \ - jobvs = (computeU) ? 'V' : 'N'; \ - m_matU.resize(n, n); \ - lapack_int ldvs = internal::convert_index(m_matU.outerStride()); \ - m_matT = matrix; \ - lapack_int lda = internal::convert_index(m_matT.outerStride()); \ - Matrix wr, wi; \ - wr.resize(n, 1); wi.resize(n, 1); \ - info = LAPACKE_##LAPACKE_PREFIX##gees( matrix_order, jobvs, sort, select, n, (LAPACKE_TYPE*)m_matT.data(), lda, &sdim, (LAPACKE_TYPE*)wr.data(), (LAPACKE_TYPE*)wi.data(), (LAPACKE_TYPE*)m_matU.data(), ldvs ); \ - if(info == 0) \ - m_info = Success; \ - else \ - m_info = NoConvergence; \ -\ - m_isInitialized = true; \ - m_matUisUptodate = computeU; \ - return *this; \ -\ -} - -EIGEN_LAPACKE_SCHUR_REAL(double, double, d, D, ColMajor, LAPACK_COL_MAJOR) -EIGEN_LAPACKE_SCHUR_REAL(float, float, s, S, ColMajor, LAPACK_COL_MAJOR) -EIGEN_LAPACKE_SCHUR_REAL(double, double, d, D, RowMajor, LAPACK_ROW_MAJOR) -EIGEN_LAPACKE_SCHUR_REAL(float, float, s, S, RowMajor, LAPACK_ROW_MAJOR) - -} // end namespace Eigen - -#endif // EIGEN_REAL_SCHUR_LAPACKE_H diff --git a/include/Rivet/Math/eigen3/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h b/include/Rivet/Math/eigen3/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to LAPACKe - * Self-adjoint eigenvalues/eigenvectors. - ******************************************************************************** -*/ - -#ifndef EIGEN_SAEIGENSOLVER_LAPACKE_H -#define EIGEN_SAEIGENSOLVER_LAPACKE_H - -namespace Eigen { - -/** \internal Specialization for the data types supported by LAPACKe */ - -#define EIGEN_LAPACKE_EIG_SELFADJ(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, EIGCOLROW, LAPACKE_COLROW ) \ -template<> template inline \ -SelfAdjointEigenSolver >& \ -SelfAdjointEigenSolver >::compute(const EigenBase& matrix, int options) \ -{ \ - eigen_assert(matrix.cols() == matrix.rows()); \ - eigen_assert((options&~(EigVecMask|GenEigMask))==0 \ - && (options&EigVecMask)!=EigVecMask \ - && "invalid option parameter"); \ - bool computeEigenvectors = (options&ComputeEigenvectors)==ComputeEigenvectors; \ - lapack_int n = internal::convert_index(matrix.cols()), lda, matrix_order, info; \ - m_eivalues.resize(n,1); \ - m_subdiag.resize(n-1); \ - m_eivec = matrix; \ -\ - if(n==1) \ - { \ - m_eivalues.coeffRef(0,0) = numext::real(m_eivec.coeff(0,0)); \ - if(computeEigenvectors) m_eivec.setOnes(n,n); \ - m_info = Success; \ - m_isInitialized = true; \ - m_eigenvectorsOk = computeEigenvectors; \ - return *this; \ - } \ -\ - lda = internal::convert_index(m_eivec.outerStride()); \ - matrix_order=LAPACKE_COLROW; \ - char jobz, uplo='L'/*, range='A'*/; \ - jobz = computeEigenvectors ? 'V' : 'N'; \ -\ - info = LAPACKE_##LAPACKE_NAME( matrix_order, jobz, uplo, n, (LAPACKE_TYPE*)m_eivec.data(), lda, (LAPACKE_RTYPE*)m_eivalues.data() ); \ - m_info = (info==0) ? Success : NoConvergence; \ - m_isInitialized = true; \ - m_eigenvectorsOk = computeEigenvectors; \ - return *this; \ -} - - -EIGEN_LAPACKE_EIG_SELFADJ(double, double, double, dsyev, ColMajor, LAPACK_COL_MAJOR) -EIGEN_LAPACKE_EIG_SELFADJ(float, float, float, ssyev, ColMajor, LAPACK_COL_MAJOR) -EIGEN_LAPACKE_EIG_SELFADJ(dcomplex, lapack_complex_double, double, zheev, ColMajor, LAPACK_COL_MAJOR) -EIGEN_LAPACKE_EIG_SELFADJ(scomplex, lapack_complex_float, float, cheev, ColMajor, LAPACK_COL_MAJOR) - -EIGEN_LAPACKE_EIG_SELFADJ(double, double, double, dsyev, RowMajor, LAPACK_ROW_MAJOR) -EIGEN_LAPACKE_EIG_SELFADJ(float, float, float, ssyev, RowMajor, LAPACK_ROW_MAJOR) -EIGEN_LAPACKE_EIG_SELFADJ(dcomplex, lapack_complex_double, double, zheev, RowMajor, LAPACK_ROW_MAJOR) -EIGEN_LAPACKE_EIG_SELFADJ(scomplex, lapack_complex_float, float, cheev, RowMajor, LAPACK_ROW_MAJOR) - -} // end namespace Eigen - -#endif // EIGEN_SAEIGENSOLVER_H diff --git a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/BasicPreconditioners.h b/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/BasicPreconditioners.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/BasicPreconditioners.h +++ /dev/null @@ -1,226 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2011-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_BASIC_PRECONDITIONERS_H -#define EIGEN_BASIC_PRECONDITIONERS_H - -namespace Eigen { - -/** \ingroup IterativeLinearSolvers_Module - * \brief A preconditioner based on the digonal entries - * - * This class allows to approximately solve for A.x = b problems assuming A is a diagonal matrix. - * In other words, this preconditioner neglects all off diagonal entries and, in Eigen's language, solves for: - \code - A.diagonal().asDiagonal() . x = b - \endcode - * - * \tparam _Scalar the type of the scalar. - * - * \implsparsesolverconcept - * - * This preconditioner is suitable for both selfadjoint and general problems. - * The diagonal entries are pre-inverted and stored into a dense vector. - * - * \note A variant that has yet to be implemented would attempt to preserve the norm of each column. - * - * \sa class LeastSquareDiagonalPreconditioner, class ConjugateGradient - */ -template -class DiagonalPreconditioner -{ - typedef _Scalar Scalar; - typedef Matrix Vector; - public: - typedef typename Vector::StorageIndex StorageIndex; - enum { - ColsAtCompileTime = Dynamic, - MaxColsAtCompileTime = Dynamic - }; - - DiagonalPreconditioner() : m_isInitialized(false) {} - - template - explicit DiagonalPreconditioner(const MatType& mat) : m_invdiag(mat.cols()) - { - compute(mat); - } - - Index rows() const { return m_invdiag.size(); } - Index cols() const { return m_invdiag.size(); } - - template - DiagonalPreconditioner& analyzePattern(const MatType& ) - { - return *this; - } - - template - DiagonalPreconditioner& factorize(const MatType& mat) - { - m_invdiag.resize(mat.cols()); - for(int j=0; j - DiagonalPreconditioner& compute(const MatType& mat) - { - return factorize(mat); - } - - /** \internal */ - template - void _solve_impl(const Rhs& b, Dest& x) const - { - x = m_invdiag.array() * b.array() ; - } - - template inline const Solve - solve(const MatrixBase& b) const - { - eigen_assert(m_isInitialized && "DiagonalPreconditioner is not initialized."); - eigen_assert(m_invdiag.size()==b.rows() - && "DiagonalPreconditioner::solve(): invalid number of rows of the right hand side matrix b"); - return Solve(*this, b.derived()); - } - - ComputationInfo info() { return Success; } - - protected: - Vector m_invdiag; - bool m_isInitialized; -}; - -/** \ingroup IterativeLinearSolvers_Module - * \brief Jacobi preconditioner for LeastSquaresConjugateGradient - * - * This class allows to approximately solve for A' A x = A' b problems assuming A' A is a diagonal matrix. - * In other words, this preconditioner neglects all off diagonal entries and, in Eigen's language, solves for: - \code - (A.adjoint() * A).diagonal().asDiagonal() * x = b - \endcode - * - * \tparam _Scalar the type of the scalar. - * - * \implsparsesolverconcept - * - * The diagonal entries are pre-inverted and stored into a dense vector. - * - * \sa class LeastSquaresConjugateGradient, class DiagonalPreconditioner - */ -template -class LeastSquareDiagonalPreconditioner : public DiagonalPreconditioner<_Scalar> -{ - typedef _Scalar Scalar; - typedef typename NumTraits::Real RealScalar; - typedef DiagonalPreconditioner<_Scalar> Base; - using Base::m_invdiag; - public: - - LeastSquareDiagonalPreconditioner() : Base() {} - - template - explicit LeastSquareDiagonalPreconditioner(const MatType& mat) : Base() - { - compute(mat); - } - - template - LeastSquareDiagonalPreconditioner& analyzePattern(const MatType& ) - { - return *this; - } - - template - LeastSquareDiagonalPreconditioner& factorize(const MatType& mat) - { - // Compute the inverse squared-norm of each column of mat - m_invdiag.resize(mat.cols()); - if(MatType::IsRowMajor) - { - m_invdiag.setZero(); - for(Index j=0; jRealScalar(0)) - m_invdiag(j) = RealScalar(1)/numext::real(m_invdiag(j)); - } - else - { - for(Index j=0; jRealScalar(0)) - m_invdiag(j) = RealScalar(1)/sum; - else - m_invdiag(j) = RealScalar(1); - } - } - Base::m_isInitialized = true; - return *this; - } - - template - LeastSquareDiagonalPreconditioner& compute(const MatType& mat) - { - return factorize(mat); - } - - ComputationInfo info() { return Success; } - - protected: -}; - -/** \ingroup IterativeLinearSolvers_Module - * \brief A naive preconditioner which approximates any matrix as the identity matrix - * - * \implsparsesolverconcept - * - * \sa class DiagonalPreconditioner - */ -class IdentityPreconditioner -{ - public: - - IdentityPreconditioner() {} - - template - explicit IdentityPreconditioner(const MatrixType& ) {} - - template - IdentityPreconditioner& analyzePattern(const MatrixType& ) { return *this; } - - template - IdentityPreconditioner& factorize(const MatrixType& ) { return *this; } - - template - IdentityPreconditioner& compute(const MatrixType& ) { return *this; } - - template - inline const Rhs& solve(const Rhs& b) const { return b; } - - ComputationInfo info() { return Success; } -}; - -} // end namespace Eigen - -#endif // EIGEN_BASIC_PRECONDITIONERS_H diff --git a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/BiCGSTAB.h b/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/BiCGSTAB.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/BiCGSTAB.h +++ /dev/null @@ -1,228 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2011-2014 Gael Guennebaud -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_BICGSTAB_H -#define EIGEN_BICGSTAB_H - -namespace Eigen { - -namespace internal { - -/** \internal Low-level bi conjugate gradient stabilized algorithm - * \param mat The matrix A - * \param rhs The right hand side vector b - * \param x On input and initial solution, on output the computed solution. - * \param precond A preconditioner being able to efficiently solve for an - * approximation of Ax=b (regardless of b) - * \param iters On input the max number of iteration, on output the number of performed iterations. - * \param tol_error On input the tolerance error, on output an estimation of the relative error. - * \return false in the case of numerical issue, for example a break down of BiCGSTAB. - */ -template -bool bicgstab(const MatrixType& mat, const Rhs& rhs, Dest& x, - const Preconditioner& precond, Index& iters, - typename Dest::RealScalar& tol_error) -{ - using std::sqrt; - using std::abs; - typedef typename Dest::RealScalar RealScalar; - typedef typename Dest::Scalar Scalar; - typedef Matrix VectorType; - RealScalar tol = tol_error; - Index maxIters = iters; - - Index n = mat.cols(); - VectorType r = rhs - mat * x; - VectorType r0 = r; - - RealScalar r0_sqnorm = r0.squaredNorm(); - RealScalar rhs_sqnorm = rhs.squaredNorm(); - if(rhs_sqnorm == 0) - { - x.setZero(); - return true; - } - Scalar rho = 1; - Scalar alpha = 1; - Scalar w = 1; - - VectorType v = VectorType::Zero(n), p = VectorType::Zero(n); - VectorType y(n), z(n); - VectorType kt(n), ks(n); - - VectorType s(n), t(n); - - RealScalar tol2 = tol*tol*rhs_sqnorm; - RealScalar eps2 = NumTraits::epsilon()*NumTraits::epsilon(); - Index i = 0; - Index restarts = 0; - - while ( r.squaredNorm() > tol2 && iRealScalar(0)) - w = t.dot(s) / tmp; - else - w = Scalar(0); - x += alpha * y + w * z; - r = s - w * t; - ++i; - } - tol_error = sqrt(r.squaredNorm()/rhs_sqnorm); - iters = i; - return true; -} - -} - -template< typename _MatrixType, - typename _Preconditioner = DiagonalPreconditioner > -class BiCGSTAB; - -namespace internal { - -template< typename _MatrixType, typename _Preconditioner> -struct traits > -{ - typedef _MatrixType MatrixType; - typedef _Preconditioner Preconditioner; -}; - -} - -/** \ingroup IterativeLinearSolvers_Module - * \brief A bi conjugate gradient stabilized solver for sparse square problems - * - * This class allows to solve for A.x = b sparse linear problems using a bi conjugate gradient - * stabilized algorithm. The vectors x and b can be either dense or sparse. - * - * \tparam _MatrixType the type of the sparse matrix A, can be a dense or a sparse matrix. - * \tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner - * - * \implsparsesolverconcept - * - * The maximal number of iterations and tolerance value can be controlled via the setMaxIterations() - * and setTolerance() methods. The defaults are the size of the problem for the maximal number of iterations - * and NumTraits::epsilon() for the tolerance. - * - * The tolerance corresponds to the relative residual error: |Ax-b|/|b| - * - * \b Performance: when using sparse matrices, best performance is achied for a row-major sparse matrix format. - * Moreover, in this case multi-threading can be exploited if the user code is compiled with OpenMP enabled. - * See \ref TopicMultiThreading for details. - * - * This class can be used as the direct solver classes. Here is a typical usage example: - * \include BiCGSTAB_simple.cpp - * - * By default the iterations start with x=0 as an initial guess of the solution. - * One can control the start using the solveWithGuess() method. - * - * BiCGSTAB can also be used in a matrix-free context, see the following \link MatrixfreeSolverExample example \endlink. - * - * \sa class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner - */ -template< typename _MatrixType, typename _Preconditioner> -class BiCGSTAB : public IterativeSolverBase > -{ - typedef IterativeSolverBase Base; - using Base::matrix; - using Base::m_error; - using Base::m_iterations; - using Base::m_info; - using Base::m_isInitialized; -public: - typedef _MatrixType MatrixType; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef _Preconditioner Preconditioner; - -public: - - /** Default constructor. */ - BiCGSTAB() : Base() {} - - /** Initialize the solver with matrix \a A for further \c Ax=b solving. - * - * This constructor is a shortcut for the default constructor followed - * by a call to compute(). - * - * \warning this class stores a reference to the matrix A as well as some - * precomputed values that depend on it. Therefore, if \a A is changed - * this class becomes invalid. Call compute() to update it with the new - * matrix A, or modify a copy of A. - */ - template - explicit BiCGSTAB(const EigenBase& A) : Base(A.derived()) {} - - ~BiCGSTAB() {} - - /** \internal */ - template - void _solve_with_guess_impl(const Rhs& b, Dest& x) const - { - bool failed = false; - for(Index j=0; j - void _solve_impl(const MatrixBase& b, Dest& x) const - { - x.resize(this->rows(),b.cols()); - x.setZero(); - _solve_with_guess_impl(b,x); - } - -protected: - -}; - -} // end namespace Eigen - -#endif // EIGEN_BICGSTAB_H diff --git a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/ConjugateGradient.h b/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/ConjugateGradient.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/ConjugateGradient.h +++ /dev/null @@ -1,245 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2011-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_CONJUGATE_GRADIENT_H -#define EIGEN_CONJUGATE_GRADIENT_H - -namespace Eigen { - -namespace internal { - -/** \internal Low-level conjugate gradient algorithm - * \param mat The matrix A - * \param rhs The right hand side vector b - * \param x On input and initial solution, on output the computed solution. - * \param precond A preconditioner being able to efficiently solve for an - * approximation of Ax=b (regardless of b) - * \param iters On input the max number of iteration, on output the number of performed iterations. - * \param tol_error On input the tolerance error, on output an estimation of the relative error. - */ -template -EIGEN_DONT_INLINE -void conjugate_gradient(const MatrixType& mat, const Rhs& rhs, Dest& x, - const Preconditioner& precond, Index& iters, - typename Dest::RealScalar& tol_error) -{ - using std::sqrt; - using std::abs; - typedef typename Dest::RealScalar RealScalar; - typedef typename Dest::Scalar Scalar; - typedef Matrix VectorType; - - RealScalar tol = tol_error; - Index maxIters = iters; - - Index n = mat.cols(); - - VectorType residual = rhs - mat * x; //initial residual - - RealScalar rhsNorm2 = rhs.squaredNorm(); - if(rhsNorm2 == 0) - { - x.setZero(); - iters = 0; - tol_error = 0; - return; - } - RealScalar threshold = tol*tol*rhsNorm2; - RealScalar residualNorm2 = residual.squaredNorm(); - if (residualNorm2 < threshold) - { - iters = 0; - tol_error = sqrt(residualNorm2 / rhsNorm2); - return; - } - - VectorType p(n); - p = precond.solve(residual); // initial search direction - - VectorType z(n), tmp(n); - RealScalar absNew = numext::real(residual.dot(p)); // the square of the absolute value of r scaled by invM - Index i = 0; - while(i < maxIters) - { - tmp.noalias() = mat * p; // the bottleneck of the algorithm - - Scalar alpha = absNew / p.dot(tmp); // the amount we travel on dir - x += alpha * p; // update solution - residual -= alpha * tmp; // update residual - - residualNorm2 = residual.squaredNorm(); - if(residualNorm2 < threshold) - break; - - z = precond.solve(residual); // approximately solve for "A z = residual" - - RealScalar absOld = absNew; - absNew = numext::real(residual.dot(z)); // update the absolute value of r - RealScalar beta = absNew / absOld; // calculate the Gram-Schmidt value used to create the new search direction - p = z + beta * p; // update search direction - i++; - } - tol_error = sqrt(residualNorm2 / rhsNorm2); - iters = i; -} - -} - -template< typename _MatrixType, int _UpLo=Lower, - typename _Preconditioner = DiagonalPreconditioner > -class ConjugateGradient; - -namespace internal { - -template< typename _MatrixType, int _UpLo, typename _Preconditioner> -struct traits > -{ - typedef _MatrixType MatrixType; - typedef _Preconditioner Preconditioner; -}; - -} - -/** \ingroup IterativeLinearSolvers_Module - * \brief A conjugate gradient solver for sparse (or dense) self-adjoint problems - * - * This class allows to solve for A.x = b linear problems using an iterative conjugate gradient algorithm. - * The matrix A must be selfadjoint. The matrix A and the vectors x and b can be either dense or sparse. - * - * \tparam _MatrixType the type of the matrix A, can be a dense or a sparse matrix. - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower, - * \c Upper, or \c Lower|Upper in which the full matrix entries will be considered. - * Default is \c Lower, best performance is \c Lower|Upper. - * \tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner - * - * \implsparsesolverconcept - * - * The maximal number of iterations and tolerance value can be controlled via the setMaxIterations() - * and setTolerance() methods. The defaults are the size of the problem for the maximal number of iterations - * and NumTraits::epsilon() for the tolerance. - * - * The tolerance corresponds to the relative residual error: |Ax-b|/|b| - * - * \b Performance: Even though the default value of \c _UpLo is \c Lower, significantly higher performance is - * achieved when using a complete matrix and \b Lower|Upper as the \a _UpLo template parameter. Moreover, in this - * case multi-threading can be exploited if the user code is compiled with OpenMP enabled. - * See \ref TopicMultiThreading for details. - * - * This class can be used as the direct solver classes. Here is a typical usage example: - \code - int n = 10000; - VectorXd x(n), b(n); - SparseMatrix A(n,n); - // fill A and b - ConjugateGradient, Lower|Upper> cg; - cg.compute(A); - x = cg.solve(b); - std::cout << "#iterations: " << cg.iterations() << std::endl; - std::cout << "estimated error: " << cg.error() << std::endl; - // update b, and solve again - x = cg.solve(b); - \endcode - * - * By default the iterations start with x=0 as an initial guess of the solution. - * One can control the start using the solveWithGuess() method. - * - * ConjugateGradient can also be used in a matrix-free context, see the following \link MatrixfreeSolverExample example \endlink. - * - * \sa class LeastSquaresConjugateGradient, class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner - */ -template< typename _MatrixType, int _UpLo, typename _Preconditioner> -class ConjugateGradient : public IterativeSolverBase > -{ - typedef IterativeSolverBase Base; - using Base::matrix; - using Base::m_error; - using Base::m_iterations; - using Base::m_info; - using Base::m_isInitialized; -public: - typedef _MatrixType MatrixType; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef _Preconditioner Preconditioner; - - enum { - UpLo = _UpLo - }; - -public: - - /** Default constructor. */ - ConjugateGradient() : Base() {} - - /** Initialize the solver with matrix \a A for further \c Ax=b solving. - * - * This constructor is a shortcut for the default constructor followed - * by a call to compute(). - * - * \warning this class stores a reference to the matrix A as well as some - * precomputed values that depend on it. Therefore, if \a A is changed - * this class becomes invalid. Call compute() to update it with the new - * matrix A, or modify a copy of A. - */ - template - explicit ConjugateGradient(const EigenBase& A) : Base(A.derived()) {} - - ~ConjugateGradient() {} - - /** \internal */ - template - void _solve_with_guess_impl(const Rhs& b, Dest& x) const - { - typedef typename Base::MatrixWrapper MatrixWrapper; - typedef typename Base::ActualMatrixType ActualMatrixType; - enum { - TransposeInput = (!MatrixWrapper::MatrixFree) - && (UpLo==(Lower|Upper)) - && (!MatrixType::IsRowMajor) - && (!NumTraits::IsComplex) - }; - typedef typename internal::conditional, ActualMatrixType const&>::type RowMajorWrapper; - EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(MatrixWrapper::MatrixFree,UpLo==(Lower|Upper)),MATRIX_FREE_CONJUGATE_GRADIENT_IS_COMPATIBLE_WITH_UPPER_UNION_LOWER_MODE_ONLY); - typedef typename internal::conditional::Type - >::type SelfAdjointWrapper; - m_iterations = Base::maxIterations(); - m_error = Base::m_tolerance; - - for(Index j=0; j - void _solve_impl(const MatrixBase& b, Dest& x) const - { - x.setZero(); - _solve_with_guess_impl(b.derived(),x); - } - -protected: - -}; - -} // end namespace Eigen - -#endif // EIGEN_CONJUGATE_GRADIENT_H diff --git a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/IncompleteCholesky.h b/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/IncompleteCholesky.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/IncompleteCholesky.h +++ /dev/null @@ -1,400 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// Copyright (C) 2015 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_INCOMPLETE_CHOlESKY_H -#define EIGEN_INCOMPLETE_CHOlESKY_H - -#include -#include - -namespace Eigen { -/** - * \brief Modified Incomplete Cholesky with dual threshold - * - * References : C-J. Lin and J. J. Moré, Incomplete Cholesky Factorizations with - * Limited memory, SIAM J. Sci. Comput. 21(1), pp. 24-45, 1999 - * - * \tparam Scalar the scalar type of the input matrices - * \tparam _UpLo The triangular part that will be used for the computations. It can be Lower - * or Upper. Default is Lower. - * \tparam _OrderingType The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering, - * unless EIGEN_MPL2_ONLY is defined, in which case the default is NaturalOrdering. - * - * \implsparsesolverconcept - * - * It performs the following incomplete factorization: \f$ S P A P' S \approx L L' \f$ - * where L is a lower triangular factor, S is a diagonal scaling matrix, and P is a - * fill-in reducing permutation as computed by the ordering method. - * - * \b Shifting \b strategy: Let \f$ B = S P A P' S \f$ be the scaled matrix on which the factorization is carried out, - * and \f$ \beta \f$ be the minimum value of the diagonal. If \f$ \beta > 0 \f$ then, the factorization is directly performed - * on the matrix B. Otherwise, the factorization is performed on the shifted matrix \f$ B + (\sigma+|\beta| I \f$ where - * \f$ \sigma \f$ is the initial shift value as returned and set by setInitialShift() method. The default value is \f$ \sigma = 10^{-3} \f$. - * If the factorization fails, then the shift in doubled until it succeed or a maximum of ten attempts. If it still fails, as returned by - * the info() method, then you can either increase the initial shift, or better use another preconditioning technique. - * - */ -template -#else -NaturalOrdering -#endif -> -class IncompleteCholesky : public SparseSolverBase > -{ - protected: - typedef SparseSolverBase > Base; - using Base::m_isInitialized; - public: - typedef typename NumTraits::Real RealScalar; - typedef _OrderingType OrderingType; - typedef typename OrderingType::PermutationType PermutationType; - typedef typename PermutationType::StorageIndex StorageIndex; - typedef SparseMatrix FactorType; - typedef Matrix VectorSx; - typedef Matrix VectorRx; - typedef Matrix VectorIx; - typedef std::vector > VectorList; - enum { UpLo = _UpLo }; - enum { - ColsAtCompileTime = Dynamic, - MaxColsAtCompileTime = Dynamic - }; - public: - - /** Default constructor leaving the object in a partly non-initialized stage. - * - * You must call compute() or the pair analyzePattern()/factorize() to make it valid. - * - * \sa IncompleteCholesky(const MatrixType&) - */ - IncompleteCholesky() : m_initialShift(1e-3),m_factorizationIsOk(false) {} - - /** Constructor computing the incomplete factorization for the given matrix \a matrix. - */ - template - IncompleteCholesky(const MatrixType& matrix) : m_initialShift(1e-3),m_factorizationIsOk(false) - { - compute(matrix); - } - - /** \returns number of rows of the factored matrix */ - Index rows() const { return m_L.rows(); } - - /** \returns number of columns of the factored matrix */ - Index cols() const { return m_L.cols(); } - - - /** \brief Reports whether previous computation was successful. - * - * It triggers an assertion if \c *this has not been initialized through the respective constructor, - * or a call to compute() or analyzePattern(). - * - * \returns \c Success if computation was successful, - * \c NumericalIssue if the matrix appears to be negative. - */ - ComputationInfo info() const - { - eigen_assert(m_isInitialized && "IncompleteCholesky is not initialized."); - return m_info; - } - - /** \brief Set the initial shift parameter \f$ \sigma \f$. - */ - void setInitialShift(RealScalar shift) { m_initialShift = shift; } - - /** \brief Computes the fill reducing permutation vector using the sparsity pattern of \a mat - */ - template - void analyzePattern(const MatrixType& mat) - { - OrderingType ord; - PermutationType pinv; - ord(mat.template selfadjointView(), pinv); - if(pinv.size()>0) m_perm = pinv.inverse(); - else m_perm.resize(0); - m_L.resize(mat.rows(), mat.cols()); - m_analysisIsOk = true; - m_isInitialized = true; - m_info = Success; - } - - /** \brief Performs the numerical factorization of the input matrix \a mat - * - * The method analyzePattern() or compute() must have been called beforehand - * with a matrix having the same pattern. - * - * \sa compute(), analyzePattern() - */ - template - void factorize(const MatrixType& mat); - - /** Computes or re-computes the incomplete Cholesky factorization of the input matrix \a mat - * - * It is a shortcut for a sequential call to the analyzePattern() and factorize() methods. - * - * \sa analyzePattern(), factorize() - */ - template - void compute(const MatrixType& mat) - { - analyzePattern(mat); - factorize(mat); - } - - // internal - template - void _solve_impl(const Rhs& b, Dest& x) const - { - eigen_assert(m_factorizationIsOk && "factorize() should be called first"); - if (m_perm.rows() == b.rows()) x = m_perm * b; - else x = b; - x = m_scale.asDiagonal() * x; - x = m_L.template triangularView().solve(x); - x = m_L.adjoint().template triangularView().solve(x); - x = m_scale.asDiagonal() * x; - if (m_perm.rows() == b.rows()) - x = m_perm.inverse() * x; - } - - /** \returns the sparse lower triangular factor L */ - const FactorType& matrixL() const { eigen_assert("m_factorizationIsOk"); return m_L; } - - /** \returns a vector representing the scaling factor S */ - const VectorRx& scalingS() const { eigen_assert("m_factorizationIsOk"); return m_scale; } - - /** \returns the fill-in reducing permutation P (can be empty for a natural ordering) */ - const PermutationType& permutationP() const { eigen_assert("m_analysisIsOk"); return m_perm; } - - protected: - FactorType m_L; // The lower part stored in CSC - VectorRx m_scale; // The vector for scaling the matrix - RealScalar m_initialShift; // The initial shift parameter - bool m_analysisIsOk; - bool m_factorizationIsOk; - ComputationInfo m_info; - PermutationType m_perm; - - private: - inline void updateList(Ref colPtr, Ref rowIdx, Ref vals, const Index& col, const Index& jk, VectorIx& firstElt, VectorList& listCol); -}; - -// Based on the following paper: -// C-J. Lin and J. J. Moré, Incomplete Cholesky Factorizations with -// Limited memory, SIAM J. Sci. Comput. 21(1), pp. 24-45, 1999 -// http://ftp.mcs.anl.gov/pub/tech_reports/reports/P682.pdf -template -template -void IncompleteCholesky::factorize(const _MatrixType& mat) -{ - using std::sqrt; - eigen_assert(m_analysisIsOk && "analyzePattern() should be called first"); - - // Dropping strategy : Keep only the p largest elements per column, where p is the number of elements in the column of the original matrix. Other strategies will be added - - // Apply the fill-reducing permutation computed in analyzePattern() - if (m_perm.rows() == mat.rows() ) // To detect the null permutation - { - // The temporary is needed to make sure that the diagonal entry is properly sorted - FactorType tmp(mat.rows(), mat.cols()); - tmp = mat.template selfadjointView<_UpLo>().twistedBy(m_perm); - m_L.template selfadjointView() = tmp.template selfadjointView(); - } - else - { - m_L.template selfadjointView() = mat.template selfadjointView<_UpLo>(); - } - - Index n = m_L.cols(); - Index nnz = m_L.nonZeros(); - Map vals(m_L.valuePtr(), nnz); //values - Map rowIdx(m_L.innerIndexPtr(), nnz); //Row indices - Map colPtr( m_L.outerIndexPtr(), n+1); // Pointer to the beginning of each row - VectorIx firstElt(n-1); // for each j, points to the next entry in vals that will be used in the factorization - VectorList listCol(n); // listCol(j) is a linked list of columns to update column j - VectorSx col_vals(n); // Store a nonzero values in each column - VectorIx col_irow(n); // Row indices of nonzero elements in each column - VectorIx col_pattern(n); - col_pattern.fill(-1); - StorageIndex col_nnz; - - - // Computes the scaling factors - m_scale.resize(n); - m_scale.setZero(); - for (Index j = 0; j < n; j++) - for (Index k = colPtr[j]; k < colPtr[j+1]; k++) - { - m_scale(j) += numext::abs2(vals(k)); - if(rowIdx[k]!=j) - m_scale(rowIdx[k]) += numext::abs2(vals(k)); - } - - m_scale = m_scale.cwiseSqrt().cwiseSqrt(); - - for (Index j = 0; j < n; ++j) - if(m_scale(j)>(std::numeric_limits::min)()) - m_scale(j) = RealScalar(1)/m_scale(j); - else - m_scale(j) = 1; - - // TODO disable scaling if not needed, i.e., if it is roughly uniform? (this will make solve() faster) - - // Scale and compute the shift for the matrix - RealScalar mindiag = NumTraits::highest(); - for (Index j = 0; j < n; j++) - { - for (Index k = colPtr[j]; k < colPtr[j+1]; k++) - vals[k] *= (m_scale(j)*m_scale(rowIdx[k])); - eigen_internal_assert(rowIdx[colPtr[j]]==j && "IncompleteCholesky: only the lower triangular part must be stored"); - mindiag = numext::mini(numext::real(vals[colPtr[j]]), mindiag); - } - - FactorType L_save = m_L; - - RealScalar shift = 0; - if(mindiag <= RealScalar(0.)) - shift = m_initialShift - mindiag; - - m_info = NumericalIssue; - - // Try to perform the incomplete factorization using the current shift - int iter = 0; - do - { - // Apply the shift to the diagonal elements of the matrix - for (Index j = 0; j < n; j++) - vals[colPtr[j]] += shift; - - // jki version of the Cholesky factorization - Index j=0; - for (; j < n; ++j) - { - // Left-looking factorization of the j-th column - // First, load the j-th column into col_vals - Scalar diag = vals[colPtr[j]]; // It is assumed that only the lower part is stored - col_nnz = 0; - for (Index i = colPtr[j] + 1; i < colPtr[j+1]; i++) - { - StorageIndex l = rowIdx[i]; - col_vals(col_nnz) = vals[i]; - col_irow(col_nnz) = l; - col_pattern(l) = col_nnz; - col_nnz++; - } - { - typename std::list::iterator k; - // Browse all previous columns that will update column j - for(k = listCol[j].begin(); k != listCol[j].end(); k++) - { - Index jk = firstElt(*k); // First element to use in the column - eigen_internal_assert(rowIdx[jk]==j); - Scalar v_j_jk = numext::conj(vals[jk]); - - jk += 1; - for (Index i = jk; i < colPtr[*k+1]; i++) - { - StorageIndex l = rowIdx[i]; - if(col_pattern[l]<0) - { - col_vals(col_nnz) = vals[i] * v_j_jk; - col_irow[col_nnz] = l; - col_pattern(l) = col_nnz; - col_nnz++; - } - else - col_vals(col_pattern[l]) -= vals[i] * v_j_jk; - } - updateList(colPtr,rowIdx,vals, *k, jk, firstElt, listCol); - } - } - - // Scale the current column - if(numext::real(diag) <= 0) - { - if(++iter>=10) - return; - - // increase shift - shift = numext::maxi(m_initialShift,RealScalar(2)*shift); - // restore m_L, col_pattern, and listCol - vals = Map(L_save.valuePtr(), nnz); - rowIdx = Map(L_save.innerIndexPtr(), nnz); - colPtr = Map(L_save.outerIndexPtr(), n+1); - col_pattern.fill(-1); - for(Index i=0; i cvals = col_vals.head(col_nnz); - Ref cirow = col_irow.head(col_nnz); - internal::QuickSplit(cvals,cirow, p); - // Insert the largest p elements in the matrix - Index cpt = 0; - for (Index i = colPtr[j]+1; i < colPtr[j+1]; i++) - { - vals[i] = col_vals(cpt); - rowIdx[i] = col_irow(cpt); - // restore col_pattern: - col_pattern(col_irow(cpt)) = -1; - cpt++; - } - // Get the first smallest row index and put it after the diagonal element - Index jk = colPtr(j)+1; - updateList(colPtr,rowIdx,vals,j,jk,firstElt,listCol); - } - - if(j==n) - { - m_factorizationIsOk = true; - m_info = Success; - } - } while(m_info!=Success); -} - -template -inline void IncompleteCholesky::updateList(Ref colPtr, Ref rowIdx, Ref vals, const Index& col, const Index& jk, VectorIx& firstElt, VectorList& listCol) -{ - if (jk < colPtr(col+1) ) - { - Index p = colPtr(col+1) - jk; - Index minpos; - rowIdx.segment(jk,p).minCoeff(&minpos); - minpos += jk; - if (rowIdx(minpos) != rowIdx(jk)) - { - //Swap - std::swap(rowIdx(jk),rowIdx(minpos)); - std::swap(vals(jk),vals(minpos)); - } - firstElt(col) = internal::convert_index(jk); - listCol[rowIdx(jk)].push_back(internal::convert_index(col)); - } -} - -} // end namespace Eigen - -#endif diff --git a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/IncompleteLUT.h b/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/IncompleteLUT.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/IncompleteLUT.h +++ /dev/null @@ -1,462 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// Copyright (C) 2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_INCOMPLETE_LUT_H -#define EIGEN_INCOMPLETE_LUT_H - - -namespace Eigen { - -namespace internal { - -/** \internal - * Compute a quick-sort split of a vector - * On output, the vector row is permuted such that its elements satisfy - * abs(row(i)) >= abs(row(ncut)) if incut - * \param row The vector of values - * \param ind The array of index for the elements in @p row - * \param ncut The number of largest elements to keep - **/ -template -Index QuickSplit(VectorV &row, VectorI &ind, Index ncut) -{ - typedef typename VectorV::RealScalar RealScalar; - using std::swap; - using std::abs; - Index mid; - Index n = row.size(); /* length of the vector */ - Index first, last ; - - ncut--; /* to fit the zero-based indices */ - first = 0; - last = n-1; - if (ncut < first || ncut > last ) return 0; - - do { - mid = first; - RealScalar abskey = abs(row(mid)); - for (Index j = first + 1; j <= last; j++) { - if ( abs(row(j)) > abskey) { - ++mid; - swap(row(mid), row(j)); - swap(ind(mid), ind(j)); - } - } - /* Interchange for the pivot element */ - swap(row(mid), row(first)); - swap(ind(mid), ind(first)); - - if (mid > ncut) last = mid - 1; - else if (mid < ncut ) first = mid + 1; - } while (mid != ncut ); - - return 0; /* mid is equal to ncut */ -} - -}// end namespace internal - -/** \ingroup IterativeLinearSolvers_Module - * \class IncompleteLUT - * \brief Incomplete LU factorization with dual-threshold strategy - * - * \implsparsesolverconcept - * - * During the numerical factorization, two dropping rules are used : - * 1) any element whose magnitude is less than some tolerance is dropped. - * This tolerance is obtained by multiplying the input tolerance @p droptol - * by the average magnitude of all the original elements in the current row. - * 2) After the elimination of the row, only the @p fill largest elements in - * the L part and the @p fill largest elements in the U part are kept - * (in addition to the diagonal element ). Note that @p fill is computed from - * the input parameter @p fillfactor which is used the ratio to control the fill_in - * relatively to the initial number of nonzero elements. - * - * The two extreme cases are when @p droptol=0 (to keep all the @p fill*2 largest elements) - * and when @p fill=n/2 with @p droptol being different to zero. - * - * References : Yousef Saad, ILUT: A dual threshold incomplete LU factorization, - * Numerical Linear Algebra with Applications, 1(4), pp 387-402, 1994. - * - * NOTE : The following implementation is derived from the ILUT implementation - * in the SPARSKIT package, Copyright (C) 2005, the Regents of the University of Minnesota - * released under the terms of the GNU LGPL: - * http://www-users.cs.umn.edu/~saad/software/SPARSKIT/README - * However, Yousef Saad gave us permission to relicense his ILUT code to MPL2. - * See the Eigen mailing list archive, thread: ILUT, date: July 8, 2012: - * http://listengine.tuxfamily.org/lists.tuxfamily.org/eigen/2012/07/msg00064.html - * alternatively, on GMANE: - * http://comments.gmane.org/gmane.comp.lib.eigen/3302 - */ -template -class IncompleteLUT : public SparseSolverBase > -{ - protected: - typedef SparseSolverBase Base; - using Base::m_isInitialized; - public: - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; - typedef typename NumTraits::Real RealScalar; - typedef Matrix Vector; - typedef Matrix VectorI; - typedef SparseMatrix FactorType; - - enum { - ColsAtCompileTime = Dynamic, - MaxColsAtCompileTime = Dynamic - }; - - public: - - IncompleteLUT() - : m_droptol(NumTraits::dummy_precision()), m_fillfactor(10), - m_analysisIsOk(false), m_factorizationIsOk(false) - {} - - template - explicit IncompleteLUT(const MatrixType& mat, const RealScalar& droptol=NumTraits::dummy_precision(), int fillfactor = 10) - : m_droptol(droptol),m_fillfactor(fillfactor), - m_analysisIsOk(false),m_factorizationIsOk(false) - { - eigen_assert(fillfactor != 0); - compute(mat); - } - - Index rows() const { return m_lu.rows(); } - - Index cols() const { return m_lu.cols(); } - - /** \brief Reports whether previous computation was successful. - * - * \returns \c Success if computation was succesful, - * \c NumericalIssue if the matrix.appears to be negative. - */ - ComputationInfo info() const - { - eigen_assert(m_isInitialized && "IncompleteLUT is not initialized."); - return m_info; - } - - template - void analyzePattern(const MatrixType& amat); - - template - void factorize(const MatrixType& amat); - - /** - * Compute an incomplete LU factorization with dual threshold on the matrix mat - * No pivoting is done in this version - * - **/ - template - IncompleteLUT& compute(const MatrixType& amat) - { - analyzePattern(amat); - factorize(amat); - return *this; - } - - void setDroptol(const RealScalar& droptol); - void setFillfactor(int fillfactor); - - template - void _solve_impl(const Rhs& b, Dest& x) const - { - x = m_Pinv * b; - x = m_lu.template triangularView().solve(x); - x = m_lu.template triangularView().solve(x); - x = m_P * x; - } - -protected: - - /** keeps off-diagonal entries; drops diagonal entries */ - struct keep_diag { - inline bool operator() (const Index& row, const Index& col, const Scalar&) const - { - return row!=col; - } - }; - -protected: - - FactorType m_lu; - RealScalar m_droptol; - int m_fillfactor; - bool m_analysisIsOk; - bool m_factorizationIsOk; - ComputationInfo m_info; - PermutationMatrix m_P; // Fill-reducing permutation - PermutationMatrix m_Pinv; // Inverse permutation -}; - -/** - * Set control parameter droptol - * \param droptol Drop any element whose magnitude is less than this tolerance - **/ -template -void IncompleteLUT::setDroptol(const RealScalar& droptol) -{ - this->m_droptol = droptol; -} - -/** - * Set control parameter fillfactor - * \param fillfactor This is used to compute the number @p fill_in of largest elements to keep on each row. - **/ -template -void IncompleteLUT::setFillfactor(int fillfactor) -{ - this->m_fillfactor = fillfactor; -} - -template -template -void IncompleteLUT::analyzePattern(const _MatrixType& amat) -{ - // Compute the Fill-reducing permutation - // Since ILUT does not perform any numerical pivoting, - // it is highly preferable to keep the diagonal through symmetric permutations. -#ifndef EIGEN_MPL2_ONLY - // To this end, let's symmetrize the pattern and perform AMD on it. - SparseMatrix mat1 = amat; - SparseMatrix mat2 = amat.transpose(); - // FIXME for a matrix with nearly symmetric pattern, mat2+mat1 is the appropriate choice. - // on the other hand for a really non-symmetric pattern, mat2*mat1 should be prefered... - SparseMatrix AtA = mat2 + mat1; - AMDOrdering ordering; - ordering(AtA,m_P); - m_Pinv = m_P.inverse(); // cache the inverse permutation -#else - // If AMD is not available, (MPL2-only), then let's use the slower COLAMD routine. - SparseMatrix mat1 = amat; - COLAMDOrdering ordering; - ordering(mat1,m_Pinv); - m_P = m_Pinv.inverse(); -#endif - - m_analysisIsOk = true; - m_factorizationIsOk = false; - m_isInitialized = true; -} - -template -template -void IncompleteLUT::factorize(const _MatrixType& amat) -{ - using std::sqrt; - using std::swap; - using std::abs; - using internal::convert_index; - - eigen_assert((amat.rows() == amat.cols()) && "The factorization should be done on a square matrix"); - Index n = amat.cols(); // Size of the matrix - m_lu.resize(n,n); - // Declare Working vectors and variables - Vector u(n) ; // real values of the row -- maximum size is n -- - VectorI ju(n); // column position of the values in u -- maximum size is n - VectorI jr(n); // Indicate the position of the nonzero elements in the vector u -- A zero location is indicated by -1 - - // Apply the fill-reducing permutation - eigen_assert(m_analysisIsOk && "You must first call analyzePattern()"); - SparseMatrix mat; - mat = amat.twistedBy(m_Pinv); - - // Initialization - jr.fill(-1); - ju.fill(0); - u.fill(0); - - // number of largest elements to keep in each row: - Index fill_in = (amat.nonZeros()*m_fillfactor)/n + 1; - if (fill_in > n) fill_in = n; - - // number of largest nonzero elements to keep in the L and the U part of the current row: - Index nnzL = fill_in/2; - Index nnzU = nnzL; - m_lu.reserve(n * (nnzL + nnzU + 1)); - - // global loop over the rows of the sparse matrix - for (Index ii = 0; ii < n; ii++) - { - // 1 - copy the lower and the upper part of the row i of mat in the working vector u - - Index sizeu = 1; // number of nonzero elements in the upper part of the current row - Index sizel = 0; // number of nonzero elements in the lower part of the current row - ju(ii) = convert_index(ii); - u(ii) = 0; - jr(ii) = convert_index(ii); - RealScalar rownorm = 0; - - typename FactorType::InnerIterator j_it(mat, ii); // Iterate through the current row ii - for (; j_it; ++j_it) - { - Index k = j_it.index(); - if (k < ii) - { - // copy the lower part - ju(sizel) = convert_index(k); - u(sizel) = j_it.value(); - jr(k) = convert_index(sizel); - ++sizel; - } - else if (k == ii) - { - u(ii) = j_it.value(); - } - else - { - // copy the upper part - Index jpos = ii + sizeu; - ju(jpos) = convert_index(k); - u(jpos) = j_it.value(); - jr(k) = convert_index(jpos); - ++sizeu; - } - rownorm += numext::abs2(j_it.value()); - } - - // 2 - detect possible zero row - if(rownorm==0) - { - m_info = NumericalIssue; - return; - } - // Take the 2-norm of the current row as a relative tolerance - rownorm = sqrt(rownorm); - - // 3 - eliminate the previous nonzero rows - Index jj = 0; - Index len = 0; - while (jj < sizel) - { - // In order to eliminate in the correct order, - // we must select first the smallest column index among ju(jj:sizel) - Index k; - Index minrow = ju.segment(jj,sizel-jj).minCoeff(&k); // k is relative to the segment - k += jj; - if (minrow != ju(jj)) - { - // swap the two locations - Index j = ju(jj); - swap(ju(jj), ju(k)); - jr(minrow) = convert_index(jj); - jr(j) = convert_index(k); - swap(u(jj), u(k)); - } - // Reset this location - jr(minrow) = -1; - - // Start elimination - typename FactorType::InnerIterator ki_it(m_lu, minrow); - while (ki_it && ki_it.index() < minrow) ++ki_it; - eigen_internal_assert(ki_it && ki_it.col()==minrow); - Scalar fact = u(jj) / ki_it.value(); - - // drop too small elements - if(abs(fact) <= m_droptol) - { - jj++; - continue; - } - - // linear combination of the current row ii and the row minrow - ++ki_it; - for (; ki_it; ++ki_it) - { - Scalar prod = fact * ki_it.value(); - Index j = ki_it.index(); - Index jpos = jr(j); - if (jpos == -1) // fill-in element - { - Index newpos; - if (j >= ii) // dealing with the upper part - { - newpos = ii + sizeu; - sizeu++; - eigen_internal_assert(sizeu<=n); - } - else // dealing with the lower part - { - newpos = sizel; - sizel++; - eigen_internal_assert(sizel<=ii); - } - ju(newpos) = convert_index(j); - u(newpos) = -prod; - jr(j) = convert_index(newpos); - } - else - u(jpos) -= prod; - } - // store the pivot element - u(len) = fact; - ju(len) = convert_index(minrow); - ++len; - - jj++; - } // end of the elimination on the row ii - - // reset the upper part of the pointer jr to zero - for(Index k = 0; k m_droptol * rownorm ) - { - ++len; - u(ii + len) = u(ii + k); - ju(ii + len) = ju(ii + k); - } - } - sizeu = len + 1; // +1 to take into account the diagonal element - len = (std::min)(sizeu, nnzU); - typename Vector::SegmentReturnType uu(u.segment(ii+1, sizeu-1)); - typename VectorI::SegmentReturnType juu(ju.segment(ii+1, sizeu-1)); - internal::QuickSplit(uu, juu, len); - - // store the largest elements of the U part - for(Index k = ii + 1; k < ii + len; k++) - m_lu.insertBackByOuterInnerUnordered(ii,ju(k)) = u(k); - } - m_lu.finalize(); - m_lu.makeCompressed(); - - m_factorizationIsOk = true; - m_info = Success; -} - -} // end namespace Eigen - -#endif // EIGEN_INCOMPLETE_LUT_H diff --git a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/IterativeSolverBase.h b/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/IterativeSolverBase.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/IterativeSolverBase.h +++ /dev/null @@ -1,394 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2011-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_ITERATIVE_SOLVER_BASE_H -#define EIGEN_ITERATIVE_SOLVER_BASE_H - -namespace Eigen { - -namespace internal { - -template -struct is_ref_compatible_impl -{ -private: - template - struct any_conversion - { - template any_conversion(const volatile T&); - template any_conversion(T&); - }; - struct yes {int a[1];}; - struct no {int a[2];}; - - template - static yes test(const Ref&, int); - template - static no test(any_conversion, ...); - -public: - static MatrixType ms_from; - enum { value = sizeof(test(ms_from, 0))==sizeof(yes) }; -}; - -template -struct is_ref_compatible -{ - enum { value = is_ref_compatible_impl::type>::value }; -}; - -template::value> -class generic_matrix_wrapper; - -// We have an explicit matrix at hand, compatible with Ref<> -template -class generic_matrix_wrapper -{ -public: - typedef Ref ActualMatrixType; - template struct ConstSelfAdjointViewReturnType { - typedef typename ActualMatrixType::template ConstSelfAdjointViewReturnType::Type Type; - }; - - enum { - MatrixFree = false - }; - - generic_matrix_wrapper() - : m_dummy(0,0), m_matrix(m_dummy) - {} - - template - generic_matrix_wrapper(const InputType &mat) - : m_matrix(mat) - {} - - const ActualMatrixType& matrix() const - { - return m_matrix; - } - - template - void grab(const EigenBase &mat) - { - m_matrix.~Ref(); - ::new (&m_matrix) Ref(mat.derived()); - } - - void grab(const Ref &mat) - { - if(&(mat.derived()) != &m_matrix) - { - m_matrix.~Ref(); - ::new (&m_matrix) Ref(mat); - } - } - -protected: - MatrixType m_dummy; // used to default initialize the Ref<> object - ActualMatrixType m_matrix; -}; - -// MatrixType is not compatible with Ref<> -> matrix-free wrapper -template -class generic_matrix_wrapper -{ -public: - typedef MatrixType ActualMatrixType; - template struct ConstSelfAdjointViewReturnType - { - typedef ActualMatrixType Type; - }; - - enum { - MatrixFree = true - }; - - generic_matrix_wrapper() - : mp_matrix(0) - {} - - generic_matrix_wrapper(const MatrixType &mat) - : mp_matrix(&mat) - {} - - const ActualMatrixType& matrix() const - { - return *mp_matrix; - } - - void grab(const MatrixType &mat) - { - mp_matrix = &mat; - } - -protected: - const ActualMatrixType *mp_matrix; -}; - -} - -/** \ingroup IterativeLinearSolvers_Module - * \brief Base class for linear iterative solvers - * - * \sa class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner - */ -template< typename Derived> -class IterativeSolverBase : public SparseSolverBase -{ -protected: - typedef SparseSolverBase Base; - using Base::m_isInitialized; - -public: - typedef typename internal::traits::MatrixType MatrixType; - typedef typename internal::traits::Preconditioner Preconditioner; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef typename MatrixType::RealScalar RealScalar; - - enum { - ColsAtCompileTime = MatrixType::ColsAtCompileTime, - MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime - }; - -public: - - using Base::derived; - - /** Default constructor. */ - IterativeSolverBase() - { - init(); - } - - /** Initialize the solver with matrix \a A for further \c Ax=b solving. - * - * This constructor is a shortcut for the default constructor followed - * by a call to compute(). - * - * \warning this class stores a reference to the matrix A as well as some - * precomputed values that depend on it. Therefore, if \a A is changed - * this class becomes invalid. Call compute() to update it with the new - * matrix A, or modify a copy of A. - */ - template - explicit IterativeSolverBase(const EigenBase& A) - : m_matrixWrapper(A.derived()) - { - init(); - compute(matrix()); - } - - ~IterativeSolverBase() {} - - /** Initializes the iterative solver for the sparsity pattern of the matrix \a A for further solving \c Ax=b problems. - * - * Currently, this function mostly calls analyzePattern on the preconditioner. In the future - * we might, for instance, implement column reordering for faster matrix vector products. - */ - template - Derived& analyzePattern(const EigenBase& A) - { - grab(A.derived()); - m_preconditioner.analyzePattern(matrix()); - m_isInitialized = true; - m_analysisIsOk = true; - m_info = m_preconditioner.info(); - return derived(); - } - - /** Initializes the iterative solver with the numerical values of the matrix \a A for further solving \c Ax=b problems. - * - * Currently, this function mostly calls factorize on the preconditioner. - * - * \warning this class stores a reference to the matrix A as well as some - * precomputed values that depend on it. Therefore, if \a A is changed - * this class becomes invalid. Call compute() to update it with the new - * matrix A, or modify a copy of A. - */ - template - Derived& factorize(const EigenBase& A) - { - eigen_assert(m_analysisIsOk && "You must first call analyzePattern()"); - grab(A.derived()); - m_preconditioner.factorize(matrix()); - m_factorizationIsOk = true; - m_info = m_preconditioner.info(); - return derived(); - } - - /** Initializes the iterative solver with the matrix \a A for further solving \c Ax=b problems. - * - * Currently, this function mostly initializes/computes the preconditioner. In the future - * we might, for instance, implement column reordering for faster matrix vector products. - * - * \warning this class stores a reference to the matrix A as well as some - * precomputed values that depend on it. Therefore, if \a A is changed - * this class becomes invalid. Call compute() to update it with the new - * matrix A, or modify a copy of A. - */ - template - Derived& compute(const EigenBase& A) - { - grab(A.derived()); - m_preconditioner.compute(matrix()); - m_isInitialized = true; - m_analysisIsOk = true; - m_factorizationIsOk = true; - m_info = m_preconditioner.info(); - return derived(); - } - - /** \internal */ - Index rows() const { return matrix().rows(); } - - /** \internal */ - Index cols() const { return matrix().cols(); } - - /** \returns the tolerance threshold used by the stopping criteria. - * \sa setTolerance() - */ - RealScalar tolerance() const { return m_tolerance; } - - /** Sets the tolerance threshold used by the stopping criteria. - * - * This value is used as an upper bound to the relative residual error: |Ax-b|/|b|. - * The default value is the machine precision given by NumTraits::epsilon() - */ - Derived& setTolerance(const RealScalar& tolerance) - { - m_tolerance = tolerance; - return derived(); - } - - /** \returns a read-write reference to the preconditioner for custom configuration. */ - Preconditioner& preconditioner() { return m_preconditioner; } - - /** \returns a read-only reference to the preconditioner. */ - const Preconditioner& preconditioner() const { return m_preconditioner; } - - /** \returns the max number of iterations. - * It is either the value setted by setMaxIterations or, by default, - * twice the number of columns of the matrix. - */ - Index maxIterations() const - { - return (m_maxIterations<0) ? 2*matrix().cols() : m_maxIterations; - } - - /** Sets the max number of iterations. - * Default is twice the number of columns of the matrix. - */ - Derived& setMaxIterations(Index maxIters) - { - m_maxIterations = maxIters; - return derived(); - } - - /** \returns the number of iterations performed during the last solve */ - Index iterations() const - { - eigen_assert(m_isInitialized && "ConjugateGradient is not initialized."); - return m_iterations; - } - - /** \returns the tolerance error reached during the last solve. - * It is a close approximation of the true relative residual error |Ax-b|/|b|. - */ - RealScalar error() const - { - eigen_assert(m_isInitialized && "ConjugateGradient is not initialized."); - return m_error; - } - - /** \returns the solution x of \f$ A x = b \f$ using the current decomposition of A - * and \a x0 as an initial solution. - * - * \sa solve(), compute() - */ - template - inline const SolveWithGuess - solveWithGuess(const MatrixBase& b, const Guess& x0) const - { - eigen_assert(m_isInitialized && "Solver is not initialized."); - eigen_assert(derived().rows()==b.rows() && "solve(): invalid number of rows of the right hand side matrix b"); - return SolveWithGuess(derived(), b.derived(), x0); - } - - /** \returns Success if the iterations converged, and NoConvergence otherwise. */ - ComputationInfo info() const - { - eigen_assert(m_isInitialized && "IterativeSolverBase is not initialized."); - return m_info; - } - - /** \internal */ - template - void _solve_impl(const Rhs& b, SparseMatrixBase &aDest) const - { - eigen_assert(rows()==b.rows()); - - Index rhsCols = b.cols(); - Index size = b.rows(); - DestDerived& dest(aDest.derived()); - typedef typename DestDerived::Scalar DestScalar; - Eigen::Matrix tb(size); - Eigen::Matrix tx(cols()); - // We do not directly fill dest because sparse expressions have to be free of aliasing issue. - // For non square least-square problems, b and dest might not have the same size whereas they might alias each-other. - typename DestDerived::PlainObject tmp(cols(),rhsCols); - for(Index k=0; k::epsilon(); - } - - typedef internal::generic_matrix_wrapper MatrixWrapper; - typedef typename MatrixWrapper::ActualMatrixType ActualMatrixType; - - const ActualMatrixType& matrix() const - { - return m_matrixWrapper.matrix(); - } - - template - void grab(const InputType &A) - { - m_matrixWrapper.grab(A); - } - - MatrixWrapper m_matrixWrapper; - Preconditioner m_preconditioner; - - Index m_maxIterations; - RealScalar m_tolerance; - - mutable RealScalar m_error; - mutable Index m_iterations; - mutable ComputationInfo m_info; - mutable bool m_analysisIsOk, m_factorizationIsOk; -}; - -} // end namespace Eigen - -#endif // EIGEN_ITERATIVE_SOLVER_BASE_H diff --git a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h b/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +++ /dev/null @@ -1,216 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2015 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_LEAST_SQUARE_CONJUGATE_GRADIENT_H -#define EIGEN_LEAST_SQUARE_CONJUGATE_GRADIENT_H - -namespace Eigen { - -namespace internal { - -/** \internal Low-level conjugate gradient algorithm for least-square problems - * \param mat The matrix A - * \param rhs The right hand side vector b - * \param x On input and initial solution, on output the computed solution. - * \param precond A preconditioner being able to efficiently solve for an - * approximation of A'Ax=b (regardless of b) - * \param iters On input the max number of iteration, on output the number of performed iterations. - * \param tol_error On input the tolerance error, on output an estimation of the relative error. - */ -template -EIGEN_DONT_INLINE -void least_square_conjugate_gradient(const MatrixType& mat, const Rhs& rhs, Dest& x, - const Preconditioner& precond, Index& iters, - typename Dest::RealScalar& tol_error) -{ - using std::sqrt; - using std::abs; - typedef typename Dest::RealScalar RealScalar; - typedef typename Dest::Scalar Scalar; - typedef Matrix VectorType; - - RealScalar tol = tol_error; - Index maxIters = iters; - - Index m = mat.rows(), n = mat.cols(); - - VectorType residual = rhs - mat * x; - VectorType normal_residual = mat.adjoint() * residual; - - RealScalar rhsNorm2 = (mat.adjoint()*rhs).squaredNorm(); - if(rhsNorm2 == 0) - { - x.setZero(); - iters = 0; - tol_error = 0; - return; - } - RealScalar threshold = tol*tol*rhsNorm2; - RealScalar residualNorm2 = normal_residual.squaredNorm(); - if (residualNorm2 < threshold) - { - iters = 0; - tol_error = sqrt(residualNorm2 / rhsNorm2); - return; - } - - VectorType p(n); - p = precond.solve(normal_residual); // initial search direction - - VectorType z(n), tmp(m); - RealScalar absNew = numext::real(normal_residual.dot(p)); // the square of the absolute value of r scaled by invM - Index i = 0; - while(i < maxIters) - { - tmp.noalias() = mat * p; - - Scalar alpha = absNew / tmp.squaredNorm(); // the amount we travel on dir - x += alpha * p; // update solution - residual -= alpha * tmp; // update residual - normal_residual = mat.adjoint() * residual; // update residual of the normal equation - - residualNorm2 = normal_residual.squaredNorm(); - if(residualNorm2 < threshold) - break; - - z = precond.solve(normal_residual); // approximately solve for "A'A z = normal_residual" - - RealScalar absOld = absNew; - absNew = numext::real(normal_residual.dot(z)); // update the absolute value of r - RealScalar beta = absNew / absOld; // calculate the Gram-Schmidt value used to create the new search direction - p = z + beta * p; // update search direction - i++; - } - tol_error = sqrt(residualNorm2 / rhsNorm2); - iters = i; -} - -} - -template< typename _MatrixType, - typename _Preconditioner = LeastSquareDiagonalPreconditioner > -class LeastSquaresConjugateGradient; - -namespace internal { - -template< typename _MatrixType, typename _Preconditioner> -struct traits > -{ - typedef _MatrixType MatrixType; - typedef _Preconditioner Preconditioner; -}; - -} - -/** \ingroup IterativeLinearSolvers_Module - * \brief A conjugate gradient solver for sparse (or dense) least-square problems - * - * This class allows to solve for A x = b linear problems using an iterative conjugate gradient algorithm. - * The matrix A can be non symmetric and rectangular, but the matrix A' A should be positive-definite to guaranty stability. - * Otherwise, the SparseLU or SparseQR classes might be preferable. - * The matrix A and the vectors x and b can be either dense or sparse. - * - * \tparam _MatrixType the type of the matrix A, can be a dense or a sparse matrix. - * \tparam _Preconditioner the type of the preconditioner. Default is LeastSquareDiagonalPreconditioner - * - * \implsparsesolverconcept - * - * The maximal number of iterations and tolerance value can be controlled via the setMaxIterations() - * and setTolerance() methods. The defaults are the size of the problem for the maximal number of iterations - * and NumTraits::epsilon() for the tolerance. - * - * This class can be used as the direct solver classes. Here is a typical usage example: - \code - int m=1000000, n = 10000; - VectorXd x(n), b(m); - SparseMatrix A(m,n); - // fill A and b - LeastSquaresConjugateGradient > lscg; - lscg.compute(A); - x = lscg.solve(b); - std::cout << "#iterations: " << lscg.iterations() << std::endl; - std::cout << "estimated error: " << lscg.error() << std::endl; - // update b, and solve again - x = lscg.solve(b); - \endcode - * - * By default the iterations start with x=0 as an initial guess of the solution. - * One can control the start using the solveWithGuess() method. - * - * \sa class ConjugateGradient, SparseLU, SparseQR - */ -template< typename _MatrixType, typename _Preconditioner> -class LeastSquaresConjugateGradient : public IterativeSolverBase > -{ - typedef IterativeSolverBase Base; - using Base::matrix; - using Base::m_error; - using Base::m_iterations; - using Base::m_info; - using Base::m_isInitialized; -public: - typedef _MatrixType MatrixType; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef _Preconditioner Preconditioner; - -public: - - /** Default constructor. */ - LeastSquaresConjugateGradient() : Base() {} - - /** Initialize the solver with matrix \a A for further \c Ax=b solving. - * - * This constructor is a shortcut for the default constructor followed - * by a call to compute(). - * - * \warning this class stores a reference to the matrix A as well as some - * precomputed values that depend on it. Therefore, if \a A is changed - * this class becomes invalid. Call compute() to update it with the new - * matrix A, or modify a copy of A. - */ - template - explicit LeastSquaresConjugateGradient(const EigenBase& A) : Base(A.derived()) {} - - ~LeastSquaresConjugateGradient() {} - - /** \internal */ - template - void _solve_with_guess_impl(const Rhs& b, Dest& x) const - { - m_iterations = Base::maxIterations(); - m_error = Base::m_tolerance; - - for(Index j=0; j - void _solve_impl(const MatrixBase& b, Dest& x) const - { - x.setZero(); - _solve_with_guess_impl(b.derived(),x); - } - -}; - -} // end namespace Eigen - -#endif // EIGEN_LEAST_SQUARE_CONJUGATE_GRADIENT_H diff --git a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/SolveWithGuess.h b/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/SolveWithGuess.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/IterativeLinearSolvers/SolveWithGuess.h +++ /dev/null @@ -1,115 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SOLVEWITHGUESS_H -#define EIGEN_SOLVEWITHGUESS_H - -namespace Eigen { - -template class SolveWithGuess; - -/** \class SolveWithGuess - * \ingroup IterativeLinearSolvers_Module - * - * \brief Pseudo expression representing a solving operation - * - * \tparam Decomposition the type of the matrix or decomposion object - * \tparam Rhstype the type of the right-hand side - * - * This class represents an expression of A.solve(B) - * and most of the time this is the only way it is used. - * - */ -namespace internal { - - -template -struct traits > - : traits > -{}; - -} - - -template -class SolveWithGuess : public internal::generic_xpr_base, MatrixXpr, typename internal::traits::StorageKind>::type -{ -public: - typedef typename internal::traits::Scalar Scalar; - typedef typename internal::traits::PlainObject PlainObject; - typedef typename internal::generic_xpr_base, MatrixXpr, typename internal::traits::StorageKind>::type Base; - typedef typename internal::ref_selector::type Nested; - - SolveWithGuess(const Decomposition &dec, const RhsType &rhs, const GuessType &guess) - : m_dec(dec), m_rhs(rhs), m_guess(guess) - {} - - EIGEN_DEVICE_FUNC Index rows() const { return m_dec.cols(); } - EIGEN_DEVICE_FUNC Index cols() const { return m_rhs.cols(); } - - EIGEN_DEVICE_FUNC const Decomposition& dec() const { return m_dec; } - EIGEN_DEVICE_FUNC const RhsType& rhs() const { return m_rhs; } - EIGEN_DEVICE_FUNC const GuessType& guess() const { return m_guess; } - -protected: - const Decomposition &m_dec; - const RhsType &m_rhs; - const GuessType &m_guess; - -private: - Scalar coeff(Index row, Index col) const; - Scalar coeff(Index i) const; -}; - -namespace internal { - -// Evaluator of SolveWithGuess -> eval into a temporary -template -struct evaluator > - : public evaluator::PlainObject> -{ - typedef SolveWithGuess SolveType; - typedef typename SolveType::PlainObject PlainObject; - typedef evaluator Base; - - evaluator(const SolveType& solve) - : m_result(solve.rows(), solve.cols()) - { - ::new (static_cast(this)) Base(m_result); - m_result = solve.guess(); - solve.dec()._solve_with_guess_impl(solve.rhs(), m_result); - } - -protected: - PlainObject m_result; -}; - -// Specialization for "dst = dec.solveWithGuess(rhs)" -// NOTE we need to specialize it for Dense2Dense to avoid ambiguous specialization error and a Sparse2Sparse specialization must exist somewhere -template -struct Assignment, internal::assign_op, Dense2Dense> -{ - typedef SolveWithGuess SrcXprType; - static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op &) - { - Index dstRows = src.rows(); - Index dstCols = src.cols(); - if((dst.rows()!=dstRows) || (dst.cols()!=dstCols)) - dst.resize(dstRows, dstCols); - - dst = src.guess(); - src.dec()._solve_with_guess_impl(src.rhs(), dst/*, src.guess()*/); - } -}; - -} // end namepsace internal - -} // end namespace Eigen - -#endif // EIGEN_SOLVEWITHGUESS_H diff --git a/include/Rivet/Math/eigen3/src/LU/PartialPivLU_LAPACKE.h b/include/Rivet/Math/eigen3/src/LU/PartialPivLU_LAPACKE.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/LU/PartialPivLU_LAPACKE.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to LAPACKe - * LU decomposition with partial pivoting based on LAPACKE_?getrf function. - ******************************************************************************** -*/ - -#ifndef EIGEN_PARTIALLU_LAPACK_H -#define EIGEN_PARTIALLU_LAPACK_H - -namespace Eigen { - -namespace internal { - -/** \internal Specialization for the data types supported by LAPACKe */ - -#define EIGEN_LAPACKE_LU_PARTPIV(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX) \ -template \ -struct partial_lu_impl \ -{ \ - /* \internal performs the LU decomposition in-place of the matrix represented */ \ - static lapack_int blocked_lu(Index rows, Index cols, EIGTYPE* lu_data, Index luStride, lapack_int* row_transpositions, lapack_int& nb_transpositions, lapack_int maxBlockSize=256) \ - { \ - EIGEN_UNUSED_VARIABLE(maxBlockSize);\ - lapack_int matrix_order, first_zero_pivot; \ - lapack_int m, n, lda, *ipiv, info; \ - EIGTYPE* a; \ -/* Set up parameters for ?getrf */ \ - matrix_order = StorageOrder==RowMajor ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \ - lda = convert_index(luStride); \ - a = lu_data; \ - ipiv = row_transpositions; \ - m = convert_index(rows); \ - n = convert_index(cols); \ - nb_transpositions = 0; \ -\ - info = LAPACKE_##LAPACKE_PREFIX##getrf( matrix_order, m, n, (LAPACKE_TYPE*)a, lda, ipiv ); \ -\ - for(int i=0;i= 0); \ -/* something should be done with nb_transpositions */ \ -\ - first_zero_pivot = info; \ - return first_zero_pivot; \ - } \ -}; - -EIGEN_LAPACKE_LU_PARTPIV(double, double, d) -EIGEN_LAPACKE_LU_PARTPIV(float, float, s) -EIGEN_LAPACKE_LU_PARTPIV(dcomplex, lapack_complex_double, z) -EIGEN_LAPACKE_LU_PARTPIV(scomplex, lapack_complex_float, c) - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_PARTIALLU_LAPACK_H diff --git a/include/Rivet/Math/eigen3/src/MetisSupport/MetisSupport.h b/include/Rivet/Math/eigen3/src/MetisSupport/MetisSupport.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/MetisSupport/MetisSupport.h +++ /dev/null @@ -1,137 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -#ifndef METIS_SUPPORT_H -#define METIS_SUPPORT_H - -namespace Eigen { -/** - * Get the fill-reducing ordering from the METIS package - * - * If A is the original matrix and Ap is the permuted matrix, - * the fill-reducing permutation is defined as follows : - * Row (column) i of A is the matperm(i) row (column) of Ap. - * WARNING: As computed by METIS, this corresponds to the vector iperm (instead of perm) - */ -template -class MetisOrdering -{ -public: - typedef PermutationMatrix PermutationType; - typedef Matrix IndexVector; - - template - void get_symmetrized_graph(const MatrixType& A) - { - Index m = A.cols(); - eigen_assert((A.rows() == A.cols()) && "ONLY FOR SQUARED MATRICES"); - // Get the transpose of the input matrix - MatrixType At = A.transpose(); - // Get the number of nonzeros elements in each row/col of At+A - Index TotNz = 0; - IndexVector visited(m); - visited.setConstant(-1); - for (StorageIndex j = 0; j < m; j++) - { - // Compute the union structure of of A(j,:) and At(j,:) - visited(j) = j; // Do not include the diagonal element - // Get the nonzeros in row/column j of A - for (typename MatrixType::InnerIterator it(A, j); it; ++it) - { - Index idx = it.index(); // Get the row index (for column major) or column index (for row major) - if (visited(idx) != j ) - { - visited(idx) = j; - ++TotNz; - } - } - //Get the nonzeros in row/column j of At - for (typename MatrixType::InnerIterator it(At, j); it; ++it) - { - Index idx = it.index(); - if(visited(idx) != j) - { - visited(idx) = j; - ++TotNz; - } - } - } - // Reserve place for A + At - m_indexPtr.resize(m+1); - m_innerIndices.resize(TotNz); - - // Now compute the real adjacency list of each column/row - visited.setConstant(-1); - StorageIndex CurNz = 0; - for (StorageIndex j = 0; j < m; j++) - { - m_indexPtr(j) = CurNz; - - visited(j) = j; // Do not include the diagonal element - // Add the pattern of row/column j of A to A+At - for (typename MatrixType::InnerIterator it(A,j); it; ++it) - { - StorageIndex idx = it.index(); // Get the row index (for column major) or column index (for row major) - if (visited(idx) != j ) - { - visited(idx) = j; - m_innerIndices(CurNz) = idx; - CurNz++; - } - } - //Add the pattern of row/column j of At to A+At - for (typename MatrixType::InnerIterator it(At, j); it; ++it) - { - StorageIndex idx = it.index(); - if(visited(idx) != j) - { - visited(idx) = j; - m_innerIndices(CurNz) = idx; - ++CurNz; - } - } - } - m_indexPtr(m) = CurNz; - } - - template - void operator() (const MatrixType& A, PermutationType& matperm) - { - StorageIndex m = internal::convert_index(A.cols()); // must be StorageIndex, because it is passed by address to METIS - IndexVector perm(m),iperm(m); - // First, symmetrize the matrix graph. - get_symmetrized_graph(A); - int output_error; - - // Call the fill-reducing routine from METIS - output_error = METIS_NodeND(&m, m_indexPtr.data(), m_innerIndices.data(), NULL, NULL, perm.data(), iperm.data()); - - if(output_error != METIS_OK) - { - //FIXME The ordering interface should define a class of possible errors - std::cerr << "ERROR WHILE CALLING THE METIS PACKAGE \n"; - return; - } - - // Get the fill-reducing permutation - //NOTE: If Ap is the permuted matrix then perm and iperm vectors are defined as follows - // Row (column) i of Ap is the perm(i) row(column) of A, and row (column) i of A is the iperm(i) row(column) of Ap - - matperm.resize(m); - for (int j = 0; j < m; j++) - matperm.indices()(iperm(j)) = j; - - } - - protected: - IndexVector m_indexPtr; // Pointer to the adjacenccy list of each row/column - IndexVector m_innerIndices; // Adjacency list -}; - -}// end namespace eigen -#endif diff --git a/include/Rivet/Math/eigen3/src/OrderingMethods/Amd.h b/include/Rivet/Math/eigen3/src/OrderingMethods/Amd.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/OrderingMethods/Amd.h +++ /dev/null @@ -1,445 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2010 Gael Guennebaud - -/* - -NOTE: this routine has been adapted from the CSparse library: - -Copyright (c) 2006, Timothy A. Davis. -http://www.suitesparse.com - -CSparse is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -CSparse is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this Module; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -*/ - -#include "../Core/util/NonMPL2.h" - -#ifndef EIGEN_SPARSE_AMD_H -#define EIGEN_SPARSE_AMD_H - -namespace Eigen { - -namespace internal { - -template inline T amd_flip(const T& i) { return -i-2; } -template inline T amd_unflip(const T& i) { return i<0 ? amd_flip(i) : i; } -template inline bool amd_marked(const T0* w, const T1& j) { return w[j]<0; } -template inline void amd_mark(const T0* w, const T1& j) { return w[j] = amd_flip(w[j]); } - -/* clear w */ -template -static StorageIndex cs_wclear (StorageIndex mark, StorageIndex lemax, StorageIndex *w, StorageIndex n) -{ - StorageIndex k; - if(mark < 2 || (mark + lemax < 0)) - { - for(k = 0; k < n; k++) - if(w[k] != 0) - w[k] = 1; - mark = 2; - } - return (mark); /* at this point, w[0..n-1] < mark holds */ -} - -/* depth-first search and postorder of a tree rooted at node j */ -template -StorageIndex cs_tdfs(StorageIndex j, StorageIndex k, StorageIndex *head, const StorageIndex *next, StorageIndex *post, StorageIndex *stack) -{ - StorageIndex i, p, top = 0; - if(!head || !next || !post || !stack) return (-1); /* check inputs */ - stack[0] = j; /* place j on the stack */ - while (top >= 0) /* while (stack is not empty) */ - { - p = stack[top]; /* p = top of stack */ - i = head[p]; /* i = youngest child of p */ - if(i == -1) - { - top--; /* p has no unordered children left */ - post[k++] = p; /* node p is the kth postordered node */ - } - else - { - head[p] = next[i]; /* remove i from children of p */ - stack[++top] = i; /* start dfs on child node i */ - } - } - return k; -} - - -/** \internal - * \ingroup OrderingMethods_Module - * Approximate minimum degree ordering algorithm. - * - * \param[in] C the input selfadjoint matrix stored in compressed column major format. - * \param[out] perm the permutation P reducing the fill-in of the input matrix \a C - * - * Note that the input matrix \a C must be complete, that is both the upper and lower parts have to be stored, as well as the diagonal entries. - * On exit the values of C are destroyed */ -template -void minimum_degree_ordering(SparseMatrix& C, PermutationMatrix& perm) -{ - using std::sqrt; - - StorageIndex d, dk, dext, lemax = 0, e, elenk, eln, i, j, k, k1, - k2, k3, jlast, ln, dense, nzmax, mindeg = 0, nvi, nvj, nvk, mark, wnvi, - ok, nel = 0, p, p1, p2, p3, p4, pj, pk, pk1, pk2, pn, q, t, h; - - StorageIndex n = StorageIndex(C.cols()); - dense = std::max (16, StorageIndex(10 * sqrt(double(n)))); /* find dense threshold */ - dense = (std::min)(n-2, dense); - - StorageIndex cnz = StorageIndex(C.nonZeros()); - perm.resize(n+1); - t = cnz + cnz/5 + 2*n; /* add elbow room to C */ - C.resizeNonZeros(t); - - // get workspace - ei_declare_aligned_stack_constructed_variable(StorageIndex,W,8*(n+1),0); - StorageIndex* len = W; - StorageIndex* nv = W + (n+1); - StorageIndex* next = W + 2*(n+1); - StorageIndex* head = W + 3*(n+1); - StorageIndex* elen = W + 4*(n+1); - StorageIndex* degree = W + 5*(n+1); - StorageIndex* w = W + 6*(n+1); - StorageIndex* hhead = W + 7*(n+1); - StorageIndex* last = perm.indices().data(); /* use P as workspace for last */ - - /* --- Initialize quotient graph ---------------------------------------- */ - StorageIndex* Cp = C.outerIndexPtr(); - StorageIndex* Ci = C.innerIndexPtr(); - for(k = 0; k < n; k++) - len[k] = Cp[k+1] - Cp[k]; - len[n] = 0; - nzmax = t; - - for(i = 0; i <= n; i++) - { - head[i] = -1; // degree list i is empty - last[i] = -1; - next[i] = -1; - hhead[i] = -1; // hash list i is empty - nv[i] = 1; // node i is just one node - w[i] = 1; // node i is alive - elen[i] = 0; // Ek of node i is empty - degree[i] = len[i]; // degree of node i - } - mark = internal::cs_wclear(0, 0, w, n); /* clear w */ - - /* --- Initialize degree lists ------------------------------------------ */ - for(i = 0; i < n; i++) - { - bool has_diag = false; - for(p = Cp[i]; p dense || !has_diag) /* node i is dense or has no structural diagonal element */ - { - nv[i] = 0; /* absorb i into element n */ - elen[i] = -1; /* node i is dead */ - nel++; - Cp[i] = amd_flip (n); - nv[n]++; - } - else - { - if(head[d] != -1) last[head[d]] = i; - next[i] = head[d]; /* put node i in degree list d */ - head[d] = i; - } - } - - elen[n] = -2; /* n is a dead element */ - Cp[n] = -1; /* n is a root of assembly tree */ - w[n] = 0; /* n is a dead element */ - - while (nel < n) /* while (selecting pivots) do */ - { - /* --- Select node of minimum approximate degree -------------------- */ - for(k = -1; mindeg < n && (k = head[mindeg]) == -1; mindeg++) {} - if(next[k] != -1) last[next[k]] = -1; - head[mindeg] = next[k]; /* remove k from degree list */ - elenk = elen[k]; /* elenk = |Ek| */ - nvk = nv[k]; /* # of nodes k represents */ - nel += nvk; /* nv[k] nodes of A eliminated */ - - /* --- Garbage collection ------------------------------------------- */ - if(elenk > 0 && cnz + mindeg >= nzmax) - { - for(j = 0; j < n; j++) - { - if((p = Cp[j]) >= 0) /* j is a live node or element */ - { - Cp[j] = Ci[p]; /* save first entry of object */ - Ci[p] = amd_flip (j); /* first entry is now amd_flip(j) */ - } - } - for(q = 0, p = 0; p < cnz; ) /* scan all of memory */ - { - if((j = amd_flip (Ci[p++])) >= 0) /* found object j */ - { - Ci[q] = Cp[j]; /* restore first entry of object */ - Cp[j] = q++; /* new pointer to object j */ - for(k3 = 0; k3 < len[j]-1; k3++) Ci[q++] = Ci[p++]; - } - } - cnz = q; /* Ci[cnz...nzmax-1] now free */ - } - - /* --- Construct new element ---------------------------------------- */ - dk = 0; - nv[k] = -nvk; /* flag k as in Lk */ - p = Cp[k]; - pk1 = (elenk == 0) ? p : cnz; /* do in place if elen[k] == 0 */ - pk2 = pk1; - for(k1 = 1; k1 <= elenk + 1; k1++) - { - if(k1 > elenk) - { - e = k; /* search the nodes in k */ - pj = p; /* list of nodes starts at Ci[pj]*/ - ln = len[k] - elenk; /* length of list of nodes in k */ - } - else - { - e = Ci[p++]; /* search the nodes in e */ - pj = Cp[e]; - ln = len[e]; /* length of list of nodes in e */ - } - for(k2 = 1; k2 <= ln; k2++) - { - i = Ci[pj++]; - if((nvi = nv[i]) <= 0) continue; /* node i dead, or seen */ - dk += nvi; /* degree[Lk] += size of node i */ - nv[i] = -nvi; /* negate nv[i] to denote i in Lk*/ - Ci[pk2++] = i; /* place i in Lk */ - if(next[i] != -1) last[next[i]] = last[i]; - if(last[i] != -1) /* remove i from degree list */ - { - next[last[i]] = next[i]; - } - else - { - head[degree[i]] = next[i]; - } - } - if(e != k) - { - Cp[e] = amd_flip (k); /* absorb e into k */ - w[e] = 0; /* e is now a dead element */ - } - } - if(elenk != 0) cnz = pk2; /* Ci[cnz...nzmax] is free */ - degree[k] = dk; /* external degree of k - |Lk\i| */ - Cp[k] = pk1; /* element k is in Ci[pk1..pk2-1] */ - len[k] = pk2 - pk1; - elen[k] = -2; /* k is now an element */ - - /* --- Find set differences ----------------------------------------- */ - mark = internal::cs_wclear(mark, lemax, w, n); /* clear w if necessary */ - for(pk = pk1; pk < pk2; pk++) /* scan 1: find |Le\Lk| */ - { - i = Ci[pk]; - if((eln = elen[i]) <= 0) continue;/* skip if elen[i] empty */ - nvi = -nv[i]; /* nv[i] was negated */ - wnvi = mark - nvi; - for(p = Cp[i]; p <= Cp[i] + eln - 1; p++) /* scan Ei */ - { - e = Ci[p]; - if(w[e] >= mark) - { - w[e] -= nvi; /* decrement |Le\Lk| */ - } - else if(w[e] != 0) /* ensure e is a live element */ - { - w[e] = degree[e] + wnvi; /* 1st time e seen in scan 1 */ - } - } - } - - /* --- Degree update ------------------------------------------------ */ - for(pk = pk1; pk < pk2; pk++) /* scan2: degree update */ - { - i = Ci[pk]; /* consider node i in Lk */ - p1 = Cp[i]; - p2 = p1 + elen[i] - 1; - pn = p1; - for(h = 0, d = 0, p = p1; p <= p2; p++) /* scan Ei */ - { - e = Ci[p]; - if(w[e] != 0) /* e is an unabsorbed element */ - { - dext = w[e] - mark; /* dext = |Le\Lk| */ - if(dext > 0) - { - d += dext; /* sum up the set differences */ - Ci[pn++] = e; /* keep e in Ei */ - h += e; /* compute the hash of node i */ - } - else - { - Cp[e] = amd_flip (k); /* aggressive absorb. e->k */ - w[e] = 0; /* e is a dead element */ - } - } - } - elen[i] = pn - p1 + 1; /* elen[i] = |Ei| */ - p3 = pn; - p4 = p1 + len[i]; - for(p = p2 + 1; p < p4; p++) /* prune edges in Ai */ - { - j = Ci[p]; - if((nvj = nv[j]) <= 0) continue; /* node j dead or in Lk */ - d += nvj; /* degree(i) += |j| */ - Ci[pn++] = j; /* place j in node list of i */ - h += j; /* compute hash for node i */ - } - if(d == 0) /* check for mass elimination */ - { - Cp[i] = amd_flip (k); /* absorb i into k */ - nvi = -nv[i]; - dk -= nvi; /* |Lk| -= |i| */ - nvk += nvi; /* |k| += nv[i] */ - nel += nvi; - nv[i] = 0; - elen[i] = -1; /* node i is dead */ - } - else - { - degree[i] = std::min (degree[i], d); /* update degree(i) */ - Ci[pn] = Ci[p3]; /* move first node to end */ - Ci[p3] = Ci[p1]; /* move 1st el. to end of Ei */ - Ci[p1] = k; /* add k as 1st element in of Ei */ - len[i] = pn - p1 + 1; /* new len of adj. list of node i */ - h %= n; /* finalize hash of i */ - next[i] = hhead[h]; /* place i in hash bucket */ - hhead[h] = i; - last[i] = h; /* save hash of i in last[i] */ - } - } /* scan2 is done */ - degree[k] = dk; /* finalize |Lk| */ - lemax = std::max(lemax, dk); - mark = internal::cs_wclear(mark+lemax, lemax, w, n); /* clear w */ - - /* --- Supernode detection ------------------------------------------ */ - for(pk = pk1; pk < pk2; pk++) - { - i = Ci[pk]; - if(nv[i] >= 0) continue; /* skip if i is dead */ - h = last[i]; /* scan hash bucket of node i */ - i = hhead[h]; - hhead[h] = -1; /* hash bucket will be empty */ - for(; i != -1 && next[i] != -1; i = next[i], mark++) - { - ln = len[i]; - eln = elen[i]; - for(p = Cp[i]+1; p <= Cp[i] + ln-1; p++) w[Ci[p]] = mark; - jlast = i; - for(j = next[i]; j != -1; ) /* compare i with all j */ - { - ok = (len[j] == ln) && (elen[j] == eln); - for(p = Cp[j] + 1; ok && p <= Cp[j] + ln - 1; p++) - { - if(w[Ci[p]] != mark) ok = 0; /* compare i and j*/ - } - if(ok) /* i and j are identical */ - { - Cp[j] = amd_flip (i); /* absorb j into i */ - nv[i] += nv[j]; - nv[j] = 0; - elen[j] = -1; /* node j is dead */ - j = next[j]; /* delete j from hash bucket */ - next[jlast] = j; - } - else - { - jlast = j; /* j and i are different */ - j = next[j]; - } - } - } - } - - /* --- Finalize new element------------------------------------------ */ - for(p = pk1, pk = pk1; pk < pk2; pk++) /* finalize Lk */ - { - i = Ci[pk]; - if((nvi = -nv[i]) <= 0) continue;/* skip if i is dead */ - nv[i] = nvi; /* restore nv[i] */ - d = degree[i] + dk - nvi; /* compute external degree(i) */ - d = std::min (d, n - nel - nvi); - if(head[d] != -1) last[head[d]] = i; - next[i] = head[d]; /* put i back in degree list */ - last[i] = -1; - head[d] = i; - mindeg = std::min (mindeg, d); /* find new minimum degree */ - degree[i] = d; - Ci[p++] = i; /* place i in Lk */ - } - nv[k] = nvk; /* # nodes absorbed into k */ - if((len[k] = p-pk1) == 0) /* length of adj list of element k*/ - { - Cp[k] = -1; /* k is a root of the tree */ - w[k] = 0; /* k is now a dead element */ - } - if(elenk != 0) cnz = p; /* free unused space in Lk */ - } - - /* --- Postordering ----------------------------------------------------- */ - for(i = 0; i < n; i++) Cp[i] = amd_flip (Cp[i]);/* fix assembly tree */ - for(j = 0; j <= n; j++) head[j] = -1; - for(j = n; j >= 0; j--) /* place unordered nodes in lists */ - { - if(nv[j] > 0) continue; /* skip if j is an element */ - next[j] = head[Cp[j]]; /* place j in list of its parent */ - head[Cp[j]] = j; - } - for(e = n; e >= 0; e--) /* place elements in lists */ - { - if(nv[e] <= 0) continue; /* skip unless e is an element */ - if(Cp[e] != -1) - { - next[e] = head[Cp[e]]; /* place e in list of its parent */ - head[Cp[e]] = e; - } - } - for(k = 0, i = 0; i <= n; i++) /* postorder the assembly tree */ - { - if(Cp[i] == -1) k = internal::cs_tdfs(i, k, head, next, perm.indices().data(), w); - } - - perm.indices().conservativeResize(n); -} - -} // namespace internal - -} // end namespace Eigen - -#endif // EIGEN_SPARSE_AMD_H diff --git a/include/Rivet/Math/eigen3/src/OrderingMethods/Eigen_Colamd.h b/include/Rivet/Math/eigen3/src/OrderingMethods/Eigen_Colamd.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/OrderingMethods/Eigen_Colamd.h +++ /dev/null @@ -1,1843 +0,0 @@ -// // This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Desire Nuentsa Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -// This file is modified from the colamd/symamd library. The copyright is below - -// The authors of the code itself are Stefan I. Larimore and Timothy A. -// Davis (davis@cise.ufl.edu), University of Florida. The algorithm was -// developed in collaboration with John Gilbert, Xerox PARC, and Esmond -// Ng, Oak Ridge National Laboratory. -// -// Date: -// -// September 8, 2003. Version 2.3. -// -// Acknowledgements: -// -// This work was supported by the National Science Foundation, under -// grants DMS-9504974 and DMS-9803599. -// -// Notice: -// -// Copyright (c) 1998-2003 by the University of Florida. -// All Rights Reserved. -// -// THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY -// EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. -// -// Permission is hereby granted to use, copy, modify, and/or distribute -// this program, provided that the Copyright, this License, and the -// Availability of the original version is retained on all copies and made -// accessible to the end-user of any code or package that includes COLAMD -// or any modified version of COLAMD. -// -// Availability: -// -// The colamd/symamd library is available at -// -// http://www.suitesparse.com - - -#ifndef EIGEN_COLAMD_H -#define EIGEN_COLAMD_H - -namespace internal { -/* Ensure that debugging is turned off: */ -#ifndef COLAMD_NDEBUG -#define COLAMD_NDEBUG -#endif /* NDEBUG */ -/* ========================================================================== */ -/* === Knob and statistics definitions ====================================== */ -/* ========================================================================== */ - -/* size of the knobs [ ] array. Only knobs [0..1] are currently used. */ -#define COLAMD_KNOBS 20 - -/* number of output statistics. Only stats [0..6] are currently used. */ -#define COLAMD_STATS 20 - -/* knobs [0] and stats [0]: dense row knob and output statistic. */ -#define COLAMD_DENSE_ROW 0 - -/* knobs [1] and stats [1]: dense column knob and output statistic. */ -#define COLAMD_DENSE_COL 1 - -/* stats [2]: memory defragmentation count output statistic */ -#define COLAMD_DEFRAG_COUNT 2 - -/* stats [3]: colamd status: zero OK, > 0 warning or notice, < 0 error */ -#define COLAMD_STATUS 3 - -/* stats [4..6]: error info, or info on jumbled columns */ -#define COLAMD_INFO1 4 -#define COLAMD_INFO2 5 -#define COLAMD_INFO3 6 - -/* error codes returned in stats [3]: */ -#define COLAMD_OK (0) -#define COLAMD_OK_BUT_JUMBLED (1) -#define COLAMD_ERROR_A_not_present (-1) -#define COLAMD_ERROR_p_not_present (-2) -#define COLAMD_ERROR_nrow_negative (-3) -#define COLAMD_ERROR_ncol_negative (-4) -#define COLAMD_ERROR_nnz_negative (-5) -#define COLAMD_ERROR_p0_nonzero (-6) -#define COLAMD_ERROR_A_too_small (-7) -#define COLAMD_ERROR_col_length_negative (-8) -#define COLAMD_ERROR_row_index_out_of_bounds (-9) -#define COLAMD_ERROR_out_of_memory (-10) -#define COLAMD_ERROR_internal_error (-999) - -/* ========================================================================== */ -/* === Definitions ========================================================== */ -/* ========================================================================== */ - -#define ONES_COMPLEMENT(r) (-(r)-1) - -/* -------------------------------------------------------------------------- */ - -#define COLAMD_EMPTY (-1) - -/* Row and column status */ -#define ALIVE (0) -#define DEAD (-1) - -/* Column status */ -#define DEAD_PRINCIPAL (-1) -#define DEAD_NON_PRINCIPAL (-2) - -/* Macros for row and column status update and checking. */ -#define ROW_IS_DEAD(r) ROW_IS_MARKED_DEAD (Row[r].shared2.mark) -#define ROW_IS_MARKED_DEAD(row_mark) (row_mark < ALIVE) -#define ROW_IS_ALIVE(r) (Row [r].shared2.mark >= ALIVE) -#define COL_IS_DEAD(c) (Col [c].start < ALIVE) -#define COL_IS_ALIVE(c) (Col [c].start >= ALIVE) -#define COL_IS_DEAD_PRINCIPAL(c) (Col [c].start == DEAD_PRINCIPAL) -#define KILL_ROW(r) { Row [r].shared2.mark = DEAD ; } -#define KILL_PRINCIPAL_COL(c) { Col [c].start = DEAD_PRINCIPAL ; } -#define KILL_NON_PRINCIPAL_COL(c) { Col [c].start = DEAD_NON_PRINCIPAL ; } - -/* ========================================================================== */ -/* === Colamd reporting mechanism =========================================== */ -/* ========================================================================== */ - -// == Row and Column structures == -template -struct colamd_col -{ - IndexType start ; /* index for A of first row in this column, or DEAD */ - /* if column is dead */ - IndexType length ; /* number of rows in this column */ - union - { - IndexType thickness ; /* number of original columns represented by this */ - /* col, if the column is alive */ - IndexType parent ; /* parent in parent tree super-column structure, if */ - /* the column is dead */ - } shared1 ; - union - { - IndexType score ; /* the score used to maintain heap, if col is alive */ - IndexType order ; /* pivot ordering of this column, if col is dead */ - } shared2 ; - union - { - IndexType headhash ; /* head of a hash bucket, if col is at the head of */ - /* a degree list */ - IndexType hash ; /* hash value, if col is not in a degree list */ - IndexType prev ; /* previous column in degree list, if col is in a */ - /* degree list (but not at the head of a degree list) */ - } shared3 ; - union - { - IndexType degree_next ; /* next column, if col is in a degree list */ - IndexType hash_next ; /* next column, if col is in a hash list */ - } shared4 ; - -}; - -template -struct Colamd_Row -{ - IndexType start ; /* index for A of first col in this row */ - IndexType length ; /* number of principal columns in this row */ - union - { - IndexType degree ; /* number of principal & non-principal columns in row */ - IndexType p ; /* used as a row pointer in init_rows_cols () */ - } shared1 ; - union - { - IndexType mark ; /* for computing set differences and marking dead rows*/ - IndexType first_column ;/* first column in row (used in garbage collection) */ - } shared2 ; - -}; - -/* ========================================================================== */ -/* === Colamd recommended memory size ======================================= */ -/* ========================================================================== */ - -/* - The recommended length Alen of the array A passed to colamd is given by - the COLAMD_RECOMMENDED (nnz, n_row, n_col) macro. It returns -1 if any - argument is negative. 2*nnz space is required for the row and column - indices of the matrix. colamd_c (n_col) + colamd_r (n_row) space is - required for the Col and Row arrays, respectively, which are internal to - colamd. An additional n_col space is the minimal amount of "elbow room", - and nnz/5 more space is recommended for run time efficiency. - - This macro is not needed when using symamd. - - Explicit typecast to IndexType added Sept. 23, 2002, COLAMD version 2.2, to avoid - gcc -pedantic warning messages. -*/ -template -inline IndexType colamd_c(IndexType n_col) -{ return IndexType( ((n_col) + 1) * sizeof (colamd_col) / sizeof (IndexType) ) ; } - -template -inline IndexType colamd_r(IndexType n_row) -{ return IndexType(((n_row) + 1) * sizeof (Colamd_Row) / sizeof (IndexType)); } - -// Prototypes of non-user callable routines -template -static IndexType init_rows_cols (IndexType n_row, IndexType n_col, Colamd_Row Row [], colamd_col col [], IndexType A [], IndexType p [], IndexType stats[COLAMD_STATS] ); - -template -static void init_scoring (IndexType n_row, IndexType n_col, Colamd_Row Row [], colamd_col Col [], IndexType A [], IndexType head [], double knobs[COLAMD_KNOBS], IndexType *p_n_row2, IndexType *p_n_col2, IndexType *p_max_deg); - -template -static IndexType find_ordering (IndexType n_row, IndexType n_col, IndexType Alen, Colamd_Row Row [], colamd_col Col [], IndexType A [], IndexType head [], IndexType n_col2, IndexType max_deg, IndexType pfree); - -template -static void order_children (IndexType n_col, colamd_col Col [], IndexType p []); - -template -static void detect_super_cols (colamd_col Col [], IndexType A [], IndexType head [], IndexType row_start, IndexType row_length ) ; - -template -static IndexType garbage_collection (IndexType n_row, IndexType n_col, Colamd_Row Row [], colamd_col Col [], IndexType A [], IndexType *pfree) ; - -template -static inline IndexType clear_mark (IndexType n_row, Colamd_Row Row [] ) ; - -/* === No debugging ========================================================= */ - -#define COLAMD_DEBUG0(params) ; -#define COLAMD_DEBUG1(params) ; -#define COLAMD_DEBUG2(params) ; -#define COLAMD_DEBUG3(params) ; -#define COLAMD_DEBUG4(params) ; - -#define COLAMD_ASSERT(expression) ((void) 0) - - -/** - * \brief Returns the recommended value of Alen - * - * Returns recommended value of Alen for use by colamd. - * Returns -1 if any input argument is negative. - * The use of this routine or macro is optional. - * Note that the macro uses its arguments more than once, - * so be careful for side effects, if you pass expressions as arguments to COLAMD_RECOMMENDED. - * - * \param nnz nonzeros in A - * \param n_row number of rows in A - * \param n_col number of columns in A - * \return recommended value of Alen for use by colamd - */ -template -inline IndexType colamd_recommended ( IndexType nnz, IndexType n_row, IndexType n_col) -{ - if ((nnz) < 0 || (n_row) < 0 || (n_col) < 0) - return (-1); - else - return (2 * (nnz) + colamd_c (n_col) + colamd_r (n_row) + (n_col) + ((nnz) / 5)); -} - -/** - * \brief set default parameters The use of this routine is optional. - * - * Colamd: rows with more than (knobs [COLAMD_DENSE_ROW] * n_col) - * entries are removed prior to ordering. Columns with more than - * (knobs [COLAMD_DENSE_COL] * n_row) entries are removed prior to - * ordering, and placed last in the output column ordering. - * - * COLAMD_DENSE_ROW and COLAMD_DENSE_COL are defined as 0 and 1, - * respectively, in colamd.h. Default values of these two knobs - * are both 0.5. Currently, only knobs [0] and knobs [1] are - * used, but future versions may use more knobs. If so, they will - * be properly set to their defaults by the future version of - * colamd_set_defaults, so that the code that calls colamd will - * not need to change, assuming that you either use - * colamd_set_defaults, or pass a (double *) NULL pointer as the - * knobs array to colamd or symamd. - * - * \param knobs parameter settings for colamd - */ - -static inline void colamd_set_defaults(double knobs[COLAMD_KNOBS]) -{ - /* === Local variables ================================================== */ - - int i ; - - if (!knobs) - { - return ; /* no knobs to initialize */ - } - for (i = 0 ; i < COLAMD_KNOBS ; i++) - { - knobs [i] = 0 ; - } - knobs [COLAMD_DENSE_ROW] = 0.5 ; /* ignore rows over 50% dense */ - knobs [COLAMD_DENSE_COL] = 0.5 ; /* ignore columns over 50% dense */ -} - -/** - * \brief Computes a column ordering using the column approximate minimum degree ordering - * - * Computes a column ordering (Q) of A such that P(AQ)=LU or - * (AQ)'AQ=LL' have less fill-in and require fewer floating point - * operations than factorizing the unpermuted matrix A or A'A, - * respectively. - * - * - * \param n_row number of rows in A - * \param n_col number of columns in A - * \param Alen, size of the array A - * \param A row indices of the matrix, of size ALen - * \param p column pointers of A, of size n_col+1 - * \param knobs parameter settings for colamd - * \param stats colamd output statistics and error codes - */ -template -static bool colamd(IndexType n_row, IndexType n_col, IndexType Alen, IndexType *A, IndexType *p, double knobs[COLAMD_KNOBS], IndexType stats[COLAMD_STATS]) -{ - /* === Local variables ================================================== */ - - IndexType i ; /* loop index */ - IndexType nnz ; /* nonzeros in A */ - IndexType Row_size ; /* size of Row [], in integers */ - IndexType Col_size ; /* size of Col [], in integers */ - IndexType need ; /* minimum required length of A */ - Colamd_Row *Row ; /* pointer into A of Row [0..n_row] array */ - colamd_col *Col ; /* pointer into A of Col [0..n_col] array */ - IndexType n_col2 ; /* number of non-dense, non-empty columns */ - IndexType n_row2 ; /* number of non-dense, non-empty rows */ - IndexType ngarbage ; /* number of garbage collections performed */ - IndexType max_deg ; /* maximum row degree */ - double default_knobs [COLAMD_KNOBS] ; /* default knobs array */ - - - /* === Check the input arguments ======================================== */ - - if (!stats) - { - COLAMD_DEBUG0 (("colamd: stats not present\n")) ; - return (false) ; - } - for (i = 0 ; i < COLAMD_STATS ; i++) - { - stats [i] = 0 ; - } - stats [COLAMD_STATUS] = COLAMD_OK ; - stats [COLAMD_INFO1] = -1 ; - stats [COLAMD_INFO2] = -1 ; - - if (!A) /* A is not present */ - { - stats [COLAMD_STATUS] = COLAMD_ERROR_A_not_present ; - COLAMD_DEBUG0 (("colamd: A not present\n")) ; - return (false) ; - } - - if (!p) /* p is not present */ - { - stats [COLAMD_STATUS] = COLAMD_ERROR_p_not_present ; - COLAMD_DEBUG0 (("colamd: p not present\n")) ; - return (false) ; - } - - if (n_row < 0) /* n_row must be >= 0 */ - { - stats [COLAMD_STATUS] = COLAMD_ERROR_nrow_negative ; - stats [COLAMD_INFO1] = n_row ; - COLAMD_DEBUG0 (("colamd: nrow negative %d\n", n_row)) ; - return (false) ; - } - - if (n_col < 0) /* n_col must be >= 0 */ - { - stats [COLAMD_STATUS] = COLAMD_ERROR_ncol_negative ; - stats [COLAMD_INFO1] = n_col ; - COLAMD_DEBUG0 (("colamd: ncol negative %d\n", n_col)) ; - return (false) ; - } - - nnz = p [n_col] ; - if (nnz < 0) /* nnz must be >= 0 */ - { - stats [COLAMD_STATUS] = COLAMD_ERROR_nnz_negative ; - stats [COLAMD_INFO1] = nnz ; - COLAMD_DEBUG0 (("colamd: number of entries negative %d\n", nnz)) ; - return (false) ; - } - - if (p [0] != 0) - { - stats [COLAMD_STATUS] = COLAMD_ERROR_p0_nonzero ; - stats [COLAMD_INFO1] = p [0] ; - COLAMD_DEBUG0 (("colamd: p[0] not zero %d\n", p [0])) ; - return (false) ; - } - - /* === If no knobs, set default knobs =================================== */ - - if (!knobs) - { - colamd_set_defaults (default_knobs) ; - knobs = default_knobs ; - } - - /* === Allocate the Row and Col arrays from array A ===================== */ - - Col_size = colamd_c (n_col) ; - Row_size = colamd_r (n_row) ; - need = 2*nnz + n_col + Col_size + Row_size ; - - if (need > Alen) - { - /* not enough space in array A to perform the ordering */ - stats [COLAMD_STATUS] = COLAMD_ERROR_A_too_small ; - stats [COLAMD_INFO1] = need ; - stats [COLAMD_INFO2] = Alen ; - COLAMD_DEBUG0 (("colamd: Need Alen >= %d, given only Alen = %d\n", need,Alen)); - return (false) ; - } - - Alen -= Col_size + Row_size ; - Col = (colamd_col *) &A [Alen] ; - Row = (Colamd_Row *) &A [Alen + Col_size] ; - - /* === Construct the row and column data structures ===================== */ - - if (!Eigen::internal::init_rows_cols (n_row, n_col, Row, Col, A, p, stats)) - { - /* input matrix is invalid */ - COLAMD_DEBUG0 (("colamd: Matrix invalid\n")) ; - return (false) ; - } - - /* === Initialize scores, kill dense rows/columns ======================= */ - - Eigen::internal::init_scoring (n_row, n_col, Row, Col, A, p, knobs, - &n_row2, &n_col2, &max_deg) ; - - /* === Order the supercolumns =========================================== */ - - ngarbage = Eigen::internal::find_ordering (n_row, n_col, Alen, Row, Col, A, p, - n_col2, max_deg, 2*nnz) ; - - /* === Order the non-principal columns ================================== */ - - Eigen::internal::order_children (n_col, Col, p) ; - - /* === Return statistics in stats ======================================= */ - - stats [COLAMD_DENSE_ROW] = n_row - n_row2 ; - stats [COLAMD_DENSE_COL] = n_col - n_col2 ; - stats [COLAMD_DEFRAG_COUNT] = ngarbage ; - COLAMD_DEBUG0 (("colamd: done.\n")) ; - return (true) ; -} - -/* ========================================================================== */ -/* === NON-USER-CALLABLE ROUTINES: ========================================== */ -/* ========================================================================== */ - -/* There are no user-callable routines beyond this point in the file */ - - -/* ========================================================================== */ -/* === init_rows_cols ======================================================= */ -/* ========================================================================== */ - -/* - Takes the column form of the matrix in A and creates the row form of the - matrix. Also, row and column attributes are stored in the Col and Row - structs. If the columns are un-sorted or contain duplicate row indices, - this routine will also sort and remove duplicate row indices from the - column form of the matrix. Returns false if the matrix is invalid, - true otherwise. Not user-callable. -*/ -template -static IndexType init_rows_cols /* returns true if OK, or false otherwise */ - ( - /* === Parameters ======================================================= */ - - IndexType n_row, /* number of rows of A */ - IndexType n_col, /* number of columns of A */ - Colamd_Row Row [], /* of size n_row+1 */ - colamd_col Col [], /* of size n_col+1 */ - IndexType A [], /* row indices of A, of size Alen */ - IndexType p [], /* pointers to columns in A, of size n_col+1 */ - IndexType stats [COLAMD_STATS] /* colamd statistics */ - ) -{ - /* === Local variables ================================================== */ - - IndexType col ; /* a column index */ - IndexType row ; /* a row index */ - IndexType *cp ; /* a column pointer */ - IndexType *cp_end ; /* a pointer to the end of a column */ - IndexType *rp ; /* a row pointer */ - IndexType *rp_end ; /* a pointer to the end of a row */ - IndexType last_row ; /* previous row */ - - /* === Initialize columns, and check column pointers ==================== */ - - for (col = 0 ; col < n_col ; col++) - { - Col [col].start = p [col] ; - Col [col].length = p [col+1] - p [col] ; - - if ((Col [col].length) < 0) // extra parentheses to work-around gcc bug 10200 - { - /* column pointers must be non-decreasing */ - stats [COLAMD_STATUS] = COLAMD_ERROR_col_length_negative ; - stats [COLAMD_INFO1] = col ; - stats [COLAMD_INFO2] = Col [col].length ; - COLAMD_DEBUG0 (("colamd: col %d length %d < 0\n", col, Col [col].length)) ; - return (false) ; - } - - Col [col].shared1.thickness = 1 ; - Col [col].shared2.score = 0 ; - Col [col].shared3.prev = COLAMD_EMPTY ; - Col [col].shared4.degree_next = COLAMD_EMPTY ; - } - - /* p [0..n_col] no longer needed, used as "head" in subsequent routines */ - - /* === Scan columns, compute row degrees, and check row indices ========= */ - - stats [COLAMD_INFO3] = 0 ; /* number of duplicate or unsorted row indices*/ - - for (row = 0 ; row < n_row ; row++) - { - Row [row].length = 0 ; - Row [row].shared2.mark = -1 ; - } - - for (col = 0 ; col < n_col ; col++) - { - last_row = -1 ; - - cp = &A [p [col]] ; - cp_end = &A [p [col+1]] ; - - while (cp < cp_end) - { - row = *cp++ ; - - /* make sure row indices within range */ - if (row < 0 || row >= n_row) - { - stats [COLAMD_STATUS] = COLAMD_ERROR_row_index_out_of_bounds ; - stats [COLAMD_INFO1] = col ; - stats [COLAMD_INFO2] = row ; - stats [COLAMD_INFO3] = n_row ; - COLAMD_DEBUG0 (("colamd: row %d col %d out of bounds\n", row, col)) ; - return (false) ; - } - - if (row <= last_row || Row [row].shared2.mark == col) - { - /* row index are unsorted or repeated (or both), thus col */ - /* is jumbled. This is a notice, not an error condition. */ - stats [COLAMD_STATUS] = COLAMD_OK_BUT_JUMBLED ; - stats [COLAMD_INFO1] = col ; - stats [COLAMD_INFO2] = row ; - (stats [COLAMD_INFO3]) ++ ; - COLAMD_DEBUG1 (("colamd: row %d col %d unsorted/duplicate\n",row,col)); - } - - if (Row [row].shared2.mark != col) - { - Row [row].length++ ; - } - else - { - /* this is a repeated entry in the column, */ - /* it will be removed */ - Col [col].length-- ; - } - - /* mark the row as having been seen in this column */ - Row [row].shared2.mark = col ; - - last_row = row ; - } - } - - /* === Compute row pointers ============================================= */ - - /* row form of the matrix starts directly after the column */ - /* form of matrix in A */ - Row [0].start = p [n_col] ; - Row [0].shared1.p = Row [0].start ; - Row [0].shared2.mark = -1 ; - for (row = 1 ; row < n_row ; row++) - { - Row [row].start = Row [row-1].start + Row [row-1].length ; - Row [row].shared1.p = Row [row].start ; - Row [row].shared2.mark = -1 ; - } - - /* === Create row form ================================================== */ - - if (stats [COLAMD_STATUS] == COLAMD_OK_BUT_JUMBLED) - { - /* if cols jumbled, watch for repeated row indices */ - for (col = 0 ; col < n_col ; col++) - { - cp = &A [p [col]] ; - cp_end = &A [p [col+1]] ; - while (cp < cp_end) - { - row = *cp++ ; - if (Row [row].shared2.mark != col) - { - A [(Row [row].shared1.p)++] = col ; - Row [row].shared2.mark = col ; - } - } - } - } - else - { - /* if cols not jumbled, we don't need the mark (this is faster) */ - for (col = 0 ; col < n_col ; col++) - { - cp = &A [p [col]] ; - cp_end = &A [p [col+1]] ; - while (cp < cp_end) - { - A [(Row [*cp++].shared1.p)++] = col ; - } - } - } - - /* === Clear the row marks and set row degrees ========================== */ - - for (row = 0 ; row < n_row ; row++) - { - Row [row].shared2.mark = 0 ; - Row [row].shared1.degree = Row [row].length ; - } - - /* === See if we need to re-create columns ============================== */ - - if (stats [COLAMD_STATUS] == COLAMD_OK_BUT_JUMBLED) - { - COLAMD_DEBUG0 (("colamd: reconstructing column form, matrix jumbled\n")) ; - - - /* === Compute col pointers ========================================= */ - - /* col form of the matrix starts at A [0]. */ - /* Note, we may have a gap between the col form and the row */ - /* form if there were duplicate entries, if so, it will be */ - /* removed upon the first garbage collection */ - Col [0].start = 0 ; - p [0] = Col [0].start ; - for (col = 1 ; col < n_col ; col++) - { - /* note that the lengths here are for pruned columns, i.e. */ - /* no duplicate row indices will exist for these columns */ - Col [col].start = Col [col-1].start + Col [col-1].length ; - p [col] = Col [col].start ; - } - - /* === Re-create col form =========================================== */ - - for (row = 0 ; row < n_row ; row++) - { - rp = &A [Row [row].start] ; - rp_end = rp + Row [row].length ; - while (rp < rp_end) - { - A [(p [*rp++])++] = row ; - } - } - } - - /* === Done. Matrix is not (or no longer) jumbled ====================== */ - - return (true) ; -} - - -/* ========================================================================== */ -/* === init_scoring ========================================================= */ -/* ========================================================================== */ - -/* - Kills dense or empty columns and rows, calculates an initial score for - each column, and places all columns in the degree lists. Not user-callable. -*/ -template -static void init_scoring - ( - /* === Parameters ======================================================= */ - - IndexType n_row, /* number of rows of A */ - IndexType n_col, /* number of columns of A */ - Colamd_Row Row [], /* of size n_row+1 */ - colamd_col Col [], /* of size n_col+1 */ - IndexType A [], /* column form and row form of A */ - IndexType head [], /* of size n_col+1 */ - double knobs [COLAMD_KNOBS],/* parameters */ - IndexType *p_n_row2, /* number of non-dense, non-empty rows */ - IndexType *p_n_col2, /* number of non-dense, non-empty columns */ - IndexType *p_max_deg /* maximum row degree */ - ) -{ - /* === Local variables ================================================== */ - - IndexType c ; /* a column index */ - IndexType r, row ; /* a row index */ - IndexType *cp ; /* a column pointer */ - IndexType deg ; /* degree of a row or column */ - IndexType *cp_end ; /* a pointer to the end of a column */ - IndexType *new_cp ; /* new column pointer */ - IndexType col_length ; /* length of pruned column */ - IndexType score ; /* current column score */ - IndexType n_col2 ; /* number of non-dense, non-empty columns */ - IndexType n_row2 ; /* number of non-dense, non-empty rows */ - IndexType dense_row_count ; /* remove rows with more entries than this */ - IndexType dense_col_count ; /* remove cols with more entries than this */ - IndexType min_score ; /* smallest column score */ - IndexType max_deg ; /* maximum row degree */ - IndexType next_col ; /* Used to add to degree list.*/ - - - /* === Extract knobs ==================================================== */ - - dense_row_count = numext::maxi(IndexType(0), numext::mini(IndexType(knobs [COLAMD_DENSE_ROW] * n_col), n_col)) ; - dense_col_count = numext::maxi(IndexType(0), numext::mini(IndexType(knobs [COLAMD_DENSE_COL] * n_row), n_row)) ; - COLAMD_DEBUG1 (("colamd: densecount: %d %d\n", dense_row_count, dense_col_count)) ; - max_deg = 0 ; - n_col2 = n_col ; - n_row2 = n_row ; - - /* === Kill empty columns =============================================== */ - - /* Put the empty columns at the end in their natural order, so that LU */ - /* factorization can proceed as far as possible. */ - for (c = n_col-1 ; c >= 0 ; c--) - { - deg = Col [c].length ; - if (deg == 0) - { - /* this is a empty column, kill and order it last */ - Col [c].shared2.order = --n_col2 ; - KILL_PRINCIPAL_COL (c) ; - } - } - COLAMD_DEBUG1 (("colamd: null columns killed: %d\n", n_col - n_col2)) ; - - /* === Kill dense columns =============================================== */ - - /* Put the dense columns at the end, in their natural order */ - for (c = n_col-1 ; c >= 0 ; c--) - { - /* skip any dead columns */ - if (COL_IS_DEAD (c)) - { - continue ; - } - deg = Col [c].length ; - if (deg > dense_col_count) - { - /* this is a dense column, kill and order it last */ - Col [c].shared2.order = --n_col2 ; - /* decrement the row degrees */ - cp = &A [Col [c].start] ; - cp_end = cp + Col [c].length ; - while (cp < cp_end) - { - Row [*cp++].shared1.degree-- ; - } - KILL_PRINCIPAL_COL (c) ; - } - } - COLAMD_DEBUG1 (("colamd: Dense and null columns killed: %d\n", n_col - n_col2)) ; - - /* === Kill dense and empty rows ======================================== */ - - for (r = 0 ; r < n_row ; r++) - { - deg = Row [r].shared1.degree ; - COLAMD_ASSERT (deg >= 0 && deg <= n_col) ; - if (deg > dense_row_count || deg == 0) - { - /* kill a dense or empty row */ - KILL_ROW (r) ; - --n_row2 ; - } - else - { - /* keep track of max degree of remaining rows */ - max_deg = numext::maxi(max_deg, deg) ; - } - } - COLAMD_DEBUG1 (("colamd: Dense and null rows killed: %d\n", n_row - n_row2)) ; - - /* === Compute initial column scores ==================================== */ - - /* At this point the row degrees are accurate. They reflect the number */ - /* of "live" (non-dense) columns in each row. No empty rows exist. */ - /* Some "live" columns may contain only dead rows, however. These are */ - /* pruned in the code below. */ - - /* now find the initial matlab score for each column */ - for (c = n_col-1 ; c >= 0 ; c--) - { - /* skip dead column */ - if (COL_IS_DEAD (c)) - { - continue ; - } - score = 0 ; - cp = &A [Col [c].start] ; - new_cp = cp ; - cp_end = cp + Col [c].length ; - while (cp < cp_end) - { - /* get a row */ - row = *cp++ ; - /* skip if dead */ - if (ROW_IS_DEAD (row)) - { - continue ; - } - /* compact the column */ - *new_cp++ = row ; - /* add row's external degree */ - score += Row [row].shared1.degree - 1 ; - /* guard against integer overflow */ - score = numext::mini(score, n_col) ; - } - /* determine pruned column length */ - col_length = (IndexType) (new_cp - &A [Col [c].start]) ; - if (col_length == 0) - { - /* a newly-made null column (all rows in this col are "dense" */ - /* and have already been killed) */ - COLAMD_DEBUG2 (("Newly null killed: %d\n", c)) ; - Col [c].shared2.order = --n_col2 ; - KILL_PRINCIPAL_COL (c) ; - } - else - { - /* set column length and set score */ - COLAMD_ASSERT (score >= 0) ; - COLAMD_ASSERT (score <= n_col) ; - Col [c].length = col_length ; - Col [c].shared2.score = score ; - } - } - COLAMD_DEBUG1 (("colamd: Dense, null, and newly-null columns killed: %d\n", - n_col-n_col2)) ; - - /* At this point, all empty rows and columns are dead. All live columns */ - /* are "clean" (containing no dead rows) and simplicial (no supercolumns */ - /* yet). Rows may contain dead columns, but all live rows contain at */ - /* least one live column. */ - - /* === Initialize degree lists ========================================== */ - - - /* clear the hash buckets */ - for (c = 0 ; c <= n_col ; c++) - { - head [c] = COLAMD_EMPTY ; - } - min_score = n_col ; - /* place in reverse order, so low column indices are at the front */ - /* of the lists. This is to encourage natural tie-breaking */ - for (c = n_col-1 ; c >= 0 ; c--) - { - /* only add principal columns to degree lists */ - if (COL_IS_ALIVE (c)) - { - COLAMD_DEBUG4 (("place %d score %d minscore %d ncol %d\n", - c, Col [c].shared2.score, min_score, n_col)) ; - - /* === Add columns score to DList =============================== */ - - score = Col [c].shared2.score ; - - COLAMD_ASSERT (min_score >= 0) ; - COLAMD_ASSERT (min_score <= n_col) ; - COLAMD_ASSERT (score >= 0) ; - COLAMD_ASSERT (score <= n_col) ; - COLAMD_ASSERT (head [score] >= COLAMD_EMPTY) ; - - /* now add this column to dList at proper score location */ - next_col = head [score] ; - Col [c].shared3.prev = COLAMD_EMPTY ; - Col [c].shared4.degree_next = next_col ; - - /* if there already was a column with the same score, set its */ - /* previous pointer to this new column */ - if (next_col != COLAMD_EMPTY) - { - Col [next_col].shared3.prev = c ; - } - head [score] = c ; - - /* see if this score is less than current min */ - min_score = numext::mini(min_score, score) ; - - - } - } - - - /* === Return number of remaining columns, and max row degree =========== */ - - *p_n_col2 = n_col2 ; - *p_n_row2 = n_row2 ; - *p_max_deg = max_deg ; -} - - -/* ========================================================================== */ -/* === find_ordering ======================================================== */ -/* ========================================================================== */ - -/* - Order the principal columns of the supercolumn form of the matrix - (no supercolumns on input). Uses a minimum approximate column minimum - degree ordering method. Not user-callable. -*/ -template -static IndexType find_ordering /* return the number of garbage collections */ - ( - /* === Parameters ======================================================= */ - - IndexType n_row, /* number of rows of A */ - IndexType n_col, /* number of columns of A */ - IndexType Alen, /* size of A, 2*nnz + n_col or larger */ - Colamd_Row Row [], /* of size n_row+1 */ - colamd_col Col [], /* of size n_col+1 */ - IndexType A [], /* column form and row form of A */ - IndexType head [], /* of size n_col+1 */ - IndexType n_col2, /* Remaining columns to order */ - IndexType max_deg, /* Maximum row degree */ - IndexType pfree /* index of first free slot (2*nnz on entry) */ - ) -{ - /* === Local variables ================================================== */ - - IndexType k ; /* current pivot ordering step */ - IndexType pivot_col ; /* current pivot column */ - IndexType *cp ; /* a column pointer */ - IndexType *rp ; /* a row pointer */ - IndexType pivot_row ; /* current pivot row */ - IndexType *new_cp ; /* modified column pointer */ - IndexType *new_rp ; /* modified row pointer */ - IndexType pivot_row_start ; /* pointer to start of pivot row */ - IndexType pivot_row_degree ; /* number of columns in pivot row */ - IndexType pivot_row_length ; /* number of supercolumns in pivot row */ - IndexType pivot_col_score ; /* score of pivot column */ - IndexType needed_memory ; /* free space needed for pivot row */ - IndexType *cp_end ; /* pointer to the end of a column */ - IndexType *rp_end ; /* pointer to the end of a row */ - IndexType row ; /* a row index */ - IndexType col ; /* a column index */ - IndexType max_score ; /* maximum possible score */ - IndexType cur_score ; /* score of current column */ - unsigned int hash ; /* hash value for supernode detection */ - IndexType head_column ; /* head of hash bucket */ - IndexType first_col ; /* first column in hash bucket */ - IndexType tag_mark ; /* marker value for mark array */ - IndexType row_mark ; /* Row [row].shared2.mark */ - IndexType set_difference ; /* set difference size of row with pivot row */ - IndexType min_score ; /* smallest column score */ - IndexType col_thickness ; /* "thickness" (no. of columns in a supercol) */ - IndexType max_mark ; /* maximum value of tag_mark */ - IndexType pivot_col_thickness ; /* number of columns represented by pivot col */ - IndexType prev_col ; /* Used by Dlist operations. */ - IndexType next_col ; /* Used by Dlist operations. */ - IndexType ngarbage ; /* number of garbage collections performed */ - - - /* === Initialization and clear mark ==================================== */ - - max_mark = INT_MAX - n_col ; /* INT_MAX defined in */ - tag_mark = Eigen::internal::clear_mark (n_row, Row) ; - min_score = 0 ; - ngarbage = 0 ; - COLAMD_DEBUG1 (("colamd: Ordering, n_col2=%d\n", n_col2)) ; - - /* === Order the columns ================================================ */ - - for (k = 0 ; k < n_col2 ; /* 'k' is incremented below */) - { - - /* === Select pivot column, and order it ============================ */ - - /* make sure degree list isn't empty */ - COLAMD_ASSERT (min_score >= 0) ; - COLAMD_ASSERT (min_score <= n_col) ; - COLAMD_ASSERT (head [min_score] >= COLAMD_EMPTY) ; - - /* get pivot column from head of minimum degree list */ - while (min_score < n_col && head [min_score] == COLAMD_EMPTY) - { - min_score++ ; - } - pivot_col = head [min_score] ; - COLAMD_ASSERT (pivot_col >= 0 && pivot_col <= n_col) ; - next_col = Col [pivot_col].shared4.degree_next ; - head [min_score] = next_col ; - if (next_col != COLAMD_EMPTY) - { - Col [next_col].shared3.prev = COLAMD_EMPTY ; - } - - COLAMD_ASSERT (COL_IS_ALIVE (pivot_col)) ; - COLAMD_DEBUG3 (("Pivot col: %d\n", pivot_col)) ; - - /* remember score for defrag check */ - pivot_col_score = Col [pivot_col].shared2.score ; - - /* the pivot column is the kth column in the pivot order */ - Col [pivot_col].shared2.order = k ; - - /* increment order count by column thickness */ - pivot_col_thickness = Col [pivot_col].shared1.thickness ; - k += pivot_col_thickness ; - COLAMD_ASSERT (pivot_col_thickness > 0) ; - - /* === Garbage_collection, if necessary ============================= */ - - needed_memory = numext::mini(pivot_col_score, n_col - k) ; - if (pfree + needed_memory >= Alen) - { - pfree = Eigen::internal::garbage_collection (n_row, n_col, Row, Col, A, &A [pfree]) ; - ngarbage++ ; - /* after garbage collection we will have enough */ - COLAMD_ASSERT (pfree + needed_memory < Alen) ; - /* garbage collection has wiped out the Row[].shared2.mark array */ - tag_mark = Eigen::internal::clear_mark (n_row, Row) ; - - } - - /* === Compute pivot row pattern ==================================== */ - - /* get starting location for this new merged row */ - pivot_row_start = pfree ; - - /* initialize new row counts to zero */ - pivot_row_degree = 0 ; - - /* tag pivot column as having been visited so it isn't included */ - /* in merged pivot row */ - Col [pivot_col].shared1.thickness = -pivot_col_thickness ; - - /* pivot row is the union of all rows in the pivot column pattern */ - cp = &A [Col [pivot_col].start] ; - cp_end = cp + Col [pivot_col].length ; - while (cp < cp_end) - { - /* get a row */ - row = *cp++ ; - COLAMD_DEBUG4 (("Pivot col pattern %d %d\n", ROW_IS_ALIVE (row), row)) ; - /* skip if row is dead */ - if (ROW_IS_DEAD (row)) - { - continue ; - } - rp = &A [Row [row].start] ; - rp_end = rp + Row [row].length ; - while (rp < rp_end) - { - /* get a column */ - col = *rp++ ; - /* add the column, if alive and untagged */ - col_thickness = Col [col].shared1.thickness ; - if (col_thickness > 0 && COL_IS_ALIVE (col)) - { - /* tag column in pivot row */ - Col [col].shared1.thickness = -col_thickness ; - COLAMD_ASSERT (pfree < Alen) ; - /* place column in pivot row */ - A [pfree++] = col ; - pivot_row_degree += col_thickness ; - } - } - } - - /* clear tag on pivot column */ - Col [pivot_col].shared1.thickness = pivot_col_thickness ; - max_deg = numext::maxi(max_deg, pivot_row_degree) ; - - - /* === Kill all rows used to construct pivot row ==================== */ - - /* also kill pivot row, temporarily */ - cp = &A [Col [pivot_col].start] ; - cp_end = cp + Col [pivot_col].length ; - while (cp < cp_end) - { - /* may be killing an already dead row */ - row = *cp++ ; - COLAMD_DEBUG3 (("Kill row in pivot col: %d\n", row)) ; - KILL_ROW (row) ; - } - - /* === Select a row index to use as the new pivot row =============== */ - - pivot_row_length = pfree - pivot_row_start ; - if (pivot_row_length > 0) - { - /* pick the "pivot" row arbitrarily (first row in col) */ - pivot_row = A [Col [pivot_col].start] ; - COLAMD_DEBUG3 (("Pivotal row is %d\n", pivot_row)) ; - } - else - { - /* there is no pivot row, since it is of zero length */ - pivot_row = COLAMD_EMPTY ; - COLAMD_ASSERT (pivot_row_length == 0) ; - } - COLAMD_ASSERT (Col [pivot_col].length > 0 || pivot_row_length == 0) ; - - /* === Approximate degree computation =============================== */ - - /* Here begins the computation of the approximate degree. The column */ - /* score is the sum of the pivot row "length", plus the size of the */ - /* set differences of each row in the column minus the pattern of the */ - /* pivot row itself. The column ("thickness") itself is also */ - /* excluded from the column score (we thus use an approximate */ - /* external degree). */ - - /* The time taken by the following code (compute set differences, and */ - /* add them up) is proportional to the size of the data structure */ - /* being scanned - that is, the sum of the sizes of each column in */ - /* the pivot row. Thus, the amortized time to compute a column score */ - /* is proportional to the size of that column (where size, in this */ - /* context, is the column "length", or the number of row indices */ - /* in that column). The number of row indices in a column is */ - /* monotonically non-decreasing, from the length of the original */ - /* column on input to colamd. */ - - /* === Compute set differences ====================================== */ - - COLAMD_DEBUG3 (("** Computing set differences phase. **\n")) ; - - /* pivot row is currently dead - it will be revived later. */ - - COLAMD_DEBUG3 (("Pivot row: ")) ; - /* for each column in pivot row */ - rp = &A [pivot_row_start] ; - rp_end = rp + pivot_row_length ; - while (rp < rp_end) - { - col = *rp++ ; - COLAMD_ASSERT (COL_IS_ALIVE (col) && col != pivot_col) ; - COLAMD_DEBUG3 (("Col: %d\n", col)) ; - - /* clear tags used to construct pivot row pattern */ - col_thickness = -Col [col].shared1.thickness ; - COLAMD_ASSERT (col_thickness > 0) ; - Col [col].shared1.thickness = col_thickness ; - - /* === Remove column from degree list =========================== */ - - cur_score = Col [col].shared2.score ; - prev_col = Col [col].shared3.prev ; - next_col = Col [col].shared4.degree_next ; - COLAMD_ASSERT (cur_score >= 0) ; - COLAMD_ASSERT (cur_score <= n_col) ; - COLAMD_ASSERT (cur_score >= COLAMD_EMPTY) ; - if (prev_col == COLAMD_EMPTY) - { - head [cur_score] = next_col ; - } - else - { - Col [prev_col].shared4.degree_next = next_col ; - } - if (next_col != COLAMD_EMPTY) - { - Col [next_col].shared3.prev = prev_col ; - } - - /* === Scan the column ========================================== */ - - cp = &A [Col [col].start] ; - cp_end = cp + Col [col].length ; - while (cp < cp_end) - { - /* get a row */ - row = *cp++ ; - row_mark = Row [row].shared2.mark ; - /* skip if dead */ - if (ROW_IS_MARKED_DEAD (row_mark)) - { - continue ; - } - COLAMD_ASSERT (row != pivot_row) ; - set_difference = row_mark - tag_mark ; - /* check if the row has been seen yet */ - if (set_difference < 0) - { - COLAMD_ASSERT (Row [row].shared1.degree <= max_deg) ; - set_difference = Row [row].shared1.degree ; - } - /* subtract column thickness from this row's set difference */ - set_difference -= col_thickness ; - COLAMD_ASSERT (set_difference >= 0) ; - /* absorb this row if the set difference becomes zero */ - if (set_difference == 0) - { - COLAMD_DEBUG3 (("aggressive absorption. Row: %d\n", row)) ; - KILL_ROW (row) ; - } - else - { - /* save the new mark */ - Row [row].shared2.mark = set_difference + tag_mark ; - } - } - } - - - /* === Add up set differences for each column ======================= */ - - COLAMD_DEBUG3 (("** Adding set differences phase. **\n")) ; - - /* for each column in pivot row */ - rp = &A [pivot_row_start] ; - rp_end = rp + pivot_row_length ; - while (rp < rp_end) - { - /* get a column */ - col = *rp++ ; - COLAMD_ASSERT (COL_IS_ALIVE (col) && col != pivot_col) ; - hash = 0 ; - cur_score = 0 ; - cp = &A [Col [col].start] ; - /* compact the column */ - new_cp = cp ; - cp_end = cp + Col [col].length ; - - COLAMD_DEBUG4 (("Adding set diffs for Col: %d.\n", col)) ; - - while (cp < cp_end) - { - /* get a row */ - row = *cp++ ; - COLAMD_ASSERT(row >= 0 && row < n_row) ; - row_mark = Row [row].shared2.mark ; - /* skip if dead */ - if (ROW_IS_MARKED_DEAD (row_mark)) - { - continue ; - } - COLAMD_ASSERT (row_mark > tag_mark) ; - /* compact the column */ - *new_cp++ = row ; - /* compute hash function */ - hash += row ; - /* add set difference */ - cur_score += row_mark - tag_mark ; - /* integer overflow... */ - cur_score = numext::mini(cur_score, n_col) ; - } - - /* recompute the column's length */ - Col [col].length = (IndexType) (new_cp - &A [Col [col].start]) ; - - /* === Further mass elimination ================================= */ - - if (Col [col].length == 0) - { - COLAMD_DEBUG4 (("further mass elimination. Col: %d\n", col)) ; - /* nothing left but the pivot row in this column */ - KILL_PRINCIPAL_COL (col) ; - pivot_row_degree -= Col [col].shared1.thickness ; - COLAMD_ASSERT (pivot_row_degree >= 0) ; - /* order it */ - Col [col].shared2.order = k ; - /* increment order count by column thickness */ - k += Col [col].shared1.thickness ; - } - else - { - /* === Prepare for supercolumn detection ==================== */ - - COLAMD_DEBUG4 (("Preparing supercol detection for Col: %d.\n", col)) ; - - /* save score so far */ - Col [col].shared2.score = cur_score ; - - /* add column to hash table, for supercolumn detection */ - hash %= n_col + 1 ; - - COLAMD_DEBUG4 ((" Hash = %d, n_col = %d.\n", hash, n_col)) ; - COLAMD_ASSERT (hash <= n_col) ; - - head_column = head [hash] ; - if (head_column > COLAMD_EMPTY) - { - /* degree list "hash" is non-empty, use prev (shared3) of */ - /* first column in degree list as head of hash bucket */ - first_col = Col [head_column].shared3.headhash ; - Col [head_column].shared3.headhash = col ; - } - else - { - /* degree list "hash" is empty, use head as hash bucket */ - first_col = - (head_column + 2) ; - head [hash] = - (col + 2) ; - } - Col [col].shared4.hash_next = first_col ; - - /* save hash function in Col [col].shared3.hash */ - Col [col].shared3.hash = (IndexType) hash ; - COLAMD_ASSERT (COL_IS_ALIVE (col)) ; - } - } - - /* The approximate external column degree is now computed. */ - - /* === Supercolumn detection ======================================== */ - - COLAMD_DEBUG3 (("** Supercolumn detection phase. **\n")) ; - - Eigen::internal::detect_super_cols (Col, A, head, pivot_row_start, pivot_row_length) ; - - /* === Kill the pivotal column ====================================== */ - - KILL_PRINCIPAL_COL (pivot_col) ; - - /* === Clear mark =================================================== */ - - tag_mark += (max_deg + 1) ; - if (tag_mark >= max_mark) - { - COLAMD_DEBUG2 (("clearing tag_mark\n")) ; - tag_mark = Eigen::internal::clear_mark (n_row, Row) ; - } - - /* === Finalize the new pivot row, and column scores ================ */ - - COLAMD_DEBUG3 (("** Finalize scores phase. **\n")) ; - - /* for each column in pivot row */ - rp = &A [pivot_row_start] ; - /* compact the pivot row */ - new_rp = rp ; - rp_end = rp + pivot_row_length ; - while (rp < rp_end) - { - col = *rp++ ; - /* skip dead columns */ - if (COL_IS_DEAD (col)) - { - continue ; - } - *new_rp++ = col ; - /* add new pivot row to column */ - A [Col [col].start + (Col [col].length++)] = pivot_row ; - - /* retrieve score so far and add on pivot row's degree. */ - /* (we wait until here for this in case the pivot */ - /* row's degree was reduced due to mass elimination). */ - cur_score = Col [col].shared2.score + pivot_row_degree ; - - /* calculate the max possible score as the number of */ - /* external columns minus the 'k' value minus the */ - /* columns thickness */ - max_score = n_col - k - Col [col].shared1.thickness ; - - /* make the score the external degree of the union-of-rows */ - cur_score -= Col [col].shared1.thickness ; - - /* make sure score is less or equal than the max score */ - cur_score = numext::mini(cur_score, max_score) ; - COLAMD_ASSERT (cur_score >= 0) ; - - /* store updated score */ - Col [col].shared2.score = cur_score ; - - /* === Place column back in degree list ========================= */ - - COLAMD_ASSERT (min_score >= 0) ; - COLAMD_ASSERT (min_score <= n_col) ; - COLAMD_ASSERT (cur_score >= 0) ; - COLAMD_ASSERT (cur_score <= n_col) ; - COLAMD_ASSERT (head [cur_score] >= COLAMD_EMPTY) ; - next_col = head [cur_score] ; - Col [col].shared4.degree_next = next_col ; - Col [col].shared3.prev = COLAMD_EMPTY ; - if (next_col != COLAMD_EMPTY) - { - Col [next_col].shared3.prev = col ; - } - head [cur_score] = col ; - - /* see if this score is less than current min */ - min_score = numext::mini(min_score, cur_score) ; - - } - - /* === Resurrect the new pivot row ================================== */ - - if (pivot_row_degree > 0) - { - /* update pivot row length to reflect any cols that were killed */ - /* during super-col detection and mass elimination */ - Row [pivot_row].start = pivot_row_start ; - Row [pivot_row].length = (IndexType) (new_rp - &A[pivot_row_start]) ; - Row [pivot_row].shared1.degree = pivot_row_degree ; - Row [pivot_row].shared2.mark = 0 ; - /* pivot row is no longer dead */ - } - } - - /* === All principal columns have now been ordered ====================== */ - - return (ngarbage) ; -} - - -/* ========================================================================== */ -/* === order_children ======================================================= */ -/* ========================================================================== */ - -/* - The find_ordering routine has ordered all of the principal columns (the - representatives of the supercolumns). The non-principal columns have not - yet been ordered. This routine orders those columns by walking up the - parent tree (a column is a child of the column which absorbed it). The - final permutation vector is then placed in p [0 ... n_col-1], with p [0] - being the first column, and p [n_col-1] being the last. It doesn't look - like it at first glance, but be assured that this routine takes time linear - in the number of columns. Although not immediately obvious, the time - taken by this routine is O (n_col), that is, linear in the number of - columns. Not user-callable. -*/ -template -static inline void order_children -( - /* === Parameters ======================================================= */ - - IndexType n_col, /* number of columns of A */ - colamd_col Col [], /* of size n_col+1 */ - IndexType p [] /* p [0 ... n_col-1] is the column permutation*/ - ) -{ - /* === Local variables ================================================== */ - - IndexType i ; /* loop counter for all columns */ - IndexType c ; /* column index */ - IndexType parent ; /* index of column's parent */ - IndexType order ; /* column's order */ - - /* === Order each non-principal column ================================== */ - - for (i = 0 ; i < n_col ; i++) - { - /* find an un-ordered non-principal column */ - COLAMD_ASSERT (COL_IS_DEAD (i)) ; - if (!COL_IS_DEAD_PRINCIPAL (i) && Col [i].shared2.order == COLAMD_EMPTY) - { - parent = i ; - /* once found, find its principal parent */ - do - { - parent = Col [parent].shared1.parent ; - } while (!COL_IS_DEAD_PRINCIPAL (parent)) ; - - /* now, order all un-ordered non-principal columns along path */ - /* to this parent. collapse tree at the same time */ - c = i ; - /* get order of parent */ - order = Col [parent].shared2.order ; - - do - { - COLAMD_ASSERT (Col [c].shared2.order == COLAMD_EMPTY) ; - - /* order this column */ - Col [c].shared2.order = order++ ; - /* collaps tree */ - Col [c].shared1.parent = parent ; - - /* get immediate parent of this column */ - c = Col [c].shared1.parent ; - - /* continue until we hit an ordered column. There are */ - /* guarranteed not to be anymore unordered columns */ - /* above an ordered column */ - } while (Col [c].shared2.order == COLAMD_EMPTY) ; - - /* re-order the super_col parent to largest order for this group */ - Col [parent].shared2.order = order ; - } - } - - /* === Generate the permutation ========================================= */ - - for (c = 0 ; c < n_col ; c++) - { - p [Col [c].shared2.order] = c ; - } -} - - -/* ========================================================================== */ -/* === detect_super_cols ==================================================== */ -/* ========================================================================== */ - -/* - Detects supercolumns by finding matches between columns in the hash buckets. - Check amongst columns in the set A [row_start ... row_start + row_length-1]. - The columns under consideration are currently *not* in the degree lists, - and have already been placed in the hash buckets. - - The hash bucket for columns whose hash function is equal to h is stored - as follows: - - if head [h] is >= 0, then head [h] contains a degree list, so: - - head [h] is the first column in degree bucket h. - Col [head [h]].headhash gives the first column in hash bucket h. - - otherwise, the degree list is empty, and: - - -(head [h] + 2) is the first column in hash bucket h. - - For a column c in a hash bucket, Col [c].shared3.prev is NOT a "previous - column" pointer. Col [c].shared3.hash is used instead as the hash number - for that column. The value of Col [c].shared4.hash_next is the next column - in the same hash bucket. - - Assuming no, or "few" hash collisions, the time taken by this routine is - linear in the sum of the sizes (lengths) of each column whose score has - just been computed in the approximate degree computation. - Not user-callable. -*/ -template -static void detect_super_cols -( - /* === Parameters ======================================================= */ - - colamd_col Col [], /* of size n_col+1 */ - IndexType A [], /* row indices of A */ - IndexType head [], /* head of degree lists and hash buckets */ - IndexType row_start, /* pointer to set of columns to check */ - IndexType row_length /* number of columns to check */ -) -{ - /* === Local variables ================================================== */ - - IndexType hash ; /* hash value for a column */ - IndexType *rp ; /* pointer to a row */ - IndexType c ; /* a column index */ - IndexType super_c ; /* column index of the column to absorb into */ - IndexType *cp1 ; /* column pointer for column super_c */ - IndexType *cp2 ; /* column pointer for column c */ - IndexType length ; /* length of column super_c */ - IndexType prev_c ; /* column preceding c in hash bucket */ - IndexType i ; /* loop counter */ - IndexType *rp_end ; /* pointer to the end of the row */ - IndexType col ; /* a column index in the row to check */ - IndexType head_column ; /* first column in hash bucket or degree list */ - IndexType first_col ; /* first column in hash bucket */ - - /* === Consider each column in the row ================================== */ - - rp = &A [row_start] ; - rp_end = rp + row_length ; - while (rp < rp_end) - { - col = *rp++ ; - if (COL_IS_DEAD (col)) - { - continue ; - } - - /* get hash number for this column */ - hash = Col [col].shared3.hash ; - COLAMD_ASSERT (hash <= n_col) ; - - /* === Get the first column in this hash bucket ===================== */ - - head_column = head [hash] ; - if (head_column > COLAMD_EMPTY) - { - first_col = Col [head_column].shared3.headhash ; - } - else - { - first_col = - (head_column + 2) ; - } - - /* === Consider each column in the hash bucket ====================== */ - - for (super_c = first_col ; super_c != COLAMD_EMPTY ; - super_c = Col [super_c].shared4.hash_next) - { - COLAMD_ASSERT (COL_IS_ALIVE (super_c)) ; - COLAMD_ASSERT (Col [super_c].shared3.hash == hash) ; - length = Col [super_c].length ; - - /* prev_c is the column preceding column c in the hash bucket */ - prev_c = super_c ; - - /* === Compare super_c with all columns after it ================ */ - - for (c = Col [super_c].shared4.hash_next ; - c != COLAMD_EMPTY ; c = Col [c].shared4.hash_next) - { - COLAMD_ASSERT (c != super_c) ; - COLAMD_ASSERT (COL_IS_ALIVE (c)) ; - COLAMD_ASSERT (Col [c].shared3.hash == hash) ; - - /* not identical if lengths or scores are different */ - if (Col [c].length != length || - Col [c].shared2.score != Col [super_c].shared2.score) - { - prev_c = c ; - continue ; - } - - /* compare the two columns */ - cp1 = &A [Col [super_c].start] ; - cp2 = &A [Col [c].start] ; - - for (i = 0 ; i < length ; i++) - { - /* the columns are "clean" (no dead rows) */ - COLAMD_ASSERT (ROW_IS_ALIVE (*cp1)) ; - COLAMD_ASSERT (ROW_IS_ALIVE (*cp2)) ; - /* row indices will same order for both supercols, */ - /* no gather scatter nessasary */ - if (*cp1++ != *cp2++) - { - break ; - } - } - - /* the two columns are different if the for-loop "broke" */ - if (i != length) - { - prev_c = c ; - continue ; - } - - /* === Got it! two columns are identical =================== */ - - COLAMD_ASSERT (Col [c].shared2.score == Col [super_c].shared2.score) ; - - Col [super_c].shared1.thickness += Col [c].shared1.thickness ; - Col [c].shared1.parent = super_c ; - KILL_NON_PRINCIPAL_COL (c) ; - /* order c later, in order_children() */ - Col [c].shared2.order = COLAMD_EMPTY ; - /* remove c from hash bucket */ - Col [prev_c].shared4.hash_next = Col [c].shared4.hash_next ; - } - } - - /* === Empty this hash bucket ======================================= */ - - if (head_column > COLAMD_EMPTY) - { - /* corresponding degree list "hash" is not empty */ - Col [head_column].shared3.headhash = COLAMD_EMPTY ; - } - else - { - /* corresponding degree list "hash" is empty */ - head [hash] = COLAMD_EMPTY ; - } - } -} - - -/* ========================================================================== */ -/* === garbage_collection =================================================== */ -/* ========================================================================== */ - -/* - Defragments and compacts columns and rows in the workspace A. Used when - all avaliable memory has been used while performing row merging. Returns - the index of the first free position in A, after garbage collection. The - time taken by this routine is linear is the size of the array A, which is - itself linear in the number of nonzeros in the input matrix. - Not user-callable. -*/ -template -static IndexType garbage_collection /* returns the new value of pfree */ - ( - /* === Parameters ======================================================= */ - - IndexType n_row, /* number of rows */ - IndexType n_col, /* number of columns */ - Colamd_Row Row [], /* row info */ - colamd_col Col [], /* column info */ - IndexType A [], /* A [0 ... Alen-1] holds the matrix */ - IndexType *pfree /* &A [0] ... pfree is in use */ - ) -{ - /* === Local variables ================================================== */ - - IndexType *psrc ; /* source pointer */ - IndexType *pdest ; /* destination pointer */ - IndexType j ; /* counter */ - IndexType r ; /* a row index */ - IndexType c ; /* a column index */ - IndexType length ; /* length of a row or column */ - - /* === Defragment the columns =========================================== */ - - pdest = &A[0] ; - for (c = 0 ; c < n_col ; c++) - { - if (COL_IS_ALIVE (c)) - { - psrc = &A [Col [c].start] ; - - /* move and compact the column */ - COLAMD_ASSERT (pdest <= psrc) ; - Col [c].start = (IndexType) (pdest - &A [0]) ; - length = Col [c].length ; - for (j = 0 ; j < length ; j++) - { - r = *psrc++ ; - if (ROW_IS_ALIVE (r)) - { - *pdest++ = r ; - } - } - Col [c].length = (IndexType) (pdest - &A [Col [c].start]) ; - } - } - - /* === Prepare to defragment the rows =================================== */ - - for (r = 0 ; r < n_row ; r++) - { - if (ROW_IS_ALIVE (r)) - { - if (Row [r].length == 0) - { - /* this row is of zero length. cannot compact it, so kill it */ - COLAMD_DEBUG3 (("Defrag row kill\n")) ; - KILL_ROW (r) ; - } - else - { - /* save first column index in Row [r].shared2.first_column */ - psrc = &A [Row [r].start] ; - Row [r].shared2.first_column = *psrc ; - COLAMD_ASSERT (ROW_IS_ALIVE (r)) ; - /* flag the start of the row with the one's complement of row */ - *psrc = ONES_COMPLEMENT (r) ; - - } - } - } - - /* === Defragment the rows ============================================== */ - - psrc = pdest ; - while (psrc < pfree) - { - /* find a negative number ... the start of a row */ - if (*psrc++ < 0) - { - psrc-- ; - /* get the row index */ - r = ONES_COMPLEMENT (*psrc) ; - COLAMD_ASSERT (r >= 0 && r < n_row) ; - /* restore first column index */ - *psrc = Row [r].shared2.first_column ; - COLAMD_ASSERT (ROW_IS_ALIVE (r)) ; - - /* move and compact the row */ - COLAMD_ASSERT (pdest <= psrc) ; - Row [r].start = (IndexType) (pdest - &A [0]) ; - length = Row [r].length ; - for (j = 0 ; j < length ; j++) - { - c = *psrc++ ; - if (COL_IS_ALIVE (c)) - { - *pdest++ = c ; - } - } - Row [r].length = (IndexType) (pdest - &A [Row [r].start]) ; - - } - } - /* ensure we found all the rows */ - COLAMD_ASSERT (debug_rows == 0) ; - - /* === Return the new value of pfree ==================================== */ - - return ((IndexType) (pdest - &A [0])) ; -} - - -/* ========================================================================== */ -/* === clear_mark =========================================================== */ -/* ========================================================================== */ - -/* - Clears the Row [].shared2.mark array, and returns the new tag_mark. - Return value is the new tag_mark. Not user-callable. -*/ -template -static inline IndexType clear_mark /* return the new value for tag_mark */ - ( - /* === Parameters ======================================================= */ - - IndexType n_row, /* number of rows in A */ - Colamd_Row Row [] /* Row [0 ... n_row-1].shared2.mark is set to zero */ - ) -{ - /* === Local variables ================================================== */ - - IndexType r ; - - for (r = 0 ; r < n_row ; r++) - { - if (ROW_IS_ALIVE (r)) - { - Row [r].shared2.mark = 0 ; - } - } - return (1) ; -} - - -} // namespace internal -#endif diff --git a/include/Rivet/Math/eigen3/src/OrderingMethods/Ordering.h b/include/Rivet/Math/eigen3/src/OrderingMethods/Ordering.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/OrderingMethods/Ordering.h +++ /dev/null @@ -1,157 +0,0 @@ - -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_ORDERING_H -#define EIGEN_ORDERING_H - -namespace Eigen { - -#include "Eigen_Colamd.h" - -namespace internal { - -/** \internal - * \ingroup OrderingMethods_Module - * \param[in] A the input non-symmetric matrix - * \param[out] symmat the symmetric pattern A^T+A from the input matrix \a A. - * FIXME: The values should not be considered here - */ -template -void ordering_helper_at_plus_a(const MatrixType& A, MatrixType& symmat) -{ - MatrixType C; - C = A.transpose(); // NOTE: Could be costly - for (int i = 0; i < C.rows(); i++) - { - for (typename MatrixType::InnerIterator it(C, i); it; ++it) - it.valueRef() = 0.0; - } - symmat = C + A; -} - -} - -#ifndef EIGEN_MPL2_ONLY - -/** \ingroup OrderingMethods_Module - * \class AMDOrdering - * - * Functor computing the \em approximate \em minimum \em degree ordering - * If the matrix is not structurally symmetric, an ordering of A^T+A is computed - * \tparam StorageIndex The type of indices of the matrix - * \sa COLAMDOrdering - */ -template -class AMDOrdering -{ - public: - typedef PermutationMatrix PermutationType; - - /** Compute the permutation vector from a sparse matrix - * This routine is much faster if the input matrix is column-major - */ - template - void operator()(const MatrixType& mat, PermutationType& perm) - { - // Compute the symmetric pattern - SparseMatrix symm; - internal::ordering_helper_at_plus_a(mat,symm); - - // Call the AMD routine - //m_mat.prune(keep_diag()); - internal::minimum_degree_ordering(symm, perm); - } - - /** Compute the permutation with a selfadjoint matrix */ - template - void operator()(const SparseSelfAdjointView& mat, PermutationType& perm) - { - SparseMatrix C; C = mat; - - // Call the AMD routine - // m_mat.prune(keep_diag()); //Remove the diagonal elements - internal::minimum_degree_ordering(C, perm); - } -}; - -#endif // EIGEN_MPL2_ONLY - -/** \ingroup OrderingMethods_Module - * \class NaturalOrdering - * - * Functor computing the natural ordering (identity) - * - * \note Returns an empty permutation matrix - * \tparam StorageIndex The type of indices of the matrix - */ -template -class NaturalOrdering -{ - public: - typedef PermutationMatrix PermutationType; - - /** Compute the permutation vector from a column-major sparse matrix */ - template - void operator()(const MatrixType& /*mat*/, PermutationType& perm) - { - perm.resize(0); - } - -}; - -/** \ingroup OrderingMethods_Module - * \class COLAMDOrdering - * - * \tparam StorageIndex The type of indices of the matrix - * - * Functor computing the \em column \em approximate \em minimum \em degree ordering - * The matrix should be in column-major and \b compressed format (see SparseMatrix::makeCompressed()). - */ -template -class COLAMDOrdering -{ - public: - typedef PermutationMatrix PermutationType; - typedef Matrix IndexVector; - - /** Compute the permutation vector \a perm form the sparse matrix \a mat - * \warning The input sparse matrix \a mat must be in compressed mode (see SparseMatrix::makeCompressed()). - */ - template - void operator() (const MatrixType& mat, PermutationType& perm) - { - eigen_assert(mat.isCompressed() && "COLAMDOrdering requires a sparse matrix in compressed mode. Call .makeCompressed() before passing it to COLAMDOrdering"); - - StorageIndex m = StorageIndex(mat.rows()); - StorageIndex n = StorageIndex(mat.cols()); - StorageIndex nnz = StorageIndex(mat.nonZeros()); - // Get the recommended value of Alen to be used by colamd - StorageIndex Alen = internal::colamd_recommended(nnz, m, n); - // Set the default parameters - double knobs [COLAMD_KNOBS]; - StorageIndex stats [COLAMD_STATS]; - internal::colamd_set_defaults(knobs); - - IndexVector p(n+1), A(Alen); - for(StorageIndex i=0; i <= n; i++) p(i) = mat.outerIndexPtr()[i]; - for(StorageIndex i=0; i < nnz; i++) A(i) = mat.innerIndexPtr()[i]; - // Call Colamd routine to compute the ordering - StorageIndex info = internal::colamd(m, n, Alen, A.data(), p.data(), knobs, stats); - EIGEN_UNUSED_VARIABLE(info); - eigen_assert( info && "COLAMD failed " ); - - perm.resize(n); - for (StorageIndex i = 0; i < n; i++) perm.indices()(p(i)) = i; - } -}; - -} // end namespace Eigen - -#endif diff --git a/include/Rivet/Math/eigen3/src/PaStiXSupport/PaStiXSupport.h b/include/Rivet/Math/eigen3/src/PaStiXSupport/PaStiXSupport.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/PaStiXSupport/PaStiXSupport.h +++ /dev/null @@ -1,678 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_PASTIXSUPPORT_H -#define EIGEN_PASTIXSUPPORT_H - -namespace Eigen { - -#if defined(DCOMPLEX) - #define PASTIX_COMPLEX COMPLEX - #define PASTIX_DCOMPLEX DCOMPLEX -#else - #define PASTIX_COMPLEX std::complex - #define PASTIX_DCOMPLEX std::complex -#endif - -/** \ingroup PaStiXSupport_Module - * \brief Interface to the PaStix solver - * - * This class is used to solve the linear systems A.X = B via the PaStix library. - * The matrix can be either real or complex, symmetric or not. - * - * \sa TutorialSparseDirectSolvers - */ -template class PastixLU; -template class PastixLLT; -template class PastixLDLT; - -namespace internal -{ - - template struct pastix_traits; - - template - struct pastix_traits< PastixLU<_MatrixType> > - { - typedef _MatrixType MatrixType; - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef typename _MatrixType::StorageIndex StorageIndex; - }; - - template - struct pastix_traits< PastixLLT<_MatrixType,Options> > - { - typedef _MatrixType MatrixType; - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef typename _MatrixType::StorageIndex StorageIndex; - }; - - template - struct pastix_traits< PastixLDLT<_MatrixType,Options> > - { - typedef _MatrixType MatrixType; - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef typename _MatrixType::StorageIndex StorageIndex; - }; - - void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, float *vals, int *perm, int * invp, float *x, int nbrhs, int *iparm, double *dparm) - { - if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; } - if (nbrhs == 0) {x = NULL; nbrhs=1;} - s_pastix(pastix_data, pastix_comm, n, ptr, idx, vals, perm, invp, x, nbrhs, iparm, dparm); - } - - void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, double *vals, int *perm, int * invp, double *x, int nbrhs, int *iparm, double *dparm) - { - if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; } - if (nbrhs == 0) {x = NULL; nbrhs=1;} - d_pastix(pastix_data, pastix_comm, n, ptr, idx, vals, perm, invp, x, nbrhs, iparm, dparm); - } - - void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, std::complex *vals, int *perm, int * invp, std::complex *x, int nbrhs, int *iparm, double *dparm) - { - if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; } - if (nbrhs == 0) {x = NULL; nbrhs=1;} - c_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast(vals), perm, invp, reinterpret_cast(x), nbrhs, iparm, dparm); - } - - void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, std::complex *vals, int *perm, int * invp, std::complex *x, int nbrhs, int *iparm, double *dparm) - { - if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; } - if (nbrhs == 0) {x = NULL; nbrhs=1;} - z_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast(vals), perm, invp, reinterpret_cast(x), nbrhs, iparm, dparm); - } - - // Convert the matrix to Fortran-style Numbering - template - void c_to_fortran_numbering (MatrixType& mat) - { - if ( !(mat.outerIndexPtr()[0]) ) - { - int i; - for(i = 0; i <= mat.rows(); ++i) - ++mat.outerIndexPtr()[i]; - for(i = 0; i < mat.nonZeros(); ++i) - ++mat.innerIndexPtr()[i]; - } - } - - // Convert to C-style Numbering - template - void fortran_to_c_numbering (MatrixType& mat) - { - // Check the Numbering - if ( mat.outerIndexPtr()[0] == 1 ) - { // Convert to C-style numbering - int i; - for(i = 0; i <= mat.rows(); ++i) - --mat.outerIndexPtr()[i]; - for(i = 0; i < mat.nonZeros(); ++i) - --mat.innerIndexPtr()[i]; - } - } -} - -// This is the base class to interface with PaStiX functions. -// Users should not used this class directly. -template -class PastixBase : public SparseSolverBase -{ - protected: - typedef SparseSolverBase Base; - using Base::derived; - using Base::m_isInitialized; - public: - using Base::_solve_impl; - - typedef typename internal::pastix_traits::MatrixType _MatrixType; - typedef _MatrixType MatrixType; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef Matrix Vector; - typedef SparseMatrix ColSpMatrix; - enum { - ColsAtCompileTime = MatrixType::ColsAtCompileTime, - MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime - }; - - public: - - PastixBase() : m_initisOk(false), m_analysisIsOk(false), m_factorizationIsOk(false), m_pastixdata(0), m_size(0) - { - init(); - } - - ~PastixBase() - { - clean(); - } - - template - bool _solve_impl(const MatrixBase &b, MatrixBase &x) const; - - /** Returns a reference to the integer vector IPARM of PaStiX parameters - * to modify the default parameters. - * The statistics related to the different phases of factorization and solve are saved here as well - * \sa analyzePattern() factorize() - */ - Array& iparm() - { - return m_iparm; - } - - /** Return a reference to a particular index parameter of the IPARM vector - * \sa iparm() - */ - - int& iparm(int idxparam) - { - return m_iparm(idxparam); - } - - /** Returns a reference to the double vector DPARM of PaStiX parameters - * The statistics related to the different phases of factorization and solve are saved here as well - * \sa analyzePattern() factorize() - */ - Array& dparm() - { - return m_dparm; - } - - - /** Return a reference to a particular index parameter of the DPARM vector - * \sa dparm() - */ - double& dparm(int idxparam) - { - return m_dparm(idxparam); - } - - inline Index cols() const { return m_size; } - inline Index rows() const { return m_size; } - - /** \brief Reports whether previous computation was successful. - * - * \returns \c Success if computation was succesful, - * \c NumericalIssue if the PaStiX reports a problem - * \c InvalidInput if the input matrix is invalid - * - * \sa iparm() - */ - ComputationInfo info() const - { - eigen_assert(m_isInitialized && "Decomposition is not initialized."); - return m_info; - } - - protected: - - // Initialize the Pastix data structure, check the matrix - void init(); - - // Compute the ordering and the symbolic factorization - void analyzePattern(ColSpMatrix& mat); - - // Compute the numerical factorization - void factorize(ColSpMatrix& mat); - - // Free all the data allocated by Pastix - void clean() - { - eigen_assert(m_initisOk && "The Pastix structure should be allocated first"); - m_iparm(IPARM_START_TASK) = API_TASK_CLEAN; - m_iparm(IPARM_END_TASK) = API_TASK_CLEAN; - internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, 0, 0, 0, (Scalar*)0, - m_perm.data(), m_invp.data(), 0, 0, m_iparm.data(), m_dparm.data()); - } - - void compute(ColSpMatrix& mat); - - int m_initisOk; - int m_analysisIsOk; - int m_factorizationIsOk; - mutable ComputationInfo m_info; - mutable pastix_data_t *m_pastixdata; // Data structure for pastix - mutable int m_comm; // The MPI communicator identifier - mutable Array m_iparm; // integer vector for the input parameters - mutable Array m_dparm; // Scalar vector for the input parameters - mutable Matrix m_perm; // Permutation vector - mutable Matrix m_invp; // Inverse permutation vector - mutable int m_size; // Size of the matrix -}; - - /** Initialize the PaStiX data structure. - *A first call to this function fills iparm and dparm with the default PaStiX parameters - * \sa iparm() dparm() - */ -template -void PastixBase::init() -{ - m_size = 0; - m_iparm.setZero(IPARM_SIZE); - m_dparm.setZero(DPARM_SIZE); - - m_iparm(IPARM_MODIFY_PARAMETER) = API_NO; - pastix(&m_pastixdata, MPI_COMM_WORLD, - 0, 0, 0, 0, - 0, 0, 0, 1, m_iparm.data(), m_dparm.data()); - - m_iparm[IPARM_MATRIX_VERIFICATION] = API_NO; - m_iparm[IPARM_VERBOSE] = API_VERBOSE_NOT; - m_iparm[IPARM_ORDERING] = API_ORDER_SCOTCH; - m_iparm[IPARM_INCOMPLETE] = API_NO; - m_iparm[IPARM_OOC_LIMIT] = 2000; - m_iparm[IPARM_RHS_MAKING] = API_RHS_B; - m_iparm(IPARM_MATRIX_VERIFICATION) = API_NO; - - m_iparm(IPARM_START_TASK) = API_TASK_INIT; - m_iparm(IPARM_END_TASK) = API_TASK_INIT; - internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, 0, 0, 0, (Scalar*)0, - 0, 0, 0, 0, m_iparm.data(), m_dparm.data()); - - // Check the returned error - if(m_iparm(IPARM_ERROR_NUMBER)) { - m_info = InvalidInput; - m_initisOk = false; - } - else { - m_info = Success; - m_initisOk = true; - } -} - -template -void PastixBase::compute(ColSpMatrix& mat) -{ - eigen_assert(mat.rows() == mat.cols() && "The input matrix should be squared"); - - analyzePattern(mat); - factorize(mat); - - m_iparm(IPARM_MATRIX_VERIFICATION) = API_NO; -} - - -template -void PastixBase::analyzePattern(ColSpMatrix& mat) -{ - eigen_assert(m_initisOk && "The initialization of PaSTiX failed"); - - // clean previous calls - if(m_size>0) - clean(); - - m_size = internal::convert_index(mat.rows()); - m_perm.resize(m_size); - m_invp.resize(m_size); - - m_iparm(IPARM_START_TASK) = API_TASK_ORDERING; - m_iparm(IPARM_END_TASK) = API_TASK_ANALYSE; - internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, m_size, mat.outerIndexPtr(), mat.innerIndexPtr(), - mat.valuePtr(), m_perm.data(), m_invp.data(), 0, 0, m_iparm.data(), m_dparm.data()); - - // Check the returned error - if(m_iparm(IPARM_ERROR_NUMBER)) - { - m_info = NumericalIssue; - m_analysisIsOk = false; - } - else - { - m_info = Success; - m_analysisIsOk = true; - } -} - -template -void PastixBase::factorize(ColSpMatrix& mat) -{ -// if(&m_cpyMat != &mat) m_cpyMat = mat; - eigen_assert(m_analysisIsOk && "The analysis phase should be called before the factorization phase"); - m_iparm(IPARM_START_TASK) = API_TASK_NUMFACT; - m_iparm(IPARM_END_TASK) = API_TASK_NUMFACT; - m_size = internal::convert_index(mat.rows()); - - internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, m_size, mat.outerIndexPtr(), mat.innerIndexPtr(), - mat.valuePtr(), m_perm.data(), m_invp.data(), 0, 0, m_iparm.data(), m_dparm.data()); - - // Check the returned error - if(m_iparm(IPARM_ERROR_NUMBER)) - { - m_info = NumericalIssue; - m_factorizationIsOk = false; - m_isInitialized = false; - } - else - { - m_info = Success; - m_factorizationIsOk = true; - m_isInitialized = true; - } -} - -/* Solve the system */ -template -template -bool PastixBase::_solve_impl(const MatrixBase &b, MatrixBase &x) const -{ - eigen_assert(m_isInitialized && "The matrix should be factorized first"); - EIGEN_STATIC_ASSERT((Dest::Flags&RowMajorBit)==0, - THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES); - int rhs = 1; - - x = b; /* on return, x is overwritten by the computed solution */ - - for (int i = 0; i < b.cols(); i++){ - m_iparm[IPARM_START_TASK] = API_TASK_SOLVE; - m_iparm[IPARM_END_TASK] = API_TASK_REFINE; - - internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, internal::convert_index(x.rows()), 0, 0, 0, - m_perm.data(), m_invp.data(), &x(0, i), rhs, m_iparm.data(), m_dparm.data()); - } - - // Check the returned error - m_info = m_iparm(IPARM_ERROR_NUMBER)==0 ? Success : NumericalIssue; - - return m_iparm(IPARM_ERROR_NUMBER)==0; -} - -/** \ingroup PaStiXSupport_Module - * \class PastixLU - * \brief Sparse direct LU solver based on PaStiX library - * - * This class is used to solve the linear systems A.X = B with a supernodal LU - * factorization in the PaStiX library. The matrix A should be squared and nonsingular - * PaStiX requires that the matrix A has a symmetric structural pattern. - * This interface can symmetrize the input matrix otherwise. - * The vectors or matrices X and B can be either dense or sparse. - * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam IsStrSym Indicates if the input matrix has a symmetric pattern, default is false - * NOTE : Note that if the analysis and factorization phase are called separately, - * the input matrix will be symmetrized at each call, hence it is advised to - * symmetrize the matrix in a end-user program and set \p IsStrSym to true - * - * \implsparsesolverconcept - * - * \sa \ref TutorialSparseSolverConcept, class SparseLU - * - */ -template -class PastixLU : public PastixBase< PastixLU<_MatrixType> > -{ - public: - typedef _MatrixType MatrixType; - typedef PastixBase > Base; - typedef typename Base::ColSpMatrix ColSpMatrix; - typedef typename MatrixType::StorageIndex StorageIndex; - - public: - PastixLU() : Base() - { - init(); - } - - explicit PastixLU(const MatrixType& matrix):Base() - { - init(); - compute(matrix); - } - /** Compute the LU supernodal factorization of \p matrix. - * iparm and dparm can be used to tune the PaStiX parameters. - * see the PaStiX user's manual - * \sa analyzePattern() factorize() - */ - void compute (const MatrixType& matrix) - { - m_structureIsUptodate = false; - ColSpMatrix temp; - grabMatrix(matrix, temp); - Base::compute(temp); - } - /** Compute the LU symbolic factorization of \p matrix using its sparsity pattern. - * Several ordering methods can be used at this step. See the PaStiX user's manual. - * The result of this operation can be used with successive matrices having the same pattern as \p matrix - * \sa factorize() - */ - void analyzePattern(const MatrixType& matrix) - { - m_structureIsUptodate = false; - ColSpMatrix temp; - grabMatrix(matrix, temp); - Base::analyzePattern(temp); - } - - /** Compute the LU supernodal factorization of \p matrix - * WARNING The matrix \p matrix should have the same structural pattern - * as the same used in the analysis phase. - * \sa analyzePattern() - */ - void factorize(const MatrixType& matrix) - { - ColSpMatrix temp; - grabMatrix(matrix, temp); - Base::factorize(temp); - } - protected: - - void init() - { - m_structureIsUptodate = false; - m_iparm(IPARM_SYM) = API_SYM_NO; - m_iparm(IPARM_FACTORIZATION) = API_FACT_LU; - } - - void grabMatrix(const MatrixType& matrix, ColSpMatrix& out) - { - if(IsStrSym) - out = matrix; - else - { - if(!m_structureIsUptodate) - { - // update the transposed structure - m_transposedStructure = matrix.transpose(); - - // Set the elements of the matrix to zero - for (Index j=0; j - * \tparam UpLo The part of the matrix to use : Lower or Upper. The default is Lower as required by PaStiX - * - * \implsparsesolverconcept - * - * \sa \ref TutorialSparseSolverConcept, class SimplicialLLT - */ -template -class PastixLLT : public PastixBase< PastixLLT<_MatrixType, _UpLo> > -{ - public: - typedef _MatrixType MatrixType; - typedef PastixBase > Base; - typedef typename Base::ColSpMatrix ColSpMatrix; - - public: - enum { UpLo = _UpLo }; - PastixLLT() : Base() - { - init(); - } - - explicit PastixLLT(const MatrixType& matrix):Base() - { - init(); - compute(matrix); - } - - /** Compute the L factor of the LL^T supernodal factorization of \p matrix - * \sa analyzePattern() factorize() - */ - void compute (const MatrixType& matrix) - { - ColSpMatrix temp; - grabMatrix(matrix, temp); - Base::compute(temp); - } - - /** Compute the LL^T symbolic factorization of \p matrix using its sparsity pattern - * The result of this operation can be used with successive matrices having the same pattern as \p matrix - * \sa factorize() - */ - void analyzePattern(const MatrixType& matrix) - { - ColSpMatrix temp; - grabMatrix(matrix, temp); - Base::analyzePattern(temp); - } - /** Compute the LL^T supernodal numerical factorization of \p matrix - * \sa analyzePattern() - */ - void factorize(const MatrixType& matrix) - { - ColSpMatrix temp; - grabMatrix(matrix, temp); - Base::factorize(temp); - } - protected: - using Base::m_iparm; - - void init() - { - m_iparm(IPARM_SYM) = API_SYM_YES; - m_iparm(IPARM_FACTORIZATION) = API_FACT_LLT; - } - - void grabMatrix(const MatrixType& matrix, ColSpMatrix& out) - { - out.resize(matrix.rows(), matrix.cols()); - // Pastix supports only lower, column-major matrices - out.template selfadjointView() = matrix.template selfadjointView(); - internal::c_to_fortran_numbering(out); - } -}; - -/** \ingroup PaStiXSupport_Module - * \class PastixLDLT - * \brief A sparse direct supernodal Cholesky (LLT) factorization and solver based on the PaStiX library - * - * This class is used to solve the linear systems A.X = B via a LDL^T supernodal Cholesky factorization - * available in the PaStiX library. The matrix A should be symmetric and positive definite - * WARNING Selfadjoint complex matrices are not supported in the current version of PaStiX - * The vectors or matrices X and B can be either dense or sparse - * - * \tparam MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam UpLo The part of the matrix to use : Lower or Upper. The default is Lower as required by PaStiX - * - * \implsparsesolverconcept - * - * \sa \ref TutorialSparseSolverConcept, class SimplicialLDLT - */ -template -class PastixLDLT : public PastixBase< PastixLDLT<_MatrixType, _UpLo> > -{ - public: - typedef _MatrixType MatrixType; - typedef PastixBase > Base; - typedef typename Base::ColSpMatrix ColSpMatrix; - - public: - enum { UpLo = _UpLo }; - PastixLDLT():Base() - { - init(); - } - - explicit PastixLDLT(const MatrixType& matrix):Base() - { - init(); - compute(matrix); - } - - /** Compute the L and D factors of the LDL^T factorization of \p matrix - * \sa analyzePattern() factorize() - */ - void compute (const MatrixType& matrix) - { - ColSpMatrix temp; - grabMatrix(matrix, temp); - Base::compute(temp); - } - - /** Compute the LDL^T symbolic factorization of \p matrix using its sparsity pattern - * The result of this operation can be used with successive matrices having the same pattern as \p matrix - * \sa factorize() - */ - void analyzePattern(const MatrixType& matrix) - { - ColSpMatrix temp; - grabMatrix(matrix, temp); - Base::analyzePattern(temp); - } - /** Compute the LDL^T supernodal numerical factorization of \p matrix - * - */ - void factorize(const MatrixType& matrix) - { - ColSpMatrix temp; - grabMatrix(matrix, temp); - Base::factorize(temp); - } - - protected: - using Base::m_iparm; - - void init() - { - m_iparm(IPARM_SYM) = API_SYM_YES; - m_iparm(IPARM_FACTORIZATION) = API_FACT_LDLT; - } - - void grabMatrix(const MatrixType& matrix, ColSpMatrix& out) - { - // Pastix supports only lower, column-major matrices - out.resize(matrix.rows(), matrix.cols()); - out.template selfadjointView() = matrix.template selfadjointView(); - internal::c_to_fortran_numbering(out); - } -}; - -} // end namespace Eigen - -#endif diff --git a/include/Rivet/Math/eigen3/src/PardisoSupport/PardisoSupport.h b/include/Rivet/Math/eigen3/src/PardisoSupport/PardisoSupport.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/PardisoSupport/PardisoSupport.h +++ /dev/null @@ -1,543 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to Intel(R) MKL PARDISO - ******************************************************************************** -*/ - -#ifndef EIGEN_PARDISOSUPPORT_H -#define EIGEN_PARDISOSUPPORT_H - -namespace Eigen { - -template class PardisoLU; -template class PardisoLLT; -template class PardisoLDLT; - -namespace internal -{ - template - struct pardiso_run_selector - { - static IndexType run( _MKL_DSS_HANDLE_t pt, IndexType maxfct, IndexType mnum, IndexType type, IndexType phase, IndexType n, void *a, - IndexType *ia, IndexType *ja, IndexType *perm, IndexType nrhs, IndexType *iparm, IndexType msglvl, void *b, void *x) - { - IndexType error = 0; - ::pardiso(pt, &maxfct, &mnum, &type, &phase, &n, a, ia, ja, perm, &nrhs, iparm, &msglvl, b, x, &error); - return error; - } - }; - template<> - struct pardiso_run_selector - { - typedef long long int IndexType; - static IndexType run( _MKL_DSS_HANDLE_t pt, IndexType maxfct, IndexType mnum, IndexType type, IndexType phase, IndexType n, void *a, - IndexType *ia, IndexType *ja, IndexType *perm, IndexType nrhs, IndexType *iparm, IndexType msglvl, void *b, void *x) - { - IndexType error = 0; - ::pardiso_64(pt, &maxfct, &mnum, &type, &phase, &n, a, ia, ja, perm, &nrhs, iparm, &msglvl, b, x, &error); - return error; - } - }; - - template struct pardiso_traits; - - template - struct pardiso_traits< PardisoLU<_MatrixType> > - { - typedef _MatrixType MatrixType; - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef typename _MatrixType::StorageIndex StorageIndex; - }; - - template - struct pardiso_traits< PardisoLLT<_MatrixType, Options> > - { - typedef _MatrixType MatrixType; - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef typename _MatrixType::StorageIndex StorageIndex; - }; - - template - struct pardiso_traits< PardisoLDLT<_MatrixType, Options> > - { - typedef _MatrixType MatrixType; - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef typename _MatrixType::StorageIndex StorageIndex; - }; - -} // end namespace internal - -template -class PardisoImpl : public SparseSolverBase -{ - protected: - typedef SparseSolverBase Base; - using Base::derived; - using Base::m_isInitialized; - - typedef internal::pardiso_traits Traits; - public: - using Base::_solve_impl; - - typedef typename Traits::MatrixType MatrixType; - typedef typename Traits::Scalar Scalar; - typedef typename Traits::RealScalar RealScalar; - typedef typename Traits::StorageIndex StorageIndex; - typedef SparseMatrix SparseMatrixType; - typedef Matrix VectorType; - typedef Matrix IntRowVectorType; - typedef Matrix IntColVectorType; - typedef Array ParameterType; - enum { - ScalarIsComplex = NumTraits::IsComplex, - ColsAtCompileTime = Dynamic, - MaxColsAtCompileTime = Dynamic - }; - - PardisoImpl() - { - eigen_assert((sizeof(StorageIndex) >= sizeof(_INTEGER_t) && sizeof(StorageIndex) <= 8) && "Non-supported index type"); - m_iparm.setZero(); - m_msglvl = 0; // No output - m_isInitialized = false; - } - - ~PardisoImpl() - { - pardisoRelease(); - } - - inline Index cols() const { return m_size; } - inline Index rows() const { return m_size; } - - /** \brief Reports whether previous computation was successful. - * - * \returns \c Success if computation was succesful, - * \c NumericalIssue if the matrix appears to be negative. - */ - ComputationInfo info() const - { - eigen_assert(m_isInitialized && "Decomposition is not initialized."); - return m_info; - } - - /** \warning for advanced usage only. - * \returns a reference to the parameter array controlling PARDISO. - * See the PARDISO manual to know how to use it. */ - ParameterType& pardisoParameterArray() - { - return m_iparm; - } - - /** Performs a symbolic decomposition on the sparcity of \a matrix. - * - * This function is particularly useful when solving for several problems having the same structure. - * - * \sa factorize() - */ - Derived& analyzePattern(const MatrixType& matrix); - - /** Performs a numeric decomposition of \a matrix - * - * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed. - * - * \sa analyzePattern() - */ - Derived& factorize(const MatrixType& matrix); - - Derived& compute(const MatrixType& matrix); - - template - void _solve_impl(const MatrixBase &b, MatrixBase &dest) const; - - protected: - void pardisoRelease() - { - if(m_isInitialized) // Factorization ran at least once - { - internal::pardiso_run_selector::run(m_pt, 1, 1, m_type, -1, internal::convert_index(m_size),0, 0, 0, m_perm.data(), 0, - m_iparm.data(), m_msglvl, NULL, NULL); - m_isInitialized = false; - } - } - - void pardisoInit(int type) - { - m_type = type; - bool symmetric = std::abs(m_type) < 10; - m_iparm[0] = 1; // No solver default - m_iparm[1] = 2; // use Metis for the ordering - m_iparm[2] = 0; // Reserved. Set to zero. (??Numbers of processors, value of OMP_NUM_THREADS??) - m_iparm[3] = 0; // No iterative-direct algorithm - m_iparm[4] = 0; // No user fill-in reducing permutation - m_iparm[5] = 0; // Write solution into x, b is left unchanged - m_iparm[6] = 0; // Not in use - m_iparm[7] = 2; // Max numbers of iterative refinement steps - m_iparm[8] = 0; // Not in use - m_iparm[9] = 13; // Perturb the pivot elements with 1E-13 - m_iparm[10] = symmetric ? 0 : 1; // Use nonsymmetric permutation and scaling MPS - m_iparm[11] = 0; // Not in use - m_iparm[12] = symmetric ? 0 : 1; // Maximum weighted matching algorithm is switched-off (default for symmetric). - // Try m_iparm[12] = 1 in case of inappropriate accuracy - m_iparm[13] = 0; // Output: Number of perturbed pivots - m_iparm[14] = 0; // Not in use - m_iparm[15] = 0; // Not in use - m_iparm[16] = 0; // Not in use - m_iparm[17] = -1; // Output: Number of nonzeros in the factor LU - m_iparm[18] = -1; // Output: Mflops for LU factorization - m_iparm[19] = 0; // Output: Numbers of CG Iterations - - m_iparm[20] = 0; // 1x1 pivoting - m_iparm[26] = 0; // No matrix checker - m_iparm[27] = (sizeof(RealScalar) == 4) ? 1 : 0; - m_iparm[34] = 1; // C indexing - m_iparm[36] = 0; // CSR - m_iparm[59] = 0; // 0 - In-Core ; 1 - Automatic switch between In-Core and Out-of-Core modes ; 2 - Out-of-Core - - memset(m_pt, 0, sizeof(m_pt)); - } - - protected: - // cached data to reduce reallocation, etc. - - void manageErrorCode(Index error) const - { - switch(error) - { - case 0: - m_info = Success; - break; - case -4: - case -7: - m_info = NumericalIssue; - break; - default: - m_info = InvalidInput; - } - } - - mutable SparseMatrixType m_matrix; - mutable ComputationInfo m_info; - bool m_analysisIsOk, m_factorizationIsOk; - StorageIndex m_type, m_msglvl; - mutable void *m_pt[64]; - mutable ParameterType m_iparm; - mutable IntColVectorType m_perm; - Index m_size; - -}; - -template -Derived& PardisoImpl::compute(const MatrixType& a) -{ - m_size = a.rows(); - eigen_assert(a.rows() == a.cols()); - - pardisoRelease(); - m_perm.setZero(m_size); - derived().getMatrix(a); - - Index error; - error = internal::pardiso_run_selector::run(m_pt, 1, 1, m_type, 12, internal::convert_index(m_size), - m_matrix.valuePtr(), m_matrix.outerIndexPtr(), m_matrix.innerIndexPtr(), - m_perm.data(), 0, m_iparm.data(), m_msglvl, NULL, NULL); - manageErrorCode(error); - m_analysisIsOk = true; - m_factorizationIsOk = true; - m_isInitialized = true; - return derived(); -} - -template -Derived& PardisoImpl::analyzePattern(const MatrixType& a) -{ - m_size = a.rows(); - eigen_assert(m_size == a.cols()); - - pardisoRelease(); - m_perm.setZero(m_size); - derived().getMatrix(a); - - Index error; - error = internal::pardiso_run_selector::run(m_pt, 1, 1, m_type, 11, internal::convert_index(m_size), - m_matrix.valuePtr(), m_matrix.outerIndexPtr(), m_matrix.innerIndexPtr(), - m_perm.data(), 0, m_iparm.data(), m_msglvl, NULL, NULL); - - manageErrorCode(error); - m_analysisIsOk = true; - m_factorizationIsOk = false; - m_isInitialized = true; - return derived(); -} - -template -Derived& PardisoImpl::factorize(const MatrixType& a) -{ - eigen_assert(m_analysisIsOk && "You must first call analyzePattern()"); - eigen_assert(m_size == a.rows() && m_size == a.cols()); - - derived().getMatrix(a); - - Index error; - error = internal::pardiso_run_selector::run(m_pt, 1, 1, m_type, 22, internal::convert_index(m_size), - m_matrix.valuePtr(), m_matrix.outerIndexPtr(), m_matrix.innerIndexPtr(), - m_perm.data(), 0, m_iparm.data(), m_msglvl, NULL, NULL); - - manageErrorCode(error); - m_factorizationIsOk = true; - return derived(); -} - -template -template -void PardisoImpl::_solve_impl(const MatrixBase &b, MatrixBase& x) const -{ - if(m_iparm[0] == 0) // Factorization was not computed - { - m_info = InvalidInput; - return; - } - - //Index n = m_matrix.rows(); - Index nrhs = Index(b.cols()); - eigen_assert(m_size==b.rows()); - eigen_assert(((MatrixBase::Flags & RowMajorBit) == 0 || nrhs == 1) && "Row-major right hand sides are not supported"); - eigen_assert(((MatrixBase::Flags & RowMajorBit) == 0 || nrhs == 1) && "Row-major matrices of unknowns are not supported"); - eigen_assert(((nrhs == 1) || b.outerStride() == b.rows())); - - -// switch (transposed) { -// case SvNoTrans : m_iparm[11] = 0 ; break; -// case SvTranspose : m_iparm[11] = 2 ; break; -// case SvAdjoint : m_iparm[11] = 1 ; break; -// default: -// //std::cerr << "Eigen: transposition option \"" << transposed << "\" not supported by the PARDISO backend\n"; -// m_iparm[11] = 0; -// } - - Scalar* rhs_ptr = const_cast(b.derived().data()); - Matrix tmp; - - // Pardiso cannot solve in-place - if(rhs_ptr == x.derived().data()) - { - tmp = b; - rhs_ptr = tmp.data(); - } - - Index error; - error = internal::pardiso_run_selector::run(m_pt, 1, 1, m_type, 33, internal::convert_index(m_size), - m_matrix.valuePtr(), m_matrix.outerIndexPtr(), m_matrix.innerIndexPtr(), - m_perm.data(), internal::convert_index(nrhs), m_iparm.data(), m_msglvl, - rhs_ptr, x.derived().data()); - - manageErrorCode(error); -} - - -/** \ingroup PardisoSupport_Module - * \class PardisoLU - * \brief A sparse direct LU factorization and solver based on the PARDISO library - * - * This class allows to solve for A.X = B sparse linear problems via a direct LU factorization - * using the Intel MKL PARDISO library. The sparse matrix A must be squared and invertible. - * The vectors or matrices X and B can be either dense or sparse. - * - * By default, it runs in in-core mode. To enable PARDISO's out-of-core feature, set: - * \code solver.pardisoParameterArray()[59] = 1; \endcode - * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * - * \implsparsesolverconcept - * - * \sa \ref TutorialSparseSolverConcept, class SparseLU - */ -template -class PardisoLU : public PardisoImpl< PardisoLU > -{ - protected: - typedef PardisoImpl Base; - typedef typename Base::Scalar Scalar; - typedef typename Base::RealScalar RealScalar; - using Base::pardisoInit; - using Base::m_matrix; - friend class PardisoImpl< PardisoLU >; - - public: - - using Base::compute; - using Base::solve; - - PardisoLU() - : Base() - { - pardisoInit(Base::ScalarIsComplex ? 13 : 11); - } - - explicit PardisoLU(const MatrixType& matrix) - : Base() - { - pardisoInit(Base::ScalarIsComplex ? 13 : 11); - compute(matrix); - } - protected: - void getMatrix(const MatrixType& matrix) - { - m_matrix = matrix; - m_matrix.makeCompressed(); - } -}; - -/** \ingroup PardisoSupport_Module - * \class PardisoLLT - * \brief A sparse direct Cholesky (LLT) factorization and solver based on the PARDISO library - * - * This class allows to solve for A.X = B sparse linear problems via a LL^T Cholesky factorization - * using the Intel MKL PARDISO library. The sparse matrix A must be selfajoint and positive definite. - * The vectors or matrices X and B can be either dense or sparse. - * - * By default, it runs in in-core mode. To enable PARDISO's out-of-core feature, set: - * \code solver.pardisoParameterArray()[59] = 1; \endcode - * - * \tparam MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam UpLo can be any bitwise combination of Upper, Lower. The default is Upper, meaning only the upper triangular part has to be used. - * Upper|Lower can be used to tell both triangular parts can be used as input. - * - * \implsparsesolverconcept - * - * \sa \ref TutorialSparseSolverConcept, class SimplicialLLT - */ -template -class PardisoLLT : public PardisoImpl< PardisoLLT > -{ - protected: - typedef PardisoImpl< PardisoLLT > Base; - typedef typename Base::Scalar Scalar; - typedef typename Base::RealScalar RealScalar; - using Base::pardisoInit; - using Base::m_matrix; - friend class PardisoImpl< PardisoLLT >; - - public: - - typedef typename Base::StorageIndex StorageIndex; - enum { UpLo = _UpLo }; - using Base::compute; - - PardisoLLT() - : Base() - { - pardisoInit(Base::ScalarIsComplex ? 4 : 2); - } - - explicit PardisoLLT(const MatrixType& matrix) - : Base() - { - pardisoInit(Base::ScalarIsComplex ? 4 : 2); - compute(matrix); - } - - protected: - - void getMatrix(const MatrixType& matrix) - { - // PARDISO supports only upper, row-major matrices - PermutationMatrix p_null; - m_matrix.resize(matrix.rows(), matrix.cols()); - m_matrix.template selfadjointView() = matrix.template selfadjointView().twistedBy(p_null); - m_matrix.makeCompressed(); - } -}; - -/** \ingroup PardisoSupport_Module - * \class PardisoLDLT - * \brief A sparse direct Cholesky (LDLT) factorization and solver based on the PARDISO library - * - * This class allows to solve for A.X = B sparse linear problems via a LDL^T Cholesky factorization - * using the Intel MKL PARDISO library. The sparse matrix A is assumed to be selfajoint and positive definite. - * For complex matrices, A can also be symmetric only, see the \a Options template parameter. - * The vectors or matrices X and B can be either dense or sparse. - * - * By default, it runs in in-core mode. To enable PARDISO's out-of-core feature, set: - * \code solver.pardisoParameterArray()[59] = 1; \endcode - * - * \tparam MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam Options can be any bitwise combination of Upper, Lower, and Symmetric. The default is Upper, meaning only the upper triangular part has to be used. - * Symmetric can be used for symmetric, non-selfadjoint complex matrices, the default being to assume a selfadjoint matrix. - * Upper|Lower can be used to tell both triangular parts can be used as input. - * - * \implsparsesolverconcept - * - * \sa \ref TutorialSparseSolverConcept, class SimplicialLDLT - */ -template -class PardisoLDLT : public PardisoImpl< PardisoLDLT > -{ - protected: - typedef PardisoImpl< PardisoLDLT > Base; - typedef typename Base::Scalar Scalar; - typedef typename Base::RealScalar RealScalar; - using Base::pardisoInit; - using Base::m_matrix; - friend class PardisoImpl< PardisoLDLT >; - - public: - - typedef typename Base::StorageIndex StorageIndex; - using Base::compute; - enum { UpLo = Options&(Upper|Lower) }; - - PardisoLDLT() - : Base() - { - pardisoInit(Base::ScalarIsComplex ? ( bool(Options&Symmetric) ? 6 : -4 ) : -2); - } - - explicit PardisoLDLT(const MatrixType& matrix) - : Base() - { - pardisoInit(Base::ScalarIsComplex ? ( bool(Options&Symmetric) ? 6 : -4 ) : -2); - compute(matrix); - } - - void getMatrix(const MatrixType& matrix) - { - // PARDISO supports only upper, row-major matrices - PermutationMatrix p_null; - m_matrix.resize(matrix.rows(), matrix.cols()); - m_matrix.template selfadjointView() = matrix.template selfadjointView().twistedBy(p_null); - m_matrix.makeCompressed(); - } -}; - -} // end namespace Eigen - -#endif // EIGEN_PARDISOSUPPORT_H diff --git a/include/Rivet/Math/eigen3/src/QR/ColPivHouseholderQR_LAPACKE.h b/include/Rivet/Math/eigen3/src/QR/ColPivHouseholderQR_LAPACKE.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/QR/ColPivHouseholderQR_LAPACKE.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to LAPACKe - * Householder QR decomposition of a matrix with column pivoting based on - * LAPACKE_?geqp3 function. - ******************************************************************************** -*/ - -#ifndef EIGEN_COLPIVOTINGHOUSEHOLDERQR_LAPACKE_H -#define EIGEN_COLPIVOTINGHOUSEHOLDERQR_LAPACKE_H - -namespace Eigen { - -/** \internal Specialization for the data types supported by LAPACKe */ - -#define EIGEN_LAPACKE_QR_COLPIV(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX, EIGCOLROW, LAPACKE_COLROW) \ -template<> template inline \ -ColPivHouseholderQR >& \ -ColPivHouseholderQR >::compute( \ - const EigenBase& matrix) \ -\ -{ \ - using std::abs; \ - typedef Matrix MatrixType; \ - typedef MatrixType::RealScalar RealScalar; \ - Index rows = matrix.rows();\ - Index cols = matrix.cols();\ -\ - m_qr = matrix;\ - Index size = m_qr.diagonalSize();\ - m_hCoeffs.resize(size);\ -\ - m_colsTranspositions.resize(cols);\ - /*Index number_of_transpositions = 0;*/ \ -\ - m_nonzero_pivots = 0; \ - m_maxpivot = RealScalar(0);\ - m_colsPermutation.resize(cols); \ - m_colsPermutation.indices().setZero(); \ -\ - lapack_int lda = internal::convert_index(m_qr.outerStride()); \ - lapack_int matrix_order = LAPACKE_COLROW; \ - LAPACKE_##LAPACKE_PREFIX##geqp3( matrix_order, internal::convert_index(rows), internal::convert_index(cols), \ - (LAPACKE_TYPE*)m_qr.data(), lda, (lapack_int*)m_colsPermutation.indices().data(), (LAPACKE_TYPE*)m_hCoeffs.data()); \ - m_isInitialized = true; \ - m_maxpivot=m_qr.diagonal().cwiseAbs().maxCoeff(); \ - m_hCoeffs.adjointInPlace(); \ - RealScalar premultiplied_threshold = abs(m_maxpivot) * threshold(); \ - lapack_int *perm = m_colsPermutation.indices().data(); \ - for(Index i=0;i premultiplied_threshold);\ - } \ - for(Index i=0;i \ -struct householder_qr_inplace_blocked \ -{ \ - static void run(MatrixQR& mat, HCoeffs& hCoeffs, Index = 32, \ - typename MatrixQR::Scalar* = 0) \ - { \ - lapack_int m = (lapack_int) mat.rows(); \ - lapack_int n = (lapack_int) mat.cols(); \ - lapack_int lda = (lapack_int) mat.outerStride(); \ - lapack_int matrix_order = (MatrixQR::IsRowMajor) ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \ - LAPACKE_##LAPACKE_PREFIX##geqrf( matrix_order, m, n, (LAPACKE_TYPE*)mat.data(), lda, (LAPACKE_TYPE*)hCoeffs.data()); \ - hCoeffs.adjointInPlace(); \ - } \ -}; - -EIGEN_LAPACKE_QR_NOPIV(double, double, d) -EIGEN_LAPACKE_QR_NOPIV(float, float, s) -EIGEN_LAPACKE_QR_NOPIV(dcomplex, lapack_complex_double, z) -EIGEN_LAPACKE_QR_NOPIV(scomplex, lapack_complex_float, c) - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_QR_LAPACKE_H diff --git a/include/Rivet/Math/eigen3/src/SPQRSupport/SuiteSparseQRSupport.h b/include/Rivet/Math/eigen3/src/SPQRSupport/SuiteSparseQRSupport.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SPQRSupport/SuiteSparseQRSupport.h +++ /dev/null @@ -1,313 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Desire Nuentsa -// Copyright (C) 2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SUITESPARSEQRSUPPORT_H -#define EIGEN_SUITESPARSEQRSUPPORT_H - -namespace Eigen { - - template class SPQR; - template struct SPQRMatrixQReturnType; - template struct SPQRMatrixQTransposeReturnType; - template struct SPQR_QProduct; - namespace internal { - template struct traits > - { - typedef typename SPQRType::MatrixType ReturnType; - }; - template struct traits > - { - typedef typename SPQRType::MatrixType ReturnType; - }; - template struct traits > - { - typedef typename Derived::PlainObject ReturnType; - }; - } // End namespace internal - -/** - * \ingroup SPQRSupport_Module - * \class SPQR - * \brief Sparse QR factorization based on SuiteSparseQR library - * - * This class is used to perform a multithreaded and multifrontal rank-revealing QR decomposition - * of sparse matrices. The result is then used to solve linear leasts_square systems. - * Clearly, a QR factorization is returned such that A*P = Q*R where : - * - * P is the column permutation. Use colsPermutation() to get it. - * - * Q is the orthogonal matrix represented as Householder reflectors. - * Use matrixQ() to get an expression and matrixQ().transpose() to get the transpose. - * You can then apply it to a vector. - * - * R is the sparse triangular factor. Use matrixQR() to get it as SparseMatrix. - * NOTE : The Index type of R is always SuiteSparse_long. You can get it with SPQR::Index - * - * \tparam _MatrixType The type of the sparse matrix A, must be a column-major SparseMatrix<> - * - * \implsparsesolverconcept - * - * - */ -template -class SPQR : public SparseSolverBase > -{ - protected: - typedef SparseSolverBase > Base; - using Base::m_isInitialized; - public: - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef SuiteSparse_long StorageIndex ; - typedef SparseMatrix MatrixType; - typedef Map > PermutationType; - enum { - ColsAtCompileTime = Dynamic, - MaxColsAtCompileTime = Dynamic - }; - public: - SPQR() - : m_ordering(SPQR_ORDERING_DEFAULT), m_allow_tol(SPQR_DEFAULT_TOL), m_tolerance (NumTraits::epsilon()), m_useDefaultThreshold(true) - { - cholmod_l_start(&m_cc); - } - - explicit SPQR(const _MatrixType& matrix) - : m_ordering(SPQR_ORDERING_DEFAULT), m_allow_tol(SPQR_DEFAULT_TOL), m_tolerance (NumTraits::epsilon()), m_useDefaultThreshold(true) - { - cholmod_l_start(&m_cc); - compute(matrix); - } - - ~SPQR() - { - SPQR_free(); - cholmod_l_finish(&m_cc); - } - void SPQR_free() - { - cholmod_l_free_sparse(&m_H, &m_cc); - cholmod_l_free_sparse(&m_cR, &m_cc); - cholmod_l_free_dense(&m_HTau, &m_cc); - std::free(m_E); - std::free(m_HPinv); - } - - void compute(const _MatrixType& matrix) - { - if(m_isInitialized) SPQR_free(); - - MatrixType mat(matrix); - - /* Compute the default threshold as in MatLab, see: - * Tim Davis, "Algorithm 915, SuiteSparseQR: Multifrontal Multithreaded Rank-Revealing - * Sparse QR Factorization, ACM Trans. on Math. Soft. 38(1), 2011, Page 8:3 - */ - RealScalar pivotThreshold = m_tolerance; - if(m_useDefaultThreshold) - { - RealScalar max2Norm = 0.0; - for (int j = 0; j < mat.cols(); j++) max2Norm = numext::maxi(max2Norm, mat.col(j).norm()); - if(max2Norm==RealScalar(0)) - max2Norm = RealScalar(1); - pivotThreshold = 20 * (mat.rows() + mat.cols()) * max2Norm * NumTraits::epsilon(); - } - cholmod_sparse A; - A = viewAsCholmod(mat); - m_rows = matrix.rows(); - Index col = matrix.cols(); - m_rank = SuiteSparseQR(m_ordering, pivotThreshold, col, &A, - &m_cR, &m_E, &m_H, &m_HPinv, &m_HTau, &m_cc); - - if (!m_cR) - { - m_info = NumericalIssue; - m_isInitialized = false; - return; - } - m_info = Success; - m_isInitialized = true; - m_isRUpToDate = false; - } - /** - * Get the number of rows of the input matrix and the Q matrix - */ - inline Index rows() const {return m_rows; } - - /** - * Get the number of columns of the input matrix. - */ - inline Index cols() const { return m_cR->ncol; } - - template - void _solve_impl(const MatrixBase &b, MatrixBase &dest) const - { - eigen_assert(m_isInitialized && " The QR factorization should be computed first, call compute()"); - eigen_assert(b.cols()==1 && "This method is for vectors only"); - - //Compute Q^T * b - typename Dest::PlainObject y, y2; - y = matrixQ().transpose() * b; - - // Solves with the triangular matrix R - Index rk = this->rank(); - y2 = y; - y.resize((std::max)(cols(),Index(y.rows())),y.cols()); - y.topRows(rk) = this->matrixR().topLeftCorner(rk, rk).template triangularView().solve(y2.topRows(rk)); - - // Apply the column permutation - // colsPermutation() performs a copy of the permutation, - // so let's apply it manually: - for(Index i = 0; i < rk; ++i) dest.row(m_E[i]) = y.row(i); - for(Index i = rk; i < cols(); ++i) dest.row(m_E[i]).setZero(); - -// y.bottomRows(y.rows()-rk).setZero(); -// dest = colsPermutation() * y.topRows(cols()); - - m_info = Success; - } - - /** \returns the sparse triangular factor R. It is a sparse matrix - */ - const MatrixType matrixR() const - { - eigen_assert(m_isInitialized && " The QR factorization should be computed first, call compute()"); - if(!m_isRUpToDate) { - m_R = viewAsEigen(*m_cR); - m_isRUpToDate = true; - } - return m_R; - } - /// Get an expression of the matrix Q - SPQRMatrixQReturnType matrixQ() const - { - return SPQRMatrixQReturnType(*this); - } - /// Get the permutation that was applied to columns of A - PermutationType colsPermutation() const - { - eigen_assert(m_isInitialized && "Decomposition is not initialized."); - return PermutationType(m_E, m_cR->ncol); - } - /** - * Gets the rank of the matrix. - * It should be equal to matrixQR().cols if the matrix is full-rank - */ - Index rank() const - { - eigen_assert(m_isInitialized && "Decomposition is not initialized."); - return m_cc.SPQR_istat[4]; - } - /// Set the fill-reducing ordering method to be used - void setSPQROrdering(int ord) { m_ordering = ord;} - /// Set the tolerance tol to treat columns with 2-norm < =tol as zero - void setPivotThreshold(const RealScalar& tol) - { - m_useDefaultThreshold = false; - m_tolerance = tol; - } - - /** \returns a pointer to the SPQR workspace */ - cholmod_common *cholmodCommon() const { return &m_cc; } - - - /** \brief Reports whether previous computation was successful. - * - * \returns \c Success if computation was succesful, - * \c NumericalIssue if the sparse QR can not be computed - */ - ComputationInfo info() const - { - eigen_assert(m_isInitialized && "Decomposition is not initialized."); - return m_info; - } - protected: - bool m_analysisIsOk; - bool m_factorizationIsOk; - mutable bool m_isRUpToDate; - mutable ComputationInfo m_info; - int m_ordering; // Ordering method to use, see SPQR's manual - int m_allow_tol; // Allow to use some tolerance during numerical factorization. - RealScalar m_tolerance; // treat columns with 2-norm below this tolerance as zero - mutable cholmod_sparse *m_cR; // The sparse R factor in cholmod format - mutable MatrixType m_R; // The sparse matrix R in Eigen format - mutable StorageIndex *m_E; // The permutation applied to columns - mutable cholmod_sparse *m_H; //The householder vectors - mutable StorageIndex *m_HPinv; // The row permutation of H - mutable cholmod_dense *m_HTau; // The Householder coefficients - mutable Index m_rank; // The rank of the matrix - mutable cholmod_common m_cc; // Workspace and parameters - bool m_useDefaultThreshold; // Use default threshold - Index m_rows; - template friend struct SPQR_QProduct; -}; - -template -struct SPQR_QProduct : ReturnByValue > -{ - typedef typename SPQRType::Scalar Scalar; - typedef typename SPQRType::StorageIndex StorageIndex; - //Define the constructor to get reference to argument types - SPQR_QProduct(const SPQRType& spqr, const Derived& other, bool transpose) : m_spqr(spqr),m_other(other),m_transpose(transpose) {} - - inline Index rows() const { return m_transpose ? m_spqr.rows() : m_spqr.cols(); } - inline Index cols() const { return m_other.cols(); } - // Assign to a vector - template - void evalTo(ResType& res) const - { - cholmod_dense y_cd; - cholmod_dense *x_cd; - int method = m_transpose ? SPQR_QTX : SPQR_QX; - cholmod_common *cc = m_spqr.cholmodCommon(); - y_cd = viewAsCholmod(m_other.const_cast_derived()); - x_cd = SuiteSparseQR_qmult(method, m_spqr.m_H, m_spqr.m_HTau, m_spqr.m_HPinv, &y_cd, cc); - res = Matrix::Map(reinterpret_cast(x_cd->x), x_cd->nrow, x_cd->ncol); - cholmod_l_free_dense(&x_cd, cc); - } - const SPQRType& m_spqr; - const Derived& m_other; - bool m_transpose; - -}; -template -struct SPQRMatrixQReturnType{ - - SPQRMatrixQReturnType(const SPQRType& spqr) : m_spqr(spqr) {} - template - SPQR_QProduct operator*(const MatrixBase& other) - { - return SPQR_QProduct(m_spqr,other.derived(),false); - } - SPQRMatrixQTransposeReturnType adjoint() const - { - return SPQRMatrixQTransposeReturnType(m_spqr); - } - // To use for operations with the transpose of Q - SPQRMatrixQTransposeReturnType transpose() const - { - return SPQRMatrixQTransposeReturnType(m_spqr); - } - const SPQRType& m_spqr; -}; - -template -struct SPQRMatrixQTransposeReturnType{ - SPQRMatrixQTransposeReturnType(const SPQRType& spqr) : m_spqr(spqr) {} - template - SPQR_QProduct operator*(const MatrixBase& other) - { - return SPQR_QProduct(m_spqr,other.derived(), true); - } - const SPQRType& m_spqr; -}; - -}// End namespace Eigen -#endif diff --git a/include/Rivet/Math/eigen3/src/SVD/JacobiSVD_LAPACKE.h b/include/Rivet/Math/eigen3/src/SVD/JacobiSVD_LAPACKE.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SVD/JacobiSVD_LAPACKE.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ******************************************************************************** - * Content : Eigen bindings to LAPACKe - * Singular Value Decomposition - SVD. - ******************************************************************************** -*/ - -#ifndef EIGEN_JACOBISVD_LAPACKE_H -#define EIGEN_JACOBISVD_LAPACKE_H - -namespace Eigen { - -/** \internal Specialization for the data types supported by LAPACKe */ - -#define EIGEN_LAPACKE_SVD(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_PREFIX, EIGCOLROW, LAPACKE_COLROW) \ -template<> inline \ -JacobiSVD, ColPivHouseholderQRPreconditioner>& \ -JacobiSVD, ColPivHouseholderQRPreconditioner>::compute(const Matrix& matrix, unsigned int computationOptions) \ -{ \ - typedef Matrix MatrixType; \ - /*typedef MatrixType::Scalar Scalar;*/ \ - /*typedef MatrixType::RealScalar RealScalar;*/ \ - allocate(matrix.rows(), matrix.cols(), computationOptions); \ -\ - /*const RealScalar precision = RealScalar(2) * NumTraits::epsilon();*/ \ - m_nonzeroSingularValues = m_diagSize; \ -\ - lapack_int lda = internal::convert_index(matrix.outerStride()), ldu, ldvt; \ - lapack_int matrix_order = LAPACKE_COLROW; \ - char jobu, jobvt; \ - LAPACKE_TYPE *u, *vt, dummy; \ - jobu = (m_computeFullU) ? 'A' : (m_computeThinU) ? 'S' : 'N'; \ - jobvt = (m_computeFullV) ? 'A' : (m_computeThinV) ? 'S' : 'N'; \ - if (computeU()) { \ - ldu = internal::convert_index(m_matrixU.outerStride()); \ - u = (LAPACKE_TYPE*)m_matrixU.data(); \ - } else { ldu=1; u=&dummy; }\ - MatrixType localV; \ - ldvt = (m_computeFullV) ? internal::convert_index(m_cols) : (m_computeThinV) ? internal::convert_index(m_diagSize) : 1; \ - if (computeV()) { \ - localV.resize(ldvt, m_cols); \ - vt = (LAPACKE_TYPE*)localV.data(); \ - } else { ldvt=1; vt=&dummy; }\ - Matrix superb; superb.resize(m_diagSize, 1); \ - MatrixType m_temp; m_temp = matrix; \ - LAPACKE_##LAPACKE_PREFIX##gesvd( matrix_order, jobu, jobvt, internal::convert_index(m_rows), internal::convert_index(m_cols), (LAPACKE_TYPE*)m_temp.data(), lda, (LAPACKE_RTYPE*)m_singularValues.data(), u, ldu, vt, ldvt, superb.data()); \ - if (computeV()) m_matrixV = localV.adjoint(); \ - /* for(int i=0;i -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SIMPLICIAL_CHOLESKY_H -#define EIGEN_SIMPLICIAL_CHOLESKY_H - -namespace Eigen { - -enum SimplicialCholeskyMode { - SimplicialCholeskyLLT, - SimplicialCholeskyLDLT -}; - -namespace internal { - template - struct simplicial_cholesky_grab_input { - typedef CholMatrixType const * ConstCholMatrixPtr; - static void run(const InputMatrixType& input, ConstCholMatrixPtr &pmat, CholMatrixType &tmp) - { - tmp = input; - pmat = &tmp; - } - }; - - template - struct simplicial_cholesky_grab_input { - typedef MatrixType const * ConstMatrixPtr; - static void run(const MatrixType& input, ConstMatrixPtr &pmat, MatrixType &/*tmp*/) - { - pmat = &input; - } - }; -} // end namespace internal - -/** \ingroup SparseCholesky_Module - * \brief A base class for direct sparse Cholesky factorizations - * - * This is a base class for LL^T and LDL^T Cholesky factorizations of sparse matrices that are - * selfadjoint and positive definite. These factorizations allow for solving A.X = B where - * X and B can be either dense or sparse. - * - * In order to reduce the fill-in, a symmetric permutation P is applied prior to the factorization - * such that the factorized matrix is P A P^-1. - * - * \tparam Derived the type of the derived class, that is the actual factorization type. - * - */ -template -class SimplicialCholeskyBase : public SparseSolverBase -{ - typedef SparseSolverBase Base; - using Base::m_isInitialized; - - public: - typedef typename internal::traits::MatrixType MatrixType; - typedef typename internal::traits::OrderingType OrderingType; - enum { UpLo = internal::traits::UpLo }; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef SparseMatrix CholMatrixType; - typedef CholMatrixType const * ConstCholMatrixPtr; - typedef Matrix VectorType; - typedef Matrix VectorI; - - enum { - ColsAtCompileTime = MatrixType::ColsAtCompileTime, - MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime - }; - - public: - - using Base::derived; - - /** Default constructor */ - SimplicialCholeskyBase() - : m_info(Success), m_shiftOffset(0), m_shiftScale(1) - {} - - explicit SimplicialCholeskyBase(const MatrixType& matrix) - : m_info(Success), m_shiftOffset(0), m_shiftScale(1) - { - derived().compute(matrix); - } - - ~SimplicialCholeskyBase() - { - } - - Derived& derived() { return *static_cast(this); } - const Derived& derived() const { return *static_cast(this); } - - inline Index cols() const { return m_matrix.cols(); } - inline Index rows() const { return m_matrix.rows(); } - - /** \brief Reports whether previous computation was successful. - * - * \returns \c Success if computation was succesful, - * \c NumericalIssue if the matrix.appears to be negative. - */ - ComputationInfo info() const - { - eigen_assert(m_isInitialized && "Decomposition is not initialized."); - return m_info; - } - - /** \returns the permutation P - * \sa permutationPinv() */ - const PermutationMatrix& permutationP() const - { return m_P; } - - /** \returns the inverse P^-1 of the permutation P - * \sa permutationP() */ - const PermutationMatrix& permutationPinv() const - { return m_Pinv; } - - /** Sets the shift parameters that will be used to adjust the diagonal coefficients during the numerical factorization. - * - * During the numerical factorization, the diagonal coefficients are transformed by the following linear model:\n - * \c d_ii = \a offset + \a scale * \c d_ii - * - * The default is the identity transformation with \a offset=0, and \a scale=1. - * - * \returns a reference to \c *this. - */ - Derived& setShift(const RealScalar& offset, const RealScalar& scale = 1) - { - m_shiftOffset = offset; - m_shiftScale = scale; - return derived(); - } - -#ifndef EIGEN_PARSED_BY_DOXYGEN - /** \internal */ - template - void dumpMemory(Stream& s) - { - int total = 0; - s << " L: " << ((total+=(m_matrix.cols()+1) * sizeof(int) + m_matrix.nonZeros()*(sizeof(int)+sizeof(Scalar))) >> 20) << "Mb" << "\n"; - s << " diag: " << ((total+=m_diag.size() * sizeof(Scalar)) >> 20) << "Mb" << "\n"; - s << " tree: " << ((total+=m_parent.size() * sizeof(int)) >> 20) << "Mb" << "\n"; - s << " nonzeros: " << ((total+=m_nonZerosPerCol.size() * sizeof(int)) >> 20) << "Mb" << "\n"; - s << " perm: " << ((total+=m_P.size() * sizeof(int)) >> 20) << "Mb" << "\n"; - s << " perm^-1: " << ((total+=m_Pinv.size() * sizeof(int)) >> 20) << "Mb" << "\n"; - s << " TOTAL: " << (total>> 20) << "Mb" << "\n"; - } - - /** \internal */ - template - void _solve_impl(const MatrixBase &b, MatrixBase &dest) const - { - eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()"); - eigen_assert(m_matrix.rows()==b.rows()); - - if(m_info!=Success) - return; - - if(m_P.size()>0) - dest = m_P * b; - else - dest = b; - - if(m_matrix.nonZeros()>0) // otherwise L==I - derived().matrixL().solveInPlace(dest); - - if(m_diag.size()>0) - dest = m_diag.asDiagonal().inverse() * dest; - - if (m_matrix.nonZeros()>0) // otherwise U==I - derived().matrixU().solveInPlace(dest); - - if(m_P.size()>0) - dest = m_Pinv * dest; - } - - template - void _solve_impl(const SparseMatrixBase &b, SparseMatrixBase &dest) const - { - internal::solve_sparse_through_dense_panels(derived(), b, dest); - } - -#endif // EIGEN_PARSED_BY_DOXYGEN - - protected: - - /** Computes the sparse Cholesky decomposition of \a matrix */ - template - void compute(const MatrixType& matrix) - { - eigen_assert(matrix.rows()==matrix.cols()); - Index size = matrix.cols(); - CholMatrixType tmp(size,size); - ConstCholMatrixPtr pmat; - ordering(matrix, pmat, tmp); - analyzePattern_preordered(*pmat, DoLDLT); - factorize_preordered(*pmat); - } - - template - void factorize(const MatrixType& a) - { - eigen_assert(a.rows()==a.cols()); - Index size = a.cols(); - CholMatrixType tmp(size,size); - ConstCholMatrixPtr pmat; - - if(m_P.size()==0 && (UpLo&Upper)==Upper) - { - // If there is no ordering, try to directly use the input matrix without any copy - internal::simplicial_cholesky_grab_input::run(a, pmat, tmp); - } - else - { - tmp.template selfadjointView() = a.template selfadjointView().twistedBy(m_P); - pmat = &tmp; - } - - factorize_preordered(*pmat); - } - - template - void factorize_preordered(const CholMatrixType& a); - - void analyzePattern(const MatrixType& a, bool doLDLT) - { - eigen_assert(a.rows()==a.cols()); - Index size = a.cols(); - CholMatrixType tmp(size,size); - ConstCholMatrixPtr pmat; - ordering(a, pmat, tmp); - analyzePattern_preordered(*pmat,doLDLT); - } - void analyzePattern_preordered(const CholMatrixType& a, bool doLDLT); - - void ordering(const MatrixType& a, ConstCholMatrixPtr &pmat, CholMatrixType& ap); - - /** keeps off-diagonal entries; drops diagonal entries */ - struct keep_diag { - inline bool operator() (const Index& row, const Index& col, const Scalar&) const - { - return row!=col; - } - }; - - mutable ComputationInfo m_info; - bool m_factorizationIsOk; - bool m_analysisIsOk; - - CholMatrixType m_matrix; - VectorType m_diag; // the diagonal coefficients (LDLT mode) - VectorI m_parent; // elimination tree - VectorI m_nonZerosPerCol; - PermutationMatrix m_P; // the permutation - PermutationMatrix m_Pinv; // the inverse permutation - - RealScalar m_shiftOffset; - RealScalar m_shiftScale; -}; - -template > class SimplicialLLT; -template > class SimplicialLDLT; -template > class SimplicialCholesky; - -namespace internal { - -template struct traits > -{ - typedef _MatrixType MatrixType; - typedef _Ordering OrderingType; - enum { UpLo = _UpLo }; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef SparseMatrix CholMatrixType; - typedef TriangularView MatrixL; - typedef TriangularView MatrixU; - static inline MatrixL getL(const MatrixType& m) { return MatrixL(m); } - static inline MatrixU getU(const MatrixType& m) { return MatrixU(m.adjoint()); } -}; - -template struct traits > -{ - typedef _MatrixType MatrixType; - typedef _Ordering OrderingType; - enum { UpLo = _UpLo }; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef SparseMatrix CholMatrixType; - typedef TriangularView MatrixL; - typedef TriangularView MatrixU; - static inline MatrixL getL(const MatrixType& m) { return MatrixL(m); } - static inline MatrixU getU(const MatrixType& m) { return MatrixU(m.adjoint()); } -}; - -template struct traits > -{ - typedef _MatrixType MatrixType; - typedef _Ordering OrderingType; - enum { UpLo = _UpLo }; -}; - -} - -/** \ingroup SparseCholesky_Module - * \class SimplicialLLT - * \brief A direct sparse LLT Cholesky factorizations - * - * This class provides a LL^T Cholesky factorizations of sparse matrices that are - * selfadjoint and positive definite. The factorization allows for solving A.X = B where - * X and B can be either dense or sparse. - * - * In order to reduce the fill-in, a symmetric permutation P is applied prior to the factorization - * such that the factorized matrix is P A P^-1. - * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower - * or Upper. Default is Lower. - * \tparam _Ordering The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<> - * - * \implsparsesolverconcept - * - * \sa class SimplicialLDLT, class AMDOrdering, class NaturalOrdering - */ -template - class SimplicialLLT : public SimplicialCholeskyBase > -{ -public: - typedef _MatrixType MatrixType; - enum { UpLo = _UpLo }; - typedef SimplicialCholeskyBase Base; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef SparseMatrix CholMatrixType; - typedef Matrix VectorType; - typedef internal::traits Traits; - typedef typename Traits::MatrixL MatrixL; - typedef typename Traits::MatrixU MatrixU; -public: - /** Default constructor */ - SimplicialLLT() : Base() {} - /** Constructs and performs the LLT factorization of \a matrix */ - explicit SimplicialLLT(const MatrixType& matrix) - : Base(matrix) {} - - /** \returns an expression of the factor L */ - inline const MatrixL matrixL() const { - eigen_assert(Base::m_factorizationIsOk && "Simplicial LLT not factorized"); - return Traits::getL(Base::m_matrix); - } - - /** \returns an expression of the factor U (= L^*) */ - inline const MatrixU matrixU() const { - eigen_assert(Base::m_factorizationIsOk && "Simplicial LLT not factorized"); - return Traits::getU(Base::m_matrix); - } - - /** Computes the sparse Cholesky decomposition of \a matrix */ - SimplicialLLT& compute(const MatrixType& matrix) - { - Base::template compute(matrix); - return *this; - } - - /** Performs a symbolic decomposition on the sparcity of \a matrix. - * - * This function is particularly useful when solving for several problems having the same structure. - * - * \sa factorize() - */ - void analyzePattern(const MatrixType& a) - { - Base::analyzePattern(a, false); - } - - /** Performs a numeric decomposition of \a matrix - * - * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed. - * - * \sa analyzePattern() - */ - void factorize(const MatrixType& a) - { - Base::template factorize(a); - } - - /** \returns the determinant of the underlying matrix from the current factorization */ - Scalar determinant() const - { - Scalar detL = Base::m_matrix.diagonal().prod(); - return numext::abs2(detL); - } -}; - -/** \ingroup SparseCholesky_Module - * \class SimplicialLDLT - * \brief A direct sparse LDLT Cholesky factorizations without square root. - * - * This class provides a LDL^T Cholesky factorizations without square root of sparse matrices that are - * selfadjoint and positive definite. The factorization allows for solving A.X = B where - * X and B can be either dense or sparse. - * - * In order to reduce the fill-in, a symmetric permutation P is applied prior to the factorization - * such that the factorized matrix is P A P^-1. - * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower - * or Upper. Default is Lower. - * \tparam _Ordering The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<> - * - * \implsparsesolverconcept - * - * \sa class SimplicialLLT, class AMDOrdering, class NaturalOrdering - */ -template - class SimplicialLDLT : public SimplicialCholeskyBase > -{ -public: - typedef _MatrixType MatrixType; - enum { UpLo = _UpLo }; - typedef SimplicialCholeskyBase Base; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef SparseMatrix CholMatrixType; - typedef Matrix VectorType; - typedef internal::traits Traits; - typedef typename Traits::MatrixL MatrixL; - typedef typename Traits::MatrixU MatrixU; -public: - /** Default constructor */ - SimplicialLDLT() : Base() {} - - /** Constructs and performs the LLT factorization of \a matrix */ - explicit SimplicialLDLT(const MatrixType& matrix) - : Base(matrix) {} - - /** \returns a vector expression of the diagonal D */ - inline const VectorType vectorD() const { - eigen_assert(Base::m_factorizationIsOk && "Simplicial LDLT not factorized"); - return Base::m_diag; - } - /** \returns an expression of the factor L */ - inline const MatrixL matrixL() const { - eigen_assert(Base::m_factorizationIsOk && "Simplicial LDLT not factorized"); - return Traits::getL(Base::m_matrix); - } - - /** \returns an expression of the factor U (= L^*) */ - inline const MatrixU matrixU() const { - eigen_assert(Base::m_factorizationIsOk && "Simplicial LDLT not factorized"); - return Traits::getU(Base::m_matrix); - } - - /** Computes the sparse Cholesky decomposition of \a matrix */ - SimplicialLDLT& compute(const MatrixType& matrix) - { - Base::template compute(matrix); - return *this; - } - - /** Performs a symbolic decomposition on the sparcity of \a matrix. - * - * This function is particularly useful when solving for several problems having the same structure. - * - * \sa factorize() - */ - void analyzePattern(const MatrixType& a) - { - Base::analyzePattern(a, true); - } - - /** Performs a numeric decomposition of \a matrix - * - * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed. - * - * \sa analyzePattern() - */ - void factorize(const MatrixType& a) - { - Base::template factorize(a); - } - - /** \returns the determinant of the underlying matrix from the current factorization */ - Scalar determinant() const - { - return Base::m_diag.prod(); - } -}; - -/** \deprecated use SimplicialLDLT or class SimplicialLLT - * \ingroup SparseCholesky_Module - * \class SimplicialCholesky - * - * \sa class SimplicialLDLT, class SimplicialLLT - */ -template - class SimplicialCholesky : public SimplicialCholeskyBase > -{ -public: - typedef _MatrixType MatrixType; - enum { UpLo = _UpLo }; - typedef SimplicialCholeskyBase Base; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef SparseMatrix CholMatrixType; - typedef Matrix VectorType; - typedef internal::traits Traits; - typedef internal::traits > LDLTTraits; - typedef internal::traits > LLTTraits; - public: - SimplicialCholesky() : Base(), m_LDLT(true) {} - - explicit SimplicialCholesky(const MatrixType& matrix) - : Base(), m_LDLT(true) - { - compute(matrix); - } - - SimplicialCholesky& setMode(SimplicialCholeskyMode mode) - { - switch(mode) - { - case SimplicialCholeskyLLT: - m_LDLT = false; - break; - case SimplicialCholeskyLDLT: - m_LDLT = true; - break; - default: - break; - } - - return *this; - } - - inline const VectorType vectorD() const { - eigen_assert(Base::m_factorizationIsOk && "Simplicial Cholesky not factorized"); - return Base::m_diag; - } - inline const CholMatrixType rawMatrix() const { - eigen_assert(Base::m_factorizationIsOk && "Simplicial Cholesky not factorized"); - return Base::m_matrix; - } - - /** Computes the sparse Cholesky decomposition of \a matrix */ - SimplicialCholesky& compute(const MatrixType& matrix) - { - if(m_LDLT) - Base::template compute(matrix); - else - Base::template compute(matrix); - return *this; - } - - /** Performs a symbolic decomposition on the sparcity of \a matrix. - * - * This function is particularly useful when solving for several problems having the same structure. - * - * \sa factorize() - */ - void analyzePattern(const MatrixType& a) - { - Base::analyzePattern(a, m_LDLT); - } - - /** Performs a numeric decomposition of \a matrix - * - * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed. - * - * \sa analyzePattern() - */ - void factorize(const MatrixType& a) - { - if(m_LDLT) - Base::template factorize(a); - else - Base::template factorize(a); - } - - /** \internal */ - template - void _solve_impl(const MatrixBase &b, MatrixBase &dest) const - { - eigen_assert(Base::m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()"); - eigen_assert(Base::m_matrix.rows()==b.rows()); - - if(Base::m_info!=Success) - return; - - if(Base::m_P.size()>0) - dest = Base::m_P * b; - else - dest = b; - - if(Base::m_matrix.nonZeros()>0) // otherwise L==I - { - if(m_LDLT) - LDLTTraits::getL(Base::m_matrix).solveInPlace(dest); - else - LLTTraits::getL(Base::m_matrix).solveInPlace(dest); - } - - if(Base::m_diag.size()>0) - dest = Base::m_diag.asDiagonal().inverse() * dest; - - if (Base::m_matrix.nonZeros()>0) // otherwise I==I - { - if(m_LDLT) - LDLTTraits::getU(Base::m_matrix).solveInPlace(dest); - else - LLTTraits::getU(Base::m_matrix).solveInPlace(dest); - } - - if(Base::m_P.size()>0) - dest = Base::m_Pinv * dest; - } - - /** \internal */ - template - void _solve_impl(const SparseMatrixBase &b, SparseMatrixBase &dest) const - { - internal::solve_sparse_through_dense_panels(*this, b, dest); - } - - Scalar determinant() const - { - if(m_LDLT) - { - return Base::m_diag.prod(); - } - else - { - Scalar detL = Diagonal(Base::m_matrix).prod(); - return numext::abs2(detL); - } - } - - protected: - bool m_LDLT; -}; - -template -void SimplicialCholeskyBase::ordering(const MatrixType& a, ConstCholMatrixPtr &pmat, CholMatrixType& ap) -{ - eigen_assert(a.rows()==a.cols()); - const Index size = a.rows(); - pmat = ≈ - // Note that ordering methods compute the inverse permutation - if(!internal::is_same >::value) - { - { - CholMatrixType C; - C = a.template selfadjointView(); - - OrderingType ordering; - ordering(C,m_Pinv); - } - - if(m_Pinv.size()>0) m_P = m_Pinv.inverse(); - else m_P.resize(0); - - ap.resize(size,size); - ap.template selfadjointView() = a.template selfadjointView().twistedBy(m_P); - } - else - { - m_Pinv.resize(0); - m_P.resize(0); - if(int(UpLo)==int(Lower) || MatrixType::IsRowMajor) - { - // we have to transpose the lower part to to the upper one - ap.resize(size,size); - ap.template selfadjointView() = a.template selfadjointView(); - } - else - internal::simplicial_cholesky_grab_input::run(a, pmat, ap); - } -} - -} // end namespace Eigen - -#endif // EIGEN_SIMPLICIAL_CHOLESKY_H diff --git a/include/Rivet/Math/eigen3/src/SparseCholesky/SimplicialCholesky_impl.h b/include/Rivet/Math/eigen3/src/SparseCholesky/SimplicialCholesky_impl.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCholesky/SimplicialCholesky_impl.h +++ /dev/null @@ -1,199 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2012 Gael Guennebaud - -/* - -NOTE: thes functions vave been adapted from the LDL library: - -LDL Copyright (c) 2005 by Timothy A. Davis. All Rights Reserved. - -LDL License: - - Your use or distribution of LDL or any modified version of - LDL implies that you agree to this License. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - USA - - Permission is hereby granted to use or copy this program under the - terms of the GNU LGPL, provided that the Copyright, this License, - and the Availability of the original version is retained on all copies. - User documentation of any code that uses this code or any modified - version of this code must cite the Copyright, this License, the - Availability note, and "Used by permission." Permission to modify - the code and to distribute modified code is granted, provided the - Copyright, this License, and the Availability note are retained, - and a notice that the code was modified is included. - */ - -#include "../Core/util/NonMPL2.h" - -#ifndef EIGEN_SIMPLICIAL_CHOLESKY_IMPL_H -#define EIGEN_SIMPLICIAL_CHOLESKY_IMPL_H - -namespace Eigen { - -template -void SimplicialCholeskyBase::analyzePattern_preordered(const CholMatrixType& ap, bool doLDLT) -{ - const StorageIndex size = StorageIndex(ap.rows()); - m_matrix.resize(size, size); - m_parent.resize(size); - m_nonZerosPerCol.resize(size); - - ei_declare_aligned_stack_constructed_variable(StorageIndex, tags, size, 0); - - for(StorageIndex k = 0; k < size; ++k) - { - /* L(k,:) pattern: all nodes reachable in etree from nz in A(0:k-1,k) */ - m_parent[k] = -1; /* parent of k is not yet known */ - tags[k] = k; /* mark node k as visited */ - m_nonZerosPerCol[k] = 0; /* count of nonzeros in column k of L */ - for(typename CholMatrixType::InnerIterator it(ap,k); it; ++it) - { - StorageIndex i = it.index(); - if(i < k) - { - /* follow path from i to root of etree, stop at flagged node */ - for(; tags[i] != k; i = m_parent[i]) - { - /* find parent of i if not yet determined */ - if (m_parent[i] == -1) - m_parent[i] = k; - m_nonZerosPerCol[i]++; /* L (k,i) is nonzero */ - tags[i] = k; /* mark i as visited */ - } - } - } - } - - /* construct Lp index array from m_nonZerosPerCol column counts */ - StorageIndex* Lp = m_matrix.outerIndexPtr(); - Lp[0] = 0; - for(StorageIndex k = 0; k < size; ++k) - Lp[k+1] = Lp[k] + m_nonZerosPerCol[k] + (doLDLT ? 0 : 1); - - m_matrix.resizeNonZeros(Lp[size]); - - m_isInitialized = true; - m_info = Success; - m_analysisIsOk = true; - m_factorizationIsOk = false; -} - - -template -template -void SimplicialCholeskyBase::factorize_preordered(const CholMatrixType& ap) -{ - using std::sqrt; - - eigen_assert(m_analysisIsOk && "You must first call analyzePattern()"); - eigen_assert(ap.rows()==ap.cols()); - eigen_assert(m_parent.size()==ap.rows()); - eigen_assert(m_nonZerosPerCol.size()==ap.rows()); - - const StorageIndex size = StorageIndex(ap.rows()); - const StorageIndex* Lp = m_matrix.outerIndexPtr(); - StorageIndex* Li = m_matrix.innerIndexPtr(); - Scalar* Lx = m_matrix.valuePtr(); - - ei_declare_aligned_stack_constructed_variable(Scalar, y, size, 0); - ei_declare_aligned_stack_constructed_variable(StorageIndex, pattern, size, 0); - ei_declare_aligned_stack_constructed_variable(StorageIndex, tags, size, 0); - - bool ok = true; - m_diag.resize(DoLDLT ? size : 0); - - for(StorageIndex k = 0; k < size; ++k) - { - // compute nonzero pattern of kth row of L, in topological order - y[k] = 0.0; // Y(0:k) is now all zero - StorageIndex top = size; // stack for pattern is empty - tags[k] = k; // mark node k as visited - m_nonZerosPerCol[k] = 0; // count of nonzeros in column k of L - for(typename CholMatrixType::InnerIterator it(ap,k); it; ++it) - { - StorageIndex i = it.index(); - if(i <= k) - { - y[i] += numext::conj(it.value()); /* scatter A(i,k) into Y (sum duplicates) */ - Index len; - for(len = 0; tags[i] != k; i = m_parent[i]) - { - pattern[len++] = i; /* L(k,i) is nonzero */ - tags[i] = k; /* mark i as visited */ - } - while(len > 0) - pattern[--top] = pattern[--len]; - } - } - - /* compute numerical values kth row of L (a sparse triangular solve) */ - - RealScalar d = numext::real(y[k]) * m_shiftScale + m_shiftOffset; // get D(k,k), apply the shift function, and clear Y(k) - y[k] = 0.0; - for(; top < size; ++top) - { - Index i = pattern[top]; /* pattern[top:n-1] is pattern of L(:,k) */ - Scalar yi = y[i]; /* get and clear Y(i) */ - y[i] = 0.0; - - /* the nonzero entry L(k,i) */ - Scalar l_ki; - if(DoLDLT) - l_ki = yi / m_diag[i]; - else - yi = l_ki = yi / Lx[Lp[i]]; - - Index p2 = Lp[i] + m_nonZerosPerCol[i]; - Index p; - for(p = Lp[i] + (DoLDLT ? 0 : 1); p < p2; ++p) - y[Li[p]] -= numext::conj(Lx[p]) * yi; - d -= numext::real(l_ki * numext::conj(yi)); - Li[p] = k; /* store L(k,i) in column form of L */ - Lx[p] = l_ki; - ++m_nonZerosPerCol[i]; /* increment count of nonzeros in col i */ - } - if(DoLDLT) - { - m_diag[k] = d; - if(d == RealScalar(0)) - { - ok = false; /* failure, D(k,k) is zero */ - break; - } - } - else - { - Index p = Lp[k] + m_nonZerosPerCol[k]++; - Li[p] = k ; /* store L(k,k) = sqrt (d) in column k */ - if(d <= RealScalar(0)) { - ok = false; /* failure, matrix is not positive definite */ - break; - } - Lx[p] = sqrt(d) ; - } - } - - m_info = ok ? Success : NumericalIssue; - m_factorizationIsOk = true; -} - -} // end namespace Eigen - -#endif // EIGEN_SIMPLICIAL_CHOLESKY_IMPL_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/AmbiVector.h b/include/Rivet/Math/eigen3/src/SparseCore/AmbiVector.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/AmbiVector.h +++ /dev/null @@ -1,377 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_AMBIVECTOR_H -#define EIGEN_AMBIVECTOR_H - -namespace Eigen { - -namespace internal { - -/** \internal - * Hybrid sparse/dense vector class designed for intensive read-write operations. - * - * See BasicSparseLLT and SparseProduct for usage examples. - */ -template -class AmbiVector -{ - public: - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; - typedef typename NumTraits::Real RealScalar; - - explicit AmbiVector(Index size) - : m_buffer(0), m_zero(0), m_size(0), m_allocatedSize(0), m_allocatedElements(0), m_mode(-1) - { - resize(size); - } - - void init(double estimatedDensity); - void init(int mode); - - Index nonZeros() const; - - /** Specifies a sub-vector to work on */ - void setBounds(Index start, Index end) { m_start = convert_index(start); m_end = convert_index(end); } - - void setZero(); - - void restart(); - Scalar& coeffRef(Index i); - Scalar& coeff(Index i); - - class Iterator; - - ~AmbiVector() { delete[] m_buffer; } - - void resize(Index size) - { - if (m_allocatedSize < size) - reallocate(size); - m_size = convert_index(size); - } - - StorageIndex size() const { return m_size; } - - protected: - StorageIndex convert_index(Index idx) - { - return internal::convert_index(idx); - } - - void reallocate(Index size) - { - // if the size of the matrix is not too large, let's allocate a bit more than needed such - // that we can handle dense vector even in sparse mode. - delete[] m_buffer; - if (size<1000) - { - Index allocSize = (size * sizeof(ListEl) + sizeof(Scalar) - 1)/sizeof(Scalar); - m_allocatedElements = convert_index((allocSize*sizeof(Scalar))/sizeof(ListEl)); - m_buffer = new Scalar[allocSize]; - } - else - { - m_allocatedElements = convert_index((size*sizeof(Scalar))/sizeof(ListEl)); - m_buffer = new Scalar[size]; - } - m_size = convert_index(size); - m_start = 0; - m_end = m_size; - } - - void reallocateSparse() - { - Index copyElements = m_allocatedElements; - m_allocatedElements = (std::min)(StorageIndex(m_allocatedElements*1.5),m_size); - Index allocSize = m_allocatedElements * sizeof(ListEl); - allocSize = (allocSize + sizeof(Scalar) - 1)/sizeof(Scalar); - Scalar* newBuffer = new Scalar[allocSize]; - memcpy(newBuffer, m_buffer, copyElements * sizeof(ListEl)); - delete[] m_buffer; - m_buffer = newBuffer; - } - - protected: - // element type of the linked list - struct ListEl - { - StorageIndex next; - StorageIndex index; - Scalar value; - }; - - // used to store data in both mode - Scalar* m_buffer; - Scalar m_zero; - StorageIndex m_size; - StorageIndex m_start; - StorageIndex m_end; - StorageIndex m_allocatedSize; - StorageIndex m_allocatedElements; - StorageIndex m_mode; - - // linked list mode - StorageIndex m_llStart; - StorageIndex m_llCurrent; - StorageIndex m_llSize; -}; - -/** \returns the number of non zeros in the current sub vector */ -template -Index AmbiVector<_Scalar,_StorageIndex>::nonZeros() const -{ - if (m_mode==IsSparse) - return m_llSize; - else - return m_end - m_start; -} - -template -void AmbiVector<_Scalar,_StorageIndex>::init(double estimatedDensity) -{ - if (estimatedDensity>0.1) - init(IsDense); - else - init(IsSparse); -} - -template -void AmbiVector<_Scalar,_StorageIndex>::init(int mode) -{ - m_mode = mode; - if (m_mode==IsSparse) - { - m_llSize = 0; - m_llStart = -1; - } -} - -/** Must be called whenever we might perform a write access - * with an index smaller than the previous one. - * - * Don't worry, this function is extremely cheap. - */ -template -void AmbiVector<_Scalar,_StorageIndex>::restart() -{ - m_llCurrent = m_llStart; -} - -/** Set all coefficients of current subvector to zero */ -template -void AmbiVector<_Scalar,_StorageIndex>::setZero() -{ - if (m_mode==IsDense) - { - for (Index i=m_start; i -_Scalar& AmbiVector<_Scalar,_StorageIndex>::coeffRef(Index i) -{ - if (m_mode==IsDense) - return m_buffer[i]; - else - { - ListEl* EIGEN_RESTRICT llElements = reinterpret_cast(m_buffer); - // TODO factorize the following code to reduce code generation - eigen_assert(m_mode==IsSparse); - if (m_llSize==0) - { - // this is the first element - m_llStart = 0; - m_llCurrent = 0; - ++m_llSize; - llElements[0].value = Scalar(0); - llElements[0].index = convert_index(i); - llElements[0].next = -1; - return llElements[0].value; - } - else if (i=llElements[m_llCurrent].index && "you must call restart() before inserting an element with lower or equal index"); - while (nextel >= 0 && llElements[nextel].index<=i) - { - m_llCurrent = nextel; - nextel = llElements[nextel].next; - } - - if (llElements[m_llCurrent].index==i) - { - // the coefficient already exists and we found it ! - return llElements[m_llCurrent].value; - } - else - { - if (m_llSize>=m_allocatedElements) - { - reallocateSparse(); - llElements = reinterpret_cast(m_buffer); - } - eigen_internal_assert(m_llSize -_Scalar& AmbiVector<_Scalar,_StorageIndex>::coeff(Index i) -{ - if (m_mode==IsDense) - return m_buffer[i]; - else - { - ListEl* EIGEN_RESTRICT llElements = reinterpret_cast(m_buffer); - eigen_assert(m_mode==IsSparse); - if ((m_llSize==0) || (i= 0 && llElements[elid].index -class AmbiVector<_Scalar,_StorageIndex>::Iterator -{ - public: - typedef _Scalar Scalar; - typedef typename NumTraits::Real RealScalar; - - /** Default constructor - * \param vec the vector on which we iterate - * \param epsilon the minimal value used to prune zero coefficients. - * In practice, all coefficients having a magnitude smaller than \a epsilon - * are skipped. - */ - explicit Iterator(const AmbiVector& vec, const RealScalar& epsilon = 0) - : m_vector(vec) - { - using std::abs; - m_epsilon = epsilon; - m_isDense = m_vector.m_mode==IsDense; - if (m_isDense) - { - m_currentEl = 0; // this is to avoid a compilation warning - m_cachedValue = 0; // this is to avoid a compilation warning - m_cachedIndex = m_vector.m_start-1; - ++(*this); - } - else - { - ListEl* EIGEN_RESTRICT llElements = reinterpret_cast(m_vector.m_buffer); - m_currentEl = m_vector.m_llStart; - while (m_currentEl>=0 && abs(llElements[m_currentEl].value)<=m_epsilon) - m_currentEl = llElements[m_currentEl].next; - if (m_currentEl<0) - { - m_cachedValue = 0; // this is to avoid a compilation warning - m_cachedIndex = -1; - } - else - { - m_cachedIndex = llElements[m_currentEl].index; - m_cachedValue = llElements[m_currentEl].value; - } - } - } - - StorageIndex index() const { return m_cachedIndex; } - Scalar value() const { return m_cachedValue; } - - operator bool() const { return m_cachedIndex>=0; } - - Iterator& operator++() - { - using std::abs; - if (m_isDense) - { - do { - ++m_cachedIndex; - } while (m_cachedIndex(m_vector.m_buffer); - do { - m_currentEl = llElements[m_currentEl].next; - } while (m_currentEl>=0 && abs(llElements[m_currentEl].value)<=m_epsilon); - if (m_currentEl<0) - { - m_cachedIndex = -1; - } - else - { - m_cachedIndex = llElements[m_currentEl].index; - m_cachedValue = llElements[m_currentEl].value; - } - } - return *this; - } - - protected: - const AmbiVector& m_vector; // the target vector - StorageIndex m_currentEl; // the current element in sparse/linked-list mode - RealScalar m_epsilon; // epsilon used to prune zero coefficients - StorageIndex m_cachedIndex; // current coordinate - Scalar m_cachedValue; // current value - bool m_isDense; // mode of the vector -}; - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_AMBIVECTOR_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/CompressedStorage.h b/include/Rivet/Math/eigen3/src/SparseCore/CompressedStorage.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/CompressedStorage.h +++ /dev/null @@ -1,258 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_COMPRESSED_STORAGE_H -#define EIGEN_COMPRESSED_STORAGE_H - -namespace Eigen { - -namespace internal { - -/** \internal - * Stores a sparse set of values as a list of values and a list of indices. - * - */ -template -class CompressedStorage -{ - public: - - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; - - protected: - - typedef typename NumTraits::Real RealScalar; - - public: - - CompressedStorage() - : m_values(0), m_indices(0), m_size(0), m_allocatedSize(0) - {} - - explicit CompressedStorage(Index size) - : m_values(0), m_indices(0), m_size(0), m_allocatedSize(0) - { - resize(size); - } - - CompressedStorage(const CompressedStorage& other) - : m_values(0), m_indices(0), m_size(0), m_allocatedSize(0) - { - *this = other; - } - - CompressedStorage& operator=(const CompressedStorage& other) - { - resize(other.size()); - if(other.size()>0) - { - internal::smart_copy(other.m_values, other.m_values + m_size, m_values); - internal::smart_copy(other.m_indices, other.m_indices + m_size, m_indices); - } - return *this; - } - - void swap(CompressedStorage& other) - { - std::swap(m_values, other.m_values); - std::swap(m_indices, other.m_indices); - std::swap(m_size, other.m_size); - std::swap(m_allocatedSize, other.m_allocatedSize); - } - - ~CompressedStorage() - { - delete[] m_values; - delete[] m_indices; - } - - void reserve(Index size) - { - Index newAllocatedSize = m_size + size; - if (newAllocatedSize > m_allocatedSize) - reallocate(newAllocatedSize); - } - - void squeeze() - { - if (m_allocatedSize>m_size) - reallocate(m_size); - } - - void resize(Index size, double reserveSizeFactor = 0) - { - if (m_allocatedSize)(NumTraits::highest(), size + Index(reserveSizeFactor*double(size))); - if(realloc_size(i); - } - - inline Index size() const { return m_size; } - inline Index allocatedSize() const { return m_allocatedSize; } - inline void clear() { m_size = 0; } - - const Scalar* valuePtr() const { return m_values; } - Scalar* valuePtr() { return m_values; } - const StorageIndex* indexPtr() const { return m_indices; } - StorageIndex* indexPtr() { return m_indices; } - - inline Scalar& value(Index i) { eigen_internal_assert(m_values!=0); return m_values[i]; } - inline const Scalar& value(Index i) const { eigen_internal_assert(m_values!=0); return m_values[i]; } - - inline StorageIndex& index(Index i) { eigen_internal_assert(m_indices!=0); return m_indices[i]; } - inline const StorageIndex& index(Index i) const { eigen_internal_assert(m_indices!=0); return m_indices[i]; } - - /** \returns the largest \c k such that for all \c j in [0,k) index[\c j]\<\a key */ - inline Index searchLowerIndex(Index key) const - { - return searchLowerIndex(0, m_size, key); - } - - /** \returns the largest \c k in [start,end) such that for all \c j in [start,k) index[\c j]\<\a key */ - inline Index searchLowerIndex(Index start, Index end, Index key) const - { - while(end>start) - { - Index mid = (end+start)>>1; - if (m_indices[mid]=end) - return defaultValue; - else if (end>start && key==m_indices[end-1]) - return m_values[end-1]; - // ^^ optimization: let's first check if it is the last coefficient - // (very common in high level algorithms) - const Index id = searchLowerIndex(start,end-1,key); - return ((id=m_size || m_indices[id]!=key) - { - if (m_allocatedSize newValues(m_allocatedSize); - internal::scoped_array newIndices(m_allocatedSize); - - // copy first chunk - internal::smart_copy(m_values, m_values +id, newValues.ptr()); - internal::smart_copy(m_indices, m_indices+id, newIndices.ptr()); - - // copy the rest - if(m_size>id) - { - internal::smart_copy(m_values +id, m_values +m_size, newValues.ptr() +id+1); - internal::smart_copy(m_indices+id, m_indices+m_size, newIndices.ptr()+id+1); - } - std::swap(m_values,newValues.ptr()); - std::swap(m_indices,newIndices.ptr()); - } - else if(m_size>id) - { - internal::smart_memmove(m_values +id, m_values +m_size, m_values +id+1); - internal::smart_memmove(m_indices+id, m_indices+m_size, m_indices+id+1); - } - m_size++; - m_indices[id] = internal::convert_index(key); - m_values[id] = defaultValue; - } - return m_values[id]; - } - - void prune(const Scalar& reference, const RealScalar& epsilon = NumTraits::dummy_precision()) - { - Index k = 0; - Index n = size(); - for (Index i=0; i newValues(size); - internal::scoped_array newIndices(size); - Index copySize = (std::min)(size, m_size); - if (copySize>0) { - internal::smart_copy(m_values, m_values+copySize, newValues.ptr()); - internal::smart_copy(m_indices, m_indices+copySize, newIndices.ptr()); - } - std::swap(m_values,newValues.ptr()); - std::swap(m_indices,newIndices.ptr()); - m_allocatedSize = size; - } - - protected: - Scalar* m_values; - StorageIndex* m_indices; - Index m_size; - Index m_allocatedSize; - -}; - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_COMPRESSED_STORAGE_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/ConservativeSparseSparseProduct.h b/include/Rivet/Math/eigen3/src/SparseCore/ConservativeSparseSparseProduct.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/ConservativeSparseSparseProduct.h +++ /dev/null @@ -1,345 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2015 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_CONSERVATIVESPARSESPARSEPRODUCT_H -#define EIGEN_CONSERVATIVESPARSESPARSEPRODUCT_H - -namespace Eigen { - -namespace internal { - -template -static void conservative_sparse_sparse_product_impl(const Lhs& lhs, const Rhs& rhs, ResultType& res, bool sortedInsertion = false) -{ - typedef typename remove_all::type::Scalar Scalar; - - // make sure to call innerSize/outerSize since we fake the storage order. - Index rows = lhs.innerSize(); - Index cols = rhs.outerSize(); - eigen_assert(lhs.outerSize() == rhs.innerSize()); - - ei_declare_aligned_stack_constructed_variable(bool, mask, rows, 0); - ei_declare_aligned_stack_constructed_variable(Scalar, values, rows, 0); - ei_declare_aligned_stack_constructed_variable(Index, indices, rows, 0); - - std::memset(mask,0,sizeof(bool)*rows); - - evaluator lhsEval(lhs); - evaluator rhsEval(rhs); - - // estimate the number of non zero entries - // given a rhs column containing Y non zeros, we assume that the respective Y columns - // of the lhs differs in average of one non zeros, thus the number of non zeros for - // the product of a rhs column with the lhs is X+Y where X is the average number of non zero - // per column of the lhs. - // Therefore, we have nnz(lhs*rhs) = nnz(lhs) + nnz(rhs) - Index estimated_nnz_prod = lhsEval.nonZerosEstimate() + rhsEval.nonZerosEstimate(); - - res.setZero(); - res.reserve(Index(estimated_nnz_prod)); - // we compute each column of the result, one after the other - for (Index j=0; j::InnerIterator rhsIt(rhsEval, j); rhsIt; ++rhsIt) - { - Scalar y = rhsIt.value(); - Index k = rhsIt.index(); - for (typename evaluator::InnerIterator lhsIt(lhsEval, k); lhsIt; ++lhsIt) - { - Index i = lhsIt.index(); - Scalar x = lhsIt.value(); - if(!mask[i]) - { - mask[i] = true; - values[i] = x * y; - indices[nnz] = i; - ++nnz; - } - else - values[i] += x * y; - } - } - if(!sortedInsertion) - { - // unordered insertion - for(Index k=0; k use a quick sort - // otherwise => loop through the entire vector - // In order to avoid to perform an expensive log2 when the - // result is clearly very sparse we use a linear bound up to 200. - if((nnz<200 && nnz1) std::sort(indices,indices+nnz); - for(Index k=0; k::Flags&RowMajorBit) ? RowMajor : ColMajor, - int RhsStorageOrder = (traits::Flags&RowMajorBit) ? RowMajor : ColMajor, - int ResStorageOrder = (traits::Flags&RowMajorBit) ? RowMajor : ColMajor> -struct conservative_sparse_sparse_product_selector; - -template -struct conservative_sparse_sparse_product_selector -{ - typedef typename remove_all::type LhsCleaned; - typedef typename LhsCleaned::Scalar Scalar; - - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res) - { - typedef SparseMatrix RowMajorMatrix; - typedef SparseMatrix ColMajorMatrixAux; - typedef typename sparse_eval::type ColMajorMatrix; - - // If the result is tall and thin (in the extreme case a column vector) - // then it is faster to sort the coefficients inplace instead of transposing twice. - // FIXME, the following heuristic is probably not very good. - if(lhs.rows()>rhs.cols()) - { - ColMajorMatrix resCol(lhs.rows(),rhs.cols()); - // perform sorted insertion - internal::conservative_sparse_sparse_product_impl(lhs, rhs, resCol, true); - res = resCol.markAsRValue(); - } - else - { - ColMajorMatrixAux resCol(lhs.rows(),rhs.cols()); - // ressort to transpose to sort the entries - internal::conservative_sparse_sparse_product_impl(lhs, rhs, resCol, false); - RowMajorMatrix resRow(resCol); - res = resRow.markAsRValue(); - } - } -}; - -template -struct conservative_sparse_sparse_product_selector -{ - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res) - { - typedef SparseMatrix RowMajorMatrix; - RowMajorMatrix rhsRow = rhs; - RowMajorMatrix resRow(lhs.rows(), rhs.cols()); - internal::conservative_sparse_sparse_product_impl(rhsRow, lhs, resRow); - res = resRow; - } -}; - -template -struct conservative_sparse_sparse_product_selector -{ - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res) - { - typedef SparseMatrix RowMajorMatrix; - RowMajorMatrix lhsRow = lhs; - RowMajorMatrix resRow(lhs.rows(), rhs.cols()); - internal::conservative_sparse_sparse_product_impl(rhs, lhsRow, resRow); - res = resRow; - } -}; - -template -struct conservative_sparse_sparse_product_selector -{ - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res) - { - typedef SparseMatrix RowMajorMatrix; - RowMajorMatrix resRow(lhs.rows(), rhs.cols()); - internal::conservative_sparse_sparse_product_impl(rhs, lhs, resRow); - res = resRow; - } -}; - - -template -struct conservative_sparse_sparse_product_selector -{ - typedef typename traits::type>::Scalar Scalar; - - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res) - { - typedef SparseMatrix ColMajorMatrix; - ColMajorMatrix resCol(lhs.rows(), rhs.cols()); - internal::conservative_sparse_sparse_product_impl(lhs, rhs, resCol); - res = resCol; - } -}; - -template -struct conservative_sparse_sparse_product_selector -{ - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res) - { - typedef SparseMatrix ColMajorMatrix; - ColMajorMatrix lhsCol = lhs; - ColMajorMatrix resCol(lhs.rows(), rhs.cols()); - internal::conservative_sparse_sparse_product_impl(lhsCol, rhs, resCol); - res = resCol; - } -}; - -template -struct conservative_sparse_sparse_product_selector -{ - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res) - { - typedef SparseMatrix ColMajorMatrix; - ColMajorMatrix rhsCol = rhs; - ColMajorMatrix resCol(lhs.rows(), rhs.cols()); - internal::conservative_sparse_sparse_product_impl(lhs, rhsCol, resCol); - res = resCol; - } -}; - -template -struct conservative_sparse_sparse_product_selector -{ - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res) - { - typedef SparseMatrix RowMajorMatrix; - typedef SparseMatrix ColMajorMatrix; - RowMajorMatrix resRow(lhs.rows(),rhs.cols()); - internal::conservative_sparse_sparse_product_impl(rhs, lhs, resRow); - // sort the non zeros: - ColMajorMatrix resCol(resRow); - res = resCol; - } -}; - -} // end namespace internal - - -namespace internal { - -template -static void sparse_sparse_to_dense_product_impl(const Lhs& lhs, const Rhs& rhs, ResultType& res) -{ - typedef typename remove_all::type::Scalar Scalar; - Index cols = rhs.outerSize(); - eigen_assert(lhs.outerSize() == rhs.innerSize()); - - evaluator lhsEval(lhs); - evaluator rhsEval(rhs); - - for (Index j=0; j::InnerIterator rhsIt(rhsEval, j); rhsIt; ++rhsIt) - { - Scalar y = rhsIt.value(); - Index k = rhsIt.index(); - for (typename evaluator::InnerIterator lhsIt(lhsEval, k); lhsIt; ++lhsIt) - { - Index i = lhsIt.index(); - Scalar x = lhsIt.value(); - res.coeffRef(i,j) += x * y; - } - } - } -} - - -} // end namespace internal - -namespace internal { - -template::Flags&RowMajorBit) ? RowMajor : ColMajor, - int RhsStorageOrder = (traits::Flags&RowMajorBit) ? RowMajor : ColMajor> -struct sparse_sparse_to_dense_product_selector; - -template -struct sparse_sparse_to_dense_product_selector -{ - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res) - { - internal::sparse_sparse_to_dense_product_impl(lhs, rhs, res); - } -}; - -template -struct sparse_sparse_to_dense_product_selector -{ - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res) - { - typedef SparseMatrix ColMajorMatrix; - ColMajorMatrix lhsCol(lhs); - internal::sparse_sparse_to_dense_product_impl(lhsCol, rhs, res); - } -}; - -template -struct sparse_sparse_to_dense_product_selector -{ - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res) - { - typedef SparseMatrix ColMajorMatrix; - ColMajorMatrix rhsCol(rhs); - internal::sparse_sparse_to_dense_product_impl(lhs, rhsCol, res); - } -}; - -template -struct sparse_sparse_to_dense_product_selector -{ - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res) - { - Transpose trRes(res); - internal::sparse_sparse_to_dense_product_impl >(rhs, lhs, trRes); - } -}; - - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_CONSERVATIVESPARSESPARSEPRODUCT_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/MappedSparseMatrix.h b/include/Rivet/Math/eigen3/src/SparseCore/MappedSparseMatrix.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/MappedSparseMatrix.h +++ /dev/null @@ -1,67 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_MAPPED_SPARSEMATRIX_H -#define EIGEN_MAPPED_SPARSEMATRIX_H - -namespace Eigen { - -/** \deprecated Use Map > - * \class MappedSparseMatrix - * - * \brief Sparse matrix - * - * \param _Scalar the scalar type, i.e. the type of the coefficients - * - * See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme. - * - */ -namespace internal { -template -struct traits > : traits > -{}; -} // end namespace internal - -template -class MappedSparseMatrix - : public Map > -{ - typedef Map > Base; - - public: - - typedef typename Base::StorageIndex StorageIndex; - typedef typename Base::Scalar Scalar; - - inline MappedSparseMatrix(Index rows, Index cols, Index nnz, StorageIndex* outerIndexPtr, StorageIndex* innerIndexPtr, Scalar* valuePtr, StorageIndex* innerNonZeroPtr = 0) - : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZeroPtr) - {} - - /** Empty destructor */ - inline ~MappedSparseMatrix() {} -}; - -namespace internal { - -template -struct evaluator > - : evaluator > > -{ - typedef MappedSparseMatrix<_Scalar,_Options,_StorageIndex> XprType; - typedef evaluator > Base; - - evaluator() : Base() {} - explicit evaluator(const XprType &mat) : Base(mat) {} -}; - -} - -} // end namespace Eigen - -#endif // EIGEN_MAPPED_SPARSEMATRIX_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseAssign.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseAssign.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseAssign.h +++ /dev/null @@ -1,216 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSEASSIGN_H -#define EIGEN_SPARSEASSIGN_H - -namespace Eigen { - -template -template -Derived& SparseMatrixBase::operator=(const EigenBase &other) -{ - internal::call_assignment_no_alias(derived(), other.derived()); - return derived(); -} - -template -template -Derived& SparseMatrixBase::operator=(const ReturnByValue& other) -{ - // TODO use the evaluator mechanism - other.evalTo(derived()); - return derived(); -} - -template -template -inline Derived& SparseMatrixBase::operator=(const SparseMatrixBase& other) -{ - // by default sparse evaluation do not alias, so we can safely bypass the generic call_assignment routine - internal::Assignment > - ::run(derived(), other.derived(), internal::assign_op()); - return derived(); -} - -template -inline Derived& SparseMatrixBase::operator=(const Derived& other) -{ - internal::call_assignment_no_alias(derived(), other.derived()); - return derived(); -} - -namespace internal { - -template<> -struct storage_kind_to_evaluator_kind { - typedef IteratorBased Kind; -}; - -template<> -struct storage_kind_to_shape { - typedef SparseShape Shape; -}; - -struct Sparse2Sparse {}; -struct Sparse2Dense {}; - -template<> struct AssignmentKind { typedef Sparse2Sparse Kind; }; -template<> struct AssignmentKind { typedef Sparse2Sparse Kind; }; -template<> struct AssignmentKind { typedef Sparse2Dense Kind; }; -template<> struct AssignmentKind { typedef Sparse2Dense Kind; }; - - -template -void assign_sparse_to_sparse(DstXprType &dst, const SrcXprType &src) -{ - typedef typename DstXprType::Scalar Scalar; - typedef internal::evaluator DstEvaluatorType; - typedef internal::evaluator SrcEvaluatorType; - - SrcEvaluatorType srcEvaluator(src); - - const bool transpose = (DstEvaluatorType::Flags & RowMajorBit) != (SrcEvaluatorType::Flags & RowMajorBit); - const Index outerEvaluationSize = (SrcEvaluatorType::Flags&RowMajorBit) ? src.rows() : src.cols(); - if ((!transpose) && src.isRValue()) - { - // eval without temporary - dst.resize(src.rows(), src.cols()); - dst.setZero(); - dst.reserve((std::max)(src.rows(),src.cols())*2); - for (Index j=0; j::SupportedAccessPatterns & OuterRandomAccessPattern)==OuterRandomAccessPattern) || - (!((DstEvaluatorType::Flags & RowMajorBit) != (SrcEvaluatorType::Flags & RowMajorBit)))) && - "the transpose operation is supposed to be handled in SparseMatrix::operator="); - - enum { Flip = (DstEvaluatorType::Flags & RowMajorBit) != (SrcEvaluatorType::Flags & RowMajorBit) }; - - - DstXprType temp(src.rows(), src.cols()); - - temp.reserve((std::max)(src.rows(),src.cols())*2); - for (Index j=0; j -struct Assignment -{ - static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op &/*func*/) - { - assign_sparse_to_sparse(dst.derived(), src.derived()); - } -}; - -// Generic Sparse to Dense assignment -template< typename DstXprType, typename SrcXprType, typename Functor> -struct Assignment -{ - static void run(DstXprType &dst, const SrcXprType &src, const Functor &func) - { - if(internal::is_same >::value) - dst.setZero(); - - internal::evaluator srcEval(src); - resize_if_allowed(dst, src, func); - internal::evaluator dstEval(dst); - - const Index outerEvaluationSize = (internal::evaluator::Flags&RowMajorBit) ? src.rows() : src.cols(); - for (Index j=0; j::InnerIterator i(srcEval,j); i; ++i) - func.assignCoeff(dstEval.coeffRef(i.row(),i.col()), i.value()); - } -}; - -// Specialization for "dst = dec.solve(rhs)" -// NOTE we need to specialize it for Sparse2Sparse to avoid ambiguous specialization error -template -struct Assignment, internal::assign_op, Sparse2Sparse> -{ - typedef Solve SrcXprType; - static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op &) - { - Index dstRows = src.rows(); - Index dstCols = src.cols(); - if((dst.rows()!=dstRows) || (dst.cols()!=dstCols)) - dst.resize(dstRows, dstCols); - - src.dec()._solve_impl(src.rhs(), dst); - } -}; - -struct Diagonal2Sparse {}; - -template<> struct AssignmentKind { typedef Diagonal2Sparse Kind; }; - -template< typename DstXprType, typename SrcXprType, typename Functor> -struct Assignment -{ - typedef typename DstXprType::StorageIndex StorageIndex; - typedef typename DstXprType::Scalar Scalar; - typedef Array ArrayXI; - typedef Array ArrayXS; - template - static void run(SparseMatrix &dst, const SrcXprType &src, const internal::assign_op &/*func*/) - { - Index dstRows = src.rows(); - Index dstCols = src.cols(); - if((dst.rows()!=dstRows) || (dst.cols()!=dstCols)) - dst.resize(dstRows, dstCols); - - Index size = src.diagonal().size(); - dst.makeCompressed(); - dst.resizeNonZeros(size); - Map(dst.innerIndexPtr(), size).setLinSpaced(0,StorageIndex(size)-1); - Map(dst.outerIndexPtr(), size+1).setLinSpaced(0,StorageIndex(size)); - Map(dst.valuePtr(), size) = src.diagonal(); - } - - template - static void run(SparseMatrixBase &dst, const SrcXprType &src, const internal::assign_op &/*func*/) - { - dst.diagonal() = src.diagonal(); - } - - static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op &/*func*/) - { dst.diagonal() += src.diagonal(); } - - static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op &/*func*/) - { dst.diagonal() -= src.diagonal(); } -}; -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_SPARSEASSIGN_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseBlock.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseBlock.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseBlock.h +++ /dev/null @@ -1,603 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_BLOCK_H -#define EIGEN_SPARSE_BLOCK_H - -namespace Eigen { - -// Subset of columns or rows -template -class BlockImpl - : public SparseMatrixBase > -{ - typedef typename internal::remove_all::type _MatrixTypeNested; - typedef Block BlockType; -public: - enum { IsRowMajor = internal::traits::IsRowMajor }; -protected: - enum { OuterSize = IsRowMajor ? BlockRows : BlockCols }; - typedef SparseMatrixBase Base; - using Base::convert_index; -public: - EIGEN_SPARSE_PUBLIC_INTERFACE(BlockType) - - inline BlockImpl(XprType& xpr, Index i) - : m_matrix(xpr), m_outerStart(convert_index(i)), m_outerSize(OuterSize) - {} - - inline BlockImpl(XprType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols) - : m_matrix(xpr), m_outerStart(convert_index(IsRowMajor ? startRow : startCol)), m_outerSize(convert_index(IsRowMajor ? blockRows : blockCols)) - {} - - EIGEN_STRONG_INLINE Index rows() const { return IsRowMajor ? m_outerSize.value() : m_matrix.rows(); } - EIGEN_STRONG_INLINE Index cols() const { return IsRowMajor ? m_matrix.cols() : m_outerSize.value(); } - - Index nonZeros() const - { - typedef internal::evaluator EvaluatorType; - EvaluatorType matEval(m_matrix); - Index nnz = 0; - Index end = m_outerStart + m_outerSize.value(); - for(Index j=m_outerStart; j::non_const_type m_matrix; - Index m_outerStart; - const internal::variable_if_dynamic m_outerSize; - - protected: - // Disable assignment with clear error message. - // Note that simply removing operator= yields compilation errors with ICC+MSVC - template - BlockImpl& operator=(const T&) - { - EIGEN_STATIC_ASSERT(sizeof(T)==0, THIS_SPARSE_BLOCK_SUBEXPRESSION_IS_READ_ONLY); - return *this; - } -}; - - -/*************************************************************************** -* specialization for SparseMatrix -***************************************************************************/ - -namespace internal { - -template -class sparse_matrix_block_impl - : public SparseCompressedBase > -{ - typedef typename internal::remove_all::type _MatrixTypeNested; - typedef Block BlockType; - typedef SparseCompressedBase > Base; - using Base::convert_index; -public: - enum { IsRowMajor = internal::traits::IsRowMajor }; - EIGEN_SPARSE_PUBLIC_INTERFACE(BlockType) -protected: - typedef typename Base::IndexVector IndexVector; - enum { OuterSize = IsRowMajor ? BlockRows : BlockCols }; -public: - - inline sparse_matrix_block_impl(SparseMatrixType& xpr, Index i) - : m_matrix(xpr), m_outerStart(convert_index(i)), m_outerSize(OuterSize) - {} - - inline sparse_matrix_block_impl(SparseMatrixType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols) - : m_matrix(xpr), m_outerStart(convert_index(IsRowMajor ? startRow : startCol)), m_outerSize(convert_index(IsRowMajor ? blockRows : blockCols)) - {} - - template - inline BlockType& operator=(const SparseMatrixBase& other) - { - typedef typename internal::remove_all::type _NestedMatrixType; - _NestedMatrixType& matrix = m_matrix; - // This assignment is slow if this vector set is not empty - // and/or it is not at the end of the nonzeros of the underlying matrix. - - // 1 - eval to a temporary to avoid transposition and/or aliasing issues - Ref > tmp(other.derived()); - eigen_internal_assert(tmp.outerSize()==m_outerSize.value()); - - // 2 - let's check whether there is enough allocated memory - Index nnz = tmp.nonZeros(); - Index start = m_outerStart==0 ? 0 : m_matrix.outerIndexPtr()[m_outerStart]; // starting position of the current block - Index end = m_matrix.outerIndexPtr()[m_outerStart+m_outerSize.value()]; // ending position of the current block - Index block_size = end - start; // available room in the current block - Index tail_size = m_matrix.outerIndexPtr()[m_matrix.outerSize()] - end; - - Index free_size = m_matrix.isCompressed() - ? Index(matrix.data().allocatedSize()) + block_size - : block_size; - - Index tmp_start = tmp.outerIndexPtr()[0]; - - bool update_trailing_pointers = false; - if(nnz>free_size) - { - // realloc manually to reduce copies - typename SparseMatrixType::Storage newdata(m_matrix.data().allocatedSize() - block_size + nnz); - - internal::smart_copy(m_matrix.valuePtr(), m_matrix.valuePtr() + start, newdata.valuePtr()); - internal::smart_copy(m_matrix.innerIndexPtr(), m_matrix.innerIndexPtr() + start, newdata.indexPtr()); - - internal::smart_copy(tmp.valuePtr() + tmp_start, tmp.valuePtr() + tmp_start + nnz, newdata.valuePtr() + start); - internal::smart_copy(tmp.innerIndexPtr() + tmp_start, tmp.innerIndexPtr() + tmp_start + nnz, newdata.indexPtr() + start); - - internal::smart_copy(matrix.valuePtr()+end, matrix.valuePtr()+end + tail_size, newdata.valuePtr()+start+nnz); - internal::smart_copy(matrix.innerIndexPtr()+end, matrix.innerIndexPtr()+end + tail_size, newdata.indexPtr()+start+nnz); - - newdata.resize(m_matrix.outerIndexPtr()[m_matrix.outerSize()] - block_size + nnz); - - matrix.data().swap(newdata); - - update_trailing_pointers = true; - } - else - { - if(m_matrix.isCompressed()) - { - // no need to realloc, simply copy the tail at its respective position and insert tmp - matrix.data().resize(start + nnz + tail_size); - - internal::smart_memmove(matrix.valuePtr()+end, matrix.valuePtr() + end+tail_size, matrix.valuePtr() + start+nnz); - internal::smart_memmove(matrix.innerIndexPtr()+end, matrix.innerIndexPtr() + end+tail_size, matrix.innerIndexPtr() + start+nnz); - - update_trailing_pointers = true; - } - - internal::smart_copy(tmp.valuePtr() + tmp_start, tmp.valuePtr() + tmp_start + nnz, matrix.valuePtr() + start); - internal::smart_copy(tmp.innerIndexPtr() + tmp_start, tmp.innerIndexPtr() + tmp_start + nnz, matrix.innerIndexPtr() + start); - } - - // update outer index pointers and innerNonZeros - if(IsVectorAtCompileTime) - { - if(!m_matrix.isCompressed()) - matrix.innerNonZeroPtr()[m_outerStart] = StorageIndex(nnz); - matrix.outerIndexPtr()[m_outerStart] = StorageIndex(start); - } - else - { - StorageIndex p = StorageIndex(start); - for(Index k=0; k(tmp.innerVector(k).nonZeros()); - if(!m_matrix.isCompressed()) - matrix.innerNonZeroPtr()[m_outerStart+k] = nnz_k; - matrix.outerIndexPtr()[m_outerStart+k] = p; - p += nnz_k; - } - } - - if(update_trailing_pointers) - { - StorageIndex offset = internal::convert_index(nnz - block_size); - for(Index k = m_outerStart + m_outerSize.value(); k<=matrix.outerSize(); ++k) - { - matrix.outerIndexPtr()[k] += offset; - } - } - - return derived(); - } - - inline BlockType& operator=(const BlockType& other) - { - return operator=(other); - } - - inline const Scalar* valuePtr() const - { return m_matrix.valuePtr(); } - inline Scalar* valuePtr() - { return m_matrix.valuePtr(); } - - inline const StorageIndex* innerIndexPtr() const - { return m_matrix.innerIndexPtr(); } - inline StorageIndex* innerIndexPtr() - { return m_matrix.innerIndexPtr(); } - - inline const StorageIndex* outerIndexPtr() const - { return m_matrix.outerIndexPtr() + m_outerStart; } - inline StorageIndex* outerIndexPtr() - { return m_matrix.outerIndexPtr() + m_outerStart; } - - inline const StorageIndex* innerNonZeroPtr() const - { return isCompressed() ? 0 : (m_matrix.innerNonZeroPtr()+m_outerStart); } - inline StorageIndex* innerNonZeroPtr() - { return isCompressed() ? 0 : (m_matrix.innerNonZeroPtr()+m_outerStart); } - - bool isCompressed() const { return m_matrix.innerNonZeroPtr()==0; } - - inline Scalar& coeffRef(Index row, Index col) - { - return m_matrix.coeffRef(row + (IsRowMajor ? m_outerStart : 0), col + (IsRowMajor ? 0 : m_outerStart)); - } - - inline const Scalar coeff(Index row, Index col) const - { - return m_matrix.coeff(row + (IsRowMajor ? m_outerStart : 0), col + (IsRowMajor ? 0 : m_outerStart)); - } - - inline const Scalar coeff(Index index) const - { - return m_matrix.coeff(IsRowMajor ? m_outerStart : index, IsRowMajor ? index : m_outerStart); - } - - const Scalar& lastCoeff() const - { - EIGEN_STATIC_ASSERT_VECTOR_ONLY(sparse_matrix_block_impl); - eigen_assert(Base::nonZeros()>0); - if(m_matrix.isCompressed()) - return m_matrix.valuePtr()[m_matrix.outerIndexPtr()[m_outerStart+1]-1]; - else - return m_matrix.valuePtr()[m_matrix.outerIndexPtr()[m_outerStart]+m_matrix.innerNonZeroPtr()[m_outerStart]-1]; - } - - EIGEN_STRONG_INLINE Index rows() const { return IsRowMajor ? m_outerSize.value() : m_matrix.rows(); } - EIGEN_STRONG_INLINE Index cols() const { return IsRowMajor ? m_matrix.cols() : m_outerSize.value(); } - - inline const SparseMatrixType& nestedExpression() const { return m_matrix; } - inline SparseMatrixType& nestedExpression() { return m_matrix; } - Index startRow() const { return IsRowMajor ? m_outerStart : 0; } - Index startCol() const { return IsRowMajor ? 0 : m_outerStart; } - Index blockRows() const { return IsRowMajor ? m_outerSize.value() : m_matrix.rows(); } - Index blockCols() const { return IsRowMajor ? m_matrix.cols() : m_outerSize.value(); } - - protected: - - typename internal::ref_selector::non_const_type m_matrix; - Index m_outerStart; - const internal::variable_if_dynamic m_outerSize; - -}; - -} // namespace internal - -template -class BlockImpl,BlockRows,BlockCols,true,Sparse> - : public internal::sparse_matrix_block_impl,BlockRows,BlockCols> -{ -public: - typedef _StorageIndex StorageIndex; - typedef SparseMatrix<_Scalar, _Options, _StorageIndex> SparseMatrixType; - typedef internal::sparse_matrix_block_impl Base; - inline BlockImpl(SparseMatrixType& xpr, Index i) - : Base(xpr, i) - {} - - inline BlockImpl(SparseMatrixType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols) - : Base(xpr, startRow, startCol, blockRows, blockCols) - {} - - using Base::operator=; -}; - -template -class BlockImpl,BlockRows,BlockCols,true,Sparse> - : public internal::sparse_matrix_block_impl,BlockRows,BlockCols> -{ -public: - typedef _StorageIndex StorageIndex; - typedef const SparseMatrix<_Scalar, _Options, _StorageIndex> SparseMatrixType; - typedef internal::sparse_matrix_block_impl Base; - inline BlockImpl(SparseMatrixType& xpr, Index i) - : Base(xpr, i) - {} - - inline BlockImpl(SparseMatrixType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols) - : Base(xpr, startRow, startCol, blockRows, blockCols) - {} - - using Base::operator=; -private: - template BlockImpl(const SparseMatrixBase& xpr, Index i); - template BlockImpl(const SparseMatrixBase& xpr); -}; - -//---------- - -/** \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this - * is col-major (resp. row-major). - */ -template -typename SparseMatrixBase::InnerVectorReturnType SparseMatrixBase::innerVector(Index outer) -{ return InnerVectorReturnType(derived(), outer); } - -/** \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this - * is col-major (resp. row-major). Read-only. - */ -template -const typename SparseMatrixBase::ConstInnerVectorReturnType SparseMatrixBase::innerVector(Index outer) const -{ return ConstInnerVectorReturnType(derived(), outer); } - -/** \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this - * is col-major (resp. row-major). - */ -template -typename SparseMatrixBase::InnerVectorsReturnType -SparseMatrixBase::innerVectors(Index outerStart, Index outerSize) -{ - return Block(derived(), - IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart, - IsRowMajor ? outerSize : rows(), IsRowMajor ? cols() : outerSize); - -} - -/** \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this - * is col-major (resp. row-major). Read-only. - */ -template -const typename SparseMatrixBase::ConstInnerVectorsReturnType -SparseMatrixBase::innerVectors(Index outerStart, Index outerSize) const -{ - return Block(derived(), - IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart, - IsRowMajor ? outerSize : rows(), IsRowMajor ? cols() : outerSize); - -} - -/** Generic implementation of sparse Block expression. - * Real-only. - */ -template -class BlockImpl - : public SparseMatrixBase >, internal::no_assignment_operator -{ - typedef Block BlockType; - typedef SparseMatrixBase Base; - using Base::convert_index; -public: - enum { IsRowMajor = internal::traits::IsRowMajor }; - EIGEN_SPARSE_PUBLIC_INTERFACE(BlockType) - - typedef typename internal::remove_all::type _MatrixTypeNested; - - /** Column or Row constructor - */ - inline BlockImpl(XprType& xpr, Index i) - : m_matrix(xpr), - m_startRow( (BlockRows==1) && (BlockCols==XprType::ColsAtCompileTime) ? convert_index(i) : 0), - m_startCol( (BlockRows==XprType::RowsAtCompileTime) && (BlockCols==1) ? convert_index(i) : 0), - m_blockRows(BlockRows==1 ? 1 : xpr.rows()), - m_blockCols(BlockCols==1 ? 1 : xpr.cols()) - {} - - /** Dynamic-size constructor - */ - inline BlockImpl(XprType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols) - : m_matrix(xpr), m_startRow(convert_index(startRow)), m_startCol(convert_index(startCol)), m_blockRows(convert_index(blockRows)), m_blockCols(convert_index(blockCols)) - {} - - inline Index rows() const { return m_blockRows.value(); } - inline Index cols() const { return m_blockCols.value(); } - - inline Scalar& coeffRef(Index row, Index col) - { - return m_matrix.coeffRef(row + m_startRow.value(), col + m_startCol.value()); - } - - inline const Scalar coeff(Index row, Index col) const - { - return m_matrix.coeff(row + m_startRow.value(), col + m_startCol.value()); - } - - inline Scalar& coeffRef(Index index) - { - return m_matrix.coeffRef(m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index), - m_startCol.value() + (RowsAtCompileTime == 1 ? index : 0)); - } - - inline const Scalar coeff(Index index) const - { - return m_matrix.coeff(m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index), - m_startCol.value() + (RowsAtCompileTime == 1 ? index : 0)); - } - - inline const XprType& nestedExpression() const { return m_matrix; } - inline XprType& nestedExpression() { return m_matrix; } - Index startRow() const { return m_startRow.value(); } - Index startCol() const { return m_startCol.value(); } - Index blockRows() const { return m_blockRows.value(); } - Index blockCols() const { return m_blockCols.value(); } - - protected: -// friend class internal::GenericSparseBlockInnerIteratorImpl; - friend struct internal::unary_evaluator, internal::IteratorBased, Scalar >; - - Index nonZeros() const { return Dynamic; } - - typename internal::ref_selector::non_const_type m_matrix; - const internal::variable_if_dynamic m_startRow; - const internal::variable_if_dynamic m_startCol; - const internal::variable_if_dynamic m_blockRows; - const internal::variable_if_dynamic m_blockCols; - - protected: - // Disable assignment with clear error message. - // Note that simply removing operator= yields compilation errors with ICC+MSVC - template - BlockImpl& operator=(const T&) - { - EIGEN_STATIC_ASSERT(sizeof(T)==0, THIS_SPARSE_BLOCK_SUBEXPRESSION_IS_READ_ONLY); - return *this; - } - -}; - -namespace internal { - -template -struct unary_evaluator, IteratorBased > - : public evaluator_base > -{ - class InnerVectorInnerIterator; - class OuterVectorInnerIterator; - public: - typedef Block XprType; - typedef typename XprType::StorageIndex StorageIndex; - typedef typename XprType::Scalar Scalar; - - enum { - IsRowMajor = XprType::IsRowMajor, - - OuterVector = (BlockCols==1 && ArgType::IsRowMajor) - | // FIXME | instead of || to please GCC 4.4.0 stupid warning "suggest parentheses around &&". - // revert to || as soon as not needed anymore. - (BlockRows==1 && !ArgType::IsRowMajor), - - CoeffReadCost = evaluator::CoeffReadCost, - Flags = XprType::Flags - }; - - typedef typename internal::conditional::type InnerIterator; - - explicit unary_evaluator(const XprType& op) - : m_argImpl(op.nestedExpression()), m_block(op) - {} - - inline Index nonZerosEstimate() const { - Index nnz = m_block.nonZeros(); - if(nnz<0) - return m_argImpl.nonZerosEstimate() * m_block.size() / m_block.nestedExpression().size(); - return nnz; - } - - protected: - typedef typename evaluator::InnerIterator EvalIterator; - - evaluator m_argImpl; - const XprType &m_block; -}; - -template -class unary_evaluator, IteratorBased>::InnerVectorInnerIterator - : public EvalIterator -{ - enum { IsRowMajor = unary_evaluator::IsRowMajor }; - const XprType& m_block; - Index m_end; -public: - - EIGEN_STRONG_INLINE InnerVectorInnerIterator(const unary_evaluator& aEval, Index outer) - : EvalIterator(aEval.m_argImpl, outer + (IsRowMajor ? aEval.m_block.startRow() : aEval.m_block.startCol())), - m_block(aEval.m_block), - m_end(IsRowMajor ? aEval.m_block.startCol()+aEval.m_block.blockCols() : aEval.m_block.startRow()+aEval.m_block.blockRows()) - { - while( (EvalIterator::operator bool()) && (EvalIterator::index() < (IsRowMajor ? m_block.startCol() : m_block.startRow())) ) - EvalIterator::operator++(); - } - - inline StorageIndex index() const { return EvalIterator::index() - convert_index(IsRowMajor ? m_block.startCol() : m_block.startRow()); } - inline Index outer() const { return EvalIterator::outer() - (IsRowMajor ? m_block.startRow() : m_block.startCol()); } - inline Index row() const { return EvalIterator::row() - m_block.startRow(); } - inline Index col() const { return EvalIterator::col() - m_block.startCol(); } - - inline operator bool() const { return EvalIterator::operator bool() && EvalIterator::index() < m_end; } -}; - -template -class unary_evaluator, IteratorBased>::OuterVectorInnerIterator -{ - enum { IsRowMajor = unary_evaluator::IsRowMajor }; - const unary_evaluator& m_eval; - Index m_outerPos; - const Index m_innerIndex; - Index m_end; - EvalIterator m_it; -public: - - EIGEN_STRONG_INLINE OuterVectorInnerIterator(const unary_evaluator& aEval, Index outer) - : m_eval(aEval), - m_outerPos( (IsRowMajor ? aEval.m_block.startCol() : aEval.m_block.startRow()) ), - m_innerIndex(IsRowMajor ? aEval.m_block.startRow() : aEval.m_block.startCol()), - m_end(IsRowMajor ? aEval.m_block.startCol()+aEval.m_block.blockCols() : aEval.m_block.startRow()+aEval.m_block.blockRows()), - m_it(m_eval.m_argImpl, m_outerPos) - { - EIGEN_UNUSED_VARIABLE(outer); - eigen_assert(outer==0); - - while(m_it && m_it.index() < m_innerIndex) ++m_it; - if((!m_it) || (m_it.index()!=m_innerIndex)) - ++(*this); - } - - inline StorageIndex index() const { return convert_index(m_outerPos - (IsRowMajor ? m_eval.m_block.startCol() : m_eval.m_block.startRow())); } - inline Index outer() const { return 0; } - inline Index row() const { return IsRowMajor ? 0 : index(); } - inline Index col() const { return IsRowMajor ? index() : 0; } - - inline Scalar value() const { return m_it.value(); } - inline Scalar& valueRef() { return m_it.valueRef(); } - - inline OuterVectorInnerIterator& operator++() - { - // search next non-zero entry - while(++m_outerPos -struct unary_evaluator,BlockRows,BlockCols,true>, IteratorBased> - : evaluator,BlockRows,BlockCols,true> > > -{ - typedef Block,BlockRows,BlockCols,true> XprType; - typedef evaluator > Base; - explicit unary_evaluator(const XprType &xpr) : Base(xpr) {} -}; - -template -struct unary_evaluator,BlockRows,BlockCols,true>, IteratorBased> - : evaluator,BlockRows,BlockCols,true> > > -{ - typedef Block,BlockRows,BlockCols,true> XprType; - typedef evaluator > Base; - explicit unary_evaluator(const XprType &xpr) : Base(xpr) {} -}; - -} // end namespace internal - - -} // end namespace Eigen - -#endif // EIGEN_SPARSE_BLOCK_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseColEtree.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseColEtree.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseColEtree.h +++ /dev/null @@ -1,206 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - - -/* - - * NOTE: This file is the modified version of sp_coletree.c file in SuperLU - - * -- SuperLU routine (version 3.1) -- - * Univ. of California Berkeley, Xerox Palo Alto Research Center, - * and Lawrence Berkeley National Lab. - * August 1, 2008 - * - * Copyright (c) 1994 by Xerox Corporation. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY - * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program for any - * purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is - * granted, provided the above notices are retained, and a notice that - * the code was modified is included with the above copyright notice. - */ -#ifndef SPARSE_COLETREE_H -#define SPARSE_COLETREE_H - -namespace Eigen { - -namespace internal { - -/** Find the root of the tree/set containing the vertex i : Use Path halving */ -template -Index etree_find (Index i, IndexVector& pp) -{ - Index p = pp(i); // Parent - Index gp = pp(p); // Grand parent - while (gp != p) - { - pp(i) = gp; // Parent pointer on find path is changed to former grand parent - i = gp; - p = pp(i); - gp = pp(p); - } - return p; -} - -/** Compute the column elimination tree of a sparse matrix - * \param mat The matrix in column-major format. - * \param parent The elimination tree - * \param firstRowElt The column index of the first element in each row - * \param perm The permutation to apply to the column of \b mat - */ -template -int coletree(const MatrixType& mat, IndexVector& parent, IndexVector& firstRowElt, typename MatrixType::StorageIndex *perm=0) -{ - typedef typename MatrixType::StorageIndex StorageIndex; - StorageIndex nc = convert_index(mat.cols()); // Number of columns - StorageIndex m = convert_index(mat.rows()); - StorageIndex diagSize = (std::min)(nc,m); - IndexVector root(nc); // root of subtree of etree - root.setZero(); - IndexVector pp(nc); // disjoint sets - pp.setZero(); // Initialize disjoint sets - parent.resize(mat.cols()); - //Compute first nonzero column in each row - firstRowElt.resize(m); - firstRowElt.setConstant(nc); - firstRowElt.segment(0, diagSize).setLinSpaced(diagSize, 0, diagSize-1); - bool found_diag; - for (StorageIndex col = 0; col < nc; col++) - { - StorageIndex pcol = col; - if(perm) pcol = perm[col]; - for (typename MatrixType::InnerIterator it(mat, pcol); it; ++it) - { - Index row = it.row(); - firstRowElt(row) = (std::min)(firstRowElt(row), col); - } - } - /* Compute etree by Liu's algorithm for symmetric matrices, - except use (firstRowElt[r],c) in place of an edge (r,c) of A. - Thus each row clique in A'*A is replaced by a star - centered at its first vertex, which has the same fill. */ - StorageIndex rset, cset, rroot; - for (StorageIndex col = 0; col < nc; col++) - { - found_diag = col>=m; - pp(col) = col; - cset = col; - root(cset) = col; - parent(col) = nc; - /* The diagonal element is treated here even if it does not exist in the matrix - * hence the loop is executed once more */ - StorageIndex pcol = col; - if(perm) pcol = perm[col]; - for (typename MatrixType::InnerIterator it(mat, pcol); it||!found_diag; ++it) - { // A sequence of interleaved find and union is performed - Index i = col; - if(it) i = it.index(); - if (i == col) found_diag = true; - - StorageIndex row = firstRowElt(i); - if (row >= col) continue; - rset = internal::etree_find(row, pp); // Find the name of the set containing row - rroot = root(rset); - if (rroot != col) - { - parent(rroot) = col; - pp(cset) = rset; - cset = rset; - root(cset) = col; - } - } - } - return 0; -} - -/** - * Depth-first search from vertex n. No recursion. - * This routine was contributed by Cédric Doucet, CEDRAT Group, Meylan, France. -*/ -template -void nr_etdfs (typename IndexVector::Scalar n, IndexVector& parent, IndexVector& first_kid, IndexVector& next_kid, IndexVector& post, typename IndexVector::Scalar postnum) -{ - typedef typename IndexVector::Scalar StorageIndex; - StorageIndex current = n, first, next; - while (postnum != n) - { - // No kid for the current node - first = first_kid(current); - - // no kid for the current node - if (first == -1) - { - // Numbering this node because it has no kid - post(current) = postnum++; - - // looking for the next kid - next = next_kid(current); - while (next == -1) - { - // No more kids : back to the parent node - current = parent(current); - // numbering the parent node - post(current) = postnum++; - - // Get the next kid - next = next_kid(current); - } - // stopping criterion - if (postnum == n+1) return; - - // Updating current node - current = next; - } - else - { - current = first; - } - } -} - - -/** - * \brief Post order a tree - * \param n the number of nodes - * \param parent Input tree - * \param post postordered tree - */ -template -void treePostorder(typename IndexVector::Scalar n, IndexVector& parent, IndexVector& post) -{ - typedef typename IndexVector::Scalar StorageIndex; - IndexVector first_kid, next_kid; // Linked list of children - StorageIndex postnum; - // Allocate storage for working arrays and results - first_kid.resize(n+1); - next_kid.setZero(n+1); - post.setZero(n+1); - - // Set up structure describing children - first_kid.setConstant(-1); - for (StorageIndex v = n-1; v >= 0; v--) - { - StorageIndex dad = parent(v); - next_kid(v) = first_kid(dad); - first_kid(dad) = v; - } - - // Depth-first search from dummy root vertex #n - postnum = 0; - internal::nr_etdfs(n, parent, first_kid, next_kid, post, postnum); -} - -} // end namespace internal - -} // end namespace Eigen - -#endif // SPARSE_COLETREE_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseCompressedBase.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseCompressedBase.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseCompressedBase.h +++ /dev/null @@ -1,341 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2015 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_COMPRESSED_BASE_H -#define EIGEN_SPARSE_COMPRESSED_BASE_H - -namespace Eigen { - -template class SparseCompressedBase; - -namespace internal { - -template -struct traits > : traits -{}; - -} // end namespace internal - -/** \ingroup SparseCore_Module - * \class SparseCompressedBase - * \brief Common base class for sparse [compressed]-{row|column}-storage format. - * - * This class defines the common interface for all derived classes implementing the compressed sparse storage format, such as: - * - SparseMatrix - * - Ref - * - Map - * - */ -template -class SparseCompressedBase - : public SparseMatrixBase -{ - public: - typedef SparseMatrixBase Base; - EIGEN_SPARSE_PUBLIC_INTERFACE(SparseCompressedBase) - using Base::operator=; - using Base::IsRowMajor; - - class InnerIterator; - class ReverseInnerIterator; - - protected: - typedef typename Base::IndexVector IndexVector; - Eigen::Map innerNonZeros() { return Eigen::Map(innerNonZeroPtr(), isCompressed()?0:derived().outerSize()); } - const Eigen::Map innerNonZeros() const { return Eigen::Map(innerNonZeroPtr(), isCompressed()?0:derived().outerSize()); } - - public: - - /** \returns the number of non zero coefficients */ - inline Index nonZeros() const - { - if(Derived::IsVectorAtCompileTime && outerIndexPtr()==0) - return derived().nonZeros(); - else if(isCompressed()) - return outerIndexPtr()[derived().outerSize()]-outerIndexPtr()[0]; - else if(derived().outerSize()==0) - return 0; - else - return innerNonZeros().sum(); - } - - /** \returns a const pointer to the array of values. - * This function is aimed at interoperability with other libraries. - * \sa innerIndexPtr(), outerIndexPtr() */ - inline const Scalar* valuePtr() const { return derived().valuePtr(); } - /** \returns a non-const pointer to the array of values. - * This function is aimed at interoperability with other libraries. - * \sa innerIndexPtr(), outerIndexPtr() */ - inline Scalar* valuePtr() { return derived().valuePtr(); } - - /** \returns a const pointer to the array of inner indices. - * This function is aimed at interoperability with other libraries. - * \sa valuePtr(), outerIndexPtr() */ - inline const StorageIndex* innerIndexPtr() const { return derived().innerIndexPtr(); } - /** \returns a non-const pointer to the array of inner indices. - * This function is aimed at interoperability with other libraries. - * \sa valuePtr(), outerIndexPtr() */ - inline StorageIndex* innerIndexPtr() { return derived().innerIndexPtr(); } - - /** \returns a const pointer to the array of the starting positions of the inner vectors. - * This function is aimed at interoperability with other libraries. - * \warning it returns the null pointer 0 for SparseVector - * \sa valuePtr(), innerIndexPtr() */ - inline const StorageIndex* outerIndexPtr() const { return derived().outerIndexPtr(); } - /** \returns a non-const pointer to the array of the starting positions of the inner vectors. - * This function is aimed at interoperability with other libraries. - * \warning it returns the null pointer 0 for SparseVector - * \sa valuePtr(), innerIndexPtr() */ - inline StorageIndex* outerIndexPtr() { return derived().outerIndexPtr(); } - - /** \returns a const pointer to the array of the number of non zeros of the inner vectors. - * This function is aimed at interoperability with other libraries. - * \warning it returns the null pointer 0 in compressed mode */ - inline const StorageIndex* innerNonZeroPtr() const { return derived().innerNonZeroPtr(); } - /** \returns a non-const pointer to the array of the number of non zeros of the inner vectors. - * This function is aimed at interoperability with other libraries. - * \warning it returns the null pointer 0 in compressed mode */ - inline StorageIndex* innerNonZeroPtr() { return derived().innerNonZeroPtr(); } - - /** \returns whether \c *this is in compressed form. */ - inline bool isCompressed() const { return innerNonZeroPtr()==0; } - - /** \returns a read-only view of the stored coefficients as a 1D array expression. - * - * \warning this method is for \b compressed \b storage \b only, and it will trigger an assertion otherwise. - * - * \sa valuePtr(), isCompressed() */ - const Map > coeffs() const { eigen_assert(isCompressed()); return Array::Map(valuePtr(),nonZeros()); } - - /** \returns a read-write view of the stored coefficients as a 1D array expression - * - * \warning this method is for \b compressed \b storage \b only, and it will trigger an assertion otherwise. - * - * Here is an example: - * \include SparseMatrix_coeffs.cpp - * and the output is: - * \include SparseMatrix_coeffs.out - * - * \sa valuePtr(), isCompressed() */ - Map > coeffs() { eigen_assert(isCompressed()); return Array::Map(valuePtr(),nonZeros()); } - - protected: - /** Default constructor. Do nothing. */ - SparseCompressedBase() {} - private: - template explicit SparseCompressedBase(const SparseCompressedBase&); -}; - -template -class SparseCompressedBase::InnerIterator -{ - public: - InnerIterator() - : m_values(0), m_indices(0), m_outer(0), m_id(0), m_end(0) - {} - - InnerIterator(const InnerIterator& other) - : m_values(other.m_values), m_indices(other.m_indices), m_outer(other.m_outer), m_id(other.m_id), m_end(other.m_end) - {} - - InnerIterator& operator=(const InnerIterator& other) - { - m_values = other.m_values; - m_indices = other.m_indices; - const_cast(m_outer).setValue(other.m_outer.value()); - m_id = other.m_id; - m_end = other.m_end; - return *this; - } - - InnerIterator(const SparseCompressedBase& mat, Index outer) - : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(outer) - { - if(Derived::IsVectorAtCompileTime && mat.outerIndexPtr()==0) - { - m_id = 0; - m_end = mat.nonZeros(); - } - else - { - m_id = mat.outerIndexPtr()[outer]; - if(mat.isCompressed()) - m_end = mat.outerIndexPtr()[outer+1]; - else - m_end = m_id + mat.innerNonZeroPtr()[outer]; - } - } - - explicit InnerIterator(const SparseCompressedBase& mat) - : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(0), m_id(0), m_end(mat.nonZeros()) - { - EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived); - } - - explicit InnerIterator(const internal::CompressedStorage& data) - : m_values(data.valuePtr()), m_indices(data.indexPtr()), m_outer(0), m_id(0), m_end(data.size()) - { - EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived); - } - - inline InnerIterator& operator++() { m_id++; return *this; } - - inline const Scalar& value() const { return m_values[m_id]; } - inline Scalar& valueRef() { return const_cast(m_values[m_id]); } - - inline StorageIndex index() const { return m_indices[m_id]; } - inline Index outer() const { return m_outer.value(); } - inline Index row() const { return IsRowMajor ? m_outer.value() : index(); } - inline Index col() const { return IsRowMajor ? index() : m_outer.value(); } - - inline operator bool() const { return (m_id < m_end); } - - protected: - const Scalar* m_values; - const StorageIndex* m_indices; - typedef internal::variable_if_dynamic OuterType; - const OuterType m_outer; - Index m_id; - Index m_end; - private: - // If you get here, then you're not using the right InnerIterator type, e.g.: - // SparseMatrix A; - // SparseMatrix::InnerIterator it(A,0); - template InnerIterator(const SparseMatrixBase&, Index outer); -}; - -template -class SparseCompressedBase::ReverseInnerIterator -{ - public: - ReverseInnerIterator(const SparseCompressedBase& mat, Index outer) - : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(outer) - { - if(Derived::IsVectorAtCompileTime && mat.outerIndexPtr()==0) - { - m_start = 0; - m_id = mat.nonZeros(); - } - else - { - m_start = mat.outerIndexPtr()[outer]; - if(mat.isCompressed()) - m_id = mat.outerIndexPtr()[outer+1]; - else - m_id = m_start + mat.innerNonZeroPtr()[outer]; - } - } - - explicit ReverseInnerIterator(const SparseCompressedBase& mat) - : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(0), m_start(0), m_id(mat.nonZeros()) - { - EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived); - } - - explicit ReverseInnerIterator(const internal::CompressedStorage& data) - : m_values(data.valuePtr()), m_indices(data.indexPtr()), m_outer(0), m_start(0), m_id(data.size()) - { - EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived); - } - - inline ReverseInnerIterator& operator--() { --m_id; return *this; } - - inline const Scalar& value() const { return m_values[m_id-1]; } - inline Scalar& valueRef() { return const_cast(m_values[m_id-1]); } - - inline StorageIndex index() const { return m_indices[m_id-1]; } - inline Index outer() const { return m_outer.value(); } - inline Index row() const { return IsRowMajor ? m_outer.value() : index(); } - inline Index col() const { return IsRowMajor ? index() : m_outer.value(); } - - inline operator bool() const { return (m_id > m_start); } - - protected: - const Scalar* m_values; - const StorageIndex* m_indices; - typedef internal::variable_if_dynamic OuterType; - const OuterType m_outer; - Index m_start; - Index m_id; -}; - -namespace internal { - -template -struct evaluator > - : evaluator_base -{ - typedef typename Derived::Scalar Scalar; - typedef typename Derived::InnerIterator InnerIterator; - - enum { - CoeffReadCost = NumTraits::ReadCost, - Flags = Derived::Flags - }; - - evaluator() : m_matrix(0), m_zero(0) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - explicit evaluator(const Derived &mat) : m_matrix(&mat), m_zero(0) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - - inline Index nonZerosEstimate() const { - return m_matrix->nonZeros(); - } - - operator Derived&() { return m_matrix->const_cast_derived(); } - operator const Derived&() const { return *m_matrix; } - - typedef typename DenseCoeffsBase::CoeffReturnType CoeffReturnType; - const Scalar& coeff(Index row, Index col) const - { - Index p = find(row,col); - - if(p==Dynamic) - return m_zero; - else - return m_matrix->const_cast_derived().valuePtr()[p]; - } - - Scalar& coeffRef(Index row, Index col) - { - Index p = find(row,col); - eigen_assert(p!=Dynamic && "written coefficient does not exist"); - return m_matrix->const_cast_derived().valuePtr()[p]; - } - -protected: - - Index find(Index row, Index col) const - { - eigen_internal_assert(row>=0 && rowrows() && col>=0 && colcols()); - - const Index outer = Derived::IsRowMajor ? row : col; - const Index inner = Derived::IsRowMajor ? col : row; - - Index start = m_matrix->outerIndexPtr()[outer]; - Index end = m_matrix->isCompressed() ? m_matrix->outerIndexPtr()[outer+1] : m_matrix->outerIndexPtr()[outer] + m_matrix->innerNonZeroPtr()[outer]; - eigen_assert(end>=start && "you are using a non finalized sparse matrix or written coefficient does not exist"); - const Index p = std::lower_bound(m_matrix->innerIndexPtr()+start, m_matrix->innerIndexPtr()+end,inner) - m_matrix->innerIndexPtr(); - - return ((pinnerIndexPtr()[p]==inner)) ? p : Dynamic; - } - - const Derived *m_matrix; - const Scalar m_zero; -}; - -} - -} // end namespace Eigen - -#endif // EIGEN_SPARSE_COMPRESSED_BASE_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseCwiseBinaryOp.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseCwiseBinaryOp.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseCwiseBinaryOp.h +++ /dev/null @@ -1,726 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_CWISE_BINARY_OP_H -#define EIGEN_SPARSE_CWISE_BINARY_OP_H - -namespace Eigen { - -// Here we have to handle 3 cases: -// 1 - sparse op dense -// 2 - dense op sparse -// 3 - sparse op sparse -// We also need to implement a 4th iterator for: -// 4 - dense op dense -// Finally, we also need to distinguish between the product and other operations : -// configuration returned mode -// 1 - sparse op dense product sparse -// generic dense -// 2 - dense op sparse product sparse -// generic dense -// 3 - sparse op sparse product sparse -// generic sparse -// 4 - dense op dense product dense -// generic dense -// -// TODO to ease compiler job, we could specialize product/quotient with a scalar -// and fallback to cwise-unary evaluator using bind1st_op and bind2nd_op. - -template -class CwiseBinaryOpImpl - : public SparseMatrixBase > -{ - public: - typedef CwiseBinaryOp Derived; - typedef SparseMatrixBase Base; - EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) - CwiseBinaryOpImpl() - { - EIGEN_STATIC_ASSERT(( - (!internal::is_same::StorageKind, - typename internal::traits::StorageKind>::value) - || ((internal::evaluator::Flags&RowMajorBit) == (internal::evaluator::Flags&RowMajorBit))), - THE_STORAGE_ORDER_OF_BOTH_SIDES_MUST_MATCH); - } -}; - -namespace internal { - - -// Generic "sparse OP sparse" -template struct binary_sparse_evaluator; - -template -struct binary_evaluator, IteratorBased, IteratorBased> - : evaluator_base > -{ -protected: - typedef typename evaluator::InnerIterator LhsIterator; - typedef typename evaluator::InnerIterator RhsIterator; - typedef CwiseBinaryOp XprType; - typedef typename traits::Scalar Scalar; - typedef typename XprType::StorageIndex StorageIndex; -public: - - class InnerIterator - { - public: - - EIGEN_STRONG_INLINE InnerIterator(const binary_evaluator& aEval, Index outer) - : m_lhsIter(aEval.m_lhsImpl,outer), m_rhsIter(aEval.m_rhsImpl,outer), m_functor(aEval.m_functor) - { - this->operator++(); - } - - EIGEN_STRONG_INLINE InnerIterator& operator++() - { - if (m_lhsIter && m_rhsIter && (m_lhsIter.index() == m_rhsIter.index())) - { - m_id = m_lhsIter.index(); - m_value = m_functor(m_lhsIter.value(), m_rhsIter.value()); - ++m_lhsIter; - ++m_rhsIter; - } - else if (m_lhsIter && (!m_rhsIter || (m_lhsIter.index() < m_rhsIter.index()))) - { - m_id = m_lhsIter.index(); - m_value = m_functor(m_lhsIter.value(), Scalar(0)); - ++m_lhsIter; - } - else if (m_rhsIter && (!m_lhsIter || (m_lhsIter.index() > m_rhsIter.index()))) - { - m_id = m_rhsIter.index(); - m_value = m_functor(Scalar(0), m_rhsIter.value()); - ++m_rhsIter; - } - else - { - m_value = 0; // this is to avoid a compilation warning - m_id = -1; - } - return *this; - } - - EIGEN_STRONG_INLINE Scalar value() const { return m_value; } - - EIGEN_STRONG_INLINE StorageIndex index() const { return m_id; } - EIGEN_STRONG_INLINE Index outer() const { return m_lhsIter.outer(); } - EIGEN_STRONG_INLINE Index row() const { return Lhs::IsRowMajor ? m_lhsIter.row() : index(); } - EIGEN_STRONG_INLINE Index col() const { return Lhs::IsRowMajor ? index() : m_lhsIter.col(); } - - EIGEN_STRONG_INLINE operator bool() const { return m_id>=0; } - - protected: - LhsIterator m_lhsIter; - RhsIterator m_rhsIter; - const BinaryOp& m_functor; - Scalar m_value; - StorageIndex m_id; - }; - - - enum { - CoeffReadCost = evaluator::CoeffReadCost + evaluator::CoeffReadCost + functor_traits::Cost, - Flags = XprType::Flags - }; - - explicit binary_evaluator(const XprType& xpr) - : m_functor(xpr.functor()), - m_lhsImpl(xpr.lhs()), - m_rhsImpl(xpr.rhs()) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits::Cost); - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - - inline Index nonZerosEstimate() const { - return m_lhsImpl.nonZerosEstimate() + m_rhsImpl.nonZerosEstimate(); - } - -protected: - const BinaryOp m_functor; - evaluator m_lhsImpl; - evaluator m_rhsImpl; -}; - -// dense op sparse -template -struct binary_evaluator, IndexBased, IteratorBased> - : evaluator_base > -{ -protected: - typedef typename evaluator::InnerIterator RhsIterator; - typedef CwiseBinaryOp XprType; - typedef typename traits::Scalar Scalar; - typedef typename XprType::StorageIndex StorageIndex; -public: - - class InnerIterator - { - enum { IsRowMajor = (int(Rhs::Flags)&RowMajorBit)==RowMajorBit }; - public: - - EIGEN_STRONG_INLINE InnerIterator(const binary_evaluator& aEval, Index outer) - : m_lhsEval(aEval.m_lhsImpl), m_rhsIter(aEval.m_rhsImpl,outer), m_functor(aEval.m_functor), m_value(0), m_id(-1), m_innerSize(aEval.m_expr.rhs().innerSize()) - { - this->operator++(); - } - - EIGEN_STRONG_INLINE InnerIterator& operator++() - { - ++m_id; - if(m_id &m_lhsEval; - RhsIterator m_rhsIter; - const BinaryOp& m_functor; - Scalar m_value; - StorageIndex m_id; - StorageIndex m_innerSize; - }; - - - enum { - CoeffReadCost = evaluator::CoeffReadCost + evaluator::CoeffReadCost + functor_traits::Cost, - // Expose storage order of the sparse expression - Flags = (XprType::Flags & ~RowMajorBit) | (int(Rhs::Flags)&RowMajorBit) - }; - - explicit binary_evaluator(const XprType& xpr) - : m_functor(xpr.functor()), - m_lhsImpl(xpr.lhs()), - m_rhsImpl(xpr.rhs()), - m_expr(xpr) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits::Cost); - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - - inline Index nonZerosEstimate() const { - return m_expr.size(); - } - -protected: - const BinaryOp m_functor; - evaluator m_lhsImpl; - evaluator m_rhsImpl; - const XprType &m_expr; -}; - -// sparse op dense -template -struct binary_evaluator, IteratorBased, IndexBased> - : evaluator_base > -{ -protected: - typedef typename evaluator::InnerIterator LhsIterator; - typedef CwiseBinaryOp XprType; - typedef typename traits::Scalar Scalar; - typedef typename XprType::StorageIndex StorageIndex; -public: - - class InnerIterator - { - enum { IsRowMajor = (int(Lhs::Flags)&RowMajorBit)==RowMajorBit }; - public: - - EIGEN_STRONG_INLINE InnerIterator(const binary_evaluator& aEval, Index outer) - : m_lhsIter(aEval.m_lhsImpl,outer), m_rhsEval(aEval.m_rhsImpl), m_functor(aEval.m_functor), m_value(0), m_id(-1), m_innerSize(aEval.m_expr.lhs().innerSize()) - { - this->operator++(); - } - - EIGEN_STRONG_INLINE InnerIterator& operator++() - { - ++m_id; - if(m_id &m_rhsEval; - const BinaryOp& m_functor; - Scalar m_value; - StorageIndex m_id; - StorageIndex m_innerSize; - }; - - - enum { - CoeffReadCost = evaluator::CoeffReadCost + evaluator::CoeffReadCost + functor_traits::Cost, - // Expose storage order of the sparse expression - Flags = (XprType::Flags & ~RowMajorBit) | (int(Lhs::Flags)&RowMajorBit) - }; - - explicit binary_evaluator(const XprType& xpr) - : m_functor(xpr.functor()), - m_lhsImpl(xpr.lhs()), - m_rhsImpl(xpr.rhs()), - m_expr(xpr) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits::Cost); - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - - inline Index nonZerosEstimate() const { - return m_expr.size(); - } - -protected: - const BinaryOp m_functor; - evaluator m_lhsImpl; - evaluator m_rhsImpl; - const XprType &m_expr; -}; - -template::Kind, - typename RhsKind = typename evaluator_traits::Kind, - typename LhsScalar = typename traits::Scalar, - typename RhsScalar = typename traits::Scalar> struct sparse_conjunction_evaluator; - -// "sparse .* sparse" -template -struct binary_evaluator, Lhs, Rhs>, IteratorBased, IteratorBased> - : sparse_conjunction_evaluator, Lhs, Rhs> > -{ - typedef CwiseBinaryOp, Lhs, Rhs> XprType; - typedef sparse_conjunction_evaluator Base; - explicit binary_evaluator(const XprType& xpr) : Base(xpr) {} -}; -// "dense .* sparse" -template -struct binary_evaluator, Lhs, Rhs>, IndexBased, IteratorBased> - : sparse_conjunction_evaluator, Lhs, Rhs> > -{ - typedef CwiseBinaryOp, Lhs, Rhs> XprType; - typedef sparse_conjunction_evaluator Base; - explicit binary_evaluator(const XprType& xpr) : Base(xpr) {} -}; -// "sparse .* dense" -template -struct binary_evaluator, Lhs, Rhs>, IteratorBased, IndexBased> - : sparse_conjunction_evaluator, Lhs, Rhs> > -{ - typedef CwiseBinaryOp, Lhs, Rhs> XprType; - typedef sparse_conjunction_evaluator Base; - explicit binary_evaluator(const XprType& xpr) : Base(xpr) {} -}; - -// "sparse ./ dense" -template -struct binary_evaluator, Lhs, Rhs>, IteratorBased, IndexBased> - : sparse_conjunction_evaluator, Lhs, Rhs> > -{ - typedef CwiseBinaryOp, Lhs, Rhs> XprType; - typedef sparse_conjunction_evaluator Base; - explicit binary_evaluator(const XprType& xpr) : Base(xpr) {} -}; - -// "sparse && sparse" -template -struct binary_evaluator, IteratorBased, IteratorBased> - : sparse_conjunction_evaluator > -{ - typedef CwiseBinaryOp XprType; - typedef sparse_conjunction_evaluator Base; - explicit binary_evaluator(const XprType& xpr) : Base(xpr) {} -}; -// "dense && sparse" -template -struct binary_evaluator, IndexBased, IteratorBased> - : sparse_conjunction_evaluator > -{ - typedef CwiseBinaryOp XprType; - typedef sparse_conjunction_evaluator Base; - explicit binary_evaluator(const XprType& xpr) : Base(xpr) {} -}; -// "sparse && dense" -template -struct binary_evaluator, IteratorBased, IndexBased> - : sparse_conjunction_evaluator > -{ - typedef CwiseBinaryOp XprType; - typedef sparse_conjunction_evaluator Base; - explicit binary_evaluator(const XprType& xpr) : Base(xpr) {} -}; - -// "sparse ^ sparse" -template -struct sparse_conjunction_evaluator - : evaluator_base -{ -protected: - typedef typename XprType::Functor BinaryOp; - typedef typename XprType::Lhs LhsArg; - typedef typename XprType::Rhs RhsArg; - typedef typename evaluator::InnerIterator LhsIterator; - typedef typename evaluator::InnerIterator RhsIterator; - typedef typename XprType::StorageIndex StorageIndex; - typedef typename traits::Scalar Scalar; -public: - - class InnerIterator - { - public: - - EIGEN_STRONG_INLINE InnerIterator(const sparse_conjunction_evaluator& aEval, Index outer) - : m_lhsIter(aEval.m_lhsImpl,outer), m_rhsIter(aEval.m_rhsImpl,outer), m_functor(aEval.m_functor) - { - while (m_lhsIter && m_rhsIter && (m_lhsIter.index() != m_rhsIter.index())) - { - if (m_lhsIter.index() < m_rhsIter.index()) - ++m_lhsIter; - else - ++m_rhsIter; - } - } - - EIGEN_STRONG_INLINE InnerIterator& operator++() - { - ++m_lhsIter; - ++m_rhsIter; - while (m_lhsIter && m_rhsIter && (m_lhsIter.index() != m_rhsIter.index())) - { - if (m_lhsIter.index() < m_rhsIter.index()) - ++m_lhsIter; - else - ++m_rhsIter; - } - return *this; - } - - EIGEN_STRONG_INLINE Scalar value() const { return m_functor(m_lhsIter.value(), m_rhsIter.value()); } - - EIGEN_STRONG_INLINE StorageIndex index() const { return m_lhsIter.index(); } - EIGEN_STRONG_INLINE Index outer() const { return m_lhsIter.outer(); } - EIGEN_STRONG_INLINE Index row() const { return m_lhsIter.row(); } - EIGEN_STRONG_INLINE Index col() const { return m_lhsIter.col(); } - - EIGEN_STRONG_INLINE operator bool() const { return (m_lhsIter && m_rhsIter); } - - protected: - LhsIterator m_lhsIter; - RhsIterator m_rhsIter; - const BinaryOp& m_functor; - }; - - - enum { - CoeffReadCost = evaluator::CoeffReadCost + evaluator::CoeffReadCost + functor_traits::Cost, - Flags = XprType::Flags - }; - - explicit sparse_conjunction_evaluator(const XprType& xpr) - : m_functor(xpr.functor()), - m_lhsImpl(xpr.lhs()), - m_rhsImpl(xpr.rhs()) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits::Cost); - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - - inline Index nonZerosEstimate() const { - return (std::min)(m_lhsImpl.nonZerosEstimate(), m_rhsImpl.nonZerosEstimate()); - } - -protected: - const BinaryOp m_functor; - evaluator m_lhsImpl; - evaluator m_rhsImpl; -}; - -// "dense ^ sparse" -template -struct sparse_conjunction_evaluator - : evaluator_base -{ -protected: - typedef typename XprType::Functor BinaryOp; - typedef typename XprType::Lhs LhsArg; - typedef typename XprType::Rhs RhsArg; - typedef evaluator LhsEvaluator; - typedef typename evaluator::InnerIterator RhsIterator; - typedef typename XprType::StorageIndex StorageIndex; - typedef typename traits::Scalar Scalar; -public: - - class InnerIterator - { - enum { IsRowMajor = (int(RhsArg::Flags)&RowMajorBit)==RowMajorBit }; - - public: - - EIGEN_STRONG_INLINE InnerIterator(const sparse_conjunction_evaluator& aEval, Index outer) - : m_lhsEval(aEval.m_lhsImpl), m_rhsIter(aEval.m_rhsImpl,outer), m_functor(aEval.m_functor), m_outer(outer) - {} - - EIGEN_STRONG_INLINE InnerIterator& operator++() - { - ++m_rhsIter; - return *this; - } - - EIGEN_STRONG_INLINE Scalar value() const - { return m_functor(m_lhsEval.coeff(IsRowMajor?m_outer:m_rhsIter.index(),IsRowMajor?m_rhsIter.index():m_outer), m_rhsIter.value()); } - - EIGEN_STRONG_INLINE StorageIndex index() const { return m_rhsIter.index(); } - EIGEN_STRONG_INLINE Index outer() const { return m_rhsIter.outer(); } - EIGEN_STRONG_INLINE Index row() const { return m_rhsIter.row(); } - EIGEN_STRONG_INLINE Index col() const { return m_rhsIter.col(); } - - EIGEN_STRONG_INLINE operator bool() const { return m_rhsIter; } - - protected: - const LhsEvaluator &m_lhsEval; - RhsIterator m_rhsIter; - const BinaryOp& m_functor; - const Index m_outer; - }; - - - enum { - CoeffReadCost = evaluator::CoeffReadCost + evaluator::CoeffReadCost + functor_traits::Cost, - // Expose storage order of the sparse expression - Flags = (XprType::Flags & ~RowMajorBit) | (int(RhsArg::Flags)&RowMajorBit) - }; - - explicit sparse_conjunction_evaluator(const XprType& xpr) - : m_functor(xpr.functor()), - m_lhsImpl(xpr.lhs()), - m_rhsImpl(xpr.rhs()) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits::Cost); - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - - inline Index nonZerosEstimate() const { - return m_rhsImpl.nonZerosEstimate(); - } - -protected: - const BinaryOp m_functor; - evaluator m_lhsImpl; - evaluator m_rhsImpl; -}; - -// "sparse ^ dense" -template -struct sparse_conjunction_evaluator - : evaluator_base -{ -protected: - typedef typename XprType::Functor BinaryOp; - typedef typename XprType::Lhs LhsArg; - typedef typename XprType::Rhs RhsArg; - typedef typename evaluator::InnerIterator LhsIterator; - typedef evaluator RhsEvaluator; - typedef typename XprType::StorageIndex StorageIndex; - typedef typename traits::Scalar Scalar; -public: - - class InnerIterator - { - enum { IsRowMajor = (int(LhsArg::Flags)&RowMajorBit)==RowMajorBit }; - - public: - - EIGEN_STRONG_INLINE InnerIterator(const sparse_conjunction_evaluator& aEval, Index outer) - : m_lhsIter(aEval.m_lhsImpl,outer), m_rhsEval(aEval.m_rhsImpl), m_functor(aEval.m_functor), m_outer(outer) - {} - - EIGEN_STRONG_INLINE InnerIterator& operator++() - { - ++m_lhsIter; - return *this; - } - - EIGEN_STRONG_INLINE Scalar value() const - { return m_functor(m_lhsIter.value(), - m_rhsEval.coeff(IsRowMajor?m_outer:m_lhsIter.index(),IsRowMajor?m_lhsIter.index():m_outer)); } - - EIGEN_STRONG_INLINE StorageIndex index() const { return m_lhsIter.index(); } - EIGEN_STRONG_INLINE Index outer() const { return m_lhsIter.outer(); } - EIGEN_STRONG_INLINE Index row() const { return m_lhsIter.row(); } - EIGEN_STRONG_INLINE Index col() const { return m_lhsIter.col(); } - - EIGEN_STRONG_INLINE operator bool() const { return m_lhsIter; } - - protected: - LhsIterator m_lhsIter; - const evaluator &m_rhsEval; - const BinaryOp& m_functor; - const Index m_outer; - }; - - - enum { - CoeffReadCost = evaluator::CoeffReadCost + evaluator::CoeffReadCost + functor_traits::Cost, - // Expose storage order of the sparse expression - Flags = (XprType::Flags & ~RowMajorBit) | (int(LhsArg::Flags)&RowMajorBit) - }; - - explicit sparse_conjunction_evaluator(const XprType& xpr) - : m_functor(xpr.functor()), - m_lhsImpl(xpr.lhs()), - m_rhsImpl(xpr.rhs()) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits::Cost); - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - - inline Index nonZerosEstimate() const { - return m_lhsImpl.nonZerosEstimate(); - } - -protected: - const BinaryOp m_functor; - evaluator m_lhsImpl; - evaluator m_rhsImpl; -}; - -} - -/*************************************************************************** -* Implementation of SparseMatrixBase and SparseCwise functions/operators -***************************************************************************/ - -template -template -Derived& SparseMatrixBase::operator+=(const EigenBase &other) -{ - call_assignment(derived(), other.derived(), internal::add_assign_op()); - return derived(); -} - -template -template -Derived& SparseMatrixBase::operator-=(const EigenBase &other) -{ - call_assignment(derived(), other.derived(), internal::assign_op()); - return derived(); -} - -template -template -EIGEN_STRONG_INLINE Derived & -SparseMatrixBase::operator-=(const SparseMatrixBase &other) -{ - return derived() = derived() - other.derived(); -} - -template -template -EIGEN_STRONG_INLINE Derived & -SparseMatrixBase::operator+=(const SparseMatrixBase& other) -{ - return derived() = derived() + other.derived(); -} - -template -template -Derived& SparseMatrixBase::operator+=(const DiagonalBase& other) -{ - call_assignment_no_alias(derived(), other.derived(), internal::add_assign_op()); - return derived(); -} - -template -template -Derived& SparseMatrixBase::operator-=(const DiagonalBase& other) -{ - call_assignment_no_alias(derived(), other.derived(), internal::sub_assign_op()); - return derived(); -} - -template -template -EIGEN_STRONG_INLINE const typename SparseMatrixBase::template CwiseProductDenseReturnType::Type -SparseMatrixBase::cwiseProduct(const MatrixBase &other) const -{ - return typename CwiseProductDenseReturnType::Type(derived(), other.derived()); -} - -template -EIGEN_STRONG_INLINE const CwiseBinaryOp, const DenseDerived, const SparseDerived> -operator+(const MatrixBase &a, const SparseMatrixBase &b) -{ - return CwiseBinaryOp, const DenseDerived, const SparseDerived>(a.derived(), b.derived()); -} - -template -EIGEN_STRONG_INLINE const CwiseBinaryOp, const SparseDerived, const DenseDerived> -operator+(const SparseMatrixBase &a, const MatrixBase &b) -{ - return CwiseBinaryOp, const SparseDerived, const DenseDerived>(a.derived(), b.derived()); -} - -template -EIGEN_STRONG_INLINE const CwiseBinaryOp, const DenseDerived, const SparseDerived> -operator-(const MatrixBase &a, const SparseMatrixBase &b) -{ - return CwiseBinaryOp, const DenseDerived, const SparseDerived>(a.derived(), b.derived()); -} - -template -EIGEN_STRONG_INLINE const CwiseBinaryOp, const SparseDerived, const DenseDerived> -operator-(const SparseMatrixBase &a, const MatrixBase &b) -{ - return CwiseBinaryOp, const SparseDerived, const DenseDerived>(a.derived(), b.derived()); -} - -} // end namespace Eigen - -#endif // EIGEN_SPARSE_CWISE_BINARY_OP_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseCwiseUnaryOp.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseCwiseUnaryOp.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseCwiseUnaryOp.h +++ /dev/null @@ -1,148 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2015 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_CWISE_UNARY_OP_H -#define EIGEN_SPARSE_CWISE_UNARY_OP_H - -namespace Eigen { - -namespace internal { - -template -struct unary_evaluator, IteratorBased> - : public evaluator_base > -{ - public: - typedef CwiseUnaryOp XprType; - - class InnerIterator; - - enum { - CoeffReadCost = evaluator::CoeffReadCost + functor_traits::Cost, - Flags = XprType::Flags - }; - - explicit unary_evaluator(const XprType& op) : m_functor(op.functor()), m_argImpl(op.nestedExpression()) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits::Cost); - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - - inline Index nonZerosEstimate() const { - return m_argImpl.nonZerosEstimate(); - } - - protected: - typedef typename evaluator::InnerIterator EvalIterator; - - const UnaryOp m_functor; - evaluator m_argImpl; -}; - -template -class unary_evaluator, IteratorBased>::InnerIterator - : public unary_evaluator, IteratorBased>::EvalIterator -{ - typedef typename XprType::Scalar Scalar; - typedef typename unary_evaluator, IteratorBased>::EvalIterator Base; - public: - - EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& unaryOp, Index outer) - : Base(unaryOp.m_argImpl,outer), m_functor(unaryOp.m_functor) - {} - - EIGEN_STRONG_INLINE InnerIterator& operator++() - { Base::operator++(); return *this; } - - EIGEN_STRONG_INLINE Scalar value() const { return m_functor(Base::value()); } - - protected: - const UnaryOp m_functor; - private: - Scalar& valueRef(); -}; - -template -struct unary_evaluator, IteratorBased> - : public evaluator_base > -{ - public: - typedef CwiseUnaryView XprType; - - class InnerIterator; - - enum { - CoeffReadCost = evaluator::CoeffReadCost + functor_traits::Cost, - Flags = XprType::Flags - }; - - explicit unary_evaluator(const XprType& op) : m_functor(op.functor()), m_argImpl(op.nestedExpression()) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits::Cost); - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - - protected: - typedef typename evaluator::InnerIterator EvalIterator; - - const ViewOp m_functor; - evaluator m_argImpl; -}; - -template -class unary_evaluator, IteratorBased>::InnerIterator - : public unary_evaluator, IteratorBased>::EvalIterator -{ - typedef typename XprType::Scalar Scalar; - typedef typename unary_evaluator, IteratorBased>::EvalIterator Base; - public: - - EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& unaryOp, Index outer) - : Base(unaryOp.m_argImpl,outer), m_functor(unaryOp.m_functor) - {} - - EIGEN_STRONG_INLINE InnerIterator& operator++() - { Base::operator++(); return *this; } - - EIGEN_STRONG_INLINE Scalar value() const { return m_functor(Base::value()); } - EIGEN_STRONG_INLINE Scalar& valueRef() { return m_functor(Base::valueRef()); } - - protected: - const ViewOp m_functor; -}; - -} // end namespace internal - -template -EIGEN_STRONG_INLINE Derived& -SparseMatrixBase::operator*=(const Scalar& other) -{ - typedef typename internal::evaluator::InnerIterator EvalIterator; - internal::evaluator thisEval(derived()); - for (Index j=0; j -EIGEN_STRONG_INLINE Derived& -SparseMatrixBase::operator/=(const Scalar& other) -{ - typedef typename internal::evaluator::InnerIterator EvalIterator; - internal::evaluator thisEval(derived()); - for (Index j=0; j -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSEDENSEPRODUCT_H -#define EIGEN_SPARSEDENSEPRODUCT_H - -namespace Eigen { - -namespace internal { - -template <> struct product_promote_storage_type { typedef Sparse ret; }; -template <> struct product_promote_storage_type { typedef Sparse ret; }; - -template -struct sparse_time_dense_product_impl; - -template -struct sparse_time_dense_product_impl -{ - typedef typename internal::remove_all::type Lhs; - typedef typename internal::remove_all::type Rhs; - typedef typename internal::remove_all::type Res; - typedef typename evaluator::InnerIterator LhsInnerIterator; - typedef evaluator LhsEval; - static void run(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const typename Res::Scalar& alpha) - { - LhsEval lhsEval(lhs); - - Index n = lhs.outerSize(); -#ifdef EIGEN_HAS_OPENMP - Eigen::initParallel(); - Index threads = Eigen::nbThreads(); -#endif - - for(Index c=0; c1 && lhsEval.nonZerosEstimate() > 20000) - { - #pragma omp parallel for schedule(dynamic,(n+threads*4-1)/(threads*4)) num_threads(threads) - for(Index i=0; i let's disable it for now as it is conflicting with generic scalar*matrix and matrix*scalar operators -// template -// struct ScalarBinaryOpTraits > -// { -// enum { -// Defined = 1 -// }; -// typedef typename CwiseUnaryOp, T2>::PlainObject ReturnType; -// }; - -template -struct sparse_time_dense_product_impl -{ - typedef typename internal::remove_all::type Lhs; - typedef typename internal::remove_all::type Rhs; - typedef typename internal::remove_all::type Res; - typedef typename evaluator::InnerIterator LhsInnerIterator; - static void run(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const AlphaType& alpha) - { - evaluator lhsEval(lhs); - for(Index c=0; c::ReturnType rhs_j(alpha * rhs.coeff(j,c)); - for(LhsInnerIterator it(lhsEval,j); it ;++it) - res.coeffRef(it.index(),c) += it.value() * rhs_j; - } - } - } -}; - -template -struct sparse_time_dense_product_impl -{ - typedef typename internal::remove_all::type Lhs; - typedef typename internal::remove_all::type Rhs; - typedef typename internal::remove_all::type Res; - typedef typename evaluator::InnerIterator LhsInnerIterator; - static void run(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const typename Res::Scalar& alpha) - { - evaluator lhsEval(lhs); - for(Index j=0; j -struct sparse_time_dense_product_impl -{ - typedef typename internal::remove_all::type Lhs; - typedef typename internal::remove_all::type Rhs; - typedef typename internal::remove_all::type Res; - typedef typename evaluator::InnerIterator LhsInnerIterator; - static void run(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const typename Res::Scalar& alpha) - { - evaluator lhsEval(lhs); - for(Index j=0; j -inline void sparse_time_dense_product(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const AlphaType& alpha) -{ - sparse_time_dense_product_impl::run(lhs, rhs, res, alpha); -} - -} // end namespace internal - -namespace internal { - -template -struct generic_product_impl - : generic_product_impl_base > -{ - typedef typename Product::Scalar Scalar; - - template - static void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha) - { - typedef typename nested_eval::type LhsNested; - typedef typename nested_eval::type RhsNested; - LhsNested lhsNested(lhs); - RhsNested rhsNested(rhs); - internal::sparse_time_dense_product(lhsNested, rhsNested, dst, alpha); - } -}; - -template -struct generic_product_impl - : generic_product_impl -{}; - -template -struct generic_product_impl - : generic_product_impl_base > -{ - typedef typename Product::Scalar Scalar; - - template - static void scaleAndAddTo(Dst& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha) - { - typedef typename nested_eval::type LhsNested; - typedef typename nested_eval::type RhsNested; - LhsNested lhsNested(lhs); - RhsNested rhsNested(rhs); - - // transpose everything - Transpose dstT(dst); - internal::sparse_time_dense_product(rhsNested.transpose(), lhsNested.transpose(), dstT, alpha); - } -}; - -template -struct generic_product_impl - : generic_product_impl -{}; - -template -struct sparse_dense_outer_product_evaluator -{ -protected: - typedef typename conditional::type Lhs1; - typedef typename conditional::type ActualRhs; - typedef Product ProdXprType; - - // if the actual left-hand side is a dense vector, - // then build a sparse-view so that we can seamlessly iterate over it. - typedef typename conditional::StorageKind,Sparse>::value, - Lhs1, SparseView >::type ActualLhs; - typedef typename conditional::StorageKind,Sparse>::value, - Lhs1 const&, SparseView >::type LhsArg; - - typedef evaluator LhsEval; - typedef evaluator RhsEval; - typedef typename evaluator::InnerIterator LhsIterator; - typedef typename ProdXprType::Scalar Scalar; - -public: - enum { - Flags = NeedToTranspose ? RowMajorBit : 0, - CoeffReadCost = HugeCost - }; - - class InnerIterator : public LhsIterator - { - public: - InnerIterator(const sparse_dense_outer_product_evaluator &xprEval, Index outer) - : LhsIterator(xprEval.m_lhsXprImpl, 0), - m_outer(outer), - m_empty(false), - m_factor(get(xprEval.m_rhsXprImpl, outer, typename internal::traits::StorageKind() )) - {} - - EIGEN_STRONG_INLINE Index outer() const { return m_outer; } - EIGEN_STRONG_INLINE Index row() const { return NeedToTranspose ? m_outer : LhsIterator::index(); } - EIGEN_STRONG_INLINE Index col() const { return NeedToTranspose ? LhsIterator::index() : m_outer; } - - EIGEN_STRONG_INLINE Scalar value() const { return LhsIterator::value() * m_factor; } - EIGEN_STRONG_INLINE operator bool() const { return LhsIterator::operator bool() && (!m_empty); } - - protected: - Scalar get(const RhsEval &rhs, Index outer, Dense = Dense()) const - { - return rhs.coeff(outer); - } - - Scalar get(const RhsEval &rhs, Index outer, Sparse = Sparse()) - { - typename RhsEval::InnerIterator it(rhs, outer); - if (it && it.index()==0 && it.value()!=Scalar(0)) - return it.value(); - m_empty = true; - return Scalar(0); - } - - Index m_outer; - bool m_empty; - Scalar m_factor; - }; - - sparse_dense_outer_product_evaluator(const Lhs1 &lhs, const ActualRhs &rhs) - : m_lhs(lhs), m_lhsXprImpl(m_lhs), m_rhsXprImpl(rhs) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - - // transpose case - sparse_dense_outer_product_evaluator(const ActualRhs &rhs, const Lhs1 &lhs) - : m_lhs(lhs), m_lhsXprImpl(m_lhs), m_rhsXprImpl(rhs) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - -protected: - const LhsArg m_lhs; - evaluator m_lhsXprImpl; - evaluator m_rhsXprImpl; -}; - -// sparse * dense outer product -template -struct product_evaluator, OuterProduct, SparseShape, DenseShape> - : sparse_dense_outer_product_evaluator -{ - typedef sparse_dense_outer_product_evaluator Base; - - typedef Product XprType; - typedef typename XprType::PlainObject PlainObject; - - explicit product_evaluator(const XprType& xpr) - : Base(xpr.lhs(), xpr.rhs()) - {} - -}; - -template -struct product_evaluator, OuterProduct, DenseShape, SparseShape> - : sparse_dense_outer_product_evaluator -{ - typedef sparse_dense_outer_product_evaluator Base; - - typedef Product XprType; - typedef typename XprType::PlainObject PlainObject; - - explicit product_evaluator(const XprType& xpr) - : Base(xpr.lhs(), xpr.rhs()) - {} - -}; - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_SPARSEDENSEPRODUCT_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseDiagonalProduct.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseDiagonalProduct.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseDiagonalProduct.h +++ /dev/null @@ -1,138 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2009-2015 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_DIAGONAL_PRODUCT_H -#define EIGEN_SPARSE_DIAGONAL_PRODUCT_H - -namespace Eigen { - -// The product of a diagonal matrix with a sparse matrix can be easily -// implemented using expression template. -// We have two consider very different cases: -// 1 - diag * row-major sparse -// => each inner vector <=> scalar * sparse vector product -// => so we can reuse CwiseUnaryOp::InnerIterator -// 2 - diag * col-major sparse -// => each inner vector <=> densevector * sparse vector cwise product -// => again, we can reuse specialization of CwiseBinaryOp::InnerIterator -// for that particular case -// The two other cases are symmetric. - -namespace internal { - -enum { - SDP_AsScalarProduct, - SDP_AsCwiseProduct -}; - -template -struct sparse_diagonal_product_evaluator; - -template -struct product_evaluator, ProductTag, DiagonalShape, SparseShape> - : public sparse_diagonal_product_evaluator -{ - typedef Product XprType; - enum { CoeffReadCost = HugeCost, Flags = Rhs::Flags&RowMajorBit, Alignment = 0 }; // FIXME CoeffReadCost & Flags - - typedef sparse_diagonal_product_evaluator Base; - explicit product_evaluator(const XprType& xpr) : Base(xpr.rhs(), xpr.lhs().diagonal()) {} -}; - -template -struct product_evaluator, ProductTag, SparseShape, DiagonalShape> - : public sparse_diagonal_product_evaluator, Lhs::Flags&RowMajorBit?SDP_AsCwiseProduct:SDP_AsScalarProduct> -{ - typedef Product XprType; - enum { CoeffReadCost = HugeCost, Flags = Lhs::Flags&RowMajorBit, Alignment = 0 }; // FIXME CoeffReadCost & Flags - - typedef sparse_diagonal_product_evaluator, Lhs::Flags&RowMajorBit?SDP_AsCwiseProduct:SDP_AsScalarProduct> Base; - explicit product_evaluator(const XprType& xpr) : Base(xpr.lhs(), xpr.rhs().diagonal().transpose()) {} -}; - -template -struct sparse_diagonal_product_evaluator -{ -protected: - typedef typename evaluator::InnerIterator SparseXprInnerIterator; - typedef typename SparseXprType::Scalar Scalar; - -public: - class InnerIterator : public SparseXprInnerIterator - { - public: - InnerIterator(const sparse_diagonal_product_evaluator &xprEval, Index outer) - : SparseXprInnerIterator(xprEval.m_sparseXprImpl, outer), - m_coeff(xprEval.m_diagCoeffImpl.coeff(outer)) - {} - - EIGEN_STRONG_INLINE Scalar value() const { return m_coeff * SparseXprInnerIterator::value(); } - protected: - typename DiagonalCoeffType::Scalar m_coeff; - }; - - sparse_diagonal_product_evaluator(const SparseXprType &sparseXpr, const DiagonalCoeffType &diagCoeff) - : m_sparseXprImpl(sparseXpr), m_diagCoeffImpl(diagCoeff) - {} - - Index nonZerosEstimate() const { return m_sparseXprImpl.nonZerosEstimate(); } - -protected: - evaluator m_sparseXprImpl; - evaluator m_diagCoeffImpl; -}; - - -template -struct sparse_diagonal_product_evaluator -{ - typedef typename SparseXprType::Scalar Scalar; - typedef typename SparseXprType::StorageIndex StorageIndex; - - typedef typename nested_eval::type DiagCoeffNested; - - class InnerIterator - { - typedef typename evaluator::InnerIterator SparseXprIter; - public: - InnerIterator(const sparse_diagonal_product_evaluator &xprEval, Index outer) - : m_sparseIter(xprEval.m_sparseXprEval, outer), m_diagCoeffNested(xprEval.m_diagCoeffNested) - {} - - inline Scalar value() const { return m_sparseIter.value() * m_diagCoeffNested.coeff(index()); } - inline StorageIndex index() const { return m_sparseIter.index(); } - inline Index outer() const { return m_sparseIter.outer(); } - inline Index col() const { return SparseXprType::IsRowMajor ? m_sparseIter.index() : m_sparseIter.outer(); } - inline Index row() const { return SparseXprType::IsRowMajor ? m_sparseIter.outer() : m_sparseIter.index(); } - - EIGEN_STRONG_INLINE InnerIterator& operator++() { ++m_sparseIter; return *this; } - inline operator bool() const { return m_sparseIter; } - - protected: - SparseXprIter m_sparseIter; - DiagCoeffNested m_diagCoeffNested; - }; - - sparse_diagonal_product_evaluator(const SparseXprType &sparseXpr, const DiagCoeffType &diagCoeff) - : m_sparseXprEval(sparseXpr), m_diagCoeffNested(diagCoeff) - {} - - Index nonZerosEstimate() const { return m_sparseXprEval.nonZerosEstimate(); } - -protected: - evaluator m_sparseXprEval; - DiagCoeffNested m_diagCoeffNested; -}; - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_SPARSE_DIAGONAL_PRODUCT_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseDot.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseDot.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseDot.h +++ /dev/null @@ -1,98 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_DOT_H -#define EIGEN_SPARSE_DOT_H - -namespace Eigen { - -template -template -typename internal::traits::Scalar -SparseMatrixBase::dot(const MatrixBase& other) const -{ - EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) - EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) - EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived) - EIGEN_STATIC_ASSERT((internal::is_same::value), - YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) - - eigen_assert(size() == other.size()); - eigen_assert(other.size()>0 && "you are using a non initialized vector"); - - internal::evaluator thisEval(derived()); - typename internal::evaluator::InnerIterator i(thisEval, 0); - Scalar res(0); - while (i) - { - res += numext::conj(i.value()) * other.coeff(i.index()); - ++i; - } - return res; -} - -template -template -typename internal::traits::Scalar -SparseMatrixBase::dot(const SparseMatrixBase& other) const -{ - EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) - EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) - EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived) - EIGEN_STATIC_ASSERT((internal::is_same::value), - YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) - - eigen_assert(size() == other.size()); - - internal::evaluator thisEval(derived()); - typename internal::evaluator::InnerIterator i(thisEval, 0); - - internal::evaluator otherEval(other.derived()); - typename internal::evaluator::InnerIterator j(otherEval, 0); - - Scalar res(0); - while (i && j) - { - if (i.index()==j.index()) - { - res += numext::conj(i.value()) * j.value(); - ++i; ++j; - } - else if (i.index() -inline typename NumTraits::Scalar>::Real -SparseMatrixBase::squaredNorm() const -{ - return numext::real((*this).cwiseAbs2().sum()); -} - -template -inline typename NumTraits::Scalar>::Real -SparseMatrixBase::norm() const -{ - using std::sqrt; - return sqrt(squaredNorm()); -} - -template -inline typename NumTraits::Scalar>::Real -SparseMatrixBase::blueNorm() const -{ - return internal::blueNorm_impl(*this); -} -} // end namespace Eigen - -#endif // EIGEN_SPARSE_DOT_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseFuzzy.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseFuzzy.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseFuzzy.h +++ /dev/null @@ -1,29 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_FUZZY_H -#define EIGEN_SPARSE_FUZZY_H - -namespace Eigen { - -template -template -bool SparseMatrixBase::isApprox(const SparseMatrixBase& other, const RealScalar &prec) const -{ - const typename internal::nested_eval::type actualA(derived()); - typename internal::conditional::type, - const PlainObject>::type actualB(other.derived()); - - return (actualA - actualB).squaredNorm() <= prec * prec * numext::mini(actualA.squaredNorm(), actualB.squaredNorm()); -} - -} // end namespace Eigen - -#endif // EIGEN_SPARSE_FUZZY_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseMap.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseMap.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseMap.h +++ /dev/null @@ -1,305 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2015 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_MAP_H -#define EIGEN_SPARSE_MAP_H - -namespace Eigen { - -namespace internal { - -template -struct traits, Options, StrideType> > - : public traits > -{ - typedef SparseMatrix PlainObjectType; - typedef traits TraitsBase; - enum { - Flags = TraitsBase::Flags & (~NestByRefBit) - }; -}; - -template -struct traits, Options, StrideType> > - : public traits > -{ - typedef SparseMatrix PlainObjectType; - typedef traits TraitsBase; - enum { - Flags = TraitsBase::Flags & (~ (NestByRefBit | LvalueBit)) - }; -}; - -} // end namespace internal - -template::has_write_access ? WriteAccessors : ReadOnlyAccessors -> class SparseMapBase; - -/** \ingroup SparseCore_Module - * class SparseMapBase - * \brief Common base class for Map and Ref instance of sparse matrix and vector. - */ -template -class SparseMapBase - : public SparseCompressedBase -{ - public: - typedef SparseCompressedBase Base; - typedef typename Base::Scalar Scalar; - typedef typename Base::StorageIndex StorageIndex; - enum { IsRowMajor = Base::IsRowMajor }; - using Base::operator=; - protected: - - typedef typename internal::conditional< - bool(internal::is_lvalue::value), - Scalar *, const Scalar *>::type ScalarPointer; - typedef typename internal::conditional< - bool(internal::is_lvalue::value), - StorageIndex *, const StorageIndex *>::type IndexPointer; - - Index m_outerSize; - Index m_innerSize; - Array m_zero_nnz; - IndexPointer m_outerIndex; - IndexPointer m_innerIndices; - ScalarPointer m_values; - IndexPointer m_innerNonZeros; - - public: - - /** \copydoc SparseMatrixBase::rows() */ - inline Index rows() const { return IsRowMajor ? m_outerSize : m_innerSize; } - /** \copydoc SparseMatrixBase::cols() */ - inline Index cols() const { return IsRowMajor ? m_innerSize : m_outerSize; } - /** \copydoc SparseMatrixBase::innerSize() */ - inline Index innerSize() const { return m_innerSize; } - /** \copydoc SparseMatrixBase::outerSize() */ - inline Index outerSize() const { return m_outerSize; } - /** \copydoc SparseCompressedBase::nonZeros */ - inline Index nonZeros() const { return m_zero_nnz[1]; } - - /** \copydoc SparseCompressedBase::isCompressed */ - bool isCompressed() const { return m_innerNonZeros==0; } - - //---------------------------------------- - // direct access interface - /** \copydoc SparseMatrix::valuePtr */ - inline const Scalar* valuePtr() const { return m_values; } - /** \copydoc SparseMatrix::innerIndexPtr */ - inline const StorageIndex* innerIndexPtr() const { return m_innerIndices; } - /** \copydoc SparseMatrix::outerIndexPtr */ - inline const StorageIndex* outerIndexPtr() const { return m_outerIndex; } - /** \copydoc SparseMatrix::innerNonZeroPtr */ - inline const StorageIndex* innerNonZeroPtr() const { return m_innerNonZeros; } - //---------------------------------------- - - /** \copydoc SparseMatrix::coeff */ - inline Scalar coeff(Index row, Index col) const - { - const Index outer = IsRowMajor ? row : col; - const Index inner = IsRowMajor ? col : row; - - Index start = m_outerIndex[outer]; - Index end = isCompressed() ? m_outerIndex[outer+1] : start + m_innerNonZeros[outer]; - if (start==end) - return Scalar(0); - else if (end>0 && inner==m_innerIndices[end-1]) - return m_values[end-1]; - // ^^ optimization: let's first check if it is the last coefficient - // (very common in high level algorithms) - - const StorageIndex* r = std::lower_bound(&m_innerIndices[start],&m_innerIndices[end-1],inner); - const Index id = r-&m_innerIndices[0]; - return ((*r==inner) && (id(nnz)), m_outerIndex(outerIndexPtr), - m_innerIndices(innerIndexPtr), m_values(valuePtr), m_innerNonZeros(innerNonZerosPtr) - {} - - // for vectors - inline SparseMapBase(Index size, Index nnz, IndexPointer innerIndexPtr, ScalarPointer valuePtr) - : m_outerSize(1), m_innerSize(size), m_zero_nnz(0,internal::convert_index(nnz)), m_outerIndex(m_zero_nnz.data()), - m_innerIndices(innerIndexPtr), m_values(valuePtr), m_innerNonZeros(0) - {} - - /** Empty destructor */ - inline ~SparseMapBase() {} - - protected: - inline SparseMapBase() {} -}; - -/** \ingroup SparseCore_Module - * class SparseMapBase - * \brief Common base class for writable Map and Ref instance of sparse matrix and vector. - */ -template -class SparseMapBase - : public SparseMapBase -{ - typedef MapBase ReadOnlyMapBase; - - public: - typedef SparseMapBase Base; - typedef typename Base::Scalar Scalar; - typedef typename Base::StorageIndex StorageIndex; - enum { IsRowMajor = Base::IsRowMajor }; - - using Base::operator=; - - public: - - //---------------------------------------- - // direct access interface - using Base::valuePtr; - using Base::innerIndexPtr; - using Base::outerIndexPtr; - using Base::innerNonZeroPtr; - /** \copydoc SparseMatrix::valuePtr */ - inline Scalar* valuePtr() { return Base::m_values; } - /** \copydoc SparseMatrix::innerIndexPtr */ - inline StorageIndex* innerIndexPtr() { return Base::m_innerIndices; } - /** \copydoc SparseMatrix::outerIndexPtr */ - inline StorageIndex* outerIndexPtr() { return Base::m_outerIndex; } - /** \copydoc SparseMatrix::innerNonZeroPtr */ - inline StorageIndex* innerNonZeroPtr() { return Base::m_innerNonZeros; } - //---------------------------------------- - - /** \copydoc SparseMatrix::coeffRef */ - inline Scalar& coeffRef(Index row, Index col) - { - const Index outer = IsRowMajor ? row : col; - const Index inner = IsRowMajor ? col : row; - - Index start = Base::m_outerIndex[outer]; - Index end = Base::isCompressed() ? Base::m_outerIndex[outer+1] : start + Base::m_innerNonZeros[outer]; - eigen_assert(end>=start && "you probably called coeffRef on a non finalized matrix"); - eigen_assert(end>start && "coeffRef cannot be called on a zero coefficient"); - StorageIndex* r = std::lower_bound(&Base::m_innerIndices[start],&Base::m_innerIndices[end],inner); - const Index id = r - &Base::m_innerIndices[0]; - eigen_assert((*r==inner) && (id(Base::m_values)[id]; - } - - inline SparseMapBase(Index rows, Index cols, Index nnz, StorageIndex* outerIndexPtr, StorageIndex* innerIndexPtr, - Scalar* valuePtr, StorageIndex* innerNonZerosPtr = 0) - : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZerosPtr) - {} - - // for vectors - inline SparseMapBase(Index size, Index nnz, StorageIndex* innerIndexPtr, Scalar* valuePtr) - : Base(size, nnz, innerIndexPtr, valuePtr) - {} - - /** Empty destructor */ - inline ~SparseMapBase() {} - - protected: - inline SparseMapBase() {} -}; - -/** \ingroup SparseCore_Module - * - * \brief Specialization of class Map for SparseMatrix-like storage. - * - * \tparam SparseMatrixType the equivalent sparse matrix type of the referenced data, it must be a template instance of class SparseMatrix. - * - * \sa class Map, class SparseMatrix, class Ref - */ -#ifndef EIGEN_PARSED_BY_DOXYGEN -template -class Map, Options, StrideType> - : public SparseMapBase, Options, StrideType> > -#else -template -class Map - : public SparseMapBase -#endif -{ - public: - typedef SparseMapBase Base; - EIGEN_SPARSE_PUBLIC_INTERFACE(Map) - enum { IsRowMajor = Base::IsRowMajor }; - - public: - - /** Constructs a read-write Map to a sparse matrix of size \a rows x \a cols, containing \a nnz non-zero coefficients, - * stored as a sparse format as defined by the pointers \a outerIndexPtr, \a innerIndexPtr, and \a valuePtr. - * If the optional parameter \a innerNonZerosPtr is the null pointer, then a standard compressed format is assumed. - * - * This constructor is available only if \c SparseMatrixType is non-const. - * - * More details on the expected storage schemes are given in the \ref TutorialSparse "manual pages". - */ - inline Map(Index rows, Index cols, Index nnz, StorageIndex* outerIndexPtr, - StorageIndex* innerIndexPtr, Scalar* valuePtr, StorageIndex* innerNonZerosPtr = 0) - : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZerosPtr) - {} -#ifndef EIGEN_PARSED_BY_DOXYGEN - /** Empty destructor */ - inline ~Map() {} -}; - -template -class Map, Options, StrideType> - : public SparseMapBase, Options, StrideType> > -{ - public: - typedef SparseMapBase Base; - EIGEN_SPARSE_PUBLIC_INTERFACE(Map) - enum { IsRowMajor = Base::IsRowMajor }; - - public: -#endif - /** This is the const version of the above constructor. - * - * This constructor is available only if \c SparseMatrixType is const, e.g.: - * \code Map > \endcode - */ - inline Map(Index rows, Index cols, Index nnz, const StorageIndex* outerIndexPtr, - const StorageIndex* innerIndexPtr, const Scalar* valuePtr, const StorageIndex* innerNonZerosPtr = 0) - : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZerosPtr) - {} - - /** Empty destructor */ - inline ~Map() {} -}; - -namespace internal { - -template -struct evaluator, Options, StrideType> > - : evaluator, Options, StrideType> > > -{ - typedef evaluator, Options, StrideType> > > Base; - typedef Map, Options, StrideType> XprType; - evaluator() : Base() {} - explicit evaluator(const XprType &mat) : Base(mat) {} -}; - -template -struct evaluator, Options, StrideType> > - : evaluator, Options, StrideType> > > -{ - typedef evaluator, Options, StrideType> > > Base; - typedef Map, Options, StrideType> XprType; - evaluator() : Base() {} - explicit evaluator(const XprType &mat) : Base(mat) {} -}; - -} - -} // end namespace Eigen - -#endif // EIGEN_SPARSE_MAP_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseMatrix.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseMatrix.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseMatrix.h +++ /dev/null @@ -1,1403 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSEMATRIX_H -#define EIGEN_SPARSEMATRIX_H - -namespace Eigen { - -/** \ingroup SparseCore_Module - * - * \class SparseMatrix - * - * \brief A versatible sparse matrix representation - * - * This class implements a more versatile variants of the common \em compressed row/column storage format. - * Each colmun's (resp. row) non zeros are stored as a pair of value with associated row (resp. colmiun) index. - * All the non zeros are stored in a single large buffer. Unlike the \em compressed format, there might be extra - * space inbetween the nonzeros of two successive colmuns (resp. rows) such that insertion of new non-zero - * can be done with limited memory reallocation and copies. - * - * A call to the function makeCompressed() turns the matrix into the standard \em compressed format - * compatible with many library. - * - * More details on this storage sceheme are given in the \ref TutorialSparse "manual pages". - * - * \tparam _Scalar the scalar type, i.e. the type of the coefficients - * \tparam _Options Union of bit flags controlling the storage scheme. Currently the only possibility - * is ColMajor or RowMajor. The default is 0 which means column-major. - * \tparam _StorageIndex the type of the indices. It has to be a \b signed type (e.g., short, int, std::ptrdiff_t). Default is \c int. - * - * \warning In %Eigen 3.2, the undocumented type \c SparseMatrix::Index was improperly defined as the storage index type (e.g., int), - * whereas it is now (starting from %Eigen 3.3) deprecated and always defined as Eigen::Index. - * Codes making use of \c SparseMatrix::Index, might thus likely have to be changed to use \c SparseMatrix::StorageIndex instead. - * - * This class can be extended with the help of the plugin mechanism described on the page - * \ref TopicCustomizing_Plugins by defining the preprocessor symbol \c EIGEN_SPARSEMATRIX_PLUGIN. - */ - -namespace internal { -template -struct traits > -{ - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; - typedef Sparse StorageKind; - typedef MatrixXpr XprKind; - enum { - RowsAtCompileTime = Dynamic, - ColsAtCompileTime = Dynamic, - MaxRowsAtCompileTime = Dynamic, - MaxColsAtCompileTime = Dynamic, - Flags = _Options | NestByRefBit | LvalueBit | CompressedAccessBit, - SupportedAccessPatterns = InnerRandomAccessPattern - }; -}; - -template -struct traits, DiagIndex> > -{ - typedef SparseMatrix<_Scalar, _Options, _StorageIndex> MatrixType; - typedef typename ref_selector::type MatrixTypeNested; - typedef typename remove_reference::type _MatrixTypeNested; - - typedef _Scalar Scalar; - typedef Dense StorageKind; - typedef _StorageIndex StorageIndex; - typedef MatrixXpr XprKind; - - enum { - RowsAtCompileTime = Dynamic, - ColsAtCompileTime = 1, - MaxRowsAtCompileTime = Dynamic, - MaxColsAtCompileTime = 1, - Flags = LvalueBit - }; -}; - -template -struct traits, DiagIndex> > - : public traits, DiagIndex> > -{ - enum { - Flags = 0 - }; -}; - -} // end namespace internal - -template -class SparseMatrix - : public SparseCompressedBase > -{ - typedef SparseCompressedBase Base; - using Base::convert_index; - friend class SparseVector<_Scalar,0,_StorageIndex>; - public: - using Base::isCompressed; - using Base::nonZeros; - EIGEN_SPARSE_PUBLIC_INTERFACE(SparseMatrix) - using Base::operator+=; - using Base::operator-=; - - typedef MappedSparseMatrix Map; - typedef Diagonal DiagonalReturnType; - typedef Diagonal ConstDiagonalReturnType; - typedef typename Base::InnerIterator InnerIterator; - typedef typename Base::ReverseInnerIterator ReverseInnerIterator; - - - using Base::IsRowMajor; - typedef internal::CompressedStorage Storage; - enum { - Options = _Options - }; - - typedef typename Base::IndexVector IndexVector; - typedef typename Base::ScalarVector ScalarVector; - protected: - typedef SparseMatrix TransposedSparseMatrix; - - Index m_outerSize; - Index m_innerSize; - StorageIndex* m_outerIndex; - StorageIndex* m_innerNonZeros; // optional, if null then the data is compressed - Storage m_data; - - public: - - /** \returns the number of rows of the matrix */ - inline Index rows() const { return IsRowMajor ? m_outerSize : m_innerSize; } - /** \returns the number of columns of the matrix */ - inline Index cols() const { return IsRowMajor ? m_innerSize : m_outerSize; } - - /** \returns the number of rows (resp. columns) of the matrix if the storage order column major (resp. row major) */ - inline Index innerSize() const { return m_innerSize; } - /** \returns the number of columns (resp. rows) of the matrix if the storage order column major (resp. row major) */ - inline Index outerSize() const { return m_outerSize; } - - /** \returns a const pointer to the array of values. - * This function is aimed at interoperability with other libraries. - * \sa innerIndexPtr(), outerIndexPtr() */ - inline const Scalar* valuePtr() const { return m_data.valuePtr(); } - /** \returns a non-const pointer to the array of values. - * This function is aimed at interoperability with other libraries. - * \sa innerIndexPtr(), outerIndexPtr() */ - inline Scalar* valuePtr() { return m_data.valuePtr(); } - - /** \returns a const pointer to the array of inner indices. - * This function is aimed at interoperability with other libraries. - * \sa valuePtr(), outerIndexPtr() */ - inline const StorageIndex* innerIndexPtr() const { return m_data.indexPtr(); } - /** \returns a non-const pointer to the array of inner indices. - * This function is aimed at interoperability with other libraries. - * \sa valuePtr(), outerIndexPtr() */ - inline StorageIndex* innerIndexPtr() { return m_data.indexPtr(); } - - /** \returns a const pointer to the array of the starting positions of the inner vectors. - * This function is aimed at interoperability with other libraries. - * \sa valuePtr(), innerIndexPtr() */ - inline const StorageIndex* outerIndexPtr() const { return m_outerIndex; } - /** \returns a non-const pointer to the array of the starting positions of the inner vectors. - * This function is aimed at interoperability with other libraries. - * \sa valuePtr(), innerIndexPtr() */ - inline StorageIndex* outerIndexPtr() { return m_outerIndex; } - - /** \returns a const pointer to the array of the number of non zeros of the inner vectors. - * This function is aimed at interoperability with other libraries. - * \warning it returns the null pointer 0 in compressed mode */ - inline const StorageIndex* innerNonZeroPtr() const { return m_innerNonZeros; } - /** \returns a non-const pointer to the array of the number of non zeros of the inner vectors. - * This function is aimed at interoperability with other libraries. - * \warning it returns the null pointer 0 in compressed mode */ - inline StorageIndex* innerNonZeroPtr() { return m_innerNonZeros; } - - /** \internal */ - inline Storage& data() { return m_data; } - /** \internal */ - inline const Storage& data() const { return m_data; } - - /** \returns the value of the matrix at position \a i, \a j - * This function returns Scalar(0) if the element is an explicit \em zero */ - inline Scalar coeff(Index row, Index col) const - { - eigen_assert(row>=0 && row=0 && col=0 && row=0 && col=start && "you probably called coeffRef on a non finalized matrix"); - if(end<=start) - return insert(row,col); - const Index p = m_data.searchLowerIndex(start,end-1,StorageIndex(inner)); - if((pinnerSize() non zeros if reserve(Index) has not been called earlier. - * In this case, the insertion procedure is optimized for a \e sequential insertion mode where elements are assumed to be - * inserted by increasing outer-indices. - * - * If that's not the case, then it is strongly recommended to either use a triplet-list to assemble the matrix, or to first - * call reserve(const SizesType &) to reserve the appropriate number of non-zero elements per inner vector. - * - * Assuming memory has been appropriately reserved, this function performs a sorted insertion in O(1) - * if the elements of each inner vector are inserted in increasing inner index order, and in O(nnz_j) for a random insertion. - * - */ - Scalar& insert(Index row, Index col); - - public: - - /** Removes all non zeros but keep allocated memory - * - * This function does not free the currently allocated memory. To release as much as memory as possible, - * call \code mat.data().squeeze(); \endcode after resizing it. - * - * \sa resize(Index,Index), data() - */ - inline void setZero() - { - m_data.clear(); - memset(m_outerIndex, 0, (m_outerSize+1)*sizeof(StorageIndex)); - if(m_innerNonZeros) - memset(m_innerNonZeros, 0, (m_outerSize)*sizeof(StorageIndex)); - } - - /** Preallocates \a reserveSize non zeros. - * - * Precondition: the matrix must be in compressed mode. */ - inline void reserve(Index reserveSize) - { - eigen_assert(isCompressed() && "This function does not make sense in non compressed mode."); - m_data.reserve(reserveSize); - } - - #ifdef EIGEN_PARSED_BY_DOXYGEN - /** Preallocates \a reserveSize[\c j] non zeros for each column (resp. row) \c j. - * - * This function turns the matrix in non-compressed mode. - * - * The type \c SizesType must expose the following interface: - \code - typedef value_type; - const value_type& operator[](i) const; - \endcode - * for \c i in the [0,this->outerSize()[ range. - * Typical choices include std::vector, Eigen::VectorXi, Eigen::VectorXi::Constant, etc. - */ - template - inline void reserve(const SizesType& reserveSizes); - #else - template - inline void reserve(const SizesType& reserveSizes, const typename SizesType::value_type& enableif = - #if (!EIGEN_COMP_MSVC) || (EIGEN_COMP_MSVC>=1500) // MSVC 2005 fails to compile with this typename - typename - #endif - SizesType::value_type()) - { - EIGEN_UNUSED_VARIABLE(enableif); - reserveInnerVectors(reserveSizes); - } - #endif // EIGEN_PARSED_BY_DOXYGEN - protected: - template - inline void reserveInnerVectors(const SizesType& reserveSizes) - { - if(isCompressed()) - { - Index totalReserveSize = 0; - // turn the matrix into non-compressed mode - m_innerNonZeros = static_cast(std::malloc(m_outerSize * sizeof(StorageIndex))); - if (!m_innerNonZeros) internal::throw_std_bad_alloc(); - - // temporarily use m_innerSizes to hold the new starting points. - StorageIndex* newOuterIndex = m_innerNonZeros; - - StorageIndex count = 0; - for(Index j=0; j=0; --j) - { - StorageIndex innerNNZ = previousOuterIndex - m_outerIndex[j]; - for(Index i=innerNNZ-1; i>=0; --i) - { - m_data.index(newOuterIndex[j]+i) = m_data.index(m_outerIndex[j]+i); - m_data.value(newOuterIndex[j]+i) = m_data.value(m_outerIndex[j]+i); - } - previousOuterIndex = m_outerIndex[j]; - m_outerIndex[j] = newOuterIndex[j]; - m_innerNonZeros[j] = innerNNZ; - } - m_outerIndex[m_outerSize] = m_outerIndex[m_outerSize-1] + m_innerNonZeros[m_outerSize-1] + reserveSizes[m_outerSize-1]; - - m_data.resize(m_outerIndex[m_outerSize]); - } - else - { - StorageIndex* newOuterIndex = static_cast(std::malloc((m_outerSize+1)*sizeof(StorageIndex))); - if (!newOuterIndex) internal::throw_std_bad_alloc(); - - StorageIndex count = 0; - for(Index j=0; j(reserveSizes[j], alreadyReserved); - count += toReserve + m_innerNonZeros[j]; - } - newOuterIndex[m_outerSize] = count; - - m_data.resize(count); - for(Index j=m_outerSize-1; j>=0; --j) - { - Index offset = newOuterIndex[j] - m_outerIndex[j]; - if(offset>0) - { - StorageIndex innerNNZ = m_innerNonZeros[j]; - for(Index i=innerNNZ-1; i>=0; --i) - { - m_data.index(newOuterIndex[j]+i) = m_data.index(m_outerIndex[j]+i); - m_data.value(newOuterIndex[j]+i) = m_data.value(m_outerIndex[j]+i); - } - } - } - - std::swap(m_outerIndex, newOuterIndex); - std::free(newOuterIndex); - } - - } - public: - - //--- low level purely coherent filling --- - - /** \internal - * \returns a reference to the non zero coefficient at position \a row, \a col assuming that: - * - the nonzero does not already exist - * - the new coefficient is the last one according to the storage order - * - * Before filling a given inner vector you must call the statVec(Index) function. - * - * After an insertion session, you should call the finalize() function. - * - * \sa insert, insertBackByOuterInner, startVec */ - inline Scalar& insertBack(Index row, Index col) - { - return insertBackByOuterInner(IsRowMajor?row:col, IsRowMajor?col:row); - } - - /** \internal - * \sa insertBack, startVec */ - inline Scalar& insertBackByOuterInner(Index outer, Index inner) - { - eigen_assert(Index(m_outerIndex[outer+1]) == m_data.size() && "Invalid ordered insertion (invalid outer index)"); - eigen_assert( (m_outerIndex[outer+1]-m_outerIndex[outer]==0 || m_data.index(m_data.size()-1)(m_data.size()); - Index i = m_outerSize; - // find the last filled column - while (i>=0 && m_outerIndex[i]==0) - --i; - ++i; - while (i<=m_outerSize) - { - m_outerIndex[i] = size; - ++i; - } - } - } - - //--- - - template - void setFromTriplets(const InputIterators& begin, const InputIterators& end); - - template - void setFromTriplets(const InputIterators& begin, const InputIterators& end, DupFunctor dup_func); - - void sumupDuplicates() { collapseDuplicates(internal::scalar_sum_op()); } - - template - void collapseDuplicates(DupFunctor dup_func = DupFunctor()); - - //--- - - /** \internal - * same as insert(Index,Index) except that the indices are given relative to the storage order */ - Scalar& insertByOuterInner(Index j, Index i) - { - return insert(IsRowMajor ? j : i, IsRowMajor ? i : j); - } - - /** Turns the matrix into the \em compressed format. - */ - void makeCompressed() - { - if(isCompressed()) - return; - - eigen_internal_assert(m_outerIndex!=0 && m_outerSize>0); - - Index oldStart = m_outerIndex[1]; - m_outerIndex[1] = m_innerNonZeros[0]; - for(Index j=1; j0) - { - for(Index k=0; k(std::malloc(m_outerSize * sizeof(StorageIndex))); - for (Index i = 0; i < m_outerSize; i++) - { - m_innerNonZeros[i] = m_outerIndex[i+1] - m_outerIndex[i]; - } - } - - /** Suppresses all nonzeros which are \b much \b smaller \b than \a reference under the tolerence \a epsilon */ - void prune(const Scalar& reference, const RealScalar& epsilon = NumTraits::dummy_precision()) - { - prune(default_prunning_func(reference,epsilon)); - } - - /** Turns the matrix into compressed format, and suppresses all nonzeros which do not satisfy the predicate \a keep. - * The functor type \a KeepFunc must implement the following function: - * \code - * bool operator() (const Index& row, const Index& col, const Scalar& value) const; - * \endcode - * \sa prune(Scalar,RealScalar) - */ - template - void prune(const KeepFunc& keep = KeepFunc()) - { - // TODO optimize the uncompressed mode to avoid moving and allocating the data twice - makeCompressed(); - - StorageIndex k = 0; - for(Index j=0; jrows() == rows && this->cols() == cols) return; - - // If one dimension is null, then there is nothing to be preserved - if(rows==0 || cols==0) return resize(rows,cols); - - Index innerChange = IsRowMajor ? cols - this->cols() : rows - this->rows(); - Index outerChange = IsRowMajor ? rows - this->rows() : cols - this->cols(); - StorageIndex newInnerSize = convert_index(IsRowMajor ? cols : rows); - - // Deals with inner non zeros - if (m_innerNonZeros) - { - // Resize m_innerNonZeros - StorageIndex *newInnerNonZeros = static_cast(std::realloc(m_innerNonZeros, (m_outerSize + outerChange) * sizeof(StorageIndex))); - if (!newInnerNonZeros) internal::throw_std_bad_alloc(); - m_innerNonZeros = newInnerNonZeros; - - for(Index i=m_outerSize; i(std::malloc((m_outerSize+outerChange+1) * sizeof(StorageIndex))); - if (!m_innerNonZeros) internal::throw_std_bad_alloc(); - for(Index i = 0; i < m_outerSize; i++) - m_innerNonZeros[i] = m_outerIndex[i+1] - m_outerIndex[i]; - } - - // Change the m_innerNonZeros in case of a decrease of inner size - if (m_innerNonZeros && innerChange < 0) - { - for(Index i = 0; i < m_outerSize + (std::min)(outerChange, Index(0)); i++) - { - StorageIndex &n = m_innerNonZeros[i]; - StorageIndex start = m_outerIndex[i]; - while (n > 0 && m_data.index(start+n-1) >= newInnerSize) --n; - } - } - - m_innerSize = newInnerSize; - - // Re-allocate outer index structure if necessary - if (outerChange == 0) - return; - - StorageIndex *newOuterIndex = static_cast(std::realloc(m_outerIndex, (m_outerSize + outerChange + 1) * sizeof(StorageIndex))); - if (!newOuterIndex) internal::throw_std_bad_alloc(); - m_outerIndex = newOuterIndex; - if (outerChange > 0) - { - StorageIndex last = m_outerSize == 0 ? 0 : m_outerIndex[m_outerSize]; - for(Index i=m_outerSize; i(std::malloc((outerSize + 1) * sizeof(StorageIndex))); - if (!m_outerIndex) internal::throw_std_bad_alloc(); - - m_outerSize = outerSize; - } - if(m_innerNonZeros) - { - std::free(m_innerNonZeros); - m_innerNonZeros = 0; - } - memset(m_outerIndex, 0, (m_outerSize+1)*sizeof(StorageIndex)); - } - - /** \internal - * Resize the nonzero vector to \a size */ - void resizeNonZeros(Index size) - { - m_data.resize(size); - } - - /** \returns a const expression of the diagonal coefficients. */ - const ConstDiagonalReturnType diagonal() const { return ConstDiagonalReturnType(*this); } - - /** \returns a read-write expression of the diagonal coefficients. - * \warning If the diagonal entries are written, then all diagonal - * entries \b must already exist, otherwise an assertion will be raised. - */ - DiagonalReturnType diagonal() { return DiagonalReturnType(*this); } - - /** Default constructor yielding an empty \c 0 \c x \c 0 matrix */ - inline SparseMatrix() - : m_outerSize(-1), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) - { - check_template_parameters(); - resize(0, 0); - } - - /** Constructs a \a rows \c x \a cols empty matrix */ - inline SparseMatrix(Index rows, Index cols) - : m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) - { - check_template_parameters(); - resize(rows, cols); - } - - /** Constructs a sparse matrix from the sparse expression \a other */ - template - inline SparseMatrix(const SparseMatrixBase& other) - : m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) - { - EIGEN_STATIC_ASSERT((internal::is_same::value), - YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) - check_template_parameters(); - const bool needToTranspose = (Flags & RowMajorBit) != (internal::evaluator::Flags & RowMajorBit); - if (needToTranspose) - *this = other.derived(); - else - { - #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN - EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN - #endif - internal::call_assignment_no_alias(*this, other.derived()); - } - } - - /** Constructs a sparse matrix from the sparse selfadjoint view \a other */ - template - inline SparseMatrix(const SparseSelfAdjointView& other) - : m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) - { - check_template_parameters(); - Base::operator=(other); - } - - /** Copy constructor (it performs a deep copy) */ - inline SparseMatrix(const SparseMatrix& other) - : Base(), m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) - { - check_template_parameters(); - *this = other.derived(); - } - - /** \brief Copy constructor with in-place evaluation */ - template - SparseMatrix(const ReturnByValue& other) - : Base(), m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) - { - check_template_parameters(); - initAssignment(other); - other.evalTo(*this); - } - - /** \brief Copy constructor with in-place evaluation */ - template - explicit SparseMatrix(const DiagonalBase& other) - : Base(), m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) - { - check_template_parameters(); - *this = other.derived(); - } - - /** Swaps the content of two sparse matrices of the same type. - * This is a fast operation that simply swaps the underlying pointers and parameters. */ - inline void swap(SparseMatrix& other) - { - //EIGEN_DBG_SPARSE(std::cout << "SparseMatrix:: swap\n"); - std::swap(m_outerIndex, other.m_outerIndex); - std::swap(m_innerSize, other.m_innerSize); - std::swap(m_outerSize, other.m_outerSize); - std::swap(m_innerNonZeros, other.m_innerNonZeros); - m_data.swap(other.m_data); - } - - /** Sets *this to the identity matrix. - * This function also turns the matrix into compressed mode, and drop any reserved memory. */ - inline void setIdentity() - { - eigen_assert(rows() == cols() && "ONLY FOR SQUARED MATRICES"); - this->m_data.resize(rows()); - Eigen::Map(this->m_data.indexPtr(), rows()).setLinSpaced(0, StorageIndex(rows()-1)); - Eigen::Map(this->m_data.valuePtr(), rows()).setOnes(); - Eigen::Map(this->m_outerIndex, rows()+1).setLinSpaced(0, StorageIndex(rows())); - std::free(m_innerNonZeros); - m_innerNonZeros = 0; - } - inline SparseMatrix& operator=(const SparseMatrix& other) - { - if (other.isRValue()) - { - swap(other.const_cast_derived()); - } - else if(this!=&other) - { - #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN - EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN - #endif - initAssignment(other); - if(other.isCompressed()) - { - internal::smart_copy(other.m_outerIndex, other.m_outerIndex + m_outerSize + 1, m_outerIndex); - m_data = other.m_data; - } - else - { - Base::operator=(other); - } - } - return *this; - } - -#ifndef EIGEN_PARSED_BY_DOXYGEN - template - inline SparseMatrix& operator=(const EigenBase& other) - { return Base::operator=(other.derived()); } -#endif // EIGEN_PARSED_BY_DOXYGEN - - template - EIGEN_DONT_INLINE SparseMatrix& operator=(const SparseMatrixBase& other); - - friend std::ostream & operator << (std::ostream & s, const SparseMatrix& m) - { - EIGEN_DBG_SPARSE( - s << "Nonzero entries:\n"; - if(m.isCompressed()) - { - for (Index i=0; i&>(m); - return s; - } - - /** Destructor */ - inline ~SparseMatrix() - { - std::free(m_outerIndex); - std::free(m_innerNonZeros); - } - - /** Overloaded for performance */ - Scalar sum() const; - -# ifdef EIGEN_SPARSEMATRIX_PLUGIN -# include EIGEN_SPARSEMATRIX_PLUGIN -# endif - -protected: - - template - void initAssignment(const Other& other) - { - resize(other.rows(), other.cols()); - if(m_innerNonZeros) - { - std::free(m_innerNonZeros); - m_innerNonZeros = 0; - } - } - - /** \internal - * \sa insert(Index,Index) */ - EIGEN_DONT_INLINE Scalar& insertCompressed(Index row, Index col); - - /** \internal - * A vector object that is equal to 0 everywhere but v at the position i */ - class SingletonVector - { - StorageIndex m_index; - StorageIndex m_value; - public: - typedef StorageIndex value_type; - SingletonVector(Index i, Index v) - : m_index(convert_index(i)), m_value(convert_index(v)) - {} - - StorageIndex operator[](Index i) const { return i==m_index ? m_value : 0; } - }; - - /** \internal - * \sa insert(Index,Index) */ - EIGEN_DONT_INLINE Scalar& insertUncompressed(Index row, Index col); - -public: - /** \internal - * \sa insert(Index,Index) */ - EIGEN_STRONG_INLINE Scalar& insertBackUncompressed(Index row, Index col) - { - const Index outer = IsRowMajor ? row : col; - const Index inner = IsRowMajor ? col : row; - - eigen_assert(!isCompressed()); - eigen_assert(m_innerNonZeros[outer]<=(m_outerIndex[outer+1] - m_outerIndex[outer])); - - Index p = m_outerIndex[outer] + m_innerNonZeros[outer]++; - m_data.index(p) = convert_index(inner); - return (m_data.value(p) = 0); - } - -private: - static void check_template_parameters() - { - EIGEN_STATIC_ASSERT(NumTraits::IsSigned,THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE); - EIGEN_STATIC_ASSERT((Options&(ColMajor|RowMajor))==Options,INVALID_MATRIX_TEMPLATE_PARAMETERS); - } - - struct default_prunning_func { - default_prunning_func(const Scalar& ref, const RealScalar& eps) : reference(ref), epsilon(eps) {} - inline bool operator() (const Index&, const Index&, const Scalar& value) const - { - return !internal::isMuchSmallerThan(value, reference, epsilon); - } - Scalar reference; - RealScalar epsilon; - }; -}; - -namespace internal { - -template -void set_from_triplets(const InputIterator& begin, const InputIterator& end, SparseMatrixType& mat, DupFunctor dup_func) -{ - enum { IsRowMajor = SparseMatrixType::IsRowMajor }; - typedef typename SparseMatrixType::Scalar Scalar; - typedef typename SparseMatrixType::StorageIndex StorageIndex; - SparseMatrix trMat(mat.rows(),mat.cols()); - - if(begin!=end) - { - // pass 1: count the nnz per inner-vector - typename SparseMatrixType::IndexVector wi(trMat.outerSize()); - wi.setZero(); - for(InputIterator it(begin); it!=end; ++it) - { - eigen_assert(it->row()>=0 && it->row()col()>=0 && it->col()col() : it->row())++; - } - - // pass 2: insert all the elements into trMat - trMat.reserve(wi); - for(InputIterator it(begin); it!=end; ++it) - trMat.insertBackUncompressed(it->row(),it->col()) = it->value(); - - // pass 3: - trMat.collapseDuplicates(dup_func); - } - - // pass 4: transposed copy -> implicit sorting - mat = trMat; -} - -} - - -/** Fill the matrix \c *this with the list of \em triplets defined by the iterator range \a begin - \a end. - * - * A \em triplet is a tuple (i,j,value) defining a non-zero element. - * The input list of triplets does not have to be sorted, and can contains duplicated elements. - * In any case, the result is a \b sorted and \b compressed sparse matrix where the duplicates have been summed up. - * This is a \em O(n) operation, with \em n the number of triplet elements. - * The initial contents of \c *this is destroyed. - * The matrix \c *this must be properly resized beforehand using the SparseMatrix(Index,Index) constructor, - * or the resize(Index,Index) method. The sizes are not extracted from the triplet list. - * - * The \a InputIterators value_type must provide the following interface: - * \code - * Scalar value() const; // the value - * Scalar row() const; // the row index i - * Scalar col() const; // the column index j - * \endcode - * See for instance the Eigen::Triplet template class. - * - * Here is a typical usage example: - * \code - typedef Triplet T; - std::vector tripletList; - triplets.reserve(estimation_of_entries); - for(...) - { - // ... - tripletList.push_back(T(i,j,v_ij)); - } - SparseMatrixType m(rows,cols); - m.setFromTriplets(tripletList.begin(), tripletList.end()); - // m is ready to go! - * \endcode - * - * \warning The list of triplets is read multiple times (at least twice). Therefore, it is not recommended to define - * an abstract iterator over a complex data-structure that would be expensive to evaluate. The triplets should rather - * be explicitely stored into a std::vector for instance. - */ -template -template -void SparseMatrix::setFromTriplets(const InputIterators& begin, const InputIterators& end) -{ - internal::set_from_triplets >(begin, end, *this, internal::scalar_sum_op()); -} - -/** The same as setFromTriplets but when duplicates are met the functor \a dup_func is applied: - * \code - * value = dup_func(OldValue, NewValue) - * \endcode - * Here is a C++11 example keeping the latest entry only: - * \code - * mat.setFromTriplets(triplets.begin(), triplets.end(), [] (const Scalar&,const Scalar &b) { return b; }); - * \endcode - */ -template -template -void SparseMatrix::setFromTriplets(const InputIterators& begin, const InputIterators& end, DupFunctor dup_func) -{ - internal::set_from_triplets, DupFunctor>(begin, end, *this, dup_func); -} - -/** \internal */ -template -template -void SparseMatrix::collapseDuplicates(DupFunctor dup_func) -{ - eigen_assert(!isCompressed()); - // TODO, in practice we should be able to use m_innerNonZeros for that task - IndexVector wi(innerSize()); - wi.fill(-1); - StorageIndex count = 0; - // for each inner-vector, wi[inner_index] will hold the position of first element into the index/value buffers - for(Index j=0; j=start) - { - // we already meet this entry => accumulate it - m_data.value(wi(i)) = dup_func(m_data.value(wi(i)), m_data.value(k)); - } - else - { - m_data.value(count) = m_data.value(k); - m_data.index(count) = m_data.index(k); - wi(i) = count; - ++count; - } - } - m_outerIndex[j] = start; - } - m_outerIndex[m_outerSize] = count; - - // turn the matrix into compressed form - std::free(m_innerNonZeros); - m_innerNonZeros = 0; - m_data.resize(m_outerIndex[m_outerSize]); -} - -template -template -EIGEN_DONT_INLINE SparseMatrix& SparseMatrix::operator=(const SparseMatrixBase& other) -{ - EIGEN_STATIC_ASSERT((internal::is_same::value), - YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) - - #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN - EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN - #endif - - const bool needToTranspose = (Flags & RowMajorBit) != (internal::evaluator::Flags & RowMajorBit); - if (needToTranspose) - { - #ifdef EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN - EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN - #endif - // two passes algorithm: - // 1 - compute the number of coeffs per dest inner vector - // 2 - do the actual copy/eval - // Since each coeff of the rhs has to be evaluated twice, let's evaluate it if needed - typedef typename internal::nested_eval::type >::type OtherCopy; - typedef typename internal::remove_all::type _OtherCopy; - typedef internal::evaluator<_OtherCopy> OtherCopyEval; - OtherCopy otherCopy(other.derived()); - OtherCopyEval otherCopyEval(otherCopy); - - SparseMatrix dest(other.rows(),other.cols()); - Eigen::Map (dest.m_outerIndex,dest.outerSize()).setZero(); - - // pass 1 - // FIXME the above copy could be merged with that pass - for (Index j=0; jswap(dest); - return *this; - } - else - { - if(other.isRValue()) - { - initAssignment(other.derived()); - } - // there is no special optimization - return Base::operator=(other.derived()); - } -} - -template -typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insert(Index row, Index col) -{ - eigen_assert(row>=0 && row=0 && col(std::malloc(m_outerSize * sizeof(StorageIndex))); - if(!m_innerNonZeros) internal::throw_std_bad_alloc(); - - memset(m_innerNonZeros, 0, (m_outerSize)*sizeof(StorageIndex)); - - // pack all inner-vectors to the end of the pre-allocated space - // and allocate the entire free-space to the first inner-vector - StorageIndex end = convert_index(m_data.allocatedSize()); - for(Index j=1; j<=m_outerSize; ++j) - m_outerIndex[j] = end; - } - else - { - // turn the matrix into non-compressed mode - m_innerNonZeros = static_cast(std::malloc(m_outerSize * sizeof(StorageIndex))); - if(!m_innerNonZeros) internal::throw_std_bad_alloc(); - for(Index j=0; j=0 && m_innerNonZeros[j]==0) - m_outerIndex[j--] = p; - - // push back the new element - ++m_innerNonZeros[outer]; - m_data.append(Scalar(0), inner); - - // check for reallocation - if(data_end != m_data.allocatedSize()) - { - // m_data has been reallocated - // -> move remaining inner-vectors back to the end of the free-space - // so that the entire free-space is allocated to the current inner-vector. - eigen_internal_assert(data_end < m_data.allocatedSize()); - StorageIndex new_end = convert_index(m_data.allocatedSize()); - for(Index k=outer+1; k<=m_outerSize; ++k) - if(m_outerIndex[k]==data_end) - m_outerIndex[k] = new_end; - } - return m_data.value(p); - } - - // Second case: the next inner-vector is packed to the end - // and the current inner-vector end match the used-space. - if(m_outerIndex[outer+1]==data_end && m_outerIndex[outer]+m_innerNonZeros[outer]==m_data.size()) - { - eigen_internal_assert(outer+1==m_outerSize || m_innerNonZeros[outer+1]==0); - - // add space for the new element - ++m_innerNonZeros[outer]; - m_data.resize(m_data.size()+1); - - // check for reallocation - if(data_end != m_data.allocatedSize()) - { - // m_data has been reallocated - // -> move remaining inner-vectors back to the end of the free-space - // so that the entire free-space is allocated to the current inner-vector. - eigen_internal_assert(data_end < m_data.allocatedSize()); - StorageIndex new_end = convert_index(m_data.allocatedSize()); - for(Index k=outer+1; k<=m_outerSize; ++k) - if(m_outerIndex[k]==data_end) - m_outerIndex[k] = new_end; - } - - // and insert it at the right position (sorted insertion) - Index startId = m_outerIndex[outer]; - Index p = m_outerIndex[outer]+m_innerNonZeros[outer]-1; - while ( (p > startId) && (m_data.index(p-1) > inner) ) - { - m_data.index(p) = m_data.index(p-1); - m_data.value(p) = m_data.value(p-1); - --p; - } - - m_data.index(p) = convert_index(inner); - return (m_data.value(p) = 0); - } - - if(m_data.size() != m_data.allocatedSize()) - { - // make sure the matrix is compatible to random un-compressed insertion: - m_data.resize(m_data.allocatedSize()); - this->reserveInnerVectors(Array::Constant(m_outerSize, 2)); - } - - return insertUncompressed(row,col); -} - -template -EIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insertUncompressed(Index row, Index col) -{ - eigen_assert(!isCompressed()); - - const Index outer = IsRowMajor ? row : col; - const StorageIndex inner = convert_index(IsRowMajor ? col : row); - - Index room = m_outerIndex[outer+1] - m_outerIndex[outer]; - StorageIndex innerNNZ = m_innerNonZeros[outer]; - if(innerNNZ>=room) - { - // this inner vector is full, we need to reallocate the whole buffer :( - reserve(SingletonVector(outer,std::max(2,innerNNZ))); - } - - Index startId = m_outerIndex[outer]; - Index p = startId + m_innerNonZeros[outer]; - while ( (p > startId) && (m_data.index(p-1) > inner) ) - { - m_data.index(p) = m_data.index(p-1); - m_data.value(p) = m_data.value(p-1); - --p; - } - eigen_assert((p<=startId || m_data.index(p-1)!=inner) && "you cannot insert an element that already exists, you must call coeffRef to this end"); - - m_innerNonZeros[outer]++; - - m_data.index(p) = inner; - return (m_data.value(p) = 0); -} - -template -EIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insertCompressed(Index row, Index col) -{ - eigen_assert(isCompressed()); - - const Index outer = IsRowMajor ? row : col; - const Index inner = IsRowMajor ? col : row; - - Index previousOuter = outer; - if (m_outerIndex[outer+1]==0) - { - // we start a new inner vector - while (previousOuter>=0 && m_outerIndex[previousOuter]==0) - { - m_outerIndex[previousOuter] = convert_index(m_data.size()); - --previousOuter; - } - m_outerIndex[outer+1] = m_outerIndex[outer]; - } - - // here we have to handle the tricky case where the outerIndex array - // starts with: [ 0 0 0 0 0 1 ...] and we are inserted in, e.g., - // the 2nd inner vector... - bool isLastVec = (!(previousOuter==-1 && m_data.size()!=0)) - && (std::size_t(m_outerIndex[outer+1]) == m_data.size()); - - std::size_t startId = m_outerIndex[outer]; - // FIXME let's make sure sizeof(long int) == sizeof(std::size_t) - std::size_t p = m_outerIndex[outer+1]; - ++m_outerIndex[outer+1]; - - double reallocRatio = 1; - if (m_data.allocatedSize()<=m_data.size()) - { - // if there is no preallocated memory, let's reserve a minimum of 32 elements - if (m_data.size()==0) - { - m_data.reserve(32); - } - else - { - // we need to reallocate the data, to reduce multiple reallocations - // we use a smart resize algorithm based on the current filling ratio - // in addition, we use double to avoid integers overflows - double nnzEstimate = double(m_outerIndex[outer])*double(m_outerSize)/double(outer+1); - reallocRatio = (nnzEstimate-double(m_data.size()))/double(m_data.size()); - // furthermore we bound the realloc ratio to: - // 1) reduce multiple minor realloc when the matrix is almost filled - // 2) avoid to allocate too much memory when the matrix is almost empty - reallocRatio = (std::min)((std::max)(reallocRatio,1.5),8.); - } - } - m_data.resize(m_data.size()+1,reallocRatio); - - if (!isLastVec) - { - if (previousOuter==-1) - { - // oops wrong guess. - // let's correct the outer offsets - for (Index k=0; k<=(outer+1); ++k) - m_outerIndex[k] = 0; - Index k=outer+1; - while(m_outerIndex[k]==0) - m_outerIndex[k++] = 1; - while (k<=m_outerSize && m_outerIndex[k]!=0) - m_outerIndex[k++]++; - p = 0; - --k; - k = m_outerIndex[k]-1; - while (k>0) - { - m_data.index(k) = m_data.index(k-1); - m_data.value(k) = m_data.value(k-1); - k--; - } - } - else - { - // we are not inserting into the last inner vec - // update outer indices: - Index j = outer+2; - while (j<=m_outerSize && m_outerIndex[j]!=0) - m_outerIndex[j++]++; - --j; - // shift data of last vecs: - Index k = m_outerIndex[j]-1; - while (k>=Index(p)) - { - m_data.index(k) = m_data.index(k-1); - m_data.value(k) = m_data.value(k-1); - k--; - } - } - } - - while ( (p > startId) && (m_data.index(p-1) > inner) ) - { - m_data.index(p) = m_data.index(p-1); - m_data.value(p) = m_data.value(p-1); - --p; - } - - m_data.index(p) = inner; - return (m_data.value(p) = 0); -} - -namespace internal { - -template -struct evaluator > - : evaluator > > -{ - typedef evaluator > > Base; - typedef SparseMatrix<_Scalar,_Options,_StorageIndex> SparseMatrixType; - evaluator() : Base() {} - explicit evaluator(const SparseMatrixType &mat) : Base(mat) {} -}; - -} - -} // end namespace Eigen - -#endif // EIGEN_SPARSEMATRIX_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseMatrixBase.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseMatrixBase.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseMatrixBase.h +++ /dev/null @@ -1,405 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSEMATRIXBASE_H -#define EIGEN_SPARSEMATRIXBASE_H - -namespace Eigen { - -/** \ingroup SparseCore_Module - * - * \class SparseMatrixBase - * - * \brief Base class of any sparse matrices or sparse expressions - * - * \tparam Derived is the derived type, e.g. a sparse matrix type, or an expression, etc. - * - * This class can be extended with the help of the plugin mechanism described on the page - * \ref TopicCustomizing_Plugins by defining the preprocessor symbol \c EIGEN_SPARSEMATRIXBASE_PLUGIN. - */ -template class SparseMatrixBase - : public EigenBase -{ - public: - - typedef typename internal::traits::Scalar Scalar; - - /** The numeric type of the expression' coefficients, e.g. float, double, int or std::complex, etc. - * - * It is an alias for the Scalar type */ - typedef Scalar value_type; - - typedef typename internal::packet_traits::type PacketScalar; - typedef typename internal::traits::StorageKind StorageKind; - - /** The integer type used to \b store indices within a SparseMatrix. - * For a \c SparseMatrix it an alias of the third template parameter \c IndexType. */ - typedef typename internal::traits::StorageIndex StorageIndex; - - typedef typename internal::add_const_on_value_type_if_arithmetic< - typename internal::packet_traits::type - >::type PacketReturnType; - - typedef SparseMatrixBase StorageBaseType; - - typedef Matrix IndexVector; - typedef Matrix ScalarVector; - - template - Derived& operator=(const EigenBase &other); - - enum { - - RowsAtCompileTime = internal::traits::RowsAtCompileTime, - /**< The number of rows at compile-time. This is just a copy of the value provided - * by the \a Derived type. If a value is not known at compile-time, - * it is set to the \a Dynamic constant. - * \sa MatrixBase::rows(), MatrixBase::cols(), ColsAtCompileTime, SizeAtCompileTime */ - - ColsAtCompileTime = internal::traits::ColsAtCompileTime, - /**< The number of columns at compile-time. This is just a copy of the value provided - * by the \a Derived type. If a value is not known at compile-time, - * it is set to the \a Dynamic constant. - * \sa MatrixBase::rows(), MatrixBase::cols(), RowsAtCompileTime, SizeAtCompileTime */ - - - SizeAtCompileTime = (internal::size_at_compile_time::RowsAtCompileTime, - internal::traits::ColsAtCompileTime>::ret), - /**< This is equal to the number of coefficients, i.e. the number of - * rows times the number of columns, or to \a Dynamic if this is not - * known at compile-time. \sa RowsAtCompileTime, ColsAtCompileTime */ - - MaxRowsAtCompileTime = RowsAtCompileTime, - MaxColsAtCompileTime = ColsAtCompileTime, - - MaxSizeAtCompileTime = (internal::size_at_compile_time::ret), - - IsVectorAtCompileTime = RowsAtCompileTime == 1 || ColsAtCompileTime == 1, - /**< This is set to true if either the number of rows or the number of - * columns is known at compile-time to be equal to 1. Indeed, in that case, - * we are dealing with a column-vector (if there is only one column) or with - * a row-vector (if there is only one row). */ - - Flags = internal::traits::Flags, - /**< This stores expression \ref flags flags which may or may not be inherited by new expressions - * constructed from this one. See the \ref flags "list of flags". - */ - - IsRowMajor = Flags&RowMajorBit ? 1 : 0, - - InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? int(SizeAtCompileTime) - : int(IsRowMajor) ? int(ColsAtCompileTime) : int(RowsAtCompileTime), - - #ifndef EIGEN_PARSED_BY_DOXYGEN - _HasDirectAccess = (int(Flags)&DirectAccessBit) ? 1 : 0 // workaround sunCC - #endif - }; - - /** \internal the return type of MatrixBase::adjoint() */ - typedef typename internal::conditional::IsComplex, - CwiseUnaryOp, Eigen::Transpose >, - Transpose - >::type AdjointReturnType; - typedef Transpose TransposeReturnType; - typedef typename internal::add_const >::type ConstTransposeReturnType; - - // FIXME storage order do not match evaluator storage order - typedef SparseMatrix PlainObject; - -#ifndef EIGEN_PARSED_BY_DOXYGEN - /** This is the "real scalar" type; if the \a Scalar type is already real numbers - * (e.g. int, float or double) then \a RealScalar is just the same as \a Scalar. If - * \a Scalar is \a std::complex then RealScalar is \a T. - * - * \sa class NumTraits - */ - typedef typename NumTraits::Real RealScalar; - - /** \internal the return type of coeff() - */ - typedef typename internal::conditional<_HasDirectAccess, const Scalar&, Scalar>::type CoeffReturnType; - - /** \internal Represents a matrix with all coefficients equal to one another*/ - typedef CwiseNullaryOp,Matrix > ConstantReturnType; - - /** type of the equivalent dense matrix */ - typedef Matrix DenseMatrixType; - /** type of the equivalent square matrix */ - typedef Matrix SquareMatrixType; - - inline const Derived& derived() const { return *static_cast(this); } - inline Derived& derived() { return *static_cast(this); } - inline Derived& const_cast_derived() const - { return *static_cast(const_cast(this)); } - - typedef EigenBase Base; - -#endif // not EIGEN_PARSED_BY_DOXYGEN - -#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::SparseMatrixBase -#ifdef EIGEN_PARSED_BY_DOXYGEN -#define EIGEN_DOC_UNARY_ADDONS(METHOD,OP) /**

This method does not change the sparsity of \c *this: the OP is applied to explicitly stored coefficients only. \sa SparseCompressedBase::coeffs()

*/ -#define EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL /**

\warning This method returns a read-only expression for any sparse matrices. \sa \ref TutorialSparse_SubMatrices "Sparse block operations"

*/ -#define EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(COND) /**

\warning This method returns a read-write expression for COND sparse matrices only. Otherwise, the returned expression is read-only. \sa \ref TutorialSparse_SubMatrices "Sparse block operations"

*/ -#else -#define EIGEN_DOC_UNARY_ADDONS(X,Y) -#define EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL -#define EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(COND) -#endif -# include "../plugins/CommonCwiseUnaryOps.h" -# include "../plugins/CommonCwiseBinaryOps.h" -# include "../plugins/MatrixCwiseUnaryOps.h" -# include "../plugins/MatrixCwiseBinaryOps.h" -# include "../plugins/BlockMethods.h" -# ifdef EIGEN_SPARSEMATRIXBASE_PLUGIN -# include EIGEN_SPARSEMATRIXBASE_PLUGIN -# endif -#undef EIGEN_CURRENT_STORAGE_BASE_CLASS -#undef EIGEN_DOC_UNARY_ADDONS -#undef EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL -#undef EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF - - /** \returns the number of rows. \sa cols() */ - inline Index rows() const { return derived().rows(); } - /** \returns the number of columns. \sa rows() */ - inline Index cols() const { return derived().cols(); } - /** \returns the number of coefficients, which is \a rows()*cols(). - * \sa rows(), cols(). */ - inline Index size() const { return rows() * cols(); } - /** \returns true if either the number of rows or the number of columns is equal to 1. - * In other words, this function returns - * \code rows()==1 || cols()==1 \endcode - * \sa rows(), cols(), IsVectorAtCompileTime. */ - inline bool isVector() const { return rows()==1 || cols()==1; } - /** \returns the size of the storage major dimension, - * i.e., the number of columns for a columns major matrix, and the number of rows otherwise */ - Index outerSize() const { return (int(Flags)&RowMajorBit) ? this->rows() : this->cols(); } - /** \returns the size of the inner dimension according to the storage order, - * i.e., the number of rows for a columns major matrix, and the number of cols otherwise */ - Index innerSize() const { return (int(Flags)&RowMajorBit) ? this->cols() : this->rows(); } - - bool isRValue() const { return m_isRValue; } - Derived& markAsRValue() { m_isRValue = true; return derived(); } - - SparseMatrixBase() : m_isRValue(false) { /* TODO check flags */ } - - - template - Derived& operator=(const ReturnByValue& other); - - template - inline Derived& operator=(const SparseMatrixBase& other); - - inline Derived& operator=(const Derived& other); - - protected: - - template - inline Derived& assign(const OtherDerived& other); - - template - inline void assignGeneric(const OtherDerived& other); - - public: - - friend std::ostream & operator << (std::ostream & s, const SparseMatrixBase& m) - { - typedef typename Derived::Nested Nested; - typedef typename internal::remove_all::type NestedCleaned; - - if (Flags&RowMajorBit) - { - Nested nm(m.derived()); - internal::evaluator thisEval(nm); - for (Index row=0; row::InnerIterator it(thisEval, row); it; ++it) - { - for ( ; col thisEval(nm); - if (m.cols() == 1) { - Index row = 0; - for (typename internal::evaluator::InnerIterator it(thisEval, 0); it; ++it) - { - for ( ; row trans = m; - s << static_cast >&>(trans); - } - } - return s; - } - - template - Derived& operator+=(const SparseMatrixBase& other); - template - Derived& operator-=(const SparseMatrixBase& other); - - template - Derived& operator+=(const DiagonalBase& other); - template - Derived& operator-=(const DiagonalBase& other); - - template - Derived& operator+=(const EigenBase &other); - template - Derived& operator-=(const EigenBase &other); - - Derived& operator*=(const Scalar& other); - Derived& operator/=(const Scalar& other); - - template struct CwiseProductDenseReturnType { - typedef CwiseBinaryOp::Scalar, - typename internal::traits::Scalar - >::ReturnType>, - const Derived, - const OtherDerived - > Type; - }; - - template - EIGEN_STRONG_INLINE const typename CwiseProductDenseReturnType::Type - cwiseProduct(const MatrixBase &other) const; - - // sparse * diagonal - template - const Product - operator*(const DiagonalBase &other) const - { return Product(derived(), other.derived()); } - - // diagonal * sparse - template friend - const Product - operator*(const DiagonalBase &lhs, const SparseMatrixBase& rhs) - { return Product(lhs.derived(), rhs.derived()); } - - // sparse * sparse - template - const Product - operator*(const SparseMatrixBase &other) const; - - // sparse * dense - template - const Product - operator*(const MatrixBase &other) const - { return Product(derived(), other.derived()); } - - // dense * sparse - template friend - const Product - operator*(const MatrixBase &lhs, const SparseMatrixBase& rhs) - { return Product(lhs.derived(), rhs.derived()); } - - /** \returns an expression of P H P^-1 where H is the matrix represented by \c *this */ - SparseSymmetricPermutationProduct twistedBy(const PermutationMatrix& perm) const - { - return SparseSymmetricPermutationProduct(derived(), perm); - } - - template - Derived& operator*=(const SparseMatrixBase& other); - - template - inline const TriangularView triangularView() const; - - template struct SelfAdjointViewReturnType { typedef SparseSelfAdjointView Type; }; - template struct ConstSelfAdjointViewReturnType { typedef const SparseSelfAdjointView Type; }; - - template inline - typename ConstSelfAdjointViewReturnType::Type selfadjointView() const; - template inline - typename SelfAdjointViewReturnType::Type selfadjointView(); - - template Scalar dot(const MatrixBase& other) const; - template Scalar dot(const SparseMatrixBase& other) const; - RealScalar squaredNorm() const; - RealScalar norm() const; - RealScalar blueNorm() const; - - TransposeReturnType transpose() { return TransposeReturnType(derived()); } - const ConstTransposeReturnType transpose() const { return ConstTransposeReturnType(derived()); } - const AdjointReturnType adjoint() const { return AdjointReturnType(transpose()); } - - // inner-vector - typedef Block InnerVectorReturnType; - typedef Block ConstInnerVectorReturnType; - InnerVectorReturnType innerVector(Index outer); - const ConstInnerVectorReturnType innerVector(Index outer) const; - - // set of inner-vectors - typedef Block InnerVectorsReturnType; - typedef Block ConstInnerVectorsReturnType; - InnerVectorsReturnType innerVectors(Index outerStart, Index outerSize); - const ConstInnerVectorsReturnType innerVectors(Index outerStart, Index outerSize) const; - - DenseMatrixType toDense() const - { - return DenseMatrixType(derived()); - } - - template - bool isApprox(const SparseMatrixBase& other, - const RealScalar& prec = NumTraits::dummy_precision()) const; - - template - bool isApprox(const MatrixBase& other, - const RealScalar& prec = NumTraits::dummy_precision()) const - { return toDense().isApprox(other,prec); } - - /** \returns the matrix or vector obtained by evaluating this expression. - * - * Notice that in the case of a plain matrix or vector (not an expression) this function just returns - * a const reference, in order to avoid a useless copy. - */ - inline const typename internal::eval::type eval() const - { return typename internal::eval::type(derived()); } - - Scalar sum() const; - - inline const SparseView - pruned(const Scalar& reference = Scalar(0), const RealScalar& epsilon = NumTraits::dummy_precision()) const; - - protected: - - bool m_isRValue; - - static inline StorageIndex convert_index(const Index idx) { - return internal::convert_index(idx); - } - private: - template void evalTo(Dest &) const; -}; - -} // end namespace Eigen - -#endif // EIGEN_SPARSEMATRIXBASE_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparsePermutation.h b/include/Rivet/Math/eigen3/src/SparseCore/SparsePermutation.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparsePermutation.h +++ /dev/null @@ -1,178 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_PERMUTATION_H -#define EIGEN_SPARSE_PERMUTATION_H - -// This file implements sparse * permutation products - -namespace Eigen { - -namespace internal { - -template -struct permutation_matrix_product -{ - typedef typename nested_eval::type MatrixType; - typedef typename remove_all::type MatrixTypeCleaned; - - typedef typename MatrixTypeCleaned::Scalar Scalar; - typedef typename MatrixTypeCleaned::StorageIndex StorageIndex; - - enum { - SrcStorageOrder = MatrixTypeCleaned::Flags&RowMajorBit ? RowMajor : ColMajor, - MoveOuter = SrcStorageOrder==RowMajor ? Side==OnTheLeft : Side==OnTheRight - }; - - typedef typename internal::conditional, - SparseMatrix >::type ReturnType; - - template - static inline void run(Dest& dst, const PermutationType& perm, const ExpressionType& xpr) - { - MatrixType mat(xpr); - if(MoveOuter) - { - SparseMatrix tmp(mat.rows(), mat.cols()); - Matrix sizes(mat.outerSize()); - for(Index j=0; j tmp(mat.rows(), mat.cols()); - Matrix sizes(tmp.outerSize()); - sizes.setZero(); - PermutationMatrix perm_cpy; - if((Side==OnTheLeft) ^ Transposed) - perm_cpy = perm; - else - perm_cpy = perm.transpose(); - - for(Index j=0; j struct product_promote_storage_type { typedef Sparse ret; }; -template struct product_promote_storage_type { typedef Sparse ret; }; - -// TODO, the following two overloads are only needed to define the right temporary type through -// typename traits >::ReturnType -// whereas it should be correctly handled by traits >::PlainObject - -template -struct product_evaluator, ProductTag, PermutationShape, SparseShape> - : public evaluator::ReturnType> -{ - typedef Product XprType; - typedef typename permutation_matrix_product::ReturnType PlainObject; - typedef evaluator Base; - - enum { - Flags = Base::Flags | EvalBeforeNestingBit - }; - - explicit product_evaluator(const XprType& xpr) - : m_result(xpr.rows(), xpr.cols()) - { - ::new (static_cast(this)) Base(m_result); - generic_product_impl::evalTo(m_result, xpr.lhs(), xpr.rhs()); - } - -protected: - PlainObject m_result; -}; - -template -struct product_evaluator, ProductTag, SparseShape, PermutationShape > - : public evaluator::ReturnType> -{ - typedef Product XprType; - typedef typename permutation_matrix_product::ReturnType PlainObject; - typedef evaluator Base; - - enum { - Flags = Base::Flags | EvalBeforeNestingBit - }; - - explicit product_evaluator(const XprType& xpr) - : m_result(xpr.rows(), xpr.cols()) - { - ::new (static_cast(this)) Base(m_result); - generic_product_impl::evalTo(m_result, xpr.lhs(), xpr.rhs()); - } - -protected: - PlainObject m_result; -}; - -} // end namespace internal - -/** \returns the matrix with the permutation applied to the columns - */ -template -inline const Product -operator*(const SparseMatrixBase& matrix, const PermutationBase& perm) -{ return Product(matrix.derived(), perm.derived()); } - -/** \returns the matrix with the permutation applied to the rows - */ -template -inline const Product -operator*( const PermutationBase& perm, const SparseMatrixBase& matrix) -{ return Product(perm.derived(), matrix.derived()); } - - -/** \returns the matrix with the inverse permutation applied to the columns. - */ -template -inline const Product, AliasFreeProduct> -operator*(const SparseMatrixBase& matrix, const InverseImpl& tperm) -{ - return Product, AliasFreeProduct>(matrix.derived(), tperm.derived()); -} - -/** \returns the matrix with the inverse permutation applied to the rows. - */ -template -inline const Product, SparseDerived, AliasFreeProduct> -operator*(const InverseImpl& tperm, const SparseMatrixBase& matrix) -{ - return Product, SparseDerived, AliasFreeProduct>(tperm.derived(), matrix.derived()); -} - -} // end namespace Eigen - -#endif // EIGEN_SPARSE_SELFADJOINTVIEW_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseProduct.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseProduct.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseProduct.h +++ /dev/null @@ -1,169 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2015 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSEPRODUCT_H -#define EIGEN_SPARSEPRODUCT_H - -namespace Eigen { - -/** \returns an expression of the product of two sparse matrices. - * By default a conservative product preserving the symbolic non zeros is performed. - * The automatic pruning of the small values can be achieved by calling the pruned() function - * in which case a totally different product algorithm is employed: - * \code - * C = (A*B).pruned(); // supress numerical zeros (exact) - * C = (A*B).pruned(ref); - * C = (A*B).pruned(ref,epsilon); - * \endcode - * where \c ref is a meaningful non zero reference value. - * */ -template -template -inline const Product -SparseMatrixBase::operator*(const SparseMatrixBase &other) const -{ - return Product(derived(), other.derived()); -} - -namespace internal { - -// sparse * sparse -template -struct generic_product_impl -{ - template - static void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs) - { - evalTo(dst, lhs, rhs, typename evaluator_traits::Shape()); - } - - // dense += sparse * sparse - template - static void addTo(Dest& dst, const ActualLhs& lhs, const Rhs& rhs, typename enable_if::Shape,DenseShape>::value,int*>::type* = 0) - { - typedef typename nested_eval::type LhsNested; - typedef typename nested_eval::type RhsNested; - LhsNested lhsNested(lhs); - RhsNested rhsNested(rhs); - internal::sparse_sparse_to_dense_product_selector::type, - typename remove_all::type, Dest>::run(lhsNested,rhsNested,dst); - } - - // dense -= sparse * sparse - template - static void subTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, typename enable_if::Shape,DenseShape>::value,int*>::type* = 0) - { - addTo(dst, -lhs, rhs); - } - -protected: - - // sparse = sparse * sparse - template - static void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, SparseShape) - { - typedef typename nested_eval::type LhsNested; - typedef typename nested_eval::type RhsNested; - LhsNested lhsNested(lhs); - RhsNested rhsNested(rhs); - internal::conservative_sparse_sparse_product_selector::type, - typename remove_all::type, Dest>::run(lhsNested,rhsNested,dst); - } - - // dense = sparse * sparse - template - static void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, DenseShape) - { - dst.setZero(); - addTo(dst, lhs, rhs); - } -}; - -// sparse * sparse-triangular -template -struct generic_product_impl - : public generic_product_impl -{}; - -// sparse-triangular * sparse -template -struct generic_product_impl - : public generic_product_impl -{}; - -// dense = sparse-product (can be sparse*sparse, sparse*perm, etc.) -template< typename DstXprType, typename Lhs, typename Rhs> -struct Assignment, internal::assign_op::Scalar>, Sparse2Dense> -{ - typedef Product SrcXprType; - static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op &) - { - Index dstRows = src.rows(); - Index dstCols = src.cols(); - if((dst.rows()!=dstRows) || (dst.cols()!=dstCols)) - dst.resize(dstRows, dstCols); - - generic_product_impl::evalTo(dst,src.lhs(),src.rhs()); - } -}; - -// dense += sparse-product (can be sparse*sparse, sparse*perm, etc.) -template< typename DstXprType, typename Lhs, typename Rhs> -struct Assignment, internal::add_assign_op::Scalar>, Sparse2Dense> -{ - typedef Product SrcXprType; - static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op &) - { - generic_product_impl::addTo(dst,src.lhs(),src.rhs()); - } -}; - -// dense -= sparse-product (can be sparse*sparse, sparse*perm, etc.) -template< typename DstXprType, typename Lhs, typename Rhs> -struct Assignment, internal::sub_assign_op::Scalar>, Sparse2Dense> -{ - typedef Product SrcXprType; - static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op &) - { - generic_product_impl::subTo(dst,src.lhs(),src.rhs()); - } -}; - -template -struct unary_evaluator >, IteratorBased> - : public evaluator::PlainObject> -{ - typedef SparseView > XprType; - typedef typename XprType::PlainObject PlainObject; - typedef evaluator Base; - - explicit unary_evaluator(const XprType& xpr) - : m_result(xpr.rows(), xpr.cols()) - { - using std::abs; - ::new (static_cast(this)) Base(m_result); - typedef typename nested_eval::type LhsNested; - typedef typename nested_eval::type RhsNested; - LhsNested lhsNested(xpr.nestedExpression().lhs()); - RhsNested rhsNested(xpr.nestedExpression().rhs()); - - internal::sparse_sparse_product_with_pruning_selector::type, - typename remove_all::type, PlainObject>::run(lhsNested,rhsNested,m_result, - abs(xpr.reference())*xpr.epsilon()); - } - -protected: - PlainObject m_result; -}; - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_SPARSEPRODUCT_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseRedux.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseRedux.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseRedux.h +++ /dev/null @@ -1,49 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSEREDUX_H -#define EIGEN_SPARSEREDUX_H - -namespace Eigen { - -template -typename internal::traits::Scalar -SparseMatrixBase::sum() const -{ - eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); - Scalar res(0); - internal::evaluator thisEval(derived()); - for (Index j=0; j::InnerIterator iter(thisEval,j); iter; ++iter) - res += iter.value(); - return res; -} - -template -typename internal::traits >::Scalar -SparseMatrix<_Scalar,_Options,_Index>::sum() const -{ - eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); - if(this->isCompressed()) - return Matrix::Map(m_data.valuePtr(), m_data.size()).sum(); - else - return Base::sum(); -} - -template -typename internal::traits >::Scalar -SparseVector<_Scalar,_Options,_Index>::sum() const -{ - eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); - return Matrix::Map(m_data.valuePtr(), m_data.size()).sum(); -} - -} // end namespace Eigen - -#endif // EIGEN_SPARSEREDUX_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseRef.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseRef.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseRef.h +++ /dev/null @@ -1,397 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2015 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_REF_H -#define EIGEN_SPARSE_REF_H - -namespace Eigen { - -enum { - StandardCompressedFormat = 2 /**< used by Ref to specify whether the input storage must be in standard compressed form */ -}; - -namespace internal { - -template class SparseRefBase; - -template -struct traits, _Options, _StrideType> > - : public traits > -{ - typedef SparseMatrix PlainObjectType; - enum { - Options = _Options, - Flags = traits::Flags | CompressedAccessBit | NestByRefBit - }; - - template struct match { - enum { - StorageOrderMatch = PlainObjectType::IsVectorAtCompileTime || Derived::IsVectorAtCompileTime || ((PlainObjectType::Flags&RowMajorBit)==(Derived::Flags&RowMajorBit)), - MatchAtCompileTime = (Derived::Flags&CompressedAccessBit) && StorageOrderMatch - }; - typedef typename internal::conditional::type type; - }; - -}; - -template -struct traits, _Options, _StrideType> > - : public traits, _Options, _StrideType> > -{ - enum { - Flags = (traits >::Flags | CompressedAccessBit | NestByRefBit) & ~LvalueBit - }; -}; - -template -struct traits, _Options, _StrideType> > - : public traits > -{ - typedef SparseVector PlainObjectType; - enum { - Options = _Options, - Flags = traits::Flags | CompressedAccessBit | NestByRefBit - }; - - template struct match { - enum { - MatchAtCompileTime = (Derived::Flags&CompressedAccessBit) && Derived::IsVectorAtCompileTime - }; - typedef typename internal::conditional::type type; - }; - -}; - -template -struct traits, _Options, _StrideType> > - : public traits, _Options, _StrideType> > -{ - enum { - Flags = (traits >::Flags | CompressedAccessBit | NestByRefBit) & ~LvalueBit - }; -}; - -template -struct traits > : public traits {}; - -template class SparseRefBase - : public SparseMapBase -{ -public: - - typedef SparseMapBase Base; - EIGEN_SPARSE_PUBLIC_INTERFACE(SparseRefBase) - - SparseRefBase() - : Base(RowsAtCompileTime==Dynamic?0:RowsAtCompileTime,ColsAtCompileTime==Dynamic?0:ColsAtCompileTime, 0, 0, 0, 0, 0) - {} - -protected: - - template - void construct(Expression& expr) - { - if(expr.outerIndexPtr()==0) - ::new (static_cast(this)) Base(expr.size(), expr.nonZeros(), expr.innerIndexPtr(), expr.valuePtr()); - else - ::new (static_cast(this)) Base(expr.rows(), expr.cols(), expr.nonZeros(), expr.outerIndexPtr(), expr.innerIndexPtr(), expr.valuePtr(), expr.innerNonZeroPtr()); - } -}; - -} // namespace internal - - -/** - * \ingroup SparseCore_Module - * - * \brief A sparse matrix expression referencing an existing sparse expression - * - * \tparam SparseMatrixType the equivalent sparse matrix type of the referenced data, it must be a template instance of class SparseMatrix. - * \tparam Options specifies whether the a standard compressed format is required \c Options is \c #StandardCompressedFormat, or \c 0. - * The default is \c 0. - * - * \sa class Ref - */ -#ifndef EIGEN_PARSED_BY_DOXYGEN -template -class Ref, Options, StrideType > - : public internal::SparseRefBase, Options, StrideType > > -#else -template -class Ref - : public SparseMapBase // yes, that's weird to use Derived here, but that works! -#endif -{ - typedef SparseMatrix PlainObjectType; - typedef internal::traits Traits; - template - inline Ref(const SparseMatrix& expr); - template - inline Ref(const MappedSparseMatrix& expr); - public: - - typedef internal::SparseRefBase Base; - EIGEN_SPARSE_PUBLIC_INTERFACE(Ref) - - - #ifndef EIGEN_PARSED_BY_DOXYGEN - template - inline Ref(SparseMatrix& expr) - { - EIGEN_STATIC_ASSERT(bool(Traits::template match >::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH); - eigen_assert( ((Options & int(StandardCompressedFormat))==0) || (expr.isCompressed()) ); - Base::construct(expr.derived()); - } - - template - inline Ref(MappedSparseMatrix& expr) - { - EIGEN_STATIC_ASSERT(bool(Traits::template match >::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH); - eigen_assert( ((Options & int(StandardCompressedFormat))==0) || (expr.isCompressed()) ); - Base::construct(expr.derived()); - } - - template - inline Ref(const SparseCompressedBase& expr) - #else - /** Implicit constructor from any sparse expression (2D matrix or 1D vector) */ - template - inline Ref(SparseCompressedBase& expr) - #endif - { - EIGEN_STATIC_ASSERT(bool(internal::is_lvalue::value), THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY); - EIGEN_STATIC_ASSERT(bool(Traits::template match::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH); - eigen_assert( ((Options & int(StandardCompressedFormat))==0) || (expr.isCompressed()) ); - Base::construct(expr.const_cast_derived()); - } -}; - -// this is the const ref version -template -class Ref, Options, StrideType> - : public internal::SparseRefBase, Options, StrideType> > -{ - typedef SparseMatrix TPlainObjectType; - typedef internal::traits Traits; - public: - - typedef internal::SparseRefBase Base; - EIGEN_SPARSE_PUBLIC_INTERFACE(Ref) - - template - inline Ref(const SparseMatrixBase& expr) : m_hasCopy(false) - { - construct(expr.derived(), typename Traits::template match::type()); - } - - inline Ref(const Ref& other) : Base(other), m_hasCopy(false) { - // copy constructor shall not copy the m_object, to avoid unnecessary malloc and copy - } - - template - inline Ref(const RefBase& other) : m_hasCopy(false) { - construct(other.derived(), typename Traits::template match::type()); - } - - ~Ref() { - if(m_hasCopy) { - TPlainObjectType* obj = reinterpret_cast(m_object_bytes); - obj->~TPlainObjectType(); - } - } - - protected: - - template - void construct(const Expression& expr,internal::true_type) - { - if((Options & int(StandardCompressedFormat)) && (!expr.isCompressed())) - { - TPlainObjectType* obj = reinterpret_cast(m_object_bytes); - ::new (obj) TPlainObjectType(expr); - m_hasCopy = true; - Base::construct(*obj); - } - else - { - Base::construct(expr); - } - } - - template - void construct(const Expression& expr, internal::false_type) - { - TPlainObjectType* obj = reinterpret_cast(m_object_bytes); - ::new (obj) TPlainObjectType(expr); - m_hasCopy = true; - Base::construct(*obj); - } - - protected: - char m_object_bytes[sizeof(TPlainObjectType)]; - bool m_hasCopy; -}; - - - -/** - * \ingroup SparseCore_Module - * - * \brief A sparse vector expression referencing an existing sparse vector expression - * - * \tparam SparseVectorType the equivalent sparse vector type of the referenced data, it must be a template instance of class SparseVector. - * - * \sa class Ref - */ -#ifndef EIGEN_PARSED_BY_DOXYGEN -template -class Ref, Options, StrideType > - : public internal::SparseRefBase, Options, StrideType > > -#else -template -class Ref - : public SparseMapBase -#endif -{ - typedef SparseVector PlainObjectType; - typedef internal::traits Traits; - template - inline Ref(const SparseVector& expr); - public: - - typedef internal::SparseRefBase Base; - EIGEN_SPARSE_PUBLIC_INTERFACE(Ref) - - #ifndef EIGEN_PARSED_BY_DOXYGEN - template - inline Ref(SparseVector& expr) - { - EIGEN_STATIC_ASSERT(bool(Traits::template match >::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH); - Base::construct(expr.derived()); - } - - template - inline Ref(const SparseCompressedBase& expr) - #else - /** Implicit constructor from any 1D sparse vector expression */ - template - inline Ref(SparseCompressedBase& expr) - #endif - { - EIGEN_STATIC_ASSERT(bool(internal::is_lvalue::value), THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY); - EIGEN_STATIC_ASSERT(bool(Traits::template match::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH); - Base::construct(expr.const_cast_derived()); - } -}; - -// this is the const ref version -template -class Ref, Options, StrideType> - : public internal::SparseRefBase, Options, StrideType> > -{ - typedef SparseVector TPlainObjectType; - typedef internal::traits Traits; - public: - - typedef internal::SparseRefBase Base; - EIGEN_SPARSE_PUBLIC_INTERFACE(Ref) - - template - inline Ref(const SparseMatrixBase& expr) : m_hasCopy(false) - { - construct(expr.derived(), typename Traits::template match::type()); - } - - inline Ref(const Ref& other) : Base(other), m_hasCopy(false) { - // copy constructor shall not copy the m_object, to avoid unnecessary malloc and copy - } - - template - inline Ref(const RefBase& other) : m_hasCopy(false) { - construct(other.derived(), typename Traits::template match::type()); - } - - ~Ref() { - if(m_hasCopy) { - TPlainObjectType* obj = reinterpret_cast(m_object_bytes); - obj->~TPlainObjectType(); - } - } - - protected: - - template - void construct(const Expression& expr,internal::true_type) - { - Base::construct(expr); - } - - template - void construct(const Expression& expr, internal::false_type) - { - TPlainObjectType* obj = reinterpret_cast(m_object_bytes); - ::new (obj) TPlainObjectType(expr); - m_hasCopy = true; - Base::construct(*obj); - } - - protected: - char m_object_bytes[sizeof(TPlainObjectType)]; - bool m_hasCopy; -}; - -namespace internal { - -// FIXME shall we introduce a general evaluatior_ref that we can specialize for any sparse object once, and thus remove this copy-pasta thing... - -template -struct evaluator, Options, StrideType> > - : evaluator, Options, StrideType> > > -{ - typedef evaluator, Options, StrideType> > > Base; - typedef Ref, Options, StrideType> XprType; - evaluator() : Base() {} - explicit evaluator(const XprType &mat) : Base(mat) {} -}; - -template -struct evaluator, Options, StrideType> > - : evaluator, Options, StrideType> > > -{ - typedef evaluator, Options, StrideType> > > Base; - typedef Ref, Options, StrideType> XprType; - evaluator() : Base() {} - explicit evaluator(const XprType &mat) : Base(mat) {} -}; - -template -struct evaluator, Options, StrideType> > - : evaluator, Options, StrideType> > > -{ - typedef evaluator, Options, StrideType> > > Base; - typedef Ref, Options, StrideType> XprType; - evaluator() : Base() {} - explicit evaluator(const XprType &mat) : Base(mat) {} -}; - -template -struct evaluator, Options, StrideType> > - : evaluator, Options, StrideType> > > -{ - typedef evaluator, Options, StrideType> > > Base; - typedef Ref, Options, StrideType> XprType; - evaluator() : Base() {} - explicit evaluator(const XprType &mat) : Base(mat) {} -}; - -} - -} // end namespace Eigen - -#endif // EIGEN_SPARSE_REF_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseSelfAdjointView.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseSelfAdjointView.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseSelfAdjointView.h +++ /dev/null @@ -1,656 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2009-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_SELFADJOINTVIEW_H -#define EIGEN_SPARSE_SELFADJOINTVIEW_H - -namespace Eigen { - -/** \ingroup SparseCore_Module - * \class SparseSelfAdjointView - * - * \brief Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix. - * - * \param MatrixType the type of the dense matrix storing the coefficients - * \param Mode can be either \c #Lower or \c #Upper - * - * This class is an expression of a sefladjoint matrix from a triangular part of a matrix - * with given dense storage of the coefficients. It is the return type of MatrixBase::selfadjointView() - * and most of the time this is the only way that it is used. - * - * \sa SparseMatrixBase::selfadjointView() - */ -namespace internal { - -template -struct traits > : traits { -}; - -template -void permute_symm_to_symm(const MatrixType& mat, SparseMatrix& _dest, const typename MatrixType::StorageIndex* perm = 0); - -template -void permute_symm_to_fullsymm(const MatrixType& mat, SparseMatrix& _dest, const typename MatrixType::StorageIndex* perm = 0); - -} - -template class SparseSelfAdjointView - : public EigenBase > -{ - public: - - enum { - Mode = _Mode, - TransposeMode = ((Mode & Upper) ? Lower : 0) | ((Mode & Lower) ? Upper : 0), - RowsAtCompileTime = internal::traits::RowsAtCompileTime, - ColsAtCompileTime = internal::traits::ColsAtCompileTime - }; - - typedef EigenBase Base; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef Matrix VectorI; - typedef typename internal::ref_selector::non_const_type MatrixTypeNested; - typedef typename internal::remove_all::type _MatrixTypeNested; - - explicit inline SparseSelfAdjointView(MatrixType& matrix) : m_matrix(matrix) - { - eigen_assert(rows()==cols() && "SelfAdjointView is only for squared matrices"); - } - - inline Index rows() const { return m_matrix.rows(); } - inline Index cols() const { return m_matrix.cols(); } - - /** \internal \returns a reference to the nested matrix */ - const _MatrixTypeNested& matrix() const { return m_matrix; } - typename internal::remove_reference::type& matrix() { return m_matrix; } - - /** \returns an expression of the matrix product between a sparse self-adjoint matrix \c *this and a sparse matrix \a rhs. - * - * Note that there is no algorithmic advantage of performing such a product compared to a general sparse-sparse matrix product. - * Indeed, the SparseSelfadjointView operand is first copied into a temporary SparseMatrix before computing the product. - */ - template - Product - operator*(const SparseMatrixBase& rhs) const - { - return Product(*this, rhs.derived()); - } - - /** \returns an expression of the matrix product between a sparse matrix \a lhs and a sparse self-adjoint matrix \a rhs. - * - * Note that there is no algorithmic advantage of performing such a product compared to a general sparse-sparse matrix product. - * Indeed, the SparseSelfadjointView operand is first copied into a temporary SparseMatrix before computing the product. - */ - template friend - Product - operator*(const SparseMatrixBase& lhs, const SparseSelfAdjointView& rhs) - { - return Product(lhs.derived(), rhs); - } - - /** Efficient sparse self-adjoint matrix times dense vector/matrix product */ - template - Product - operator*(const MatrixBase& rhs) const - { - return Product(*this, rhs.derived()); - } - - /** Efficient dense vector/matrix times sparse self-adjoint matrix product */ - template friend - Product - operator*(const MatrixBase& lhs, const SparseSelfAdjointView& rhs) - { - return Product(lhs.derived(), rhs); - } - - /** Perform a symmetric rank K update of the selfadjoint matrix \c *this: - * \f$ this = this + \alpha ( u u^* ) \f$ where \a u is a vector or matrix. - * - * \returns a reference to \c *this - * - * To perform \f$ this = this + \alpha ( u^* u ) \f$ you can simply - * call this function with u.adjoint(). - */ - template - SparseSelfAdjointView& rankUpdate(const SparseMatrixBase& u, const Scalar& alpha = Scalar(1)); - - /** \returns an expression of P H P^-1 */ - // TODO implement twists in a more evaluator friendly fashion - SparseSymmetricPermutationProduct<_MatrixTypeNested,Mode> twistedBy(const PermutationMatrix& perm) const - { - return SparseSymmetricPermutationProduct<_MatrixTypeNested,Mode>(m_matrix, perm); - } - - template - SparseSelfAdjointView& operator=(const SparseSymmetricPermutationProduct& permutedMatrix) - { - internal::call_assignment_no_alias_no_transpose(*this, permutedMatrix); - return *this; - } - - SparseSelfAdjointView& operator=(const SparseSelfAdjointView& src) - { - PermutationMatrix pnull; - return *this = src.twistedBy(pnull); - } - - template - SparseSelfAdjointView& operator=(const SparseSelfAdjointView& src) - { - PermutationMatrix pnull; - return *this = src.twistedBy(pnull); - } - - void resize(Index rows, Index cols) - { - EIGEN_ONLY_USED_FOR_DEBUG(rows); - EIGEN_ONLY_USED_FOR_DEBUG(cols); - eigen_assert(rows == this->rows() && cols == this->cols() - && "SparseSelfadjointView::resize() does not actually allow to resize."); - } - - protected: - - MatrixTypeNested m_matrix; - //mutable VectorI m_countPerRow; - //mutable VectorI m_countPerCol; - private: - template void evalTo(Dest &) const; -}; - -/*************************************************************************** -* Implementation of SparseMatrixBase methods -***************************************************************************/ - -template -template -typename SparseMatrixBase::template ConstSelfAdjointViewReturnType::Type SparseMatrixBase::selfadjointView() const -{ - return SparseSelfAdjointView(derived()); -} - -template -template -typename SparseMatrixBase::template SelfAdjointViewReturnType::Type SparseMatrixBase::selfadjointView() -{ - return SparseSelfAdjointView(derived()); -} - -/*************************************************************************** -* Implementation of SparseSelfAdjointView methods -***************************************************************************/ - -template -template -SparseSelfAdjointView& -SparseSelfAdjointView::rankUpdate(const SparseMatrixBase& u, const Scalar& alpha) -{ - SparseMatrix tmp = u * u.adjoint(); - if(alpha==Scalar(0)) - m_matrix = tmp.template triangularView(); - else - m_matrix += alpha * tmp.template triangularView(); - - return *this; -} - -namespace internal { - -// TODO currently a selfadjoint expression has the form SelfAdjointView<.,.> -// in the future selfadjoint-ness should be defined by the expression traits -// such that Transpose > is valid. (currently TriangularBase::transpose() is overloaded to make it work) -template -struct evaluator_traits > -{ - typedef typename storage_kind_to_evaluator_kind::Kind Kind; - typedef SparseSelfAdjointShape Shape; -}; - -struct SparseSelfAdjoint2Sparse {}; - -template<> struct AssignmentKind { typedef SparseSelfAdjoint2Sparse Kind; }; -template<> struct AssignmentKind { typedef Sparse2Sparse Kind; }; - -template< typename DstXprType, typename SrcXprType, typename Functor> -struct Assignment -{ - typedef typename DstXprType::StorageIndex StorageIndex; - typedef internal::assign_op AssignOpType; - - template - static void run(SparseMatrix &dst, const SrcXprType &src, const AssignOpType&/*func*/) - { - internal::permute_symm_to_fullsymm(src.matrix(), dst); - } - - // FIXME: the handling of += and -= in sparse matrices should be cleanup so that next two overloads could be reduced to: - template - static void run(SparseMatrix &dst, const SrcXprType &src, const AssignFunc& func) - { - SparseMatrix tmp(src.rows(),src.cols()); - run(tmp, src, AssignOpType()); - call_assignment_no_alias_no_transpose(dst, tmp, func); - } - - template - static void run(SparseMatrix &dst, const SrcXprType &src, - const internal::add_assign_op& /* func */) - { - SparseMatrix tmp(src.rows(),src.cols()); - run(tmp, src, AssignOpType()); - dst += tmp; - } - - template - static void run(SparseMatrix &dst, const SrcXprType &src, - const internal::sub_assign_op& /* func */) - { - SparseMatrix tmp(src.rows(),src.cols()); - run(tmp, src, AssignOpType()); - dst -= tmp; - } - - template - static void run(DynamicSparseMatrix& dst, const SrcXprType &src, const AssignOpType&/*func*/) - { - // TODO directly evaluate into dst; - SparseMatrix tmp(dst.rows(),dst.cols()); - internal::permute_symm_to_fullsymm(src.matrix(), tmp); - dst = tmp; - } -}; - -} // end namespace internal - -/*************************************************************************** -* Implementation of sparse self-adjoint time dense matrix -***************************************************************************/ - -namespace internal { - -template -inline void sparse_selfadjoint_time_dense_product(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const AlphaType& alpha) -{ - EIGEN_ONLY_USED_FOR_DEBUG(alpha); - - typedef typename internal::nested_eval::type SparseLhsTypeNested; - typedef typename internal::remove_all::type SparseLhsTypeNestedCleaned; - typedef evaluator LhsEval; - typedef typename LhsEval::InnerIterator LhsIterator; - typedef typename SparseLhsType::Scalar LhsScalar; - - enum { - LhsIsRowMajor = (LhsEval::Flags&RowMajorBit)==RowMajorBit, - ProcessFirstHalf = - ((Mode&(Upper|Lower))==(Upper|Lower)) - || ( (Mode&Upper) && !LhsIsRowMajor) - || ( (Mode&Lower) && LhsIsRowMajor), - ProcessSecondHalf = !ProcessFirstHalf - }; - - SparseLhsTypeNested lhs_nested(lhs); - LhsEval lhsEval(lhs_nested); - - // work on one column at once - for (Index k=0; k::ReturnType rhs_j(alpha*rhs(j,k)); - // accumulator for partial scalar product - typename DenseResType::Scalar res_j(0); - for(; (ProcessFirstHalf ? i && i.index() < j : i) ; ++i) - { - LhsScalar lhs_ij = i.value(); - if(!LhsIsRowMajor) lhs_ij = numext::conj(lhs_ij); - res_j += lhs_ij * rhs(i.index(),k); - res(i.index(),k) += numext::conj(lhs_ij) * rhs_j; - } - res(j,k) += alpha * res_j; - - // handle diagonal coeff - if (ProcessFirstHalf && i && (i.index()==j)) - res(j,k) += alpha * i.value() * rhs(j,k); - } - } -} - - -template -struct generic_product_impl -: generic_product_impl_base > -{ - template - static void scaleAndAddTo(Dest& dst, const LhsView& lhsView, const Rhs& rhs, const typename Dest::Scalar& alpha) - { - typedef typename LhsView::_MatrixTypeNested Lhs; - typedef typename nested_eval::type LhsNested; - typedef typename nested_eval::type RhsNested; - LhsNested lhsNested(lhsView.matrix()); - RhsNested rhsNested(rhs); - - internal::sparse_selfadjoint_time_dense_product(lhsNested, rhsNested, dst, alpha); - } -}; - -template -struct generic_product_impl -: generic_product_impl_base > -{ - template - static void scaleAndAddTo(Dest& dst, const Lhs& lhs, const RhsView& rhsView, const typename Dest::Scalar& alpha) - { - typedef typename RhsView::_MatrixTypeNested Rhs; - typedef typename nested_eval::type LhsNested; - typedef typename nested_eval::type RhsNested; - LhsNested lhsNested(lhs); - RhsNested rhsNested(rhsView.matrix()); - - // transpose everything - Transpose dstT(dst); - internal::sparse_selfadjoint_time_dense_product(rhsNested.transpose(), lhsNested.transpose(), dstT, alpha); - } -}; - -// NOTE: these two overloads are needed to evaluate the sparse selfadjoint view into a full sparse matrix -// TODO: maybe the copy could be handled by generic_product_impl so that these overloads would not be needed anymore - -template -struct product_evaluator, ProductTag, SparseSelfAdjointShape, SparseShape> - : public evaluator::PlainObject> -{ - typedef Product XprType; - typedef typename XprType::PlainObject PlainObject; - typedef evaluator Base; - - product_evaluator(const XprType& xpr) - : m_lhs(xpr.lhs()), m_result(xpr.rows(), xpr.cols()) - { - ::new (static_cast(this)) Base(m_result); - generic_product_impl::evalTo(m_result, m_lhs, xpr.rhs()); - } - -protected: - typename Rhs::PlainObject m_lhs; - PlainObject m_result; -}; - -template -struct product_evaluator, ProductTag, SparseShape, SparseSelfAdjointShape> - : public evaluator::PlainObject> -{ - typedef Product XprType; - typedef typename XprType::PlainObject PlainObject; - typedef evaluator Base; - - product_evaluator(const XprType& xpr) - : m_rhs(xpr.rhs()), m_result(xpr.rows(), xpr.cols()) - { - ::new (static_cast(this)) Base(m_result); - generic_product_impl::evalTo(m_result, xpr.lhs(), m_rhs); - } - -protected: - typename Lhs::PlainObject m_rhs; - PlainObject m_result; -}; - -} // namespace internal - -/*************************************************************************** -* Implementation of symmetric copies and permutations -***************************************************************************/ -namespace internal { - -template -void permute_symm_to_fullsymm(const MatrixType& mat, SparseMatrix& _dest, const typename MatrixType::StorageIndex* perm) -{ - typedef typename MatrixType::StorageIndex StorageIndex; - typedef typename MatrixType::Scalar Scalar; - typedef SparseMatrix Dest; - typedef Matrix VectorI; - typedef evaluator MatEval; - typedef typename evaluator::InnerIterator MatIterator; - - MatEval matEval(mat); - Dest& dest(_dest.derived()); - enum { - StorageOrderMatch = int(Dest::IsRowMajor) == int(MatrixType::IsRowMajor) - }; - - Index size = mat.rows(); - VectorI count; - count.resize(size); - count.setZero(); - dest.resize(size,size); - for(Index j = 0; jc) || ( Mode==Upper && r(it.index()); - Index r = it.row(); - Index c = it.col(); - - StorageIndex jp = perm ? perm[j] : j; - StorageIndex ip = perm ? perm[i] : i; - - if(Mode==(Upper|Lower)) - { - Index k = count[StorageOrderMatch ? jp : ip]++; - dest.innerIndexPtr()[k] = StorageOrderMatch ? ip : jp; - dest.valuePtr()[k] = it.value(); - } - else if(r==c) - { - Index k = count[ip]++; - dest.innerIndexPtr()[k] = ip; - dest.valuePtr()[k] = it.value(); - } - else if(( (Mode&Lower)==Lower && r>c) || ( (Mode&Upper)==Upper && r -void permute_symm_to_symm(const MatrixType& mat, SparseMatrix& _dest, const typename MatrixType::StorageIndex* perm) -{ - typedef typename MatrixType::StorageIndex StorageIndex; - typedef typename MatrixType::Scalar Scalar; - SparseMatrix& dest(_dest.derived()); - typedef Matrix VectorI; - typedef evaluator MatEval; - typedef typename evaluator::InnerIterator MatIterator; - - enum { - SrcOrder = MatrixType::IsRowMajor ? RowMajor : ColMajor, - StorageOrderMatch = int(SrcOrder) == int(DstOrder), - DstMode = DstOrder==RowMajor ? (_DstMode==Upper ? Lower : Upper) : _DstMode, - SrcMode = SrcOrder==RowMajor ? (_SrcMode==Upper ? Lower : Upper) : _SrcMode - }; - - MatEval matEval(mat); - - Index size = mat.rows(); - VectorI count(size); - count.setZero(); - dest.resize(size,size); - for(StorageIndex j = 0; jj)) - continue; - - StorageIndex ip = perm ? perm[i] : i; - count[int(DstMode)==int(Lower) ? (std::min)(ip,jp) : (std::max)(ip,jp)]++; - } - } - dest.outerIndexPtr()[0] = 0; - for(Index j=0; jj)) - continue; - - StorageIndex jp = perm ? perm[j] : j; - StorageIndex ip = perm? perm[i] : i; - - Index k = count[int(DstMode)==int(Lower) ? (std::min)(ip,jp) : (std::max)(ip,jp)]++; - dest.innerIndexPtr()[k] = int(DstMode)==int(Lower) ? (std::max)(ip,jp) : (std::min)(ip,jp); - - if(!StorageOrderMatch) std::swap(ip,jp); - if( ((int(DstMode)==int(Lower) && ipjp))) - dest.valuePtr()[k] = numext::conj(it.value()); - else - dest.valuePtr()[k] = it.value(); - } - } -} - -} - -// TODO implement twists in a more evaluator friendly fashion - -namespace internal { - -template -struct traits > : traits { -}; - -} - -template -class SparseSymmetricPermutationProduct - : public EigenBase > -{ - public: - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::StorageIndex StorageIndex; - enum { - RowsAtCompileTime = internal::traits::RowsAtCompileTime, - ColsAtCompileTime = internal::traits::ColsAtCompileTime - }; - protected: - typedef PermutationMatrix Perm; - public: - typedef Matrix VectorI; - typedef typename MatrixType::Nested MatrixTypeNested; - typedef typename internal::remove_all::type NestedExpression; - - SparseSymmetricPermutationProduct(const MatrixType& mat, const Perm& perm) - : m_matrix(mat), m_perm(perm) - {} - - inline Index rows() const { return m_matrix.rows(); } - inline Index cols() const { return m_matrix.cols(); } - - const NestedExpression& matrix() const { return m_matrix; } - const Perm& perm() const { return m_perm; } - - protected: - MatrixTypeNested m_matrix; - const Perm& m_perm; - -}; - -namespace internal { - -template -struct Assignment, internal::assign_op, Sparse2Sparse> -{ - typedef SparseSymmetricPermutationProduct SrcXprType; - typedef typename DstXprType::StorageIndex DstIndex; - template - static void run(SparseMatrix &dst, const SrcXprType &src, const internal::assign_op &) - { - // internal::permute_symm_to_fullsymm(m_matrix,_dest,m_perm.indices().data()); - SparseMatrix tmp; - internal::permute_symm_to_fullsymm(src.matrix(),tmp,src.perm().indices().data()); - dst = tmp; - } - - template - static void run(SparseSelfAdjointView& dst, const SrcXprType &src, const internal::assign_op &) - { - internal::permute_symm_to_symm(src.matrix(),dst.matrix(),src.perm().indices().data()); - } -}; - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_SPARSE_SELFADJOINTVIEW_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseSolverBase.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseSolverBase.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseSolverBase.h +++ /dev/null @@ -1,124 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSESOLVERBASE_H -#define EIGEN_SPARSESOLVERBASE_H - -namespace Eigen { - -namespace internal { - - /** \internal - * Helper functions to solve with a sparse right-hand-side and result. - * The rhs is decomposed into small vertical panels which are solved through dense temporaries. - */ -template -typename enable_if::type -solve_sparse_through_dense_panels(const Decomposition &dec, const Rhs& rhs, Dest &dest) -{ - EIGEN_STATIC_ASSERT((Dest::Flags&RowMajorBit)==0,THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES); - typedef typename Dest::Scalar DestScalar; - // we process the sparse rhs per block of NbColsAtOnce columns temporarily stored into a dense matrix. - static const Index NbColsAtOnce = 4; - Index rhsCols = rhs.cols(); - Index size = rhs.rows(); - // the temporary matrices do not need more columns than NbColsAtOnce: - Index tmpCols = (std::min)(rhsCols, NbColsAtOnce); - Eigen::Matrix tmp(size,tmpCols); - Eigen::Matrix tmpX(size,tmpCols); - for(Index k=0; k(rhsCols-k, NbColsAtOnce); - tmp.leftCols(actualCols) = rhs.middleCols(k,actualCols); - tmpX.leftCols(actualCols) = dec.solve(tmp.leftCols(actualCols)); - dest.middleCols(k,actualCols) = tmpX.leftCols(actualCols).sparseView(); - } -} - -// Overload for vector as rhs -template -typename enable_if::type -solve_sparse_through_dense_panels(const Decomposition &dec, const Rhs& rhs, Dest &dest) -{ - typedef typename Dest::Scalar DestScalar; - Index size = rhs.rows(); - Eigen::Matrix rhs_dense(rhs); - Eigen::Matrix dest_dense(size); - dest_dense = dec.solve(rhs_dense); - dest = dest_dense.sparseView(); -} - -} // end namespace internal - -/** \class SparseSolverBase - * \ingroup SparseCore_Module - * \brief A base class for sparse solvers - * - * \tparam Derived the actual type of the solver. - * - */ -template -class SparseSolverBase : internal::noncopyable -{ - public: - - /** Default constructor */ - SparseSolverBase() - : m_isInitialized(false) - {} - - ~SparseSolverBase() - {} - - Derived& derived() { return *static_cast(this); } - const Derived& derived() const { return *static_cast(this); } - - /** \returns an expression of the solution x of \f$ A x = b \f$ using the current decomposition of A. - * - * \sa compute() - */ - template - inline const Solve - solve(const MatrixBase& b) const - { - eigen_assert(m_isInitialized && "Solver is not initialized."); - eigen_assert(derived().rows()==b.rows() && "solve(): invalid number of rows of the right hand side matrix b"); - return Solve(derived(), b.derived()); - } - - /** \returns an expression of the solution x of \f$ A x = b \f$ using the current decomposition of A. - * - * \sa compute() - */ - template - inline const Solve - solve(const SparseMatrixBase& b) const - { - eigen_assert(m_isInitialized && "Solver is not initialized."); - eigen_assert(derived().rows()==b.rows() && "solve(): invalid number of rows of the right hand side matrix b"); - return Solve(derived(), b.derived()); - } - - #ifndef EIGEN_PARSED_BY_DOXYGEN - /** \internal default implementation of solving with a sparse rhs */ - template - void _solve_impl(const SparseMatrixBase &b, SparseMatrixBase &dest) const - { - internal::solve_sparse_through_dense_panels(derived(), b.derived(), dest.derived()); - } - #endif // EIGEN_PARSED_BY_DOXYGEN - - protected: - - mutable bool m_isInitialized; -}; - -} // end namespace Eigen - -#endif // EIGEN_SPARSESOLVERBASE_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseSparseProductWithPruning.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseSparseProductWithPruning.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseSparseProductWithPruning.h +++ /dev/null @@ -1,198 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSESPARSEPRODUCTWITHPRUNING_H -#define EIGEN_SPARSESPARSEPRODUCTWITHPRUNING_H - -namespace Eigen { - -namespace internal { - - -// perform a pseudo in-place sparse * sparse product assuming all matrices are col major -template -static void sparse_sparse_product_with_pruning_impl(const Lhs& lhs, const Rhs& rhs, ResultType& res, const typename ResultType::RealScalar& tolerance) -{ - // return sparse_sparse_product_with_pruning_impl2(lhs,rhs,res); - - typedef typename remove_all::type::Scalar Scalar; - typedef typename remove_all::type::StorageIndex StorageIndex; - - // make sure to call innerSize/outerSize since we fake the storage order. - Index rows = lhs.innerSize(); - Index cols = rhs.outerSize(); - //Index size = lhs.outerSize(); - eigen_assert(lhs.outerSize() == rhs.innerSize()); - - // allocate a temporary buffer - AmbiVector tempVector(rows); - - // mimics a resizeByInnerOuter: - if(ResultType::IsRowMajor) - res.resize(cols, rows); - else - res.resize(rows, cols); - - evaluator lhsEval(lhs); - evaluator rhsEval(rhs); - - // estimate the number of non zero entries - // given a rhs column containing Y non zeros, we assume that the respective Y columns - // of the lhs differs in average of one non zeros, thus the number of non zeros for - // the product of a rhs column with the lhs is X+Y where X is the average number of non zero - // per column of the lhs. - // Therefore, we have nnz(lhs*rhs) = nnz(lhs) + nnz(rhs) - Index estimated_nnz_prod = lhsEval.nonZerosEstimate() + rhsEval.nonZerosEstimate(); - - res.reserve(estimated_nnz_prod); - double ratioColRes = double(estimated_nnz_prod)/(double(lhs.rows())*double(rhs.cols())); - for (Index j=0; j::InnerIterator rhsIt(rhsEval, j); rhsIt; ++rhsIt) - { - // FIXME should be written like this: tmp += rhsIt.value() * lhs.col(rhsIt.index()) - tempVector.restart(); - Scalar x = rhsIt.value(); - for (typename evaluator::InnerIterator lhsIt(lhsEval, rhsIt.index()); lhsIt; ++lhsIt) - { - tempVector.coeffRef(lhsIt.index()) += lhsIt.value() * x; - } - } - res.startVec(j); - for (typename AmbiVector::Iterator it(tempVector,tolerance); it; ++it) - res.insertBackByOuterInner(j,it.index()) = it.value(); - } - res.finalize(); -} - -template::Flags&RowMajorBit, - int RhsStorageOrder = traits::Flags&RowMajorBit, - int ResStorageOrder = traits::Flags&RowMajorBit> -struct sparse_sparse_product_with_pruning_selector; - -template -struct sparse_sparse_product_with_pruning_selector -{ - typedef typename traits::type>::Scalar Scalar; - typedef typename ResultType::RealScalar RealScalar; - - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) - { - typename remove_all::type _res(res.rows(), res.cols()); - internal::sparse_sparse_product_with_pruning_impl(lhs, rhs, _res, tolerance); - res.swap(_res); - } -}; - -template -struct sparse_sparse_product_with_pruning_selector -{ - typedef typename ResultType::RealScalar RealScalar; - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) - { - // we need a col-major matrix to hold the result - typedef SparseMatrix SparseTemporaryType; - SparseTemporaryType _res(res.rows(), res.cols()); - internal::sparse_sparse_product_with_pruning_impl(lhs, rhs, _res, tolerance); - res = _res; - } -}; - -template -struct sparse_sparse_product_with_pruning_selector -{ - typedef typename ResultType::RealScalar RealScalar; - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) - { - // let's transpose the product to get a column x column product - typename remove_all::type _res(res.rows(), res.cols()); - internal::sparse_sparse_product_with_pruning_impl(rhs, lhs, _res, tolerance); - res.swap(_res); - } -}; - -template -struct sparse_sparse_product_with_pruning_selector -{ - typedef typename ResultType::RealScalar RealScalar; - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) - { - typedef SparseMatrix ColMajorMatrixLhs; - typedef SparseMatrix ColMajorMatrixRhs; - ColMajorMatrixLhs colLhs(lhs); - ColMajorMatrixRhs colRhs(rhs); - internal::sparse_sparse_product_with_pruning_impl(colLhs, colRhs, res, tolerance); - - // let's transpose the product to get a column x column product -// typedef SparseMatrix SparseTemporaryType; -// SparseTemporaryType _res(res.cols(), res.rows()); -// sparse_sparse_product_with_pruning_impl(rhs, lhs, _res); -// res = _res.transpose(); - } -}; - -template -struct sparse_sparse_product_with_pruning_selector -{ - typedef typename ResultType::RealScalar RealScalar; - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) - { - typedef SparseMatrix RowMajorMatrixLhs; - RowMajorMatrixLhs rowLhs(lhs); - sparse_sparse_product_with_pruning_selector(rowLhs,rhs,res,tolerance); - } -}; - -template -struct sparse_sparse_product_with_pruning_selector -{ - typedef typename ResultType::RealScalar RealScalar; - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) - { - typedef SparseMatrix RowMajorMatrixRhs; - RowMajorMatrixRhs rowRhs(rhs); - sparse_sparse_product_with_pruning_selector(lhs,rowRhs,res,tolerance); - } -}; - -template -struct sparse_sparse_product_with_pruning_selector -{ - typedef typename ResultType::RealScalar RealScalar; - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) - { - typedef SparseMatrix ColMajorMatrixRhs; - ColMajorMatrixRhs colRhs(rhs); - internal::sparse_sparse_product_with_pruning_impl(lhs, colRhs, res, tolerance); - } -}; - -template -struct sparse_sparse_product_with_pruning_selector -{ - typedef typename ResultType::RealScalar RealScalar; - static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) - { - typedef SparseMatrix ColMajorMatrixLhs; - ColMajorMatrixLhs colLhs(lhs); - internal::sparse_sparse_product_with_pruning_impl(colLhs, rhs, res, tolerance); - } -}; - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_SPARSESPARSEPRODUCTWITHPRUNING_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseTranspose.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseTranspose.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseTranspose.h +++ /dev/null @@ -1,92 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2015 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSETRANSPOSE_H -#define EIGEN_SPARSETRANSPOSE_H - -namespace Eigen { - -namespace internal { - template - class SparseTransposeImpl - : public SparseMatrixBase > - {}; - - template - class SparseTransposeImpl - : public SparseCompressedBase > - { - typedef SparseCompressedBase > Base; - public: - using Base::derived; - typedef typename Base::Scalar Scalar; - typedef typename Base::StorageIndex StorageIndex; - - inline Index nonZeros() const { return derived().nestedExpression().nonZeros(); } - - inline const Scalar* valuePtr() const { return derived().nestedExpression().valuePtr(); } - inline const StorageIndex* innerIndexPtr() const { return derived().nestedExpression().innerIndexPtr(); } - inline const StorageIndex* outerIndexPtr() const { return derived().nestedExpression().outerIndexPtr(); } - inline const StorageIndex* innerNonZeroPtr() const { return derived().nestedExpression().innerNonZeroPtr(); } - - inline Scalar* valuePtr() { return derived().nestedExpression().valuePtr(); } - inline StorageIndex* innerIndexPtr() { return derived().nestedExpression().innerIndexPtr(); } - inline StorageIndex* outerIndexPtr() { return derived().nestedExpression().outerIndexPtr(); } - inline StorageIndex* innerNonZeroPtr() { return derived().nestedExpression().innerNonZeroPtr(); } - }; -} - -template class TransposeImpl - : public internal::SparseTransposeImpl -{ - protected: - typedef internal::SparseTransposeImpl Base; -}; - -namespace internal { - -template -struct unary_evaluator, IteratorBased> - : public evaluator_base > -{ - typedef typename evaluator::InnerIterator EvalIterator; - public: - typedef Transpose XprType; - - inline Index nonZerosEstimate() const { - return m_argImpl.nonZerosEstimate(); - } - - class InnerIterator : public EvalIterator - { - public: - EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& unaryOp, Index outer) - : EvalIterator(unaryOp.m_argImpl,outer) - {} - - Index row() const { return EvalIterator::col(); } - Index col() const { return EvalIterator::row(); } - }; - - enum { - CoeffReadCost = evaluator::CoeffReadCost, - Flags = XprType::Flags - }; - - explicit unary_evaluator(const XprType& op) :m_argImpl(op.nestedExpression()) {} - - protected: - evaluator m_argImpl; -}; - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_SPARSETRANSPOSE_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseTriangularView.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseTriangularView.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseTriangularView.h +++ /dev/null @@ -1,189 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2009-2015 Gael Guennebaud -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_TRIANGULARVIEW_H -#define EIGEN_SPARSE_TRIANGULARVIEW_H - -namespace Eigen { - -/** \ingroup SparseCore_Module - * - * \brief Base class for a triangular part in a \b sparse matrix - * - * This class is an abstract base class of class TriangularView, and objects of type TriangularViewImpl cannot be instantiated. - * It extends class TriangularView with additional methods which are available for sparse expressions only. - * - * \sa class TriangularView, SparseMatrixBase::triangularView() - */ -template class TriangularViewImpl - : public SparseMatrixBase > -{ - enum { SkipFirst = ((Mode&Lower) && !(MatrixType::Flags&RowMajorBit)) - || ((Mode&Upper) && (MatrixType::Flags&RowMajorBit)), - SkipLast = !SkipFirst, - SkipDiag = (Mode&ZeroDiag) ? 1 : 0, - HasUnitDiag = (Mode&UnitDiag) ? 1 : 0 - }; - - typedef TriangularView TriangularViewType; - - protected: - // dummy solve function to make TriangularView happy. - void solve() const; - - typedef SparseMatrixBase Base; - public: - - EIGEN_SPARSE_PUBLIC_INTERFACE(TriangularViewType) - - typedef typename MatrixType::Nested MatrixTypeNested; - typedef typename internal::remove_reference::type MatrixTypeNestedNonRef; - typedef typename internal::remove_all::type MatrixTypeNestedCleaned; - - template - EIGEN_DEVICE_FUNC - EIGEN_STRONG_INLINE void _solve_impl(const RhsType &rhs, DstType &dst) const { - if(!(internal::is_same::value && internal::extract_data(dst) == internal::extract_data(rhs))) - dst = rhs; - this->solveInPlace(dst); - } - - /** Applies the inverse of \c *this to the dense vector or matrix \a other, "in-place" */ - template void solveInPlace(MatrixBase& other) const; - - /** Applies the inverse of \c *this to the sparse vector or matrix \a other, "in-place" */ - template void solveInPlace(SparseMatrixBase& other) const; - -}; - -namespace internal { - -template -struct unary_evaluator, IteratorBased> - : evaluator_base > -{ - typedef TriangularView XprType; - -protected: - - typedef typename XprType::Scalar Scalar; - typedef typename XprType::StorageIndex StorageIndex; - typedef typename evaluator::InnerIterator EvalIterator; - - enum { SkipFirst = ((Mode&Lower) && !(ArgType::Flags&RowMajorBit)) - || ((Mode&Upper) && (ArgType::Flags&RowMajorBit)), - SkipLast = !SkipFirst, - SkipDiag = (Mode&ZeroDiag) ? 1 : 0, - HasUnitDiag = (Mode&UnitDiag) ? 1 : 0 - }; - -public: - - enum { - CoeffReadCost = evaluator::CoeffReadCost, - Flags = XprType::Flags - }; - - explicit unary_evaluator(const XprType &xpr) : m_argImpl(xpr.nestedExpression()), m_arg(xpr.nestedExpression()) {} - - inline Index nonZerosEstimate() const { - return m_argImpl.nonZerosEstimate(); - } - - class InnerIterator : public EvalIterator - { - typedef EvalIterator Base; - public: - - EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& xprEval, Index outer) - : Base(xprEval.m_argImpl,outer), m_returnOne(false), m_containsDiag(Base::outer()index()<=outer : this->index()=Base::outer())) - { - if((!SkipFirst) && Base::operator bool()) - Base::operator++(); - m_returnOne = m_containsDiag; - } - } - - EIGEN_STRONG_INLINE InnerIterator& operator++() - { - if(HasUnitDiag && m_returnOne) - m_returnOne = false; - else - { - Base::operator++(); - if(HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index()>=Base::outer())) - { - if((!SkipFirst) && Base::operator bool()) - Base::operator++(); - m_returnOne = m_containsDiag; - } - } - return *this; - } - - EIGEN_STRONG_INLINE operator bool() const - { - if(HasUnitDiag && m_returnOne) - return true; - if(SkipFirst) return Base::operator bool(); - else - { - if (SkipDiag) return (Base::operator bool() && this->index() < this->outer()); - else return (Base::operator bool() && this->index() <= this->outer()); - } - } - -// inline Index row() const { return (ArgType::Flags&RowMajorBit ? Base::outer() : this->index()); } -// inline Index col() const { return (ArgType::Flags&RowMajorBit ? this->index() : Base::outer()); } - inline StorageIndex index() const - { - if(HasUnitDiag && m_returnOne) return internal::convert_index(Base::outer()); - else return Base::index(); - } - inline Scalar value() const - { - if(HasUnitDiag && m_returnOne) return Scalar(1); - else return Base::value(); - } - - protected: - bool m_returnOne; - bool m_containsDiag; - private: - Scalar& valueRef(); - }; - -protected: - evaluator m_argImpl; - const ArgType& m_arg; -}; - -} // end namespace internal - -template -template -inline const TriangularView -SparseMatrixBase::triangularView() const -{ - return TriangularView(derived()); -} - -} // end namespace Eigen - -#endif // EIGEN_SPARSE_TRIANGULARVIEW_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseUtil.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseUtil.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseUtil.h +++ /dev/null @@ -1,178 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSEUTIL_H -#define EIGEN_SPARSEUTIL_H - -namespace Eigen { - -#ifdef NDEBUG -#define EIGEN_DBG_SPARSE(X) -#else -#define EIGEN_DBG_SPARSE(X) X -#endif - -#define EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, Op) \ -template \ -EIGEN_STRONG_INLINE Derived& operator Op(const Eigen::SparseMatrixBase& other) \ -{ \ - return Base::operator Op(other.derived()); \ -} \ -EIGEN_STRONG_INLINE Derived& operator Op(const Derived& other) \ -{ \ - return Base::operator Op(other); \ -} - -#define EIGEN_SPARSE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \ -template \ -EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \ -{ \ - return Base::operator Op(scalar); \ -} - -#define EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATORS(Derived) \ -EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, =) - - -#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) \ - EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) - - -const int CoherentAccessPattern = 0x1; -const int InnerRandomAccessPattern = 0x2 | CoherentAccessPattern; -const int OuterRandomAccessPattern = 0x4 | CoherentAccessPattern; -const int RandomAccessPattern = 0x8 | OuterRandomAccessPattern | InnerRandomAccessPattern; - -template class SparseMatrix; -template class DynamicSparseMatrix; -template class SparseVector; -template class MappedSparseMatrix; - -template class SparseSelfAdjointView; -template class SparseDiagonalProduct; -template class SparseView; - -template class SparseSparseProduct; -template class SparseTimeDenseProduct; -template class DenseTimeSparseProduct; -template class SparseDenseOuterProduct; - -template struct SparseSparseProductReturnType; -template::ColsAtCompileTime,internal::traits::RowsAtCompileTime)> struct DenseSparseProductReturnType; - -template::ColsAtCompileTime,internal::traits::RowsAtCompileTime)> struct SparseDenseProductReturnType; -template class SparseSymmetricPermutationProduct; - -namespace internal { - -template struct sparse_eval; - -template struct eval - : sparse_eval::RowsAtCompileTime,traits::ColsAtCompileTime,traits::Flags> -{}; - -template struct sparse_eval { - typedef typename traits::Scalar _Scalar; - typedef typename traits::StorageIndex _StorageIndex; - public: - typedef SparseVector<_Scalar, RowMajor, _StorageIndex> type; -}; - -template struct sparse_eval { - typedef typename traits::Scalar _Scalar; - typedef typename traits::StorageIndex _StorageIndex; - public: - typedef SparseVector<_Scalar, ColMajor, _StorageIndex> type; -}; - -// TODO this seems almost identical to plain_matrix_type -template struct sparse_eval { - typedef typename traits::Scalar _Scalar; - typedef typename traits::StorageIndex _StorageIndex; - enum { _Options = ((Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor }; - public: - typedef SparseMatrix<_Scalar, _Options, _StorageIndex> type; -}; - -template struct sparse_eval { - typedef typename traits::Scalar _Scalar; - public: - typedef Matrix<_Scalar, 1, 1> type; -}; - -template struct plain_matrix_type -{ - typedef typename traits::Scalar _Scalar; - typedef typename traits::StorageIndex _StorageIndex; - enum { _Options = ((evaluator::Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor }; - public: - typedef SparseMatrix<_Scalar, _Options, _StorageIndex> type; -}; - -template -struct plain_object_eval - : sparse_eval::RowsAtCompileTime,traits::ColsAtCompileTime, evaluator::Flags> -{}; - -template -struct solve_traits -{ - typedef typename sparse_eval::Flags>::type PlainObject; -}; - -template -struct generic_xpr_base -{ - typedef SparseMatrixBase type; -}; - -struct SparseTriangularShape { static std::string debugName() { return "SparseTriangularShape"; } }; -struct SparseSelfAdjointShape { static std::string debugName() { return "SparseSelfAdjointShape"; } }; - -template<> struct glue_shapes { typedef SparseSelfAdjointShape type; }; -template<> struct glue_shapes { typedef SparseTriangularShape type; }; - -} // end namespace internal - -/** \ingroup SparseCore_Module - * - * \class Triplet - * - * \brief A small structure to hold a non zero as a triplet (i,j,value). - * - * \sa SparseMatrix::setFromTriplets() - */ -template::StorageIndex > -class Triplet -{ -public: - Triplet() : m_row(0), m_col(0), m_value(0) {} - - Triplet(const StorageIndex& i, const StorageIndex& j, const Scalar& v = Scalar(0)) - : m_row(i), m_col(j), m_value(v) - {} - - /** \returns the row index of the element */ - const StorageIndex& row() const { return m_row; } - - /** \returns the column index of the element */ - const StorageIndex& col() const { return m_col; } - - /** \returns the value of the element */ - const Scalar& value() const { return m_value; } -protected: - StorageIndex m_row, m_col; - Scalar m_value; -}; - -} // end namespace Eigen - -#endif // EIGEN_SPARSEUTIL_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseVector.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseVector.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseVector.h +++ /dev/null @@ -1,478 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2015 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSEVECTOR_H -#define EIGEN_SPARSEVECTOR_H - -namespace Eigen { - -/** \ingroup SparseCore_Module - * \class SparseVector - * - * \brief a sparse vector class - * - * \tparam _Scalar the scalar type, i.e. the type of the coefficients - * - * See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme. - * - * This class can be extended with the help of the plugin mechanism described on the page - * \ref TopicCustomizing_Plugins by defining the preprocessor symbol \c EIGEN_SPARSEVECTOR_PLUGIN. - */ - -namespace internal { -template -struct traits > -{ - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; - typedef Sparse StorageKind; - typedef MatrixXpr XprKind; - enum { - IsColVector = (_Options & RowMajorBit) ? 0 : 1, - - RowsAtCompileTime = IsColVector ? Dynamic : 1, - ColsAtCompileTime = IsColVector ? 1 : Dynamic, - MaxRowsAtCompileTime = RowsAtCompileTime, - MaxColsAtCompileTime = ColsAtCompileTime, - Flags = _Options | NestByRefBit | LvalueBit | (IsColVector ? 0 : RowMajorBit) | CompressedAccessBit, - SupportedAccessPatterns = InnerRandomAccessPattern - }; -}; - -// Sparse-Vector-Assignment kinds: -enum { - SVA_RuntimeSwitch, - SVA_Inner, - SVA_Outer -}; - -template< typename Dest, typename Src, - int AssignmentKind = !bool(Src::IsVectorAtCompileTime) ? SVA_RuntimeSwitch - : Src::InnerSizeAtCompileTime==1 ? SVA_Outer - : SVA_Inner> -struct sparse_vector_assign_selector; - -} - -template -class SparseVector - : public SparseCompressedBase > -{ - typedef SparseCompressedBase Base; - using Base::convert_index; - public: - EIGEN_SPARSE_PUBLIC_INTERFACE(SparseVector) - EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(SparseVector, +=) - EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(SparseVector, -=) - - typedef internal::CompressedStorage Storage; - enum { IsColVector = internal::traits::IsColVector }; - - enum { - Options = _Options - }; - - EIGEN_STRONG_INLINE Index rows() const { return IsColVector ? m_size : 1; } - EIGEN_STRONG_INLINE Index cols() const { return IsColVector ? 1 : m_size; } - EIGEN_STRONG_INLINE Index innerSize() const { return m_size; } - EIGEN_STRONG_INLINE Index outerSize() const { return 1; } - - EIGEN_STRONG_INLINE const Scalar* valuePtr() const { return m_data.valuePtr(); } - EIGEN_STRONG_INLINE Scalar* valuePtr() { return m_data.valuePtr(); } - - EIGEN_STRONG_INLINE const StorageIndex* innerIndexPtr() const { return m_data.indexPtr(); } - EIGEN_STRONG_INLINE StorageIndex* innerIndexPtr() { return m_data.indexPtr(); } - - inline const StorageIndex* outerIndexPtr() const { return 0; } - inline StorageIndex* outerIndexPtr() { return 0; } - inline const StorageIndex* innerNonZeroPtr() const { return 0; } - inline StorageIndex* innerNonZeroPtr() { return 0; } - - /** \internal */ - inline Storage& data() { return m_data; } - /** \internal */ - inline const Storage& data() const { return m_data; } - - inline Scalar coeff(Index row, Index col) const - { - eigen_assert(IsColVector ? (col==0 && row>=0 && row=0 && col=0 && i=0 && row=0 && col=0 && i=0 && row=0 && col=0 && i= startId) && (m_data.index(p) > i) ) - { - m_data.index(p+1) = m_data.index(p); - m_data.value(p+1) = m_data.value(p); - --p; - } - m_data.index(p+1) = convert_index(i); - m_data.value(p+1) = 0; - return m_data.value(p+1); - } - - /** - */ - inline void reserve(Index reserveSize) { m_data.reserve(reserveSize); } - - - inline void finalize() {} - - /** \copydoc SparseMatrix::prune(const Scalar&,const RealScalar&) */ - void prune(const Scalar& reference, const RealScalar& epsilon = NumTraits::dummy_precision()) - { - m_data.prune(reference,epsilon); - } - - /** Resizes the sparse vector to \a rows x \a cols - * - * This method is provided for compatibility with matrices. - * For a column vector, \a cols must be equal to 1. - * For a row vector, \a rows must be equal to 1. - * - * \sa resize(Index) - */ - void resize(Index rows, Index cols) - { - eigen_assert((IsColVector ? cols : rows)==1 && "Outer dimension must equal 1"); - resize(IsColVector ? rows : cols); - } - - /** Resizes the sparse vector to \a newSize - * This method deletes all entries, thus leaving an empty sparse vector - * - * \sa conservativeResize(), setZero() */ - void resize(Index newSize) - { - m_size = newSize; - m_data.clear(); - } - - /** Resizes the sparse vector to \a newSize, while leaving old values untouched. - * - * If the size of the vector is decreased, then the storage of the out-of bounds coefficients is kept and reserved. - * Call .data().squeeze() to free extra memory. - * - * \sa reserve(), setZero() - */ - void conservativeResize(Index newSize) - { - if (newSize < m_size) - { - Index i = 0; - while (i - inline SparseVector(const SparseMatrixBase& other) - : m_size(0) - { - #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN - EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN - #endif - check_template_parameters(); - *this = other.derived(); - } - - inline SparseVector(const SparseVector& other) - : Base(other), m_size(0) - { - check_template_parameters(); - *this = other.derived(); - } - - /** Swaps the values of \c *this and \a other. - * Overloaded for performance: this version performs a \em shallow swap by swaping pointers and attributes only. - * \sa SparseMatrixBase::swap() - */ - inline void swap(SparseVector& other) - { - std::swap(m_size, other.m_size); - m_data.swap(other.m_data); - } - - template - inline void swap(SparseMatrix& other) - { - eigen_assert(other.outerSize()==1); - std::swap(m_size, other.m_innerSize); - m_data.swap(other.m_data); - } - - inline SparseVector& operator=(const SparseVector& other) - { - if (other.isRValue()) - { - swap(other.const_cast_derived()); - } - else - { - resize(other.size()); - m_data = other.m_data; - } - return *this; - } - - template - inline SparseVector& operator=(const SparseMatrixBase& other) - { - SparseVector tmp(other.size()); - internal::sparse_vector_assign_selector::run(tmp,other.derived()); - this->swap(tmp); - return *this; - } - - #ifndef EIGEN_PARSED_BY_DOXYGEN - template - inline SparseVector& operator=(const SparseSparseProduct& product) - { - return Base::operator=(product); - } - #endif - - friend std::ostream & operator << (std::ostream & s, const SparseVector& m) - { - for (Index i=0; i::IsSigned,THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE); - EIGEN_STATIC_ASSERT((_Options&(ColMajor|RowMajor))==Options,INVALID_MATRIX_TEMPLATE_PARAMETERS); - } - - Storage m_data; - Index m_size; -}; - -namespace internal { - -template -struct evaluator > - : evaluator_base > -{ - typedef SparseVector<_Scalar,_Options,_Index> SparseVectorType; - typedef evaluator_base Base; - typedef typename SparseVectorType::InnerIterator InnerIterator; - typedef typename SparseVectorType::ReverseInnerIterator ReverseInnerIterator; - - enum { - CoeffReadCost = NumTraits<_Scalar>::ReadCost, - Flags = SparseVectorType::Flags - }; - - evaluator() : Base() {} - - explicit evaluator(const SparseVectorType &mat) : m_matrix(&mat) - { - EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost); - } - - inline Index nonZerosEstimate() const { - return m_matrix->nonZeros(); - } - - operator SparseVectorType&() { return m_matrix->const_cast_derived(); } - operator const SparseVectorType&() const { return *m_matrix; } - - const SparseVectorType *m_matrix; -}; - -template< typename Dest, typename Src> -struct sparse_vector_assign_selector { - static void run(Dest& dst, const Src& src) { - eigen_internal_assert(src.innerSize()==src.size()); - typedef internal::evaluator SrcEvaluatorType; - SrcEvaluatorType srcEval(src); - for(typename SrcEvaluatorType::InnerIterator it(srcEval, 0); it; ++it) - dst.insert(it.index()) = it.value(); - } -}; - -template< typename Dest, typename Src> -struct sparse_vector_assign_selector { - static void run(Dest& dst, const Src& src) { - eigen_internal_assert(src.outerSize()==src.size()); - typedef internal::evaluator SrcEvaluatorType; - SrcEvaluatorType srcEval(src); - for(Index i=0; i -struct sparse_vector_assign_selector { - static void run(Dest& dst, const Src& src) { - if(src.outerSize()==1) sparse_vector_assign_selector::run(dst, src); - else sparse_vector_assign_selector::run(dst, src); - } -}; - -} - -} // end namespace Eigen - -#endif // EIGEN_SPARSEVECTOR_H diff --git a/include/Rivet/Math/eigen3/src/SparseCore/SparseView.h b/include/Rivet/Math/eigen3/src/SparseCore/SparseView.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/SparseView.h +++ /dev/null @@ -1,253 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2011-2014 Gael Guennebaud -// Copyright (C) 2010 Daniel Lowengrub -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSEVIEW_H -#define EIGEN_SPARSEVIEW_H - -namespace Eigen { - -namespace internal { - -template -struct traits > : traits -{ - typedef typename MatrixType::StorageIndex StorageIndex; - typedef Sparse StorageKind; - enum { - Flags = int(traits::Flags) & (RowMajorBit) - }; -}; - -} // end namespace internal - -/** \ingroup SparseCore_Module - * \class SparseView - * - * \brief Expression of a dense or sparse matrix with zero or too small values removed - * - * \tparam MatrixType the type of the object of which we are removing the small entries - * - * This class represents an expression of a given dense or sparse matrix with - * entries smaller than \c reference * \c epsilon are removed. - * It is the return type of MatrixBase::sparseView() and SparseMatrixBase::pruned() - * and most of the time this is the only way it is used. - * - * \sa MatrixBase::sparseView(), SparseMatrixBase::pruned() - */ -template -class SparseView : public SparseMatrixBase > -{ - typedef typename MatrixType::Nested MatrixTypeNested; - typedef typename internal::remove_all::type _MatrixTypeNested; - typedef SparseMatrixBase Base; -public: - EIGEN_SPARSE_PUBLIC_INTERFACE(SparseView) - typedef typename internal::remove_all::type NestedExpression; - - explicit SparseView(const MatrixType& mat, const Scalar& reference = Scalar(0), - const RealScalar &epsilon = NumTraits::dummy_precision()) - : m_matrix(mat), m_reference(reference), m_epsilon(epsilon) {} - - inline Index rows() const { return m_matrix.rows(); } - inline Index cols() const { return m_matrix.cols(); } - - inline Index innerSize() const { return m_matrix.innerSize(); } - inline Index outerSize() const { return m_matrix.outerSize(); } - - /** \returns the nested expression */ - const typename internal::remove_all::type& - nestedExpression() const { return m_matrix; } - - Scalar reference() const { return m_reference; } - RealScalar epsilon() const { return m_epsilon; } - -protected: - MatrixTypeNested m_matrix; - Scalar m_reference; - RealScalar m_epsilon; -}; - -namespace internal { - -// TODO find a way to unify the two following variants -// This is tricky because implementing an inner iterator on top of an IndexBased evaluator is -// not easy because the evaluators do not expose the sizes of the underlying expression. - -template -struct unary_evaluator, IteratorBased> - : public evaluator_base > -{ - typedef typename evaluator::InnerIterator EvalIterator; - public: - typedef SparseView XprType; - - class InnerIterator : public EvalIterator - { - typedef typename XprType::Scalar Scalar; - public: - - EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& sve, Index outer) - : EvalIterator(sve.m_argImpl,outer), m_view(sve.m_view) - { - incrementToNonZero(); - } - - EIGEN_STRONG_INLINE InnerIterator& operator++() - { - EvalIterator::operator++(); - incrementToNonZero(); - return *this; - } - - using EvalIterator::value; - - protected: - const XprType &m_view; - - private: - void incrementToNonZero() - { - while((bool(*this)) && internal::isMuchSmallerThan(value(), m_view.reference(), m_view.epsilon())) - { - EvalIterator::operator++(); - } - } - }; - - enum { - CoeffReadCost = evaluator::CoeffReadCost, - Flags = XprType::Flags - }; - - explicit unary_evaluator(const XprType& xpr) : m_argImpl(xpr.nestedExpression()), m_view(xpr) {} - - protected: - evaluator m_argImpl; - const XprType &m_view; -}; - -template -struct unary_evaluator, IndexBased> - : public evaluator_base > -{ - public: - typedef SparseView XprType; - protected: - enum { IsRowMajor = (XprType::Flags&RowMajorBit)==RowMajorBit }; - typedef typename XprType::Scalar Scalar; - typedef typename XprType::StorageIndex StorageIndex; - public: - - class InnerIterator - { - public: - - EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& sve, Index outer) - : m_sve(sve), m_inner(0), m_outer(outer), m_end(sve.m_view.innerSize()) - { - incrementToNonZero(); - } - - EIGEN_STRONG_INLINE InnerIterator& operator++() - { - m_inner++; - incrementToNonZero(); - return *this; - } - - EIGEN_STRONG_INLINE Scalar value() const - { - return (IsRowMajor) ? m_sve.m_argImpl.coeff(m_outer, m_inner) - : m_sve.m_argImpl.coeff(m_inner, m_outer); - } - - EIGEN_STRONG_INLINE StorageIndex index() const { return m_inner; } - inline Index row() const { return IsRowMajor ? m_outer : index(); } - inline Index col() const { return IsRowMajor ? index() : m_outer; } - - EIGEN_STRONG_INLINE operator bool() const { return m_inner < m_end && m_inner>=0; } - - protected: - const unary_evaluator &m_sve; - Index m_inner; - const Index m_outer; - const Index m_end; - - private: - void incrementToNonZero() - { - while((bool(*this)) && internal::isMuchSmallerThan(value(), m_sve.m_view.reference(), m_sve.m_view.epsilon())) - { - m_inner++; - } - } - }; - - enum { - CoeffReadCost = evaluator::CoeffReadCost, - Flags = XprType::Flags - }; - - explicit unary_evaluator(const XprType& xpr) : m_argImpl(xpr.nestedExpression()), m_view(xpr) {} - - protected: - evaluator m_argImpl; - const XprType &m_view; -}; - -} // end namespace internal - -/** \ingroup SparseCore_Module - * - * \returns a sparse expression of the dense expression \c *this with values smaller than - * \a reference * \a epsilon removed. - * - * This method is typically used when prototyping to convert a quickly assembled dense Matrix \c D to a SparseMatrix \c S: - * \code - * MatrixXd D(n,m); - * SparseMatrix S; - * S = D.sparseView(); // suppress numerical zeros (exact) - * S = D.sparseView(reference); - * S = D.sparseView(reference,epsilon); - * \endcode - * where \a reference is a meaningful non zero reference value, - * and \a epsilon is a tolerance factor defaulting to NumTraits::dummy_precision(). - * - * \sa SparseMatrixBase::pruned(), class SparseView */ -template -const SparseView MatrixBase::sparseView(const Scalar& reference, - const typename NumTraits::Real& epsilon) const -{ - return SparseView(derived(), reference, epsilon); -} - -/** \returns an expression of \c *this with values smaller than - * \a reference * \a epsilon removed. - * - * This method is typically used in conjunction with the product of two sparse matrices - * to automatically prune the smallest values as follows: - * \code - * C = (A*B).pruned(); // suppress numerical zeros (exact) - * C = (A*B).pruned(ref); - * C = (A*B).pruned(ref,epsilon); - * \endcode - * where \c ref is a meaningful non zero reference value. - * */ -template -const SparseView -SparseMatrixBase::pruned(const Scalar& reference, - const RealScalar& epsilon) const -{ - return SparseView(derived(), reference, epsilon); -} - -} // end namespace Eigen - -#endif diff --git a/include/Rivet/Math/eigen3/src/SparseCore/TriangularSolver.h b/include/Rivet/Math/eigen3/src/SparseCore/TriangularSolver.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseCore/TriangularSolver.h +++ /dev/null @@ -1,315 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSETRIANGULARSOLVER_H -#define EIGEN_SPARSETRIANGULARSOLVER_H - -namespace Eigen { - -namespace internal { - -template::Flags) & RowMajorBit> -struct sparse_solve_triangular_selector; - -// forward substitution, row-major -template -struct sparse_solve_triangular_selector -{ - typedef typename Rhs::Scalar Scalar; - typedef evaluator LhsEval; - typedef typename evaluator::InnerIterator LhsIterator; - static void run(const Lhs& lhs, Rhs& other) - { - LhsEval lhsEval(lhs); - for(Index col=0 ; col -struct sparse_solve_triangular_selector -{ - typedef typename Rhs::Scalar Scalar; - typedef evaluator LhsEval; - typedef typename evaluator::InnerIterator LhsIterator; - static void run(const Lhs& lhs, Rhs& other) - { - LhsEval lhsEval(lhs); - for(Index col=0 ; col=0 ; --i) - { - Scalar tmp = other.coeff(i,col); - Scalar l_ii(0); - LhsIterator it(lhsEval, i); - while(it && it.index() -struct sparse_solve_triangular_selector -{ - typedef typename Rhs::Scalar Scalar; - typedef evaluator LhsEval; - typedef typename evaluator::InnerIterator LhsIterator; - static void run(const Lhs& lhs, Rhs& other) - { - LhsEval lhsEval(lhs); - for(Index col=0 ; col -struct sparse_solve_triangular_selector -{ - typedef typename Rhs::Scalar Scalar; - typedef evaluator LhsEval; - typedef typename evaluator::InnerIterator LhsIterator; - static void run(const Lhs& lhs, Rhs& other) - { - LhsEval lhsEval(lhs); - for(Index col=0 ; col=0; --i) - { - Scalar& tmp = other.coeffRef(i,col); - if (tmp!=Scalar(0)) // optimization when other is actually sparse - { - if(!(Mode & UnitDiag)) - { - // TODO replace this by a binary search. make sure the binary search is safe for partially sorted elements - LhsIterator it(lhsEval, i); - while(it && it.index()!=i) - ++it; - eigen_assert(it && it.index()==i); - other.coeffRef(i,col) /= it.value(); - } - LhsIterator it(lhsEval, i); - for(; it && it.index() -template -void TriangularViewImpl::solveInPlace(MatrixBase& other) const -{ - eigen_assert(derived().cols() == derived().rows() && derived().cols() == other.rows()); - eigen_assert((!(Mode & ZeroDiag)) && bool(Mode & (Upper|Lower))); - - enum { copy = internal::traits::Flags & RowMajorBit }; - - typedef typename internal::conditional::type, OtherDerived&>::type OtherCopy; - OtherCopy otherCopy(other.derived()); - - internal::sparse_solve_triangular_selector::type, Mode>::run(derived().nestedExpression(), otherCopy); - - if (copy) - other = otherCopy; -} -#endif - -// pure sparse path - -namespace internal { - -template -struct sparse_solve_triangular_sparse_selector; - -// forward substitution, col-major -template -struct sparse_solve_triangular_sparse_selector -{ - typedef typename Rhs::Scalar Scalar; - typedef typename promote_index_type::StorageIndex, - typename traits::StorageIndex>::type StorageIndex; - static void run(const Lhs& lhs, Rhs& other) - { - const bool IsLower = (UpLo==Lower); - AmbiVector tempVector(other.rows()*2); - tempVector.setBounds(0,other.rows()); - - Rhs res(other.rows(), other.cols()); - res.reserve(other.nonZeros()); - - for(Index col=0 ; col=0; - i+=IsLower?1:-1) - { - tempVector.restart(); - Scalar& ci = tempVector.coeffRef(i); - if (ci!=Scalar(0)) - { - // find - typename Lhs::InnerIterator it(lhs, i); - if(!(Mode & UnitDiag)) - { - if (IsLower) - { - eigen_assert(it.index()==i); - ci /= it.value(); - } - else - ci /= lhs.coeff(i,i); - } - tempVector.restart(); - if (IsLower) - { - if (it.index()==i) - ++it; - for(; it; ++it) - tempVector.coeffRef(it.index()) -= ci * it.value(); - } - else - { - for(; it && it.index()::Iterator it(tempVector/*,1e-12*/); it; ++it) - { - ++ count; -// std::cerr << "fill " << it.index() << ", " << col << "\n"; -// std::cout << it.value() << " "; - // FIXME use insertBack - res.insert(it.index(), col) = it.value(); - } -// std::cout << "tempVector.nonZeros() == " << int(count) << " / " << (other.rows()) << "\n"; - } - res.finalize(); - other = res.markAsRValue(); - } -}; - -} // end namespace internal - -#ifndef EIGEN_PARSED_BY_DOXYGEN -template -template -void TriangularViewImpl::solveInPlace(SparseMatrixBase& other) const -{ - eigen_assert(derived().cols() == derived().rows() && derived().cols() == other.rows()); - eigen_assert( (!(Mode & ZeroDiag)) && bool(Mode & (Upper|Lower))); - -// enum { copy = internal::traits::Flags & RowMajorBit }; - -// typedef typename internal::conditional::type, OtherDerived&>::type OtherCopy; -// OtherCopy otherCopy(other.derived()); - - internal::sparse_solve_triangular_sparse_selector::run(derived().nestedExpression(), other.derived()); - -// if (copy) -// other = otherCopy; -} -#endif - -} // end namespace Eigen - -#endif // EIGEN_SPARSETRIANGULARSOLVER_H diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU.h +++ /dev/null @@ -1,775 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// Copyright (C) 2012-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - - -#ifndef EIGEN_SPARSE_LU_H -#define EIGEN_SPARSE_LU_H - -namespace Eigen { - -template > class SparseLU; -template struct SparseLUMatrixLReturnType; -template struct SparseLUMatrixUReturnType; - -/** \ingroup SparseLU_Module - * \class SparseLU - * - * \brief Sparse supernodal LU factorization for general matrices - * - * This class implements the supernodal LU factorization for general matrices. - * It uses the main techniques from the sequential SuperLU package - * (http://crd-legacy.lbl.gov/~xiaoye/SuperLU/). It handles transparently real - * and complex arithmetics with single and double precision, depending on the - * scalar type of your input matrix. - * The code has been optimized to provide BLAS-3 operations during supernode-panel updates. - * It benefits directly from the built-in high-performant Eigen BLAS routines. - * Moreover, when the size of a supernode is very small, the BLAS calls are avoided to - * enable a better optimization from the compiler. For best performance, - * you should compile it with NDEBUG flag to avoid the numerous bounds checking on vectors. - * - * An important parameter of this class is the ordering method. It is used to reorder the columns - * (and eventually the rows) of the matrix to reduce the number of new elements that are created during - * numerical factorization. The cheapest method available is COLAMD. - * See \link OrderingMethods_Module the OrderingMethods module \endlink for the list of - * built-in and external ordering methods. - * - * Simple example with key steps - * \code - * VectorXd x(n), b(n); - * SparseMatrix A; - * SparseLU, COLAMDOrdering > solver; - * // fill A and b; - * // Compute the ordering permutation vector from the structural pattern of A - * solver.analyzePattern(A); - * // Compute the numerical factorization - * solver.factorize(A); - * //Use the factors to solve the linear system - * x = solver.solve(b); - * \endcode - * - * \warning The input matrix A should be in a \b compressed and \b column-major form. - * Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix. - * - * \note Unlike the initial SuperLU implementation, there is no step to equilibrate the matrix. - * For badly scaled matrices, this step can be useful to reduce the pivoting during factorization. - * If this is the case for your matrices, you can try the basic scaling method at - * "unsupported/Eigen/src/IterativeSolvers/Scaling.h" - * - * \tparam _MatrixType The type of the sparse matrix. It must be a column-major SparseMatrix<> - * \tparam _OrderingType The ordering method to use, either AMD, COLAMD or METIS. Default is COLMAD - * - * \implsparsesolverconcept - * - * \sa \ref TutorialSparseSolverConcept - * \sa \ref OrderingMethods_Module - */ -template -class SparseLU : public SparseSolverBase >, public internal::SparseLUImpl -{ - protected: - typedef SparseSolverBase > APIBase; - using APIBase::m_isInitialized; - public: - using APIBase::_solve_impl; - - typedef _MatrixType MatrixType; - typedef _OrderingType OrderingType; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef SparseMatrix NCMatrix; - typedef internal::MappedSuperNodalMatrix SCMatrix; - typedef Matrix ScalarVector; - typedef Matrix IndexVector; - typedef PermutationMatrix PermutationType; - typedef internal::SparseLUImpl Base; - - enum { - ColsAtCompileTime = MatrixType::ColsAtCompileTime, - MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime - }; - - public: - SparseLU():m_lastError(""),m_Ustore(0,0,0,0,0,0),m_symmetricmode(false),m_diagpivotthresh(1.0),m_detPermR(1) - { - initperfvalues(); - } - explicit SparseLU(const MatrixType& matrix) - : m_lastError(""),m_Ustore(0,0,0,0,0,0),m_symmetricmode(false),m_diagpivotthresh(1.0),m_detPermR(1) - { - initperfvalues(); - compute(matrix); - } - - ~SparseLU() - { - // Free all explicit dynamic pointers - } - - void analyzePattern (const MatrixType& matrix); - void factorize (const MatrixType& matrix); - void simplicialfactorize(const MatrixType& matrix); - - /** - * Compute the symbolic and numeric factorization of the input sparse matrix. - * The input matrix should be in column-major storage. - */ - void compute (const MatrixType& matrix) - { - // Analyze - analyzePattern(matrix); - //Factorize - factorize(matrix); - } - - inline Index rows() const { return m_mat.rows(); } - inline Index cols() const { return m_mat.cols(); } - /** Indicate that the pattern of the input matrix is symmetric */ - void isSymmetric(bool sym) - { - m_symmetricmode = sym; - } - - /** \returns an expression of the matrix L, internally stored as supernodes - * The only operation available with this expression is the triangular solve - * \code - * y = b; matrixL().solveInPlace(y); - * \endcode - */ - SparseLUMatrixLReturnType matrixL() const - { - return SparseLUMatrixLReturnType(m_Lstore); - } - /** \returns an expression of the matrix U, - * The only operation available with this expression is the triangular solve - * \code - * y = b; matrixU().solveInPlace(y); - * \endcode - */ - SparseLUMatrixUReturnType > matrixU() const - { - return SparseLUMatrixUReturnType >(m_Lstore, m_Ustore); - } - - /** - * \returns a reference to the row matrix permutation \f$ P_r \f$ such that \f$P_r A P_c^T = L U\f$ - * \sa colsPermutation() - */ - inline const PermutationType& rowsPermutation() const - { - return m_perm_r; - } - /** - * \returns a reference to the column matrix permutation\f$ P_c^T \f$ such that \f$P_r A P_c^T = L U\f$ - * \sa rowsPermutation() - */ - inline const PermutationType& colsPermutation() const - { - return m_perm_c; - } - /** Set the threshold used for a diagonal entry to be an acceptable pivot. */ - void setPivotThreshold(const RealScalar& thresh) - { - m_diagpivotthresh = thresh; - } - -#ifdef EIGEN_PARSED_BY_DOXYGEN - /** \returns the solution X of \f$ A X = B \f$ using the current decomposition of A. - * - * \warning the destination matrix X in X = this->solve(B) must be colmun-major. - * - * \sa compute() - */ - template - inline const Solve solve(const MatrixBase& B) const; -#endif // EIGEN_PARSED_BY_DOXYGEN - - /** \brief Reports whether previous computation was successful. - * - * \returns \c Success if computation was succesful, - * \c NumericalIssue if the LU factorization reports a problem, zero diagonal for instance - * \c InvalidInput if the input matrix is invalid - * - * \sa iparm() - */ - ComputationInfo info() const - { - eigen_assert(m_isInitialized && "Decomposition is not initialized."); - return m_info; - } - - /** - * \returns A string describing the type of error - */ - std::string lastErrorMessage() const - { - return m_lastError; - } - - template - bool _solve_impl(const MatrixBase &B, MatrixBase &X_base) const - { - Dest& X(X_base.derived()); - eigen_assert(m_factorizationIsOk && "The matrix should be factorized first"); - EIGEN_STATIC_ASSERT((Dest::Flags&RowMajorBit)==0, - THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES); - - // Permute the right hand side to form X = Pr*B - // on return, X is overwritten by the computed solution - X.resize(B.rows(),B.cols()); - - // this ugly const_cast_derived() helps to detect aliasing when applying the permutations - for(Index j = 0; j < B.cols(); ++j) - X.col(j) = rowsPermutation() * B.const_cast_derived().col(j); - - //Forward substitution with L - this->matrixL().solveInPlace(X); - this->matrixU().solveInPlace(X); - - // Permute back the solution - for (Index j = 0; j < B.cols(); ++j) - X.col(j) = colsPermutation().inverse() * X.col(j); - - return true; - } - - /** - * \returns the absolute value of the determinant of the matrix of which - * *this is the QR decomposition. - * - * \warning a determinant can be very big or small, so for matrices - * of large enough dimension, there is a risk of overflow/underflow. - * One way to work around that is to use logAbsDeterminant() instead. - * - * \sa logAbsDeterminant(), signDeterminant() - */ - Scalar absDeterminant() - { - using std::abs; - eigen_assert(m_factorizationIsOk && "The matrix should be factorized first."); - // Initialize with the determinant of the row matrix - Scalar det = Scalar(1.); - // Note that the diagonal blocks of U are stored in supernodes, - // which are available in the L part :) - for (Index j = 0; j < this->cols(); ++j) - { - for (typename SCMatrix::InnerIterator it(m_Lstore, j); it; ++it) - { - if(it.index() == j) - { - det *= abs(it.value()); - break; - } - } - } - return det; - } - - /** \returns the natural log of the absolute value of the determinant of the matrix - * of which **this is the QR decomposition - * - * \note This method is useful to work around the risk of overflow/underflow that's - * inherent to the determinant computation. - * - * \sa absDeterminant(), signDeterminant() - */ - Scalar logAbsDeterminant() const - { - using std::log; - using std::abs; - - eigen_assert(m_factorizationIsOk && "The matrix should be factorized first."); - Scalar det = Scalar(0.); - for (Index j = 0; j < this->cols(); ++j) - { - for (typename SCMatrix::InnerIterator it(m_Lstore, j); it; ++it) - { - if(it.row() < j) continue; - if(it.row() == j) - { - det += log(abs(it.value())); - break; - } - } - } - return det; - } - - /** \returns A number representing the sign of the determinant - * - * \sa absDeterminant(), logAbsDeterminant() - */ - Scalar signDeterminant() - { - eigen_assert(m_factorizationIsOk && "The matrix should be factorized first."); - // Initialize with the determinant of the row matrix - Index det = 1; - // Note that the diagonal blocks of U are stored in supernodes, - // which are available in the L part :) - for (Index j = 0; j < this->cols(); ++j) - { - for (typename SCMatrix::InnerIterator it(m_Lstore, j); it; ++it) - { - if(it.index() == j) - { - if(it.value()<0) - det = -det; - else if(it.value()==0) - return 0; - break; - } - } - } - return det * m_detPermR * m_detPermC; - } - - /** \returns The determinant of the matrix. - * - * \sa absDeterminant(), logAbsDeterminant() - */ - Scalar determinant() - { - eigen_assert(m_factorizationIsOk && "The matrix should be factorized first."); - // Initialize with the determinant of the row matrix - Scalar det = Scalar(1.); - // Note that the diagonal blocks of U are stored in supernodes, - // which are available in the L part :) - for (Index j = 0; j < this->cols(); ++j) - { - for (typename SCMatrix::InnerIterator it(m_Lstore, j); it; ++it) - { - if(it.index() == j) - { - det *= it.value(); - break; - } - } - } - return (m_detPermR * m_detPermC) > 0 ? det : -det; - } - - protected: - // Functions - void initperfvalues() - { - m_perfv.panel_size = 16; - m_perfv.relax = 1; - m_perfv.maxsuper = 128; - m_perfv.rowblk = 16; - m_perfv.colblk = 8; - m_perfv.fillfactor = 20; - } - - // Variables - mutable ComputationInfo m_info; - bool m_factorizationIsOk; - bool m_analysisIsOk; - std::string m_lastError; - NCMatrix m_mat; // The input (permuted ) matrix - SCMatrix m_Lstore; // The lower triangular matrix (supernodal) - MappedSparseMatrix m_Ustore; // The upper triangular matrix - PermutationType m_perm_c; // Column permutation - PermutationType m_perm_r ; // Row permutation - IndexVector m_etree; // Column elimination tree - - typename Base::GlobalLU_t m_glu; - - // SparseLU options - bool m_symmetricmode; - // values for performance - internal::perfvalues m_perfv; - RealScalar m_diagpivotthresh; // Specifies the threshold used for a diagonal entry to be an acceptable pivot - Index m_nnzL, m_nnzU; // Nonzeros in L and U factors - Index m_detPermR, m_detPermC; // Determinants of the permutation matrices - private: - // Disable copy constructor - SparseLU (const SparseLU& ); - -}; // End class SparseLU - - - -// Functions needed by the anaysis phase -/** - * Compute the column permutation to minimize the fill-in - * - * - Apply this permutation to the input matrix - - * - * - Compute the column elimination tree on the permuted matrix - * - * - Postorder the elimination tree and the column permutation - * - */ -template -void SparseLU::analyzePattern(const MatrixType& mat) -{ - - //TODO It is possible as in SuperLU to compute row and columns scaling vectors to equilibrate the matrix mat. - - // Firstly, copy the whole input matrix. - m_mat = mat; - - // Compute fill-in ordering - OrderingType ord; - ord(m_mat,m_perm_c); - - // Apply the permutation to the column of the input matrix - if (m_perm_c.size()) - { - m_mat.uncompress(); //NOTE: The effect of this command is only to create the InnerNonzeros pointers. FIXME : This vector is filled but not subsequently used. - // Then, permute only the column pointers - ei_declare_aligned_stack_constructed_variable(StorageIndex,outerIndexPtr,mat.cols()+1,mat.isCompressed()?const_cast(mat.outerIndexPtr()):0); - - // If the input matrix 'mat' is uncompressed, then the outer-indices do not match the ones of m_mat, and a copy is thus needed. - if(!mat.isCompressed()) - IndexVector::Map(outerIndexPtr, mat.cols()+1) = IndexVector::Map(m_mat.outerIndexPtr(),mat.cols()+1); - - // Apply the permutation and compute the nnz per column. - for (Index i = 0; i < mat.cols(); i++) - { - m_mat.outerIndexPtr()[m_perm_c.indices()(i)] = outerIndexPtr[i]; - m_mat.innerNonZeroPtr()[m_perm_c.indices()(i)] = outerIndexPtr[i+1] - outerIndexPtr[i]; - } - } - - // Compute the column elimination tree of the permuted matrix - IndexVector firstRowElt; - internal::coletree(m_mat, m_etree,firstRowElt); - - // In symmetric mode, do not do postorder here - if (!m_symmetricmode) { - IndexVector post, iwork; - // Post order etree - internal::treePostorder(StorageIndex(m_mat.cols()), m_etree, post); - - - // Renumber etree in postorder - Index m = m_mat.cols(); - iwork.resize(m+1); - for (Index i = 0; i < m; ++i) iwork(post(i)) = post(m_etree(i)); - m_etree = iwork; - - // Postmultiply A*Pc by post, i.e reorder the matrix according to the postorder of the etree - PermutationType post_perm(m); - for (Index i = 0; i < m; i++) - post_perm.indices()(i) = post(i); - - // Combine the two permutations : postorder the permutation for future use - if(m_perm_c.size()) { - m_perm_c = post_perm * m_perm_c; - } - - } // end postordering - - m_analysisIsOk = true; -} - -// Functions needed by the numerical factorization phase - - -/** - * - Numerical factorization - * - Interleaved with the symbolic factorization - * On exit, info is - * - * = 0: successful factorization - * - * > 0: if info = i, and i is - * - * <= A->ncol: U(i,i) is exactly zero. The factorization has - * been completed, but the factor U is exactly singular, - * and division by zero will occur if it is used to solve a - * system of equations. - * - * > A->ncol: number of bytes allocated when memory allocation - * failure occurred, plus A->ncol. If lwork = -1, it is - * the estimated amount of space needed, plus A->ncol. - */ -template -void SparseLU::factorize(const MatrixType& matrix) -{ - using internal::emptyIdxLU; - eigen_assert(m_analysisIsOk && "analyzePattern() should be called first"); - eigen_assert((matrix.rows() == matrix.cols()) && "Only for squared matrices"); - - typedef typename IndexVector::Scalar StorageIndex; - - m_isInitialized = true; - - - // Apply the column permutation computed in analyzepattern() - // m_mat = matrix * m_perm_c.inverse(); - m_mat = matrix; - if (m_perm_c.size()) - { - m_mat.uncompress(); //NOTE: The effect of this command is only to create the InnerNonzeros pointers. - //Then, permute only the column pointers - const StorageIndex * outerIndexPtr; - if (matrix.isCompressed()) outerIndexPtr = matrix.outerIndexPtr(); - else - { - StorageIndex* outerIndexPtr_t = new StorageIndex[matrix.cols()+1]; - for(Index i = 0; i <= matrix.cols(); i++) outerIndexPtr_t[i] = m_mat.outerIndexPtr()[i]; - outerIndexPtr = outerIndexPtr_t; - } - for (Index i = 0; i < matrix.cols(); i++) - { - m_mat.outerIndexPtr()[m_perm_c.indices()(i)] = outerIndexPtr[i]; - m_mat.innerNonZeroPtr()[m_perm_c.indices()(i)] = outerIndexPtr[i+1] - outerIndexPtr[i]; - } - if(!matrix.isCompressed()) delete[] outerIndexPtr; - } - else - { //FIXME This should not be needed if the empty permutation is handled transparently - m_perm_c.resize(matrix.cols()); - for(StorageIndex i = 0; i < matrix.cols(); ++i) m_perm_c.indices()(i) = i; - } - - Index m = m_mat.rows(); - Index n = m_mat.cols(); - Index nnz = m_mat.nonZeros(); - Index maxpanel = m_perfv.panel_size * m; - // Allocate working storage common to the factor routines - Index lwork = 0; - Index info = Base::memInit(m, n, nnz, lwork, m_perfv.fillfactor, m_perfv.panel_size, m_glu); - if (info) - { - m_lastError = "UNABLE TO ALLOCATE WORKING MEMORY\n\n" ; - m_factorizationIsOk = false; - return ; - } - - // Set up pointers for integer working arrays - IndexVector segrep(m); segrep.setZero(); - IndexVector parent(m); parent.setZero(); - IndexVector xplore(m); xplore.setZero(); - IndexVector repfnz(maxpanel); - IndexVector panel_lsub(maxpanel); - IndexVector xprune(n); xprune.setZero(); - IndexVector marker(m*internal::LUNoMarker); marker.setZero(); - - repfnz.setConstant(-1); - panel_lsub.setConstant(-1); - - // Set up pointers for scalar working arrays - ScalarVector dense; - dense.setZero(maxpanel); - ScalarVector tempv; - tempv.setZero(internal::LUnumTempV(m, m_perfv.panel_size, m_perfv.maxsuper, /*m_perfv.rowblk*/m) ); - - // Compute the inverse of perm_c - PermutationType iperm_c(m_perm_c.inverse()); - - // Identify initial relaxed snodes - IndexVector relax_end(n); - if ( m_symmetricmode == true ) - Base::heap_relax_snode(n, m_etree, m_perfv.relax, marker, relax_end); - else - Base::relax_snode(n, m_etree, m_perfv.relax, marker, relax_end); - - - m_perm_r.resize(m); - m_perm_r.indices().setConstant(-1); - marker.setConstant(-1); - m_detPermR = 1; // Record the determinant of the row permutation - - m_glu.supno(0) = emptyIdxLU; m_glu.xsup.setConstant(0); - m_glu.xsup(0) = m_glu.xlsub(0) = m_glu.xusub(0) = m_glu.xlusup(0) = Index(0); - - // Work on one 'panel' at a time. A panel is one of the following : - // (a) a relaxed supernode at the bottom of the etree, or - // (b) panel_size contiguous columns, defined by the user - Index jcol; - IndexVector panel_histo(n); - Index pivrow; // Pivotal row number in the original row matrix - Index nseg1; // Number of segments in U-column above panel row jcol - Index nseg; // Number of segments in each U-column - Index irep; - Index i, k, jj; - for (jcol = 0; jcol < n; ) - { - // Adjust panel size so that a panel won't overlap with the next relaxed snode. - Index panel_size = m_perfv.panel_size; // upper bound on panel width - for (k = jcol + 1; k < (std::min)(jcol+panel_size, n); k++) - { - if (relax_end(k) != emptyIdxLU) - { - panel_size = k - jcol; - break; - } - } - if (k == n) - panel_size = n - jcol; - - // Symbolic outer factorization on a panel of columns - Base::panel_dfs(m, panel_size, jcol, m_mat, m_perm_r.indices(), nseg1, dense, panel_lsub, segrep, repfnz, xprune, marker, parent, xplore, m_glu); - - // Numeric sup-panel updates in topological order - Base::panel_bmod(m, panel_size, jcol, nseg1, dense, tempv, segrep, repfnz, m_glu); - - // Sparse LU within the panel, and below the panel diagonal - for ( jj = jcol; jj< jcol + panel_size; jj++) - { - k = (jj - jcol) * m; // Column index for w-wide arrays - - nseg = nseg1; // begin after all the panel segments - //Depth-first-search for the current column - VectorBlock panel_lsubk(panel_lsub, k, m); - VectorBlock repfnz_k(repfnz, k, m); - info = Base::column_dfs(m, jj, m_perm_r.indices(), m_perfv.maxsuper, nseg, panel_lsubk, segrep, repfnz_k, xprune, marker, parent, xplore, m_glu); - if ( info ) - { - m_lastError = "UNABLE TO EXPAND MEMORY IN COLUMN_DFS() "; - m_info = NumericalIssue; - m_factorizationIsOk = false; - return; - } - // Numeric updates to this column - VectorBlock dense_k(dense, k, m); - VectorBlock segrep_k(segrep, nseg1, m-nseg1); - info = Base::column_bmod(jj, (nseg - nseg1), dense_k, tempv, segrep_k, repfnz_k, jcol, m_glu); - if ( info ) - { - m_lastError = "UNABLE TO EXPAND MEMORY IN COLUMN_BMOD() "; - m_info = NumericalIssue; - m_factorizationIsOk = false; - return; - } - - // Copy the U-segments to ucol(*) - info = Base::copy_to_ucol(jj, nseg, segrep, repfnz_k ,m_perm_r.indices(), dense_k, m_glu); - if ( info ) - { - m_lastError = "UNABLE TO EXPAND MEMORY IN COPY_TO_UCOL() "; - m_info = NumericalIssue; - m_factorizationIsOk = false; - return; - } - - // Form the L-segment - info = Base::pivotL(jj, m_diagpivotthresh, m_perm_r.indices(), iperm_c.indices(), pivrow, m_glu); - if ( info ) - { - m_lastError = "THE MATRIX IS STRUCTURALLY SINGULAR ... ZERO COLUMN AT "; - std::ostringstream returnInfo; - returnInfo << info; - m_lastError += returnInfo.str(); - m_info = NumericalIssue; - m_factorizationIsOk = false; - return; - } - - // Update the determinant of the row permutation matrix - // FIXME: the following test is not correct, we should probably take iperm_c into account and pivrow is not directly the row pivot. - if (pivrow != jj) m_detPermR = -m_detPermR; - - // Prune columns (0:jj-1) using column jj - Base::pruneL(jj, m_perm_r.indices(), pivrow, nseg, segrep, repfnz_k, xprune, m_glu); - - // Reset repfnz for this column - for (i = 0; i < nseg; i++) - { - irep = segrep(i); - repfnz_k(irep) = emptyIdxLU; - } - } // end SparseLU within the panel - jcol += panel_size; // Move to the next panel - } // end for -- end elimination - - m_detPermR = m_perm_r.determinant(); - m_detPermC = m_perm_c.determinant(); - - // Count the number of nonzeros in factors - Base::countnz(n, m_nnzL, m_nnzU, m_glu); - // Apply permutation to the L subscripts - Base::fixupL(n, m_perm_r.indices(), m_glu); - - // Create supernode matrix L - m_Lstore.setInfos(m, n, m_glu.lusup, m_glu.xlusup, m_glu.lsub, m_glu.xlsub, m_glu.supno, m_glu.xsup); - // Create the column major upper sparse matrix U; - new (&m_Ustore) MappedSparseMatrix ( m, n, m_nnzU, m_glu.xusub.data(), m_glu.usub.data(), m_glu.ucol.data() ); - - m_info = Success; - m_factorizationIsOk = true; -} - -template -struct SparseLUMatrixLReturnType : internal::no_assignment_operator -{ - typedef typename MappedSupernodalType::Scalar Scalar; - explicit SparseLUMatrixLReturnType(const MappedSupernodalType& mapL) : m_mapL(mapL) - { } - Index rows() { return m_mapL.rows(); } - Index cols() { return m_mapL.cols(); } - template - void solveInPlace( MatrixBase &X) const - { - m_mapL.solveInPlace(X); - } - const MappedSupernodalType& m_mapL; -}; - -template -struct SparseLUMatrixUReturnType : internal::no_assignment_operator -{ - typedef typename MatrixLType::Scalar Scalar; - SparseLUMatrixUReturnType(const MatrixLType& mapL, const MatrixUType& mapU) - : m_mapL(mapL),m_mapU(mapU) - { } - Index rows() { return m_mapL.rows(); } - Index cols() { return m_mapL.cols(); } - - template void solveInPlace(MatrixBase &X) const - { - Index nrhs = X.cols(); - Index n = X.rows(); - // Backward solve with U - for (Index k = m_mapL.nsuper(); k >= 0; k--) - { - Index fsupc = m_mapL.supToCol()[k]; - Index lda = m_mapL.colIndexPtr()[fsupc+1] - m_mapL.colIndexPtr()[fsupc]; // leading dimension - Index nsupc = m_mapL.supToCol()[k+1] - fsupc; - Index luptr = m_mapL.colIndexPtr()[fsupc]; - - if (nsupc == 1) - { - for (Index j = 0; j < nrhs; j++) - { - X(fsupc, j) /= m_mapL.valuePtr()[luptr]; - } - } - else - { - Map, 0, OuterStride<> > A( &(m_mapL.valuePtr()[luptr]), nsupc, nsupc, OuterStride<>(lda) ); - Map< Matrix, 0, OuterStride<> > U (&(X(fsupc,0)), nsupc, nrhs, OuterStride<>(n) ); - U = A.template triangularView().solve(U); - } - - for (Index j = 0; j < nrhs; ++j) - { - for (Index jcol = fsupc; jcol < fsupc + nsupc; jcol++) - { - typename MatrixUType::InnerIterator it(m_mapU, jcol); - for ( ; it; ++it) - { - Index irow = it.index(); - X(irow, j) -= X(jcol, j) * it.value(); - } - } - } - } // End For U-solve - } - const MatrixLType& m_mapL; - const MatrixUType& m_mapU; -}; - -} // End namespace Eigen - -#endif diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLUImpl.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLUImpl.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLUImpl.h +++ /dev/null @@ -1,66 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -#ifndef SPARSELU_IMPL_H -#define SPARSELU_IMPL_H - -namespace Eigen { -namespace internal { - -/** \ingroup SparseLU_Module - * \class SparseLUImpl - * Base class for sparseLU - */ -template -class SparseLUImpl -{ - public: - typedef Matrix ScalarVector; - typedef Matrix IndexVector; - typedef Matrix ScalarMatrix; - typedef Map > MappedMatrixBlock; - typedef typename ScalarVector::RealScalar RealScalar; - typedef Ref > BlockScalarVector; - typedef Ref > BlockIndexVector; - typedef LU_GlobalLU_t GlobalLU_t; - typedef SparseMatrix MatrixType; - - protected: - template - Index expand(VectorType& vec, Index& length, Index nbElts, Index keep_prev, Index& num_expansions); - Index memInit(Index m, Index n, Index annz, Index lwork, Index fillratio, Index panel_size, GlobalLU_t& glu); - template - Index memXpand(VectorType& vec, Index& maxlen, Index nbElts, MemType memtype, Index& num_expansions); - void heap_relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end); - void relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end); - Index snode_dfs(const Index jcol, const Index kcol,const MatrixType& mat, IndexVector& xprune, IndexVector& marker, GlobalLU_t& glu); - Index snode_bmod (const Index jcol, const Index fsupc, ScalarVector& dense, GlobalLU_t& glu); - Index pivotL(const Index jcol, const RealScalar& diagpivotthresh, IndexVector& perm_r, IndexVector& iperm_c, Index& pivrow, GlobalLU_t& glu); - template - void dfs_kernel(const StorageIndex jj, IndexVector& perm_r, - Index& nseg, IndexVector& panel_lsub, IndexVector& segrep, - Ref repfnz_col, IndexVector& xprune, Ref marker, IndexVector& parent, - IndexVector& xplore, GlobalLU_t& glu, Index& nextl_col, Index krow, Traits& traits); - void panel_dfs(const Index m, const Index w, const Index jcol, MatrixType& A, IndexVector& perm_r, Index& nseg, ScalarVector& dense, IndexVector& panel_lsub, IndexVector& segrep, IndexVector& repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu); - - void panel_bmod(const Index m, const Index w, const Index jcol, const Index nseg, ScalarVector& dense, ScalarVector& tempv, IndexVector& segrep, IndexVector& repfnz, GlobalLU_t& glu); - Index column_dfs(const Index m, const Index jcol, IndexVector& perm_r, Index maxsuper, Index& nseg, BlockIndexVector lsub_col, IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu); - Index column_bmod(const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector& tempv, BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t& glu); - Index copy_to_ucol(const Index jcol, const Index nseg, IndexVector& segrep, BlockIndexVector repfnz ,IndexVector& perm_r, BlockScalarVector dense, GlobalLU_t& glu); - void pruneL(const Index jcol, const IndexVector& perm_r, const Index pivrow, const Index nseg, const IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, GlobalLU_t& glu); - void countnz(const Index n, Index& nnzL, Index& nnzU, GlobalLU_t& glu); - void fixupL(const Index n, const IndexVector& perm_r, GlobalLU_t& glu); - - template - friend struct column_dfs_traits; -}; - -} // end namespace internal -} // namespace Eigen - -#endif diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_Memory.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_Memory.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_Memory.h +++ /dev/null @@ -1,226 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/* - - * NOTE: This file is the modified version of [s,d,c,z]memory.c files in SuperLU - - * -- SuperLU routine (version 3.1) -- - * Univ. of California Berkeley, Xerox Palo Alto Research Center, - * and Lawrence Berkeley National Lab. - * August 1, 2008 - * - * Copyright (c) 1994 by Xerox Corporation. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY - * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program for any - * purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is - * granted, provided the above notices are retained, and a notice that - * the code was modified is included with the above copyright notice. - */ - -#ifndef EIGEN_SPARSELU_MEMORY -#define EIGEN_SPARSELU_MEMORY - -namespace Eigen { -namespace internal { - -enum { LUNoMarker = 3 }; -enum {emptyIdxLU = -1}; -inline Index LUnumTempV(Index& m, Index& w, Index& t, Index& b) -{ - return (std::max)(m, (t+b)*w); -} - -template< typename Scalar> -inline Index LUTempSpace(Index&m, Index& w) -{ - return (2*w + 4 + LUNoMarker) * m * sizeof(Index) + (w + 1) * m * sizeof(Scalar); -} - - - - -/** - * Expand the existing storage to accomodate more fill-ins - * \param vec Valid pointer to the vector to allocate or expand - * \param[in,out] length At input, contain the current length of the vector that is to be increased. At output, length of the newly allocated vector - * \param[in] nbElts Current number of elements in the factors - * \param keep_prev 1: use length and do not expand the vector; 0: compute new_len and expand - * \param[in,out] num_expansions Number of times the memory has been expanded - */ -template -template -Index SparseLUImpl::expand(VectorType& vec, Index& length, Index nbElts, Index keep_prev, Index& num_expansions) -{ - - float alpha = 1.5; // Ratio of the memory increase - Index new_len; // New size of the allocated memory - - if(num_expansions == 0 || keep_prev) - new_len = length ; // First time allocate requested - else - new_len = (std::max)(length+1,Index(alpha * length)); - - VectorType old_vec; // Temporary vector to hold the previous values - if (nbElts > 0 ) - old_vec = vec.segment(0,nbElts); - - //Allocate or expand the current vector -#ifdef EIGEN_EXCEPTIONS - try -#endif - { - vec.resize(new_len); - } -#ifdef EIGEN_EXCEPTIONS - catch(std::bad_alloc& ) -#else - if(!vec.size()) -#endif - { - if (!num_expansions) - { - // First time to allocate from LUMemInit() - // Let LUMemInit() deals with it. - return -1; - } - if (keep_prev) - { - // In this case, the memory length should not not be reduced - return new_len; - } - else - { - // Reduce the size and increase again - Index tries = 0; // Number of attempts - do - { - alpha = (alpha + 1)/2; - new_len = (std::max)(length+1,Index(alpha * length)); -#ifdef EIGEN_EXCEPTIONS - try -#endif - { - vec.resize(new_len); - } -#ifdef EIGEN_EXCEPTIONS - catch(std::bad_alloc& ) -#else - if (!vec.size()) -#endif - { - tries += 1; - if ( tries > 10) return new_len; - } - } while (!vec.size()); - } - } - //Copy the previous values to the newly allocated space - if (nbElts > 0) - vec.segment(0, nbElts) = old_vec; - - - length = new_len; - if(num_expansions) ++num_expansions; - return 0; -} - -/** - * \brief Allocate various working space for the numerical factorization phase. - * \param m number of rows of the input matrix - * \param n number of columns - * \param annz number of initial nonzeros in the matrix - * \param lwork if lwork=-1, this routine returns an estimated size of the required memory - * \param glu persistent data to facilitate multiple factors : will be deleted later ?? - * \param fillratio estimated ratio of fill in the factors - * \param panel_size Size of a panel - * \return an estimated size of the required memory if lwork = -1; otherwise, return the size of actually allocated memory when allocation failed, and 0 on success - * \note Unlike SuperLU, this routine does not support successive factorization with the same pattern and the same row permutation - */ -template -Index SparseLUImpl::memInit(Index m, Index n, Index annz, Index lwork, Index fillratio, Index panel_size, GlobalLU_t& glu) -{ - Index& num_expansions = glu.num_expansions; //No memory expansions so far - num_expansions = 0; - glu.nzumax = glu.nzlumax = (std::min)(fillratio * (annz+1) / n, m) * n; // estimated number of nonzeros in U - glu.nzlmax = (std::max)(Index(4), fillratio) * (annz+1) / 4; // estimated nnz in L factor - // Return the estimated size to the user if necessary - Index tempSpace; - tempSpace = (2*panel_size + 4 + LUNoMarker) * m * sizeof(Index) + (panel_size + 1) * m * sizeof(Scalar); - if (lwork == emptyIdxLU) - { - Index estimated_size; - estimated_size = (5 * n + 5) * sizeof(Index) + tempSpace - + (glu.nzlmax + glu.nzumax) * sizeof(Index) + (glu.nzlumax+glu.nzumax) * sizeof(Scalar) + n; - return estimated_size; - } - - // Setup the required space - - // First allocate Integer pointers for L\U factors - glu.xsup.resize(n+1); - glu.supno.resize(n+1); - glu.xlsub.resize(n+1); - glu.xlusup.resize(n+1); - glu.xusub.resize(n+1); - - // Reserve memory for L/U factors - do - { - if( (expand(glu.lusup, glu.nzlumax, 0, 0, num_expansions)<0) - || (expand(glu.ucol, glu.nzumax, 0, 0, num_expansions)<0) - || (expand (glu.lsub, glu.nzlmax, 0, 0, num_expansions)<0) - || (expand (glu.usub, glu.nzumax, 0, 1, num_expansions)<0) ) - { - //Reduce the estimated size and retry - glu.nzlumax /= 2; - glu.nzumax /= 2; - glu.nzlmax /= 2; - if (glu.nzlumax < annz ) return glu.nzlumax; - } - } while (!glu.lusup.size() || !glu.ucol.size() || !glu.lsub.size() || !glu.usub.size()); - - ++num_expansions; - return 0; - -} // end LuMemInit - -/** - * \brief Expand the existing storage - * \param vec vector to expand - * \param[in,out] maxlen On input, previous size of vec (Number of elements to copy ). on output, new size - * \param nbElts current number of elements in the vector. - * \param memtype Type of the element to expand - * \param num_expansions Number of expansions - * \return 0 on success, > 0 size of the memory allocated so far - */ -template -template -Index SparseLUImpl::memXpand(VectorType& vec, Index& maxlen, Index nbElts, MemType memtype, Index& num_expansions) -{ - Index failed_size; - if (memtype == USUB) - failed_size = this->expand(vec, maxlen, nbElts, 1, num_expansions); - else - failed_size = this->expand(vec, maxlen, nbElts, 0, num_expansions); - - if (failed_size) - return failed_size; - - return 0 ; -} - -} // end namespace internal - -} // end namespace Eigen -#endif // EIGEN_SPARSELU_MEMORY diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_Structs.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_Structs.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_Structs.h +++ /dev/null @@ -1,110 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/* - * NOTE: This file comes from a partly modified version of files slu_[s,d,c,z]defs.h - * -- SuperLU routine (version 4.1) -- - * Univ. of California Berkeley, Xerox Palo Alto Research Center, - * and Lawrence Berkeley National Lab. - * November, 2010 - * - * Global data structures used in LU factorization - - * - * nsuper: #supernodes = nsuper + 1, numbered [0, nsuper]. - * (xsup,supno): supno[i] is the supernode no to which i belongs; - * xsup(s) points to the beginning of the s-th supernode. - * e.g. supno 0 1 2 2 3 3 3 4 4 4 4 4 (n=12) - * xsup 0 1 2 4 7 12 - * Note: dfs will be performed on supernode rep. relative to the new - * row pivoting ordering - * - * (xlsub,lsub): lsub[*] contains the compressed subscript of - * rectangular supernodes; xlsub[j] points to the starting - * location of the j-th column in lsub[*]. Note that xlsub - * is indexed by column. - * Storage: original row subscripts - * - * During the course of sparse LU factorization, we also use - * (xlsub,lsub) for the purpose of symmetric pruning. For each - * supernode {s,s+1,...,t=s+r} with first column s and last - * column t, the subscript set - * lsub[j], j=xlsub[s], .., xlsub[s+1]-1 - * is the structure of column s (i.e. structure of this supernode). - * It is used for the storage of numerical values. - * Furthermore, - * lsub[j], j=xlsub[t], .., xlsub[t+1]-1 - * is the structure of the last column t of this supernode. - * It is for the purpose of symmetric pruning. Therefore, the - * structural subscripts can be rearranged without making physical - * interchanges among the numerical values. - * - * However, if the supernode has only one column, then we - * only keep one set of subscripts. For any subscript interchange - * performed, similar interchange must be done on the numerical - * values. - * - * The last column structures (for pruning) will be removed - * after the numercial LU factorization phase. - * - * (xlusup,lusup): lusup[*] contains the numerical values of the - * rectangular supernodes; xlusup[j] points to the starting - * location of the j-th column in storage vector lusup[*] - * Note: xlusup is indexed by column. - * Each rectangular supernode is stored by column-major - * scheme, consistent with Fortran 2-dim array storage. - * - * (xusub,ucol,usub): ucol[*] stores the numerical values of - * U-columns outside the rectangular supernodes. The row - * subscript of nonzero ucol[k] is stored in usub[k]. - * xusub[i] points to the starting location of column i in ucol. - * Storage: new row subscripts; that is subscripts of PA. - */ - -#ifndef EIGEN_LU_STRUCTS -#define EIGEN_LU_STRUCTS -namespace Eigen { -namespace internal { - -typedef enum {LUSUP, UCOL, LSUB, USUB, LLVL, ULVL} MemType; - -template -struct LU_GlobalLU_t { - typedef typename IndexVector::Scalar StorageIndex; - IndexVector xsup; //First supernode column ... xsup(s) points to the beginning of the s-th supernode - IndexVector supno; // Supernode number corresponding to this column (column to supernode mapping) - ScalarVector lusup; // nonzero values of L ordered by columns - IndexVector lsub; // Compressed row indices of L rectangular supernodes. - IndexVector xlusup; // pointers to the beginning of each column in lusup - IndexVector xlsub; // pointers to the beginning of each column in lsub - Index nzlmax; // Current max size of lsub - Index nzlumax; // Current max size of lusup - ScalarVector ucol; // nonzero values of U ordered by columns - IndexVector usub; // row indices of U columns in ucol - IndexVector xusub; // Pointers to the beginning of each column of U in ucol - Index nzumax; // Current max size of ucol - Index n; // Number of columns in the matrix - Index num_expansions; -}; - -// Values to set for performance -struct perfvalues { - Index panel_size; // a panel consists of at most consecutive columns - Index relax; // To control degree of relaxing supernodes. If the number of nodes (columns) - // in a subtree of the elimination tree is less than relax, this subtree is considered - // as one supernode regardless of the row structures of those columns - Index maxsuper; // The maximum size for a supernode in complete LU - Index rowblk; // The minimum row dimension for 2-D blocking to be used; - Index colblk; // The minimum column dimension for 2-D blocking to be used; - Index fillfactor; // The estimated fills factors for L and U, compared with A -}; - -} // end namespace internal - -} // end namespace Eigen -#endif // EIGEN_LU_STRUCTS diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_SupernodalMatrix.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_SupernodalMatrix.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_SupernodalMatrix.h +++ /dev/null @@ -1,301 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// Copyright (C) 2012 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSELU_SUPERNODAL_MATRIX_H -#define EIGEN_SPARSELU_SUPERNODAL_MATRIX_H - -namespace Eigen { -namespace internal { - -/** \ingroup SparseLU_Module - * \brief a class to manipulate the L supernodal factor from the SparseLU factorization - * - * This class contain the data to easily store - * and manipulate the supernodes during the factorization and solution phase of Sparse LU. - * Only the lower triangular matrix has supernodes. - * - * NOTE : This class corresponds to the SCformat structure in SuperLU - * - */ -/* TODO - * InnerIterator as for sparsematrix - * SuperInnerIterator to iterate through all supernodes - * Function for triangular solve - */ -template -class MappedSuperNodalMatrix -{ - public: - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; - typedef Matrix IndexVector; - typedef Matrix ScalarVector; - public: - MappedSuperNodalMatrix() - { - - } - MappedSuperNodalMatrix(Index m, Index n, ScalarVector& nzval, IndexVector& nzval_colptr, IndexVector& rowind, - IndexVector& rowind_colptr, IndexVector& col_to_sup, IndexVector& sup_to_col ) - { - setInfos(m, n, nzval, nzval_colptr, rowind, rowind_colptr, col_to_sup, sup_to_col); - } - - ~MappedSuperNodalMatrix() - { - - } - /** - * Set appropriate pointers for the lower triangular supernodal matrix - * These infos are available at the end of the numerical factorization - * FIXME This class will be modified such that it can be use in the course - * of the factorization. - */ - void setInfos(Index m, Index n, ScalarVector& nzval, IndexVector& nzval_colptr, IndexVector& rowind, - IndexVector& rowind_colptr, IndexVector& col_to_sup, IndexVector& sup_to_col ) - { - m_row = m; - m_col = n; - m_nzval = nzval.data(); - m_nzval_colptr = nzval_colptr.data(); - m_rowind = rowind.data(); - m_rowind_colptr = rowind_colptr.data(); - m_nsuper = col_to_sup(n); - m_col_to_sup = col_to_sup.data(); - m_sup_to_col = sup_to_col.data(); - } - - /** - * Number of rows - */ - Index rows() { return m_row; } - - /** - * Number of columns - */ - Index cols() { return m_col; } - - /** - * Return the array of nonzero values packed by column - * - * The size is nnz - */ - Scalar* valuePtr() { return m_nzval; } - - const Scalar* valuePtr() const - { - return m_nzval; - } - /** - * Return the pointers to the beginning of each column in \ref valuePtr() - */ - StorageIndex* colIndexPtr() - { - return m_nzval_colptr; - } - - const StorageIndex* colIndexPtr() const - { - return m_nzval_colptr; - } - - /** - * Return the array of compressed row indices of all supernodes - */ - StorageIndex* rowIndex() { return m_rowind; } - - const StorageIndex* rowIndex() const - { - return m_rowind; - } - - /** - * Return the location in \em rowvaluePtr() which starts each column - */ - StorageIndex* rowIndexPtr() { return m_rowind_colptr; } - - const StorageIndex* rowIndexPtr() const - { - return m_rowind_colptr; - } - - /** - * Return the array of column-to-supernode mapping - */ - StorageIndex* colToSup() { return m_col_to_sup; } - - const StorageIndex* colToSup() const - { - return m_col_to_sup; - } - /** - * Return the array of supernode-to-column mapping - */ - StorageIndex* supToCol() { return m_sup_to_col; } - - const StorageIndex* supToCol() const - { - return m_sup_to_col; - } - - /** - * Return the number of supernodes - */ - Index nsuper() const - { - return m_nsuper; - } - - class InnerIterator; - template - void solveInPlace( MatrixBase&X) const; - - - - - protected: - Index m_row; // Number of rows - Index m_col; // Number of columns - Index m_nsuper; // Number of supernodes - Scalar* m_nzval; //array of nonzero values packed by column - StorageIndex* m_nzval_colptr; //nzval_colptr[j] Stores the location in nzval[] which starts column j - StorageIndex* m_rowind; // Array of compressed row indices of rectangular supernodes - StorageIndex* m_rowind_colptr; //rowind_colptr[j] stores the location in rowind[] which starts column j - StorageIndex* m_col_to_sup; // col_to_sup[j] is the supernode number to which column j belongs - StorageIndex* m_sup_to_col; //sup_to_col[s] points to the starting column of the s-th supernode - - private : -}; - -/** - * \brief InnerIterator class to iterate over nonzero values of the current column in the supernodal matrix L - * - */ -template -class MappedSuperNodalMatrix::InnerIterator -{ - public: - InnerIterator(const MappedSuperNodalMatrix& mat, Index outer) - : m_matrix(mat), - m_outer(outer), - m_supno(mat.colToSup()[outer]), - m_idval(mat.colIndexPtr()[outer]), - m_startidval(m_idval), - m_endidval(mat.colIndexPtr()[outer+1]), - m_idrow(mat.rowIndexPtr()[mat.supToCol()[mat.colToSup()[outer]]]), - m_endidrow(mat.rowIndexPtr()[mat.supToCol()[mat.colToSup()[outer]]+1]) - {} - inline InnerIterator& operator++() - { - m_idval++; - m_idrow++; - return *this; - } - inline Scalar value() const { return m_matrix.valuePtr()[m_idval]; } - - inline Scalar& valueRef() { return const_cast(m_matrix.valuePtr()[m_idval]); } - - inline Index index() const { return m_matrix.rowIndex()[m_idrow]; } - inline Index row() const { return index(); } - inline Index col() const { return m_outer; } - - inline Index supIndex() const { return m_supno; } - - inline operator bool() const - { - return ( (m_idval < m_endidval) && (m_idval >= m_startidval) - && (m_idrow < m_endidrow) ); - } - - protected: - const MappedSuperNodalMatrix& m_matrix; // Supernodal lower triangular matrix - const Index m_outer; // Current column - const Index m_supno; // Current SuperNode number - Index m_idval; // Index to browse the values in the current column - const Index m_startidval; // Start of the column value - const Index m_endidval; // End of the column value - Index m_idrow; // Index to browse the row indices - Index m_endidrow; // End index of row indices of the current column -}; - -/** - * \brief Solve with the supernode triangular matrix - * - */ -template -template -void MappedSuperNodalMatrix::solveInPlace( MatrixBase&X) const -{ - /* Explicit type conversion as the Index type of MatrixBase may be wider than Index */ -// eigen_assert(X.rows() <= NumTraits::highest()); -// eigen_assert(X.cols() <= NumTraits::highest()); - Index n = int(X.rows()); - Index nrhs = Index(X.cols()); - const Scalar * Lval = valuePtr(); // Nonzero values - Matrix work(n, nrhs); // working vector - work.setZero(); - for (Index k = 0; k <= nsuper(); k ++) - { - Index fsupc = supToCol()[k]; // First column of the current supernode - Index istart = rowIndexPtr()[fsupc]; // Pointer index to the subscript of the current column - Index nsupr = rowIndexPtr()[fsupc+1] - istart; // Number of rows in the current supernode - Index nsupc = supToCol()[k+1] - fsupc; // Number of columns in the current supernode - Index nrow = nsupr - nsupc; // Number of rows in the non-diagonal part of the supernode - Index irow; //Current index row - - if (nsupc == 1 ) - { - for (Index j = 0; j < nrhs; j++) - { - InnerIterator it(*this, fsupc); - ++it; // Skip the diagonal element - for (; it; ++it) - { - irow = it.row(); - X(irow, j) -= X(fsupc, j) * it.value(); - } - } - } - else - { - // The supernode has more than one column - Index luptr = colIndexPtr()[fsupc]; - Index lda = colIndexPtr()[fsupc+1] - luptr; - - // Triangular solve - Map, 0, OuterStride<> > A( &(Lval[luptr]), nsupc, nsupc, OuterStride<>(lda) ); - Map< Matrix, 0, OuterStride<> > U (&(X(fsupc,0)), nsupc, nrhs, OuterStride<>(n) ); - U = A.template triangularView().solve(U); - - // Matrix-vector product - new (&A) Map, 0, OuterStride<> > ( &(Lval[luptr+nsupc]), nrow, nsupc, OuterStride<>(lda) ); - work.topRows(nrow).noalias() = A * U; - - //Begin Scatter - for (Index j = 0; j < nrhs; j++) - { - Index iptr = istart + nsupc; - for (Index i = 0; i < nrow; i++) - { - irow = rowIndex()[iptr]; - X(irow, j) -= work(i, j); // Scatter operation - work(i, j) = Scalar(0); - iptr++; - } - } - } - } -} - -} // end namespace internal - -} // end namespace Eigen - -#endif // EIGEN_SPARSELU_MATRIX_H diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_Utils.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_Utils.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_Utils.h +++ /dev/null @@ -1,80 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - - -#ifndef EIGEN_SPARSELU_UTILS_H -#define EIGEN_SPARSELU_UTILS_H - -namespace Eigen { -namespace internal { - -/** - * \brief Count Nonzero elements in the factors - */ -template -void SparseLUImpl::countnz(const Index n, Index& nnzL, Index& nnzU, GlobalLU_t& glu) -{ - nnzL = 0; - nnzU = (glu.xusub)(n); - Index nsuper = (glu.supno)(n); - Index jlen; - Index i, j, fsupc; - if (n <= 0 ) return; - // For each supernode - for (i = 0; i <= nsuper; i++) - { - fsupc = glu.xsup(i); - jlen = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); - - for (j = fsupc; j < glu.xsup(i+1); j++) - { - nnzL += jlen; - nnzU += j - fsupc + 1; - jlen--; - } - } -} - -/** - * \brief Fix up the data storage lsub for L-subscripts. - * - * It removes the subscripts sets for structural pruning, - * and applies permutation to the remaining subscripts - * - */ -template -void SparseLUImpl::fixupL(const Index n, const IndexVector& perm_r, GlobalLU_t& glu) -{ - Index fsupc, i, j, k, jstart; - - StorageIndex nextl = 0; - Index nsuper = (glu.supno)(n); - - // For each supernode - for (i = 0; i <= nsuper; i++) - { - fsupc = glu.xsup(i); - jstart = glu.xlsub(fsupc); - glu.xlsub(fsupc) = nextl; - for (j = jstart; j < glu.xlsub(fsupc + 1); j++) - { - glu.lsub(nextl) = perm_r(glu.lsub(j)); // Now indexed into P*A - nextl++; - } - for (k = fsupc+1; k < glu.xsup(i+1); k++) - glu.xlsub(k) = nextl; // other columns in supernode i - } - - glu.xlsub(n) = nextl; -} - -} // end namespace internal - -} // end namespace Eigen -#endif // EIGEN_SPARSELU_UTILS_H diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_column_bmod.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_column_bmod.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_column_bmod.h +++ /dev/null @@ -1,181 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// Copyright (C) 2012 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/* - - * NOTE: This file is the modified version of xcolumn_bmod.c file in SuperLU - - * -- SuperLU routine (version 3.0) -- - * Univ. of California Berkeley, Xerox Palo Alto Research Center, - * and Lawrence Berkeley National Lab. - * October 15, 2003 - * - * Copyright (c) 1994 by Xerox Corporation. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY - * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program for any - * purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is - * granted, provided the above notices are retained, and a notice that - * the code was modified is included with the above copyright notice. - */ -#ifndef SPARSELU_COLUMN_BMOD_H -#define SPARSELU_COLUMN_BMOD_H - -namespace Eigen { - -namespace internal { -/** - * \brief Performs numeric block updates (sup-col) in topological order - * - * \param jcol current column to update - * \param nseg Number of segments in the U part - * \param dense Store the full representation of the column - * \param tempv working array - * \param segrep segment representative ... - * \param repfnz ??? First nonzero column in each row ??? ... - * \param fpanelc First column in the current panel - * \param glu Global LU data. - * \return 0 - successful return - * > 0 - number of bytes allocated when run out of space - * - */ -template -Index SparseLUImpl::column_bmod(const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector& tempv, - BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t& glu) -{ - Index jsupno, k, ksub, krep, ksupno; - Index lptr, nrow, isub, irow, nextlu, new_next, ufirst; - Index fsupc, nsupc, nsupr, luptr, kfnz, no_zeros; - /* krep = representative of current k-th supernode - * fsupc = first supernodal column - * nsupc = number of columns in a supernode - * nsupr = number of rows in a supernode - * luptr = location of supernodal LU-block in storage - * kfnz = first nonz in the k-th supernodal segment - * no_zeros = no lf leading zeros in a supernodal U-segment - */ - - jsupno = glu.supno(jcol); - // For each nonzero supernode segment of U[*,j] in topological order - k = nseg - 1; - Index d_fsupc; // distance between the first column of the current panel and the - // first column of the current snode - Index fst_col; // First column within small LU update - Index segsize; - for (ksub = 0; ksub < nseg; ksub++) - { - krep = segrep(k); k--; - ksupno = glu.supno(krep); - if (jsupno != ksupno ) - { - // outside the rectangular supernode - fsupc = glu.xsup(ksupno); - fst_col = (std::max)(fsupc, fpanelc); - - // Distance from the current supernode to the current panel; - // d_fsupc = 0 if fsupc > fpanelc - d_fsupc = fst_col - fsupc; - - luptr = glu.xlusup(fst_col) + d_fsupc; - lptr = glu.xlsub(fsupc) + d_fsupc; - - kfnz = repfnz(krep); - kfnz = (std::max)(kfnz, fpanelc); - - segsize = krep - kfnz + 1; - nsupc = krep - fst_col + 1; - nsupr = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); - nrow = nsupr - d_fsupc - nsupc; - Index lda = glu.xlusup(fst_col+1) - glu.xlusup(fst_col); - - - // Perform a triangular solver and block update, - // then scatter the result of sup-col update to dense - no_zeros = kfnz - fst_col; - if(segsize==1) - LU_kernel_bmod<1>::run(segsize, dense, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros); - else - LU_kernel_bmod::run(segsize, dense, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros); - } // end if jsupno - } // end for each segment - - // Process the supernodal portion of L\U[*,j] - nextlu = glu.xlusup(jcol); - fsupc = glu.xsup(jsupno); - - // copy the SPA dense into L\U[*,j] - Index mem; - new_next = nextlu + glu.xlsub(fsupc + 1) - glu.xlsub(fsupc); - Index offset = internal::first_multiple(new_next, internal::packet_traits::size) - new_next; - if(offset) - new_next += offset; - while (new_next > glu.nzlumax ) - { - mem = memXpand(glu.lusup, glu.nzlumax, nextlu, LUSUP, glu.num_expansions); - if (mem) return mem; - } - - for (isub = glu.xlsub(fsupc); isub < glu.xlsub(fsupc+1); isub++) - { - irow = glu.lsub(isub); - glu.lusup(nextlu) = dense(irow); - dense(irow) = Scalar(0.0); - ++nextlu; - } - - if(offset) - { - glu.lusup.segment(nextlu,offset).setZero(); - nextlu += offset; - } - glu.xlusup(jcol + 1) = StorageIndex(nextlu); // close L\U(*,jcol); - - /* For more updates within the panel (also within the current supernode), - * should start from the first column of the panel, or the first column - * of the supernode, whichever is bigger. There are two cases: - * 1) fsupc < fpanelc, then fst_col <-- fpanelc - * 2) fsupc >= fpanelc, then fst_col <-- fsupc - */ - fst_col = (std::max)(fsupc, fpanelc); - - if (fst_col < jcol) - { - // Distance between the current supernode and the current panel - // d_fsupc = 0 if fsupc >= fpanelc - d_fsupc = fst_col - fsupc; - - lptr = glu.xlsub(fsupc) + d_fsupc; - luptr = glu.xlusup(fst_col) + d_fsupc; - nsupr = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); // leading dimension - nsupc = jcol - fst_col; // excluding jcol - nrow = nsupr - d_fsupc - nsupc; - - // points to the beginning of jcol in snode L\U(jsupno) - ufirst = glu.xlusup(jcol) + d_fsupc; - Index lda = glu.xlusup(jcol+1) - glu.xlusup(jcol); - MappedMatrixBlock A( &(glu.lusup.data()[luptr]), nsupc, nsupc, OuterStride<>(lda) ); - VectorBlock u(glu.lusup, ufirst, nsupc); - u = A.template triangularView().solve(u); - - new (&A) MappedMatrixBlock ( &(glu.lusup.data()[luptr+nsupc]), nrow, nsupc, OuterStride<>(lda) ); - VectorBlock l(glu.lusup, ufirst+nsupc, nrow); - l.noalias() -= A * u; - - } // End if fst_col - return 0; -} - -} // end namespace internal -} // end namespace Eigen - -#endif // SPARSELU_COLUMN_BMOD_H diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_column_dfs.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_column_dfs.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_column_dfs.h +++ /dev/null @@ -1,179 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/* - - * NOTE: This file is the modified version of [s,d,c,z]column_dfs.c file in SuperLU - - * -- SuperLU routine (version 2.0) -- - * Univ. of California Berkeley, Xerox Palo Alto Research Center, - * and Lawrence Berkeley National Lab. - * November 15, 1997 - * - * Copyright (c) 1994 by Xerox Corporation. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY - * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program for any - * purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is - * granted, provided the above notices are retained, and a notice that - * the code was modified is included with the above copyright notice. - */ -#ifndef SPARSELU_COLUMN_DFS_H -#define SPARSELU_COLUMN_DFS_H - -template class SparseLUImpl; -namespace Eigen { - -namespace internal { - -template -struct column_dfs_traits : no_assignment_operator -{ - typedef typename ScalarVector::Scalar Scalar; - typedef typename IndexVector::Scalar StorageIndex; - column_dfs_traits(Index jcol, Index& jsuper, typename SparseLUImpl::GlobalLU_t& glu, SparseLUImpl& luImpl) - : m_jcol(jcol), m_jsuper_ref(jsuper), m_glu(glu), m_luImpl(luImpl) - {} - bool update_segrep(Index /*krep*/, Index /*jj*/) - { - return true; - } - void mem_expand(IndexVector& lsub, Index& nextl, Index chmark) - { - if (nextl >= m_glu.nzlmax) - m_luImpl.memXpand(lsub, m_glu.nzlmax, nextl, LSUB, m_glu.num_expansions); - if (chmark != (m_jcol-1)) m_jsuper_ref = emptyIdxLU; - } - enum { ExpandMem = true }; - - Index m_jcol; - Index& m_jsuper_ref; - typename SparseLUImpl::GlobalLU_t& m_glu; - SparseLUImpl& m_luImpl; -}; - - -/** - * \brief Performs a symbolic factorization on column jcol and decide the supernode boundary - * - * A supernode representative is the last column of a supernode. - * The nonzeros in U[*,j] are segments that end at supernodes representatives. - * The routine returns a list of the supernodal representatives - * in topological order of the dfs that generates them. - * The location of the first nonzero in each supernodal segment - * (supernodal entry location) is also returned. - * - * \param m number of rows in the matrix - * \param jcol Current column - * \param perm_r Row permutation - * \param maxsuper Maximum number of column allowed in a supernode - * \param [in,out] nseg Number of segments in current U[*,j] - new segments appended - * \param lsub_col defines the rhs vector to start the dfs - * \param [in,out] segrep Segment representatives - new segments appended - * \param repfnz First nonzero location in each row - * \param xprune - * \param marker marker[i] == jj, if i was visited during dfs of current column jj; - * \param parent - * \param xplore working array - * \param glu global LU data - * \return 0 success - * > 0 number of bytes allocated when run out of space - * - */ -template -Index SparseLUImpl::column_dfs(const Index m, const Index jcol, IndexVector& perm_r, Index maxsuper, Index& nseg, - BlockIndexVector lsub_col, IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, - IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu) -{ - - Index jsuper = glu.supno(jcol); - Index nextl = glu.xlsub(jcol); - VectorBlock marker2(marker, 2*m, m); - - - column_dfs_traits traits(jcol, jsuper, glu, *this); - - // For each nonzero in A(*,jcol) do dfs - for (Index k = 0; ((k < m) ? lsub_col[k] != emptyIdxLU : false) ; k++) - { - Index krow = lsub_col(k); - lsub_col(k) = emptyIdxLU; - Index kmark = marker2(krow); - - // krow was visited before, go to the next nonz; - if (kmark == jcol) continue; - - dfs_kernel(StorageIndex(jcol), perm_r, nseg, glu.lsub, segrep, repfnz, xprune, marker2, parent, - xplore, glu, nextl, krow, traits); - } // for each nonzero ... - - Index fsupc; - StorageIndex nsuper = glu.supno(jcol); - StorageIndex jcolp1 = StorageIndex(jcol) + 1; - Index jcolm1 = jcol - 1; - - // check to see if j belongs in the same supernode as j-1 - if ( jcol == 0 ) - { // Do nothing for column 0 - nsuper = glu.supno(0) = 0 ; - } - else - { - fsupc = glu.xsup(nsuper); - StorageIndex jptr = glu.xlsub(jcol); // Not yet compressed - StorageIndex jm1ptr = glu.xlsub(jcolm1); - - // Use supernodes of type T2 : see SuperLU paper - if ( (nextl-jptr != jptr-jm1ptr-1) ) jsuper = emptyIdxLU; - - // Make sure the number of columns in a supernode doesn't - // exceed threshold - if ( (jcol - fsupc) >= maxsuper) jsuper = emptyIdxLU; - - /* If jcol starts a new supernode, reclaim storage space in - * glu.lsub from previous supernode. Note we only store - * the subscript set of the first and last columns of - * a supernode. (first for num values, last for pruning) - */ - if (jsuper == emptyIdxLU) - { // starts a new supernode - if ( (fsupc < jcolm1-1) ) - { // >= 3 columns in nsuper - StorageIndex ito = glu.xlsub(fsupc+1); - glu.xlsub(jcolm1) = ito; - StorageIndex istop = ito + jptr - jm1ptr; - xprune(jcolm1) = istop; // intialize xprune(jcol-1) - glu.xlsub(jcol) = istop; - - for (StorageIndex ifrom = jm1ptr; ifrom < nextl; ++ifrom, ++ito) - glu.lsub(ito) = glu.lsub(ifrom); - nextl = ito; // = istop + length(jcol) - } - nsuper++; - glu.supno(jcol) = nsuper; - } // if a new supernode - } // end else: jcol > 0 - - // Tidy up the pointers before exit - glu.xsup(nsuper+1) = jcolp1; - glu.supno(jcolp1) = nsuper; - xprune(jcol) = StorageIndex(nextl); // Intialize upper bound for pruning - glu.xlsub(jcolp1) = StorageIndex(nextl); - - return 0; -} - -} // end namespace internal - -} // end namespace Eigen - -#endif diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_copy_to_ucol.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_copy_to_ucol.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_copy_to_ucol.h +++ /dev/null @@ -1,107 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -/* - - * NOTE: This file is the modified version of [s,d,c,z]copy_to_ucol.c file in SuperLU - - * -- SuperLU routine (version 2.0) -- - * Univ. of California Berkeley, Xerox Palo Alto Research Center, - * and Lawrence Berkeley National Lab. - * November 15, 1997 - * - * Copyright (c) 1994 by Xerox Corporation. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY - * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program for any - * purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is - * granted, provided the above notices are retained, and a notice that - * the code was modified is included with the above copyright notice. - */ -#ifndef SPARSELU_COPY_TO_UCOL_H -#define SPARSELU_COPY_TO_UCOL_H - -namespace Eigen { -namespace internal { - -/** - * \brief Performs numeric block updates (sup-col) in topological order - * - * \param jcol current column to update - * \param nseg Number of segments in the U part - * \param segrep segment representative ... - * \param repfnz First nonzero column in each row ... - * \param perm_r Row permutation - * \param dense Store the full representation of the column - * \param glu Global LU data. - * \return 0 - successful return - * > 0 - number of bytes allocated when run out of space - * - */ -template -Index SparseLUImpl::copy_to_ucol(const Index jcol, const Index nseg, IndexVector& segrep, - BlockIndexVector repfnz ,IndexVector& perm_r, BlockScalarVector dense, GlobalLU_t& glu) -{ - Index ksub, krep, ksupno; - - Index jsupno = glu.supno(jcol); - - // For each nonzero supernode segment of U[*,j] in topological order - Index k = nseg - 1, i; - StorageIndex nextu = glu.xusub(jcol); - Index kfnz, isub, segsize; - Index new_next,irow; - Index fsupc, mem; - for (ksub = 0; ksub < nseg; ksub++) - { - krep = segrep(k); k--; - ksupno = glu.supno(krep); - if (jsupno != ksupno ) // should go into ucol(); - { - kfnz = repfnz(krep); - if (kfnz != emptyIdxLU) - { // Nonzero U-segment - fsupc = glu.xsup(ksupno); - isub = glu.xlsub(fsupc) + kfnz - fsupc; - segsize = krep - kfnz + 1; - new_next = nextu + segsize; - while (new_next > glu.nzumax) - { - mem = memXpand(glu.ucol, glu.nzumax, nextu, UCOL, glu.num_expansions); - if (mem) return mem; - mem = memXpand(glu.usub, glu.nzumax, nextu, USUB, glu.num_expansions); - if (mem) return mem; - - } - - for (i = 0; i < segsize; i++) - { - irow = glu.lsub(isub); - glu.usub(nextu) = perm_r(irow); // Unlike the L part, the U part is stored in its final order - glu.ucol(nextu) = dense(irow); - dense(irow) = Scalar(0.0); - nextu++; - isub++; - } - - } // end nonzero U-segment - - } // end if jsupno - - } // end for each segment - glu.xusub(jcol + 1) = nextu; // close U(*,jcol) - return 0; -} - -} // namespace internal -} // end namespace Eigen - -#endif // SPARSELU_COPY_TO_UCOL_H diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_gemm_kernel.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_gemm_kernel.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_gemm_kernel.h +++ /dev/null @@ -1,280 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSELU_GEMM_KERNEL_H -#define EIGEN_SPARSELU_GEMM_KERNEL_H - -namespace Eigen { - -namespace internal { - - -/** \internal - * A general matrix-matrix product kernel optimized for the SparseLU factorization. - * - A, B, and C must be column major - * - lda and ldc must be multiples of the respective packet size - * - C must have the same alignment as A - */ -template -EIGEN_DONT_INLINE -void sparselu_gemm(Index m, Index n, Index d, const Scalar* A, Index lda, const Scalar* B, Index ldb, Scalar* C, Index ldc) -{ - using namespace Eigen::internal; - - typedef typename packet_traits::type Packet; - enum { - NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS, - PacketSize = packet_traits::size, - PM = 8, // peeling in M - RN = 2, // register blocking - RK = NumberOfRegisters>=16 ? 4 : 2, // register blocking - BM = 4096/sizeof(Scalar), // number of rows of A-C per chunk - SM = PM*PacketSize // step along M - }; - Index d_end = (d/RK)*RK; // number of columns of A (rows of B) suitable for full register blocking - Index n_end = (n/RN)*RN; // number of columns of B-C suitable for processing RN columns at once - Index i0 = internal::first_default_aligned(A,m); - - eigen_internal_assert(((lda%PacketSize)==0) && ((ldc%PacketSize)==0) && (i0==internal::first_default_aligned(C,m))); - - // handle the non aligned rows of A and C without any optimization: - for(Index i=0; i(BM, m-ib); // actual number of rows - Index actual_b_end1 = (actual_b/SM)*SM; // actual number of rows suitable for peeling - Index actual_b_end2 = (actual_b/PacketSize)*PacketSize; // actual number of rows suitable for vectorization - - // Let's process two columns of B-C at once - for(Index j=0; j(Bc0[0]); } - { b10 = pset1(Bc0[1]); } - if(RK==4) { b20 = pset1(Bc0[2]); } - if(RK==4) { b30 = pset1(Bc0[3]); } - { b01 = pset1(Bc1[0]); } - { b11 = pset1(Bc1[1]); } - if(RK==4) { b21 = pset1(Bc1[2]); } - if(RK==4) { b31 = pset1(Bc1[3]); } - - Packet a0, a1, a2, a3, c0, c1, t0, t1; - - const Scalar* A0 = A+ib+(k+0)*lda; - const Scalar* A1 = A+ib+(k+1)*lda; - const Scalar* A2 = A+ib+(k+2)*lda; - const Scalar* A3 = A+ib+(k+3)*lda; - - Scalar* C0 = C+ib+(j+0)*ldc; - Scalar* C1 = C+ib+(j+1)*ldc; - - a0 = pload(A0); - a1 = pload(A1); - if(RK==4) - { - a2 = pload(A2); - a3 = pload(A3); - } - else - { - // workaround "may be used uninitialized in this function" warning - a2 = a3 = a0; - } - -#define KMADD(c, a, b, tmp) {tmp = b; tmp = pmul(a,tmp); c = padd(c,tmp);} -#define WORK(I) \ - c0 = pload(C0+i+(I)*PacketSize); \ - c1 = pload(C1+i+(I)*PacketSize); \ - KMADD(c0, a0, b00, t0) \ - KMADD(c1, a0, b01, t1) \ - a0 = pload(A0+i+(I+1)*PacketSize); \ - KMADD(c0, a1, b10, t0) \ - KMADD(c1, a1, b11, t1) \ - a1 = pload(A1+i+(I+1)*PacketSize); \ - if(RK==4){ KMADD(c0, a2, b20, t0) }\ - if(RK==4){ KMADD(c1, a2, b21, t1) }\ - if(RK==4){ a2 = pload(A2+i+(I+1)*PacketSize); }\ - if(RK==4){ KMADD(c0, a3, b30, t0) }\ - if(RK==4){ KMADD(c1, a3, b31, t1) }\ - if(RK==4){ a3 = pload(A3+i+(I+1)*PacketSize); }\ - pstore(C0+i+(I)*PacketSize, c0); \ - pstore(C1+i+(I)*PacketSize, c1) - - // process rows of A' - C' with aggressive vectorization and peeling - for(Index i=0; i0) - { - const Scalar* Bc0 = B+(n-1)*ldb; - - for(Index k=0; k(Bc0[0]); - b10 = pset1(Bc0[1]); - if(RK==4) b20 = pset1(Bc0[2]); - if(RK==4) b30 = pset1(Bc0[3]); - - Packet a0, a1, a2, a3, c0, t0/*, t1*/; - - const Scalar* A0 = A+ib+(k+0)*lda; - const Scalar* A1 = A+ib+(k+1)*lda; - const Scalar* A2 = A+ib+(k+2)*lda; - const Scalar* A3 = A+ib+(k+3)*lda; - - Scalar* C0 = C+ib+(n_end)*ldc; - - a0 = pload(A0); - a1 = pload(A1); - if(RK==4) - { - a2 = pload(A2); - a3 = pload(A3); - } - else - { - // workaround "may be used uninitialized in this function" warning - a2 = a3 = a0; - } - -#define WORK(I) \ - c0 = pload(C0+i+(I)*PacketSize); \ - KMADD(c0, a0, b00, t0) \ - a0 = pload(A0+i+(I+1)*PacketSize); \ - KMADD(c0, a1, b10, t0) \ - a1 = pload(A1+i+(I+1)*PacketSize); \ - if(RK==4){ KMADD(c0, a2, b20, t0) }\ - if(RK==4){ a2 = pload(A2+i+(I+1)*PacketSize); }\ - if(RK==4){ KMADD(c0, a3, b30, t0) }\ - if(RK==4){ a3 = pload(A3+i+(I+1)*PacketSize); }\ - pstore(C0+i+(I)*PacketSize, c0); - - // agressive vectorization and peeling - for(Index i=0; i0) - { - for(Index j=0; j1 ? Aligned : 0 - }; - typedef Map, Alignment > MapVector; - typedef Map, Alignment > ConstMapVector; - if(rd==1) MapVector(C+j*ldc+ib,actual_b) += B[0+d_end+j*ldb] * ConstMapVector(A+(d_end+0)*lda+ib, actual_b); - - else if(rd==2) MapVector(C+j*ldc+ib,actual_b) += B[0+d_end+j*ldb] * ConstMapVector(A+(d_end+0)*lda+ib, actual_b) - + B[1+d_end+j*ldb] * ConstMapVector(A+(d_end+1)*lda+ib, actual_b); - - else MapVector(C+j*ldc+ib,actual_b) += B[0+d_end+j*ldb] * ConstMapVector(A+(d_end+0)*lda+ib, actual_b) - + B[1+d_end+j*ldb] * ConstMapVector(A+(d_end+1)*lda+ib, actual_b) - + B[2+d_end+j*ldb] * ConstMapVector(A+(d_end+2)*lda+ib, actual_b); - } - } - - } // blocking on the rows of A and C -} -#undef KMADD - -} // namespace internal - -} // namespace Eigen - -#endif // EIGEN_SPARSELU_GEMM_KERNEL_H diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_heap_relax_snode.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_heap_relax_snode.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_heap_relax_snode.h +++ /dev/null @@ -1,126 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/* This file is a modified version of heap_relax_snode.c file in SuperLU - * -- SuperLU routine (version 3.0) -- - * Univ. of California Berkeley, Xerox Palo Alto Research Center, - * and Lawrence Berkeley National Lab. - * October 15, 2003 - * - * Copyright (c) 1994 by Xerox Corporation. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY - * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program for any - * purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is - * granted, provided the above notices are retained, and a notice that - * the code was modified is included with the above copyright notice. - */ - -#ifndef SPARSELU_HEAP_RELAX_SNODE_H -#define SPARSELU_HEAP_RELAX_SNODE_H - -namespace Eigen { -namespace internal { - -/** - * \brief Identify the initial relaxed supernodes - * - * This routine applied to a symmetric elimination tree. - * It assumes that the matrix has been reordered according to the postorder of the etree - * \param n The number of columns - * \param et elimination tree - * \param relax_columns Maximum number of columns allowed in a relaxed snode - * \param descendants Number of descendants of each node in the etree - * \param relax_end last column in a supernode - */ -template -void SparseLUImpl::heap_relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end) -{ - - // The etree may not be postordered, but its heap ordered - IndexVector post; - internal::treePostorder(StorageIndex(n), et, post); // Post order etree - IndexVector inv_post(n+1); - for (StorageIndex i = 0; i < n+1; ++i) inv_post(post(i)) = i; // inv_post = post.inverse()??? - - // Renumber etree in postorder - IndexVector iwork(n); - IndexVector et_save(n+1); - for (Index i = 0; i < n; ++i) - { - iwork(post(i)) = post(et(i)); - } - et_save = et; // Save the original etree - et = iwork; - - // compute the number of descendants of each node in the etree - relax_end.setConstant(emptyIdxLU); - Index j, parent; - descendants.setZero(); - for (j = 0; j < n; j++) - { - parent = et(j); - if (parent != n) // not the dummy root - descendants(parent) += descendants(j) + 1; - } - // Identify the relaxed supernodes by postorder traversal of the etree - Index snode_start; // beginning of a snode - StorageIndex k; - Index nsuper_et_post = 0; // Number of relaxed snodes in postordered etree - Index nsuper_et = 0; // Number of relaxed snodes in the original etree - StorageIndex l; - for (j = 0; j < n; ) - { - parent = et(j); - snode_start = j; - while ( parent != n && descendants(parent) < relax_columns ) - { - j = parent; - parent = et(j); - } - // Found a supernode in postordered etree, j is the last column - ++nsuper_et_post; - k = StorageIndex(n); - for (Index i = snode_start; i <= j; ++i) - k = (std::min)(k, inv_post(i)); - l = inv_post(j); - if ( (l - k) == (j - snode_start) ) // Same number of columns in the snode - { - // This is also a supernode in the original etree - relax_end(k) = l; // Record last column - ++nsuper_et; - } - else - { - for (Index i = snode_start; i <= j; ++i) - { - l = inv_post(i); - if (descendants(i) == 0) - { - relax_end(l) = l; - ++nsuper_et; - } - } - } - j++; - // Search for a new leaf - while (descendants(j) != 0 && j < n) j++; - } // End postorder traversal of the etree - - // Recover the original etree - et = et_save; -} - -} // end namespace internal - -} // end namespace Eigen -#endif // SPARSELU_HEAP_RELAX_SNODE_H diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_kernel_bmod.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_kernel_bmod.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_kernel_bmod.h +++ /dev/null @@ -1,130 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// Copyright (C) 2012 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef SPARSELU_KERNEL_BMOD_H -#define SPARSELU_KERNEL_BMOD_H - -namespace Eigen { -namespace internal { - -template struct LU_kernel_bmod -{ - /** \internal - * \brief Performs numeric block updates from a given supernode to a single column - * - * \param segsize Size of the segment (and blocks ) to use for updates - * \param[in,out] dense Packed values of the original matrix - * \param tempv temporary vector to use for updates - * \param lusup array containing the supernodes - * \param lda Leading dimension in the supernode - * \param nrow Number of rows in the rectangular part of the supernode - * \param lsub compressed row subscripts of supernodes - * \param lptr pointer to the first column of the current supernode in lsub - * \param no_zeros Number of nonzeros elements before the diagonal part of the supernode - */ - template - static EIGEN_DONT_INLINE void run(const Index segsize, BlockScalarVector& dense, ScalarVector& tempv, ScalarVector& lusup, Index& luptr, const Index lda, - const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros); -}; - -template -template -EIGEN_DONT_INLINE void LU_kernel_bmod::run(const Index segsize, BlockScalarVector& dense, ScalarVector& tempv, ScalarVector& lusup, Index& luptr, const Index lda, - const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros) -{ - typedef typename ScalarVector::Scalar Scalar; - // First, copy U[*,j] segment from dense(*) to tempv(*) - // The result of triangular solve is in tempv[*]; - // The result of matric-vector update is in dense[*] - Index isub = lptr + no_zeros; - Index i; - Index irow; - for (i = 0; i < ((SegSizeAtCompileTime==Dynamic)?segsize:SegSizeAtCompileTime); i++) - { - irow = lsub(isub); - tempv(i) = dense(irow); - ++isub; - } - // Dense triangular solve -- start effective triangle - luptr += lda * no_zeros + no_zeros; - // Form Eigen matrix and vector - Map, 0, OuterStride<> > A( &(lusup.data()[luptr]), segsize, segsize, OuterStride<>(lda) ); - Map > u(tempv.data(), segsize); - - u = A.template triangularView().solve(u); - - // Dense matrix-vector product y <-- B*x - luptr += segsize; - const Index PacketSize = internal::packet_traits::size; - Index ldl = internal::first_multiple(nrow, PacketSize); - Map, 0, OuterStride<> > B( &(lusup.data()[luptr]), nrow, segsize, OuterStride<>(lda) ); - Index aligned_offset = internal::first_default_aligned(tempv.data()+segsize, PacketSize); - Index aligned_with_B_offset = (PacketSize-internal::first_default_aligned(B.data(), PacketSize))%PacketSize; - Map, 0, OuterStride<> > l(tempv.data()+segsize+aligned_offset+aligned_with_B_offset, nrow, OuterStride<>(ldl) ); - - l.setZero(); - internal::sparselu_gemm(l.rows(), l.cols(), B.cols(), B.data(), B.outerStride(), u.data(), u.outerStride(), l.data(), l.outerStride()); - - // Scatter tempv[] into SPA dense[] as a temporary storage - isub = lptr + no_zeros; - for (i = 0; i < ((SegSizeAtCompileTime==Dynamic)?segsize:SegSizeAtCompileTime); i++) - { - irow = lsub(isub++); - dense(irow) = tempv(i); - } - - // Scatter l into SPA dense[] - for (i = 0; i < nrow; i++) - { - irow = lsub(isub++); - dense(irow) -= l(i); - } -} - -template <> struct LU_kernel_bmod<1> -{ - template - static EIGEN_DONT_INLINE void run(const Index /*segsize*/, BlockScalarVector& dense, ScalarVector& /*tempv*/, ScalarVector& lusup, Index& luptr, - const Index lda, const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros); -}; - - -template -EIGEN_DONT_INLINE void LU_kernel_bmod<1>::run(const Index /*segsize*/, BlockScalarVector& dense, ScalarVector& /*tempv*/, ScalarVector& lusup, Index& luptr, - const Index lda, const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros) -{ - typedef typename ScalarVector::Scalar Scalar; - typedef typename IndexVector::Scalar StorageIndex; - Scalar f = dense(lsub(lptr + no_zeros)); - luptr += lda * no_zeros + no_zeros + 1; - const Scalar* a(lusup.data() + luptr); - const StorageIndex* irow(lsub.data()+lptr + no_zeros + 1); - Index i = 0; - for (; i+1 < nrow; i+=2) - { - Index i0 = *(irow++); - Index i1 = *(irow++); - Scalar a0 = *(a++); - Scalar a1 = *(a++); - Scalar d0 = dense.coeff(i0); - Scalar d1 = dense.coeff(i1); - d0 -= f*a0; - d1 -= f*a1; - dense.coeffRef(i0) = d0; - dense.coeffRef(i1) = d1; - } - if(i -// Copyright (C) 2012 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/* - - * NOTE: This file is the modified version of [s,d,c,z]panel_bmod.c file in SuperLU - - * -- SuperLU routine (version 3.0) -- - * Univ. of California Berkeley, Xerox Palo Alto Research Center, - * and Lawrence Berkeley National Lab. - * October 15, 2003 - * - * Copyright (c) 1994 by Xerox Corporation. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY - * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program for any - * purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is - * granted, provided the above notices are retained, and a notice that - * the code was modified is included with the above copyright notice. - */ -#ifndef SPARSELU_PANEL_BMOD_H -#define SPARSELU_PANEL_BMOD_H - -namespace Eigen { -namespace internal { - -/** - * \brief Performs numeric block updates (sup-panel) in topological order. - * - * Before entering this routine, the original nonzeros in the panel - * were already copied i nto the spa[m,w] - * - * \param m number of rows in the matrix - * \param w Panel size - * \param jcol Starting column of the panel - * \param nseg Number of segments in the U part - * \param dense Store the full representation of the panel - * \param tempv working array - * \param segrep segment representative... first row in the segment - * \param repfnz First nonzero rows - * \param glu Global LU data. - * - * - */ -template -void SparseLUImpl::panel_bmod(const Index m, const Index w, const Index jcol, - const Index nseg, ScalarVector& dense, ScalarVector& tempv, - IndexVector& segrep, IndexVector& repfnz, GlobalLU_t& glu) -{ - - Index ksub,jj,nextl_col; - Index fsupc, nsupc, nsupr, nrow; - Index krep, kfnz; - Index lptr; // points to the row subscripts of a supernode - Index luptr; // ... - Index segsize,no_zeros ; - // For each nonz supernode segment of U[*,j] in topological order - Index k = nseg - 1; - const Index PacketSize = internal::packet_traits::size; - - for (ksub = 0; ksub < nseg; ksub++) - { // For each updating supernode - /* krep = representative of current k-th supernode - * fsupc = first supernodal column - * nsupc = number of columns in a supernode - * nsupr = number of rows in a supernode - */ - krep = segrep(k); k--; - fsupc = glu.xsup(glu.supno(krep)); - nsupc = krep - fsupc + 1; - nsupr = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); - nrow = nsupr - nsupc; - lptr = glu.xlsub(fsupc); - - // loop over the panel columns to detect the actual number of columns and rows - Index u_rows = 0; - Index u_cols = 0; - for (jj = jcol; jj < jcol + w; jj++) - { - nextl_col = (jj-jcol) * m; - VectorBlock repfnz_col(repfnz, nextl_col, m); // First nonzero column index for each row - - kfnz = repfnz_col(krep); - if ( kfnz == emptyIdxLU ) - continue; // skip any zero segment - - segsize = krep - kfnz + 1; - u_cols++; - u_rows = (std::max)(segsize,u_rows); - } - - if(nsupc >= 2) - { - Index ldu = internal::first_multiple(u_rows, PacketSize); - Map > U(tempv.data(), u_rows, u_cols, OuterStride<>(ldu)); - - // gather U - Index u_col = 0; - for (jj = jcol; jj < jcol + w; jj++) - { - nextl_col = (jj-jcol) * m; - VectorBlock repfnz_col(repfnz, nextl_col, m); // First nonzero column index for each row - VectorBlock dense_col(dense, nextl_col, m); // Scatter/gather entire matrix column from/to here - - kfnz = repfnz_col(krep); - if ( kfnz == emptyIdxLU ) - continue; // skip any zero segment - - segsize = krep - kfnz + 1; - luptr = glu.xlusup(fsupc); - no_zeros = kfnz - fsupc; - - Index isub = lptr + no_zeros; - Index off = u_rows-segsize; - for (Index i = 0; i < off; i++) U(i,u_col) = 0; - for (Index i = 0; i < segsize; i++) - { - Index irow = glu.lsub(isub); - U(i+off,u_col) = dense_col(irow); - ++isub; - } - u_col++; - } - // solve U = A^-1 U - luptr = glu.xlusup(fsupc); - Index lda = glu.xlusup(fsupc+1) - glu.xlusup(fsupc); - no_zeros = (krep - u_rows + 1) - fsupc; - luptr += lda * no_zeros + no_zeros; - MappedMatrixBlock A(glu.lusup.data()+luptr, u_rows, u_rows, OuterStride<>(lda) ); - U = A.template triangularView().solve(U); - - // update - luptr += u_rows; - MappedMatrixBlock B(glu.lusup.data()+luptr, nrow, u_rows, OuterStride<>(lda) ); - eigen_assert(tempv.size()>w*ldu + nrow*w + 1); - - Index ldl = internal::first_multiple(nrow, PacketSize); - Index offset = (PacketSize-internal::first_default_aligned(B.data(), PacketSize)) % PacketSize; - MappedMatrixBlock L(tempv.data()+w*ldu+offset, nrow, u_cols, OuterStride<>(ldl)); - - L.setZero(); - internal::sparselu_gemm(L.rows(), L.cols(), B.cols(), B.data(), B.outerStride(), U.data(), U.outerStride(), L.data(), L.outerStride()); - - // scatter U and L - u_col = 0; - for (jj = jcol; jj < jcol + w; jj++) - { - nextl_col = (jj-jcol) * m; - VectorBlock repfnz_col(repfnz, nextl_col, m); // First nonzero column index for each row - VectorBlock dense_col(dense, nextl_col, m); // Scatter/gather entire matrix column from/to here - - kfnz = repfnz_col(krep); - if ( kfnz == emptyIdxLU ) - continue; // skip any zero segment - - segsize = krep - kfnz + 1; - no_zeros = kfnz - fsupc; - Index isub = lptr + no_zeros; - - Index off = u_rows-segsize; - for (Index i = 0; i < segsize; i++) - { - Index irow = glu.lsub(isub++); - dense_col(irow) = U.coeff(i+off,u_col); - U.coeffRef(i+off,u_col) = 0; - } - - // Scatter l into SPA dense[] - for (Index i = 0; i < nrow; i++) - { - Index irow = glu.lsub(isub++); - dense_col(irow) -= L.coeff(i,u_col); - L.coeffRef(i,u_col) = 0; - } - u_col++; - } - } - else // level 2 only - { - // Sequence through each column in the panel - for (jj = jcol; jj < jcol + w; jj++) - { - nextl_col = (jj-jcol) * m; - VectorBlock repfnz_col(repfnz, nextl_col, m); // First nonzero column index for each row - VectorBlock dense_col(dense, nextl_col, m); // Scatter/gather entire matrix column from/to here - - kfnz = repfnz_col(krep); - if ( kfnz == emptyIdxLU ) - continue; // skip any zero segment - - segsize = krep - kfnz + 1; - luptr = glu.xlusup(fsupc); - - Index lda = glu.xlusup(fsupc+1)-glu.xlusup(fsupc);// nsupr - - // Perform a trianglar solve and block update, - // then scatter the result of sup-col update to dense[] - no_zeros = kfnz - fsupc; - if(segsize==1) LU_kernel_bmod<1>::run(segsize, dense_col, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros); - else if(segsize==2) LU_kernel_bmod<2>::run(segsize, dense_col, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros); - else if(segsize==3) LU_kernel_bmod<3>::run(segsize, dense_col, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros); - else LU_kernel_bmod::run(segsize, dense_col, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros); - } // End for each column in the panel - } - - } // End for each updating supernode -} // end panel bmod - -} // end namespace internal - -} // end namespace Eigen - -#endif // SPARSELU_PANEL_BMOD_H diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_panel_dfs.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_panel_dfs.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_panel_dfs.h +++ /dev/null @@ -1,258 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/* - - * NOTE: This file is the modified version of [s,d,c,z]panel_dfs.c file in SuperLU - - * -- SuperLU routine (version 2.0) -- - * Univ. of California Berkeley, Xerox Palo Alto Research Center, - * and Lawrence Berkeley National Lab. - * November 15, 1997 - * - * Copyright (c) 1994 by Xerox Corporation. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY - * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program for any - * purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is - * granted, provided the above notices are retained, and a notice that - * the code was modified is included with the above copyright notice. - */ -#ifndef SPARSELU_PANEL_DFS_H -#define SPARSELU_PANEL_DFS_H - -namespace Eigen { - -namespace internal { - -template -struct panel_dfs_traits -{ - typedef typename IndexVector::Scalar StorageIndex; - panel_dfs_traits(Index jcol, StorageIndex* marker) - : m_jcol(jcol), m_marker(marker) - {} - bool update_segrep(Index krep, StorageIndex jj) - { - if(m_marker[krep] -template -void SparseLUImpl::dfs_kernel(const StorageIndex jj, IndexVector& perm_r, - Index& nseg, IndexVector& panel_lsub, IndexVector& segrep, - Ref repfnz_col, IndexVector& xprune, Ref marker, IndexVector& parent, - IndexVector& xplore, GlobalLU_t& glu, - Index& nextl_col, Index krow, Traits& traits - ) -{ - - StorageIndex kmark = marker(krow); - - // For each unmarked krow of jj - marker(krow) = jj; - StorageIndex kperm = perm_r(krow); - if (kperm == emptyIdxLU ) { - // krow is in L : place it in structure of L(*, jj) - panel_lsub(nextl_col++) = StorageIndex(krow); // krow is indexed into A - - traits.mem_expand(panel_lsub, nextl_col, kmark); - } - else - { - // krow is in U : if its supernode-representative krep - // has been explored, update repfnz(*) - // krep = supernode representative of the current row - StorageIndex krep = glu.xsup(glu.supno(kperm)+1) - 1; - // First nonzero element in the current column: - StorageIndex myfnz = repfnz_col(krep); - - if (myfnz != emptyIdxLU ) - { - // Representative visited before - if (myfnz > kperm ) repfnz_col(krep) = kperm; - - } - else - { - // Otherwise, perform dfs starting at krep - StorageIndex oldrep = emptyIdxLU; - parent(krep) = oldrep; - repfnz_col(krep) = kperm; - StorageIndex xdfs = glu.xlsub(krep); - Index maxdfs = xprune(krep); - - StorageIndex kpar; - do - { - // For each unmarked kchild of krep - while (xdfs < maxdfs) - { - StorageIndex kchild = glu.lsub(xdfs); - xdfs++; - StorageIndex chmark = marker(kchild); - - if (chmark != jj ) - { - marker(kchild) = jj; - StorageIndex chperm = perm_r(kchild); - - if (chperm == emptyIdxLU) - { - // case kchild is in L: place it in L(*, j) - panel_lsub(nextl_col++) = kchild; - traits.mem_expand(panel_lsub, nextl_col, chmark); - } - else - { - // case kchild is in U : - // chrep = its supernode-rep. If its rep has been explored, - // update its repfnz(*) - StorageIndex chrep = glu.xsup(glu.supno(chperm)+1) - 1; - myfnz = repfnz_col(chrep); - - if (myfnz != emptyIdxLU) - { // Visited before - if (myfnz > chperm) - repfnz_col(chrep) = chperm; - } - else - { // Cont. dfs at snode-rep of kchild - xplore(krep) = xdfs; - oldrep = krep; - krep = chrep; // Go deeper down G(L) - parent(krep) = oldrep; - repfnz_col(krep) = chperm; - xdfs = glu.xlsub(krep); - maxdfs = xprune(krep); - - } // end if myfnz != -1 - } // end if chperm == -1 - - } // end if chmark !=jj - } // end while xdfs < maxdfs - - // krow has no more unexplored nbrs : - // Place snode-rep krep in postorder DFS, if this - // segment is seen for the first time. (Note that - // "repfnz(krep)" may change later.) - // Baktrack dfs to its parent - if(traits.update_segrep(krep,jj)) - //if (marker1(krep) < jcol ) - { - segrep(nseg) = krep; - ++nseg; - //marker1(krep) = jj; - } - - kpar = parent(krep); // Pop recursion, mimic recursion - if (kpar == emptyIdxLU) - break; // dfs done - krep = kpar; - xdfs = xplore(krep); - maxdfs = xprune(krep); - - } while (kpar != emptyIdxLU); // Do until empty stack - - } // end if (myfnz = -1) - - } // end if (kperm == -1) -} - -/** - * \brief Performs a symbolic factorization on a panel of columns [jcol, jcol+w) - * - * A supernode representative is the last column of a supernode. - * The nonzeros in U[*,j] are segments that end at supernodes representatives - * - * The routine returns a list of the supernodal representatives - * in topological order of the dfs that generates them. This list is - * a superset of the topological order of each individual column within - * the panel. - * The location of the first nonzero in each supernodal segment - * (supernodal entry location) is also returned. Each column has - * a separate list for this purpose. - * - * Two markers arrays are used for dfs : - * marker[i] == jj, if i was visited during dfs of current column jj; - * marker1[i] >= jcol, if i was visited by earlier columns in this panel; - * - * \param[in] m number of rows in the matrix - * \param[in] w Panel size - * \param[in] jcol Starting column of the panel - * \param[in] A Input matrix in column-major storage - * \param[in] perm_r Row permutation - * \param[out] nseg Number of U segments - * \param[out] dense Accumulate the column vectors of the panel - * \param[out] panel_lsub Subscripts of the row in the panel - * \param[out] segrep Segment representative i.e first nonzero row of each segment - * \param[out] repfnz First nonzero location in each row - * \param[out] xprune The pruned elimination tree - * \param[out] marker work vector - * \param parent The elimination tree - * \param xplore work vector - * \param glu The global data structure - * - */ - -template -void SparseLUImpl::panel_dfs(const Index m, const Index w, const Index jcol, MatrixType& A, IndexVector& perm_r, Index& nseg, ScalarVector& dense, IndexVector& panel_lsub, IndexVector& segrep, IndexVector& repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu) -{ - Index nextl_col; // Next available position in panel_lsub[*,jj] - - // Initialize pointers - VectorBlock marker1(marker, m, m); - nseg = 0; - - panel_dfs_traits traits(jcol, marker1.data()); - - // For each column in the panel - for (StorageIndex jj = StorageIndex(jcol); jj < jcol + w; jj++) - { - nextl_col = (jj - jcol) * m; - - VectorBlock repfnz_col(repfnz, nextl_col, m); // First nonzero location in each row - VectorBlock dense_col(dense,nextl_col, m); // Accumulate a column vector here - - - // For each nnz in A[*, jj] do depth first search - for (typename MatrixType::InnerIterator it(A, jj); it; ++it) - { - Index krow = it.row(); - dense_col(krow) = it.value(); - - StorageIndex kmark = marker(krow); - if (kmark == jj) - continue; // krow visited before, go to the next nonzero - - dfs_kernel(jj, perm_r, nseg, panel_lsub, segrep, repfnz_col, xprune, marker, parent, - xplore, glu, nextl_col, krow, traits); - }// end for nonzeros in column jj - - } // end for column jj -} - -} // end namespace internal -} // end namespace Eigen - -#endif // SPARSELU_PANEL_DFS_H diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_pivotL.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_pivotL.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_pivotL.h +++ /dev/null @@ -1,137 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/* - - * NOTE: This file is the modified version of xpivotL.c file in SuperLU - - * -- SuperLU routine (version 3.0) -- - * Univ. of California Berkeley, Xerox Palo Alto Research Center, - * and Lawrence Berkeley National Lab. - * October 15, 2003 - * - * Copyright (c) 1994 by Xerox Corporation. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY - * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program for any - * purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is - * granted, provided the above notices are retained, and a notice that - * the code was modified is included with the above copyright notice. - */ -#ifndef SPARSELU_PIVOTL_H -#define SPARSELU_PIVOTL_H - -namespace Eigen { -namespace internal { - -/** - * \brief Performs the numerical pivotin on the current column of L, and the CDIV operation. - * - * Pivot policy : - * (1) Compute thresh = u * max_(i>=j) abs(A_ij); - * (2) IF user specifies pivot row k and abs(A_kj) >= thresh THEN - * pivot row = k; - * ELSE IF abs(A_jj) >= thresh THEN - * pivot row = j; - * ELSE - * pivot row = m; - * - * Note: If you absolutely want to use a given pivot order, then set u=0.0. - * - * \param jcol The current column of L - * \param diagpivotthresh diagonal pivoting threshold - * \param[in,out] perm_r Row permutation (threshold pivoting) - * \param[in] iperm_c column permutation - used to finf diagonal of Pc*A*Pc' - * \param[out] pivrow The pivot row - * \param glu Global LU data - * \return 0 if success, i > 0 if U(i,i) is exactly zero - * - */ -template -Index SparseLUImpl::pivotL(const Index jcol, const RealScalar& diagpivotthresh, IndexVector& perm_r, IndexVector& iperm_c, Index& pivrow, GlobalLU_t& glu) -{ - - Index fsupc = (glu.xsup)((glu.supno)(jcol)); // First column in the supernode containing the column jcol - Index nsupc = jcol - fsupc; // Number of columns in the supernode portion, excluding jcol; nsupc >=0 - Index lptr = glu.xlsub(fsupc); // pointer to the starting location of the row subscripts for this supernode portion - Index nsupr = glu.xlsub(fsupc+1) - lptr; // Number of rows in the supernode - Index lda = glu.xlusup(fsupc+1) - glu.xlusup(fsupc); // leading dimension - Scalar* lu_sup_ptr = &(glu.lusup.data()[glu.xlusup(fsupc)]); // Start of the current supernode - Scalar* lu_col_ptr = &(glu.lusup.data()[glu.xlusup(jcol)]); // Start of jcol in the supernode - StorageIndex* lsub_ptr = &(glu.lsub.data()[lptr]); // Start of row indices of the supernode - - // Determine the largest abs numerical value for partial pivoting - Index diagind = iperm_c(jcol); // diagonal index - RealScalar pivmax(-1.0); - Index pivptr = nsupc; - Index diag = emptyIdxLU; - RealScalar rtemp; - Index isub, icol, itemp, k; - for (isub = nsupc; isub < nsupr; ++isub) { - using std::abs; - rtemp = abs(lu_col_ptr[isub]); - if (rtemp > pivmax) { - pivmax = rtemp; - pivptr = isub; - } - if (lsub_ptr[isub] == diagind) diag = isub; - } - - // Test for singularity - if ( pivmax <= RealScalar(0.0) ) { - // if pivmax == -1, the column is structurally empty, otherwise it is only numerically zero - pivrow = pivmax < RealScalar(0.0) ? diagind : lsub_ptr[pivptr]; - perm_r(pivrow) = StorageIndex(jcol); - return (jcol+1); - } - - RealScalar thresh = diagpivotthresh * pivmax; - - // Choose appropriate pivotal element - - { - // Test if the diagonal element can be used as a pivot (given the threshold value) - if (diag >= 0 ) - { - // Diagonal element exists - using std::abs; - rtemp = abs(lu_col_ptr[diag]); - if (rtemp != RealScalar(0.0) && rtemp >= thresh) pivptr = diag; - } - pivrow = lsub_ptr[pivptr]; - } - - // Record pivot row - perm_r(pivrow) = StorageIndex(jcol); - // Interchange row subscripts - if (pivptr != nsupc ) - { - std::swap( lsub_ptr[pivptr], lsub_ptr[nsupc] ); - // Interchange numerical values as well, for the two rows in the whole snode - // such that L is indexed the same way as A - for (icol = 0; icol <= nsupc; icol++) - { - itemp = pivptr + icol * lda; - std::swap(lu_sup_ptr[itemp], lu_sup_ptr[nsupc + icol * lda]); - } - } - // cdiv operations - Scalar temp = Scalar(1.0) / lu_col_ptr[nsupc]; - for (k = nsupc+1; k < nsupr; k++) - lu_col_ptr[k] *= temp; - return 0; -} - -} // end namespace internal -} // end namespace Eigen - -#endif // SPARSELU_PIVOTL_H diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_pruneL.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_pruneL.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_pruneL.h +++ /dev/null @@ -1,136 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/* - - * NOTE: This file is the modified version of [s,d,c,z]pruneL.c file in SuperLU - - * -- SuperLU routine (version 2.0) -- - * Univ. of California Berkeley, Xerox Palo Alto Research Center, - * and Lawrence Berkeley National Lab. - * November 15, 1997 - * - * Copyright (c) 1994 by Xerox Corporation. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY - * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program for any - * purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is - * granted, provided the above notices are retained, and a notice that - * the code was modified is included with the above copyright notice. - */ -#ifndef SPARSELU_PRUNEL_H -#define SPARSELU_PRUNEL_H - -namespace Eigen { -namespace internal { - -/** - * \brief Prunes the L-structure. - * - * It prunes the L-structure of supernodes whose L-structure contains the current pivot row "pivrow" - * - * - * \param jcol The current column of L - * \param[in] perm_r Row permutation - * \param[out] pivrow The pivot row - * \param nseg Number of segments - * \param segrep - * \param repfnz - * \param[out] xprune - * \param glu Global LU data - * - */ -template -void SparseLUImpl::pruneL(const Index jcol, const IndexVector& perm_r, const Index pivrow, const Index nseg, - const IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, GlobalLU_t& glu) -{ - // For each supernode-rep irep in U(*,j] - Index jsupno = glu.supno(jcol); - Index i,irep,irep1; - bool movnum, do_prune = false; - Index kmin = 0, kmax = 0, minloc, maxloc,krow; - for (i = 0; i < nseg; i++) - { - irep = segrep(i); - irep1 = irep + 1; - do_prune = false; - - // Don't prune with a zero U-segment - if (repfnz(irep) == emptyIdxLU) continue; - - // If a snode overlaps with the next panel, then the U-segment - // is fragmented into two parts -- irep and irep1. We should let - // pruning occur at the rep-column in irep1s snode. - if (glu.supno(irep) == glu.supno(irep1) ) continue; // don't prune - - // If it has not been pruned & it has a nonz in row L(pivrow,i) - if (glu.supno(irep) != jsupno ) - { - if ( xprune (irep) >= glu.xlsub(irep1) ) - { - kmin = glu.xlsub(irep); - kmax = glu.xlsub(irep1) - 1; - for (krow = kmin; krow <= kmax; krow++) - { - if (glu.lsub(krow) == pivrow) - { - do_prune = true; - break; - } - } - } - - if (do_prune) - { - // do a quicksort-type partition - // movnum=true means that the num values have to be exchanged - movnum = false; - if (irep == glu.xsup(glu.supno(irep)) ) // Snode of size 1 - movnum = true; - - while (kmin <= kmax) - { - if (perm_r(glu.lsub(kmax)) == emptyIdxLU) - kmax--; - else if ( perm_r(glu.lsub(kmin)) != emptyIdxLU) - kmin++; - else - { - // kmin below pivrow (not yet pivoted), and kmax - // above pivrow: interchange the two suscripts - std::swap(glu.lsub(kmin), glu.lsub(kmax)); - - // If the supernode has only one column, then we - // only keep one set of subscripts. For any subscript - // intercnahge performed, similar interchange must be - // done on the numerical values. - if (movnum) - { - minloc = glu.xlusup(irep) + ( kmin - glu.xlsub(irep) ); - maxloc = glu.xlusup(irep) + ( kmax - glu.xlsub(irep) ); - std::swap(glu.lusup(minloc), glu.lusup(maxloc)); - } - kmin++; - kmax--; - } - } // end while - - xprune(irep) = StorageIndex(kmin); //Pruning - } // end if do_prune - } // end pruning - } // End for each U-segment -} - -} // end namespace internal -} // end namespace Eigen - -#endif // SPARSELU_PRUNEL_H diff --git a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_relax_snode.h b/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_relax_snode.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseLU/SparseLU_relax_snode.h +++ /dev/null @@ -1,83 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012 Désiré Nuentsa-Wakam -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/* This file is a modified version of heap_relax_snode.c file in SuperLU - * -- SuperLU routine (version 3.0) -- - * Univ. of California Berkeley, Xerox Palo Alto Research Center, - * and Lawrence Berkeley National Lab. - * October 15, 2003 - * - * Copyright (c) 1994 by Xerox Corporation. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY - * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program for any - * purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is - * granted, provided the above notices are retained, and a notice that - * the code was modified is included with the above copyright notice. - */ - -#ifndef SPARSELU_RELAX_SNODE_H -#define SPARSELU_RELAX_SNODE_H - -namespace Eigen { - -namespace internal { - -/** - * \brief Identify the initial relaxed supernodes - * - * This routine is applied to a column elimination tree. - * It assumes that the matrix has been reordered according to the postorder of the etree - * \param n the number of columns - * \param et elimination tree - * \param relax_columns Maximum number of columns allowed in a relaxed snode - * \param descendants Number of descendants of each node in the etree - * \param relax_end last column in a supernode - */ -template -void SparseLUImpl::relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end) -{ - - // compute the number of descendants of each node in the etree - Index parent; - relax_end.setConstant(emptyIdxLU); - descendants.setZero(); - for (Index j = 0; j < n; j++) - { - parent = et(j); - if (parent != n) // not the dummy root - descendants(parent) += descendants(j) + 1; - } - // Identify the relaxed supernodes by postorder traversal of the etree - Index snode_start; // beginning of a snode - for (Index j = 0; j < n; ) - { - parent = et(j); - snode_start = j; - while ( parent != n && descendants(parent) < relax_columns ) - { - j = parent; - parent = et(j); - } - // Found a supernode in postordered etree, j is the last column - relax_end(snode_start) = StorageIndex(j); // Record last column - j++; - // Search for a new leaf - while (descendants(j) != 0 && j < n) j++; - } // End postorder traversal of the etree - -} - -} // end namespace internal - -} // end namespace Eigen -#endif diff --git a/include/Rivet/Math/eigen3/src/SparseQR/SparseQR.h b/include/Rivet/Math/eigen3/src/SparseQR/SparseQR.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SparseQR/SparseQR.h +++ /dev/null @@ -1,739 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2012-2013 Desire Nuentsa -// Copyright (C) 2012-2014 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SPARSE_QR_H -#define EIGEN_SPARSE_QR_H - -namespace Eigen { - -template class SparseQR; -template struct SparseQRMatrixQReturnType; -template struct SparseQRMatrixQTransposeReturnType; -template struct SparseQR_QProduct; -namespace internal { - template struct traits > - { - typedef typename SparseQRType::MatrixType ReturnType; - typedef typename ReturnType::StorageIndex StorageIndex; - typedef typename ReturnType::StorageKind StorageKind; - enum { - RowsAtCompileTime = Dynamic, - ColsAtCompileTime = Dynamic - }; - }; - template struct traits > - { - typedef typename SparseQRType::MatrixType ReturnType; - }; - template struct traits > - { - typedef typename Derived::PlainObject ReturnType; - }; -} // End namespace internal - -/** - * \ingroup SparseQR_Module - * \class SparseQR - * \brief Sparse left-looking rank-revealing QR factorization - * - * This class implements a left-looking rank-revealing QR decomposition - * of sparse matrices. When a column has a norm less than a given tolerance - * it is implicitly permuted to the end. The QR factorization thus obtained is - * given by A*P = Q*R where R is upper triangular or trapezoidal. - * - * P is the column permutation which is the product of the fill-reducing and the - * rank-revealing permutations. Use colsPermutation() to get it. - * - * Q is the orthogonal matrix represented as products of Householder reflectors. - * Use matrixQ() to get an expression and matrixQ().transpose() to get the transpose. - * You can then apply it to a vector. - * - * R is the sparse triangular or trapezoidal matrix. The later occurs when A is rank-deficient. - * matrixR().topLeftCorner(rank(), rank()) always returns a triangular factor of full rank. - * - * \tparam _MatrixType The type of the sparse matrix A, must be a column-major SparseMatrix<> - * \tparam _OrderingType The fill-reducing ordering method. See the \link OrderingMethods_Module - * OrderingMethods \endlink module for the list of built-in and external ordering methods. - * - * \implsparsesolverconcept - * - * \warning The input sparse matrix A must be in compressed mode (see SparseMatrix::makeCompressed()). - * - */ -template -class SparseQR : public SparseSolverBase > -{ - protected: - typedef SparseSolverBase > Base; - using Base::m_isInitialized; - public: - using Base::_solve_impl; - typedef _MatrixType MatrixType; - typedef _OrderingType OrderingType; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef SparseMatrix QRMatrixType; - typedef Matrix IndexVector; - typedef Matrix ScalarVector; - typedef PermutationMatrix PermutationType; - - enum { - ColsAtCompileTime = MatrixType::ColsAtCompileTime, - MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime - }; - - public: - SparseQR () : m_analysisIsok(false), m_lastError(""), m_useDefaultThreshold(true),m_isQSorted(false),m_isEtreeOk(false) - { } - - /** Construct a QR factorization of the matrix \a mat. - * - * \warning The matrix \a mat must be in compressed mode (see SparseMatrix::makeCompressed()). - * - * \sa compute() - */ - explicit SparseQR(const MatrixType& mat) : m_analysisIsok(false), m_lastError(""), m_useDefaultThreshold(true),m_isQSorted(false),m_isEtreeOk(false) - { - compute(mat); - } - - /** Computes the QR factorization of the sparse matrix \a mat. - * - * \warning The matrix \a mat must be in compressed mode (see SparseMatrix::makeCompressed()). - * - * \sa analyzePattern(), factorize() - */ - void compute(const MatrixType& mat) - { - analyzePattern(mat); - factorize(mat); - } - void analyzePattern(const MatrixType& mat); - void factorize(const MatrixType& mat); - - /** \returns the number of rows of the represented matrix. - */ - inline Index rows() const { return m_pmat.rows(); } - - /** \returns the number of columns of the represented matrix. - */ - inline Index cols() const { return m_pmat.cols();} - - /** \returns a const reference to the \b sparse upper triangular matrix R of the QR factorization. - * \warning The entries of the returned matrix are not sorted. This means that using it in algorithms - * expecting sorted entries will fail. This include random coefficient accesses (SpaseMatrix::coeff()), - * and coefficient-wise operations. Matrix products and triangular solves are fine though. - * - * To sort the entries, you can assign it to a row-major matrix, and if a column-major matrix - * is required, you can copy it again: - * \code - * SparseMatrix R = qr.matrixR(); // column-major, not sorted! - * SparseMatrix Rr = qr.matrixR(); // row-major, sorted - * SparseMatrix Rc = Rr; // column-major, sorted - * \endcode - */ - const QRMatrixType& matrixR() const { return m_R; } - - /** \returns the number of non linearly dependent columns as determined by the pivoting threshold. - * - * \sa setPivotThreshold() - */ - Index rank() const - { - eigen_assert(m_isInitialized && "The factorization should be called first, use compute()"); - return m_nonzeropivots; - } - - /** \returns an expression of the matrix Q as products of sparse Householder reflectors. - * The common usage of this function is to apply it to a dense matrix or vector - * \code - * VectorXd B1, B2; - * // Initialize B1 - * B2 = matrixQ() * B1; - * \endcode - * - * To get a plain SparseMatrix representation of Q: - * \code - * SparseMatrix Q; - * Q = SparseQR >(A).matrixQ(); - * \endcode - * Internally, this call simply performs a sparse product between the matrix Q - * and a sparse identity matrix. However, due to the fact that the sparse - * reflectors are stored unsorted, two transpositions are needed to sort - * them before performing the product. - */ - SparseQRMatrixQReturnType matrixQ() const - { return SparseQRMatrixQReturnType(*this); } - - /** \returns a const reference to the column permutation P that was applied to A such that A*P = Q*R - * It is the combination of the fill-in reducing permutation and numerical column pivoting. - */ - const PermutationType& colsPermutation() const - { - eigen_assert(m_isInitialized && "Decomposition is not initialized."); - return m_outputPerm_c; - } - - /** \returns A string describing the type of error. - * This method is provided to ease debugging, not to handle errors. - */ - std::string lastErrorMessage() const { return m_lastError; } - - /** \internal */ - template - bool _solve_impl(const MatrixBase &B, MatrixBase &dest) const - { - eigen_assert(m_isInitialized && "The factorization should be called first, use compute()"); - eigen_assert(this->rows() == B.rows() && "SparseQR::solve() : invalid number of rows in the right hand side matrix"); - - Index rank = this->rank(); - - // Compute Q^T * b; - typename Dest::PlainObject y, b; - y = this->matrixQ().transpose() * B; - b = y; - - // Solve with the triangular matrix R - y.resize((std::max)(cols(),y.rows()),y.cols()); - y.topRows(rank) = this->matrixR().topLeftCorner(rank, rank).template triangularView().solve(b.topRows(rank)); - y.bottomRows(y.rows()-rank).setZero(); - - // Apply the column permutation - if (m_perm_c.size()) dest = colsPermutation() * y.topRows(cols()); - else dest = y.topRows(cols()); - - m_info = Success; - return true; - } - - /** Sets the threshold that is used to determine linearly dependent columns during the factorization. - * - * In practice, if during the factorization the norm of the column that has to be eliminated is below - * this threshold, then the entire column is treated as zero, and it is moved at the end. - */ - void setPivotThreshold(const RealScalar& threshold) - { - m_useDefaultThreshold = false; - m_threshold = threshold; - } - - /** \returns the solution X of \f$ A X = B \f$ using the current decomposition of A. - * - * \sa compute() - */ - template - inline const Solve solve(const MatrixBase& B) const - { - eigen_assert(m_isInitialized && "The factorization should be called first, use compute()"); - eigen_assert(this->rows() == B.rows() && "SparseQR::solve() : invalid number of rows in the right hand side matrix"); - return Solve(*this, B.derived()); - } - template - inline const Solve solve(const SparseMatrixBase& B) const - { - eigen_assert(m_isInitialized && "The factorization should be called first, use compute()"); - eigen_assert(this->rows() == B.rows() && "SparseQR::solve() : invalid number of rows in the right hand side matrix"); - return Solve(*this, B.derived()); - } - - /** \brief Reports whether previous computation was successful. - * - * \returns \c Success if computation was successful, - * \c NumericalIssue if the QR factorization reports a numerical problem - * \c InvalidInput if the input matrix is invalid - * - * \sa iparm() - */ - ComputationInfo info() const - { - eigen_assert(m_isInitialized && "Decomposition is not initialized."); - return m_info; - } - - - /** \internal */ - inline void _sort_matrix_Q() - { - if(this->m_isQSorted) return; - // The matrix Q is sorted during the transposition - SparseMatrix mQrm(this->m_Q); - this->m_Q = mQrm; - this->m_isQSorted = true; - } - - - protected: - bool m_analysisIsok; - bool m_factorizationIsok; - mutable ComputationInfo m_info; - std::string m_lastError; - QRMatrixType m_pmat; // Temporary matrix - QRMatrixType m_R; // The triangular factor matrix - QRMatrixType m_Q; // The orthogonal reflectors - ScalarVector m_hcoeffs; // The Householder coefficients - PermutationType m_perm_c; // Fill-reducing Column permutation - PermutationType m_pivotperm; // The permutation for rank revealing - PermutationType m_outputPerm_c; // The final column permutation - RealScalar m_threshold; // Threshold to determine null Householder reflections - bool m_useDefaultThreshold; // Use default threshold - Index m_nonzeropivots; // Number of non zero pivots found - IndexVector m_etree; // Column elimination tree - IndexVector m_firstRowElt; // First element in each row - bool m_isQSorted; // whether Q is sorted or not - bool m_isEtreeOk; // whether the elimination tree match the initial input matrix - - template friend struct SparseQR_QProduct; - -}; - -/** \brief Preprocessing step of a QR factorization - * - * \warning The matrix \a mat must be in compressed mode (see SparseMatrix::makeCompressed()). - * - * In this step, the fill-reducing permutation is computed and applied to the columns of A - * and the column elimination tree is computed as well. Only the sparsity pattern of \a mat is exploited. - * - * \note In this step it is assumed that there is no empty row in the matrix \a mat. - */ -template -void SparseQR::analyzePattern(const MatrixType& mat) -{ - eigen_assert(mat.isCompressed() && "SparseQR requires a sparse matrix in compressed mode. Call .makeCompressed() before passing it to SparseQR"); - // Copy to a column major matrix if the input is rowmajor - typename internal::conditional::type matCpy(mat); - // Compute the column fill reducing ordering - OrderingType ord; - ord(matCpy, m_perm_c); - Index n = mat.cols(); - Index m = mat.rows(); - Index diagSize = (std::min)(m,n); - - if (!m_perm_c.size()) - { - m_perm_c.resize(n); - m_perm_c.indices().setLinSpaced(n, 0,StorageIndex(n-1)); - } - - // Compute the column elimination tree of the permuted matrix - m_outputPerm_c = m_perm_c.inverse(); - internal::coletree(matCpy, m_etree, m_firstRowElt, m_outputPerm_c.indices().data()); - m_isEtreeOk = true; - - m_R.resize(m, n); - m_Q.resize(m, diagSize); - - // Allocate space for nonzero elements : rough estimation - m_R.reserve(2*mat.nonZeros()); //FIXME Get a more accurate estimation through symbolic factorization with the etree - m_Q.reserve(2*mat.nonZeros()); - m_hcoeffs.resize(diagSize); - m_analysisIsok = true; -} - -/** \brief Performs the numerical QR factorization of the input matrix - * - * The function SparseQR::analyzePattern(const MatrixType&) must have been called beforehand with - * a matrix having the same sparsity pattern than \a mat. - * - * \param mat The sparse column-major matrix - */ -template -void SparseQR::factorize(const MatrixType& mat) -{ - using std::abs; - - eigen_assert(m_analysisIsok && "analyzePattern() should be called before this step"); - StorageIndex m = StorageIndex(mat.rows()); - StorageIndex n = StorageIndex(mat.cols()); - StorageIndex diagSize = (std::min)(m,n); - IndexVector mark((std::max)(m,n)); mark.setConstant(-1); // Record the visited nodes - IndexVector Ridx(n), Qidx(m); // Store temporarily the row indexes for the current column of R and Q - Index nzcolR, nzcolQ; // Number of nonzero for the current column of R and Q - ScalarVector tval(m); // The dense vector used to compute the current column - RealScalar pivotThreshold = m_threshold; - - m_R.setZero(); - m_Q.setZero(); - m_pmat = mat; - if(!m_isEtreeOk) - { - m_outputPerm_c = m_perm_c.inverse(); - internal::coletree(m_pmat, m_etree, m_firstRowElt, m_outputPerm_c.indices().data()); - m_isEtreeOk = true; - } - - m_pmat.uncompress(); // To have the innerNonZeroPtr allocated - - // Apply the fill-in reducing permutation lazily: - { - // If the input is row major, copy the original column indices, - // otherwise directly use the input matrix - // - IndexVector originalOuterIndicesCpy; - const StorageIndex *originalOuterIndices = mat.outerIndexPtr(); - if(MatrixType::IsRowMajor) - { - originalOuterIndicesCpy = IndexVector::Map(m_pmat.outerIndexPtr(),n+1); - originalOuterIndices = originalOuterIndicesCpy.data(); - } - - for (int i = 0; i < n; i++) - { - Index p = m_perm_c.size() ? m_perm_c.indices()(i) : i; - m_pmat.outerIndexPtr()[p] = originalOuterIndices[i]; - m_pmat.innerNonZeroPtr()[p] = originalOuterIndices[i+1] - originalOuterIndices[i]; - } - } - - /* Compute the default threshold as in MatLab, see: - * Tim Davis, "Algorithm 915, SuiteSparseQR: Multifrontal Multithreaded Rank-Revealing - * Sparse QR Factorization, ACM Trans. on Math. Soft. 38(1), 2011, Page 8:3 - */ - if(m_useDefaultThreshold) - { - RealScalar max2Norm = 0.0; - for (int j = 0; j < n; j++) max2Norm = numext::maxi(max2Norm, m_pmat.col(j).norm()); - if(max2Norm==RealScalar(0)) - max2Norm = RealScalar(1); - pivotThreshold = 20 * (m + n) * max2Norm * NumTraits::epsilon(); - } - - // Initialize the numerical permutation - m_pivotperm.setIdentity(n); - - StorageIndex nonzeroCol = 0; // Record the number of valid pivots - m_Q.startVec(0); - - // Left looking rank-revealing QR factorization: compute a column of R and Q at a time - for (StorageIndex col = 0; col < n; ++col) - { - mark.setConstant(-1); - m_R.startVec(col); - mark(nonzeroCol) = col; - Qidx(0) = nonzeroCol; - nzcolR = 0; nzcolQ = 1; - bool found_diag = nonzeroCol>=m; - tval.setZero(); - - // Symbolic factorization: find the nonzero locations of the column k of the factors R and Q, i.e., - // all the nodes (with indexes lower than rank) reachable through the column elimination tree (etree) rooted at node k. - // Note: if the diagonal entry does not exist, then its contribution must be explicitly added, - // thus the trick with found_diag that permits to do one more iteration on the diagonal element if this one has not been found. - for (typename QRMatrixType::InnerIterator itp(m_pmat, col); itp || !found_diag; ++itp) - { - StorageIndex curIdx = nonzeroCol; - if(itp) curIdx = StorageIndex(itp.row()); - if(curIdx == nonzeroCol) found_diag = true; - - // Get the nonzeros indexes of the current column of R - StorageIndex st = m_firstRowElt(curIdx); // The traversal of the etree starts here - if (st < 0 ) - { - m_lastError = "Empty row found during numerical factorization"; - m_info = InvalidInput; - return; - } - - // Traverse the etree - Index bi = nzcolR; - for (; mark(st) != col; st = m_etree(st)) - { - Ridx(nzcolR) = st; // Add this row to the list, - mark(st) = col; // and mark this row as visited - nzcolR++; - } - - // Reverse the list to get the topological ordering - Index nt = nzcolR-bi; - for(Index i = 0; i < nt/2; i++) std::swap(Ridx(bi+i), Ridx(nzcolR-i-1)); - - // Copy the current (curIdx,pcol) value of the input matrix - if(itp) tval(curIdx) = itp.value(); - else tval(curIdx) = Scalar(0); - - // Compute the pattern of Q(:,k) - if(curIdx > nonzeroCol && mark(curIdx) != col ) - { - Qidx(nzcolQ) = curIdx; // Add this row to the pattern of Q, - mark(curIdx) = col; // and mark it as visited - nzcolQ++; - } - } - - // Browse all the indexes of R(:,col) in reverse order - for (Index i = nzcolR-1; i >= 0; i--) - { - Index curIdx = Ridx(i); - - // Apply the curIdx-th householder vector to the current column (temporarily stored into tval) - Scalar tdot(0); - - // First compute q' * tval - tdot = m_Q.col(curIdx).dot(tval); - - tdot *= m_hcoeffs(curIdx); - - // Then update tval = tval - q * tau - // FIXME: tval -= tdot * m_Q.col(curIdx) should amount to the same (need to check/add support for efficient "dense ?= sparse") - for (typename QRMatrixType::InnerIterator itq(m_Q, curIdx); itq; ++itq) - tval(itq.row()) -= itq.value() * tdot; - - // Detect fill-in for the current column of Q - if(m_etree(Ridx(i)) == nonzeroCol) - { - for (typename QRMatrixType::InnerIterator itq(m_Q, curIdx); itq; ++itq) - { - StorageIndex iQ = StorageIndex(itq.row()); - if (mark(iQ) != col) - { - Qidx(nzcolQ++) = iQ; // Add this row to the pattern of Q, - mark(iQ) = col; // and mark it as visited - } - } - } - } // End update current column - - Scalar tau = RealScalar(0); - RealScalar beta = 0; - - if(nonzeroCol < diagSize) - { - // Compute the Householder reflection that eliminate the current column - // FIXME this step should call the Householder module. - Scalar c0 = nzcolQ ? tval(Qidx(0)) : Scalar(0); - - // First, the squared norm of Q((col+1):m, col) - RealScalar sqrNorm = 0.; - for (Index itq = 1; itq < nzcolQ; ++itq) sqrNorm += numext::abs2(tval(Qidx(itq))); - if(sqrNorm == RealScalar(0) && numext::imag(c0) == RealScalar(0)) - { - beta = numext::real(c0); - tval(Qidx(0)) = 1; - } - else - { - using std::sqrt; - beta = sqrt(numext::abs2(c0) + sqrNorm); - if(numext::real(c0) >= RealScalar(0)) - beta = -beta; - tval(Qidx(0)) = 1; - for (Index itq = 1; itq < nzcolQ; ++itq) - tval(Qidx(itq)) /= (c0 - beta); - tau = numext::conj((beta-c0) / beta); - - } - } - - // Insert values in R - for (Index i = nzcolR-1; i >= 0; i--) - { - Index curIdx = Ridx(i); - if(curIdx < nonzeroCol) - { - m_R.insertBackByOuterInnerUnordered(col, curIdx) = tval(curIdx); - tval(curIdx) = Scalar(0.); - } - } - - if(nonzeroCol < diagSize && abs(beta) >= pivotThreshold) - { - m_R.insertBackByOuterInner(col, nonzeroCol) = beta; - // The householder coefficient - m_hcoeffs(nonzeroCol) = tau; - // Record the householder reflections - for (Index itq = 0; itq < nzcolQ; ++itq) - { - Index iQ = Qidx(itq); - m_Q.insertBackByOuterInnerUnordered(nonzeroCol,iQ) = tval(iQ); - tval(iQ) = Scalar(0.); - } - nonzeroCol++; - if(nonzeroCol -struct SparseQR_QProduct : ReturnByValue > -{ - typedef typename SparseQRType::QRMatrixType MatrixType; - typedef typename SparseQRType::Scalar Scalar; - // Get the references - SparseQR_QProduct(const SparseQRType& qr, const Derived& other, bool transpose) : - m_qr(qr),m_other(other),m_transpose(transpose) {} - inline Index rows() const { return m_transpose ? m_qr.rows() : m_qr.cols(); } - inline Index cols() const { return m_other.cols(); } - - // Assign to a vector - template - void evalTo(DesType& res) const - { - Index m = m_qr.rows(); - Index n = m_qr.cols(); - Index diagSize = (std::min)(m,n); - res = m_other; - if (m_transpose) - { - eigen_assert(m_qr.m_Q.rows() == m_other.rows() && "Non conforming object sizes"); - //Compute res = Q' * other column by column - for(Index j = 0; j < res.cols(); j++){ - for (Index k = 0; k < diagSize; k++) - { - Scalar tau = Scalar(0); - tau = m_qr.m_Q.col(k).dot(res.col(j)); - if(tau==Scalar(0)) continue; - tau = tau * m_qr.m_hcoeffs(k); - res.col(j) -= tau * m_qr.m_Q.col(k); - } - } - } - else - { - eigen_assert(m_qr.m_Q.rows() == m_other.rows() && "Non conforming object sizes"); - // Compute res = Q * other column by column - for(Index j = 0; j < res.cols(); j++) - { - for (Index k = diagSize-1; k >=0; k--) - { - Scalar tau = Scalar(0); - tau = m_qr.m_Q.col(k).dot(res.col(j)); - if(tau==Scalar(0)) continue; - tau = tau * m_qr.m_hcoeffs(k); - res.col(j) -= tau * m_qr.m_Q.col(k); - } - } - } - } - - const SparseQRType& m_qr; - const Derived& m_other; - bool m_transpose; -}; - -template -struct SparseQRMatrixQReturnType : public EigenBase > -{ - typedef typename SparseQRType::Scalar Scalar; - typedef Matrix DenseMatrix; - enum { - RowsAtCompileTime = Dynamic, - ColsAtCompileTime = Dynamic - }; - explicit SparseQRMatrixQReturnType(const SparseQRType& qr) : m_qr(qr) {} - template - SparseQR_QProduct operator*(const MatrixBase& other) - { - return SparseQR_QProduct(m_qr,other.derived(),false); - } - SparseQRMatrixQTransposeReturnType adjoint() const - { - return SparseQRMatrixQTransposeReturnType(m_qr); - } - inline Index rows() const { return m_qr.rows(); } - inline Index cols() const { return (std::min)(m_qr.rows(),m_qr.cols()); } - // To use for operations with the transpose of Q - SparseQRMatrixQTransposeReturnType transpose() const - { - return SparseQRMatrixQTransposeReturnType(m_qr); - } - const SparseQRType& m_qr; -}; - -template -struct SparseQRMatrixQTransposeReturnType -{ - explicit SparseQRMatrixQTransposeReturnType(const SparseQRType& qr) : m_qr(qr) {} - template - SparseQR_QProduct operator*(const MatrixBase& other) - { - return SparseQR_QProduct(m_qr,other.derived(), true); - } - const SparseQRType& m_qr; -}; - -namespace internal { - -template -struct evaluator_traits > -{ - typedef typename SparseQRType::MatrixType MatrixType; - typedef typename storage_kind_to_evaluator_kind::Kind Kind; - typedef SparseShape Shape; -}; - -template< typename DstXprType, typename SparseQRType> -struct Assignment, internal::assign_op, Sparse2Sparse> -{ - typedef SparseQRMatrixQReturnType SrcXprType; - typedef typename DstXprType::Scalar Scalar; - typedef typename DstXprType::StorageIndex StorageIndex; - static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op &/*func*/) - { - typename DstXprType::PlainObject idMat(src.m_qr.rows(), src.m_qr.rows()); - idMat.setIdentity(); - // Sort the sparse householder reflectors if needed - const_cast(&src.m_qr)->_sort_matrix_Q(); - dst = SparseQR_QProduct(src.m_qr, idMat, false); - } -}; - -template< typename DstXprType, typename SparseQRType> -struct Assignment, internal::assign_op, Sparse2Dense> -{ - typedef SparseQRMatrixQReturnType SrcXprType; - typedef typename DstXprType::Scalar Scalar; - typedef typename DstXprType::StorageIndex StorageIndex; - static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op &/*func*/) - { - dst = src.m_qr.matrixQ() * DstXprType::Identity(src.m_qr.rows(), src.m_qr.rows()); - } -}; - -} // end namespace internal - -} // end namespace Eigen - -#endif diff --git a/include/Rivet/Math/eigen3/src/StlSupport/StdDeque.h b/include/Rivet/Math/eigen3/src/StlSupport/StdDeque.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/StlSupport/StdDeque.h +++ /dev/null @@ -1,126 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2009 Gael Guennebaud -// Copyright (C) 2009 Hauke Heibel -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_STDDEQUE_H -#define EIGEN_STDDEQUE_H - -#include "details.h" - -/** - * This section contains a convenience MACRO which allows an easy specialization of - * std::deque such that for data types with alignment issues the correct allocator - * is used automatically. - */ -#define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) \ -namespace std \ -{ \ - template<> \ - class deque<__VA_ARGS__, std::allocator<__VA_ARGS__> > \ - : public deque<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > \ - { \ - typedef deque<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > deque_base; \ - public: \ - typedef __VA_ARGS__ value_type; \ - typedef deque_base::allocator_type allocator_type; \ - typedef deque_base::size_type size_type; \ - typedef deque_base::iterator iterator; \ - explicit deque(const allocator_type& a = allocator_type()) : deque_base(a) {} \ - template \ - deque(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : deque_base(first, last, a) {} \ - deque(const deque& c) : deque_base(c) {} \ - explicit deque(size_type num, const value_type& val = value_type()) : deque_base(num, val) {} \ - deque(iterator start, iterator end) : deque_base(start, end) {} \ - deque& operator=(const deque& x) { \ - deque_base::operator=(x); \ - return *this; \ - } \ - }; \ -} - -// check whether we really need the std::deque specialization -#if !EIGEN_HAS_CXX11_CONTAINERS && !(defined(_GLIBCXX_DEQUE) && (!EIGEN_GNUC_AT_LEAST(4,1))) /* Note that before gcc-4.1 we already have: std::deque::resize(size_type,const T&). */ - -namespace std { - -#define EIGEN_STD_DEQUE_SPECIALIZATION_BODY \ - public: \ - typedef T value_type; \ - typedef typename deque_base::allocator_type allocator_type; \ - typedef typename deque_base::size_type size_type; \ - typedef typename deque_base::iterator iterator; \ - typedef typename deque_base::const_iterator const_iterator; \ - explicit deque(const allocator_type& a = allocator_type()) : deque_base(a) {} \ - template \ - deque(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) \ - : deque_base(first, last, a) {} \ - deque(const deque& c) : deque_base(c) {} \ - explicit deque(size_type num, const value_type& val = value_type()) : deque_base(num, val) {} \ - deque(iterator start, iterator end) : deque_base(start, end) {} \ - deque& operator=(const deque& x) { \ - deque_base::operator=(x); \ - return *this; \ - } - - template - class deque > - : public deque > -{ - typedef deque > deque_base; - EIGEN_STD_DEQUE_SPECIALIZATION_BODY - - void resize(size_type new_size) - { resize(new_size, T()); } - -#if defined(_DEQUE_) - // workaround MSVC std::deque implementation - void resize(size_type new_size, const value_type& x) - { - if (deque_base::size() < new_size) - deque_base::_Insert_n(deque_base::end(), new_size - deque_base::size(), x); - else if (new_size < deque_base::size()) - deque_base::erase(deque_base::begin() + new_size, deque_base::end()); - } - void push_back(const value_type& x) - { deque_base::push_back(x); } - void push_front(const value_type& x) - { deque_base::push_front(x); } - using deque_base::insert; - iterator insert(const_iterator position, const value_type& x) - { return deque_base::insert(position,x); } - void insert(const_iterator position, size_type new_size, const value_type& x) - { deque_base::insert(position, new_size, x); } -#elif defined(_GLIBCXX_DEQUE) && EIGEN_GNUC_AT_LEAST(4,2) - // workaround GCC std::deque implementation - void resize(size_type new_size, const value_type& x) - { - if (new_size < deque_base::size()) - deque_base::_M_erase_at_end(this->_M_impl._M_start + new_size); - else - deque_base::insert(deque_base::end(), new_size - deque_base::size(), x); - } -#else - // either GCC 4.1 or non-GCC - // default implementation which should always work. - void resize(size_type new_size, const value_type& x) - { - if (new_size < deque_base::size()) - deque_base::erase(deque_base::begin() + new_size, deque_base::end()); - else if (new_size > deque_base::size()) - deque_base::insert(deque_base::end(), new_size - deque_base::size(), x); - } -#endif - }; -} - -#endif // check whether specialization is actually required - -#endif // EIGEN_STDDEQUE_H diff --git a/include/Rivet/Math/eigen3/src/StlSupport/StdList.h b/include/Rivet/Math/eigen3/src/StlSupport/StdList.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/StlSupport/StdList.h +++ /dev/null @@ -1,106 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2009 Hauke Heibel -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_STDLIST_H -#define EIGEN_STDLIST_H - -#include "details.h" - -/** - * This section contains a convenience MACRO which allows an easy specialization of - * std::list such that for data types with alignment issues the correct allocator - * is used automatically. - */ -#define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) \ -namespace std \ -{ \ - template<> \ - class list<__VA_ARGS__, std::allocator<__VA_ARGS__> > \ - : public list<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > \ - { \ - typedef list<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > list_base; \ - public: \ - typedef __VA_ARGS__ value_type; \ - typedef list_base::allocator_type allocator_type; \ - typedef list_base::size_type size_type; \ - typedef list_base::iterator iterator; \ - explicit list(const allocator_type& a = allocator_type()) : list_base(a) {} \ - template \ - list(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : list_base(first, last, a) {} \ - list(const list& c) : list_base(c) {} \ - explicit list(size_type num, const value_type& val = value_type()) : list_base(num, val) {} \ - list(iterator start, iterator end) : list_base(start, end) {} \ - list& operator=(const list& x) { \ - list_base::operator=(x); \ - return *this; \ - } \ - }; \ -} - -// check whether we really need the std::list specialization -#if !EIGEN_HAS_CXX11_CONTAINERS && !(defined(_GLIBCXX_LIST) && (!EIGEN_GNUC_AT_LEAST(4,1))) /* Note that before gcc-4.1 we already have: std::list::resize(size_type,const T&). */ - -namespace std -{ - -#define EIGEN_STD_LIST_SPECIALIZATION_BODY \ - public: \ - typedef T value_type; \ - typedef typename list_base::allocator_type allocator_type; \ - typedef typename list_base::size_type size_type; \ - typedef typename list_base::iterator iterator; \ - typedef typename list_base::const_iterator const_iterator; \ - explicit list(const allocator_type& a = allocator_type()) : list_base(a) {} \ - template \ - list(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) \ - : list_base(first, last, a) {} \ - list(const list& c) : list_base(c) {} \ - explicit list(size_type num, const value_type& val = value_type()) : list_base(num, val) {} \ - list(iterator start, iterator end) : list_base(start, end) {} \ - list& operator=(const list& x) { \ - list_base::operator=(x); \ - return *this; \ - } - - template - class list > - : public list > - { - typedef list > list_base; - EIGEN_STD_LIST_SPECIALIZATION_BODY - - void resize(size_type new_size) - { resize(new_size, T()); } - - void resize(size_type new_size, const value_type& x) - { - if (list_base::size() < new_size) - list_base::insert(list_base::end(), new_size - list_base::size(), x); - else - while (new_size < list_base::size()) list_base::pop_back(); - } - -#if defined(_LIST_) - // workaround MSVC std::list implementation - void push_back(const value_type& x) - { list_base::push_back(x); } - using list_base::insert; - iterator insert(const_iterator position, const value_type& x) - { return list_base::insert(position,x); } - void insert(const_iterator position, size_type new_size, const value_type& x) - { list_base::insert(position, new_size, x); } -#endif - }; -} - -#endif // check whether specialization is actually required - -#endif // EIGEN_STDLIST_H diff --git a/include/Rivet/Math/eigen3/src/StlSupport/StdVector.h b/include/Rivet/Math/eigen3/src/StlSupport/StdVector.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/StlSupport/StdVector.h +++ /dev/null @@ -1,131 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2009 Gael Guennebaud -// Copyright (C) 2009 Hauke Heibel -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_STDVECTOR_H -#define EIGEN_STDVECTOR_H - -#include "details.h" - -/** - * This section contains a convenience MACRO which allows an easy specialization of - * std::vector such that for data types with alignment issues the correct allocator - * is used automatically. - */ -#define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) \ -namespace std \ -{ \ - template<> \ - class vector<__VA_ARGS__, std::allocator<__VA_ARGS__> > \ - : public vector<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > \ - { \ - typedef vector<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > vector_base; \ - public: \ - typedef __VA_ARGS__ value_type; \ - typedef vector_base::allocator_type allocator_type; \ - typedef vector_base::size_type size_type; \ - typedef vector_base::iterator iterator; \ - explicit vector(const allocator_type& a = allocator_type()) : vector_base(a) {} \ - template \ - vector(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : vector_base(first, last, a) {} \ - vector(const vector& c) : vector_base(c) {} \ - explicit vector(size_type num, const value_type& val = value_type()) : vector_base(num, val) {} \ - vector(iterator start, iterator end) : vector_base(start, end) {} \ - vector& operator=(const vector& x) { \ - vector_base::operator=(x); \ - return *this; \ - } \ - }; \ -} - -// Don't specialize if containers are implemented according to C++11 -#if !EIGEN_HAS_CXX11_CONTAINERS - -namespace std { - -#define EIGEN_STD_VECTOR_SPECIALIZATION_BODY \ - public: \ - typedef T value_type; \ - typedef typename vector_base::allocator_type allocator_type; \ - typedef typename vector_base::size_type size_type; \ - typedef typename vector_base::iterator iterator; \ - typedef typename vector_base::const_iterator const_iterator; \ - explicit vector(const allocator_type& a = allocator_type()) : vector_base(a) {} \ - template \ - vector(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) \ - : vector_base(first, last, a) {} \ - vector(const vector& c) : vector_base(c) {} \ - explicit vector(size_type num, const value_type& val = value_type()) : vector_base(num, val) {} \ - vector(iterator start, iterator end) : vector_base(start, end) {} \ - vector& operator=(const vector& x) { \ - vector_base::operator=(x); \ - return *this; \ - } - - template - class vector > - : public vector > -{ - typedef vector > vector_base; - EIGEN_STD_VECTOR_SPECIALIZATION_BODY - - void resize(size_type new_size) - { resize(new_size, T()); } - -#if defined(_VECTOR_) - // workaround MSVC std::vector implementation - void resize(size_type new_size, const value_type& x) - { - if (vector_base::size() < new_size) - vector_base::_Insert_n(vector_base::end(), new_size - vector_base::size(), x); - else if (new_size < vector_base::size()) - vector_base::erase(vector_base::begin() + new_size, vector_base::end()); - } - void push_back(const value_type& x) - { vector_base::push_back(x); } - using vector_base::insert; - iterator insert(const_iterator position, const value_type& x) - { return vector_base::insert(position,x); } - void insert(const_iterator position, size_type new_size, const value_type& x) - { vector_base::insert(position, new_size, x); } -#elif defined(_GLIBCXX_VECTOR) && (!(EIGEN_GNUC_AT_LEAST(4,1))) - /* Note that before gcc-4.1 we already have: std::vector::resize(size_type,const T&). - * However, this specialization is still needed to make the above EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION trick to work. */ - void resize(size_type new_size, const value_type& x) - { - vector_base::resize(new_size,x); - } -#elif defined(_GLIBCXX_VECTOR) && EIGEN_GNUC_AT_LEAST(4,2) - // workaround GCC std::vector implementation - void resize(size_type new_size, const value_type& x) - { - if (new_size < vector_base::size()) - vector_base::_M_erase_at_end(this->_M_impl._M_start + new_size); - else - vector_base::insert(vector_base::end(), new_size - vector_base::size(), x); - } -#else - // either GCC 4.1 or non-GCC - // default implementation which should always work. - void resize(size_type new_size, const value_type& x) - { - if (new_size < vector_base::size()) - vector_base::erase(vector_base::begin() + new_size, vector_base::end()); - else if (new_size > vector_base::size()) - vector_base::insert(vector_base::end(), new_size - vector_base::size(), x); - } -#endif - }; -} -#endif // !EIGEN_HAS_CXX11_CONTAINERS - - -#endif // EIGEN_STDVECTOR_H diff --git a/include/Rivet/Math/eigen3/src/StlSupport/details.h b/include/Rivet/Math/eigen3/src/StlSupport/details.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/StlSupport/details.h +++ /dev/null @@ -1,84 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2009 Gael Guennebaud -// Copyright (C) 2009 Hauke Heibel -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_STL_DETAILS_H -#define EIGEN_STL_DETAILS_H - -#ifndef EIGEN_ALIGNED_ALLOCATOR - #define EIGEN_ALIGNED_ALLOCATOR Eigen::aligned_allocator -#endif - -namespace Eigen { - - // This one is needed to prevent reimplementing the whole std::vector. - template - class aligned_allocator_indirection : public EIGEN_ALIGNED_ALLOCATOR - { - public: - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef T* pointer; - typedef const T* const_pointer; - typedef T& reference; - typedef const T& const_reference; - typedef T value_type; - - template - struct rebind - { - typedef aligned_allocator_indirection other; - }; - - aligned_allocator_indirection() {} - aligned_allocator_indirection(const aligned_allocator_indirection& ) : EIGEN_ALIGNED_ALLOCATOR() {} - aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR& ) {} - template - aligned_allocator_indirection(const aligned_allocator_indirection& ) {} - template - aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR& ) {} - ~aligned_allocator_indirection() {} - }; - -#if EIGEN_COMP_MSVC - - // sometimes, MSVC detects, at compile time, that the argument x - // in std::vector::resize(size_t s,T x) won't be aligned and generate an error - // even if this function is never called. Whence this little wrapper. -#define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) \ - typename Eigen::internal::conditional< \ - Eigen::internal::is_arithmetic::value, \ - T, \ - Eigen::internal::workaround_msvc_stl_support \ - >::type - - namespace internal { - template struct workaround_msvc_stl_support : public T - { - inline workaround_msvc_stl_support() : T() {} - inline workaround_msvc_stl_support(const T& other) : T(other) {} - inline operator T& () { return *static_cast(this); } - inline operator const T& () const { return *static_cast(this); } - template - inline T& operator=(const OtherT& other) - { T::operator=(other); return *this; } - inline workaround_msvc_stl_support& operator=(const workaround_msvc_stl_support& other) - { T::operator=(other); return *this; } - }; - } - -#else - -#define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) T - -#endif - -} - -#endif // EIGEN_STL_DETAILS_H diff --git a/include/Rivet/Math/eigen3/src/SuperLUSupport/SuperLUSupport.h b/include/Rivet/Math/eigen3/src/SuperLUSupport/SuperLUSupport.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/SuperLUSupport/SuperLUSupport.h +++ /dev/null @@ -1,1027 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2015 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_SUPERLUSUPPORT_H -#define EIGEN_SUPERLUSUPPORT_H - -namespace Eigen { - -#if defined(SUPERLU_MAJOR_VERSION) && (SUPERLU_MAJOR_VERSION >= 5) -#define DECL_GSSVX(PREFIX,FLOATTYPE,KEYTYPE) \ - extern "C" { \ - extern void PREFIX##gssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *, \ - char *, FLOATTYPE *, FLOATTYPE *, SuperMatrix *, SuperMatrix *, \ - void *, int, SuperMatrix *, SuperMatrix *, \ - FLOATTYPE *, FLOATTYPE *, FLOATTYPE *, FLOATTYPE *, \ - GlobalLU_t *, mem_usage_t *, SuperLUStat_t *, int *); \ - } \ - inline float SuperLU_gssvx(superlu_options_t *options, SuperMatrix *A, \ - int *perm_c, int *perm_r, int *etree, char *equed, \ - FLOATTYPE *R, FLOATTYPE *C, SuperMatrix *L, \ - SuperMatrix *U, void *work, int lwork, \ - SuperMatrix *B, SuperMatrix *X, \ - FLOATTYPE *recip_pivot_growth, \ - FLOATTYPE *rcond, FLOATTYPE *ferr, FLOATTYPE *berr, \ - SuperLUStat_t *stats, int *info, KEYTYPE) { \ - mem_usage_t mem_usage; \ - GlobalLU_t gLU; \ - PREFIX##gssvx(options, A, perm_c, perm_r, etree, equed, R, C, L, \ - U, work, lwork, B, X, recip_pivot_growth, rcond, \ - ferr, berr, &gLU, &mem_usage, stats, info); \ - return mem_usage.for_lu; /* bytes used by the factor storage */ \ - } -#else // version < 5.0 -#define DECL_GSSVX(PREFIX,FLOATTYPE,KEYTYPE) \ - extern "C" { \ - extern void PREFIX##gssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *, \ - char *, FLOATTYPE *, FLOATTYPE *, SuperMatrix *, SuperMatrix *, \ - void *, int, SuperMatrix *, SuperMatrix *, \ - FLOATTYPE *, FLOATTYPE *, FLOATTYPE *, FLOATTYPE *, \ - mem_usage_t *, SuperLUStat_t *, int *); \ - } \ - inline float SuperLU_gssvx(superlu_options_t *options, SuperMatrix *A, \ - int *perm_c, int *perm_r, int *etree, char *equed, \ - FLOATTYPE *R, FLOATTYPE *C, SuperMatrix *L, \ - SuperMatrix *U, void *work, int lwork, \ - SuperMatrix *B, SuperMatrix *X, \ - FLOATTYPE *recip_pivot_growth, \ - FLOATTYPE *rcond, FLOATTYPE *ferr, FLOATTYPE *berr, \ - SuperLUStat_t *stats, int *info, KEYTYPE) { \ - mem_usage_t mem_usage; \ - PREFIX##gssvx(options, A, perm_c, perm_r, etree, equed, R, C, L, \ - U, work, lwork, B, X, recip_pivot_growth, rcond, \ - ferr, berr, &mem_usage, stats, info); \ - return mem_usage.for_lu; /* bytes used by the factor storage */ \ - } -#endif - -DECL_GSSVX(s,float,float) -DECL_GSSVX(c,float,std::complex) -DECL_GSSVX(d,double,double) -DECL_GSSVX(z,double,std::complex) - -#ifdef MILU_ALPHA -#define EIGEN_SUPERLU_HAS_ILU -#endif - -#ifdef EIGEN_SUPERLU_HAS_ILU - -// similarly for the incomplete factorization using gsisx -#define DECL_GSISX(PREFIX,FLOATTYPE,KEYTYPE) \ - extern "C" { \ - extern void PREFIX##gsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *, \ - char *, FLOATTYPE *, FLOATTYPE *, SuperMatrix *, SuperMatrix *, \ - void *, int, SuperMatrix *, SuperMatrix *, FLOATTYPE *, FLOATTYPE *, \ - mem_usage_t *, SuperLUStat_t *, int *); \ - } \ - inline float SuperLU_gsisx(superlu_options_t *options, SuperMatrix *A, \ - int *perm_c, int *perm_r, int *etree, char *equed, \ - FLOATTYPE *R, FLOATTYPE *C, SuperMatrix *L, \ - SuperMatrix *U, void *work, int lwork, \ - SuperMatrix *B, SuperMatrix *X, \ - FLOATTYPE *recip_pivot_growth, \ - FLOATTYPE *rcond, \ - SuperLUStat_t *stats, int *info, KEYTYPE) { \ - mem_usage_t mem_usage; \ - PREFIX##gsisx(options, A, perm_c, perm_r, etree, equed, R, C, L, \ - U, work, lwork, B, X, recip_pivot_growth, rcond, \ - &mem_usage, stats, info); \ - return mem_usage.for_lu; /* bytes used by the factor storage */ \ - } - -DECL_GSISX(s,float,float) -DECL_GSISX(c,float,std::complex) -DECL_GSISX(d,double,double) -DECL_GSISX(z,double,std::complex) - -#endif - -template -struct SluMatrixMapHelper; - -/** \internal - * - * A wrapper class for SuperLU matrices. It supports only compressed sparse matrices - * and dense matrices. Supernodal and other fancy format are not supported by this wrapper. - * - * This wrapper class mainly aims to avoids the need of dynamic allocation of the storage structure. - */ -struct SluMatrix : SuperMatrix -{ - SluMatrix() - { - Store = &storage; - } - - SluMatrix(const SluMatrix& other) - : SuperMatrix(other) - { - Store = &storage; - storage = other.storage; - } - - SluMatrix& operator=(const SluMatrix& other) - { - SuperMatrix::operator=(static_cast(other)); - Store = &storage; - storage = other.storage; - return *this; - } - - struct - { - union {int nnz;int lda;}; - void *values; - int *innerInd; - int *outerInd; - } storage; - - void setStorageType(Stype_t t) - { - Stype = t; - if (t==SLU_NC || t==SLU_NR || t==SLU_DN) - Store = &storage; - else - { - eigen_assert(false && "storage type not supported"); - Store = 0; - } - } - - template - void setScalarType() - { - if (internal::is_same::value) - Dtype = SLU_S; - else if (internal::is_same::value) - Dtype = SLU_D; - else if (internal::is_same >::value) - Dtype = SLU_C; - else if (internal::is_same >::value) - Dtype = SLU_Z; - else - { - eigen_assert(false && "Scalar type not supported by SuperLU"); - } - } - - template - static SluMatrix Map(MatrixBase& _mat) - { - MatrixType& mat(_mat.derived()); - eigen_assert( ((MatrixType::Flags&RowMajorBit)!=RowMajorBit) && "row-major dense matrices are not supported by SuperLU"); - SluMatrix res; - res.setStorageType(SLU_DN); - res.setScalarType(); - res.Mtype = SLU_GE; - - res.nrow = internal::convert_index(mat.rows()); - res.ncol = internal::convert_index(mat.cols()); - - res.storage.lda = internal::convert_index(MatrixType::IsVectorAtCompileTime ? mat.size() : mat.outerStride()); - res.storage.values = (void*)(mat.data()); - return res; - } - - template - static SluMatrix Map(SparseMatrixBase& a_mat) - { - MatrixType &mat(a_mat.derived()); - SluMatrix res; - if ((MatrixType::Flags&RowMajorBit)==RowMajorBit) - { - res.setStorageType(SLU_NR); - res.nrow = internal::convert_index(mat.cols()); - res.ncol = internal::convert_index(mat.rows()); - } - else - { - res.setStorageType(SLU_NC); - res.nrow = internal::convert_index(mat.rows()); - res.ncol = internal::convert_index(mat.cols()); - } - - res.Mtype = SLU_GE; - - res.storage.nnz = internal::convert_index(mat.nonZeros()); - res.storage.values = mat.valuePtr(); - res.storage.innerInd = mat.innerIndexPtr(); - res.storage.outerInd = mat.outerIndexPtr(); - - res.setScalarType(); - - // FIXME the following is not very accurate - if (MatrixType::Flags & Upper) - res.Mtype = SLU_TRU; - if (MatrixType::Flags & Lower) - res.Mtype = SLU_TRL; - - eigen_assert(((MatrixType::Flags & SelfAdjoint)==0) && "SelfAdjoint matrix shape not supported by SuperLU"); - - return res; - } -}; - -template -struct SluMatrixMapHelper > -{ - typedef Matrix MatrixType; - static void run(MatrixType& mat, SluMatrix& res) - { - eigen_assert( ((Options&RowMajor)!=RowMajor) && "row-major dense matrices is not supported by SuperLU"); - res.setStorageType(SLU_DN); - res.setScalarType(); - res.Mtype = SLU_GE; - - res.nrow = mat.rows(); - res.ncol = mat.cols(); - - res.storage.lda = mat.outerStride(); - res.storage.values = mat.data(); - } -}; - -template -struct SluMatrixMapHelper > -{ - typedef Derived MatrixType; - static void run(MatrixType& mat, SluMatrix& res) - { - if ((MatrixType::Flags&RowMajorBit)==RowMajorBit) - { - res.setStorageType(SLU_NR); - res.nrow = mat.cols(); - res.ncol = mat.rows(); - } - else - { - res.setStorageType(SLU_NC); - res.nrow = mat.rows(); - res.ncol = mat.cols(); - } - - res.Mtype = SLU_GE; - - res.storage.nnz = mat.nonZeros(); - res.storage.values = mat.valuePtr(); - res.storage.innerInd = mat.innerIndexPtr(); - res.storage.outerInd = mat.outerIndexPtr(); - - res.setScalarType(); - - // FIXME the following is not very accurate - if (MatrixType::Flags & Upper) - res.Mtype = SLU_TRU; - if (MatrixType::Flags & Lower) - res.Mtype = SLU_TRL; - - eigen_assert(((MatrixType::Flags & SelfAdjoint)==0) && "SelfAdjoint matrix shape not supported by SuperLU"); - } -}; - -namespace internal { - -template -SluMatrix asSluMatrix(MatrixType& mat) -{ - return SluMatrix::Map(mat); -} - -/** View a Super LU matrix as an Eigen expression */ -template -MappedSparseMatrix map_superlu(SluMatrix& sluMat) -{ - eigen_assert((Flags&RowMajor)==RowMajor && sluMat.Stype == SLU_NR - || (Flags&ColMajor)==ColMajor && sluMat.Stype == SLU_NC); - - Index outerSize = (Flags&RowMajor)==RowMajor ? sluMat.ncol : sluMat.nrow; - - return MappedSparseMatrix( - sluMat.nrow, sluMat.ncol, sluMat.storage.outerInd[outerSize], - sluMat.storage.outerInd, sluMat.storage.innerInd, reinterpret_cast(sluMat.storage.values) ); -} - -} // end namespace internal - -/** \ingroup SuperLUSupport_Module - * \class SuperLUBase - * \brief The base class for the direct and incomplete LU factorization of SuperLU - */ -template -class SuperLUBase : public SparseSolverBase -{ - protected: - typedef SparseSolverBase Base; - using Base::derived; - using Base::m_isInitialized; - public: - typedef _MatrixType MatrixType; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef Matrix Vector; - typedef Matrix IntRowVectorType; - typedef Matrix IntColVectorType; - typedef Map > PermutationMap; - typedef SparseMatrix LUMatrixType; - enum { - ColsAtCompileTime = MatrixType::ColsAtCompileTime, - MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime - }; - - public: - - SuperLUBase() {} - - ~SuperLUBase() - { - clearFactors(); - } - - inline Index rows() const { return m_matrix.rows(); } - inline Index cols() const { return m_matrix.cols(); } - - /** \returns a reference to the Super LU option object to configure the Super LU algorithms. */ - inline superlu_options_t& options() { return m_sluOptions; } - - /** \brief Reports whether previous computation was successful. - * - * \returns \c Success if computation was succesful, - * \c NumericalIssue if the matrix.appears to be negative. - */ - ComputationInfo info() const - { - eigen_assert(m_isInitialized && "Decomposition is not initialized."); - return m_info; - } - - /** Computes the sparse Cholesky decomposition of \a matrix */ - void compute(const MatrixType& matrix) - { - derived().analyzePattern(matrix); - derived().factorize(matrix); - } - - /** Performs a symbolic decomposition on the sparcity of \a matrix. - * - * This function is particularly useful when solving for several problems having the same structure. - * - * \sa factorize() - */ - void analyzePattern(const MatrixType& /*matrix*/) - { - m_isInitialized = true; - m_info = Success; - m_analysisIsOk = true; - m_factorizationIsOk = false; - } - - template - void dumpMemory(Stream& /*s*/) - {} - - protected: - - void initFactorization(const MatrixType& a) - { - set_default_options(&this->m_sluOptions); - - const Index size = a.rows(); - m_matrix = a; - - m_sluA = internal::asSluMatrix(m_matrix); - clearFactors(); - - m_p.resize(size); - m_q.resize(size); - m_sluRscale.resize(size); - m_sluCscale.resize(size); - m_sluEtree.resize(size); - - // set empty B and X - m_sluB.setStorageType(SLU_DN); - m_sluB.setScalarType(); - m_sluB.Mtype = SLU_GE; - m_sluB.storage.values = 0; - m_sluB.nrow = 0; - m_sluB.ncol = 0; - m_sluB.storage.lda = internal::convert_index(size); - m_sluX = m_sluB; - - m_extractedDataAreDirty = true; - } - - void init() - { - m_info = InvalidInput; - m_isInitialized = false; - m_sluL.Store = 0; - m_sluU.Store = 0; - } - - void extractData() const; - - void clearFactors() - { - if(m_sluL.Store) - Destroy_SuperNode_Matrix(&m_sluL); - if(m_sluU.Store) - Destroy_CompCol_Matrix(&m_sluU); - - m_sluL.Store = 0; - m_sluU.Store = 0; - - memset(&m_sluL,0,sizeof m_sluL); - memset(&m_sluU,0,sizeof m_sluU); - } - - // cached data to reduce reallocation, etc. - mutable LUMatrixType m_l; - mutable LUMatrixType m_u; - mutable IntColVectorType m_p; - mutable IntRowVectorType m_q; - - mutable LUMatrixType m_matrix; // copy of the factorized matrix - mutable SluMatrix m_sluA; - mutable SuperMatrix m_sluL, m_sluU; - mutable SluMatrix m_sluB, m_sluX; - mutable SuperLUStat_t m_sluStat; - mutable superlu_options_t m_sluOptions; - mutable std::vector m_sluEtree; - mutable Matrix m_sluRscale, m_sluCscale; - mutable Matrix m_sluFerr, m_sluBerr; - mutable char m_sluEqued; - - mutable ComputationInfo m_info; - int m_factorizationIsOk; - int m_analysisIsOk; - mutable bool m_extractedDataAreDirty; - - private: - SuperLUBase(SuperLUBase& ) { } -}; - - -/** \ingroup SuperLUSupport_Module - * \class SuperLU - * \brief A sparse direct LU factorization and solver based on the SuperLU library - * - * This class allows to solve for A.X = B sparse linear problems via a direct LU factorization - * using the SuperLU library. The sparse matrix A must be squared and invertible. The vectors or matrices - * X and B can be either dense or sparse. - * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * - * \warning This class is only for the 4.x versions of SuperLU. The 3.x and 5.x versions are not supported. - * - * \implsparsesolverconcept - * - * \sa \ref TutorialSparseSolverConcept, class SparseLU - */ -template -class SuperLU : public SuperLUBase<_MatrixType,SuperLU<_MatrixType> > -{ - public: - typedef SuperLUBase<_MatrixType,SuperLU> Base; - typedef _MatrixType MatrixType; - typedef typename Base::Scalar Scalar; - typedef typename Base::RealScalar RealScalar; - typedef typename Base::StorageIndex StorageIndex; - typedef typename Base::IntRowVectorType IntRowVectorType; - typedef typename Base::IntColVectorType IntColVectorType; - typedef typename Base::PermutationMap PermutationMap; - typedef typename Base::LUMatrixType LUMatrixType; - typedef TriangularView LMatrixType; - typedef TriangularView UMatrixType; - - public: - using Base::_solve_impl; - - SuperLU() : Base() { init(); } - - explicit SuperLU(const MatrixType& matrix) : Base() - { - init(); - Base::compute(matrix); - } - - ~SuperLU() - { - } - - /** Performs a symbolic decomposition on the sparcity of \a matrix. - * - * This function is particularly useful when solving for several problems having the same structure. - * - * \sa factorize() - */ - void analyzePattern(const MatrixType& matrix) - { - m_info = InvalidInput; - m_isInitialized = false; - Base::analyzePattern(matrix); - } - - /** Performs a numeric decomposition of \a matrix - * - * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed. - * - * \sa analyzePattern() - */ - void factorize(const MatrixType& matrix); - - /** \internal */ - template - void _solve_impl(const MatrixBase &b, MatrixBase &dest) const; - - inline const LMatrixType& matrixL() const - { - if (m_extractedDataAreDirty) this->extractData(); - return m_l; - } - - inline const UMatrixType& matrixU() const - { - if (m_extractedDataAreDirty) this->extractData(); - return m_u; - } - - inline const IntColVectorType& permutationP() const - { - if (m_extractedDataAreDirty) this->extractData(); - return m_p; - } - - inline const IntRowVectorType& permutationQ() const - { - if (m_extractedDataAreDirty) this->extractData(); - return m_q; - } - - Scalar determinant() const; - - protected: - - using Base::m_matrix; - using Base::m_sluOptions; - using Base::m_sluA; - using Base::m_sluB; - using Base::m_sluX; - using Base::m_p; - using Base::m_q; - using Base::m_sluEtree; - using Base::m_sluEqued; - using Base::m_sluRscale; - using Base::m_sluCscale; - using Base::m_sluL; - using Base::m_sluU; - using Base::m_sluStat; - using Base::m_sluFerr; - using Base::m_sluBerr; - using Base::m_l; - using Base::m_u; - - using Base::m_analysisIsOk; - using Base::m_factorizationIsOk; - using Base::m_extractedDataAreDirty; - using Base::m_isInitialized; - using Base::m_info; - - void init() - { - Base::init(); - - set_default_options(&this->m_sluOptions); - m_sluOptions.PrintStat = NO; - m_sluOptions.ConditionNumber = NO; - m_sluOptions.Trans = NOTRANS; - m_sluOptions.ColPerm = COLAMD; - } - - - private: - SuperLU(SuperLU& ) { } -}; - -template -void SuperLU::factorize(const MatrixType& a) -{ - eigen_assert(m_analysisIsOk && "You must first call analyzePattern()"); - if(!m_analysisIsOk) - { - m_info = InvalidInput; - return; - } - - this->initFactorization(a); - - m_sluOptions.ColPerm = COLAMD; - int info = 0; - RealScalar recip_pivot_growth, rcond; - RealScalar ferr, berr; - - StatInit(&m_sluStat); - SuperLU_gssvx(&m_sluOptions, &m_sluA, m_q.data(), m_p.data(), &m_sluEtree[0], - &m_sluEqued, &m_sluRscale[0], &m_sluCscale[0], - &m_sluL, &m_sluU, - NULL, 0, - &m_sluB, &m_sluX, - &recip_pivot_growth, &rcond, - &ferr, &berr, - &m_sluStat, &info, Scalar()); - StatFree(&m_sluStat); - - m_extractedDataAreDirty = true; - - // FIXME how to better check for errors ??? - m_info = info == 0 ? Success : NumericalIssue; - m_factorizationIsOk = true; -} - -template -template -void SuperLU::_solve_impl(const MatrixBase &b, MatrixBase& x) const -{ - eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or analyzePattern()/factorize()"); - - const Index size = m_matrix.rows(); - const Index rhsCols = b.cols(); - eigen_assert(size==b.rows()); - - m_sluOptions.Trans = NOTRANS; - m_sluOptions.Fact = FACTORED; - m_sluOptions.IterRefine = NOREFINE; - - - m_sluFerr.resize(rhsCols); - m_sluBerr.resize(rhsCols); - - Ref > b_ref(b); - Ref > x_ref(x); - - m_sluB = SluMatrix::Map(b_ref.const_cast_derived()); - m_sluX = SluMatrix::Map(x_ref.const_cast_derived()); - - typename Rhs::PlainObject b_cpy; - if(m_sluEqued!='N') - { - b_cpy = b; - m_sluB = SluMatrix::Map(b_cpy.const_cast_derived()); - } - - StatInit(&m_sluStat); - int info = 0; - RealScalar recip_pivot_growth, rcond; - SuperLU_gssvx(&m_sluOptions, &m_sluA, - m_q.data(), m_p.data(), - &m_sluEtree[0], &m_sluEqued, - &m_sluRscale[0], &m_sluCscale[0], - &m_sluL, &m_sluU, - NULL, 0, - &m_sluB, &m_sluX, - &recip_pivot_growth, &rcond, - &m_sluFerr[0], &m_sluBerr[0], - &m_sluStat, &info, Scalar()); - StatFree(&m_sluStat); - - if(x.derived().data() != x_ref.data()) - x = x_ref; - - m_info = info==0 ? Success : NumericalIssue; -} - -// the code of this extractData() function has been adapted from the SuperLU's Matlab support code, -// -// Copyright (c) 1994 by Xerox Corporation. All rights reserved. -// -// THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY -// EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. -// -template -void SuperLUBase::extractData() const -{ - eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for extracting factors, you must first call either compute() or analyzePattern()/factorize()"); - if (m_extractedDataAreDirty) - { - int upper; - int fsupc, istart, nsupr; - int lastl = 0, lastu = 0; - SCformat *Lstore = static_cast(m_sluL.Store); - NCformat *Ustore = static_cast(m_sluU.Store); - Scalar *SNptr; - - const Index size = m_matrix.rows(); - m_l.resize(size,size); - m_l.resizeNonZeros(Lstore->nnz); - m_u.resize(size,size); - m_u.resizeNonZeros(Ustore->nnz); - - int* Lcol = m_l.outerIndexPtr(); - int* Lrow = m_l.innerIndexPtr(); - Scalar* Lval = m_l.valuePtr(); - - int* Ucol = m_u.outerIndexPtr(); - int* Urow = m_u.innerIndexPtr(); - Scalar* Uval = m_u.valuePtr(); - - Ucol[0] = 0; - Ucol[0] = 0; - - /* for each supernode */ - for (int k = 0; k <= Lstore->nsuper; ++k) - { - fsupc = L_FST_SUPC(k); - istart = L_SUB_START(fsupc); - nsupr = L_SUB_START(fsupc+1) - istart; - upper = 1; - - /* for each column in the supernode */ - for (int j = fsupc; j < L_FST_SUPC(k+1); ++j) - { - SNptr = &((Scalar*)Lstore->nzval)[L_NZ_START(j)]; - - /* Extract U */ - for (int i = U_NZ_START(j); i < U_NZ_START(j+1); ++i) - { - Uval[lastu] = ((Scalar*)Ustore->nzval)[i]; - /* Matlab doesn't like explicit zero. */ - if (Uval[lastu] != 0.0) - Urow[lastu++] = U_SUB(i); - } - for (int i = 0; i < upper; ++i) - { - /* upper triangle in the supernode */ - Uval[lastu] = SNptr[i]; - /* Matlab doesn't like explicit zero. */ - if (Uval[lastu] != 0.0) - Urow[lastu++] = L_SUB(istart+i); - } - Ucol[j+1] = lastu; - - /* Extract L */ - Lval[lastl] = 1.0; /* unit diagonal */ - Lrow[lastl++] = L_SUB(istart + upper - 1); - for (int i = upper; i < nsupr; ++i) - { - Lval[lastl] = SNptr[i]; - /* Matlab doesn't like explicit zero. */ - if (Lval[lastl] != 0.0) - Lrow[lastl++] = L_SUB(istart+i); - } - Lcol[j+1] = lastl; - - ++upper; - } /* for j ... */ - - } /* for k ... */ - - // squeeze the matrices : - m_l.resizeNonZeros(lastl); - m_u.resizeNonZeros(lastu); - - m_extractedDataAreDirty = false; - } -} - -template -typename SuperLU::Scalar SuperLU::determinant() const -{ - eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for computing the determinant, you must first call either compute() or analyzePattern()/factorize()"); - - if (m_extractedDataAreDirty) - this->extractData(); - - Scalar det = Scalar(1); - for (int j=0; j 0) - { - int lastId = m_u.outerIndexPtr()[j+1]-1; - eigen_assert(m_u.innerIndexPtr()[lastId]<=j); - if (m_u.innerIndexPtr()[lastId]==j) - det *= m_u.valuePtr()[lastId]; - } - } - if(PermutationMap(m_p.data(),m_p.size()).determinant()*PermutationMap(m_q.data(),m_q.size()).determinant()<0) - det = -det; - if(m_sluEqued!='N') - return det/m_sluRscale.prod()/m_sluCscale.prod(); - else - return det; -} - -#ifdef EIGEN_PARSED_BY_DOXYGEN -#define EIGEN_SUPERLU_HAS_ILU -#endif - -#ifdef EIGEN_SUPERLU_HAS_ILU - -/** \ingroup SuperLUSupport_Module - * \class SuperILU - * \brief A sparse direct \b incomplete LU factorization and solver based on the SuperLU library - * - * This class allows to solve for an approximate solution of A.X = B sparse linear problems via an incomplete LU factorization - * using the SuperLU library. This class is aimed to be used as a preconditioner of the iterative linear solvers. - * - * \warning This class is only for the 4.x versions of SuperLU. The 3.x and 5.x versions are not supported. - * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * - * \implsparsesolverconcept - * - * \sa \ref TutorialSparseSolverConcept, class IncompleteLUT, class ConjugateGradient, class BiCGSTAB - */ - -template -class SuperILU : public SuperLUBase<_MatrixType,SuperILU<_MatrixType> > -{ - public: - typedef SuperLUBase<_MatrixType,SuperILU> Base; - typedef _MatrixType MatrixType; - typedef typename Base::Scalar Scalar; - typedef typename Base::RealScalar RealScalar; - - public: - using Base::_solve_impl; - - SuperILU() : Base() { init(); } - - SuperILU(const MatrixType& matrix) : Base() - { - init(); - Base::compute(matrix); - } - - ~SuperILU() - { - } - - /** Performs a symbolic decomposition on the sparcity of \a matrix. - * - * This function is particularly useful when solving for several problems having the same structure. - * - * \sa factorize() - */ - void analyzePattern(const MatrixType& matrix) - { - Base::analyzePattern(matrix); - } - - /** Performs a numeric decomposition of \a matrix - * - * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed. - * - * \sa analyzePattern() - */ - void factorize(const MatrixType& matrix); - - #ifndef EIGEN_PARSED_BY_DOXYGEN - /** \internal */ - template - void _solve_impl(const MatrixBase &b, MatrixBase &dest) const; - #endif // EIGEN_PARSED_BY_DOXYGEN - - protected: - - using Base::m_matrix; - using Base::m_sluOptions; - using Base::m_sluA; - using Base::m_sluB; - using Base::m_sluX; - using Base::m_p; - using Base::m_q; - using Base::m_sluEtree; - using Base::m_sluEqued; - using Base::m_sluRscale; - using Base::m_sluCscale; - using Base::m_sluL; - using Base::m_sluU; - using Base::m_sluStat; - using Base::m_sluFerr; - using Base::m_sluBerr; - using Base::m_l; - using Base::m_u; - - using Base::m_analysisIsOk; - using Base::m_factorizationIsOk; - using Base::m_extractedDataAreDirty; - using Base::m_isInitialized; - using Base::m_info; - - void init() - { - Base::init(); - - ilu_set_default_options(&m_sluOptions); - m_sluOptions.PrintStat = NO; - m_sluOptions.ConditionNumber = NO; - m_sluOptions.Trans = NOTRANS; - m_sluOptions.ColPerm = MMD_AT_PLUS_A; - - // no attempt to preserve column sum - m_sluOptions.ILU_MILU = SILU; - // only basic ILU(k) support -- no direct control over memory consumption - // better to use ILU_DropRule = DROP_BASIC | DROP_AREA - // and set ILU_FillFactor to max memory growth - m_sluOptions.ILU_DropRule = DROP_BASIC; - m_sluOptions.ILU_DropTol = NumTraits::dummy_precision()*10; - } - - private: - SuperILU(SuperILU& ) { } -}; - -template -void SuperILU::factorize(const MatrixType& a) -{ - eigen_assert(m_analysisIsOk && "You must first call analyzePattern()"); - if(!m_analysisIsOk) - { - m_info = InvalidInput; - return; - } - - this->initFactorization(a); - - int info = 0; - RealScalar recip_pivot_growth, rcond; - - StatInit(&m_sluStat); - SuperLU_gsisx(&m_sluOptions, &m_sluA, m_q.data(), m_p.data(), &m_sluEtree[0], - &m_sluEqued, &m_sluRscale[0], &m_sluCscale[0], - &m_sluL, &m_sluU, - NULL, 0, - &m_sluB, &m_sluX, - &recip_pivot_growth, &rcond, - &m_sluStat, &info, Scalar()); - StatFree(&m_sluStat); - - // FIXME how to better check for errors ??? - m_info = info == 0 ? Success : NumericalIssue; - m_factorizationIsOk = true; -} - -#ifndef EIGEN_PARSED_BY_DOXYGEN -template -template -void SuperILU::_solve_impl(const MatrixBase &b, MatrixBase& x) const -{ - eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or analyzePattern()/factorize()"); - - const int size = m_matrix.rows(); - const int rhsCols = b.cols(); - eigen_assert(size==b.rows()); - - m_sluOptions.Trans = NOTRANS; - m_sluOptions.Fact = FACTORED; - m_sluOptions.IterRefine = NOREFINE; - - m_sluFerr.resize(rhsCols); - m_sluBerr.resize(rhsCols); - - Ref > b_ref(b); - Ref > x_ref(x); - - m_sluB = SluMatrix::Map(b_ref.const_cast_derived()); - m_sluX = SluMatrix::Map(x_ref.const_cast_derived()); - - typename Rhs::PlainObject b_cpy; - if(m_sluEqued!='N') - { - b_cpy = b; - m_sluB = SluMatrix::Map(b_cpy.const_cast_derived()); - } - - int info = 0; - RealScalar recip_pivot_growth, rcond; - - StatInit(&m_sluStat); - SuperLU_gsisx(&m_sluOptions, &m_sluA, - m_q.data(), m_p.data(), - &m_sluEtree[0], &m_sluEqued, - &m_sluRscale[0], &m_sluCscale[0], - &m_sluL, &m_sluU, - NULL, 0, - &m_sluB, &m_sluX, - &recip_pivot_growth, &rcond, - &m_sluStat, &info, Scalar()); - StatFree(&m_sluStat); - - if(x.derived().data() != x_ref.data()) - x = x_ref; - - m_info = info==0 ? Success : NumericalIssue; -} -#endif - -#endif - -} // end namespace Eigen - -#endif // EIGEN_SUPERLUSUPPORT_H diff --git a/include/Rivet/Math/eigen3/src/UmfPackSupport/UmfPackSupport.h b/include/Rivet/Math/eigen3/src/UmfPackSupport/UmfPackSupport.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/UmfPackSupport/UmfPackSupport.h +++ /dev/null @@ -1,506 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2008-2011 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#ifndef EIGEN_UMFPACKSUPPORT_H -#define EIGEN_UMFPACKSUPPORT_H - -namespace Eigen { - -/* TODO extract L, extract U, compute det, etc... */ - -// generic double/complex wrapper functions: - - -inline void umfpack_defaults(double control[UMFPACK_CONTROL], double) -{ umfpack_di_defaults(control); } - -inline void umfpack_defaults(double control[UMFPACK_CONTROL], std::complex) -{ umfpack_zi_defaults(control); } - -inline void umfpack_report_info(double control[UMFPACK_CONTROL], double info[UMFPACK_INFO], double) -{ umfpack_di_report_info(control, info);} - -inline void umfpack_report_info(double control[UMFPACK_CONTROL], double info[UMFPACK_INFO], std::complex) -{ umfpack_zi_report_info(control, info);} - -inline void umfpack_report_status(double control[UMFPACK_CONTROL], int status, double) -{ umfpack_di_report_status(control, status);} - -inline void umfpack_report_status(double control[UMFPACK_CONTROL], int status, std::complex) -{ umfpack_zi_report_status(control, status);} - -inline void umfpack_report_control(double control[UMFPACK_CONTROL], double) -{ umfpack_di_report_control(control);} - -inline void umfpack_report_control(double control[UMFPACK_CONTROL], std::complex) -{ umfpack_zi_report_control(control);} - -inline void umfpack_free_numeric(void **Numeric, double) -{ umfpack_di_free_numeric(Numeric); *Numeric = 0; } - -inline void umfpack_free_numeric(void **Numeric, std::complex) -{ umfpack_zi_free_numeric(Numeric); *Numeric = 0; } - -inline void umfpack_free_symbolic(void **Symbolic, double) -{ umfpack_di_free_symbolic(Symbolic); *Symbolic = 0; } - -inline void umfpack_free_symbolic(void **Symbolic, std::complex) -{ umfpack_zi_free_symbolic(Symbolic); *Symbolic = 0; } - -inline int umfpack_symbolic(int n_row,int n_col, - const int Ap[], const int Ai[], const double Ax[], void **Symbolic, - const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO]) -{ - return umfpack_di_symbolic(n_row,n_col,Ap,Ai,Ax,Symbolic,Control,Info); -} - -inline int umfpack_symbolic(int n_row,int n_col, - const int Ap[], const int Ai[], const std::complex Ax[], void **Symbolic, - const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO]) -{ - return umfpack_zi_symbolic(n_row,n_col,Ap,Ai,&numext::real_ref(Ax[0]),0,Symbolic,Control,Info); -} - -inline int umfpack_numeric( const int Ap[], const int Ai[], const double Ax[], - void *Symbolic, void **Numeric, - const double Control[UMFPACK_CONTROL],double Info [UMFPACK_INFO]) -{ - return umfpack_di_numeric(Ap,Ai,Ax,Symbolic,Numeric,Control,Info); -} - -inline int umfpack_numeric( const int Ap[], const int Ai[], const std::complex Ax[], - void *Symbolic, void **Numeric, - const double Control[UMFPACK_CONTROL],double Info [UMFPACK_INFO]) -{ - return umfpack_zi_numeric(Ap,Ai,&numext::real_ref(Ax[0]),0,Symbolic,Numeric,Control,Info); -} - -inline int umfpack_solve( int sys, const int Ap[], const int Ai[], const double Ax[], - double X[], const double B[], void *Numeric, - const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO]) -{ - return umfpack_di_solve(sys,Ap,Ai,Ax,X,B,Numeric,Control,Info); -} - -inline int umfpack_solve( int sys, const int Ap[], const int Ai[], const std::complex Ax[], - std::complex X[], const std::complex B[], void *Numeric, - const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO]) -{ - return umfpack_zi_solve(sys,Ap,Ai,&numext::real_ref(Ax[0]),0,&numext::real_ref(X[0]),0,&numext::real_ref(B[0]),0,Numeric,Control,Info); -} - -inline int umfpack_get_lunz(int *lnz, int *unz, int *n_row, int *n_col, int *nz_udiag, void *Numeric, double) -{ - return umfpack_di_get_lunz(lnz,unz,n_row,n_col,nz_udiag,Numeric); -} - -inline int umfpack_get_lunz(int *lnz, int *unz, int *n_row, int *n_col, int *nz_udiag, void *Numeric, std::complex) -{ - return umfpack_zi_get_lunz(lnz,unz,n_row,n_col,nz_udiag,Numeric); -} - -inline int umfpack_get_numeric(int Lp[], int Lj[], double Lx[], int Up[], int Ui[], double Ux[], - int P[], int Q[], double Dx[], int *do_recip, double Rs[], void *Numeric) -{ - return umfpack_di_get_numeric(Lp,Lj,Lx,Up,Ui,Ux,P,Q,Dx,do_recip,Rs,Numeric); -} - -inline int umfpack_get_numeric(int Lp[], int Lj[], std::complex Lx[], int Up[], int Ui[], std::complex Ux[], - int P[], int Q[], std::complex Dx[], int *do_recip, double Rs[], void *Numeric) -{ - double& lx0_real = numext::real_ref(Lx[0]); - double& ux0_real = numext::real_ref(Ux[0]); - double& dx0_real = numext::real_ref(Dx[0]); - return umfpack_zi_get_numeric(Lp,Lj,Lx?&lx0_real:0,0,Up,Ui,Ux?&ux0_real:0,0,P,Q, - Dx?&dx0_real:0,0,do_recip,Rs,Numeric); -} - -inline int umfpack_get_determinant(double *Mx, double *Ex, void *NumericHandle, double User_Info [UMFPACK_INFO]) -{ - return umfpack_di_get_determinant(Mx,Ex,NumericHandle,User_Info); -} - -inline int umfpack_get_determinant(std::complex *Mx, double *Ex, void *NumericHandle, double User_Info [UMFPACK_INFO]) -{ - double& mx_real = numext::real_ref(*Mx); - return umfpack_zi_get_determinant(&mx_real,0,Ex,NumericHandle,User_Info); -} - - -/** \ingroup UmfPackSupport_Module - * \brief A sparse LU factorization and solver based on UmfPack - * - * This class allows to solve for A.X = B sparse linear problems via a LU factorization - * using the UmfPack library. The sparse matrix A must be squared and full rank. - * The vectors or matrices X and B can be either dense or sparse. - * - * \warning The input matrix A should be in a \b compressed and \b column-major form. - * Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix. - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * - * \implsparsesolverconcept - * - * \sa \ref TutorialSparseSolverConcept, class SparseLU - */ -template -class UmfPackLU : public SparseSolverBase > -{ - protected: - typedef SparseSolverBase > Base; - using Base::m_isInitialized; - public: - using Base::_solve_impl; - typedef _MatrixType MatrixType; - typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef typename MatrixType::StorageIndex StorageIndex; - typedef Matrix Vector; - typedef Matrix IntRowVectorType; - typedef Matrix IntColVectorType; - typedef SparseMatrix LUMatrixType; - typedef SparseMatrix UmfpackMatrixType; - typedef Ref UmfpackMatrixRef; - enum { - ColsAtCompileTime = MatrixType::ColsAtCompileTime, - MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime - }; - - public: - - typedef Array UmfpackControl; - typedef Array UmfpackInfo; - - UmfPackLU() - : m_dummy(0,0), mp_matrix(m_dummy) - { - init(); - } - - template - explicit UmfPackLU(const InputMatrixType& matrix) - : mp_matrix(matrix) - { - init(); - compute(matrix); - } - - ~UmfPackLU() - { - if(m_symbolic) umfpack_free_symbolic(&m_symbolic,Scalar()); - if(m_numeric) umfpack_free_numeric(&m_numeric,Scalar()); - } - - inline Index rows() const { return mp_matrix.rows(); } - inline Index cols() const { return mp_matrix.cols(); } - - /** \brief Reports whether previous computation was successful. - * - * \returns \c Success if computation was succesful, - * \c NumericalIssue if the matrix.appears to be negative. - */ - ComputationInfo info() const - { - eigen_assert(m_isInitialized && "Decomposition is not initialized."); - return m_info; - } - - inline const LUMatrixType& matrixL() const - { - if (m_extractedDataAreDirty) extractData(); - return m_l; - } - - inline const LUMatrixType& matrixU() const - { - if (m_extractedDataAreDirty) extractData(); - return m_u; - } - - inline const IntColVectorType& permutationP() const - { - if (m_extractedDataAreDirty) extractData(); - return m_p; - } - - inline const IntRowVectorType& permutationQ() const - { - if (m_extractedDataAreDirty) extractData(); - return m_q; - } - - /** Computes the sparse Cholesky decomposition of \a matrix - * Note that the matrix should be column-major, and in compressed format for best performance. - * \sa SparseMatrix::makeCompressed(). - */ - template - void compute(const InputMatrixType& matrix) - { - if(m_symbolic) umfpack_free_symbolic(&m_symbolic,Scalar()); - if(m_numeric) umfpack_free_numeric(&m_numeric,Scalar()); - grab(matrix.derived()); - analyzePattern_impl(); - factorize_impl(); - } - - /** Performs a symbolic decomposition on the sparcity of \a matrix. - * - * This function is particularly useful when solving for several problems having the same structure. - * - * \sa factorize(), compute() - */ - template - void analyzePattern(const InputMatrixType& matrix) - { - if(m_symbolic) umfpack_free_symbolic(&m_symbolic,Scalar()); - if(m_numeric) umfpack_free_numeric(&m_numeric,Scalar()); - - grab(matrix.derived()); - - analyzePattern_impl(); - } - - /** Provides the return status code returned by UmfPack during the numeric - * factorization. - * - * \sa factorize(), compute() - */ - inline int umfpackFactorizeReturncode() const - { - eigen_assert(m_numeric && "UmfPackLU: you must first call factorize()"); - return m_fact_errorCode; - } - - /** Provides access to the control settings array used by UmfPack. - * - * If this array contains NaN's, the default values are used. - * - * See UMFPACK documentation for details. - */ - inline const UmfpackControl& umfpackControl() const - { - return m_control; - } - - /** Provides access to the control settings array used by UmfPack. - * - * If this array contains NaN's, the default values are used. - * - * See UMFPACK documentation for details. - */ - inline UmfpackControl& umfpackControl() - { - return m_control; - } - - /** Performs a numeric decomposition of \a matrix - * - * The given matrix must has the same sparcity than the matrix on which the pattern anylysis has been performed. - * - * \sa analyzePattern(), compute() - */ - template - void factorize(const InputMatrixType& matrix) - { - eigen_assert(m_analysisIsOk && "UmfPackLU: you must first call analyzePattern()"); - if(m_numeric) - umfpack_free_numeric(&m_numeric,Scalar()); - - grab(matrix.derived()); - - factorize_impl(); - } - - /** Prints the current UmfPack control settings. - * - * \sa umfpackControl() - */ - void umfpackReportControl() - { - umfpack_report_control(m_control.data(), Scalar()); - } - - /** Prints statistics collected by UmfPack. - * - * \sa analyzePattern(), compute() - */ - void umfpackReportInfo() - { - eigen_assert(m_analysisIsOk && "UmfPackLU: you must first call analyzePattern()"); - umfpack_report_info(m_control.data(), m_umfpackInfo.data(), Scalar()); - } - - /** Prints the status of the previous factorization operation performed by UmfPack (symbolic or numerical factorization). - * - * \sa analyzePattern(), compute() - */ - void umfpackReportStatus() { - eigen_assert(m_analysisIsOk && "UmfPackLU: you must first call analyzePattern()"); - umfpack_report_status(m_control.data(), m_fact_errorCode, Scalar()); - } - - /** \internal */ - template - bool _solve_impl(const MatrixBase &b, MatrixBase &x) const; - - Scalar determinant() const; - - void extractData() const; - - protected: - - void init() - { - m_info = InvalidInput; - m_isInitialized = false; - m_numeric = 0; - m_symbolic = 0; - m_extractedDataAreDirty = true; - - umfpack_defaults(m_control.data(), Scalar()); - } - - void analyzePattern_impl() - { - m_fact_errorCode = umfpack_symbolic(internal::convert_index(mp_matrix.rows()), - internal::convert_index(mp_matrix.cols()), - mp_matrix.outerIndexPtr(), mp_matrix.innerIndexPtr(), mp_matrix.valuePtr(), - &m_symbolic, m_control.data(), m_umfpackInfo.data()); - - m_isInitialized = true; - m_info = m_fact_errorCode ? InvalidInput : Success; - m_analysisIsOk = true; - m_factorizationIsOk = false; - m_extractedDataAreDirty = true; - } - - void factorize_impl() - { - - m_fact_errorCode = umfpack_numeric(mp_matrix.outerIndexPtr(), mp_matrix.innerIndexPtr(), mp_matrix.valuePtr(), - m_symbolic, &m_numeric, m_control.data(), m_umfpackInfo.data()); - - m_info = m_fact_errorCode == UMFPACK_OK ? Success : NumericalIssue; - m_factorizationIsOk = true; - m_extractedDataAreDirty = true; - } - - template - void grab(const EigenBase &A) - { - mp_matrix.~UmfpackMatrixRef(); - ::new (&mp_matrix) UmfpackMatrixRef(A.derived()); - } - - void grab(const UmfpackMatrixRef &A) - { - if(&(A.derived()) != &mp_matrix) - { - mp_matrix.~UmfpackMatrixRef(); - ::new (&mp_matrix) UmfpackMatrixRef(A); - } - } - - // cached data to reduce reallocation, etc. - mutable LUMatrixType m_l; - int m_fact_errorCode; - UmfpackControl m_control; - mutable UmfpackInfo m_umfpackInfo; - - mutable LUMatrixType m_u; - mutable IntColVectorType m_p; - mutable IntRowVectorType m_q; - - UmfpackMatrixType m_dummy; - UmfpackMatrixRef mp_matrix; - - void* m_numeric; - void* m_symbolic; - - mutable ComputationInfo m_info; - int m_factorizationIsOk; - int m_analysisIsOk; - mutable bool m_extractedDataAreDirty; - - private: - UmfPackLU(const UmfPackLU& ) { } -}; - - -template -void UmfPackLU::extractData() const -{ - if (m_extractedDataAreDirty) - { - // get size of the data - int lnz, unz, rows, cols, nz_udiag; - umfpack_get_lunz(&lnz, &unz, &rows, &cols, &nz_udiag, m_numeric, Scalar()); - - // allocate data - m_l.resize(rows,(std::min)(rows,cols)); - m_l.resizeNonZeros(lnz); - - m_u.resize((std::min)(rows,cols),cols); - m_u.resizeNonZeros(unz); - - m_p.resize(rows); - m_q.resize(cols); - - // extract - umfpack_get_numeric(m_l.outerIndexPtr(), m_l.innerIndexPtr(), m_l.valuePtr(), - m_u.outerIndexPtr(), m_u.innerIndexPtr(), m_u.valuePtr(), - m_p.data(), m_q.data(), 0, 0, 0, m_numeric); - - m_extractedDataAreDirty = false; - } -} - -template -typename UmfPackLU::Scalar UmfPackLU::determinant() const -{ - Scalar det; - umfpack_get_determinant(&det, 0, m_numeric, 0); - return det; -} - -template -template -bool UmfPackLU::_solve_impl(const MatrixBase &b, MatrixBase &x) const -{ - Index rhsCols = b.cols(); - eigen_assert((BDerived::Flags&RowMajorBit)==0 && "UmfPackLU backend does not support non col-major rhs yet"); - eigen_assert((XDerived::Flags&RowMajorBit)==0 && "UmfPackLU backend does not support non col-major result yet"); - eigen_assert(b.derived().data() != x.derived().data() && " Umfpack does not support inplace solve"); - - int errorCode; - Scalar* x_ptr = 0; - Matrix x_tmp; - if(x.innerStride()!=1) - { - x_tmp.resize(x.rows()); - x_ptr = x_tmp.data(); - } - for (int j=0; j - -#ifndef lapack_int -#define lapack_int int -#endif - -#ifndef lapack_logical -#define lapack_logical lapack_int -#endif - -/* Complex types are structures equivalent to the -* Fortran complex types COMPLEX(4) and COMPLEX(8). -* -* One can also redefine the types with his own types -* for example by including in the code definitions like -* -* #define lapack_complex_float std::complex -* #define lapack_complex_double std::complex -* -* or define these types in the command line: -* -* -Dlapack_complex_float="std::complex" -* -Dlapack_complex_double="std::complex" -*/ - -#ifndef LAPACK_COMPLEX_CUSTOM - -/* Complex type (single precision) */ -#ifndef lapack_complex_float -#include -#define lapack_complex_float float _Complex -#endif - -#ifndef lapack_complex_float_real -#define lapack_complex_float_real(z) (creal(z)) -#endif - -#ifndef lapack_complex_float_imag -#define lapack_complex_float_imag(z) (cimag(z)) -#endif - -lapack_complex_float lapack_make_complex_float( float re, float im ); - -/* Complex type (double precision) */ -#ifndef lapack_complex_double -#include -#define lapack_complex_double double _Complex -#endif - -#ifndef lapack_complex_double_real -#define lapack_complex_double_real(z) (creal(z)) -#endif - -#ifndef lapack_complex_double_imag -#define lapack_complex_double_imag(z) (cimag(z)) -#endif - -lapack_complex_double lapack_make_complex_double( double re, double im ); - -#endif - -#ifndef LAPACKE_malloc -#define LAPACKE_malloc( size ) malloc( size ) -#endif -#ifndef LAPACKE_free -#define LAPACKE_free( p ) free( p ) -#endif - -#define LAPACK_C2INT( x ) (lapack_int)(*((float*)&x )) -#define LAPACK_Z2INT( x ) (lapack_int)(*((double*)&x )) - -#define LAPACK_ROW_MAJOR 101 -#define LAPACK_COL_MAJOR 102 - -#define LAPACK_WORK_MEMORY_ERROR -1010 -#define LAPACK_TRANSPOSE_MEMORY_ERROR -1011 - -/* Callback logical functions of one, two, or three arguments are used -* to select eigenvalues to sort to the top left of the Schur form. -* The value is selected if function returns TRUE (non-zero). */ - -typedef lapack_logical (*LAPACK_S_SELECT2) ( const float*, const float* ); -typedef lapack_logical (*LAPACK_S_SELECT3) - ( const float*, const float*, const float* ); -typedef lapack_logical (*LAPACK_D_SELECT2) ( const double*, const double* ); -typedef lapack_logical (*LAPACK_D_SELECT3) - ( const double*, const double*, const double* ); - -typedef lapack_logical (*LAPACK_C_SELECT1) ( const lapack_complex_float* ); -typedef lapack_logical (*LAPACK_C_SELECT2) - ( const lapack_complex_float*, const lapack_complex_float* ); -typedef lapack_logical (*LAPACK_Z_SELECT1) ( const lapack_complex_double* ); -typedef lapack_logical (*LAPACK_Z_SELECT2) - ( const lapack_complex_double*, const lapack_complex_double* ); - -#include "lapacke_mangling.h" - -#define LAPACK_lsame LAPACK_GLOBAL(lsame,LSAME) -lapack_logical LAPACK_lsame( char* ca, char* cb, - lapack_int lca, lapack_int lcb ); - -/* C-LAPACK function prototypes */ - -lapack_int LAPACKE_sbdsdc( int matrix_order, char uplo, char compq, - lapack_int n, float* d, float* e, float* u, - lapack_int ldu, float* vt, lapack_int ldvt, float* q, - lapack_int* iq ); -lapack_int LAPACKE_dbdsdc( int matrix_order, char uplo, char compq, - lapack_int n, double* d, double* e, double* u, - lapack_int ldu, double* vt, lapack_int ldvt, - double* q, lapack_int* iq ); - -lapack_int LAPACKE_sbdsqr( int matrix_order, char uplo, lapack_int n, - lapack_int ncvt, lapack_int nru, lapack_int ncc, - float* d, float* e, float* vt, lapack_int ldvt, - float* u, lapack_int ldu, float* c, lapack_int ldc ); -lapack_int LAPACKE_dbdsqr( int matrix_order, char uplo, lapack_int n, - lapack_int ncvt, lapack_int nru, lapack_int ncc, - double* d, double* e, double* vt, lapack_int ldvt, - double* u, lapack_int ldu, double* c, - lapack_int ldc ); -lapack_int LAPACKE_cbdsqr( int matrix_order, char uplo, lapack_int n, - lapack_int ncvt, lapack_int nru, lapack_int ncc, - float* d, float* e, lapack_complex_float* vt, - lapack_int ldvt, lapack_complex_float* u, - lapack_int ldu, lapack_complex_float* c, - lapack_int ldc ); -lapack_int LAPACKE_zbdsqr( int matrix_order, char uplo, lapack_int n, - lapack_int ncvt, lapack_int nru, lapack_int ncc, - double* d, double* e, lapack_complex_double* vt, - lapack_int ldvt, lapack_complex_double* u, - lapack_int ldu, lapack_complex_double* c, - lapack_int ldc ); - -lapack_int LAPACKE_sdisna( char job, lapack_int m, lapack_int n, const float* d, - float* sep ); -lapack_int LAPACKE_ddisna( char job, lapack_int m, lapack_int n, - const double* d, double* sep ); - -lapack_int LAPACKE_sgbbrd( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int ncc, lapack_int kl, - lapack_int ku, float* ab, lapack_int ldab, float* d, - float* e, float* q, lapack_int ldq, float* pt, - lapack_int ldpt, float* c, lapack_int ldc ); -lapack_int LAPACKE_dgbbrd( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int ncc, lapack_int kl, - lapack_int ku, double* ab, lapack_int ldab, - double* d, double* e, double* q, lapack_int ldq, - double* pt, lapack_int ldpt, double* c, - lapack_int ldc ); -lapack_int LAPACKE_cgbbrd( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int ncc, lapack_int kl, - lapack_int ku, lapack_complex_float* ab, - lapack_int ldab, float* d, float* e, - lapack_complex_float* q, lapack_int ldq, - lapack_complex_float* pt, lapack_int ldpt, - lapack_complex_float* c, lapack_int ldc ); -lapack_int LAPACKE_zgbbrd( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int ncc, lapack_int kl, - lapack_int ku, lapack_complex_double* ab, - lapack_int ldab, double* d, double* e, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* pt, lapack_int ldpt, - lapack_complex_double* c, lapack_int ldc ); - -lapack_int LAPACKE_sgbcon( int matrix_order, char norm, lapack_int n, - lapack_int kl, lapack_int ku, const float* ab, - lapack_int ldab, const lapack_int* ipiv, float anorm, - float* rcond ); -lapack_int LAPACKE_dgbcon( int matrix_order, char norm, lapack_int n, - lapack_int kl, lapack_int ku, const double* ab, - lapack_int ldab, const lapack_int* ipiv, - double anorm, double* rcond ); -lapack_int LAPACKE_cgbcon( int matrix_order, char norm, lapack_int n, - lapack_int kl, lapack_int ku, - const lapack_complex_float* ab, lapack_int ldab, - const lapack_int* ipiv, float anorm, float* rcond ); -lapack_int LAPACKE_zgbcon( int matrix_order, char norm, lapack_int n, - lapack_int kl, lapack_int ku, - const lapack_complex_double* ab, lapack_int ldab, - const lapack_int* ipiv, double anorm, - double* rcond ); - -lapack_int LAPACKE_sgbequ( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const float* ab, - lapack_int ldab, float* r, float* c, float* rowcnd, - float* colcnd, float* amax ); -lapack_int LAPACKE_dgbequ( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const double* ab, - lapack_int ldab, double* r, double* c, - double* rowcnd, double* colcnd, double* amax ); -lapack_int LAPACKE_cgbequ( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, - const lapack_complex_float* ab, lapack_int ldab, - float* r, float* c, float* rowcnd, float* colcnd, - float* amax ); -lapack_int LAPACKE_zgbequ( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, - const lapack_complex_double* ab, lapack_int ldab, - double* r, double* c, double* rowcnd, double* colcnd, - double* amax ); - -lapack_int LAPACKE_sgbequb( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const float* ab, - lapack_int ldab, float* r, float* c, float* rowcnd, - float* colcnd, float* amax ); -lapack_int LAPACKE_dgbequb( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const double* ab, - lapack_int ldab, double* r, double* c, - double* rowcnd, double* colcnd, double* amax ); -lapack_int LAPACKE_cgbequb( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, - const lapack_complex_float* ab, lapack_int ldab, - float* r, float* c, float* rowcnd, float* colcnd, - float* amax ); -lapack_int LAPACKE_zgbequb( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, - const lapack_complex_double* ab, lapack_int ldab, - double* r, double* c, double* rowcnd, - double* colcnd, double* amax ); - -lapack_int LAPACKE_sgbrfs( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const float* ab, lapack_int ldab, const float* afb, - lapack_int ldafb, const lapack_int* ipiv, - const float* b, lapack_int ldb, float* x, - lapack_int ldx, float* ferr, float* berr ); -lapack_int LAPACKE_dgbrfs( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const double* ab, lapack_int ldab, const double* afb, - lapack_int ldafb, const lapack_int* ipiv, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* ferr, double* berr ); -lapack_int LAPACKE_cgbrfs( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const lapack_complex_float* ab, lapack_int ldab, - const lapack_complex_float* afb, lapack_int ldafb, - const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, float* ferr, - float* berr ); -lapack_int LAPACKE_zgbrfs( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const lapack_complex_double* ab, lapack_int ldab, - const lapack_complex_double* afb, lapack_int ldafb, - const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_sgbrfsx( int matrix_order, char trans, char equed, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, const float* ab, lapack_int ldab, - const float* afb, lapack_int ldafb, - const lapack_int* ipiv, const float* r, - const float* c, const float* b, lapack_int ldb, - float* x, lapack_int ldx, float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params ); -lapack_int LAPACKE_dgbrfsx( int matrix_order, char trans, char equed, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, const double* ab, lapack_int ldab, - const double* afb, lapack_int ldafb, - const lapack_int* ipiv, const double* r, - const double* c, const double* b, lapack_int ldb, - double* x, lapack_int ldx, double* rcond, - double* berr, lapack_int n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int nparams, double* params ); -lapack_int LAPACKE_cgbrfsx( int matrix_order, char trans, char equed, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, const lapack_complex_float* ab, - lapack_int ldab, const lapack_complex_float* afb, - lapack_int ldafb, const lapack_int* ipiv, - const float* r, const float* c, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* berr, lapack_int n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int nparams, float* params ); -lapack_int LAPACKE_zgbrfsx( int matrix_order, char trans, char equed, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, const lapack_complex_double* ab, - lapack_int ldab, const lapack_complex_double* afb, - lapack_int ldafb, const lapack_int* ipiv, - const double* r, const double* c, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* berr, lapack_int n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int nparams, double* params ); - -lapack_int LAPACKE_sgbsv( int matrix_order, lapack_int n, lapack_int kl, - lapack_int ku, lapack_int nrhs, float* ab, - lapack_int ldab, lapack_int* ipiv, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dgbsv( int matrix_order, lapack_int n, lapack_int kl, - lapack_int ku, lapack_int nrhs, double* ab, - lapack_int ldab, lapack_int* ipiv, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cgbsv( int matrix_order, lapack_int n, lapack_int kl, - lapack_int ku, lapack_int nrhs, - lapack_complex_float* ab, lapack_int ldab, - lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zgbsv( int matrix_order, lapack_int n, lapack_int kl, - lapack_int ku, lapack_int nrhs, - lapack_complex_double* ab, lapack_int ldab, - lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_sgbsvx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, float* ab, lapack_int ldab, - float* afb, lapack_int ldafb, lapack_int* ipiv, - char* equed, float* r, float* c, float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - float* rpivot ); -lapack_int LAPACKE_dgbsvx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, double* ab, lapack_int ldab, - double* afb, lapack_int ldafb, lapack_int* ipiv, - char* equed, double* r, double* c, double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - double* rpivot ); -lapack_int LAPACKE_cgbsvx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, lapack_complex_float* ab, - lapack_int ldab, lapack_complex_float* afb, - lapack_int ldafb, lapack_int* ipiv, char* equed, - float* r, float* c, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr, float* rpivot ); -lapack_int LAPACKE_zgbsvx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, lapack_complex_double* ab, - lapack_int ldab, lapack_complex_double* afb, - lapack_int ldafb, lapack_int* ipiv, char* equed, - double* r, double* c, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, double* rcond, double* ferr, - double* berr, double* rpivot ); - -lapack_int LAPACKE_sgbsvxx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, float* ab, lapack_int ldab, - float* afb, lapack_int ldafb, lapack_int* ipiv, - char* equed, float* r, float* c, float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params ); -lapack_int LAPACKE_dgbsvxx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, double* ab, lapack_int ldab, - double* afb, lapack_int ldafb, lapack_int* ipiv, - char* equed, double* r, double* c, double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* rpvgrw, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params ); -lapack_int LAPACKE_cgbsvxx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, lapack_complex_float* ab, - lapack_int ldab, lapack_complex_float* afb, - lapack_int ldafb, lapack_int* ipiv, char* equed, - float* r, float* c, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* rpvgrw, - float* berr, lapack_int n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int nparams, float* params ); -lapack_int LAPACKE_zgbsvxx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, lapack_complex_double* ab, - lapack_int ldab, lapack_complex_double* afb, - lapack_int ldafb, lapack_int* ipiv, char* equed, - double* r, double* c, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, double* rcond, double* rpvgrw, - double* berr, lapack_int n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int nparams, double* params ); - -lapack_int LAPACKE_sgbtrf( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, float* ab, - lapack_int ldab, lapack_int* ipiv ); -lapack_int LAPACKE_dgbtrf( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, double* ab, - lapack_int ldab, lapack_int* ipiv ); -lapack_int LAPACKE_cgbtrf( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, - lapack_complex_float* ab, lapack_int ldab, - lapack_int* ipiv ); -lapack_int LAPACKE_zgbtrf( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, - lapack_complex_double* ab, lapack_int ldab, - lapack_int* ipiv ); - -lapack_int LAPACKE_sgbtrs( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const float* ab, lapack_int ldab, - const lapack_int* ipiv, float* b, lapack_int ldb ); -lapack_int LAPACKE_dgbtrs( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const double* ab, lapack_int ldab, - const lapack_int* ipiv, double* b, lapack_int ldb ); -lapack_int LAPACKE_cgbtrs( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const lapack_complex_float* ab, lapack_int ldab, - const lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zgbtrs( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const lapack_complex_double* ab, lapack_int ldab, - const lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_sgebak( int matrix_order, char job, char side, lapack_int n, - lapack_int ilo, lapack_int ihi, const float* scale, - lapack_int m, float* v, lapack_int ldv ); -lapack_int LAPACKE_dgebak( int matrix_order, char job, char side, lapack_int n, - lapack_int ilo, lapack_int ihi, const double* scale, - lapack_int m, double* v, lapack_int ldv ); -lapack_int LAPACKE_cgebak( int matrix_order, char job, char side, lapack_int n, - lapack_int ilo, lapack_int ihi, const float* scale, - lapack_int m, lapack_complex_float* v, - lapack_int ldv ); -lapack_int LAPACKE_zgebak( int matrix_order, char job, char side, lapack_int n, - lapack_int ilo, lapack_int ihi, const double* scale, - lapack_int m, lapack_complex_double* v, - lapack_int ldv ); - -lapack_int LAPACKE_sgebal( int matrix_order, char job, lapack_int n, float* a, - lapack_int lda, lapack_int* ilo, lapack_int* ihi, - float* scale ); -lapack_int LAPACKE_dgebal( int matrix_order, char job, lapack_int n, double* a, - lapack_int lda, lapack_int* ilo, lapack_int* ihi, - double* scale ); -lapack_int LAPACKE_cgebal( int matrix_order, char job, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* ilo, lapack_int* ihi, float* scale ); -lapack_int LAPACKE_zgebal( int matrix_order, char job, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* ilo, lapack_int* ihi, double* scale ); - -lapack_int LAPACKE_sgebrd( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* d, float* e, - float* tauq, float* taup ); -lapack_int LAPACKE_dgebrd( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* d, double* e, - double* tauq, double* taup ); -lapack_int LAPACKE_cgebrd( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, float* d, - float* e, lapack_complex_float* tauq, - lapack_complex_float* taup ); -lapack_int LAPACKE_zgebrd( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, double* d, - double* e, lapack_complex_double* tauq, - lapack_complex_double* taup ); - -lapack_int LAPACKE_sgecon( int matrix_order, char norm, lapack_int n, - const float* a, lapack_int lda, float anorm, - float* rcond ); -lapack_int LAPACKE_dgecon( int matrix_order, char norm, lapack_int n, - const double* a, lapack_int lda, double anorm, - double* rcond ); -lapack_int LAPACKE_cgecon( int matrix_order, char norm, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float anorm, float* rcond ); -lapack_int LAPACKE_zgecon( int matrix_order, char norm, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double anorm, double* rcond ); - -lapack_int LAPACKE_sgeequ( int matrix_order, lapack_int m, lapack_int n, - const float* a, lapack_int lda, float* r, float* c, - float* rowcnd, float* colcnd, float* amax ); -lapack_int LAPACKE_dgeequ( int matrix_order, lapack_int m, lapack_int n, - const double* a, lapack_int lda, double* r, - double* c, double* rowcnd, double* colcnd, - double* amax ); -lapack_int LAPACKE_cgeequ( int matrix_order, lapack_int m, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* r, float* c, float* rowcnd, float* colcnd, - float* amax ); -lapack_int LAPACKE_zgeequ( int matrix_order, lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* r, double* c, double* rowcnd, double* colcnd, - double* amax ); - -lapack_int LAPACKE_sgeequb( int matrix_order, lapack_int m, lapack_int n, - const float* a, lapack_int lda, float* r, float* c, - float* rowcnd, float* colcnd, float* amax ); -lapack_int LAPACKE_dgeequb( int matrix_order, lapack_int m, lapack_int n, - const double* a, lapack_int lda, double* r, - double* c, double* rowcnd, double* colcnd, - double* amax ); -lapack_int LAPACKE_cgeequb( int matrix_order, lapack_int m, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* r, float* c, float* rowcnd, float* colcnd, - float* amax ); -lapack_int LAPACKE_zgeequb( int matrix_order, lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* r, double* c, double* rowcnd, - double* colcnd, double* amax ); - -lapack_int LAPACKE_sgees( int matrix_order, char jobvs, char sort, - LAPACK_S_SELECT2 select, lapack_int n, float* a, - lapack_int lda, lapack_int* sdim, float* wr, - float* wi, float* vs, lapack_int ldvs ); -lapack_int LAPACKE_dgees( int matrix_order, char jobvs, char sort, - LAPACK_D_SELECT2 select, lapack_int n, double* a, - lapack_int lda, lapack_int* sdim, double* wr, - double* wi, double* vs, lapack_int ldvs ); -lapack_int LAPACKE_cgees( int matrix_order, char jobvs, char sort, - LAPACK_C_SELECT1 select, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* sdim, lapack_complex_float* w, - lapack_complex_float* vs, lapack_int ldvs ); -lapack_int LAPACKE_zgees( int matrix_order, char jobvs, char sort, - LAPACK_Z_SELECT1 select, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* sdim, lapack_complex_double* w, - lapack_complex_double* vs, lapack_int ldvs ); - -lapack_int LAPACKE_sgeesx( int matrix_order, char jobvs, char sort, - LAPACK_S_SELECT2 select, char sense, lapack_int n, - float* a, lapack_int lda, lapack_int* sdim, - float* wr, float* wi, float* vs, lapack_int ldvs, - float* rconde, float* rcondv ); -lapack_int LAPACKE_dgeesx( int matrix_order, char jobvs, char sort, - LAPACK_D_SELECT2 select, char sense, lapack_int n, - double* a, lapack_int lda, lapack_int* sdim, - double* wr, double* wi, double* vs, lapack_int ldvs, - double* rconde, double* rcondv ); -lapack_int LAPACKE_cgeesx( int matrix_order, char jobvs, char sort, - LAPACK_C_SELECT1 select, char sense, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* sdim, lapack_complex_float* w, - lapack_complex_float* vs, lapack_int ldvs, - float* rconde, float* rcondv ); -lapack_int LAPACKE_zgeesx( int matrix_order, char jobvs, char sort, - LAPACK_Z_SELECT1 select, char sense, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* sdim, lapack_complex_double* w, - lapack_complex_double* vs, lapack_int ldvs, - double* rconde, double* rcondv ); - -lapack_int LAPACKE_sgeev( int matrix_order, char jobvl, char jobvr, - lapack_int n, float* a, lapack_int lda, float* wr, - float* wi, float* vl, lapack_int ldvl, float* vr, - lapack_int ldvr ); -lapack_int LAPACKE_dgeev( int matrix_order, char jobvl, char jobvr, - lapack_int n, double* a, lapack_int lda, double* wr, - double* wi, double* vl, lapack_int ldvl, double* vr, - lapack_int ldvr ); -lapack_int LAPACKE_cgeev( int matrix_order, char jobvl, char jobvr, - lapack_int n, lapack_complex_float* a, lapack_int lda, - lapack_complex_float* w, lapack_complex_float* vl, - lapack_int ldvl, lapack_complex_float* vr, - lapack_int ldvr ); -lapack_int LAPACKE_zgeev( int matrix_order, char jobvl, char jobvr, - lapack_int n, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* w, - lapack_complex_double* vl, lapack_int ldvl, - lapack_complex_double* vr, lapack_int ldvr ); - -lapack_int LAPACKE_sgeevx( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, float* a, - lapack_int lda, float* wr, float* wi, float* vl, - lapack_int ldvl, float* vr, lapack_int ldvr, - lapack_int* ilo, lapack_int* ihi, float* scale, - float* abnrm, float* rconde, float* rcondv ); -lapack_int LAPACKE_dgeevx( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, double* a, - lapack_int lda, double* wr, double* wi, double* vl, - lapack_int ldvl, double* vr, lapack_int ldvr, - lapack_int* ilo, lapack_int* ihi, double* scale, - double* abnrm, double* rconde, double* rcondv ); -lapack_int LAPACKE_cgeevx( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* w, lapack_complex_float* vl, - lapack_int ldvl, lapack_complex_float* vr, - lapack_int ldvr, lapack_int* ilo, lapack_int* ihi, - float* scale, float* abnrm, float* rconde, - float* rcondv ); -lapack_int LAPACKE_zgeevx( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* w, lapack_complex_double* vl, - lapack_int ldvl, lapack_complex_double* vr, - lapack_int ldvr, lapack_int* ilo, lapack_int* ihi, - double* scale, double* abnrm, double* rconde, - double* rcondv ); - -lapack_int LAPACKE_sgehrd( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, float* a, lapack_int lda, - float* tau ); -lapack_int LAPACKE_dgehrd( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, double* a, lapack_int lda, - double* tau ); -lapack_int LAPACKE_cgehrd( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* tau ); -lapack_int LAPACKE_zgehrd( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* tau ); - -lapack_int LAPACKE_sgejsv( int matrix_order, char joba, char jobu, char jobv, - char jobr, char jobt, char jobp, lapack_int m, - lapack_int n, float* a, lapack_int lda, float* sva, - float* u, lapack_int ldu, float* v, lapack_int ldv, - float* stat, lapack_int* istat ); -lapack_int LAPACKE_dgejsv( int matrix_order, char joba, char jobu, char jobv, - char jobr, char jobt, char jobp, lapack_int m, - lapack_int n, double* a, lapack_int lda, double* sva, - double* u, lapack_int ldu, double* v, lapack_int ldv, - double* stat, lapack_int* istat ); - -lapack_int LAPACKE_sgelq2( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau ); -lapack_int LAPACKE_dgelq2( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau ); -lapack_int LAPACKE_cgelq2( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau ); -lapack_int LAPACKE_zgelq2( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau ); - -lapack_int LAPACKE_sgelqf( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau ); -lapack_int LAPACKE_dgelqf( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau ); -lapack_int LAPACKE_cgelqf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau ); -lapack_int LAPACKE_zgelqf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau ); - -lapack_int LAPACKE_sgels( int matrix_order, char trans, lapack_int m, - lapack_int n, lapack_int nrhs, float* a, - lapack_int lda, float* b, lapack_int ldb ); -lapack_int LAPACKE_dgels( int matrix_order, char trans, lapack_int m, - lapack_int n, lapack_int nrhs, double* a, - lapack_int lda, double* b, lapack_int ldb ); -lapack_int LAPACKE_cgels( int matrix_order, char trans, lapack_int m, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zgels( int matrix_order, char trans, lapack_int m, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_sgelsd( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, float* a, lapack_int lda, float* b, - lapack_int ldb, float* s, float rcond, - lapack_int* rank ); -lapack_int LAPACKE_dgelsd( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, - double* b, lapack_int ldb, double* s, double rcond, - lapack_int* rank ); -lapack_int LAPACKE_cgelsd( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, float* s, float rcond, - lapack_int* rank ); -lapack_int LAPACKE_zgelsd( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, double* s, double rcond, - lapack_int* rank ); - -lapack_int LAPACKE_sgelss( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, float* a, lapack_int lda, float* b, - lapack_int ldb, float* s, float rcond, - lapack_int* rank ); -lapack_int LAPACKE_dgelss( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, - double* b, lapack_int ldb, double* s, double rcond, - lapack_int* rank ); -lapack_int LAPACKE_cgelss( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, float* s, float rcond, - lapack_int* rank ); -lapack_int LAPACKE_zgelss( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, double* s, double rcond, - lapack_int* rank ); - -lapack_int LAPACKE_sgelsy( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, float* a, lapack_int lda, float* b, - lapack_int ldb, lapack_int* jpvt, float rcond, - lapack_int* rank ); -lapack_int LAPACKE_dgelsy( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, - double* b, lapack_int ldb, lapack_int* jpvt, - double rcond, lapack_int* rank ); -lapack_int LAPACKE_cgelsy( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, lapack_int* jpvt, float rcond, - lapack_int* rank ); -lapack_int LAPACKE_zgelsy( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, lapack_int* jpvt, double rcond, - lapack_int* rank ); - -lapack_int LAPACKE_sgeqlf( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau ); -lapack_int LAPACKE_dgeqlf( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau ); -lapack_int LAPACKE_cgeqlf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau ); -lapack_int LAPACKE_zgeqlf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau ); - -lapack_int LAPACKE_sgeqp3( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, lapack_int* jpvt, - float* tau ); -lapack_int LAPACKE_dgeqp3( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, lapack_int* jpvt, - double* tau ); -lapack_int LAPACKE_cgeqp3( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* jpvt, lapack_complex_float* tau ); -lapack_int LAPACKE_zgeqp3( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* jpvt, lapack_complex_double* tau ); - -lapack_int LAPACKE_sgeqpf( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, lapack_int* jpvt, - float* tau ); -lapack_int LAPACKE_dgeqpf( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, lapack_int* jpvt, - double* tau ); -lapack_int LAPACKE_cgeqpf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* jpvt, lapack_complex_float* tau ); -lapack_int LAPACKE_zgeqpf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* jpvt, lapack_complex_double* tau ); - -lapack_int LAPACKE_sgeqr2( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau ); -lapack_int LAPACKE_dgeqr2( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau ); -lapack_int LAPACKE_cgeqr2( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau ); -lapack_int LAPACKE_zgeqr2( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau ); - -lapack_int LAPACKE_sgeqrf( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau ); -lapack_int LAPACKE_dgeqrf( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau ); -lapack_int LAPACKE_cgeqrf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau ); -lapack_int LAPACKE_zgeqrf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau ); - -lapack_int LAPACKE_sgeqrfp( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau ); -lapack_int LAPACKE_dgeqrfp( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau ); -lapack_int LAPACKE_cgeqrfp( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau ); -lapack_int LAPACKE_zgeqrfp( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau ); - -lapack_int LAPACKE_sgerfs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - const float* af, lapack_int ldaf, - const lapack_int* ipiv, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* ferr, float* berr ); -lapack_int LAPACKE_dgerfs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const double* a, lapack_int lda, - const double* af, lapack_int ldaf, - const lapack_int* ipiv, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* ferr, double* berr ); -lapack_int LAPACKE_cgerfs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* af, - lapack_int ldaf, const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, float* ferr, - float* berr ); -lapack_int LAPACKE_zgerfs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* af, - lapack_int ldaf, const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_sgerfsx( int matrix_order, char trans, char equed, - lapack_int n, lapack_int nrhs, const float* a, - lapack_int lda, const float* af, lapack_int ldaf, - const lapack_int* ipiv, const float* r, - const float* c, const float* b, lapack_int ldb, - float* x, lapack_int ldx, float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params ); -lapack_int LAPACKE_dgerfsx( int matrix_order, char trans, char equed, - lapack_int n, lapack_int nrhs, const double* a, - lapack_int lda, const double* af, lapack_int ldaf, - const lapack_int* ipiv, const double* r, - const double* c, const double* b, lapack_int ldb, - double* x, lapack_int ldx, double* rcond, - double* berr, lapack_int n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int nparams, double* params ); -lapack_int LAPACKE_cgerfsx( int matrix_order, char trans, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* af, lapack_int ldaf, - const lapack_int* ipiv, const float* r, - const float* c, const lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params ); -lapack_int LAPACKE_zgerfsx( int matrix_order, char trans, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* af, lapack_int ldaf, - const lapack_int* ipiv, const double* r, - const double* c, const lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, double* rcond, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params ); - -lapack_int LAPACKE_sgerqf( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau ); -lapack_int LAPACKE_dgerqf( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau ); -lapack_int LAPACKE_cgerqf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau ); -lapack_int LAPACKE_zgerqf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau ); - -lapack_int LAPACKE_sgesdd( int matrix_order, char jobz, lapack_int m, - lapack_int n, float* a, lapack_int lda, float* s, - float* u, lapack_int ldu, float* vt, - lapack_int ldvt ); -lapack_int LAPACKE_dgesdd( int matrix_order, char jobz, lapack_int m, - lapack_int n, double* a, lapack_int lda, double* s, - double* u, lapack_int ldu, double* vt, - lapack_int ldvt ); -lapack_int LAPACKE_cgesdd( int matrix_order, char jobz, lapack_int m, - lapack_int n, lapack_complex_float* a, - lapack_int lda, float* s, lapack_complex_float* u, - lapack_int ldu, lapack_complex_float* vt, - lapack_int ldvt ); -lapack_int LAPACKE_zgesdd( int matrix_order, char jobz, lapack_int m, - lapack_int n, lapack_complex_double* a, - lapack_int lda, double* s, lapack_complex_double* u, - lapack_int ldu, lapack_complex_double* vt, - lapack_int ldvt ); - -lapack_int LAPACKE_sgesv( int matrix_order, lapack_int n, lapack_int nrhs, - float* a, lapack_int lda, lapack_int* ipiv, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dgesv( int matrix_order, lapack_int n, lapack_int nrhs, - double* a, lapack_int lda, lapack_int* ipiv, - double* b, lapack_int ldb ); -lapack_int LAPACKE_cgesv( int matrix_order, lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zgesv( int matrix_order, lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb ); -lapack_int LAPACKE_dsgesv( int matrix_order, lapack_int n, lapack_int nrhs, - double* a, lapack_int lda, lapack_int* ipiv, - double* b, lapack_int ldb, double* x, lapack_int ldx, - lapack_int* iter ); -lapack_int LAPACKE_zcgesv( int matrix_order, lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, lapack_int* iter ); - -lapack_int LAPACKE_sgesvd( int matrix_order, char jobu, char jobvt, - lapack_int m, lapack_int n, float* a, lapack_int lda, - float* s, float* u, lapack_int ldu, float* vt, - lapack_int ldvt, float* superb ); -lapack_int LAPACKE_dgesvd( int matrix_order, char jobu, char jobvt, - lapack_int m, lapack_int n, double* a, - lapack_int lda, double* s, double* u, lapack_int ldu, - double* vt, lapack_int ldvt, double* superb ); -lapack_int LAPACKE_cgesvd( int matrix_order, char jobu, char jobvt, - lapack_int m, lapack_int n, lapack_complex_float* a, - lapack_int lda, float* s, lapack_complex_float* u, - lapack_int ldu, lapack_complex_float* vt, - lapack_int ldvt, float* superb ); -lapack_int LAPACKE_zgesvd( int matrix_order, char jobu, char jobvt, - lapack_int m, lapack_int n, lapack_complex_double* a, - lapack_int lda, double* s, lapack_complex_double* u, - lapack_int ldu, lapack_complex_double* vt, - lapack_int ldvt, double* superb ); - -lapack_int LAPACKE_sgesvj( int matrix_order, char joba, char jobu, char jobv, - lapack_int m, lapack_int n, float* a, lapack_int lda, - float* sva, lapack_int mv, float* v, lapack_int ldv, - float* stat ); -lapack_int LAPACKE_dgesvj( int matrix_order, char joba, char jobu, char jobv, - lapack_int m, lapack_int n, double* a, - lapack_int lda, double* sva, lapack_int mv, - double* v, lapack_int ldv, double* stat ); - -lapack_int LAPACKE_sgesvx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, float* a, - lapack_int lda, float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* r, float* c, - float* b, lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - float* rpivot ); -lapack_int LAPACKE_dgesvx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, double* a, - lapack_int lda, double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* r, double* c, - double* b, lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - double* rpivot ); -lapack_int LAPACKE_cgesvx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* r, float* c, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - float* rpivot ); -lapack_int LAPACKE_zgesvx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* r, double* c, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - double* rpivot ); - -lapack_int LAPACKE_sgesvxx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, float* a, - lapack_int lda, float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* r, float* c, - float* b, lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params ); -lapack_int LAPACKE_dgesvxx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, double* a, - lapack_int lda, double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* r, double* c, - double* b, lapack_int ldb, double* x, - lapack_int ldx, double* rcond, double* rpvgrw, - double* berr, lapack_int n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int nparams, double* params ); -lapack_int LAPACKE_cgesvxx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* r, float* c, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params ); -lapack_int LAPACKE_zgesvxx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* r, double* c, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* rpvgrw, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params ); - -lapack_int LAPACKE_sgetf2( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, lapack_int* ipiv ); -lapack_int LAPACKE_dgetf2( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, lapack_int* ipiv ); -lapack_int LAPACKE_cgetf2( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* ipiv ); -lapack_int LAPACKE_zgetf2( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* ipiv ); - -lapack_int LAPACKE_sgetrf( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, lapack_int* ipiv ); -lapack_int LAPACKE_dgetrf( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, lapack_int* ipiv ); -lapack_int LAPACKE_cgetrf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* ipiv ); -lapack_int LAPACKE_zgetrf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* ipiv ); - -lapack_int LAPACKE_sgetri( int matrix_order, lapack_int n, float* a, - lapack_int lda, const lapack_int* ipiv ); -lapack_int LAPACKE_dgetri( int matrix_order, lapack_int n, double* a, - lapack_int lda, const lapack_int* ipiv ); -lapack_int LAPACKE_cgetri( int matrix_order, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv ); -lapack_int LAPACKE_zgetri( int matrix_order, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv ); - -lapack_int LAPACKE_sgetrs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - const lapack_int* ipiv, float* b, lapack_int ldb ); -lapack_int LAPACKE_dgetrs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const double* a, lapack_int lda, - const lapack_int* ipiv, double* b, lapack_int ldb ); -lapack_int LAPACKE_cgetrs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zgetrs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_sggbak( int matrix_order, char job, char side, lapack_int n, - lapack_int ilo, lapack_int ihi, const float* lscale, - const float* rscale, lapack_int m, float* v, - lapack_int ldv ); -lapack_int LAPACKE_dggbak( int matrix_order, char job, char side, lapack_int n, - lapack_int ilo, lapack_int ihi, const double* lscale, - const double* rscale, lapack_int m, double* v, - lapack_int ldv ); -lapack_int LAPACKE_cggbak( int matrix_order, char job, char side, lapack_int n, - lapack_int ilo, lapack_int ihi, const float* lscale, - const float* rscale, lapack_int m, - lapack_complex_float* v, lapack_int ldv ); -lapack_int LAPACKE_zggbak( int matrix_order, char job, char side, lapack_int n, - lapack_int ilo, lapack_int ihi, const double* lscale, - const double* rscale, lapack_int m, - lapack_complex_double* v, lapack_int ldv ); - -lapack_int LAPACKE_sggbal( int matrix_order, char job, lapack_int n, float* a, - lapack_int lda, float* b, lapack_int ldb, - lapack_int* ilo, lapack_int* ihi, float* lscale, - float* rscale ); -lapack_int LAPACKE_dggbal( int matrix_order, char job, lapack_int n, double* a, - lapack_int lda, double* b, lapack_int ldb, - lapack_int* ilo, lapack_int* ihi, double* lscale, - double* rscale ); -lapack_int LAPACKE_cggbal( int matrix_order, char job, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_int* ilo, lapack_int* ihi, float* lscale, - float* rscale ); -lapack_int LAPACKE_zggbal( int matrix_order, char job, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_int* ilo, lapack_int* ihi, double* lscale, - double* rscale ); - -lapack_int LAPACKE_sgges( int matrix_order, char jobvsl, char jobvsr, char sort, - LAPACK_S_SELECT3 selctg, lapack_int n, float* a, - lapack_int lda, float* b, lapack_int ldb, - lapack_int* sdim, float* alphar, float* alphai, - float* beta, float* vsl, lapack_int ldvsl, float* vsr, - lapack_int ldvsr ); -lapack_int LAPACKE_dgges( int matrix_order, char jobvsl, char jobvsr, char sort, - LAPACK_D_SELECT3 selctg, lapack_int n, double* a, - lapack_int lda, double* b, lapack_int ldb, - lapack_int* sdim, double* alphar, double* alphai, - double* beta, double* vsl, lapack_int ldvsl, - double* vsr, lapack_int ldvsr ); -lapack_int LAPACKE_cgges( int matrix_order, char jobvsl, char jobvsr, char sort, - LAPACK_C_SELECT2 selctg, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_int* sdim, lapack_complex_float* alpha, - lapack_complex_float* beta, lapack_complex_float* vsl, - lapack_int ldvsl, lapack_complex_float* vsr, - lapack_int ldvsr ); -lapack_int LAPACKE_zgges( int matrix_order, char jobvsl, char jobvsr, char sort, - LAPACK_Z_SELECT2 selctg, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_int* sdim, lapack_complex_double* alpha, - lapack_complex_double* beta, - lapack_complex_double* vsl, lapack_int ldvsl, - lapack_complex_double* vsr, lapack_int ldvsr ); - -lapack_int LAPACKE_sggesx( int matrix_order, char jobvsl, char jobvsr, - char sort, LAPACK_S_SELECT3 selctg, char sense, - lapack_int n, float* a, lapack_int lda, float* b, - lapack_int ldb, lapack_int* sdim, float* alphar, - float* alphai, float* beta, float* vsl, - lapack_int ldvsl, float* vsr, lapack_int ldvsr, - float* rconde, float* rcondv ); -lapack_int LAPACKE_dggesx( int matrix_order, char jobvsl, char jobvsr, - char sort, LAPACK_D_SELECT3 selctg, char sense, - lapack_int n, double* a, lapack_int lda, double* b, - lapack_int ldb, lapack_int* sdim, double* alphar, - double* alphai, double* beta, double* vsl, - lapack_int ldvsl, double* vsr, lapack_int ldvsr, - double* rconde, double* rcondv ); -lapack_int LAPACKE_cggesx( int matrix_order, char jobvsl, char jobvsr, - char sort, LAPACK_C_SELECT2 selctg, char sense, - lapack_int n, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, lapack_int* sdim, - lapack_complex_float* alpha, - lapack_complex_float* beta, - lapack_complex_float* vsl, lapack_int ldvsl, - lapack_complex_float* vsr, lapack_int ldvsr, - float* rconde, float* rcondv ); -lapack_int LAPACKE_zggesx( int matrix_order, char jobvsl, char jobvsr, - char sort, LAPACK_Z_SELECT2 selctg, char sense, - lapack_int n, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, lapack_int* sdim, - lapack_complex_double* alpha, - lapack_complex_double* beta, - lapack_complex_double* vsl, lapack_int ldvsl, - lapack_complex_double* vsr, lapack_int ldvsr, - double* rconde, double* rcondv ); - -lapack_int LAPACKE_sggev( int matrix_order, char jobvl, char jobvr, - lapack_int n, float* a, lapack_int lda, float* b, - lapack_int ldb, float* alphar, float* alphai, - float* beta, float* vl, lapack_int ldvl, float* vr, - lapack_int ldvr ); -lapack_int LAPACKE_dggev( int matrix_order, char jobvl, char jobvr, - lapack_int n, double* a, lapack_int lda, double* b, - lapack_int ldb, double* alphar, double* alphai, - double* beta, double* vl, lapack_int ldvl, double* vr, - lapack_int ldvr ); -lapack_int LAPACKE_cggev( int matrix_order, char jobvl, char jobvr, - lapack_int n, lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* alpha, - lapack_complex_float* beta, lapack_complex_float* vl, - lapack_int ldvl, lapack_complex_float* vr, - lapack_int ldvr ); -lapack_int LAPACKE_zggev( int matrix_order, char jobvl, char jobvr, - lapack_int n, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* alpha, - lapack_complex_double* beta, - lapack_complex_double* vl, lapack_int ldvl, - lapack_complex_double* vr, lapack_int ldvr ); - -lapack_int LAPACKE_sggevx( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, float* a, - lapack_int lda, float* b, lapack_int ldb, - float* alphar, float* alphai, float* beta, float* vl, - lapack_int ldvl, float* vr, lapack_int ldvr, - lapack_int* ilo, lapack_int* ihi, float* lscale, - float* rscale, float* abnrm, float* bbnrm, - float* rconde, float* rcondv ); -lapack_int LAPACKE_dggevx( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, double* a, - lapack_int lda, double* b, lapack_int ldb, - double* alphar, double* alphai, double* beta, - double* vl, lapack_int ldvl, double* vr, - lapack_int ldvr, lapack_int* ilo, lapack_int* ihi, - double* lscale, double* rscale, double* abnrm, - double* bbnrm, double* rconde, double* rcondv ); -lapack_int LAPACKE_cggevx( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* alpha, - lapack_complex_float* beta, lapack_complex_float* vl, - lapack_int ldvl, lapack_complex_float* vr, - lapack_int ldvr, lapack_int* ilo, lapack_int* ihi, - float* lscale, float* rscale, float* abnrm, - float* bbnrm, float* rconde, float* rcondv ); -lapack_int LAPACKE_zggevx( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* alpha, - lapack_complex_double* beta, - lapack_complex_double* vl, lapack_int ldvl, - lapack_complex_double* vr, lapack_int ldvr, - lapack_int* ilo, lapack_int* ihi, double* lscale, - double* rscale, double* abnrm, double* bbnrm, - double* rconde, double* rcondv ); - -lapack_int LAPACKE_sggglm( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, float* a, lapack_int lda, float* b, - lapack_int ldb, float* d, float* x, float* y ); -lapack_int LAPACKE_dggglm( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, double* a, lapack_int lda, double* b, - lapack_int ldb, double* d, double* x, double* y ); -lapack_int LAPACKE_cggglm( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* d, - lapack_complex_float* x, lapack_complex_float* y ); -lapack_int LAPACKE_zggglm( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* d, - lapack_complex_double* x, lapack_complex_double* y ); - -lapack_int LAPACKE_sgghrd( int matrix_order, char compq, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - float* a, lapack_int lda, float* b, lapack_int ldb, - float* q, lapack_int ldq, float* z, lapack_int ldz ); -lapack_int LAPACKE_dgghrd( int matrix_order, char compq, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - double* a, lapack_int lda, double* b, lapack_int ldb, - double* q, lapack_int ldq, double* z, - lapack_int ldz ); -lapack_int LAPACKE_cgghrd( int matrix_order, char compq, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* q, lapack_int ldq, - lapack_complex_float* z, lapack_int ldz ); -lapack_int LAPACKE_zgghrd( int matrix_order, char compq, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* z, lapack_int ldz ); - -lapack_int LAPACKE_sgglse( int matrix_order, lapack_int m, lapack_int n, - lapack_int p, float* a, lapack_int lda, float* b, - lapack_int ldb, float* c, float* d, float* x ); -lapack_int LAPACKE_dgglse( int matrix_order, lapack_int m, lapack_int n, - lapack_int p, double* a, lapack_int lda, double* b, - lapack_int ldb, double* c, double* d, double* x ); -lapack_int LAPACKE_cgglse( int matrix_order, lapack_int m, lapack_int n, - lapack_int p, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* c, - lapack_complex_float* d, lapack_complex_float* x ); -lapack_int LAPACKE_zgglse( int matrix_order, lapack_int m, lapack_int n, - lapack_int p, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* c, - lapack_complex_double* d, lapack_complex_double* x ); - -lapack_int LAPACKE_sggqrf( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, float* a, lapack_int lda, float* taua, - float* b, lapack_int ldb, float* taub ); -lapack_int LAPACKE_dggqrf( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, double* a, lapack_int lda, - double* taua, double* b, lapack_int ldb, - double* taub ); -lapack_int LAPACKE_cggqrf( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* taua, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* taub ); -lapack_int LAPACKE_zggqrf( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* taua, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* taub ); - -lapack_int LAPACKE_sggrqf( int matrix_order, lapack_int m, lapack_int p, - lapack_int n, float* a, lapack_int lda, float* taua, - float* b, lapack_int ldb, float* taub ); -lapack_int LAPACKE_dggrqf( int matrix_order, lapack_int m, lapack_int p, - lapack_int n, double* a, lapack_int lda, - double* taua, double* b, lapack_int ldb, - double* taub ); -lapack_int LAPACKE_cggrqf( int matrix_order, lapack_int m, lapack_int p, - lapack_int n, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* taua, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* taub ); -lapack_int LAPACKE_zggrqf( int matrix_order, lapack_int m, lapack_int p, - lapack_int n, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* taua, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* taub ); - -lapack_int LAPACKE_sggsvd( int matrix_order, char jobu, char jobv, char jobq, - lapack_int m, lapack_int n, lapack_int p, - lapack_int* k, lapack_int* l, float* a, - lapack_int lda, float* b, lapack_int ldb, - float* alpha, float* beta, float* u, lapack_int ldu, - float* v, lapack_int ldv, float* q, lapack_int ldq, - lapack_int* iwork ); -lapack_int LAPACKE_dggsvd( int matrix_order, char jobu, char jobv, char jobq, - lapack_int m, lapack_int n, lapack_int p, - lapack_int* k, lapack_int* l, double* a, - lapack_int lda, double* b, lapack_int ldb, - double* alpha, double* beta, double* u, - lapack_int ldu, double* v, lapack_int ldv, double* q, - lapack_int ldq, lapack_int* iwork ); -lapack_int LAPACKE_cggsvd( int matrix_order, char jobu, char jobv, char jobq, - lapack_int m, lapack_int n, lapack_int p, - lapack_int* k, lapack_int* l, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - float* alpha, float* beta, lapack_complex_float* u, - lapack_int ldu, lapack_complex_float* v, - lapack_int ldv, lapack_complex_float* q, - lapack_int ldq, lapack_int* iwork ); -lapack_int LAPACKE_zggsvd( int matrix_order, char jobu, char jobv, char jobq, - lapack_int m, lapack_int n, lapack_int p, - lapack_int* k, lapack_int* l, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - double* alpha, double* beta, - lapack_complex_double* u, lapack_int ldu, - lapack_complex_double* v, lapack_int ldv, - lapack_complex_double* q, lapack_int ldq, - lapack_int* iwork ); - -lapack_int LAPACKE_sggsvp( int matrix_order, char jobu, char jobv, char jobq, - lapack_int m, lapack_int p, lapack_int n, float* a, - lapack_int lda, float* b, lapack_int ldb, float tola, - float tolb, lapack_int* k, lapack_int* l, float* u, - lapack_int ldu, float* v, lapack_int ldv, float* q, - lapack_int ldq ); -lapack_int LAPACKE_dggsvp( int matrix_order, char jobu, char jobv, char jobq, - lapack_int m, lapack_int p, lapack_int n, double* a, - lapack_int lda, double* b, lapack_int ldb, - double tola, double tolb, lapack_int* k, - lapack_int* l, double* u, lapack_int ldu, double* v, - lapack_int ldv, double* q, lapack_int ldq ); -lapack_int LAPACKE_cggsvp( int matrix_order, char jobu, char jobv, char jobq, - lapack_int m, lapack_int p, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, float tola, - float tolb, lapack_int* k, lapack_int* l, - lapack_complex_float* u, lapack_int ldu, - lapack_complex_float* v, lapack_int ldv, - lapack_complex_float* q, lapack_int ldq ); -lapack_int LAPACKE_zggsvp( int matrix_order, char jobu, char jobv, char jobq, - lapack_int m, lapack_int p, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - double tola, double tolb, lapack_int* k, - lapack_int* l, lapack_complex_double* u, - lapack_int ldu, lapack_complex_double* v, - lapack_int ldv, lapack_complex_double* q, - lapack_int ldq ); - -lapack_int LAPACKE_sgtcon( char norm, lapack_int n, const float* dl, - const float* d, const float* du, const float* du2, - const lapack_int* ipiv, float anorm, float* rcond ); -lapack_int LAPACKE_dgtcon( char norm, lapack_int n, const double* dl, - const double* d, const double* du, const double* du2, - const lapack_int* ipiv, double anorm, - double* rcond ); -lapack_int LAPACKE_cgtcon( char norm, lapack_int n, - const lapack_complex_float* dl, - const lapack_complex_float* d, - const lapack_complex_float* du, - const lapack_complex_float* du2, - const lapack_int* ipiv, float anorm, float* rcond ); -lapack_int LAPACKE_zgtcon( char norm, lapack_int n, - const lapack_complex_double* dl, - const lapack_complex_double* d, - const lapack_complex_double* du, - const lapack_complex_double* du2, - const lapack_int* ipiv, double anorm, - double* rcond ); - -lapack_int LAPACKE_sgtrfs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const float* dl, const float* d, - const float* du, const float* dlf, const float* df, - const float* duf, const float* du2, - const lapack_int* ipiv, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* ferr, float* berr ); -lapack_int LAPACKE_dgtrfs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const double* dl, const double* d, - const double* du, const double* dlf, - const double* df, const double* duf, - const double* du2, const lapack_int* ipiv, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* ferr, double* berr ); -lapack_int LAPACKE_cgtrfs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_float* dl, - const lapack_complex_float* d, - const lapack_complex_float* du, - const lapack_complex_float* dlf, - const lapack_complex_float* df, - const lapack_complex_float* duf, - const lapack_complex_float* du2, - const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, float* ferr, - float* berr ); -lapack_int LAPACKE_zgtrfs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_double* dl, - const lapack_complex_double* d, - const lapack_complex_double* du, - const lapack_complex_double* dlf, - const lapack_complex_double* df, - const lapack_complex_double* duf, - const lapack_complex_double* du2, - const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_sgtsv( int matrix_order, lapack_int n, lapack_int nrhs, - float* dl, float* d, float* du, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dgtsv( int matrix_order, lapack_int n, lapack_int nrhs, - double* dl, double* d, double* du, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cgtsv( int matrix_order, lapack_int n, lapack_int nrhs, - lapack_complex_float* dl, lapack_complex_float* d, - lapack_complex_float* du, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zgtsv( int matrix_order, lapack_int n, lapack_int nrhs, - lapack_complex_double* dl, lapack_complex_double* d, - lapack_complex_double* du, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_sgtsvx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, const float* dl, - const float* d, const float* du, float* dlf, - float* df, float* duf, float* du2, lapack_int* ipiv, - const float* b, lapack_int ldb, float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr ); -lapack_int LAPACKE_dgtsvx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, const double* dl, - const double* d, const double* du, double* dlf, - double* df, double* duf, double* du2, - lapack_int* ipiv, const double* b, lapack_int ldb, - double* x, lapack_int ldx, double* rcond, - double* ferr, double* berr ); -lapack_int LAPACKE_cgtsvx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* dl, - const lapack_complex_float* d, - const lapack_complex_float* du, - lapack_complex_float* dlf, lapack_complex_float* df, - lapack_complex_float* duf, lapack_complex_float* du2, - lapack_int* ipiv, const lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr ); -lapack_int LAPACKE_zgtsvx( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* dl, - const lapack_complex_double* d, - const lapack_complex_double* du, - lapack_complex_double* dlf, - lapack_complex_double* df, - lapack_complex_double* duf, - lapack_complex_double* du2, lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr ); - -lapack_int LAPACKE_sgttrf( lapack_int n, float* dl, float* d, float* du, - float* du2, lapack_int* ipiv ); -lapack_int LAPACKE_dgttrf( lapack_int n, double* dl, double* d, double* du, - double* du2, lapack_int* ipiv ); -lapack_int LAPACKE_cgttrf( lapack_int n, lapack_complex_float* dl, - lapack_complex_float* d, lapack_complex_float* du, - lapack_complex_float* du2, lapack_int* ipiv ); -lapack_int LAPACKE_zgttrf( lapack_int n, lapack_complex_double* dl, - lapack_complex_double* d, lapack_complex_double* du, - lapack_complex_double* du2, lapack_int* ipiv ); - -lapack_int LAPACKE_sgttrs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const float* dl, const float* d, - const float* du, const float* du2, - const lapack_int* ipiv, float* b, lapack_int ldb ); -lapack_int LAPACKE_dgttrs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const double* dl, const double* d, - const double* du, const double* du2, - const lapack_int* ipiv, double* b, lapack_int ldb ); -lapack_int LAPACKE_cgttrs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_float* dl, - const lapack_complex_float* d, - const lapack_complex_float* du, - const lapack_complex_float* du2, - const lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zgttrs( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_double* dl, - const lapack_complex_double* d, - const lapack_complex_double* du, - const lapack_complex_double* du2, - const lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_chbev( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int kd, lapack_complex_float* ab, - lapack_int ldab, float* w, lapack_complex_float* z, - lapack_int ldz ); -lapack_int LAPACKE_zhbev( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int kd, lapack_complex_double* ab, - lapack_int ldab, double* w, lapack_complex_double* z, - lapack_int ldz ); - -lapack_int LAPACKE_chbevd( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int kd, lapack_complex_float* ab, - lapack_int ldab, float* w, lapack_complex_float* z, - lapack_int ldz ); -lapack_int LAPACKE_zhbevd( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int kd, lapack_complex_double* ab, - lapack_int ldab, double* w, lapack_complex_double* z, - lapack_int ldz ); - -lapack_int LAPACKE_chbevx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_int kd, - lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* q, lapack_int ldq, float vl, - float vu, lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, lapack_complex_float* z, - lapack_int ldz, lapack_int* ifail ); -lapack_int LAPACKE_zhbevx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_int kd, - lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* q, lapack_int ldq, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_int* ifail ); - -lapack_int LAPACKE_chbgst( int matrix_order, char vect, char uplo, lapack_int n, - lapack_int ka, lapack_int kb, - lapack_complex_float* ab, lapack_int ldab, - const lapack_complex_float* bb, lapack_int ldbb, - lapack_complex_float* x, lapack_int ldx ); -lapack_int LAPACKE_zhbgst( int matrix_order, char vect, char uplo, lapack_int n, - lapack_int ka, lapack_int kb, - lapack_complex_double* ab, lapack_int ldab, - const lapack_complex_double* bb, lapack_int ldbb, - lapack_complex_double* x, lapack_int ldx ); - -lapack_int LAPACKE_chbgv( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int ka, lapack_int kb, - lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* bb, lapack_int ldbb, float* w, - lapack_complex_float* z, lapack_int ldz ); -lapack_int LAPACKE_zhbgv( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int ka, lapack_int kb, - lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* bb, lapack_int ldbb, double* w, - lapack_complex_double* z, lapack_int ldz ); - -lapack_int LAPACKE_chbgvd( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int ka, lapack_int kb, - lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* bb, lapack_int ldbb, float* w, - lapack_complex_float* z, lapack_int ldz ); -lapack_int LAPACKE_zhbgvd( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int ka, lapack_int kb, - lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* bb, lapack_int ldbb, - double* w, lapack_complex_double* z, - lapack_int ldz ); - -lapack_int LAPACKE_chbgvx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* bb, lapack_int ldbb, - lapack_complex_float* q, lapack_int ldq, float vl, - float vu, lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, lapack_complex_float* z, - lapack_int ldz, lapack_int* ifail ); -lapack_int LAPACKE_zhbgvx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* bb, lapack_int ldbb, - lapack_complex_double* q, lapack_int ldq, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_int* ifail ); - -lapack_int LAPACKE_chbtrd( int matrix_order, char vect, char uplo, lapack_int n, - lapack_int kd, lapack_complex_float* ab, - lapack_int ldab, float* d, float* e, - lapack_complex_float* q, lapack_int ldq ); -lapack_int LAPACKE_zhbtrd( int matrix_order, char vect, char uplo, lapack_int n, - lapack_int kd, lapack_complex_double* ab, - lapack_int ldab, double* d, double* e, - lapack_complex_double* q, lapack_int ldq ); - -lapack_int LAPACKE_checon( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, float anorm, float* rcond ); -lapack_int LAPACKE_zhecon( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, double anorm, - double* rcond ); - -lapack_int LAPACKE_cheequb( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* s, float* scond, float* amax ); -lapack_int LAPACKE_zheequb( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* s, double* scond, double* amax ); - -lapack_int LAPACKE_cheev( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, float* w ); -lapack_int LAPACKE_zheev( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, double* w ); - -lapack_int LAPACKE_cheevd( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, float* w ); -lapack_int LAPACKE_zheevd( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - double* w ); - -lapack_int LAPACKE_cheevr( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_complex_float* a, - lapack_int lda, float vl, float vu, lapack_int il, - lapack_int iu, float abstol, lapack_int* m, float* w, - lapack_complex_float* z, lapack_int ldz, - lapack_int* isuppz ); -lapack_int LAPACKE_zheevr( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_complex_double* a, - lapack_int lda, double vl, double vu, lapack_int il, - lapack_int iu, double abstol, lapack_int* m, - double* w, lapack_complex_double* z, lapack_int ldz, - lapack_int* isuppz ); - -lapack_int LAPACKE_cheevx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_complex_float* a, - lapack_int lda, float vl, float vu, lapack_int il, - lapack_int iu, float abstol, lapack_int* m, float* w, - lapack_complex_float* z, lapack_int ldz, - lapack_int* ifail ); -lapack_int LAPACKE_zheevx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_complex_double* a, - lapack_int lda, double vl, double vu, lapack_int il, - lapack_int iu, double abstol, lapack_int* m, - double* w, lapack_complex_double* z, lapack_int ldz, - lapack_int* ifail ); - -lapack_int LAPACKE_chegst( int matrix_order, lapack_int itype, char uplo, - lapack_int n, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zhegst( int matrix_order, lapack_int itype, char uplo, - lapack_int n, lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_chegv( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, float* w ); -lapack_int LAPACKE_zhegv( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, double* w ); - -lapack_int LAPACKE_chegvd( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, float* w ); -lapack_int LAPACKE_zhegvd( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, double* w ); - -lapack_int LAPACKE_chegvx( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, float vl, - float vu, lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, lapack_complex_float* z, - lapack_int ldz, lapack_int* ifail ); -lapack_int LAPACKE_zhegvx( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_int* ifail ); - -lapack_int LAPACKE_cherfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* af, - lapack_int ldaf, const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, float* ferr, - float* berr ); -lapack_int LAPACKE_zherfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* af, - lapack_int ldaf, const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_cherfsx( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* af, lapack_int ldaf, - const lapack_int* ipiv, const float* s, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* berr, lapack_int n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int nparams, float* params ); -lapack_int LAPACKE_zherfsx( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* af, lapack_int ldaf, - const lapack_int* ipiv, const double* s, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* berr, lapack_int n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int nparams, double* params ); - -lapack_int LAPACKE_chesv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zhesv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_chesvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, lapack_complex_float* af, - lapack_int ldaf, lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr ); -lapack_int LAPACKE_zhesvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, lapack_complex_double* af, - lapack_int ldaf, lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr ); - -lapack_int LAPACKE_chesvxx( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* s, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params ); -lapack_int LAPACKE_zhesvxx( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* s, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* rpvgrw, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params ); - -lapack_int LAPACKE_chetrd( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, float* d, - float* e, lapack_complex_float* tau ); -lapack_int LAPACKE_zhetrd( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, double* d, - double* e, lapack_complex_double* tau ); - -lapack_int LAPACKE_chetrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* ipiv ); -lapack_int LAPACKE_zhetrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* ipiv ); - -lapack_int LAPACKE_chetri( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv ); -lapack_int LAPACKE_zhetri( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv ); - -lapack_int LAPACKE_chetrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zhetrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_chfrk( int matrix_order, char transr, char uplo, char trans, - lapack_int n, lapack_int k, float alpha, - const lapack_complex_float* a, lapack_int lda, - float beta, lapack_complex_float* c ); -lapack_int LAPACKE_zhfrk( int matrix_order, char transr, char uplo, char trans, - lapack_int n, lapack_int k, double alpha, - const lapack_complex_double* a, lapack_int lda, - double beta, lapack_complex_double* c ); - -lapack_int LAPACKE_shgeqz( int matrix_order, char job, char compq, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - float* h, lapack_int ldh, float* t, lapack_int ldt, - float* alphar, float* alphai, float* beta, float* q, - lapack_int ldq, float* z, lapack_int ldz ); -lapack_int LAPACKE_dhgeqz( int matrix_order, char job, char compq, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - double* h, lapack_int ldh, double* t, lapack_int ldt, - double* alphar, double* alphai, double* beta, - double* q, lapack_int ldq, double* z, - lapack_int ldz ); -lapack_int LAPACKE_chgeqz( int matrix_order, char job, char compq, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - lapack_complex_float* h, lapack_int ldh, - lapack_complex_float* t, lapack_int ldt, - lapack_complex_float* alpha, - lapack_complex_float* beta, lapack_complex_float* q, - lapack_int ldq, lapack_complex_float* z, - lapack_int ldz ); -lapack_int LAPACKE_zhgeqz( int matrix_order, char job, char compq, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - lapack_complex_double* h, lapack_int ldh, - lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* alpha, - lapack_complex_double* beta, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* z, lapack_int ldz ); - -lapack_int LAPACKE_chpcon( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* ap, - const lapack_int* ipiv, float anorm, float* rcond ); -lapack_int LAPACKE_zhpcon( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* ap, - const lapack_int* ipiv, double anorm, - double* rcond ); - -lapack_int LAPACKE_chpev( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_complex_float* ap, float* w, - lapack_complex_float* z, lapack_int ldz ); -lapack_int LAPACKE_zhpev( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_complex_double* ap, double* w, - lapack_complex_double* z, lapack_int ldz ); - -lapack_int LAPACKE_chpevd( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_complex_float* ap, float* w, - lapack_complex_float* z, lapack_int ldz ); -lapack_int LAPACKE_zhpevd( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_complex_double* ap, double* w, - lapack_complex_double* z, lapack_int ldz ); - -lapack_int LAPACKE_chpevx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_complex_float* ap, float vl, - float vu, lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, lapack_complex_float* z, - lapack_int ldz, lapack_int* ifail ); -lapack_int LAPACKE_zhpevx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_complex_double* ap, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_int* ifail ); - -lapack_int LAPACKE_chpgst( int matrix_order, lapack_int itype, char uplo, - lapack_int n, lapack_complex_float* ap, - const lapack_complex_float* bp ); -lapack_int LAPACKE_zhpgst( int matrix_order, lapack_int itype, char uplo, - lapack_int n, lapack_complex_double* ap, - const lapack_complex_double* bp ); - -lapack_int LAPACKE_chpgv( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, lapack_complex_float* ap, - lapack_complex_float* bp, float* w, - lapack_complex_float* z, lapack_int ldz ); -lapack_int LAPACKE_zhpgv( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, lapack_complex_double* ap, - lapack_complex_double* bp, double* w, - lapack_complex_double* z, lapack_int ldz ); - -lapack_int LAPACKE_chpgvd( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, lapack_complex_float* ap, - lapack_complex_float* bp, float* w, - lapack_complex_float* z, lapack_int ldz ); -lapack_int LAPACKE_zhpgvd( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, lapack_complex_double* ap, - lapack_complex_double* bp, double* w, - lapack_complex_double* z, lapack_int ldz ); - -lapack_int LAPACKE_chpgvx( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, - lapack_complex_float* ap, lapack_complex_float* bp, - float vl, float vu, lapack_int il, lapack_int iu, - float abstol, lapack_int* m, float* w, - lapack_complex_float* z, lapack_int ldz, - lapack_int* ifail ); -lapack_int LAPACKE_zhpgvx( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, - lapack_complex_double* ap, lapack_complex_double* bp, - double vl, double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_int* ifail ); - -lapack_int LAPACKE_chprfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - const lapack_complex_float* afp, - const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, float* ferr, - float* berr ); -lapack_int LAPACKE_zhprfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* ap, - const lapack_complex_double* afp, - const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_chpsv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* ap, - lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zhpsv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* ap, - lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_chpsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - lapack_complex_float* afp, lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr ); -lapack_int LAPACKE_zhpsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* ap, - lapack_complex_double* afp, lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr ); - -lapack_int LAPACKE_chptrd( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap, float* d, float* e, - lapack_complex_float* tau ); -lapack_int LAPACKE_zhptrd( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap, double* d, double* e, - lapack_complex_double* tau ); - -lapack_int LAPACKE_chptrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap, lapack_int* ipiv ); -lapack_int LAPACKE_zhptrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap, lapack_int* ipiv ); - -lapack_int LAPACKE_chptri( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap, const lapack_int* ipiv ); -lapack_int LAPACKE_zhptri( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap, const lapack_int* ipiv ); - -lapack_int LAPACKE_chptrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - const lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zhptrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* ap, - const lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_shsein( int matrix_order, char job, char eigsrc, char initv, - lapack_logical* select, lapack_int n, const float* h, - lapack_int ldh, float* wr, const float* wi, - float* vl, lapack_int ldvl, float* vr, - lapack_int ldvr, lapack_int mm, lapack_int* m, - lapack_int* ifaill, lapack_int* ifailr ); -lapack_int LAPACKE_dhsein( int matrix_order, char job, char eigsrc, char initv, - lapack_logical* select, lapack_int n, - const double* h, lapack_int ldh, double* wr, - const double* wi, double* vl, lapack_int ldvl, - double* vr, lapack_int ldvr, lapack_int mm, - lapack_int* m, lapack_int* ifaill, - lapack_int* ifailr ); -lapack_int LAPACKE_chsein( int matrix_order, char job, char eigsrc, char initv, - const lapack_logical* select, lapack_int n, - const lapack_complex_float* h, lapack_int ldh, - lapack_complex_float* w, lapack_complex_float* vl, - lapack_int ldvl, lapack_complex_float* vr, - lapack_int ldvr, lapack_int mm, lapack_int* m, - lapack_int* ifaill, lapack_int* ifailr ); -lapack_int LAPACKE_zhsein( int matrix_order, char job, char eigsrc, char initv, - const lapack_logical* select, lapack_int n, - const lapack_complex_double* h, lapack_int ldh, - lapack_complex_double* w, lapack_complex_double* vl, - lapack_int ldvl, lapack_complex_double* vr, - lapack_int ldvr, lapack_int mm, lapack_int* m, - lapack_int* ifaill, lapack_int* ifailr ); - -lapack_int LAPACKE_shseqr( int matrix_order, char job, char compz, lapack_int n, - lapack_int ilo, lapack_int ihi, float* h, - lapack_int ldh, float* wr, float* wi, float* z, - lapack_int ldz ); -lapack_int LAPACKE_dhseqr( int matrix_order, char job, char compz, lapack_int n, - lapack_int ilo, lapack_int ihi, double* h, - lapack_int ldh, double* wr, double* wi, double* z, - lapack_int ldz ); -lapack_int LAPACKE_chseqr( int matrix_order, char job, char compz, lapack_int n, - lapack_int ilo, lapack_int ihi, - lapack_complex_float* h, lapack_int ldh, - lapack_complex_float* w, lapack_complex_float* z, - lapack_int ldz ); -lapack_int LAPACKE_zhseqr( int matrix_order, char job, char compz, lapack_int n, - lapack_int ilo, lapack_int ihi, - lapack_complex_double* h, lapack_int ldh, - lapack_complex_double* w, lapack_complex_double* z, - lapack_int ldz ); - -lapack_int LAPACKE_clacgv( lapack_int n, lapack_complex_float* x, - lapack_int incx ); -lapack_int LAPACKE_zlacgv( lapack_int n, lapack_complex_double* x, - lapack_int incx ); - -lapack_int LAPACKE_slacpy( int matrix_order, char uplo, lapack_int m, - lapack_int n, const float* a, lapack_int lda, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dlacpy( int matrix_order, char uplo, lapack_int m, - lapack_int n, const double* a, lapack_int lda, double* b, - lapack_int ldb ); -lapack_int LAPACKE_clacpy( int matrix_order, char uplo, lapack_int m, - lapack_int n, const lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zlacpy( int matrix_order, char uplo, lapack_int m, - lapack_int n, const lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_zlag2c( int matrix_order, lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - lapack_complex_float* sa, lapack_int ldsa ); - -lapack_int LAPACKE_slag2d( int matrix_order, lapack_int m, lapack_int n, - const float* sa, lapack_int ldsa, double* a, - lapack_int lda ); - -lapack_int LAPACKE_dlag2s( int matrix_order, lapack_int m, lapack_int n, - const double* a, lapack_int lda, float* sa, - lapack_int ldsa ); - -lapack_int LAPACKE_clag2z( int matrix_order, lapack_int m, lapack_int n, - const lapack_complex_float* sa, lapack_int ldsa, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_slagge( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const float* d, - float* a, lapack_int lda, lapack_int* iseed ); -lapack_int LAPACKE_dlagge( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const double* d, - double* a, lapack_int lda, lapack_int* iseed ); -lapack_int LAPACKE_clagge( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const float* d, - lapack_complex_float* a, lapack_int lda, - lapack_int* iseed ); -lapack_int LAPACKE_zlagge( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const double* d, - lapack_complex_double* a, lapack_int lda, - lapack_int* iseed ); - -float LAPACKE_slamch( char cmach ); -double LAPACKE_dlamch( char cmach ); - -float LAPACKE_slange( int matrix_order, char norm, lapack_int m, - lapack_int n, const float* a, lapack_int lda ); -double LAPACKE_dlange( int matrix_order, char norm, lapack_int m, - lapack_int n, const double* a, lapack_int lda ); -float LAPACKE_clange( int matrix_order, char norm, lapack_int m, - lapack_int n, const lapack_complex_float* a, - lapack_int lda ); -double LAPACKE_zlange( int matrix_order, char norm, lapack_int m, - lapack_int n, const lapack_complex_double* a, - lapack_int lda ); - -float LAPACKE_clanhe( int matrix_order, char norm, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda ); -double LAPACKE_zlanhe( int matrix_order, char norm, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda ); - -float LAPACKE_slansy( int matrix_order, char norm, char uplo, lapack_int n, - const float* a, lapack_int lda ); -double LAPACKE_dlansy( int matrix_order, char norm, char uplo, lapack_int n, - const double* a, lapack_int lda ); -float LAPACKE_clansy( int matrix_order, char norm, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda ); -double LAPACKE_zlansy( int matrix_order, char norm, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda ); - -float LAPACKE_slantr( int matrix_order, char norm, char uplo, char diag, - lapack_int m, lapack_int n, const float* a, - lapack_int lda ); -double LAPACKE_dlantr( int matrix_order, char norm, char uplo, char diag, - lapack_int m, lapack_int n, const double* a, - lapack_int lda ); -float LAPACKE_clantr( int matrix_order, char norm, char uplo, char diag, - lapack_int m, lapack_int n, const lapack_complex_float* a, - lapack_int lda ); -double LAPACKE_zlantr( int matrix_order, char norm, char uplo, char diag, - lapack_int m, lapack_int n, const lapack_complex_double* a, - lapack_int lda ); - - -lapack_int LAPACKE_slarfb( int matrix_order, char side, char trans, char direct, - char storev, lapack_int m, lapack_int n, - lapack_int k, const float* v, lapack_int ldv, - const float* t, lapack_int ldt, float* c, - lapack_int ldc ); -lapack_int LAPACKE_dlarfb( int matrix_order, char side, char trans, char direct, - char storev, lapack_int m, lapack_int n, - lapack_int k, const double* v, lapack_int ldv, - const double* t, lapack_int ldt, double* c, - lapack_int ldc ); -lapack_int LAPACKE_clarfb( int matrix_order, char side, char trans, char direct, - char storev, lapack_int m, lapack_int n, - lapack_int k, const lapack_complex_float* v, - lapack_int ldv, const lapack_complex_float* t, - lapack_int ldt, lapack_complex_float* c, - lapack_int ldc ); -lapack_int LAPACKE_zlarfb( int matrix_order, char side, char trans, char direct, - char storev, lapack_int m, lapack_int n, - lapack_int k, const lapack_complex_double* v, - lapack_int ldv, const lapack_complex_double* t, - lapack_int ldt, lapack_complex_double* c, - lapack_int ldc ); - -lapack_int LAPACKE_slarfg( lapack_int n, float* alpha, float* x, - lapack_int incx, float* tau ); -lapack_int LAPACKE_dlarfg( lapack_int n, double* alpha, double* x, - lapack_int incx, double* tau ); -lapack_int LAPACKE_clarfg( lapack_int n, lapack_complex_float* alpha, - lapack_complex_float* x, lapack_int incx, - lapack_complex_float* tau ); -lapack_int LAPACKE_zlarfg( lapack_int n, lapack_complex_double* alpha, - lapack_complex_double* x, lapack_int incx, - lapack_complex_double* tau ); - -lapack_int LAPACKE_slarft( int matrix_order, char direct, char storev, - lapack_int n, lapack_int k, const float* v, - lapack_int ldv, const float* tau, float* t, - lapack_int ldt ); -lapack_int LAPACKE_dlarft( int matrix_order, char direct, char storev, - lapack_int n, lapack_int k, const double* v, - lapack_int ldv, const double* tau, double* t, - lapack_int ldt ); -lapack_int LAPACKE_clarft( int matrix_order, char direct, char storev, - lapack_int n, lapack_int k, - const lapack_complex_float* v, lapack_int ldv, - const lapack_complex_float* tau, - lapack_complex_float* t, lapack_int ldt ); -lapack_int LAPACKE_zlarft( int matrix_order, char direct, char storev, - lapack_int n, lapack_int k, - const lapack_complex_double* v, lapack_int ldv, - const lapack_complex_double* tau, - lapack_complex_double* t, lapack_int ldt ); - -lapack_int LAPACKE_slarfx( int matrix_order, char side, lapack_int m, - lapack_int n, const float* v, float tau, float* c, - lapack_int ldc, float* work ); -lapack_int LAPACKE_dlarfx( int matrix_order, char side, lapack_int m, - lapack_int n, const double* v, double tau, double* c, - lapack_int ldc, double* work ); -lapack_int LAPACKE_clarfx( int matrix_order, char side, lapack_int m, - lapack_int n, const lapack_complex_float* v, - lapack_complex_float tau, lapack_complex_float* c, - lapack_int ldc, lapack_complex_float* work ); -lapack_int LAPACKE_zlarfx( int matrix_order, char side, lapack_int m, - lapack_int n, const lapack_complex_double* v, - lapack_complex_double tau, lapack_complex_double* c, - lapack_int ldc, lapack_complex_double* work ); - -lapack_int LAPACKE_slarnv( lapack_int idist, lapack_int* iseed, lapack_int n, - float* x ); -lapack_int LAPACKE_dlarnv( lapack_int idist, lapack_int* iseed, lapack_int n, - double* x ); -lapack_int LAPACKE_clarnv( lapack_int idist, lapack_int* iseed, lapack_int n, - lapack_complex_float* x ); -lapack_int LAPACKE_zlarnv( lapack_int idist, lapack_int* iseed, lapack_int n, - lapack_complex_double* x ); - -lapack_int LAPACKE_slaset( int matrix_order, char uplo, lapack_int m, - lapack_int n, float alpha, float beta, float* a, - lapack_int lda ); -lapack_int LAPACKE_dlaset( int matrix_order, char uplo, lapack_int m, - lapack_int n, double alpha, double beta, double* a, - lapack_int lda ); -lapack_int LAPACKE_claset( int matrix_order, char uplo, lapack_int m, - lapack_int n, lapack_complex_float alpha, - lapack_complex_float beta, lapack_complex_float* a, - lapack_int lda ); -lapack_int LAPACKE_zlaset( int matrix_order, char uplo, lapack_int m, - lapack_int n, lapack_complex_double alpha, - lapack_complex_double beta, lapack_complex_double* a, - lapack_int lda ); - -lapack_int LAPACKE_slasrt( char id, lapack_int n, float* d ); -lapack_int LAPACKE_dlasrt( char id, lapack_int n, double* d ); - -lapack_int LAPACKE_slaswp( int matrix_order, lapack_int n, float* a, - lapack_int lda, lapack_int k1, lapack_int k2, - const lapack_int* ipiv, lapack_int incx ); -lapack_int LAPACKE_dlaswp( int matrix_order, lapack_int n, double* a, - lapack_int lda, lapack_int k1, lapack_int k2, - const lapack_int* ipiv, lapack_int incx ); -lapack_int LAPACKE_claswp( int matrix_order, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int k1, lapack_int k2, const lapack_int* ipiv, - lapack_int incx ); -lapack_int LAPACKE_zlaswp( int matrix_order, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int k1, lapack_int k2, const lapack_int* ipiv, - lapack_int incx ); - -lapack_int LAPACKE_slatms( int matrix_order, lapack_int m, lapack_int n, - char dist, lapack_int* iseed, char sym, float* d, - lapack_int mode, float cond, float dmax, - lapack_int kl, lapack_int ku, char pack, float* a, - lapack_int lda ); -lapack_int LAPACKE_dlatms( int matrix_order, lapack_int m, lapack_int n, - char dist, lapack_int* iseed, char sym, double* d, - lapack_int mode, double cond, double dmax, - lapack_int kl, lapack_int ku, char pack, double* a, - lapack_int lda ); -lapack_int LAPACKE_clatms( int matrix_order, lapack_int m, lapack_int n, - char dist, lapack_int* iseed, char sym, float* d, - lapack_int mode, float cond, float dmax, - lapack_int kl, lapack_int ku, char pack, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_zlatms( int matrix_order, lapack_int m, lapack_int n, - char dist, lapack_int* iseed, char sym, double* d, - lapack_int mode, double cond, double dmax, - lapack_int kl, lapack_int ku, char pack, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_slauum( int matrix_order, char uplo, lapack_int n, float* a, - lapack_int lda ); -lapack_int LAPACKE_dlauum( int matrix_order, char uplo, lapack_int n, double* a, - lapack_int lda ); -lapack_int LAPACKE_clauum( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_zlauum( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_sopgtr( int matrix_order, char uplo, lapack_int n, - const float* ap, const float* tau, float* q, - lapack_int ldq ); -lapack_int LAPACKE_dopgtr( int matrix_order, char uplo, lapack_int n, - const double* ap, const double* tau, double* q, - lapack_int ldq ); - -lapack_int LAPACKE_sopmtr( int matrix_order, char side, char uplo, char trans, - lapack_int m, lapack_int n, const float* ap, - const float* tau, float* c, lapack_int ldc ); -lapack_int LAPACKE_dopmtr( int matrix_order, char side, char uplo, char trans, - lapack_int m, lapack_int n, const double* ap, - const double* tau, double* c, lapack_int ldc ); - -lapack_int LAPACKE_sorgbr( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int k, float* a, lapack_int lda, - const float* tau ); -lapack_int LAPACKE_dorgbr( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int k, double* a, - lapack_int lda, const double* tau ); - -lapack_int LAPACKE_sorghr( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, float* a, lapack_int lda, - const float* tau ); -lapack_int LAPACKE_dorghr( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, double* a, lapack_int lda, - const double* tau ); - -lapack_int LAPACKE_sorglq( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, float* a, lapack_int lda, - const float* tau ); -lapack_int LAPACKE_dorglq( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, double* a, lapack_int lda, - const double* tau ); - -lapack_int LAPACKE_sorgql( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, float* a, lapack_int lda, - const float* tau ); -lapack_int LAPACKE_dorgql( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, double* a, lapack_int lda, - const double* tau ); - -lapack_int LAPACKE_sorgqr( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, float* a, lapack_int lda, - const float* tau ); -lapack_int LAPACKE_dorgqr( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, double* a, lapack_int lda, - const double* tau ); - -lapack_int LAPACKE_sorgrq( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, float* a, lapack_int lda, - const float* tau ); -lapack_int LAPACKE_dorgrq( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, double* a, lapack_int lda, - const double* tau ); - -lapack_int LAPACKE_sorgtr( int matrix_order, char uplo, lapack_int n, float* a, - lapack_int lda, const float* tau ); -lapack_int LAPACKE_dorgtr( int matrix_order, char uplo, lapack_int n, double* a, - lapack_int lda, const double* tau ); - -lapack_int LAPACKE_sormbr( int matrix_order, char vect, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const float* a, lapack_int lda, const float* tau, - float* c, lapack_int ldc ); -lapack_int LAPACKE_dormbr( int matrix_order, char vect, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const double* a, lapack_int lda, const double* tau, - double* c, lapack_int ldc ); - -lapack_int LAPACKE_sormhr( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int ilo, - lapack_int ihi, const float* a, lapack_int lda, - const float* tau, float* c, lapack_int ldc ); -lapack_int LAPACKE_dormhr( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int ilo, - lapack_int ihi, const double* a, lapack_int lda, - const double* tau, double* c, lapack_int ldc ); - -lapack_int LAPACKE_sormlq( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const float* a, lapack_int lda, const float* tau, - float* c, lapack_int ldc ); -lapack_int LAPACKE_dormlq( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const double* a, lapack_int lda, const double* tau, - double* c, lapack_int ldc ); - -lapack_int LAPACKE_sormql( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const float* a, lapack_int lda, const float* tau, - float* c, lapack_int ldc ); -lapack_int LAPACKE_dormql( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const double* a, lapack_int lda, const double* tau, - double* c, lapack_int ldc ); - -lapack_int LAPACKE_sormqr( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const float* a, lapack_int lda, const float* tau, - float* c, lapack_int ldc ); -lapack_int LAPACKE_dormqr( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const double* a, lapack_int lda, const double* tau, - double* c, lapack_int ldc ); - -lapack_int LAPACKE_sormrq( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const float* a, lapack_int lda, const float* tau, - float* c, lapack_int ldc ); -lapack_int LAPACKE_dormrq( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const double* a, lapack_int lda, const double* tau, - double* c, lapack_int ldc ); - -lapack_int LAPACKE_sormrz( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, const float* a, lapack_int lda, - const float* tau, float* c, lapack_int ldc ); -lapack_int LAPACKE_dormrz( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, const double* a, lapack_int lda, - const double* tau, double* c, lapack_int ldc ); - -lapack_int LAPACKE_sormtr( int matrix_order, char side, char uplo, char trans, - lapack_int m, lapack_int n, const float* a, - lapack_int lda, const float* tau, float* c, - lapack_int ldc ); -lapack_int LAPACKE_dormtr( int matrix_order, char side, char uplo, char trans, - lapack_int m, lapack_int n, const double* a, - lapack_int lda, const double* tau, double* c, - lapack_int ldc ); - -lapack_int LAPACKE_spbcon( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const float* ab, lapack_int ldab, - float anorm, float* rcond ); -lapack_int LAPACKE_dpbcon( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const double* ab, lapack_int ldab, - double anorm, double* rcond ); -lapack_int LAPACKE_cpbcon( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const lapack_complex_float* ab, - lapack_int ldab, float anorm, float* rcond ); -lapack_int LAPACKE_zpbcon( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const lapack_complex_double* ab, - lapack_int ldab, double anorm, double* rcond ); - -lapack_int LAPACKE_spbequ( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const float* ab, lapack_int ldab, - float* s, float* scond, float* amax ); -lapack_int LAPACKE_dpbequ( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const double* ab, lapack_int ldab, - double* s, double* scond, double* amax ); -lapack_int LAPACKE_cpbequ( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const lapack_complex_float* ab, - lapack_int ldab, float* s, float* scond, - float* amax ); -lapack_int LAPACKE_zpbequ( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const lapack_complex_double* ab, - lapack_int ldab, double* s, double* scond, - double* amax ); - -lapack_int LAPACKE_spbrfs( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, const float* ab, - lapack_int ldab, const float* afb, lapack_int ldafb, - const float* b, lapack_int ldb, float* x, - lapack_int ldx, float* ferr, float* berr ); -lapack_int LAPACKE_dpbrfs( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, const double* ab, - lapack_int ldab, const double* afb, lapack_int ldafb, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* ferr, double* berr ); -lapack_int LAPACKE_cpbrfs( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - const lapack_complex_float* ab, lapack_int ldab, - const lapack_complex_float* afb, lapack_int ldafb, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, float* ferr, - float* berr ); -lapack_int LAPACKE_zpbrfs( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - const lapack_complex_double* ab, lapack_int ldab, - const lapack_complex_double* afb, lapack_int ldafb, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_spbstf( int matrix_order, char uplo, lapack_int n, - lapack_int kb, float* bb, lapack_int ldbb ); -lapack_int LAPACKE_dpbstf( int matrix_order, char uplo, lapack_int n, - lapack_int kb, double* bb, lapack_int ldbb ); -lapack_int LAPACKE_cpbstf( int matrix_order, char uplo, lapack_int n, - lapack_int kb, lapack_complex_float* bb, - lapack_int ldbb ); -lapack_int LAPACKE_zpbstf( int matrix_order, char uplo, lapack_int n, - lapack_int kb, lapack_complex_double* bb, - lapack_int ldbb ); - -lapack_int LAPACKE_spbsv( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, float* ab, - lapack_int ldab, float* b, lapack_int ldb ); -lapack_int LAPACKE_dpbsv( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, double* ab, - lapack_int ldab, double* b, lapack_int ldb ); -lapack_int LAPACKE_cpbsv( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zpbsv( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_spbsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, float* ab, - lapack_int ldab, float* afb, lapack_int ldafb, - char* equed, float* s, float* b, lapack_int ldb, - float* x, lapack_int ldx, float* rcond, float* ferr, - float* berr ); -lapack_int LAPACKE_dpbsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, double* ab, - lapack_int ldab, double* afb, lapack_int ldafb, - char* equed, double* s, double* b, lapack_int ldb, - double* x, lapack_int ldx, double* rcond, - double* ferr, double* berr ); -lapack_int LAPACKE_cpbsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* afb, lapack_int ldafb, - char* equed, float* s, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr ); -lapack_int LAPACKE_zpbsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* afb, lapack_int ldafb, - char* equed, double* s, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, double* rcond, double* ferr, - double* berr ); - -lapack_int LAPACKE_spbtrf( int matrix_order, char uplo, lapack_int n, - lapack_int kd, float* ab, lapack_int ldab ); -lapack_int LAPACKE_dpbtrf( int matrix_order, char uplo, lapack_int n, - lapack_int kd, double* ab, lapack_int ldab ); -lapack_int LAPACKE_cpbtrf( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_complex_float* ab, - lapack_int ldab ); -lapack_int LAPACKE_zpbtrf( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_complex_double* ab, - lapack_int ldab ); - -lapack_int LAPACKE_spbtrs( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, const float* ab, - lapack_int ldab, float* b, lapack_int ldb ); -lapack_int LAPACKE_dpbtrs( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, const double* ab, - lapack_int ldab, double* b, lapack_int ldb ); -lapack_int LAPACKE_cpbtrs( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - const lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zpbtrs( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - const lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_spftrf( int matrix_order, char transr, char uplo, - lapack_int n, float* a ); -lapack_int LAPACKE_dpftrf( int matrix_order, char transr, char uplo, - lapack_int n, double* a ); -lapack_int LAPACKE_cpftrf( int matrix_order, char transr, char uplo, - lapack_int n, lapack_complex_float* a ); -lapack_int LAPACKE_zpftrf( int matrix_order, char transr, char uplo, - lapack_int n, lapack_complex_double* a ); - -lapack_int LAPACKE_spftri( int matrix_order, char transr, char uplo, - lapack_int n, float* a ); -lapack_int LAPACKE_dpftri( int matrix_order, char transr, char uplo, - lapack_int n, double* a ); -lapack_int LAPACKE_cpftri( int matrix_order, char transr, char uplo, - lapack_int n, lapack_complex_float* a ); -lapack_int LAPACKE_zpftri( int matrix_order, char transr, char uplo, - lapack_int n, lapack_complex_double* a ); - -lapack_int LAPACKE_spftrs( int matrix_order, char transr, char uplo, - lapack_int n, lapack_int nrhs, const float* a, - float* b, lapack_int ldb ); -lapack_int LAPACKE_dpftrs( int matrix_order, char transr, char uplo, - lapack_int n, lapack_int nrhs, const double* a, - double* b, lapack_int ldb ); -lapack_int LAPACKE_cpftrs( int matrix_order, char transr, char uplo, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zpftrs( int matrix_order, char transr, char uplo, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_spocon( int matrix_order, char uplo, lapack_int n, - const float* a, lapack_int lda, float anorm, - float* rcond ); -lapack_int LAPACKE_dpocon( int matrix_order, char uplo, lapack_int n, - const double* a, lapack_int lda, double anorm, - double* rcond ); -lapack_int LAPACKE_cpocon( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float anorm, float* rcond ); -lapack_int LAPACKE_zpocon( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double anorm, double* rcond ); - -lapack_int LAPACKE_spoequ( int matrix_order, lapack_int n, const float* a, - lapack_int lda, float* s, float* scond, - float* amax ); -lapack_int LAPACKE_dpoequ( int matrix_order, lapack_int n, const double* a, - lapack_int lda, double* s, double* scond, - double* amax ); -lapack_int LAPACKE_cpoequ( int matrix_order, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* s, float* scond, float* amax ); -lapack_int LAPACKE_zpoequ( int matrix_order, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* s, double* scond, double* amax ); - -lapack_int LAPACKE_spoequb( int matrix_order, lapack_int n, const float* a, - lapack_int lda, float* s, float* scond, - float* amax ); -lapack_int LAPACKE_dpoequb( int matrix_order, lapack_int n, const double* a, - lapack_int lda, double* s, double* scond, - double* amax ); -lapack_int LAPACKE_cpoequb( int matrix_order, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* s, float* scond, float* amax ); -lapack_int LAPACKE_zpoequb( int matrix_order, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* s, double* scond, double* amax ); - -lapack_int LAPACKE_sporfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - const float* af, lapack_int ldaf, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* ferr, float* berr ); -lapack_int LAPACKE_dporfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* a, lapack_int lda, - const double* af, lapack_int ldaf, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* ferr, double* berr ); -lapack_int LAPACKE_cporfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* af, - lapack_int ldaf, const lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* ferr, float* berr ); -lapack_int LAPACKE_zporfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* af, - lapack_int ldaf, const lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, double* ferr, double* berr ); - -lapack_int LAPACKE_sporfsx( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, const float* a, - lapack_int lda, const float* af, lapack_int ldaf, - const float* s, const float* b, lapack_int ldb, - float* x, lapack_int ldx, float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params ); -lapack_int LAPACKE_dporfsx( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, const double* a, - lapack_int lda, const double* af, lapack_int ldaf, - const double* s, const double* b, lapack_int ldb, - double* x, lapack_int ldx, double* rcond, - double* berr, lapack_int n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int nparams, double* params ); -lapack_int LAPACKE_cporfsx( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* af, lapack_int ldaf, - const float* s, const lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params ); -lapack_int LAPACKE_zporfsx( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* af, lapack_int ldaf, - const double* s, const lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, double* rcond, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params ); - -lapack_int LAPACKE_sposv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, float* a, lapack_int lda, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dposv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cposv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zposv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb ); -lapack_int LAPACKE_dsposv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, - double* b, lapack_int ldb, double* x, lapack_int ldx, - lapack_int* iter ); -lapack_int LAPACKE_zcposv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, lapack_int* iter ); - -lapack_int LAPACKE_sposvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, float* a, lapack_int lda, float* af, - lapack_int ldaf, char* equed, float* s, float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr ); -lapack_int LAPACKE_dposvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, - double* af, lapack_int ldaf, char* equed, double* s, - double* b, lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr ); -lapack_int LAPACKE_cposvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* af, - lapack_int ldaf, char* equed, float* s, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr ); -lapack_int LAPACKE_zposvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* af, - lapack_int ldaf, char* equed, double* s, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr ); - -lapack_int LAPACKE_sposvxx( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, float* a, - lapack_int lda, float* af, lapack_int ldaf, - char* equed, float* s, float* b, lapack_int ldb, - float* x, lapack_int ldx, float* rcond, - float* rpvgrw, float* berr, lapack_int n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int nparams, float* params ); -lapack_int LAPACKE_dposvxx( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, double* a, - lapack_int lda, double* af, lapack_int ldaf, - char* equed, double* s, double* b, lapack_int ldb, - double* x, lapack_int ldx, double* rcond, - double* rpvgrw, double* berr, lapack_int n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int nparams, double* params ); -lapack_int LAPACKE_cposvxx( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - char* equed, float* s, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* rpvgrw, - float* berr, lapack_int n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int nparams, float* params ); -lapack_int LAPACKE_zposvxx( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - char* equed, double* s, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, double* rcond, double* rpvgrw, - double* berr, lapack_int n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int nparams, double* params ); - -lapack_int LAPACKE_spotrf( int matrix_order, char uplo, lapack_int n, float* a, - lapack_int lda ); -lapack_int LAPACKE_dpotrf( int matrix_order, char uplo, lapack_int n, double* a, - lapack_int lda ); -lapack_int LAPACKE_cpotrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_zpotrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_spotri( int matrix_order, char uplo, lapack_int n, float* a, - lapack_int lda ); -lapack_int LAPACKE_dpotri( int matrix_order, char uplo, lapack_int n, double* a, - lapack_int lda ); -lapack_int LAPACKE_cpotri( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_zpotri( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_spotrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - float* b, lapack_int ldb ); -lapack_int LAPACKE_dpotrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* a, lapack_int lda, - double* b, lapack_int ldb ); -lapack_int LAPACKE_cpotrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zpotrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_sppcon( int matrix_order, char uplo, lapack_int n, - const float* ap, float anorm, float* rcond ); -lapack_int LAPACKE_dppcon( int matrix_order, char uplo, lapack_int n, - const double* ap, double anorm, double* rcond ); -lapack_int LAPACKE_cppcon( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* ap, float anorm, - float* rcond ); -lapack_int LAPACKE_zppcon( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* ap, double anorm, - double* rcond ); - -lapack_int LAPACKE_sppequ( int matrix_order, char uplo, lapack_int n, - const float* ap, float* s, float* scond, - float* amax ); -lapack_int LAPACKE_dppequ( int matrix_order, char uplo, lapack_int n, - const double* ap, double* s, double* scond, - double* amax ); -lapack_int LAPACKE_cppequ( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* ap, float* s, - float* scond, float* amax ); -lapack_int LAPACKE_zppequ( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* ap, double* s, - double* scond, double* amax ); - -lapack_int LAPACKE_spprfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* ap, const float* afp, - const float* b, lapack_int ldb, float* x, - lapack_int ldx, float* ferr, float* berr ); -lapack_int LAPACKE_dpprfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* ap, const double* afp, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* ferr, double* berr ); -lapack_int LAPACKE_cpprfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - const lapack_complex_float* afp, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, float* ferr, - float* berr ); -lapack_int LAPACKE_zpprfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* ap, - const lapack_complex_double* afp, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_sppsv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, float* ap, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dppsv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, double* ap, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cppsv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* ap, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zppsv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* ap, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_sppsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, float* ap, float* afp, char* equed, - float* s, float* b, lapack_int ldb, float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr ); -lapack_int LAPACKE_dppsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, double* ap, double* afp, - char* equed, double* s, double* b, lapack_int ldb, - double* x, lapack_int ldx, double* rcond, - double* ferr, double* berr ); -lapack_int LAPACKE_cppsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* ap, - lapack_complex_float* afp, char* equed, float* s, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr ); -lapack_int LAPACKE_zppsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* ap, - lapack_complex_double* afp, char* equed, double* s, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr ); - -lapack_int LAPACKE_spptrf( int matrix_order, char uplo, lapack_int n, - float* ap ); -lapack_int LAPACKE_dpptrf( int matrix_order, char uplo, lapack_int n, - double* ap ); -lapack_int LAPACKE_cpptrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap ); -lapack_int LAPACKE_zpptrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap ); - -lapack_int LAPACKE_spptri( int matrix_order, char uplo, lapack_int n, - float* ap ); -lapack_int LAPACKE_dpptri( int matrix_order, char uplo, lapack_int n, - double* ap ); -lapack_int LAPACKE_cpptri( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap ); -lapack_int LAPACKE_zpptri( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap ); - -lapack_int LAPACKE_spptrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* ap, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dpptrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* ap, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cpptrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zpptrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* ap, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_spstrf( int matrix_order, char uplo, lapack_int n, float* a, - lapack_int lda, lapack_int* piv, lapack_int* rank, - float tol ); -lapack_int LAPACKE_dpstrf( int matrix_order, char uplo, lapack_int n, double* a, - lapack_int lda, lapack_int* piv, lapack_int* rank, - double tol ); -lapack_int LAPACKE_cpstrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* piv, lapack_int* rank, float tol ); -lapack_int LAPACKE_zpstrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* piv, lapack_int* rank, double tol ); - -lapack_int LAPACKE_sptcon( lapack_int n, const float* d, const float* e, - float anorm, float* rcond ); -lapack_int LAPACKE_dptcon( lapack_int n, const double* d, const double* e, - double anorm, double* rcond ); -lapack_int LAPACKE_cptcon( lapack_int n, const float* d, - const lapack_complex_float* e, float anorm, - float* rcond ); -lapack_int LAPACKE_zptcon( lapack_int n, const double* d, - const lapack_complex_double* e, double anorm, - double* rcond ); - -lapack_int LAPACKE_spteqr( int matrix_order, char compz, lapack_int n, float* d, - float* e, float* z, lapack_int ldz ); -lapack_int LAPACKE_dpteqr( int matrix_order, char compz, lapack_int n, - double* d, double* e, double* z, lapack_int ldz ); -lapack_int LAPACKE_cpteqr( int matrix_order, char compz, lapack_int n, float* d, - float* e, lapack_complex_float* z, lapack_int ldz ); -lapack_int LAPACKE_zpteqr( int matrix_order, char compz, lapack_int n, - double* d, double* e, lapack_complex_double* z, - lapack_int ldz ); - -lapack_int LAPACKE_sptrfs( int matrix_order, lapack_int n, lapack_int nrhs, - const float* d, const float* e, const float* df, - const float* ef, const float* b, lapack_int ldb, - float* x, lapack_int ldx, float* ferr, float* berr ); -lapack_int LAPACKE_dptrfs( int matrix_order, lapack_int n, lapack_int nrhs, - const double* d, const double* e, const double* df, - const double* ef, const double* b, lapack_int ldb, - double* x, lapack_int ldx, double* ferr, - double* berr ); -lapack_int LAPACKE_cptrfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* d, - const lapack_complex_float* e, const float* df, - const lapack_complex_float* ef, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, float* ferr, - float* berr ); -lapack_int LAPACKE_zptrfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* d, - const lapack_complex_double* e, const double* df, - const lapack_complex_double* ef, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_sptsv( int matrix_order, lapack_int n, lapack_int nrhs, - float* d, float* e, float* b, lapack_int ldb ); -lapack_int LAPACKE_dptsv( int matrix_order, lapack_int n, lapack_int nrhs, - double* d, double* e, double* b, lapack_int ldb ); -lapack_int LAPACKE_cptsv( int matrix_order, lapack_int n, lapack_int nrhs, - float* d, lapack_complex_float* e, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zptsv( int matrix_order, lapack_int n, lapack_int nrhs, - double* d, lapack_complex_double* e, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_sptsvx( int matrix_order, char fact, lapack_int n, - lapack_int nrhs, const float* d, const float* e, - float* df, float* ef, const float* b, lapack_int ldb, - float* x, lapack_int ldx, float* rcond, float* ferr, - float* berr ); -lapack_int LAPACKE_dptsvx( int matrix_order, char fact, lapack_int n, - lapack_int nrhs, const double* d, const double* e, - double* df, double* ef, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr ); -lapack_int LAPACKE_cptsvx( int matrix_order, char fact, lapack_int n, - lapack_int nrhs, const float* d, - const lapack_complex_float* e, float* df, - lapack_complex_float* ef, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr ); -lapack_int LAPACKE_zptsvx( int matrix_order, char fact, lapack_int n, - lapack_int nrhs, const double* d, - const lapack_complex_double* e, double* df, - lapack_complex_double* ef, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr ); - -lapack_int LAPACKE_spttrf( lapack_int n, float* d, float* e ); -lapack_int LAPACKE_dpttrf( lapack_int n, double* d, double* e ); -lapack_int LAPACKE_cpttrf( lapack_int n, float* d, lapack_complex_float* e ); -lapack_int LAPACKE_zpttrf( lapack_int n, double* d, lapack_complex_double* e ); - -lapack_int LAPACKE_spttrs( int matrix_order, lapack_int n, lapack_int nrhs, - const float* d, const float* e, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dpttrs( int matrix_order, lapack_int n, lapack_int nrhs, - const double* d, const double* e, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cpttrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* d, - const lapack_complex_float* e, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zpttrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* d, - const lapack_complex_double* e, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_ssbev( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int kd, float* ab, lapack_int ldab, float* w, - float* z, lapack_int ldz ); -lapack_int LAPACKE_dsbev( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int kd, double* ab, lapack_int ldab, double* w, - double* z, lapack_int ldz ); - -lapack_int LAPACKE_ssbevd( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int kd, float* ab, lapack_int ldab, float* w, - float* z, lapack_int ldz ); -lapack_int LAPACKE_dsbevd( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int kd, double* ab, lapack_int ldab, - double* w, double* z, lapack_int ldz ); - -lapack_int LAPACKE_ssbevx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_int kd, float* ab, - lapack_int ldab, float* q, lapack_int ldq, float vl, - float vu, lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, lapack_int ldz, - lapack_int* ifail ); -lapack_int LAPACKE_dsbevx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_int kd, double* ab, - lapack_int ldab, double* q, lapack_int ldq, - double vl, double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, double* z, - lapack_int ldz, lapack_int* ifail ); - -lapack_int LAPACKE_ssbgst( int matrix_order, char vect, char uplo, lapack_int n, - lapack_int ka, lapack_int kb, float* ab, - lapack_int ldab, const float* bb, lapack_int ldbb, - float* x, lapack_int ldx ); -lapack_int LAPACKE_dsbgst( int matrix_order, char vect, char uplo, lapack_int n, - lapack_int ka, lapack_int kb, double* ab, - lapack_int ldab, const double* bb, lapack_int ldbb, - double* x, lapack_int ldx ); - -lapack_int LAPACKE_ssbgv( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int ka, lapack_int kb, float* ab, - lapack_int ldab, float* bb, lapack_int ldbb, float* w, - float* z, lapack_int ldz ); -lapack_int LAPACKE_dsbgv( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int ka, lapack_int kb, double* ab, - lapack_int ldab, double* bb, lapack_int ldbb, - double* w, double* z, lapack_int ldz ); - -lapack_int LAPACKE_ssbgvd( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int ka, lapack_int kb, float* ab, - lapack_int ldab, float* bb, lapack_int ldbb, - float* w, float* z, lapack_int ldz ); -lapack_int LAPACKE_dsbgvd( int matrix_order, char jobz, char uplo, lapack_int n, - lapack_int ka, lapack_int kb, double* ab, - lapack_int ldab, double* bb, lapack_int ldbb, - double* w, double* z, lapack_int ldz ); - -lapack_int LAPACKE_ssbgvx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - float* ab, lapack_int ldab, float* bb, - lapack_int ldbb, float* q, lapack_int ldq, float vl, - float vu, lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, lapack_int ldz, - lapack_int* ifail ); -lapack_int LAPACKE_dsbgvx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - double* ab, lapack_int ldab, double* bb, - lapack_int ldbb, double* q, lapack_int ldq, - double vl, double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, double* z, - lapack_int ldz, lapack_int* ifail ); - -lapack_int LAPACKE_ssbtrd( int matrix_order, char vect, char uplo, lapack_int n, - lapack_int kd, float* ab, lapack_int ldab, float* d, - float* e, float* q, lapack_int ldq ); -lapack_int LAPACKE_dsbtrd( int matrix_order, char vect, char uplo, lapack_int n, - lapack_int kd, double* ab, lapack_int ldab, - double* d, double* e, double* q, lapack_int ldq ); - -lapack_int LAPACKE_ssfrk( int matrix_order, char transr, char uplo, char trans, - lapack_int n, lapack_int k, float alpha, - const float* a, lapack_int lda, float beta, - float* c ); -lapack_int LAPACKE_dsfrk( int matrix_order, char transr, char uplo, char trans, - lapack_int n, lapack_int k, double alpha, - const double* a, lapack_int lda, double beta, - double* c ); - -lapack_int LAPACKE_sspcon( int matrix_order, char uplo, lapack_int n, - const float* ap, const lapack_int* ipiv, float anorm, - float* rcond ); -lapack_int LAPACKE_dspcon( int matrix_order, char uplo, lapack_int n, - const double* ap, const lapack_int* ipiv, - double anorm, double* rcond ); -lapack_int LAPACKE_cspcon( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* ap, - const lapack_int* ipiv, float anorm, float* rcond ); -lapack_int LAPACKE_zspcon( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* ap, - const lapack_int* ipiv, double anorm, - double* rcond ); - -lapack_int LAPACKE_sspev( int matrix_order, char jobz, char uplo, lapack_int n, - float* ap, float* w, float* z, lapack_int ldz ); -lapack_int LAPACKE_dspev( int matrix_order, char jobz, char uplo, lapack_int n, - double* ap, double* w, double* z, lapack_int ldz ); - -lapack_int LAPACKE_sspevd( int matrix_order, char jobz, char uplo, lapack_int n, - float* ap, float* w, float* z, lapack_int ldz ); -lapack_int LAPACKE_dspevd( int matrix_order, char jobz, char uplo, lapack_int n, - double* ap, double* w, double* z, lapack_int ldz ); - -lapack_int LAPACKE_sspevx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, float* ap, float vl, float vu, - lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, lapack_int ldz, - lapack_int* ifail ); -lapack_int LAPACKE_dspevx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, double* ap, double vl, double vu, - lapack_int il, lapack_int iu, double abstol, - lapack_int* m, double* w, double* z, lapack_int ldz, - lapack_int* ifail ); - -lapack_int LAPACKE_sspgst( int matrix_order, lapack_int itype, char uplo, - lapack_int n, float* ap, const float* bp ); -lapack_int LAPACKE_dspgst( int matrix_order, lapack_int itype, char uplo, - lapack_int n, double* ap, const double* bp ); - -lapack_int LAPACKE_sspgv( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, float* ap, float* bp, - float* w, float* z, lapack_int ldz ); -lapack_int LAPACKE_dspgv( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, double* ap, double* bp, - double* w, double* z, lapack_int ldz ); - -lapack_int LAPACKE_sspgvd( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, float* ap, float* bp, - float* w, float* z, lapack_int ldz ); -lapack_int LAPACKE_dspgvd( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, double* ap, double* bp, - double* w, double* z, lapack_int ldz ); - -lapack_int LAPACKE_sspgvx( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, float* ap, - float* bp, float vl, float vu, lapack_int il, - lapack_int iu, float abstol, lapack_int* m, float* w, - float* z, lapack_int ldz, lapack_int* ifail ); -lapack_int LAPACKE_dspgvx( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, double* ap, - double* bp, double vl, double vu, lapack_int il, - lapack_int iu, double abstol, lapack_int* m, - double* w, double* z, lapack_int ldz, - lapack_int* ifail ); - -lapack_int LAPACKE_ssprfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* ap, const float* afp, - const lapack_int* ipiv, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* ferr, float* berr ); -lapack_int LAPACKE_dsprfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* ap, const double* afp, - const lapack_int* ipiv, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* ferr, double* berr ); -lapack_int LAPACKE_csprfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - const lapack_complex_float* afp, - const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, float* ferr, - float* berr ); -lapack_int LAPACKE_zsprfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* ap, - const lapack_complex_double* afp, - const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_sspsv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, float* ap, lapack_int* ipiv, - float* b, lapack_int ldb ); -lapack_int LAPACKE_dspsv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, double* ap, lapack_int* ipiv, - double* b, lapack_int ldb ); -lapack_int LAPACKE_cspsv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* ap, - lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zspsv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* ap, - lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_sspsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, const float* ap, float* afp, - lapack_int* ipiv, const float* b, lapack_int ldb, - float* x, lapack_int ldx, float* rcond, float* ferr, - float* berr ); -lapack_int LAPACKE_dspsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, const double* ap, double* afp, - lapack_int* ipiv, const double* b, lapack_int ldb, - double* x, lapack_int ldx, double* rcond, - double* ferr, double* berr ); -lapack_int LAPACKE_cspsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - lapack_complex_float* afp, lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr ); -lapack_int LAPACKE_zspsvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* ap, - lapack_complex_double* afp, lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr ); - -lapack_int LAPACKE_ssptrd( int matrix_order, char uplo, lapack_int n, float* ap, - float* d, float* e, float* tau ); -lapack_int LAPACKE_dsptrd( int matrix_order, char uplo, lapack_int n, - double* ap, double* d, double* e, double* tau ); - -lapack_int LAPACKE_ssptrf( int matrix_order, char uplo, lapack_int n, float* ap, - lapack_int* ipiv ); -lapack_int LAPACKE_dsptrf( int matrix_order, char uplo, lapack_int n, - double* ap, lapack_int* ipiv ); -lapack_int LAPACKE_csptrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap, lapack_int* ipiv ); -lapack_int LAPACKE_zsptrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap, lapack_int* ipiv ); - -lapack_int LAPACKE_ssptri( int matrix_order, char uplo, lapack_int n, float* ap, - const lapack_int* ipiv ); -lapack_int LAPACKE_dsptri( int matrix_order, char uplo, lapack_int n, - double* ap, const lapack_int* ipiv ); -lapack_int LAPACKE_csptri( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap, const lapack_int* ipiv ); -lapack_int LAPACKE_zsptri( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap, const lapack_int* ipiv ); - -lapack_int LAPACKE_ssptrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* ap, - const lapack_int* ipiv, float* b, lapack_int ldb ); -lapack_int LAPACKE_dsptrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* ap, - const lapack_int* ipiv, double* b, lapack_int ldb ); -lapack_int LAPACKE_csptrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - const lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zsptrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* ap, - const lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_sstebz( char range, char order, lapack_int n, float vl, - float vu, lapack_int il, lapack_int iu, float abstol, - const float* d, const float* e, lapack_int* m, - lapack_int* nsplit, float* w, lapack_int* iblock, - lapack_int* isplit ); -lapack_int LAPACKE_dstebz( char range, char order, lapack_int n, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, const double* d, const double* e, - lapack_int* m, lapack_int* nsplit, double* w, - lapack_int* iblock, lapack_int* isplit ); - -lapack_int LAPACKE_sstedc( int matrix_order, char compz, lapack_int n, float* d, - float* e, float* z, lapack_int ldz ); -lapack_int LAPACKE_dstedc( int matrix_order, char compz, lapack_int n, - double* d, double* e, double* z, lapack_int ldz ); -lapack_int LAPACKE_cstedc( int matrix_order, char compz, lapack_int n, float* d, - float* e, lapack_complex_float* z, lapack_int ldz ); -lapack_int LAPACKE_zstedc( int matrix_order, char compz, lapack_int n, - double* d, double* e, lapack_complex_double* z, - lapack_int ldz ); - -lapack_int LAPACKE_sstegr( int matrix_order, char jobz, char range, - lapack_int n, float* d, float* e, float vl, float vu, - lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, lapack_int ldz, - lapack_int* isuppz ); -lapack_int LAPACKE_dstegr( int matrix_order, char jobz, char range, - lapack_int n, double* d, double* e, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, double* z, - lapack_int ldz, lapack_int* isuppz ); -lapack_int LAPACKE_cstegr( int matrix_order, char jobz, char range, - lapack_int n, float* d, float* e, float vl, float vu, - lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, lapack_complex_float* z, - lapack_int ldz, lapack_int* isuppz ); -lapack_int LAPACKE_zstegr( int matrix_order, char jobz, char range, - lapack_int n, double* d, double* e, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_int* isuppz ); - -lapack_int LAPACKE_sstein( int matrix_order, lapack_int n, const float* d, - const float* e, lapack_int m, const float* w, - const lapack_int* iblock, const lapack_int* isplit, - float* z, lapack_int ldz, lapack_int* ifailv ); -lapack_int LAPACKE_dstein( int matrix_order, lapack_int n, const double* d, - const double* e, lapack_int m, const double* w, - const lapack_int* iblock, const lapack_int* isplit, - double* z, lapack_int ldz, lapack_int* ifailv ); -lapack_int LAPACKE_cstein( int matrix_order, lapack_int n, const float* d, - const float* e, lapack_int m, const float* w, - const lapack_int* iblock, const lapack_int* isplit, - lapack_complex_float* z, lapack_int ldz, - lapack_int* ifailv ); -lapack_int LAPACKE_zstein( int matrix_order, lapack_int n, const double* d, - const double* e, lapack_int m, const double* w, - const lapack_int* iblock, const lapack_int* isplit, - lapack_complex_double* z, lapack_int ldz, - lapack_int* ifailv ); - -lapack_int LAPACKE_sstemr( int matrix_order, char jobz, char range, - lapack_int n, float* d, float* e, float vl, float vu, - lapack_int il, lapack_int iu, lapack_int* m, - float* w, float* z, lapack_int ldz, lapack_int nzc, - lapack_int* isuppz, lapack_logical* tryrac ); -lapack_int LAPACKE_dstemr( int matrix_order, char jobz, char range, - lapack_int n, double* d, double* e, double vl, - double vu, lapack_int il, lapack_int iu, - lapack_int* m, double* w, double* z, lapack_int ldz, - lapack_int nzc, lapack_int* isuppz, - lapack_logical* tryrac ); -lapack_int LAPACKE_cstemr( int matrix_order, char jobz, char range, - lapack_int n, float* d, float* e, float vl, float vu, - lapack_int il, lapack_int iu, lapack_int* m, - float* w, lapack_complex_float* z, lapack_int ldz, - lapack_int nzc, lapack_int* isuppz, - lapack_logical* tryrac ); -lapack_int LAPACKE_zstemr( int matrix_order, char jobz, char range, - lapack_int n, double* d, double* e, double vl, - double vu, lapack_int il, lapack_int iu, - lapack_int* m, double* w, lapack_complex_double* z, - lapack_int ldz, lapack_int nzc, lapack_int* isuppz, - lapack_logical* tryrac ); - -lapack_int LAPACKE_ssteqr( int matrix_order, char compz, lapack_int n, float* d, - float* e, float* z, lapack_int ldz ); -lapack_int LAPACKE_dsteqr( int matrix_order, char compz, lapack_int n, - double* d, double* e, double* z, lapack_int ldz ); -lapack_int LAPACKE_csteqr( int matrix_order, char compz, lapack_int n, float* d, - float* e, lapack_complex_float* z, lapack_int ldz ); -lapack_int LAPACKE_zsteqr( int matrix_order, char compz, lapack_int n, - double* d, double* e, lapack_complex_double* z, - lapack_int ldz ); - -lapack_int LAPACKE_ssterf( lapack_int n, float* d, float* e ); -lapack_int LAPACKE_dsterf( lapack_int n, double* d, double* e ); - -lapack_int LAPACKE_sstev( int matrix_order, char jobz, lapack_int n, float* d, - float* e, float* z, lapack_int ldz ); -lapack_int LAPACKE_dstev( int matrix_order, char jobz, lapack_int n, double* d, - double* e, double* z, lapack_int ldz ); - -lapack_int LAPACKE_sstevd( int matrix_order, char jobz, lapack_int n, float* d, - float* e, float* z, lapack_int ldz ); -lapack_int LAPACKE_dstevd( int matrix_order, char jobz, lapack_int n, double* d, - double* e, double* z, lapack_int ldz ); - -lapack_int LAPACKE_sstevr( int matrix_order, char jobz, char range, - lapack_int n, float* d, float* e, float vl, float vu, - lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, lapack_int ldz, - lapack_int* isuppz ); -lapack_int LAPACKE_dstevr( int matrix_order, char jobz, char range, - lapack_int n, double* d, double* e, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, double* z, - lapack_int ldz, lapack_int* isuppz ); - -lapack_int LAPACKE_sstevx( int matrix_order, char jobz, char range, - lapack_int n, float* d, float* e, float vl, float vu, - lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, lapack_int ldz, - lapack_int* ifail ); -lapack_int LAPACKE_dstevx( int matrix_order, char jobz, char range, - lapack_int n, double* d, double* e, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, double* z, - lapack_int ldz, lapack_int* ifail ); - -lapack_int LAPACKE_ssycon( int matrix_order, char uplo, lapack_int n, - const float* a, lapack_int lda, - const lapack_int* ipiv, float anorm, float* rcond ); -lapack_int LAPACKE_dsycon( int matrix_order, char uplo, lapack_int n, - const double* a, lapack_int lda, - const lapack_int* ipiv, double anorm, - double* rcond ); -lapack_int LAPACKE_csycon( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, float anorm, float* rcond ); -lapack_int LAPACKE_zsycon( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, double anorm, - double* rcond ); - -lapack_int LAPACKE_ssyequb( int matrix_order, char uplo, lapack_int n, - const float* a, lapack_int lda, float* s, - float* scond, float* amax ); -lapack_int LAPACKE_dsyequb( int matrix_order, char uplo, lapack_int n, - const double* a, lapack_int lda, double* s, - double* scond, double* amax ); -lapack_int LAPACKE_csyequb( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* s, float* scond, float* amax ); -lapack_int LAPACKE_zsyequb( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* s, double* scond, double* amax ); - -lapack_int LAPACKE_ssyev( int matrix_order, char jobz, char uplo, lapack_int n, - float* a, lapack_int lda, float* w ); -lapack_int LAPACKE_dsyev( int matrix_order, char jobz, char uplo, lapack_int n, - double* a, lapack_int lda, double* w ); - -lapack_int LAPACKE_ssyevd( int matrix_order, char jobz, char uplo, lapack_int n, - float* a, lapack_int lda, float* w ); -lapack_int LAPACKE_dsyevd( int matrix_order, char jobz, char uplo, lapack_int n, - double* a, lapack_int lda, double* w ); - -lapack_int LAPACKE_ssyevr( int matrix_order, char jobz, char range, char uplo, - lapack_int n, float* a, lapack_int lda, float vl, - float vu, lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, lapack_int ldz, - lapack_int* isuppz ); -lapack_int LAPACKE_dsyevr( int matrix_order, char jobz, char range, char uplo, - lapack_int n, double* a, lapack_int lda, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, double* z, - lapack_int ldz, lapack_int* isuppz ); - -lapack_int LAPACKE_ssyevx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, float* a, lapack_int lda, float vl, - float vu, lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, lapack_int ldz, - lapack_int* ifail ); -lapack_int LAPACKE_dsyevx( int matrix_order, char jobz, char range, char uplo, - lapack_int n, double* a, lapack_int lda, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, double* z, - lapack_int ldz, lapack_int* ifail ); - -lapack_int LAPACKE_ssygst( int matrix_order, lapack_int itype, char uplo, - lapack_int n, float* a, lapack_int lda, - const float* b, lapack_int ldb ); -lapack_int LAPACKE_dsygst( int matrix_order, lapack_int itype, char uplo, - lapack_int n, double* a, lapack_int lda, - const double* b, lapack_int ldb ); - -lapack_int LAPACKE_ssygv( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, float* a, lapack_int lda, - float* b, lapack_int ldb, float* w ); -lapack_int LAPACKE_dsygv( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, double* a, lapack_int lda, - double* b, lapack_int ldb, double* w ); - -lapack_int LAPACKE_ssygvd( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, float* a, lapack_int lda, - float* b, lapack_int ldb, float* w ); -lapack_int LAPACKE_dsygvd( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, double* a, lapack_int lda, - double* b, lapack_int ldb, double* w ); - -lapack_int LAPACKE_ssygvx( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, float* a, - lapack_int lda, float* b, lapack_int ldb, float vl, - float vu, lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, lapack_int ldz, - lapack_int* ifail ); -lapack_int LAPACKE_dsygvx( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, double* a, - lapack_int lda, double* b, lapack_int ldb, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, double* z, - lapack_int ldz, lapack_int* ifail ); - -lapack_int LAPACKE_ssyrfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - const float* af, lapack_int ldaf, - const lapack_int* ipiv, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* ferr, float* berr ); -lapack_int LAPACKE_dsyrfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* a, lapack_int lda, - const double* af, lapack_int ldaf, - const lapack_int* ipiv, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* ferr, double* berr ); -lapack_int LAPACKE_csyrfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* af, - lapack_int ldaf, const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, float* ferr, - float* berr ); -lapack_int LAPACKE_zsyrfs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* af, - lapack_int ldaf, const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_ssyrfsx( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, const float* a, - lapack_int lda, const float* af, lapack_int ldaf, - const lapack_int* ipiv, const float* s, - const float* b, lapack_int ldb, float* x, - lapack_int ldx, float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params ); -lapack_int LAPACKE_dsyrfsx( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, const double* a, - lapack_int lda, const double* af, lapack_int ldaf, - const lapack_int* ipiv, const double* s, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* rcond, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params ); -lapack_int LAPACKE_csyrfsx( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* af, lapack_int ldaf, - const lapack_int* ipiv, const float* s, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* berr, lapack_int n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int nparams, float* params ); -lapack_int LAPACKE_zsyrfsx( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* af, lapack_int ldaf, - const lapack_int* ipiv, const double* s, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* berr, lapack_int n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int nparams, double* params ); - -lapack_int LAPACKE_ssysv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, float* a, lapack_int lda, - lapack_int* ipiv, float* b, lapack_int ldb ); -lapack_int LAPACKE_dsysv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, - lapack_int* ipiv, double* b, lapack_int ldb ); -lapack_int LAPACKE_csysv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zsysv( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_ssysvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - float* af, lapack_int ldaf, lapack_int* ipiv, - const float* b, lapack_int ldb, float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr ); -lapack_int LAPACKE_dsysvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, const double* a, lapack_int lda, - double* af, lapack_int ldaf, lapack_int* ipiv, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* rcond, double* ferr, - double* berr ); -lapack_int LAPACKE_csysvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, lapack_complex_float* af, - lapack_int ldaf, lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr ); -lapack_int LAPACKE_zsysvx( int matrix_order, char fact, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, lapack_complex_double* af, - lapack_int ldaf, lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr ); - -lapack_int LAPACKE_ssysvxx( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, float* a, - lapack_int lda, float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* s, float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params ); -lapack_int LAPACKE_dsysvxx( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, double* a, - lapack_int lda, double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* s, double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* rpvgrw, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params ); -lapack_int LAPACKE_csysvxx( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* s, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params ); -lapack_int LAPACKE_zsysvxx( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* s, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* rpvgrw, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params ); - -lapack_int LAPACKE_ssytrd( int matrix_order, char uplo, lapack_int n, float* a, - lapack_int lda, float* d, float* e, float* tau ); -lapack_int LAPACKE_dsytrd( int matrix_order, char uplo, lapack_int n, double* a, - lapack_int lda, double* d, double* e, double* tau ); - -lapack_int LAPACKE_ssytrf( int matrix_order, char uplo, lapack_int n, float* a, - lapack_int lda, lapack_int* ipiv ); -lapack_int LAPACKE_dsytrf( int matrix_order, char uplo, lapack_int n, double* a, - lapack_int lda, lapack_int* ipiv ); -lapack_int LAPACKE_csytrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* ipiv ); -lapack_int LAPACKE_zsytrf( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* ipiv ); - -lapack_int LAPACKE_ssytri( int matrix_order, char uplo, lapack_int n, float* a, - lapack_int lda, const lapack_int* ipiv ); -lapack_int LAPACKE_dsytri( int matrix_order, char uplo, lapack_int n, double* a, - lapack_int lda, const lapack_int* ipiv ); -lapack_int LAPACKE_csytri( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv ); -lapack_int LAPACKE_zsytri( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv ); - -lapack_int LAPACKE_ssytrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - const lapack_int* ipiv, float* b, lapack_int ldb ); -lapack_int LAPACKE_dsytrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* a, lapack_int lda, - const lapack_int* ipiv, double* b, lapack_int ldb ); -lapack_int LAPACKE_csytrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zsytrs( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_stbcon( int matrix_order, char norm, char uplo, char diag, - lapack_int n, lapack_int kd, const float* ab, - lapack_int ldab, float* rcond ); -lapack_int LAPACKE_dtbcon( int matrix_order, char norm, char uplo, char diag, - lapack_int n, lapack_int kd, const double* ab, - lapack_int ldab, double* rcond ); -lapack_int LAPACKE_ctbcon( int matrix_order, char norm, char uplo, char diag, - lapack_int n, lapack_int kd, - const lapack_complex_float* ab, lapack_int ldab, - float* rcond ); -lapack_int LAPACKE_ztbcon( int matrix_order, char norm, char uplo, char diag, - lapack_int n, lapack_int kd, - const lapack_complex_double* ab, lapack_int ldab, - double* rcond ); - -lapack_int LAPACKE_stbrfs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int kd, lapack_int nrhs, - const float* ab, lapack_int ldab, const float* b, - lapack_int ldb, const float* x, lapack_int ldx, - float* ferr, float* berr ); -lapack_int LAPACKE_dtbrfs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int kd, lapack_int nrhs, - const double* ab, lapack_int ldab, const double* b, - lapack_int ldb, const double* x, lapack_int ldx, - double* ferr, double* berr ); -lapack_int LAPACKE_ctbrfs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int kd, lapack_int nrhs, - const lapack_complex_float* ab, lapack_int ldab, - const lapack_complex_float* b, lapack_int ldb, - const lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr ); -lapack_int LAPACKE_ztbrfs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int kd, lapack_int nrhs, - const lapack_complex_double* ab, lapack_int ldab, - const lapack_complex_double* b, lapack_int ldb, - const lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_stbtrs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int kd, lapack_int nrhs, - const float* ab, lapack_int ldab, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dtbtrs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int kd, lapack_int nrhs, - const double* ab, lapack_int ldab, double* b, - lapack_int ldb ); -lapack_int LAPACKE_ctbtrs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int kd, lapack_int nrhs, - const lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_ztbtrs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int kd, lapack_int nrhs, - const lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_stfsm( int matrix_order, char transr, char side, char uplo, - char trans, char diag, lapack_int m, lapack_int n, - float alpha, const float* a, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dtfsm( int matrix_order, char transr, char side, char uplo, - char trans, char diag, lapack_int m, lapack_int n, - double alpha, const double* a, double* b, - lapack_int ldb ); -lapack_int LAPACKE_ctfsm( int matrix_order, char transr, char side, char uplo, - char trans, char diag, lapack_int m, lapack_int n, - lapack_complex_float alpha, - const lapack_complex_float* a, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_ztfsm( int matrix_order, char transr, char side, char uplo, - char trans, char diag, lapack_int m, lapack_int n, - lapack_complex_double alpha, - const lapack_complex_double* a, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_stftri( int matrix_order, char transr, char uplo, char diag, - lapack_int n, float* a ); -lapack_int LAPACKE_dtftri( int matrix_order, char transr, char uplo, char diag, - lapack_int n, double* a ); -lapack_int LAPACKE_ctftri( int matrix_order, char transr, char uplo, char diag, - lapack_int n, lapack_complex_float* a ); -lapack_int LAPACKE_ztftri( int matrix_order, char transr, char uplo, char diag, - lapack_int n, lapack_complex_double* a ); - -lapack_int LAPACKE_stfttp( int matrix_order, char transr, char uplo, - lapack_int n, const float* arf, float* ap ); -lapack_int LAPACKE_dtfttp( int matrix_order, char transr, char uplo, - lapack_int n, const double* arf, double* ap ); -lapack_int LAPACKE_ctfttp( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_float* arf, - lapack_complex_float* ap ); -lapack_int LAPACKE_ztfttp( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_double* arf, - lapack_complex_double* ap ); - -lapack_int LAPACKE_stfttr( int matrix_order, char transr, char uplo, - lapack_int n, const float* arf, float* a, - lapack_int lda ); -lapack_int LAPACKE_dtfttr( int matrix_order, char transr, char uplo, - lapack_int n, const double* arf, double* a, - lapack_int lda ); -lapack_int LAPACKE_ctfttr( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_float* arf, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_ztfttr( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_double* arf, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_stgevc( int matrix_order, char side, char howmny, - const lapack_logical* select, lapack_int n, - const float* s, lapack_int lds, const float* p, - lapack_int ldp, float* vl, lapack_int ldvl, - float* vr, lapack_int ldvr, lapack_int mm, - lapack_int* m ); -lapack_int LAPACKE_dtgevc( int matrix_order, char side, char howmny, - const lapack_logical* select, lapack_int n, - const double* s, lapack_int lds, const double* p, - lapack_int ldp, double* vl, lapack_int ldvl, - double* vr, lapack_int ldvr, lapack_int mm, - lapack_int* m ); -lapack_int LAPACKE_ctgevc( int matrix_order, char side, char howmny, - const lapack_logical* select, lapack_int n, - const lapack_complex_float* s, lapack_int lds, - const lapack_complex_float* p, lapack_int ldp, - lapack_complex_float* vl, lapack_int ldvl, - lapack_complex_float* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m ); -lapack_int LAPACKE_ztgevc( int matrix_order, char side, char howmny, - const lapack_logical* select, lapack_int n, - const lapack_complex_double* s, lapack_int lds, - const lapack_complex_double* p, lapack_int ldp, - lapack_complex_double* vl, lapack_int ldvl, - lapack_complex_double* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m ); - -lapack_int LAPACKE_stgexc( int matrix_order, lapack_logical wantq, - lapack_logical wantz, lapack_int n, float* a, - lapack_int lda, float* b, lapack_int ldb, float* q, - lapack_int ldq, float* z, lapack_int ldz, - lapack_int* ifst, lapack_int* ilst ); -lapack_int LAPACKE_dtgexc( int matrix_order, lapack_logical wantq, - lapack_logical wantz, lapack_int n, double* a, - lapack_int lda, double* b, lapack_int ldb, double* q, - lapack_int ldq, double* z, lapack_int ldz, - lapack_int* ifst, lapack_int* ilst ); -lapack_int LAPACKE_ctgexc( int matrix_order, lapack_logical wantq, - lapack_logical wantz, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* q, lapack_int ldq, - lapack_complex_float* z, lapack_int ldz, - lapack_int ifst, lapack_int ilst ); -lapack_int LAPACKE_ztgexc( int matrix_order, lapack_logical wantq, - lapack_logical wantz, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* z, lapack_int ldz, - lapack_int ifst, lapack_int ilst ); - -lapack_int LAPACKE_stgsen( int matrix_order, lapack_int ijob, - lapack_logical wantq, lapack_logical wantz, - const lapack_logical* select, lapack_int n, float* a, - lapack_int lda, float* b, lapack_int ldb, - float* alphar, float* alphai, float* beta, float* q, - lapack_int ldq, float* z, lapack_int ldz, - lapack_int* m, float* pl, float* pr, float* dif ); -lapack_int LAPACKE_dtgsen( int matrix_order, lapack_int ijob, - lapack_logical wantq, lapack_logical wantz, - const lapack_logical* select, lapack_int n, - double* a, lapack_int lda, double* b, lapack_int ldb, - double* alphar, double* alphai, double* beta, - double* q, lapack_int ldq, double* z, lapack_int ldz, - lapack_int* m, double* pl, double* pr, double* dif ); -lapack_int LAPACKE_ctgsen( int matrix_order, lapack_int ijob, - lapack_logical wantq, lapack_logical wantz, - const lapack_logical* select, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* alpha, - lapack_complex_float* beta, lapack_complex_float* q, - lapack_int ldq, lapack_complex_float* z, - lapack_int ldz, lapack_int* m, float* pl, float* pr, - float* dif ); -lapack_int LAPACKE_ztgsen( int matrix_order, lapack_int ijob, - lapack_logical wantq, lapack_logical wantz, - const lapack_logical* select, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* alpha, - lapack_complex_double* beta, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* z, lapack_int ldz, - lapack_int* m, double* pl, double* pr, double* dif ); - -lapack_int LAPACKE_stgsja( int matrix_order, char jobu, char jobv, char jobq, - lapack_int m, lapack_int p, lapack_int n, - lapack_int k, lapack_int l, float* a, lapack_int lda, - float* b, lapack_int ldb, float tola, float tolb, - float* alpha, float* beta, float* u, lapack_int ldu, - float* v, lapack_int ldv, float* q, lapack_int ldq, - lapack_int* ncycle ); -lapack_int LAPACKE_dtgsja( int matrix_order, char jobu, char jobv, char jobq, - lapack_int m, lapack_int p, lapack_int n, - lapack_int k, lapack_int l, double* a, - lapack_int lda, double* b, lapack_int ldb, - double tola, double tolb, double* alpha, - double* beta, double* u, lapack_int ldu, double* v, - lapack_int ldv, double* q, lapack_int ldq, - lapack_int* ncycle ); -lapack_int LAPACKE_ctgsja( int matrix_order, char jobu, char jobv, char jobq, - lapack_int m, lapack_int p, lapack_int n, - lapack_int k, lapack_int l, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, float tola, float tolb, float* alpha, - float* beta, lapack_complex_float* u, lapack_int ldu, - lapack_complex_float* v, lapack_int ldv, - lapack_complex_float* q, lapack_int ldq, - lapack_int* ncycle ); -lapack_int LAPACKE_ztgsja( int matrix_order, char jobu, char jobv, char jobq, - lapack_int m, lapack_int p, lapack_int n, - lapack_int k, lapack_int l, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, double tola, double tolb, - double* alpha, double* beta, - lapack_complex_double* u, lapack_int ldu, - lapack_complex_double* v, lapack_int ldv, - lapack_complex_double* q, lapack_int ldq, - lapack_int* ncycle ); - -lapack_int LAPACKE_stgsna( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const float* a, lapack_int lda, const float* b, - lapack_int ldb, const float* vl, lapack_int ldvl, - const float* vr, lapack_int ldvr, float* s, - float* dif, lapack_int mm, lapack_int* m ); -lapack_int LAPACKE_dtgsna( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const double* a, lapack_int lda, const double* b, - lapack_int ldb, const double* vl, lapack_int ldvl, - const double* vr, lapack_int ldvr, double* s, - double* dif, lapack_int mm, lapack_int* m ); -lapack_int LAPACKE_ctgsna( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* b, lapack_int ldb, - const lapack_complex_float* vl, lapack_int ldvl, - const lapack_complex_float* vr, lapack_int ldvr, - float* s, float* dif, lapack_int mm, lapack_int* m ); -lapack_int LAPACKE_ztgsna( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* b, lapack_int ldb, - const lapack_complex_double* vl, lapack_int ldvl, - const lapack_complex_double* vr, lapack_int ldvr, - double* s, double* dif, lapack_int mm, - lapack_int* m ); - -lapack_int LAPACKE_stgsyl( int matrix_order, char trans, lapack_int ijob, - lapack_int m, lapack_int n, const float* a, - lapack_int lda, const float* b, lapack_int ldb, - float* c, lapack_int ldc, const float* d, - lapack_int ldd, const float* e, lapack_int lde, - float* f, lapack_int ldf, float* scale, float* dif ); -lapack_int LAPACKE_dtgsyl( int matrix_order, char trans, lapack_int ijob, - lapack_int m, lapack_int n, const double* a, - lapack_int lda, const double* b, lapack_int ldb, - double* c, lapack_int ldc, const double* d, - lapack_int ldd, const double* e, lapack_int lde, - double* f, lapack_int ldf, double* scale, - double* dif ); -lapack_int LAPACKE_ctgsyl( int matrix_order, char trans, lapack_int ijob, - lapack_int m, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* c, lapack_int ldc, - const lapack_complex_float* d, lapack_int ldd, - const lapack_complex_float* e, lapack_int lde, - lapack_complex_float* f, lapack_int ldf, - float* scale, float* dif ); -lapack_int LAPACKE_ztgsyl( int matrix_order, char trans, lapack_int ijob, - lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* c, lapack_int ldc, - const lapack_complex_double* d, lapack_int ldd, - const lapack_complex_double* e, lapack_int lde, - lapack_complex_double* f, lapack_int ldf, - double* scale, double* dif ); - -lapack_int LAPACKE_stpcon( int matrix_order, char norm, char uplo, char diag, - lapack_int n, const float* ap, float* rcond ); -lapack_int LAPACKE_dtpcon( int matrix_order, char norm, char uplo, char diag, - lapack_int n, const double* ap, double* rcond ); -lapack_int LAPACKE_ctpcon( int matrix_order, char norm, char uplo, char diag, - lapack_int n, const lapack_complex_float* ap, - float* rcond ); -lapack_int LAPACKE_ztpcon( int matrix_order, char norm, char uplo, char diag, - lapack_int n, const lapack_complex_double* ap, - double* rcond ); - -lapack_int LAPACKE_stprfs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, const float* ap, - const float* b, lapack_int ldb, const float* x, - lapack_int ldx, float* ferr, float* berr ); -lapack_int LAPACKE_dtprfs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, const double* ap, - const double* b, lapack_int ldb, const double* x, - lapack_int ldx, double* ferr, double* berr ); -lapack_int LAPACKE_ctprfs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* ap, - const lapack_complex_float* b, lapack_int ldb, - const lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr ); -lapack_int LAPACKE_ztprfs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* ap, - const lapack_complex_double* b, lapack_int ldb, - const lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_stptri( int matrix_order, char uplo, char diag, lapack_int n, - float* ap ); -lapack_int LAPACKE_dtptri( int matrix_order, char uplo, char diag, lapack_int n, - double* ap ); -lapack_int LAPACKE_ctptri( int matrix_order, char uplo, char diag, lapack_int n, - lapack_complex_float* ap ); -lapack_int LAPACKE_ztptri( int matrix_order, char uplo, char diag, lapack_int n, - lapack_complex_double* ap ); - -lapack_int LAPACKE_stptrs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, const float* ap, - float* b, lapack_int ldb ); -lapack_int LAPACKE_dtptrs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, const double* ap, - double* b, lapack_int ldb ); -lapack_int LAPACKE_ctptrs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* ap, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_ztptrs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* ap, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_stpttf( int matrix_order, char transr, char uplo, - lapack_int n, const float* ap, float* arf ); -lapack_int LAPACKE_dtpttf( int matrix_order, char transr, char uplo, - lapack_int n, const double* ap, double* arf ); -lapack_int LAPACKE_ctpttf( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_float* ap, - lapack_complex_float* arf ); -lapack_int LAPACKE_ztpttf( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_double* ap, - lapack_complex_double* arf ); - -lapack_int LAPACKE_stpttr( int matrix_order, char uplo, lapack_int n, - const float* ap, float* a, lapack_int lda ); -lapack_int LAPACKE_dtpttr( int matrix_order, char uplo, lapack_int n, - const double* ap, double* a, lapack_int lda ); -lapack_int LAPACKE_ctpttr( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* ap, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_ztpttr( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* ap, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_strcon( int matrix_order, char norm, char uplo, char diag, - lapack_int n, const float* a, lapack_int lda, - float* rcond ); -lapack_int LAPACKE_dtrcon( int matrix_order, char norm, char uplo, char diag, - lapack_int n, const double* a, lapack_int lda, - double* rcond ); -lapack_int LAPACKE_ctrcon( int matrix_order, char norm, char uplo, char diag, - lapack_int n, const lapack_complex_float* a, - lapack_int lda, float* rcond ); -lapack_int LAPACKE_ztrcon( int matrix_order, char norm, char uplo, char diag, - lapack_int n, const lapack_complex_double* a, - lapack_int lda, double* rcond ); - -lapack_int LAPACKE_strevc( int matrix_order, char side, char howmny, - lapack_logical* select, lapack_int n, const float* t, - lapack_int ldt, float* vl, lapack_int ldvl, - float* vr, lapack_int ldvr, lapack_int mm, - lapack_int* m ); -lapack_int LAPACKE_dtrevc( int matrix_order, char side, char howmny, - lapack_logical* select, lapack_int n, - const double* t, lapack_int ldt, double* vl, - lapack_int ldvl, double* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m ); -lapack_int LAPACKE_ctrevc( int matrix_order, char side, char howmny, - const lapack_logical* select, lapack_int n, - lapack_complex_float* t, lapack_int ldt, - lapack_complex_float* vl, lapack_int ldvl, - lapack_complex_float* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m ); -lapack_int LAPACKE_ztrevc( int matrix_order, char side, char howmny, - const lapack_logical* select, lapack_int n, - lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* vl, lapack_int ldvl, - lapack_complex_double* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m ); - -lapack_int LAPACKE_strexc( int matrix_order, char compq, lapack_int n, float* t, - lapack_int ldt, float* q, lapack_int ldq, - lapack_int* ifst, lapack_int* ilst ); -lapack_int LAPACKE_dtrexc( int matrix_order, char compq, lapack_int n, - double* t, lapack_int ldt, double* q, lapack_int ldq, - lapack_int* ifst, lapack_int* ilst ); -lapack_int LAPACKE_ctrexc( int matrix_order, char compq, lapack_int n, - lapack_complex_float* t, lapack_int ldt, - lapack_complex_float* q, lapack_int ldq, - lapack_int ifst, lapack_int ilst ); -lapack_int LAPACKE_ztrexc( int matrix_order, char compq, lapack_int n, - lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* q, lapack_int ldq, - lapack_int ifst, lapack_int ilst ); - -lapack_int LAPACKE_strrfs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, const float* a, - lapack_int lda, const float* b, lapack_int ldb, - const float* x, lapack_int ldx, float* ferr, - float* berr ); -lapack_int LAPACKE_dtrrfs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, const double* a, - lapack_int lda, const double* b, lapack_int ldb, - const double* x, lapack_int ldx, double* ferr, - double* berr ); -lapack_int LAPACKE_ctrrfs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* b, lapack_int ldb, - const lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr ); -lapack_int LAPACKE_ztrrfs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* b, lapack_int ldb, - const lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr ); - -lapack_int LAPACKE_strsen( int matrix_order, char job, char compq, - const lapack_logical* select, lapack_int n, float* t, - lapack_int ldt, float* q, lapack_int ldq, float* wr, - float* wi, lapack_int* m, float* s, float* sep ); -lapack_int LAPACKE_dtrsen( int matrix_order, char job, char compq, - const lapack_logical* select, lapack_int n, - double* t, lapack_int ldt, double* q, lapack_int ldq, - double* wr, double* wi, lapack_int* m, double* s, - double* sep ); -lapack_int LAPACKE_ctrsen( int matrix_order, char job, char compq, - const lapack_logical* select, lapack_int n, - lapack_complex_float* t, lapack_int ldt, - lapack_complex_float* q, lapack_int ldq, - lapack_complex_float* w, lapack_int* m, float* s, - float* sep ); -lapack_int LAPACKE_ztrsen( int matrix_order, char job, char compq, - const lapack_logical* select, lapack_int n, - lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* w, lapack_int* m, double* s, - double* sep ); - -lapack_int LAPACKE_strsna( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const float* t, lapack_int ldt, const float* vl, - lapack_int ldvl, const float* vr, lapack_int ldvr, - float* s, float* sep, lapack_int mm, lapack_int* m ); -lapack_int LAPACKE_dtrsna( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const double* t, lapack_int ldt, const double* vl, - lapack_int ldvl, const double* vr, lapack_int ldvr, - double* s, double* sep, lapack_int mm, - lapack_int* m ); -lapack_int LAPACKE_ctrsna( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const lapack_complex_float* t, lapack_int ldt, - const lapack_complex_float* vl, lapack_int ldvl, - const lapack_complex_float* vr, lapack_int ldvr, - float* s, float* sep, lapack_int mm, lapack_int* m ); -lapack_int LAPACKE_ztrsna( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const lapack_complex_double* t, lapack_int ldt, - const lapack_complex_double* vl, lapack_int ldvl, - const lapack_complex_double* vr, lapack_int ldvr, - double* s, double* sep, lapack_int mm, - lapack_int* m ); - -lapack_int LAPACKE_strsyl( int matrix_order, char trana, char tranb, - lapack_int isgn, lapack_int m, lapack_int n, - const float* a, lapack_int lda, const float* b, - lapack_int ldb, float* c, lapack_int ldc, - float* scale ); -lapack_int LAPACKE_dtrsyl( int matrix_order, char trana, char tranb, - lapack_int isgn, lapack_int m, lapack_int n, - const double* a, lapack_int lda, const double* b, - lapack_int ldb, double* c, lapack_int ldc, - double* scale ); -lapack_int LAPACKE_ctrsyl( int matrix_order, char trana, char tranb, - lapack_int isgn, lapack_int m, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* c, lapack_int ldc, - float* scale ); -lapack_int LAPACKE_ztrsyl( int matrix_order, char trana, char tranb, - lapack_int isgn, lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* c, lapack_int ldc, - double* scale ); - -lapack_int LAPACKE_strtri( int matrix_order, char uplo, char diag, lapack_int n, - float* a, lapack_int lda ); -lapack_int LAPACKE_dtrtri( int matrix_order, char uplo, char diag, lapack_int n, - double* a, lapack_int lda ); -lapack_int LAPACKE_ctrtri( int matrix_order, char uplo, char diag, lapack_int n, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_ztrtri( int matrix_order, char uplo, char diag, lapack_int n, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_strtrs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, const float* a, - lapack_int lda, float* b, lapack_int ldb ); -lapack_int LAPACKE_dtrtrs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, const double* a, - lapack_int lda, double* b, lapack_int ldb ); -lapack_int LAPACKE_ctrtrs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_ztrtrs( int matrix_order, char uplo, char trans, char diag, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_strttf( int matrix_order, char transr, char uplo, - lapack_int n, const float* a, lapack_int lda, - float* arf ); -lapack_int LAPACKE_dtrttf( int matrix_order, char transr, char uplo, - lapack_int n, const double* a, lapack_int lda, - double* arf ); -lapack_int LAPACKE_ctrttf( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_float* a, - lapack_int lda, lapack_complex_float* arf ); -lapack_int LAPACKE_ztrttf( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_double* a, - lapack_int lda, lapack_complex_double* arf ); - -lapack_int LAPACKE_strttp( int matrix_order, char uplo, lapack_int n, - const float* a, lapack_int lda, float* ap ); -lapack_int LAPACKE_dtrttp( int matrix_order, char uplo, lapack_int n, - const double* a, lapack_int lda, double* ap ); -lapack_int LAPACKE_ctrttp( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - lapack_complex_float* ap ); -lapack_int LAPACKE_ztrttp( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - lapack_complex_double* ap ); - -lapack_int LAPACKE_stzrzf( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau ); -lapack_int LAPACKE_dtzrzf( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau ); -lapack_int LAPACKE_ctzrzf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau ); -lapack_int LAPACKE_ztzrzf( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau ); - -lapack_int LAPACKE_cungbr( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int k, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau ); -lapack_int LAPACKE_zungbr( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int k, lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* tau ); - -lapack_int LAPACKE_cunghr( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau ); -lapack_int LAPACKE_zunghr( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* tau ); - -lapack_int LAPACKE_cunglq( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau ); -lapack_int LAPACKE_zunglq( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* tau ); - -lapack_int LAPACKE_cungql( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau ); -lapack_int LAPACKE_zungql( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* tau ); - -lapack_int LAPACKE_cungqr( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau ); -lapack_int LAPACKE_zungqr( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* tau ); - -lapack_int LAPACKE_cungrq( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau ); -lapack_int LAPACKE_zungrq( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* tau ); - -lapack_int LAPACKE_cungtr( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau ); -lapack_int LAPACKE_zungtr( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau ); - -lapack_int LAPACKE_cunmbr( int matrix_order, char vect, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc ); -lapack_int LAPACKE_zunmbr( int matrix_order, char vect, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc ); - -lapack_int LAPACKE_cunmhr( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int ilo, - lapack_int ihi, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc ); -lapack_int LAPACKE_zunmhr( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int ilo, - lapack_int ihi, const lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc ); - -lapack_int LAPACKE_cunmlq( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc ); -lapack_int LAPACKE_zunmlq( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc ); - -lapack_int LAPACKE_cunmql( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc ); -lapack_int LAPACKE_zunmql( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc ); - -lapack_int LAPACKE_cunmqr( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc ); -lapack_int LAPACKE_zunmqr( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc ); - -lapack_int LAPACKE_cunmrq( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc ); -lapack_int LAPACKE_zunmrq( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc ); - -lapack_int LAPACKE_cunmrz( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc ); -lapack_int LAPACKE_zunmrz( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, const lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc ); - -lapack_int LAPACKE_cunmtr( int matrix_order, char side, char uplo, char trans, - lapack_int m, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc ); -lapack_int LAPACKE_zunmtr( int matrix_order, char side, char uplo, char trans, - lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc ); - -lapack_int LAPACKE_cupgtr( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* ap, - const lapack_complex_float* tau, - lapack_complex_float* q, lapack_int ldq ); -lapack_int LAPACKE_zupgtr( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* ap, - const lapack_complex_double* tau, - lapack_complex_double* q, lapack_int ldq ); - -lapack_int LAPACKE_cupmtr( int matrix_order, char side, char uplo, char trans, - lapack_int m, lapack_int n, - const lapack_complex_float* ap, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc ); -lapack_int LAPACKE_zupmtr( int matrix_order, char side, char uplo, char trans, - lapack_int m, lapack_int n, - const lapack_complex_double* ap, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc ); - -lapack_int LAPACKE_sbdsdc_work( int matrix_order, char uplo, char compq, - lapack_int n, float* d, float* e, float* u, - lapack_int ldu, float* vt, lapack_int ldvt, - float* q, lapack_int* iq, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dbdsdc_work( int matrix_order, char uplo, char compq, - lapack_int n, double* d, double* e, double* u, - lapack_int ldu, double* vt, lapack_int ldvt, - double* q, lapack_int* iq, double* work, - lapack_int* iwork ); - -lapack_int LAPACKE_sbdsqr_work( int matrix_order, char uplo, lapack_int n, - lapack_int ncvt, lapack_int nru, lapack_int ncc, - float* d, float* e, float* vt, lapack_int ldvt, - float* u, lapack_int ldu, float* c, - lapack_int ldc, float* work ); -lapack_int LAPACKE_dbdsqr_work( int matrix_order, char uplo, lapack_int n, - lapack_int ncvt, lapack_int nru, lapack_int ncc, - double* d, double* e, double* vt, - lapack_int ldvt, double* u, lapack_int ldu, - double* c, lapack_int ldc, double* work ); -lapack_int LAPACKE_cbdsqr_work( int matrix_order, char uplo, lapack_int n, - lapack_int ncvt, lapack_int nru, lapack_int ncc, - float* d, float* e, lapack_complex_float* vt, - lapack_int ldvt, lapack_complex_float* u, - lapack_int ldu, lapack_complex_float* c, - lapack_int ldc, float* work ); -lapack_int LAPACKE_zbdsqr_work( int matrix_order, char uplo, lapack_int n, - lapack_int ncvt, lapack_int nru, lapack_int ncc, - double* d, double* e, lapack_complex_double* vt, - lapack_int ldvt, lapack_complex_double* u, - lapack_int ldu, lapack_complex_double* c, - lapack_int ldc, double* work ); - -lapack_int LAPACKE_sdisna_work( char job, lapack_int m, lapack_int n, - const float* d, float* sep ); -lapack_int LAPACKE_ddisna_work( char job, lapack_int m, lapack_int n, - const double* d, double* sep ); - -lapack_int LAPACKE_sgbbrd_work( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int ncc, lapack_int kl, - lapack_int ku, float* ab, lapack_int ldab, - float* d, float* e, float* q, lapack_int ldq, - float* pt, lapack_int ldpt, float* c, - lapack_int ldc, float* work ); -lapack_int LAPACKE_dgbbrd_work( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int ncc, lapack_int kl, - lapack_int ku, double* ab, lapack_int ldab, - double* d, double* e, double* q, lapack_int ldq, - double* pt, lapack_int ldpt, double* c, - lapack_int ldc, double* work ); -lapack_int LAPACKE_cgbbrd_work( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int ncc, lapack_int kl, - lapack_int ku, lapack_complex_float* ab, - lapack_int ldab, float* d, float* e, - lapack_complex_float* q, lapack_int ldq, - lapack_complex_float* pt, lapack_int ldpt, - lapack_complex_float* c, lapack_int ldc, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zgbbrd_work( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int ncc, lapack_int kl, - lapack_int ku, lapack_complex_double* ab, - lapack_int ldab, double* d, double* e, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* pt, lapack_int ldpt, - lapack_complex_double* c, lapack_int ldc, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sgbcon_work( int matrix_order, char norm, lapack_int n, - lapack_int kl, lapack_int ku, const float* ab, - lapack_int ldab, const lapack_int* ipiv, - float anorm, float* rcond, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dgbcon_work( int matrix_order, char norm, lapack_int n, - lapack_int kl, lapack_int ku, const double* ab, - lapack_int ldab, const lapack_int* ipiv, - double anorm, double* rcond, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cgbcon_work( int matrix_order, char norm, lapack_int n, - lapack_int kl, lapack_int ku, - const lapack_complex_float* ab, lapack_int ldab, - const lapack_int* ipiv, float anorm, - float* rcond, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zgbcon_work( int matrix_order, char norm, lapack_int n, - lapack_int kl, lapack_int ku, - const lapack_complex_double* ab, - lapack_int ldab, const lapack_int* ipiv, - double anorm, double* rcond, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sgbequ_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const float* ab, - lapack_int ldab, float* r, float* c, - float* rowcnd, float* colcnd, float* amax ); -lapack_int LAPACKE_dgbequ_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const double* ab, - lapack_int ldab, double* r, double* c, - double* rowcnd, double* colcnd, double* amax ); -lapack_int LAPACKE_cgbequ_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, - const lapack_complex_float* ab, lapack_int ldab, - float* r, float* c, float* rowcnd, - float* colcnd, float* amax ); -lapack_int LAPACKE_zgbequ_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, - const lapack_complex_double* ab, - lapack_int ldab, double* r, double* c, - double* rowcnd, double* colcnd, double* amax ); - -lapack_int LAPACKE_sgbequb_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const float* ab, - lapack_int ldab, float* r, float* c, - float* rowcnd, float* colcnd, float* amax ); -lapack_int LAPACKE_dgbequb_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const double* ab, - lapack_int ldab, double* r, double* c, - double* rowcnd, double* colcnd, double* amax ); -lapack_int LAPACKE_cgbequb_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, - const lapack_complex_float* ab, - lapack_int ldab, float* r, float* c, - float* rowcnd, float* colcnd, float* amax ); -lapack_int LAPACKE_zgbequb_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, - const lapack_complex_double* ab, - lapack_int ldab, double* r, double* c, - double* rowcnd, double* colcnd, double* amax ); - -lapack_int LAPACKE_sgbrfs_work( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const float* ab, lapack_int ldab, - const float* afb, lapack_int ldafb, - const lapack_int* ipiv, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* ferr, float* berr, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dgbrfs_work( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const double* ab, lapack_int ldab, - const double* afb, lapack_int ldafb, - const lapack_int* ipiv, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* ferr, double* berr, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cgbrfs_work( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const lapack_complex_float* ab, lapack_int ldab, - const lapack_complex_float* afb, - lapack_int ldafb, const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zgbrfs_work( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const lapack_complex_double* ab, - lapack_int ldab, - const lapack_complex_double* afb, - lapack_int ldafb, const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sgbrfsx_work( int matrix_order, char trans, char equed, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, const float* ab, - lapack_int ldab, const float* afb, - lapack_int ldafb, const lapack_int* ipiv, - const float* r, const float* c, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dgbrfsx_work( int matrix_order, char trans, char equed, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, const double* ab, - lapack_int ldab, const double* afb, - lapack_int ldafb, const lapack_int* ipiv, - const double* r, const double* c, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* rcond, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cgbrfsx_work( int matrix_order, char trans, char equed, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, - const lapack_complex_float* ab, - lapack_int ldab, - const lapack_complex_float* afb, - lapack_int ldafb, const lapack_int* ipiv, - const float* r, const float* c, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zgbrfsx_work( int matrix_order, char trans, char equed, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, - const lapack_complex_double* ab, - lapack_int ldab, - const lapack_complex_double* afb, - lapack_int ldafb, const lapack_int* ipiv, - const double* r, const double* c, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_sgbsv_work( int matrix_order, lapack_int n, lapack_int kl, - lapack_int ku, lapack_int nrhs, float* ab, - lapack_int ldab, lapack_int* ipiv, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dgbsv_work( int matrix_order, lapack_int n, lapack_int kl, - lapack_int ku, lapack_int nrhs, double* ab, - lapack_int ldab, lapack_int* ipiv, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cgbsv_work( int matrix_order, lapack_int n, lapack_int kl, - lapack_int ku, lapack_int nrhs, - lapack_complex_float* ab, lapack_int ldab, - lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zgbsv_work( int matrix_order, lapack_int n, lapack_int kl, - lapack_int ku, lapack_int nrhs, - lapack_complex_double* ab, lapack_int ldab, - lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_sgbsvx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, float* ab, lapack_int ldab, - float* afb, lapack_int ldafb, lapack_int* ipiv, - char* equed, float* r, float* c, float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - float* work, lapack_int* iwork ); -lapack_int LAPACKE_dgbsvx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, double* ab, lapack_int ldab, - double* afb, lapack_int ldafb, lapack_int* ipiv, - char* equed, double* r, double* c, double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_cgbsvx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, lapack_complex_float* ab, - lapack_int ldab, lapack_complex_float* afb, - lapack_int ldafb, lapack_int* ipiv, char* equed, - float* r, float* c, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zgbsvx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, lapack_complex_double* ab, - lapack_int ldab, lapack_complex_double* afb, - lapack_int ldafb, lapack_int* ipiv, char* equed, - double* r, double* c, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, double* rcond, double* ferr, - double* berr, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_sgbsvxx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, float* ab, lapack_int ldab, - float* afb, lapack_int ldafb, lapack_int* ipiv, - char* equed, float* r, float* c, float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dgbsvxx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, double* ab, lapack_int ldab, - double* afb, lapack_int ldafb, - lapack_int* ipiv, char* equed, double* r, - double* c, double* b, lapack_int ldb, - double* x, lapack_int ldx, double* rcond, - double* rpvgrw, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cgbsvxx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, lapack_complex_float* ab, - lapack_int ldab, lapack_complex_float* afb, - lapack_int ldafb, lapack_int* ipiv, - char* equed, float* r, float* c, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zgbsvxx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int kl, lapack_int ku, - lapack_int nrhs, lapack_complex_double* ab, - lapack_int ldab, lapack_complex_double* afb, - lapack_int ldafb, lapack_int* ipiv, - char* equed, double* r, double* c, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* rpvgrw, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_sgbtrf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, float* ab, - lapack_int ldab, lapack_int* ipiv ); -lapack_int LAPACKE_dgbtrf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, double* ab, - lapack_int ldab, lapack_int* ipiv ); -lapack_int LAPACKE_cgbtrf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, - lapack_complex_float* ab, lapack_int ldab, - lapack_int* ipiv ); -lapack_int LAPACKE_zgbtrf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, - lapack_complex_double* ab, lapack_int ldab, - lapack_int* ipiv ); - -lapack_int LAPACKE_sgbtrs_work( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const float* ab, lapack_int ldab, - const lapack_int* ipiv, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dgbtrs_work( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const double* ab, lapack_int ldab, - const lapack_int* ipiv, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cgbtrs_work( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const lapack_complex_float* ab, lapack_int ldab, - const lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zgbtrs_work( int matrix_order, char trans, lapack_int n, - lapack_int kl, lapack_int ku, lapack_int nrhs, - const lapack_complex_double* ab, - lapack_int ldab, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_sgebak_work( int matrix_order, char job, char side, - lapack_int n, lapack_int ilo, lapack_int ihi, - const float* scale, lapack_int m, float* v, - lapack_int ldv ); -lapack_int LAPACKE_dgebak_work( int matrix_order, char job, char side, - lapack_int n, lapack_int ilo, lapack_int ihi, - const double* scale, lapack_int m, double* v, - lapack_int ldv ); -lapack_int LAPACKE_cgebak_work( int matrix_order, char job, char side, - lapack_int n, lapack_int ilo, lapack_int ihi, - const float* scale, lapack_int m, - lapack_complex_float* v, lapack_int ldv ); -lapack_int LAPACKE_zgebak_work( int matrix_order, char job, char side, - lapack_int n, lapack_int ilo, lapack_int ihi, - const double* scale, lapack_int m, - lapack_complex_double* v, lapack_int ldv ); - -lapack_int LAPACKE_sgebal_work( int matrix_order, char job, lapack_int n, - float* a, lapack_int lda, lapack_int* ilo, - lapack_int* ihi, float* scale ); -lapack_int LAPACKE_dgebal_work( int matrix_order, char job, lapack_int n, - double* a, lapack_int lda, lapack_int* ilo, - lapack_int* ihi, double* scale ); -lapack_int LAPACKE_cgebal_work( int matrix_order, char job, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* ilo, lapack_int* ihi, - float* scale ); -lapack_int LAPACKE_zgebal_work( int matrix_order, char job, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* ilo, lapack_int* ihi, - double* scale ); - -lapack_int LAPACKE_sgebrd_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* d, float* e, - float* tauq, float* taup, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dgebrd_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* d, double* e, - double* tauq, double* taup, double* work, - lapack_int lwork ); -lapack_int LAPACKE_cgebrd_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - float* d, float* e, lapack_complex_float* tauq, - lapack_complex_float* taup, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zgebrd_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - double* d, double* e, - lapack_complex_double* tauq, - lapack_complex_double* taup, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_sgecon_work( int matrix_order, char norm, lapack_int n, - const float* a, lapack_int lda, float anorm, - float* rcond, float* work, lapack_int* iwork ); -lapack_int LAPACKE_dgecon_work( int matrix_order, char norm, lapack_int n, - const double* a, lapack_int lda, double anorm, - double* rcond, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cgecon_work( int matrix_order, char norm, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float anorm, float* rcond, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zgecon_work( int matrix_order, char norm, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double anorm, double* rcond, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sgeequ_work( int matrix_order, lapack_int m, lapack_int n, - const float* a, lapack_int lda, float* r, - float* c, float* rowcnd, float* colcnd, - float* amax ); -lapack_int LAPACKE_dgeequ_work( int matrix_order, lapack_int m, lapack_int n, - const double* a, lapack_int lda, double* r, - double* c, double* rowcnd, double* colcnd, - double* amax ); -lapack_int LAPACKE_cgeequ_work( int matrix_order, lapack_int m, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* r, float* c, float* rowcnd, - float* colcnd, float* amax ); -lapack_int LAPACKE_zgeequ_work( int matrix_order, lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* r, double* c, double* rowcnd, - double* colcnd, double* amax ); - -lapack_int LAPACKE_sgeequb_work( int matrix_order, lapack_int m, lapack_int n, - const float* a, lapack_int lda, float* r, - float* c, float* rowcnd, float* colcnd, - float* amax ); -lapack_int LAPACKE_dgeequb_work( int matrix_order, lapack_int m, lapack_int n, - const double* a, lapack_int lda, double* r, - double* c, double* rowcnd, double* colcnd, - double* amax ); -lapack_int LAPACKE_cgeequb_work( int matrix_order, lapack_int m, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* r, float* c, float* rowcnd, - float* colcnd, float* amax ); -lapack_int LAPACKE_zgeequb_work( int matrix_order, lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* r, double* c, double* rowcnd, - double* colcnd, double* amax ); - -lapack_int LAPACKE_sgees_work( int matrix_order, char jobvs, char sort, - LAPACK_S_SELECT2 select, lapack_int n, float* a, - lapack_int lda, lapack_int* sdim, float* wr, - float* wi, float* vs, lapack_int ldvs, - float* work, lapack_int lwork, - lapack_logical* bwork ); -lapack_int LAPACKE_dgees_work( int matrix_order, char jobvs, char sort, - LAPACK_D_SELECT2 select, lapack_int n, double* a, - lapack_int lda, lapack_int* sdim, double* wr, - double* wi, double* vs, lapack_int ldvs, - double* work, lapack_int lwork, - lapack_logical* bwork ); -lapack_int LAPACKE_cgees_work( int matrix_order, char jobvs, char sort, - LAPACK_C_SELECT1 select, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* sdim, lapack_complex_float* w, - lapack_complex_float* vs, lapack_int ldvs, - lapack_complex_float* work, lapack_int lwork, - float* rwork, lapack_logical* bwork ); -lapack_int LAPACKE_zgees_work( int matrix_order, char jobvs, char sort, - LAPACK_Z_SELECT1 select, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* sdim, lapack_complex_double* w, - lapack_complex_double* vs, lapack_int ldvs, - lapack_complex_double* work, lapack_int lwork, - double* rwork, lapack_logical* bwork ); - -lapack_int LAPACKE_sgeesx_work( int matrix_order, char jobvs, char sort, - LAPACK_S_SELECT2 select, char sense, - lapack_int n, float* a, lapack_int lda, - lapack_int* sdim, float* wr, float* wi, - float* vs, lapack_int ldvs, float* rconde, - float* rcondv, float* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork, - lapack_logical* bwork ); -lapack_int LAPACKE_dgeesx_work( int matrix_order, char jobvs, char sort, - LAPACK_D_SELECT2 select, char sense, - lapack_int n, double* a, lapack_int lda, - lapack_int* sdim, double* wr, double* wi, - double* vs, lapack_int ldvs, double* rconde, - double* rcondv, double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork, - lapack_logical* bwork ); -lapack_int LAPACKE_cgeesx_work( int matrix_order, char jobvs, char sort, - LAPACK_C_SELECT1 select, char sense, - lapack_int n, lapack_complex_float* a, - lapack_int lda, lapack_int* sdim, - lapack_complex_float* w, - lapack_complex_float* vs, lapack_int ldvs, - float* rconde, float* rcondv, - lapack_complex_float* work, lapack_int lwork, - float* rwork, lapack_logical* bwork ); -lapack_int LAPACKE_zgeesx_work( int matrix_order, char jobvs, char sort, - LAPACK_Z_SELECT1 select, char sense, - lapack_int n, lapack_complex_double* a, - lapack_int lda, lapack_int* sdim, - lapack_complex_double* w, - lapack_complex_double* vs, lapack_int ldvs, - double* rconde, double* rcondv, - lapack_complex_double* work, lapack_int lwork, - double* rwork, lapack_logical* bwork ); - -lapack_int LAPACKE_sgeev_work( int matrix_order, char jobvl, char jobvr, - lapack_int n, float* a, lapack_int lda, - float* wr, float* wi, float* vl, lapack_int ldvl, - float* vr, lapack_int ldvr, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dgeev_work( int matrix_order, char jobvl, char jobvr, - lapack_int n, double* a, lapack_int lda, - double* wr, double* wi, double* vl, - lapack_int ldvl, double* vr, lapack_int ldvr, - double* work, lapack_int lwork ); -lapack_int LAPACKE_cgeev_work( int matrix_order, char jobvl, char jobvr, - lapack_int n, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* w, - lapack_complex_float* vl, lapack_int ldvl, - lapack_complex_float* vr, lapack_int ldvr, - lapack_complex_float* work, lapack_int lwork, - float* rwork ); -lapack_int LAPACKE_zgeev_work( int matrix_order, char jobvl, char jobvr, - lapack_int n, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* w, - lapack_complex_double* vl, lapack_int ldvl, - lapack_complex_double* vr, lapack_int ldvr, - lapack_complex_double* work, lapack_int lwork, - double* rwork ); - -lapack_int LAPACKE_sgeevx_work( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, float* a, - lapack_int lda, float* wr, float* wi, float* vl, - lapack_int ldvl, float* vr, lapack_int ldvr, - lapack_int* ilo, lapack_int* ihi, float* scale, - float* abnrm, float* rconde, float* rcondv, - float* work, lapack_int lwork, - lapack_int* iwork ); -lapack_int LAPACKE_dgeevx_work( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, double* a, - lapack_int lda, double* wr, double* wi, - double* vl, lapack_int ldvl, double* vr, - lapack_int ldvr, lapack_int* ilo, - lapack_int* ihi, double* scale, double* abnrm, - double* rconde, double* rcondv, double* work, - lapack_int lwork, lapack_int* iwork ); -lapack_int LAPACKE_cgeevx_work( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* w, - lapack_complex_float* vl, lapack_int ldvl, - lapack_complex_float* vr, lapack_int ldvr, - lapack_int* ilo, lapack_int* ihi, float* scale, - float* abnrm, float* rconde, float* rcondv, - lapack_complex_float* work, lapack_int lwork, - float* rwork ); -lapack_int LAPACKE_zgeevx_work( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* w, - lapack_complex_double* vl, lapack_int ldvl, - lapack_complex_double* vr, lapack_int ldvr, - lapack_int* ilo, lapack_int* ihi, double* scale, - double* abnrm, double* rconde, double* rcondv, - lapack_complex_double* work, lapack_int lwork, - double* rwork ); - -lapack_int LAPACKE_sgehrd_work( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, float* a, lapack_int lda, - float* tau, float* work, lapack_int lwork ); -lapack_int LAPACKE_dgehrd_work( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, double* a, lapack_int lda, - double* tau, double* work, lapack_int lwork ); -lapack_int LAPACKE_cgehrd_work( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zgehrd_work( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_sgejsv_work( int matrix_order, char joba, char jobu, - char jobv, char jobr, char jobt, char jobp, - lapack_int m, lapack_int n, float* a, - lapack_int lda, float* sva, float* u, - lapack_int ldu, float* v, lapack_int ldv, - float* work, lapack_int lwork, - lapack_int* iwork ); -lapack_int LAPACKE_dgejsv_work( int matrix_order, char joba, char jobu, - char jobv, char jobr, char jobt, char jobp, - lapack_int m, lapack_int n, double* a, - lapack_int lda, double* sva, double* u, - lapack_int ldu, double* v, lapack_int ldv, - double* work, lapack_int lwork, - lapack_int* iwork ); - -lapack_int LAPACKE_sgelq2_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau, - float* work ); -lapack_int LAPACKE_dgelq2_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau, - double* work ); -lapack_int LAPACKE_cgelq2_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau, - lapack_complex_float* work ); -lapack_int LAPACKE_zgelq2_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau, - lapack_complex_double* work ); - -lapack_int LAPACKE_sgelqf_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dgelqf_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau, - double* work, lapack_int lwork ); -lapack_int LAPACKE_cgelqf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zgelqf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_sgels_work( int matrix_order, char trans, lapack_int m, - lapack_int n, lapack_int nrhs, float* a, - lapack_int lda, float* b, lapack_int ldb, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dgels_work( int matrix_order, char trans, lapack_int m, - lapack_int n, lapack_int nrhs, double* a, - lapack_int lda, double* b, lapack_int ldb, - double* work, lapack_int lwork ); -lapack_int LAPACKE_cgels_work( int matrix_order, char trans, lapack_int m, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zgels_work( int matrix_order, char trans, lapack_int m, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_sgelsd_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, float* a, lapack_int lda, - float* b, lapack_int ldb, float* s, float rcond, - lapack_int* rank, float* work, lapack_int lwork, - lapack_int* iwork ); -lapack_int LAPACKE_dgelsd_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, - double* b, lapack_int ldb, double* s, - double rcond, lapack_int* rank, double* work, - lapack_int lwork, lapack_int* iwork ); -lapack_int LAPACKE_cgelsd_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, float* s, float rcond, - lapack_int* rank, lapack_complex_float* work, - lapack_int lwork, float* rwork, - lapack_int* iwork ); -lapack_int LAPACKE_zgelsd_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, double* s, double rcond, - lapack_int* rank, lapack_complex_double* work, - lapack_int lwork, double* rwork, - lapack_int* iwork ); - -lapack_int LAPACKE_sgelss_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, float* a, lapack_int lda, - float* b, lapack_int ldb, float* s, float rcond, - lapack_int* rank, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dgelss_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, - double* b, lapack_int ldb, double* s, - double rcond, lapack_int* rank, double* work, - lapack_int lwork ); -lapack_int LAPACKE_cgelss_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, float* s, float rcond, - lapack_int* rank, lapack_complex_float* work, - lapack_int lwork, float* rwork ); -lapack_int LAPACKE_zgelss_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, double* s, double rcond, - lapack_int* rank, lapack_complex_double* work, - lapack_int lwork, double* rwork ); - -lapack_int LAPACKE_sgelsy_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, float* a, lapack_int lda, - float* b, lapack_int ldb, lapack_int* jpvt, - float rcond, lapack_int* rank, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dgelsy_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, - double* b, lapack_int ldb, lapack_int* jpvt, - double rcond, lapack_int* rank, double* work, - lapack_int lwork ); -lapack_int LAPACKE_cgelsy_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, lapack_int* jpvt, float rcond, - lapack_int* rank, lapack_complex_float* work, - lapack_int lwork, float* rwork ); -lapack_int LAPACKE_zgelsy_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, lapack_int* jpvt, double rcond, - lapack_int* rank, lapack_complex_double* work, - lapack_int lwork, double* rwork ); - -lapack_int LAPACKE_sgeqlf_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dgeqlf_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau, - double* work, lapack_int lwork ); -lapack_int LAPACKE_cgeqlf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zgeqlf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_sgeqp3_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, lapack_int* jpvt, - float* tau, float* work, lapack_int lwork ); -lapack_int LAPACKE_dgeqp3_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, lapack_int* jpvt, - double* tau, double* work, lapack_int lwork ); -lapack_int LAPACKE_cgeqp3_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* jpvt, lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork, - float* rwork ); -lapack_int LAPACKE_zgeqp3_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* jpvt, lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork, - double* rwork ); - -lapack_int LAPACKE_sgeqpf_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, lapack_int* jpvt, - float* tau, float* work ); -lapack_int LAPACKE_dgeqpf_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, lapack_int* jpvt, - double* tau, double* work ); -lapack_int LAPACKE_cgeqpf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* jpvt, lapack_complex_float* tau, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zgeqpf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* jpvt, lapack_complex_double* tau, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sgeqr2_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau, - float* work ); -lapack_int LAPACKE_dgeqr2_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau, - double* work ); -lapack_int LAPACKE_cgeqr2_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau, - lapack_complex_float* work ); -lapack_int LAPACKE_zgeqr2_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau, - lapack_complex_double* work ); - -lapack_int LAPACKE_sgeqrf_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dgeqrf_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau, - double* work, lapack_int lwork ); -lapack_int LAPACKE_cgeqrf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zgeqrf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_sgeqrfp_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dgeqrfp_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau, - double* work, lapack_int lwork ); -lapack_int LAPACKE_cgeqrfp_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zgeqrfp_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau, - lapack_complex_double* work, - lapack_int lwork ); - -lapack_int LAPACKE_sgerfs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - const float* af, lapack_int ldaf, - const lapack_int* ipiv, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* ferr, float* berr, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dgerfs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const double* a, - lapack_int lda, const double* af, - lapack_int ldaf, const lapack_int* ipiv, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* ferr, double* berr, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_cgerfs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* af, - lapack_int ldaf, const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zgerfs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* af, - lapack_int ldaf, const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sgerfsx_work( int matrix_order, char trans, char equed, - lapack_int n, lapack_int nrhs, const float* a, - lapack_int lda, const float* af, - lapack_int ldaf, const lapack_int* ipiv, - const float* r, const float* c, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dgerfsx_work( int matrix_order, char trans, char equed, - lapack_int n, lapack_int nrhs, const double* a, - lapack_int lda, const double* af, - lapack_int ldaf, const lapack_int* ipiv, - const double* r, const double* c, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* rcond, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cgerfsx_work( int matrix_order, char trans, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* af, - lapack_int ldaf, const lapack_int* ipiv, - const float* r, const float* c, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zgerfsx_work( int matrix_order, char trans, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* af, - lapack_int ldaf, const lapack_int* ipiv, - const double* r, const double* c, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_sgerqf_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dgerqf_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau, - double* work, lapack_int lwork ); -lapack_int LAPACKE_cgerqf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zgerqf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_sgesdd_work( int matrix_order, char jobz, lapack_int m, - lapack_int n, float* a, lapack_int lda, - float* s, float* u, lapack_int ldu, float* vt, - lapack_int ldvt, float* work, lapack_int lwork, - lapack_int* iwork ); -lapack_int LAPACKE_dgesdd_work( int matrix_order, char jobz, lapack_int m, - lapack_int n, double* a, lapack_int lda, - double* s, double* u, lapack_int ldu, - double* vt, lapack_int ldvt, double* work, - lapack_int lwork, lapack_int* iwork ); -lapack_int LAPACKE_cgesdd_work( int matrix_order, char jobz, lapack_int m, - lapack_int n, lapack_complex_float* a, - lapack_int lda, float* s, - lapack_complex_float* u, lapack_int ldu, - lapack_complex_float* vt, lapack_int ldvt, - lapack_complex_float* work, lapack_int lwork, - float* rwork, lapack_int* iwork ); -lapack_int LAPACKE_zgesdd_work( int matrix_order, char jobz, lapack_int m, - lapack_int n, lapack_complex_double* a, - lapack_int lda, double* s, - lapack_complex_double* u, lapack_int ldu, - lapack_complex_double* vt, lapack_int ldvt, - lapack_complex_double* work, lapack_int lwork, - double* rwork, lapack_int* iwork ); - -lapack_int LAPACKE_sgesv_work( int matrix_order, lapack_int n, lapack_int nrhs, - float* a, lapack_int lda, lapack_int* ipiv, - float* b, lapack_int ldb ); -lapack_int LAPACKE_dgesv_work( int matrix_order, lapack_int n, lapack_int nrhs, - double* a, lapack_int lda, lapack_int* ipiv, - double* b, lapack_int ldb ); -lapack_int LAPACKE_cgesv_work( int matrix_order, lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zgesv_work( int matrix_order, lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb ); -lapack_int LAPACKE_dsgesv_work( int matrix_order, lapack_int n, lapack_int nrhs, - double* a, lapack_int lda, lapack_int* ipiv, - double* b, lapack_int ldb, double* x, - lapack_int ldx, double* work, float* swork, - lapack_int* iter ); -lapack_int LAPACKE_zcgesv_work( int matrix_order, lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, lapack_complex_double* work, - lapack_complex_float* swork, double* rwork, - lapack_int* iter ); - -lapack_int LAPACKE_sgesvd_work( int matrix_order, char jobu, char jobvt, - lapack_int m, lapack_int n, float* a, - lapack_int lda, float* s, float* u, - lapack_int ldu, float* vt, lapack_int ldvt, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dgesvd_work( int matrix_order, char jobu, char jobvt, - lapack_int m, lapack_int n, double* a, - lapack_int lda, double* s, double* u, - lapack_int ldu, double* vt, lapack_int ldvt, - double* work, lapack_int lwork ); -lapack_int LAPACKE_cgesvd_work( int matrix_order, char jobu, char jobvt, - lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - float* s, lapack_complex_float* u, - lapack_int ldu, lapack_complex_float* vt, - lapack_int ldvt, lapack_complex_float* work, - lapack_int lwork, float* rwork ); -lapack_int LAPACKE_zgesvd_work( int matrix_order, char jobu, char jobvt, - lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - double* s, lapack_complex_double* u, - lapack_int ldu, lapack_complex_double* vt, - lapack_int ldvt, lapack_complex_double* work, - lapack_int lwork, double* rwork ); - -lapack_int LAPACKE_sgesvj_work( int matrix_order, char joba, char jobu, - char jobv, lapack_int m, lapack_int n, float* a, - lapack_int lda, float* sva, lapack_int mv, - float* v, lapack_int ldv, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dgesvj_work( int matrix_order, char joba, char jobu, - char jobv, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* sva, - lapack_int mv, double* v, lapack_int ldv, - double* work, lapack_int lwork ); - -lapack_int LAPACKE_sgesvx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, float* a, - lapack_int lda, float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* r, - float* c, float* b, lapack_int ldb, float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr, float* work, lapack_int* iwork ); -lapack_int LAPACKE_dgesvx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, double* a, - lapack_int lda, double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* r, - double* c, double* b, lapack_int ldb, double* x, - lapack_int ldx, double* rcond, double* ferr, - double* berr, double* work, lapack_int* iwork ); -lapack_int LAPACKE_cgesvx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* r, - float* c, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zgesvx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* r, - double* c, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, double* rcond, double* ferr, - double* berr, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_sgesvxx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, float* a, - lapack_int lda, float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* r, - float* c, float* b, lapack_int ldb, float* x, - lapack_int ldx, float* rcond, float* rpvgrw, - float* berr, lapack_int n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int nparams, float* params, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dgesvxx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, double* a, - lapack_int lda, double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* r, - double* c, double* b, lapack_int ldb, - double* x, lapack_int ldx, double* rcond, - double* rpvgrw, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cgesvxx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* r, - float* c, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* rpvgrw, - float* berr, lapack_int n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int nparams, float* params, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zgesvxx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* r, - double* c, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, double* rcond, double* rpvgrw, - double* berr, lapack_int n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int nparams, double* params, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sgetf2_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, lapack_int* ipiv ); -lapack_int LAPACKE_dgetf2_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, lapack_int* ipiv ); -lapack_int LAPACKE_cgetf2_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* ipiv ); -lapack_int LAPACKE_zgetf2_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* ipiv ); - -lapack_int LAPACKE_sgetrf_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, lapack_int* ipiv ); -lapack_int LAPACKE_dgetrf_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, lapack_int* ipiv ); -lapack_int LAPACKE_cgetrf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* ipiv ); -lapack_int LAPACKE_zgetrf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* ipiv ); - -lapack_int LAPACKE_sgetri_work( int matrix_order, lapack_int n, float* a, - lapack_int lda, const lapack_int* ipiv, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dgetri_work( int matrix_order, lapack_int n, double* a, - lapack_int lda, const lapack_int* ipiv, - double* work, lapack_int lwork ); -lapack_int LAPACKE_cgetri_work( int matrix_order, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zgetri_work( int matrix_order, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_sgetrs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - const lapack_int* ipiv, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dgetrs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const double* a, - lapack_int lda, const lapack_int* ipiv, - double* b, lapack_int ldb ); -lapack_int LAPACKE_cgetrs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zgetrs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_sggbak_work( int matrix_order, char job, char side, - lapack_int n, lapack_int ilo, lapack_int ihi, - const float* lscale, const float* rscale, - lapack_int m, float* v, lapack_int ldv ); -lapack_int LAPACKE_dggbak_work( int matrix_order, char job, char side, - lapack_int n, lapack_int ilo, lapack_int ihi, - const double* lscale, const double* rscale, - lapack_int m, double* v, lapack_int ldv ); -lapack_int LAPACKE_cggbak_work( int matrix_order, char job, char side, - lapack_int n, lapack_int ilo, lapack_int ihi, - const float* lscale, const float* rscale, - lapack_int m, lapack_complex_float* v, - lapack_int ldv ); -lapack_int LAPACKE_zggbak_work( int matrix_order, char job, char side, - lapack_int n, lapack_int ilo, lapack_int ihi, - const double* lscale, const double* rscale, - lapack_int m, lapack_complex_double* v, - lapack_int ldv ); - -lapack_int LAPACKE_sggbal_work( int matrix_order, char job, lapack_int n, - float* a, lapack_int lda, float* b, - lapack_int ldb, lapack_int* ilo, - lapack_int* ihi, float* lscale, float* rscale, - float* work ); -lapack_int LAPACKE_dggbal_work( int matrix_order, char job, lapack_int n, - double* a, lapack_int lda, double* b, - lapack_int ldb, lapack_int* ilo, - lapack_int* ihi, double* lscale, double* rscale, - double* work ); -lapack_int LAPACKE_cggbal_work( int matrix_order, char job, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_int* ilo, lapack_int* ihi, float* lscale, - float* rscale, float* work ); -lapack_int LAPACKE_zggbal_work( int matrix_order, char job, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_int* ilo, lapack_int* ihi, - double* lscale, double* rscale, double* work ); - -lapack_int LAPACKE_sgges_work( int matrix_order, char jobvsl, char jobvsr, - char sort, LAPACK_S_SELECT3 selctg, lapack_int n, - float* a, lapack_int lda, float* b, - lapack_int ldb, lapack_int* sdim, float* alphar, - float* alphai, float* beta, float* vsl, - lapack_int ldvsl, float* vsr, lapack_int ldvsr, - float* work, lapack_int lwork, - lapack_logical* bwork ); -lapack_int LAPACKE_dgges_work( int matrix_order, char jobvsl, char jobvsr, - char sort, LAPACK_D_SELECT3 selctg, lapack_int n, - double* a, lapack_int lda, double* b, - lapack_int ldb, lapack_int* sdim, double* alphar, - double* alphai, double* beta, double* vsl, - lapack_int ldvsl, double* vsr, lapack_int ldvsr, - double* work, lapack_int lwork, - lapack_logical* bwork ); -lapack_int LAPACKE_cgges_work( int matrix_order, char jobvsl, char jobvsr, - char sort, LAPACK_C_SELECT2 selctg, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_int* sdim, lapack_complex_float* alpha, - lapack_complex_float* beta, - lapack_complex_float* vsl, lapack_int ldvsl, - lapack_complex_float* vsr, lapack_int ldvsr, - lapack_complex_float* work, lapack_int lwork, - float* rwork, lapack_logical* bwork ); -lapack_int LAPACKE_zgges_work( int matrix_order, char jobvsl, char jobvsr, - char sort, LAPACK_Z_SELECT2 selctg, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_int* sdim, lapack_complex_double* alpha, - lapack_complex_double* beta, - lapack_complex_double* vsl, lapack_int ldvsl, - lapack_complex_double* vsr, lapack_int ldvsr, - lapack_complex_double* work, lapack_int lwork, - double* rwork, lapack_logical* bwork ); - -lapack_int LAPACKE_sggesx_work( int matrix_order, char jobvsl, char jobvsr, - char sort, LAPACK_S_SELECT3 selctg, char sense, - lapack_int n, float* a, lapack_int lda, - float* b, lapack_int ldb, lapack_int* sdim, - float* alphar, float* alphai, float* beta, - float* vsl, lapack_int ldvsl, float* vsr, - lapack_int ldvsr, float* rconde, float* rcondv, - float* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork, - lapack_logical* bwork ); -lapack_int LAPACKE_dggesx_work( int matrix_order, char jobvsl, char jobvsr, - char sort, LAPACK_D_SELECT3 selctg, char sense, - lapack_int n, double* a, lapack_int lda, - double* b, lapack_int ldb, lapack_int* sdim, - double* alphar, double* alphai, double* beta, - double* vsl, lapack_int ldvsl, double* vsr, - lapack_int ldvsr, double* rconde, - double* rcondv, double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork, - lapack_logical* bwork ); -lapack_int LAPACKE_cggesx_work( int matrix_order, char jobvsl, char jobvsr, - char sort, LAPACK_C_SELECT2 selctg, char sense, - lapack_int n, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, lapack_int* sdim, - lapack_complex_float* alpha, - lapack_complex_float* beta, - lapack_complex_float* vsl, lapack_int ldvsl, - lapack_complex_float* vsr, lapack_int ldvsr, - float* rconde, float* rcondv, - lapack_complex_float* work, lapack_int lwork, - float* rwork, lapack_int* iwork, - lapack_int liwork, lapack_logical* bwork ); -lapack_int LAPACKE_zggesx_work( int matrix_order, char jobvsl, char jobvsr, - char sort, LAPACK_Z_SELECT2 selctg, char sense, - lapack_int n, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, lapack_int* sdim, - lapack_complex_double* alpha, - lapack_complex_double* beta, - lapack_complex_double* vsl, lapack_int ldvsl, - lapack_complex_double* vsr, lapack_int ldvsr, - double* rconde, double* rcondv, - lapack_complex_double* work, lapack_int lwork, - double* rwork, lapack_int* iwork, - lapack_int liwork, lapack_logical* bwork ); - -lapack_int LAPACKE_sggev_work( int matrix_order, char jobvl, char jobvr, - lapack_int n, float* a, lapack_int lda, float* b, - lapack_int ldb, float* alphar, float* alphai, - float* beta, float* vl, lapack_int ldvl, - float* vr, lapack_int ldvr, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dggev_work( int matrix_order, char jobvl, char jobvr, - lapack_int n, double* a, lapack_int lda, - double* b, lapack_int ldb, double* alphar, - double* alphai, double* beta, double* vl, - lapack_int ldvl, double* vr, lapack_int ldvr, - double* work, lapack_int lwork ); -lapack_int LAPACKE_cggev_work( int matrix_order, char jobvl, char jobvr, - lapack_int n, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* alpha, - lapack_complex_float* beta, - lapack_complex_float* vl, lapack_int ldvl, - lapack_complex_float* vr, lapack_int ldvr, - lapack_complex_float* work, lapack_int lwork, - float* rwork ); -lapack_int LAPACKE_zggev_work( int matrix_order, char jobvl, char jobvr, - lapack_int n, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* alpha, - lapack_complex_double* beta, - lapack_complex_double* vl, lapack_int ldvl, - lapack_complex_double* vr, lapack_int ldvr, - lapack_complex_double* work, lapack_int lwork, - double* rwork ); - -lapack_int LAPACKE_sggevx_work( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, float* a, - lapack_int lda, float* b, lapack_int ldb, - float* alphar, float* alphai, float* beta, - float* vl, lapack_int ldvl, float* vr, - lapack_int ldvr, lapack_int* ilo, - lapack_int* ihi, float* lscale, float* rscale, - float* abnrm, float* bbnrm, float* rconde, - float* rcondv, float* work, lapack_int lwork, - lapack_int* iwork, lapack_logical* bwork ); -lapack_int LAPACKE_dggevx_work( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, double* a, - lapack_int lda, double* b, lapack_int ldb, - double* alphar, double* alphai, double* beta, - double* vl, lapack_int ldvl, double* vr, - lapack_int ldvr, lapack_int* ilo, - lapack_int* ihi, double* lscale, double* rscale, - double* abnrm, double* bbnrm, double* rconde, - double* rcondv, double* work, lapack_int lwork, - lapack_int* iwork, lapack_logical* bwork ); -lapack_int LAPACKE_cggevx_work( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* alpha, - lapack_complex_float* beta, - lapack_complex_float* vl, lapack_int ldvl, - lapack_complex_float* vr, lapack_int ldvr, - lapack_int* ilo, lapack_int* ihi, float* lscale, - float* rscale, float* abnrm, float* bbnrm, - float* rconde, float* rcondv, - lapack_complex_float* work, lapack_int lwork, - float* rwork, lapack_int* iwork, - lapack_logical* bwork ); -lapack_int LAPACKE_zggevx_work( int matrix_order, char balanc, char jobvl, - char jobvr, char sense, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* alpha, - lapack_complex_double* beta, - lapack_complex_double* vl, lapack_int ldvl, - lapack_complex_double* vr, lapack_int ldvr, - lapack_int* ilo, lapack_int* ihi, - double* lscale, double* rscale, double* abnrm, - double* bbnrm, double* rconde, double* rcondv, - lapack_complex_double* work, lapack_int lwork, - double* rwork, lapack_int* iwork, - lapack_logical* bwork ); - -lapack_int LAPACKE_sggglm_work( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, float* a, lapack_int lda, - float* b, lapack_int ldb, float* d, float* x, - float* y, float* work, lapack_int lwork ); -lapack_int LAPACKE_dggglm_work( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, double* a, lapack_int lda, - double* b, lapack_int ldb, double* d, double* x, - double* y, double* work, lapack_int lwork ); -lapack_int LAPACKE_cggglm_work( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* d, - lapack_complex_float* x, - lapack_complex_float* y, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zggglm_work( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* d, - lapack_complex_double* x, - lapack_complex_double* y, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_sgghrd_work( int matrix_order, char compq, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - float* a, lapack_int lda, float* b, - lapack_int ldb, float* q, lapack_int ldq, - float* z, lapack_int ldz ); -lapack_int LAPACKE_dgghrd_work( int matrix_order, char compq, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - double* a, lapack_int lda, double* b, - lapack_int ldb, double* q, lapack_int ldq, - double* z, lapack_int ldz ); -lapack_int LAPACKE_cgghrd_work( int matrix_order, char compq, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* q, lapack_int ldq, - lapack_complex_float* z, lapack_int ldz ); -lapack_int LAPACKE_zgghrd_work( int matrix_order, char compq, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* z, lapack_int ldz ); - -lapack_int LAPACKE_sgglse_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int p, float* a, lapack_int lda, - float* b, lapack_int ldb, float* c, float* d, - float* x, float* work, lapack_int lwork ); -lapack_int LAPACKE_dgglse_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int p, double* a, lapack_int lda, - double* b, lapack_int ldb, double* c, double* d, - double* x, double* work, lapack_int lwork ); -lapack_int LAPACKE_cgglse_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int p, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* c, - lapack_complex_float* d, - lapack_complex_float* x, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zgglse_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int p, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* c, - lapack_complex_double* d, - lapack_complex_double* x, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_sggqrf_work( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, float* a, lapack_int lda, - float* taua, float* b, lapack_int ldb, - float* taub, float* work, lapack_int lwork ); -lapack_int LAPACKE_dggqrf_work( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, double* a, lapack_int lda, - double* taua, double* b, lapack_int ldb, - double* taub, double* work, lapack_int lwork ); -lapack_int LAPACKE_cggqrf_work( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* taua, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* taub, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zggqrf_work( int matrix_order, lapack_int n, lapack_int m, - lapack_int p, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* taua, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* taub, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_sggrqf_work( int matrix_order, lapack_int m, lapack_int p, - lapack_int n, float* a, lapack_int lda, - float* taua, float* b, lapack_int ldb, - float* taub, float* work, lapack_int lwork ); -lapack_int LAPACKE_dggrqf_work( int matrix_order, lapack_int m, lapack_int p, - lapack_int n, double* a, lapack_int lda, - double* taua, double* b, lapack_int ldb, - double* taub, double* work, lapack_int lwork ); -lapack_int LAPACKE_cggrqf_work( int matrix_order, lapack_int m, lapack_int p, - lapack_int n, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* taua, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* taub, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zggrqf_work( int matrix_order, lapack_int m, lapack_int p, - lapack_int n, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* taua, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* taub, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_sggsvd_work( int matrix_order, char jobu, char jobv, - char jobq, lapack_int m, lapack_int n, - lapack_int p, lapack_int* k, lapack_int* l, - float* a, lapack_int lda, float* b, - lapack_int ldb, float* alpha, float* beta, - float* u, lapack_int ldu, float* v, - lapack_int ldv, float* q, lapack_int ldq, - float* work, lapack_int* iwork ); -lapack_int LAPACKE_dggsvd_work( int matrix_order, char jobu, char jobv, - char jobq, lapack_int m, lapack_int n, - lapack_int p, lapack_int* k, lapack_int* l, - double* a, lapack_int lda, double* b, - lapack_int ldb, double* alpha, double* beta, - double* u, lapack_int ldu, double* v, - lapack_int ldv, double* q, lapack_int ldq, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_cggsvd_work( int matrix_order, char jobu, char jobv, - char jobq, lapack_int m, lapack_int n, - lapack_int p, lapack_int* k, lapack_int* l, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - float* alpha, float* beta, - lapack_complex_float* u, lapack_int ldu, - lapack_complex_float* v, lapack_int ldv, - lapack_complex_float* q, lapack_int ldq, - lapack_complex_float* work, float* rwork, - lapack_int* iwork ); -lapack_int LAPACKE_zggsvd_work( int matrix_order, char jobu, char jobv, - char jobq, lapack_int m, lapack_int n, - lapack_int p, lapack_int* k, lapack_int* l, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - double* alpha, double* beta, - lapack_complex_double* u, lapack_int ldu, - lapack_complex_double* v, lapack_int ldv, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* work, double* rwork, - lapack_int* iwork ); - -lapack_int LAPACKE_sggsvp_work( int matrix_order, char jobu, char jobv, - char jobq, lapack_int m, lapack_int p, - lapack_int n, float* a, lapack_int lda, - float* b, lapack_int ldb, float tola, - float tolb, lapack_int* k, lapack_int* l, - float* u, lapack_int ldu, float* v, - lapack_int ldv, float* q, lapack_int ldq, - lapack_int* iwork, float* tau, float* work ); -lapack_int LAPACKE_dggsvp_work( int matrix_order, char jobu, char jobv, - char jobq, lapack_int m, lapack_int p, - lapack_int n, double* a, lapack_int lda, - double* b, lapack_int ldb, double tola, - double tolb, lapack_int* k, lapack_int* l, - double* u, lapack_int ldu, double* v, - lapack_int ldv, double* q, lapack_int ldq, - lapack_int* iwork, double* tau, double* work ); -lapack_int LAPACKE_cggsvp_work( int matrix_order, char jobu, char jobv, - char jobq, lapack_int m, lapack_int p, - lapack_int n, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, float tola, float tolb, - lapack_int* k, lapack_int* l, - lapack_complex_float* u, lapack_int ldu, - lapack_complex_float* v, lapack_int ldv, - lapack_complex_float* q, lapack_int ldq, - lapack_int* iwork, float* rwork, - lapack_complex_float* tau, - lapack_complex_float* work ); -lapack_int LAPACKE_zggsvp_work( int matrix_order, char jobu, char jobv, - char jobq, lapack_int m, lapack_int p, - lapack_int n, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, double tola, double tolb, - lapack_int* k, lapack_int* l, - lapack_complex_double* u, lapack_int ldu, - lapack_complex_double* v, lapack_int ldv, - lapack_complex_double* q, lapack_int ldq, - lapack_int* iwork, double* rwork, - lapack_complex_double* tau, - lapack_complex_double* work ); - -lapack_int LAPACKE_sgtcon_work( char norm, lapack_int n, const float* dl, - const float* d, const float* du, - const float* du2, const lapack_int* ipiv, - float anorm, float* rcond, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dgtcon_work( char norm, lapack_int n, const double* dl, - const double* d, const double* du, - const double* du2, const lapack_int* ipiv, - double anorm, double* rcond, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cgtcon_work( char norm, lapack_int n, - const lapack_complex_float* dl, - const lapack_complex_float* d, - const lapack_complex_float* du, - const lapack_complex_float* du2, - const lapack_int* ipiv, float anorm, - float* rcond, lapack_complex_float* work ); -lapack_int LAPACKE_zgtcon_work( char norm, lapack_int n, - const lapack_complex_double* dl, - const lapack_complex_double* d, - const lapack_complex_double* du, - const lapack_complex_double* du2, - const lapack_int* ipiv, double anorm, - double* rcond, lapack_complex_double* work ); - -lapack_int LAPACKE_sgtrfs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const float* dl, - const float* d, const float* du, - const float* dlf, const float* df, - const float* duf, const float* du2, - const lapack_int* ipiv, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* ferr, float* berr, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dgtrfs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const double* dl, - const double* d, const double* du, - const double* dlf, const double* df, - const double* duf, const double* du2, - const lapack_int* ipiv, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* ferr, double* berr, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cgtrfs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_float* dl, - const lapack_complex_float* d, - const lapack_complex_float* du, - const lapack_complex_float* dlf, - const lapack_complex_float* df, - const lapack_complex_float* duf, - const lapack_complex_float* du2, - const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zgtrfs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, - const lapack_complex_double* dl, - const lapack_complex_double* d, - const lapack_complex_double* du, - const lapack_complex_double* dlf, - const lapack_complex_double* df, - const lapack_complex_double* duf, - const lapack_complex_double* du2, - const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sgtsv_work( int matrix_order, lapack_int n, lapack_int nrhs, - float* dl, float* d, float* du, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dgtsv_work( int matrix_order, lapack_int n, lapack_int nrhs, - double* dl, double* d, double* du, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cgtsv_work( int matrix_order, lapack_int n, lapack_int nrhs, - lapack_complex_float* dl, - lapack_complex_float* d, - lapack_complex_float* du, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zgtsv_work( int matrix_order, lapack_int n, lapack_int nrhs, - lapack_complex_double* dl, - lapack_complex_double* d, - lapack_complex_double* du, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_sgtsvx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, const float* dl, - const float* d, const float* du, float* dlf, - float* df, float* duf, float* du2, - lapack_int* ipiv, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - float* work, lapack_int* iwork ); -lapack_int LAPACKE_dgtsvx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, const double* dl, - const double* d, const double* du, double* dlf, - double* df, double* duf, double* du2, - lapack_int* ipiv, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_cgtsvx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* dl, - const lapack_complex_float* d, - const lapack_complex_float* du, - lapack_complex_float* dlf, - lapack_complex_float* df, - lapack_complex_float* duf, - lapack_complex_float* du2, lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zgtsvx_work( int matrix_order, char fact, char trans, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* dl, - const lapack_complex_double* d, - const lapack_complex_double* du, - lapack_complex_double* dlf, - lapack_complex_double* df, - lapack_complex_double* duf, - lapack_complex_double* du2, lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sgttrf_work( lapack_int n, float* dl, float* d, float* du, - float* du2, lapack_int* ipiv ); -lapack_int LAPACKE_dgttrf_work( lapack_int n, double* dl, double* d, double* du, - double* du2, lapack_int* ipiv ); -lapack_int LAPACKE_cgttrf_work( lapack_int n, lapack_complex_float* dl, - lapack_complex_float* d, - lapack_complex_float* du, - lapack_complex_float* du2, lapack_int* ipiv ); -lapack_int LAPACKE_zgttrf_work( lapack_int n, lapack_complex_double* dl, - lapack_complex_double* d, - lapack_complex_double* du, - lapack_complex_double* du2, lapack_int* ipiv ); - -lapack_int LAPACKE_sgttrs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const float* dl, - const float* d, const float* du, - const float* du2, const lapack_int* ipiv, - float* b, lapack_int ldb ); -lapack_int LAPACKE_dgttrs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const double* dl, - const double* d, const double* du, - const double* du2, const lapack_int* ipiv, - double* b, lapack_int ldb ); -lapack_int LAPACKE_cgttrs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, const lapack_complex_float* dl, - const lapack_complex_float* d, - const lapack_complex_float* du, - const lapack_complex_float* du2, - const lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zgttrs_work( int matrix_order, char trans, lapack_int n, - lapack_int nrhs, - const lapack_complex_double* dl, - const lapack_complex_double* d, - const lapack_complex_double* du, - const lapack_complex_double* du2, - const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_chbev_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int kd, - lapack_complex_float* ab, lapack_int ldab, - float* w, lapack_complex_float* z, - lapack_int ldz, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zhbev_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int kd, - lapack_complex_double* ab, lapack_int ldab, - double* w, lapack_complex_double* z, - lapack_int ldz, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_chbevd_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int kd, - lapack_complex_float* ab, lapack_int ldab, - float* w, lapack_complex_float* z, - lapack_int ldz, lapack_complex_float* work, - lapack_int lwork, float* rwork, - lapack_int lrwork, lapack_int* iwork, - lapack_int liwork ); -lapack_int LAPACKE_zhbevd_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int kd, - lapack_complex_double* ab, lapack_int ldab, - double* w, lapack_complex_double* z, - lapack_int ldz, lapack_complex_double* work, - lapack_int lwork, double* rwork, - lapack_int lrwork, lapack_int* iwork, - lapack_int liwork ); - -lapack_int LAPACKE_chbevx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, lapack_int kd, - lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* q, lapack_int ldq, - float vl, float vu, lapack_int il, - lapack_int iu, float abstol, lapack_int* m, - float* w, lapack_complex_float* z, - lapack_int ldz, lapack_complex_float* work, - float* rwork, lapack_int* iwork, - lapack_int* ifail ); -lapack_int LAPACKE_zhbevx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, lapack_int kd, - lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* q, lapack_int ldq, - double vl, double vu, lapack_int il, - lapack_int iu, double abstol, lapack_int* m, - double* w, lapack_complex_double* z, - lapack_int ldz, lapack_complex_double* work, - double* rwork, lapack_int* iwork, - lapack_int* ifail ); - -lapack_int LAPACKE_chbgst_work( int matrix_order, char vect, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - lapack_complex_float* ab, lapack_int ldab, - const lapack_complex_float* bb, lapack_int ldbb, - lapack_complex_float* x, lapack_int ldx, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zhbgst_work( int matrix_order, char vect, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - lapack_complex_double* ab, lapack_int ldab, - const lapack_complex_double* bb, - lapack_int ldbb, lapack_complex_double* x, - lapack_int ldx, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_chbgv_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* bb, lapack_int ldbb, - float* w, lapack_complex_float* z, - lapack_int ldz, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zhbgv_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* bb, lapack_int ldbb, - double* w, lapack_complex_double* z, - lapack_int ldz, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_chbgvd_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* bb, lapack_int ldbb, - float* w, lapack_complex_float* z, - lapack_int ldz, lapack_complex_float* work, - lapack_int lwork, float* rwork, - lapack_int lrwork, lapack_int* iwork, - lapack_int liwork ); -lapack_int LAPACKE_zhbgvd_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* bb, lapack_int ldbb, - double* w, lapack_complex_double* z, - lapack_int ldz, lapack_complex_double* work, - lapack_int lwork, double* rwork, - lapack_int lrwork, lapack_int* iwork, - lapack_int liwork ); - -lapack_int LAPACKE_chbgvx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, lapack_int ka, - lapack_int kb, lapack_complex_float* ab, - lapack_int ldab, lapack_complex_float* bb, - lapack_int ldbb, lapack_complex_float* q, - lapack_int ldq, float vl, float vu, - lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, - lapack_complex_float* z, lapack_int ldz, - lapack_complex_float* work, float* rwork, - lapack_int* iwork, lapack_int* ifail ); -lapack_int LAPACKE_zhbgvx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, lapack_int ka, - lapack_int kb, lapack_complex_double* ab, - lapack_int ldab, lapack_complex_double* bb, - lapack_int ldbb, lapack_complex_double* q, - lapack_int ldq, double vl, double vu, - lapack_int il, lapack_int iu, double abstol, - lapack_int* m, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_complex_double* work, double* rwork, - lapack_int* iwork, lapack_int* ifail ); - -lapack_int LAPACKE_chbtrd_work( int matrix_order, char vect, char uplo, - lapack_int n, lapack_int kd, - lapack_complex_float* ab, lapack_int ldab, - float* d, float* e, lapack_complex_float* q, - lapack_int ldq, lapack_complex_float* work ); -lapack_int LAPACKE_zhbtrd_work( int matrix_order, char vect, char uplo, - lapack_int n, lapack_int kd, - lapack_complex_double* ab, lapack_int ldab, - double* d, double* e, lapack_complex_double* q, - lapack_int ldq, lapack_complex_double* work ); - -lapack_int LAPACKE_checon_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, float anorm, - float* rcond, lapack_complex_float* work ); -lapack_int LAPACKE_zhecon_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, double anorm, - double* rcond, lapack_complex_double* work ); - -lapack_int LAPACKE_cheequb_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* s, float* scond, float* amax, - lapack_complex_float* work ); -lapack_int LAPACKE_zheequb_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* s, double* scond, double* amax, - lapack_complex_double* work ); - -lapack_int LAPACKE_cheev_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_complex_float* a, - lapack_int lda, float* w, - lapack_complex_float* work, lapack_int lwork, - float* rwork ); -lapack_int LAPACKE_zheev_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_complex_double* a, - lapack_int lda, double* w, - lapack_complex_double* work, lapack_int lwork, - double* rwork ); - -lapack_int LAPACKE_cheevd_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_complex_float* a, - lapack_int lda, float* w, - lapack_complex_float* work, lapack_int lwork, - float* rwork, lapack_int lrwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_zheevd_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_complex_double* a, - lapack_int lda, double* w, - lapack_complex_double* work, lapack_int lwork, - double* rwork, lapack_int lrwork, - lapack_int* iwork, lapack_int liwork ); - -lapack_int LAPACKE_cheevr_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - float vl, float vu, lapack_int il, - lapack_int iu, float abstol, lapack_int* m, - float* w, lapack_complex_float* z, - lapack_int ldz, lapack_int* isuppz, - lapack_complex_float* work, lapack_int lwork, - float* rwork, lapack_int lrwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_zheevr_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - double vl, double vu, lapack_int il, - lapack_int iu, double abstol, lapack_int* m, - double* w, lapack_complex_double* z, - lapack_int ldz, lapack_int* isuppz, - lapack_complex_double* work, lapack_int lwork, - double* rwork, lapack_int lrwork, - lapack_int* iwork, lapack_int liwork ); - -lapack_int LAPACKE_cheevx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - float vl, float vu, lapack_int il, - lapack_int iu, float abstol, lapack_int* m, - float* w, lapack_complex_float* z, - lapack_int ldz, lapack_complex_float* work, - lapack_int lwork, float* rwork, - lapack_int* iwork, lapack_int* ifail ); -lapack_int LAPACKE_zheevx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - double vl, double vu, lapack_int il, - lapack_int iu, double abstol, lapack_int* m, - double* w, lapack_complex_double* z, - lapack_int ldz, lapack_complex_double* work, - lapack_int lwork, double* rwork, - lapack_int* iwork, lapack_int* ifail ); - -lapack_int LAPACKE_chegst_work( int matrix_order, lapack_int itype, char uplo, - lapack_int n, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zhegst_work( int matrix_order, lapack_int itype, char uplo, - lapack_int n, lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_chegv_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb, float* w, - lapack_complex_float* work, lapack_int lwork, - float* rwork ); -lapack_int LAPACKE_zhegv_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - double* w, lapack_complex_double* work, - lapack_int lwork, double* rwork ); - -lapack_int LAPACKE_chegvd_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - float* w, lapack_complex_float* work, - lapack_int lwork, float* rwork, - lapack_int lrwork, lapack_int* iwork, - lapack_int liwork ); -lapack_int LAPACKE_zhegvd_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - double* w, lapack_complex_double* work, - lapack_int lwork, double* rwork, - lapack_int lrwork, lapack_int* iwork, - lapack_int liwork ); - -lapack_int LAPACKE_chegvx_work( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - float vl, float vu, lapack_int il, - lapack_int iu, float abstol, lapack_int* m, - float* w, lapack_complex_float* z, - lapack_int ldz, lapack_complex_float* work, - lapack_int lwork, float* rwork, - lapack_int* iwork, lapack_int* ifail ); -lapack_int LAPACKE_zhegvx_work( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - double vl, double vu, lapack_int il, - lapack_int iu, double abstol, lapack_int* m, - double* w, lapack_complex_double* z, - lapack_int ldz, lapack_complex_double* work, - lapack_int lwork, double* rwork, - lapack_int* iwork, lapack_int* ifail ); - -lapack_int LAPACKE_cherfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* af, - lapack_int ldaf, const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zherfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* af, - lapack_int ldaf, const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_cherfsx_work( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* af, - lapack_int ldaf, const lapack_int* ipiv, - const float* s, const lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zherfsx_work( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* af, - lapack_int ldaf, const lapack_int* ipiv, - const double* s, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_chesv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zhesv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_chesvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - lapack_int* ipiv, const lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr, lapack_complex_float* work, - lapack_int lwork, float* rwork ); -lapack_int LAPACKE_zhesvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, lapack_int lwork, - double* rwork ); - -lapack_int LAPACKE_chesvxx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* s, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zhesvxx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* s, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* rpvgrw, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_chetrd_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - float* d, float* e, lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zhetrd_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - double* d, double* e, - lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_chetrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* ipiv, lapack_complex_float* work, - lapack_int lwork ); -lapack_int LAPACKE_zhetrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* ipiv, lapack_complex_double* work, - lapack_int lwork ); - -lapack_int LAPACKE_chetri_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_float* work ); -lapack_int LAPACKE_zhetri_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_double* work ); - -lapack_int LAPACKE_chetrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zhetrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_chfrk_work( int matrix_order, char transr, char uplo, - char trans, lapack_int n, lapack_int k, - float alpha, const lapack_complex_float* a, - lapack_int lda, float beta, - lapack_complex_float* c ); -lapack_int LAPACKE_zhfrk_work( int matrix_order, char transr, char uplo, - char trans, lapack_int n, lapack_int k, - double alpha, const lapack_complex_double* a, - lapack_int lda, double beta, - lapack_complex_double* c ); - -lapack_int LAPACKE_shgeqz_work( int matrix_order, char job, char compq, - char compz, lapack_int n, lapack_int ilo, - lapack_int ihi, float* h, lapack_int ldh, - float* t, lapack_int ldt, float* alphar, - float* alphai, float* beta, float* q, - lapack_int ldq, float* z, lapack_int ldz, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dhgeqz_work( int matrix_order, char job, char compq, - char compz, lapack_int n, lapack_int ilo, - lapack_int ihi, double* h, lapack_int ldh, - double* t, lapack_int ldt, double* alphar, - double* alphai, double* beta, double* q, - lapack_int ldq, double* z, lapack_int ldz, - double* work, lapack_int lwork ); -lapack_int LAPACKE_chgeqz_work( int matrix_order, char job, char compq, - char compz, lapack_int n, lapack_int ilo, - lapack_int ihi, lapack_complex_float* h, - lapack_int ldh, lapack_complex_float* t, - lapack_int ldt, lapack_complex_float* alpha, - lapack_complex_float* beta, - lapack_complex_float* q, lapack_int ldq, - lapack_complex_float* z, lapack_int ldz, - lapack_complex_float* work, lapack_int lwork, - float* rwork ); -lapack_int LAPACKE_zhgeqz_work( int matrix_order, char job, char compq, - char compz, lapack_int n, lapack_int ilo, - lapack_int ihi, lapack_complex_double* h, - lapack_int ldh, lapack_complex_double* t, - lapack_int ldt, lapack_complex_double* alpha, - lapack_complex_double* beta, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* z, lapack_int ldz, - lapack_complex_double* work, lapack_int lwork, - double* rwork ); - -lapack_int LAPACKE_chpcon_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* ap, - const lapack_int* ipiv, float anorm, - float* rcond, lapack_complex_float* work ); -lapack_int LAPACKE_zhpcon_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* ap, - const lapack_int* ipiv, double anorm, - double* rcond, lapack_complex_double* work ); - -lapack_int LAPACKE_chpev_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_complex_float* ap, float* w, - lapack_complex_float* z, lapack_int ldz, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zhpev_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_complex_double* ap, - double* w, lapack_complex_double* z, - lapack_int ldz, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_chpevd_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_complex_float* ap, - float* w, lapack_complex_float* z, - lapack_int ldz, lapack_complex_float* work, - lapack_int lwork, float* rwork, - lapack_int lrwork, lapack_int* iwork, - lapack_int liwork ); -lapack_int LAPACKE_zhpevd_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_complex_double* ap, - double* w, lapack_complex_double* z, - lapack_int ldz, lapack_complex_double* work, - lapack_int lwork, double* rwork, - lapack_int lrwork, lapack_int* iwork, - lapack_int liwork ); - -lapack_int LAPACKE_chpevx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, - lapack_complex_float* ap, float vl, float vu, - lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, - lapack_complex_float* z, lapack_int ldz, - lapack_complex_float* work, float* rwork, - lapack_int* iwork, lapack_int* ifail ); -lapack_int LAPACKE_zhpevx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, - lapack_complex_double* ap, double vl, double vu, - lapack_int il, lapack_int iu, double abstol, - lapack_int* m, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_complex_double* work, double* rwork, - lapack_int* iwork, lapack_int* ifail ); - -lapack_int LAPACKE_chpgst_work( int matrix_order, lapack_int itype, char uplo, - lapack_int n, lapack_complex_float* ap, - const lapack_complex_float* bp ); -lapack_int LAPACKE_zhpgst_work( int matrix_order, lapack_int itype, char uplo, - lapack_int n, lapack_complex_double* ap, - const lapack_complex_double* bp ); - -lapack_int LAPACKE_chpgv_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, - lapack_complex_float* ap, - lapack_complex_float* bp, float* w, - lapack_complex_float* z, lapack_int ldz, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zhpgv_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, - lapack_complex_double* ap, - lapack_complex_double* bp, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_chpgvd_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, - lapack_complex_float* ap, - lapack_complex_float* bp, float* w, - lapack_complex_float* z, lapack_int ldz, - lapack_complex_float* work, lapack_int lwork, - float* rwork, lapack_int lrwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_zhpgvd_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, - lapack_complex_double* ap, - lapack_complex_double* bp, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_complex_double* work, lapack_int lwork, - double* rwork, lapack_int lrwork, - lapack_int* iwork, lapack_int liwork ); - -lapack_int LAPACKE_chpgvx_work( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, - lapack_complex_float* ap, - lapack_complex_float* bp, float vl, float vu, - lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, - lapack_complex_float* z, lapack_int ldz, - lapack_complex_float* work, float* rwork, - lapack_int* iwork, lapack_int* ifail ); -lapack_int LAPACKE_zhpgvx_work( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, - lapack_complex_double* ap, - lapack_complex_double* bp, double vl, double vu, - lapack_int il, lapack_int iu, double abstol, - lapack_int* m, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_complex_double* work, double* rwork, - lapack_int* iwork, lapack_int* ifail ); - -lapack_int LAPACKE_chprfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - const lapack_complex_float* afp, - const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zhprfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, - const lapack_complex_double* ap, - const lapack_complex_double* afp, - const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_chpsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* ap, - lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zhpsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* ap, - lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_chpsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* ap, - lapack_complex_float* afp, lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zhpsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* ap, - lapack_complex_double* afp, lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_chptrd_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap, float* d, float* e, - lapack_complex_float* tau ); -lapack_int LAPACKE_zhptrd_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap, double* d, double* e, - lapack_complex_double* tau ); - -lapack_int LAPACKE_chptrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap, lapack_int* ipiv ); -lapack_int LAPACKE_zhptrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap, lapack_int* ipiv ); - -lapack_int LAPACKE_chptri_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap, - const lapack_int* ipiv, - lapack_complex_float* work ); -lapack_int LAPACKE_zhptri_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap, - const lapack_int* ipiv, - lapack_complex_double* work ); - -lapack_int LAPACKE_chptrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - const lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zhptrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, - const lapack_complex_double* ap, - const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_shsein_work( int matrix_order, char job, char eigsrc, - char initv, lapack_logical* select, - lapack_int n, const float* h, lapack_int ldh, - float* wr, const float* wi, float* vl, - lapack_int ldvl, float* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m, float* work, - lapack_int* ifaill, lapack_int* ifailr ); -lapack_int LAPACKE_dhsein_work( int matrix_order, char job, char eigsrc, - char initv, lapack_logical* select, - lapack_int n, const double* h, lapack_int ldh, - double* wr, const double* wi, double* vl, - lapack_int ldvl, double* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m, double* work, - lapack_int* ifaill, lapack_int* ifailr ); -lapack_int LAPACKE_chsein_work( int matrix_order, char job, char eigsrc, - char initv, const lapack_logical* select, - lapack_int n, const lapack_complex_float* h, - lapack_int ldh, lapack_complex_float* w, - lapack_complex_float* vl, lapack_int ldvl, - lapack_complex_float* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m, - lapack_complex_float* work, float* rwork, - lapack_int* ifaill, lapack_int* ifailr ); -lapack_int LAPACKE_zhsein_work( int matrix_order, char job, char eigsrc, - char initv, const lapack_logical* select, - lapack_int n, const lapack_complex_double* h, - lapack_int ldh, lapack_complex_double* w, - lapack_complex_double* vl, lapack_int ldvl, - lapack_complex_double* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m, - lapack_complex_double* work, double* rwork, - lapack_int* ifaill, lapack_int* ifailr ); - -lapack_int LAPACKE_shseqr_work( int matrix_order, char job, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - float* h, lapack_int ldh, float* wr, float* wi, - float* z, lapack_int ldz, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dhseqr_work( int matrix_order, char job, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - double* h, lapack_int ldh, double* wr, - double* wi, double* z, lapack_int ldz, - double* work, lapack_int lwork ); -lapack_int LAPACKE_chseqr_work( int matrix_order, char job, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - lapack_complex_float* h, lapack_int ldh, - lapack_complex_float* w, - lapack_complex_float* z, lapack_int ldz, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zhseqr_work( int matrix_order, char job, char compz, - lapack_int n, lapack_int ilo, lapack_int ihi, - lapack_complex_double* h, lapack_int ldh, - lapack_complex_double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_clacgv_work( lapack_int n, lapack_complex_float* x, - lapack_int incx ); -lapack_int LAPACKE_zlacgv_work( lapack_int n, lapack_complex_double* x, - lapack_int incx ); - -lapack_int LAPACKE_slacpy_work( int matrix_order, char uplo, lapack_int m, - lapack_int n, const float* a, lapack_int lda, - float* b, lapack_int ldb ); -lapack_int LAPACKE_dlacpy_work( int matrix_order, char uplo, lapack_int m, - lapack_int n, const double* a, lapack_int lda, - double* b, lapack_int ldb ); -lapack_int LAPACKE_clacpy_work( int matrix_order, char uplo, lapack_int m, - lapack_int n, const lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zlacpy_work( int matrix_order, char uplo, lapack_int m, - lapack_int n, const lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_zlag2c_work( int matrix_order, lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - lapack_complex_float* sa, lapack_int ldsa ); - -lapack_int LAPACKE_slag2d_work( int matrix_order, lapack_int m, lapack_int n, - const float* sa, lapack_int ldsa, double* a, - lapack_int lda ); - -lapack_int LAPACKE_dlag2s_work( int matrix_order, lapack_int m, lapack_int n, - const double* a, lapack_int lda, float* sa, - lapack_int ldsa ); - -lapack_int LAPACKE_clag2z_work( int matrix_order, lapack_int m, lapack_int n, - const lapack_complex_float* sa, lapack_int ldsa, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_slagge_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const float* d, - float* a, lapack_int lda, lapack_int* iseed, - float* work ); -lapack_int LAPACKE_dlagge_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const double* d, - double* a, lapack_int lda, lapack_int* iseed, - double* work ); -lapack_int LAPACKE_clagge_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const float* d, - lapack_complex_float* a, lapack_int lda, - lapack_int* iseed, lapack_complex_float* work ); -lapack_int LAPACKE_zlagge_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int kl, lapack_int ku, const double* d, - lapack_complex_double* a, lapack_int lda, - lapack_int* iseed, - lapack_complex_double* work ); - -lapack_int LAPACKE_claghe_work( int matrix_order, lapack_int n, lapack_int k, - const float* d, lapack_complex_float* a, - lapack_int lda, lapack_int* iseed, - lapack_complex_float* work ); -lapack_int LAPACKE_zlaghe_work( int matrix_order, lapack_int n, lapack_int k, - const double* d, lapack_complex_double* a, - lapack_int lda, lapack_int* iseed, - lapack_complex_double* work ); - -lapack_int LAPACKE_slagsy_work( int matrix_order, lapack_int n, lapack_int k, - const float* d, float* a, lapack_int lda, - lapack_int* iseed, float* work ); -lapack_int LAPACKE_dlagsy_work( int matrix_order, lapack_int n, lapack_int k, - const double* d, double* a, lapack_int lda, - lapack_int* iseed, double* work ); -lapack_int LAPACKE_clagsy_work( int matrix_order, lapack_int n, lapack_int k, - const float* d, lapack_complex_float* a, - lapack_int lda, lapack_int* iseed, - lapack_complex_float* work ); -lapack_int LAPACKE_zlagsy_work( int matrix_order, lapack_int n, lapack_int k, - const double* d, lapack_complex_double* a, - lapack_int lda, lapack_int* iseed, - lapack_complex_double* work ); - -lapack_int LAPACKE_slapmr_work( int matrix_order, lapack_logical forwrd, - lapack_int m, lapack_int n, float* x, - lapack_int ldx, lapack_int* k ); -lapack_int LAPACKE_dlapmr_work( int matrix_order, lapack_logical forwrd, - lapack_int m, lapack_int n, double* x, - lapack_int ldx, lapack_int* k ); -lapack_int LAPACKE_clapmr_work( int matrix_order, lapack_logical forwrd, - lapack_int m, lapack_int n, - lapack_complex_float* x, lapack_int ldx, - lapack_int* k ); -lapack_int LAPACKE_zlapmr_work( int matrix_order, lapack_logical forwrd, - lapack_int m, lapack_int n, - lapack_complex_double* x, lapack_int ldx, - lapack_int* k ); - -lapack_int LAPACKE_slartgp_work( float f, float g, float* cs, float* sn, - float* r ); -lapack_int LAPACKE_dlartgp_work( double f, double g, double* cs, double* sn, - double* r ); - -lapack_int LAPACKE_slartgs_work( float x, float y, float sigma, float* cs, - float* sn ); -lapack_int LAPACKE_dlartgs_work( double x, double y, double sigma, double* cs, - double* sn ); - -float LAPACKE_slapy2_work( float x, float y ); -double LAPACKE_dlapy2_work( double x, double y ); - -float LAPACKE_slapy3_work( float x, float y, float z ); -double LAPACKE_dlapy3_work( double x, double y, double z ); - -float LAPACKE_slamch_work( char cmach ); -double LAPACKE_dlamch_work( char cmach ); - -float LAPACKE_slange_work( int matrix_order, char norm, lapack_int m, - lapack_int n, const float* a, lapack_int lda, - float* work ); -double LAPACKE_dlange_work( int matrix_order, char norm, lapack_int m, - lapack_int n, const double* a, lapack_int lda, - double* work ); -float LAPACKE_clange_work( int matrix_order, char norm, lapack_int m, - lapack_int n, const lapack_complex_float* a, - lapack_int lda, float* work ); -double LAPACKE_zlange_work( int matrix_order, char norm, lapack_int m, - lapack_int n, const lapack_complex_double* a, - lapack_int lda, double* work ); - -float LAPACKE_clanhe_work( int matrix_order, char norm, char uplo, - lapack_int n, const lapack_complex_float* a, - lapack_int lda, float* work ); -double LAPACKE_zlanhe_work( int matrix_order, char norm, char uplo, - lapack_int n, const lapack_complex_double* a, - lapack_int lda, double* work ); - -float LAPACKE_slansy_work( int matrix_order, char norm, char uplo, - lapack_int n, const float* a, lapack_int lda, - float* work ); -double LAPACKE_dlansy_work( int matrix_order, char norm, char uplo, - lapack_int n, const double* a, lapack_int lda, - double* work ); -float LAPACKE_clansy_work( int matrix_order, char norm, char uplo, - lapack_int n, const lapack_complex_float* a, - lapack_int lda, float* work ); -double LAPACKE_zlansy_work( int matrix_order, char norm, char uplo, - lapack_int n, const lapack_complex_double* a, - lapack_int lda, double* work ); - -float LAPACKE_slantr_work( int matrix_order, char norm, char uplo, - char diag, lapack_int m, lapack_int n, const float* a, - lapack_int lda, float* work ); -double LAPACKE_dlantr_work( int matrix_order, char norm, char uplo, - char diag, lapack_int m, lapack_int n, - const double* a, lapack_int lda, double* work ); -float LAPACKE_clantr_work( int matrix_order, char norm, char uplo, - char diag, lapack_int m, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* work ); -double LAPACKE_zlantr_work( int matrix_order, char norm, char uplo, - char diag, lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* work ); - -lapack_int LAPACKE_slarfb_work( int matrix_order, char side, char trans, - char direct, char storev, lapack_int m, - lapack_int n, lapack_int k, const float* v, - lapack_int ldv, const float* t, lapack_int ldt, - float* c, lapack_int ldc, float* work, - lapack_int ldwork ); -lapack_int LAPACKE_dlarfb_work( int matrix_order, char side, char trans, - char direct, char storev, lapack_int m, - lapack_int n, lapack_int k, const double* v, - lapack_int ldv, const double* t, lapack_int ldt, - double* c, lapack_int ldc, double* work, - lapack_int ldwork ); -lapack_int LAPACKE_clarfb_work( int matrix_order, char side, char trans, - char direct, char storev, lapack_int m, - lapack_int n, lapack_int k, - const lapack_complex_float* v, lapack_int ldv, - const lapack_complex_float* t, lapack_int ldt, - lapack_complex_float* c, lapack_int ldc, - lapack_complex_float* work, lapack_int ldwork ); -lapack_int LAPACKE_zlarfb_work( int matrix_order, char side, char trans, - char direct, char storev, lapack_int m, - lapack_int n, lapack_int k, - const lapack_complex_double* v, lapack_int ldv, - const lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* c, lapack_int ldc, - lapack_complex_double* work, - lapack_int ldwork ); - -lapack_int LAPACKE_slarfg_work( lapack_int n, float* alpha, float* x, - lapack_int incx, float* tau ); -lapack_int LAPACKE_dlarfg_work( lapack_int n, double* alpha, double* x, - lapack_int incx, double* tau ); -lapack_int LAPACKE_clarfg_work( lapack_int n, lapack_complex_float* alpha, - lapack_complex_float* x, lapack_int incx, - lapack_complex_float* tau ); -lapack_int LAPACKE_zlarfg_work( lapack_int n, lapack_complex_double* alpha, - lapack_complex_double* x, lapack_int incx, - lapack_complex_double* tau ); - -lapack_int LAPACKE_slarft_work( int matrix_order, char direct, char storev, - lapack_int n, lapack_int k, const float* v, - lapack_int ldv, const float* tau, float* t, - lapack_int ldt ); -lapack_int LAPACKE_dlarft_work( int matrix_order, char direct, char storev, - lapack_int n, lapack_int k, const double* v, - lapack_int ldv, const double* tau, double* t, - lapack_int ldt ); -lapack_int LAPACKE_clarft_work( int matrix_order, char direct, char storev, - lapack_int n, lapack_int k, - const lapack_complex_float* v, lapack_int ldv, - const lapack_complex_float* tau, - lapack_complex_float* t, lapack_int ldt ); -lapack_int LAPACKE_zlarft_work( int matrix_order, char direct, char storev, - lapack_int n, lapack_int k, - const lapack_complex_double* v, lapack_int ldv, - const lapack_complex_double* tau, - lapack_complex_double* t, lapack_int ldt ); - -lapack_int LAPACKE_slarfx_work( int matrix_order, char side, lapack_int m, - lapack_int n, const float* v, float tau, - float* c, lapack_int ldc, float* work ); -lapack_int LAPACKE_dlarfx_work( int matrix_order, char side, lapack_int m, - lapack_int n, const double* v, double tau, - double* c, lapack_int ldc, double* work ); -lapack_int LAPACKE_clarfx_work( int matrix_order, char side, lapack_int m, - lapack_int n, const lapack_complex_float* v, - lapack_complex_float tau, - lapack_complex_float* c, lapack_int ldc, - lapack_complex_float* work ); -lapack_int LAPACKE_zlarfx_work( int matrix_order, char side, lapack_int m, - lapack_int n, const lapack_complex_double* v, - lapack_complex_double tau, - lapack_complex_double* c, lapack_int ldc, - lapack_complex_double* work ); - -lapack_int LAPACKE_slarnv_work( lapack_int idist, lapack_int* iseed, - lapack_int n, float* x ); -lapack_int LAPACKE_dlarnv_work( lapack_int idist, lapack_int* iseed, - lapack_int n, double* x ); -lapack_int LAPACKE_clarnv_work( lapack_int idist, lapack_int* iseed, - lapack_int n, lapack_complex_float* x ); -lapack_int LAPACKE_zlarnv_work( lapack_int idist, lapack_int* iseed, - lapack_int n, lapack_complex_double* x ); - -lapack_int LAPACKE_slaset_work( int matrix_order, char uplo, lapack_int m, - lapack_int n, float alpha, float beta, float* a, - lapack_int lda ); -lapack_int LAPACKE_dlaset_work( int matrix_order, char uplo, lapack_int m, - lapack_int n, double alpha, double beta, - double* a, lapack_int lda ); -lapack_int LAPACKE_claset_work( int matrix_order, char uplo, lapack_int m, - lapack_int n, lapack_complex_float alpha, - lapack_complex_float beta, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_zlaset_work( int matrix_order, char uplo, lapack_int m, - lapack_int n, lapack_complex_double alpha, - lapack_complex_double beta, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_slasrt_work( char id, lapack_int n, float* d ); -lapack_int LAPACKE_dlasrt_work( char id, lapack_int n, double* d ); - -lapack_int LAPACKE_slaswp_work( int matrix_order, lapack_int n, float* a, - lapack_int lda, lapack_int k1, lapack_int k2, - const lapack_int* ipiv, lapack_int incx ); -lapack_int LAPACKE_dlaswp_work( int matrix_order, lapack_int n, double* a, - lapack_int lda, lapack_int k1, lapack_int k2, - const lapack_int* ipiv, lapack_int incx ); -lapack_int LAPACKE_claswp_work( int matrix_order, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int k1, lapack_int k2, - const lapack_int* ipiv, lapack_int incx ); -lapack_int LAPACKE_zlaswp_work( int matrix_order, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int k1, lapack_int k2, - const lapack_int* ipiv, lapack_int incx ); - -lapack_int LAPACKE_slatms_work( int matrix_order, lapack_int m, lapack_int n, - char dist, lapack_int* iseed, char sym, - float* d, lapack_int mode, float cond, - float dmax, lapack_int kl, lapack_int ku, - char pack, float* a, lapack_int lda, - float* work ); -lapack_int LAPACKE_dlatms_work( int matrix_order, lapack_int m, lapack_int n, - char dist, lapack_int* iseed, char sym, - double* d, lapack_int mode, double cond, - double dmax, lapack_int kl, lapack_int ku, - char pack, double* a, lapack_int lda, - double* work ); -lapack_int LAPACKE_clatms_work( int matrix_order, lapack_int m, lapack_int n, - char dist, lapack_int* iseed, char sym, - float* d, lapack_int mode, float cond, - float dmax, lapack_int kl, lapack_int ku, - char pack, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* work ); -lapack_int LAPACKE_zlatms_work( int matrix_order, lapack_int m, lapack_int n, - char dist, lapack_int* iseed, char sym, - double* d, lapack_int mode, double cond, - double dmax, lapack_int kl, lapack_int ku, - char pack, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* work ); - -lapack_int LAPACKE_slauum_work( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int lda ); -lapack_int LAPACKE_dlauum_work( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int lda ); -lapack_int LAPACKE_clauum_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_zlauum_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_sopgtr_work( int matrix_order, char uplo, lapack_int n, - const float* ap, const float* tau, float* q, - lapack_int ldq, float* work ); -lapack_int LAPACKE_dopgtr_work( int matrix_order, char uplo, lapack_int n, - const double* ap, const double* tau, double* q, - lapack_int ldq, double* work ); - -lapack_int LAPACKE_sopmtr_work( int matrix_order, char side, char uplo, - char trans, lapack_int m, lapack_int n, - const float* ap, const float* tau, float* c, - lapack_int ldc, float* work ); -lapack_int LAPACKE_dopmtr_work( int matrix_order, char side, char uplo, - char trans, lapack_int m, lapack_int n, - const double* ap, const double* tau, double* c, - lapack_int ldc, double* work ); - -lapack_int LAPACKE_sorgbr_work( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int k, float* a, - lapack_int lda, const float* tau, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dorgbr_work( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int k, double* a, - lapack_int lda, const double* tau, double* work, - lapack_int lwork ); - -lapack_int LAPACKE_sorghr_work( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, float* a, lapack_int lda, - const float* tau, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dorghr_work( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, double* a, lapack_int lda, - const double* tau, double* work, - lapack_int lwork ); - -lapack_int LAPACKE_sorglq_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, float* a, lapack_int lda, - const float* tau, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dorglq_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, double* a, lapack_int lda, - const double* tau, double* work, - lapack_int lwork ); - -lapack_int LAPACKE_sorgql_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, float* a, lapack_int lda, - const float* tau, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dorgql_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, double* a, lapack_int lda, - const double* tau, double* work, - lapack_int lwork ); - -lapack_int LAPACKE_sorgqr_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, float* a, lapack_int lda, - const float* tau, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dorgqr_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, double* a, lapack_int lda, - const double* tau, double* work, - lapack_int lwork ); - -lapack_int LAPACKE_sorgrq_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, float* a, lapack_int lda, - const float* tau, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dorgrq_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, double* a, lapack_int lda, - const double* tau, double* work, - lapack_int lwork ); - -lapack_int LAPACKE_sorgtr_work( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int lda, const float* tau, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dorgtr_work( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int lda, const double* tau, - double* work, lapack_int lwork ); - -lapack_int LAPACKE_sormbr_work( int matrix_order, char vect, char side, - char trans, lapack_int m, lapack_int n, - lapack_int k, const float* a, lapack_int lda, - const float* tau, float* c, lapack_int ldc, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dormbr_work( int matrix_order, char vect, char side, - char trans, lapack_int m, lapack_int n, - lapack_int k, const double* a, lapack_int lda, - const double* tau, double* c, lapack_int ldc, - double* work, lapack_int lwork ); - -lapack_int LAPACKE_sormhr_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int ilo, - lapack_int ihi, const float* a, lapack_int lda, - const float* tau, float* c, lapack_int ldc, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dormhr_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int ilo, - lapack_int ihi, const double* a, lapack_int lda, - const double* tau, double* c, lapack_int ldc, - double* work, lapack_int lwork ); - -lapack_int LAPACKE_sormlq_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const float* a, lapack_int lda, - const float* tau, float* c, lapack_int ldc, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dormlq_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const double* a, lapack_int lda, - const double* tau, double* c, lapack_int ldc, - double* work, lapack_int lwork ); - -lapack_int LAPACKE_sormql_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const float* a, lapack_int lda, - const float* tau, float* c, lapack_int ldc, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dormql_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const double* a, lapack_int lda, - const double* tau, double* c, lapack_int ldc, - double* work, lapack_int lwork ); - -lapack_int LAPACKE_sormqr_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const float* a, lapack_int lda, - const float* tau, float* c, lapack_int ldc, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dormqr_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const double* a, lapack_int lda, - const double* tau, double* c, lapack_int ldc, - double* work, lapack_int lwork ); - -lapack_int LAPACKE_sormrq_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const float* a, lapack_int lda, - const float* tau, float* c, lapack_int ldc, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dormrq_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const double* a, lapack_int lda, - const double* tau, double* c, lapack_int ldc, - double* work, lapack_int lwork ); - -lapack_int LAPACKE_sormrz_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, const float* a, lapack_int lda, - const float* tau, float* c, lapack_int ldc, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dormrz_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, const double* a, lapack_int lda, - const double* tau, double* c, lapack_int ldc, - double* work, lapack_int lwork ); - -lapack_int LAPACKE_sormtr_work( int matrix_order, char side, char uplo, - char trans, lapack_int m, lapack_int n, - const float* a, lapack_int lda, - const float* tau, float* c, lapack_int ldc, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dormtr_work( int matrix_order, char side, char uplo, - char trans, lapack_int m, lapack_int n, - const double* a, lapack_int lda, - const double* tau, double* c, lapack_int ldc, - double* work, lapack_int lwork ); - -lapack_int LAPACKE_spbcon_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const float* ab, lapack_int ldab, - float anorm, float* rcond, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dpbcon_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const double* ab, - lapack_int ldab, double anorm, double* rcond, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_cpbcon_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const lapack_complex_float* ab, - lapack_int ldab, float anorm, float* rcond, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zpbcon_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const lapack_complex_double* ab, - lapack_int ldab, double anorm, double* rcond, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_spbequ_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const float* ab, lapack_int ldab, - float* s, float* scond, float* amax ); -lapack_int LAPACKE_dpbequ_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const double* ab, - lapack_int ldab, double* s, double* scond, - double* amax ); -lapack_int LAPACKE_cpbequ_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const lapack_complex_float* ab, - lapack_int ldab, float* s, float* scond, - float* amax ); -lapack_int LAPACKE_zpbequ_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, const lapack_complex_double* ab, - lapack_int ldab, double* s, double* scond, - double* amax ); - -lapack_int LAPACKE_spbrfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, const float* ab, - lapack_int ldab, const float* afb, - lapack_int ldafb, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* ferr, float* berr, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dpbrfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - const double* ab, lapack_int ldab, - const double* afb, lapack_int ldafb, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* ferr, double* berr, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_cpbrfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - const lapack_complex_float* ab, lapack_int ldab, - const lapack_complex_float* afb, - lapack_int ldafb, const lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zpbrfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - const lapack_complex_double* ab, - lapack_int ldab, - const lapack_complex_double* afb, - lapack_int ldafb, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_spbstf_work( int matrix_order, char uplo, lapack_int n, - lapack_int kb, float* bb, lapack_int ldbb ); -lapack_int LAPACKE_dpbstf_work( int matrix_order, char uplo, lapack_int n, - lapack_int kb, double* bb, lapack_int ldbb ); -lapack_int LAPACKE_cpbstf_work( int matrix_order, char uplo, lapack_int n, - lapack_int kb, lapack_complex_float* bb, - lapack_int ldbb ); -lapack_int LAPACKE_zpbstf_work( int matrix_order, char uplo, lapack_int n, - lapack_int kb, lapack_complex_double* bb, - lapack_int ldbb ); - -lapack_int LAPACKE_spbsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, float* ab, - lapack_int ldab, float* b, lapack_int ldb ); -lapack_int LAPACKE_dpbsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, double* ab, - lapack_int ldab, double* b, lapack_int ldb ); -lapack_int LAPACKE_cpbsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zpbsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_spbsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int kd, lapack_int nrhs, - float* ab, lapack_int ldab, float* afb, - lapack_int ldafb, char* equed, float* s, - float* b, lapack_int ldb, float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr, float* work, lapack_int* iwork ); -lapack_int LAPACKE_dpbsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int kd, lapack_int nrhs, - double* ab, lapack_int ldab, double* afb, - lapack_int ldafb, char* equed, double* s, - double* b, lapack_int ldb, double* x, - lapack_int ldx, double* rcond, double* ferr, - double* berr, double* work, lapack_int* iwork ); -lapack_int LAPACKE_cpbsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int kd, lapack_int nrhs, - lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* afb, lapack_int ldafb, - char* equed, float* s, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zpbsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int kd, lapack_int nrhs, - lapack_complex_double* ab, lapack_int ldab, - lapack_complex_double* afb, lapack_int ldafb, - char* equed, double* s, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_spbtrf_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, float* ab, lapack_int ldab ); -lapack_int LAPACKE_dpbtrf_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, double* ab, lapack_int ldab ); -lapack_int LAPACKE_cpbtrf_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_complex_float* ab, - lapack_int ldab ); -lapack_int LAPACKE_zpbtrf_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_complex_double* ab, - lapack_int ldab ); - -lapack_int LAPACKE_spbtrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, const float* ab, - lapack_int ldab, float* b, lapack_int ldb ); -lapack_int LAPACKE_dpbtrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - const double* ab, lapack_int ldab, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cpbtrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - const lapack_complex_float* ab, lapack_int ldab, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zpbtrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int kd, lapack_int nrhs, - const lapack_complex_double* ab, - lapack_int ldab, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_spftrf_work( int matrix_order, char transr, char uplo, - lapack_int n, float* a ); -lapack_int LAPACKE_dpftrf_work( int matrix_order, char transr, char uplo, - lapack_int n, double* a ); -lapack_int LAPACKE_cpftrf_work( int matrix_order, char transr, char uplo, - lapack_int n, lapack_complex_float* a ); -lapack_int LAPACKE_zpftrf_work( int matrix_order, char transr, char uplo, - lapack_int n, lapack_complex_double* a ); - -lapack_int LAPACKE_spftri_work( int matrix_order, char transr, char uplo, - lapack_int n, float* a ); -lapack_int LAPACKE_dpftri_work( int matrix_order, char transr, char uplo, - lapack_int n, double* a ); -lapack_int LAPACKE_cpftri_work( int matrix_order, char transr, char uplo, - lapack_int n, lapack_complex_float* a ); -lapack_int LAPACKE_zpftri_work( int matrix_order, char transr, char uplo, - lapack_int n, lapack_complex_double* a ); - -lapack_int LAPACKE_spftrs_work( int matrix_order, char transr, char uplo, - lapack_int n, lapack_int nrhs, const float* a, - float* b, lapack_int ldb ); -lapack_int LAPACKE_dpftrs_work( int matrix_order, char transr, char uplo, - lapack_int n, lapack_int nrhs, const double* a, - double* b, lapack_int ldb ); -lapack_int LAPACKE_cpftrs_work( int matrix_order, char transr, char uplo, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zpftrs_work( int matrix_order, char transr, char uplo, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_spocon_work( int matrix_order, char uplo, lapack_int n, - const float* a, lapack_int lda, float anorm, - float* rcond, float* work, lapack_int* iwork ); -lapack_int LAPACKE_dpocon_work( int matrix_order, char uplo, lapack_int n, - const double* a, lapack_int lda, double anorm, - double* rcond, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cpocon_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float anorm, float* rcond, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zpocon_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double anorm, double* rcond, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_spoequ_work( int matrix_order, lapack_int n, const float* a, - lapack_int lda, float* s, float* scond, - float* amax ); -lapack_int LAPACKE_dpoequ_work( int matrix_order, lapack_int n, const double* a, - lapack_int lda, double* s, double* scond, - double* amax ); -lapack_int LAPACKE_cpoequ_work( int matrix_order, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* s, float* scond, float* amax ); -lapack_int LAPACKE_zpoequ_work( int matrix_order, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* s, double* scond, double* amax ); - -lapack_int LAPACKE_spoequb_work( int matrix_order, lapack_int n, const float* a, - lapack_int lda, float* s, float* scond, - float* amax ); -lapack_int LAPACKE_dpoequb_work( int matrix_order, lapack_int n, - const double* a, lapack_int lda, double* s, - double* scond, double* amax ); -lapack_int LAPACKE_cpoequb_work( int matrix_order, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* s, float* scond, float* amax ); -lapack_int LAPACKE_zpoequb_work( int matrix_order, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* s, double* scond, double* amax ); - -lapack_int LAPACKE_sporfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - const float* af, lapack_int ldaf, - const float* b, lapack_int ldb, float* x, - lapack_int ldx, float* ferr, float* berr, - float* work, lapack_int* iwork ); -lapack_int LAPACKE_dporfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* a, - lapack_int lda, const double* af, - lapack_int ldaf, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* ferr, double* berr, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cporfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* af, - lapack_int ldaf, const lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zporfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* af, - lapack_int ldaf, const lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sporfsx_work( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, const float* a, - lapack_int lda, const float* af, - lapack_int ldaf, const float* s, - const float* b, lapack_int ldb, float* x, - lapack_int ldx, float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dporfsx_work( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, const double* a, - lapack_int lda, const double* af, - lapack_int ldaf, const double* s, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* rcond, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cporfsx_work( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* af, - lapack_int ldaf, const float* s, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zporfsx_work( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* af, - lapack_int ldaf, const double* s, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_sposv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, float* a, lapack_int lda, - float* b, lapack_int ldb ); -lapack_int LAPACKE_dposv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, - double* b, lapack_int ldb ); -lapack_int LAPACKE_cposv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zposv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb ); -lapack_int LAPACKE_dsposv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, - double* b, lapack_int ldb, double* x, - lapack_int ldx, double* work, float* swork, - lapack_int* iter ); -lapack_int LAPACKE_zcposv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, lapack_complex_double* work, - lapack_complex_float* swork, double* rwork, - lapack_int* iter ); - -lapack_int LAPACKE_sposvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, float* a, - lapack_int lda, float* af, lapack_int ldaf, - char* equed, float* s, float* b, lapack_int ldb, - float* x, lapack_int ldx, float* rcond, - float* ferr, float* berr, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dposvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, double* a, - lapack_int lda, double* af, lapack_int ldaf, - char* equed, double* s, double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_cposvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - char* equed, float* s, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zposvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - char* equed, double* s, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sposvxx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, float* a, - lapack_int lda, float* af, lapack_int ldaf, - char* equed, float* s, float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dposvxx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, double* a, - lapack_int lda, double* af, lapack_int ldaf, - char* equed, double* s, double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* rpvgrw, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cposvxx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - char* equed, float* s, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* rpvgrw, - float* berr, lapack_int n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int nparams, float* params, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zposvxx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - char* equed, double* s, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* rpvgrw, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_spotrf_work( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int lda ); -lapack_int LAPACKE_dpotrf_work( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int lda ); -lapack_int LAPACKE_cpotrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_zpotrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_spotri_work( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int lda ); -lapack_int LAPACKE_dpotri_work( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int lda ); -lapack_int LAPACKE_cpotri_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_zpotri_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_spotrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - float* b, lapack_int ldb ); -lapack_int LAPACKE_dpotrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* a, - lapack_int lda, double* b, lapack_int ldb ); -lapack_int LAPACKE_cpotrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zpotrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_sppcon_work( int matrix_order, char uplo, lapack_int n, - const float* ap, float anorm, float* rcond, - float* work, lapack_int* iwork ); -lapack_int LAPACKE_dppcon_work( int matrix_order, char uplo, lapack_int n, - const double* ap, double anorm, double* rcond, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_cppcon_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* ap, float anorm, - float* rcond, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zppcon_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* ap, double anorm, - double* rcond, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_sppequ_work( int matrix_order, char uplo, lapack_int n, - const float* ap, float* s, float* scond, - float* amax ); -lapack_int LAPACKE_dppequ_work( int matrix_order, char uplo, lapack_int n, - const double* ap, double* s, double* scond, - double* amax ); -lapack_int LAPACKE_cppequ_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* ap, float* s, - float* scond, float* amax ); -lapack_int LAPACKE_zppequ_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* ap, double* s, - double* scond, double* amax ); - -lapack_int LAPACKE_spprfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* ap, - const float* afp, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* ferr, float* berr, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dpprfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* ap, - const double* afp, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* ferr, double* berr, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cpprfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - const lapack_complex_float* afp, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zpprfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, - const lapack_complex_double* ap, - const lapack_complex_double* afp, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sppsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, float* ap, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dppsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, double* ap, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cppsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* ap, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zppsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* ap, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_sppsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, float* ap, - float* afp, char* equed, float* s, float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - float* work, lapack_int* iwork ); -lapack_int LAPACKE_dppsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, double* ap, - double* afp, char* equed, double* s, double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_cppsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_float* ap, - lapack_complex_float* afp, char* equed, - float* s, lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zppsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_double* ap, - lapack_complex_double* afp, char* equed, - double* s, lapack_complex_double* b, - lapack_int ldb, lapack_complex_double* x, - lapack_int ldx, double* rcond, double* ferr, - double* berr, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_spptrf_work( int matrix_order, char uplo, lapack_int n, - float* ap ); -lapack_int LAPACKE_dpptrf_work( int matrix_order, char uplo, lapack_int n, - double* ap ); -lapack_int LAPACKE_cpptrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap ); -lapack_int LAPACKE_zpptrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap ); - -lapack_int LAPACKE_spptri_work( int matrix_order, char uplo, lapack_int n, - float* ap ); -lapack_int LAPACKE_dpptri_work( int matrix_order, char uplo, lapack_int n, - double* ap ); -lapack_int LAPACKE_cpptri_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap ); -lapack_int LAPACKE_zpptri_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap ); - -lapack_int LAPACKE_spptrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* ap, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dpptrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* ap, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cpptrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zpptrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, - const lapack_complex_double* ap, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_spstrf_work( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int lda, lapack_int* piv, - lapack_int* rank, float tol, float* work ); -lapack_int LAPACKE_dpstrf_work( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int lda, lapack_int* piv, - lapack_int* rank, double tol, double* work ); -lapack_int LAPACKE_cpstrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* piv, lapack_int* rank, float tol, - float* work ); -lapack_int LAPACKE_zpstrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* piv, lapack_int* rank, double tol, - double* work ); - -lapack_int LAPACKE_sptcon_work( lapack_int n, const float* d, const float* e, - float anorm, float* rcond, float* work ); -lapack_int LAPACKE_dptcon_work( lapack_int n, const double* d, const double* e, - double anorm, double* rcond, double* work ); -lapack_int LAPACKE_cptcon_work( lapack_int n, const float* d, - const lapack_complex_float* e, float anorm, - float* rcond, float* work ); -lapack_int LAPACKE_zptcon_work( lapack_int n, const double* d, - const lapack_complex_double* e, double anorm, - double* rcond, double* work ); - -lapack_int LAPACKE_spteqr_work( int matrix_order, char compz, lapack_int n, - float* d, float* e, float* z, lapack_int ldz, - float* work ); -lapack_int LAPACKE_dpteqr_work( int matrix_order, char compz, lapack_int n, - double* d, double* e, double* z, lapack_int ldz, - double* work ); -lapack_int LAPACKE_cpteqr_work( int matrix_order, char compz, lapack_int n, - float* d, float* e, lapack_complex_float* z, - lapack_int ldz, float* work ); -lapack_int LAPACKE_zpteqr_work( int matrix_order, char compz, lapack_int n, - double* d, double* e, lapack_complex_double* z, - lapack_int ldz, double* work ); - -lapack_int LAPACKE_sptrfs_work( int matrix_order, lapack_int n, lapack_int nrhs, - const float* d, const float* e, const float* df, - const float* ef, const float* b, lapack_int ldb, - float* x, lapack_int ldx, float* ferr, - float* berr, float* work ); -lapack_int LAPACKE_dptrfs_work( int matrix_order, lapack_int n, lapack_int nrhs, - const double* d, const double* e, - const double* df, const double* ef, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* ferr, double* berr, - double* work ); -lapack_int LAPACKE_cptrfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* d, - const lapack_complex_float* e, const float* df, - const lapack_complex_float* ef, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zptrfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* d, - const lapack_complex_double* e, - const double* df, - const lapack_complex_double* ef, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sptsv_work( int matrix_order, lapack_int n, lapack_int nrhs, - float* d, float* e, float* b, lapack_int ldb ); -lapack_int LAPACKE_dptsv_work( int matrix_order, lapack_int n, lapack_int nrhs, - double* d, double* e, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cptsv_work( int matrix_order, lapack_int n, lapack_int nrhs, - float* d, lapack_complex_float* e, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zptsv_work( int matrix_order, lapack_int n, lapack_int nrhs, - double* d, lapack_complex_double* e, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_sptsvx_work( int matrix_order, char fact, lapack_int n, - lapack_int nrhs, const float* d, const float* e, - float* df, float* ef, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - float* work ); -lapack_int LAPACKE_dptsvx_work( int matrix_order, char fact, lapack_int n, - lapack_int nrhs, const double* d, - const double* e, double* df, double* ef, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* rcond, double* ferr, - double* berr, double* work ); -lapack_int LAPACKE_cptsvx_work( int matrix_order, char fact, lapack_int n, - lapack_int nrhs, const float* d, - const lapack_complex_float* e, float* df, - lapack_complex_float* ef, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zptsvx_work( int matrix_order, char fact, lapack_int n, - lapack_int nrhs, const double* d, - const lapack_complex_double* e, double* df, - lapack_complex_double* ef, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_spttrf_work( lapack_int n, float* d, float* e ); -lapack_int LAPACKE_dpttrf_work( lapack_int n, double* d, double* e ); -lapack_int LAPACKE_cpttrf_work( lapack_int n, float* d, - lapack_complex_float* e ); -lapack_int LAPACKE_zpttrf_work( lapack_int n, double* d, - lapack_complex_double* e ); - -lapack_int LAPACKE_spttrs_work( int matrix_order, lapack_int n, lapack_int nrhs, - const float* d, const float* e, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dpttrs_work( int matrix_order, lapack_int n, lapack_int nrhs, - const double* d, const double* e, double* b, - lapack_int ldb ); -lapack_int LAPACKE_cpttrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* d, - const lapack_complex_float* e, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zpttrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* d, - const lapack_complex_double* e, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_ssbev_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int kd, float* ab, - lapack_int ldab, float* w, float* z, - lapack_int ldz, float* work ); -lapack_int LAPACKE_dsbev_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int kd, double* ab, - lapack_int ldab, double* w, double* z, - lapack_int ldz, double* work ); - -lapack_int LAPACKE_ssbevd_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int kd, float* ab, - lapack_int ldab, float* w, float* z, - lapack_int ldz, float* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_dsbevd_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int kd, double* ab, - lapack_int ldab, double* w, double* z, - lapack_int ldz, double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); - -lapack_int LAPACKE_ssbevx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, lapack_int kd, - float* ab, lapack_int ldab, float* q, - lapack_int ldq, float vl, float vu, - lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, - lapack_int ldz, float* work, lapack_int* iwork, - lapack_int* ifail ); -lapack_int LAPACKE_dsbevx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, lapack_int kd, - double* ab, lapack_int ldab, double* q, - lapack_int ldq, double vl, double vu, - lapack_int il, lapack_int iu, double abstol, - lapack_int* m, double* w, double* z, - lapack_int ldz, double* work, lapack_int* iwork, - lapack_int* ifail ); - -lapack_int LAPACKE_ssbgst_work( int matrix_order, char vect, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - float* ab, lapack_int ldab, const float* bb, - lapack_int ldbb, float* x, lapack_int ldx, - float* work ); -lapack_int LAPACKE_dsbgst_work( int matrix_order, char vect, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - double* ab, lapack_int ldab, const double* bb, - lapack_int ldbb, double* x, lapack_int ldx, - double* work ); - -lapack_int LAPACKE_ssbgv_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - float* ab, lapack_int ldab, float* bb, - lapack_int ldbb, float* w, float* z, - lapack_int ldz, float* work ); -lapack_int LAPACKE_dsbgv_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - double* ab, lapack_int ldab, double* bb, - lapack_int ldbb, double* w, double* z, - lapack_int ldz, double* work ); - -lapack_int LAPACKE_ssbgvd_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - float* ab, lapack_int ldab, float* bb, - lapack_int ldbb, float* w, float* z, - lapack_int ldz, float* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_dsbgvd_work( int matrix_order, char jobz, char uplo, - lapack_int n, lapack_int ka, lapack_int kb, - double* ab, lapack_int ldab, double* bb, - lapack_int ldbb, double* w, double* z, - lapack_int ldz, double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); - -lapack_int LAPACKE_ssbgvx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, lapack_int ka, - lapack_int kb, float* ab, lapack_int ldab, - float* bb, lapack_int ldbb, float* q, - lapack_int ldq, float vl, float vu, - lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, - lapack_int ldz, float* work, lapack_int* iwork, - lapack_int* ifail ); -lapack_int LAPACKE_dsbgvx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, lapack_int ka, - lapack_int kb, double* ab, lapack_int ldab, - double* bb, lapack_int ldbb, double* q, - lapack_int ldq, double vl, double vu, - lapack_int il, lapack_int iu, double abstol, - lapack_int* m, double* w, double* z, - lapack_int ldz, double* work, lapack_int* iwork, - lapack_int* ifail ); - -lapack_int LAPACKE_ssbtrd_work( int matrix_order, char vect, char uplo, - lapack_int n, lapack_int kd, float* ab, - lapack_int ldab, float* d, float* e, float* q, - lapack_int ldq, float* work ); -lapack_int LAPACKE_dsbtrd_work( int matrix_order, char vect, char uplo, - lapack_int n, lapack_int kd, double* ab, - lapack_int ldab, double* d, double* e, - double* q, lapack_int ldq, double* work ); - -lapack_int LAPACKE_ssfrk_work( int matrix_order, char transr, char uplo, - char trans, lapack_int n, lapack_int k, - float alpha, const float* a, lapack_int lda, - float beta, float* c ); -lapack_int LAPACKE_dsfrk_work( int matrix_order, char transr, char uplo, - char trans, lapack_int n, lapack_int k, - double alpha, const double* a, lapack_int lda, - double beta, double* c ); - -lapack_int LAPACKE_sspcon_work( int matrix_order, char uplo, lapack_int n, - const float* ap, const lapack_int* ipiv, - float anorm, float* rcond, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dspcon_work( int matrix_order, char uplo, lapack_int n, - const double* ap, const lapack_int* ipiv, - double anorm, double* rcond, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_cspcon_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* ap, - const lapack_int* ipiv, float anorm, - float* rcond, lapack_complex_float* work ); -lapack_int LAPACKE_zspcon_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* ap, - const lapack_int* ipiv, double anorm, - double* rcond, lapack_complex_double* work ); - -lapack_int LAPACKE_sspev_work( int matrix_order, char jobz, char uplo, - lapack_int n, float* ap, float* w, float* z, - lapack_int ldz, float* work ); -lapack_int LAPACKE_dspev_work( int matrix_order, char jobz, char uplo, - lapack_int n, double* ap, double* w, double* z, - lapack_int ldz, double* work ); - -lapack_int LAPACKE_sspevd_work( int matrix_order, char jobz, char uplo, - lapack_int n, float* ap, float* w, float* z, - lapack_int ldz, float* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_dspevd_work( int matrix_order, char jobz, char uplo, - lapack_int n, double* ap, double* w, double* z, - lapack_int ldz, double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); - -lapack_int LAPACKE_sspevx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, float* ap, float vl, - float vu, lapack_int il, lapack_int iu, - float abstol, lapack_int* m, float* w, float* z, - lapack_int ldz, float* work, lapack_int* iwork, - lapack_int* ifail ); -lapack_int LAPACKE_dspevx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, double* ap, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, - double* z, lapack_int ldz, double* work, - lapack_int* iwork, lapack_int* ifail ); - -lapack_int LAPACKE_sspgst_work( int matrix_order, lapack_int itype, char uplo, - lapack_int n, float* ap, const float* bp ); -lapack_int LAPACKE_dspgst_work( int matrix_order, lapack_int itype, char uplo, - lapack_int n, double* ap, const double* bp ); - -lapack_int LAPACKE_sspgv_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, float* ap, float* bp, - float* w, float* z, lapack_int ldz, - float* work ); -lapack_int LAPACKE_dspgv_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, double* ap, double* bp, - double* w, double* z, lapack_int ldz, - double* work ); - -lapack_int LAPACKE_sspgvd_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, float* ap, float* bp, - float* w, float* z, lapack_int ldz, float* work, - lapack_int lwork, lapack_int* iwork, - lapack_int liwork ); -lapack_int LAPACKE_dspgvd_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, double* ap, double* bp, - double* w, double* z, lapack_int ldz, - double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); - -lapack_int LAPACKE_sspgvx_work( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, float* ap, - float* bp, float vl, float vu, lapack_int il, - lapack_int iu, float abstol, lapack_int* m, - float* w, float* z, lapack_int ldz, float* work, - lapack_int* iwork, lapack_int* ifail ); -lapack_int LAPACKE_dspgvx_work( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, double* ap, - double* bp, double vl, double vu, lapack_int il, - lapack_int iu, double abstol, lapack_int* m, - double* w, double* z, lapack_int ldz, - double* work, lapack_int* iwork, - lapack_int* ifail ); - -lapack_int LAPACKE_ssprfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* ap, - const float* afp, const lapack_int* ipiv, - const float* b, lapack_int ldb, float* x, - lapack_int ldx, float* ferr, float* berr, - float* work, lapack_int* iwork ); -lapack_int LAPACKE_dsprfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* ap, - const double* afp, const lapack_int* ipiv, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* ferr, double* berr, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_csprfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - const lapack_complex_float* afp, - const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zsprfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, - const lapack_complex_double* ap, - const lapack_complex_double* afp, - const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_sspsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, float* ap, lapack_int* ipiv, - float* b, lapack_int ldb ); -lapack_int LAPACKE_dspsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, double* ap, lapack_int* ipiv, - double* b, lapack_int ldb ); -lapack_int LAPACKE_cspsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* ap, - lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zspsv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* ap, - lapack_int* ipiv, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_sspsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, const float* ap, - float* afp, lapack_int* ipiv, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - float* work, lapack_int* iwork ); -lapack_int LAPACKE_dspsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, const double* ap, - double* afp, lapack_int* ipiv, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_cspsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* ap, - lapack_complex_float* afp, lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zspsvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* ap, - lapack_complex_double* afp, lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_ssptrd_work( int matrix_order, char uplo, lapack_int n, - float* ap, float* d, float* e, float* tau ); -lapack_int LAPACKE_dsptrd_work( int matrix_order, char uplo, lapack_int n, - double* ap, double* d, double* e, double* tau ); - -lapack_int LAPACKE_ssptrf_work( int matrix_order, char uplo, lapack_int n, - float* ap, lapack_int* ipiv ); -lapack_int LAPACKE_dsptrf_work( int matrix_order, char uplo, lapack_int n, - double* ap, lapack_int* ipiv ); -lapack_int LAPACKE_csptrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap, lapack_int* ipiv ); -lapack_int LAPACKE_zsptrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap, lapack_int* ipiv ); - -lapack_int LAPACKE_ssptri_work( int matrix_order, char uplo, lapack_int n, - float* ap, const lapack_int* ipiv, - float* work ); -lapack_int LAPACKE_dsptri_work( int matrix_order, char uplo, lapack_int n, - double* ap, const lapack_int* ipiv, - double* work ); -lapack_int LAPACKE_csptri_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* ap, - const lapack_int* ipiv, - lapack_complex_float* work ); -lapack_int LAPACKE_zsptri_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* ap, - const lapack_int* ipiv, - lapack_complex_double* work ); - -lapack_int LAPACKE_ssptrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* ap, - const lapack_int* ipiv, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dsptrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* ap, - const lapack_int* ipiv, double* b, - lapack_int ldb ); -lapack_int LAPACKE_csptrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* ap, - const lapack_int* ipiv, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_zsptrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, - const lapack_complex_double* ap, - const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_sstebz_work( char range, char order, lapack_int n, float vl, - float vu, lapack_int il, lapack_int iu, - float abstol, const float* d, const float* e, - lapack_int* m, lapack_int* nsplit, float* w, - lapack_int* iblock, lapack_int* isplit, - float* work, lapack_int* iwork ); -lapack_int LAPACKE_dstebz_work( char range, char order, lapack_int n, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, const double* d, const double* e, - lapack_int* m, lapack_int* nsplit, double* w, - lapack_int* iblock, lapack_int* isplit, - double* work, lapack_int* iwork ); - -lapack_int LAPACKE_sstedc_work( int matrix_order, char compz, lapack_int n, - float* d, float* e, float* z, lapack_int ldz, - float* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_dstedc_work( int matrix_order, char compz, lapack_int n, - double* d, double* e, double* z, lapack_int ldz, - double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_cstedc_work( int matrix_order, char compz, lapack_int n, - float* d, float* e, lapack_complex_float* z, - lapack_int ldz, lapack_complex_float* work, - lapack_int lwork, float* rwork, - lapack_int lrwork, lapack_int* iwork, - lapack_int liwork ); -lapack_int LAPACKE_zstedc_work( int matrix_order, char compz, lapack_int n, - double* d, double* e, lapack_complex_double* z, - lapack_int ldz, lapack_complex_double* work, - lapack_int lwork, double* rwork, - lapack_int lrwork, lapack_int* iwork, - lapack_int liwork ); - -lapack_int LAPACKE_sstegr_work( int matrix_order, char jobz, char range, - lapack_int n, float* d, float* e, float vl, - float vu, lapack_int il, lapack_int iu, - float abstol, lapack_int* m, float* w, float* z, - lapack_int ldz, lapack_int* isuppz, float* work, - lapack_int lwork, lapack_int* iwork, - lapack_int liwork ); -lapack_int LAPACKE_dstegr_work( int matrix_order, char jobz, char range, - lapack_int n, double* d, double* e, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, - double* z, lapack_int ldz, lapack_int* isuppz, - double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_cstegr_work( int matrix_order, char jobz, char range, - lapack_int n, float* d, float* e, float vl, - float vu, lapack_int il, lapack_int iu, - float abstol, lapack_int* m, float* w, - lapack_complex_float* z, lapack_int ldz, - lapack_int* isuppz, float* work, - lapack_int lwork, lapack_int* iwork, - lapack_int liwork ); -lapack_int LAPACKE_zstegr_work( int matrix_order, char jobz, char range, - lapack_int n, double* d, double* e, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_int* isuppz, double* work, - lapack_int lwork, lapack_int* iwork, - lapack_int liwork ); - -lapack_int LAPACKE_sstein_work( int matrix_order, lapack_int n, const float* d, - const float* e, lapack_int m, const float* w, - const lapack_int* iblock, - const lapack_int* isplit, float* z, - lapack_int ldz, float* work, lapack_int* iwork, - lapack_int* ifailv ); -lapack_int LAPACKE_dstein_work( int matrix_order, lapack_int n, const double* d, - const double* e, lapack_int m, const double* w, - const lapack_int* iblock, - const lapack_int* isplit, double* z, - lapack_int ldz, double* work, lapack_int* iwork, - lapack_int* ifailv ); -lapack_int LAPACKE_cstein_work( int matrix_order, lapack_int n, const float* d, - const float* e, lapack_int m, const float* w, - const lapack_int* iblock, - const lapack_int* isplit, - lapack_complex_float* z, lapack_int ldz, - float* work, lapack_int* iwork, - lapack_int* ifailv ); -lapack_int LAPACKE_zstein_work( int matrix_order, lapack_int n, const double* d, - const double* e, lapack_int m, const double* w, - const lapack_int* iblock, - const lapack_int* isplit, - lapack_complex_double* z, lapack_int ldz, - double* work, lapack_int* iwork, - lapack_int* ifailv ); - -lapack_int LAPACKE_sstemr_work( int matrix_order, char jobz, char range, - lapack_int n, float* d, float* e, float vl, - float vu, lapack_int il, lapack_int iu, - lapack_int* m, float* w, float* z, - lapack_int ldz, lapack_int nzc, - lapack_int* isuppz, lapack_logical* tryrac, - float* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_dstemr_work( int matrix_order, char jobz, char range, - lapack_int n, double* d, double* e, double vl, - double vu, lapack_int il, lapack_int iu, - lapack_int* m, double* w, double* z, - lapack_int ldz, lapack_int nzc, - lapack_int* isuppz, lapack_logical* tryrac, - double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_cstemr_work( int matrix_order, char jobz, char range, - lapack_int n, float* d, float* e, float vl, - float vu, lapack_int il, lapack_int iu, - lapack_int* m, float* w, - lapack_complex_float* z, lapack_int ldz, - lapack_int nzc, lapack_int* isuppz, - lapack_logical* tryrac, float* work, - lapack_int lwork, lapack_int* iwork, - lapack_int liwork ); -lapack_int LAPACKE_zstemr_work( int matrix_order, char jobz, char range, - lapack_int n, double* d, double* e, double vl, - double vu, lapack_int il, lapack_int iu, - lapack_int* m, double* w, - lapack_complex_double* z, lapack_int ldz, - lapack_int nzc, lapack_int* isuppz, - lapack_logical* tryrac, double* work, - lapack_int lwork, lapack_int* iwork, - lapack_int liwork ); - -lapack_int LAPACKE_ssteqr_work( int matrix_order, char compz, lapack_int n, - float* d, float* e, float* z, lapack_int ldz, - float* work ); -lapack_int LAPACKE_dsteqr_work( int matrix_order, char compz, lapack_int n, - double* d, double* e, double* z, lapack_int ldz, - double* work ); -lapack_int LAPACKE_csteqr_work( int matrix_order, char compz, lapack_int n, - float* d, float* e, lapack_complex_float* z, - lapack_int ldz, float* work ); -lapack_int LAPACKE_zsteqr_work( int matrix_order, char compz, lapack_int n, - double* d, double* e, lapack_complex_double* z, - lapack_int ldz, double* work ); - -lapack_int LAPACKE_ssterf_work( lapack_int n, float* d, float* e ); -lapack_int LAPACKE_dsterf_work( lapack_int n, double* d, double* e ); - -lapack_int LAPACKE_sstev_work( int matrix_order, char jobz, lapack_int n, - float* d, float* e, float* z, lapack_int ldz, - float* work ); -lapack_int LAPACKE_dstev_work( int matrix_order, char jobz, lapack_int n, - double* d, double* e, double* z, lapack_int ldz, - double* work ); - -lapack_int LAPACKE_sstevd_work( int matrix_order, char jobz, lapack_int n, - float* d, float* e, float* z, lapack_int ldz, - float* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_dstevd_work( int matrix_order, char jobz, lapack_int n, - double* d, double* e, double* z, lapack_int ldz, - double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); - -lapack_int LAPACKE_sstevr_work( int matrix_order, char jobz, char range, - lapack_int n, float* d, float* e, float vl, - float vu, lapack_int il, lapack_int iu, - float abstol, lapack_int* m, float* w, float* z, - lapack_int ldz, lapack_int* isuppz, float* work, - lapack_int lwork, lapack_int* iwork, - lapack_int liwork ); -lapack_int LAPACKE_dstevr_work( int matrix_order, char jobz, char range, - lapack_int n, double* d, double* e, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, - double* z, lapack_int ldz, lapack_int* isuppz, - double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); - -lapack_int LAPACKE_sstevx_work( int matrix_order, char jobz, char range, - lapack_int n, float* d, float* e, float vl, - float vu, lapack_int il, lapack_int iu, - float abstol, lapack_int* m, float* w, float* z, - lapack_int ldz, float* work, lapack_int* iwork, - lapack_int* ifail ); -lapack_int LAPACKE_dstevx_work( int matrix_order, char jobz, char range, - lapack_int n, double* d, double* e, double vl, - double vu, lapack_int il, lapack_int iu, - double abstol, lapack_int* m, double* w, - double* z, lapack_int ldz, double* work, - lapack_int* iwork, lapack_int* ifail ); - -lapack_int LAPACKE_ssycon_work( int matrix_order, char uplo, lapack_int n, - const float* a, lapack_int lda, - const lapack_int* ipiv, float anorm, - float* rcond, float* work, lapack_int* iwork ); -lapack_int LAPACKE_dsycon_work( int matrix_order, char uplo, lapack_int n, - const double* a, lapack_int lda, - const lapack_int* ipiv, double anorm, - double* rcond, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_csycon_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, float anorm, - float* rcond, lapack_complex_float* work ); -lapack_int LAPACKE_zsycon_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, double anorm, - double* rcond, lapack_complex_double* work ); - -lapack_int LAPACKE_ssyequb_work( int matrix_order, char uplo, lapack_int n, - const float* a, lapack_int lda, float* s, - float* scond, float* amax, float* work ); -lapack_int LAPACKE_dsyequb_work( int matrix_order, char uplo, lapack_int n, - const double* a, lapack_int lda, double* s, - double* scond, double* amax, double* work ); -lapack_int LAPACKE_csyequb_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* s, float* scond, float* amax, - lapack_complex_float* work ); -lapack_int LAPACKE_zsyequb_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* s, double* scond, double* amax, - lapack_complex_double* work ); - -lapack_int LAPACKE_ssyev_work( int matrix_order, char jobz, char uplo, - lapack_int n, float* a, lapack_int lda, float* w, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dsyev_work( int matrix_order, char jobz, char uplo, - lapack_int n, double* a, lapack_int lda, - double* w, double* work, lapack_int lwork ); - -lapack_int LAPACKE_ssyevd_work( int matrix_order, char jobz, char uplo, - lapack_int n, float* a, lapack_int lda, - float* w, float* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_dsyevd_work( int matrix_order, char jobz, char uplo, - lapack_int n, double* a, lapack_int lda, - double* w, double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); - -lapack_int LAPACKE_ssyevr_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, float* a, - lapack_int lda, float vl, float vu, - lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, - lapack_int ldz, lapack_int* isuppz, float* work, - lapack_int lwork, lapack_int* iwork, - lapack_int liwork ); -lapack_int LAPACKE_dsyevr_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, double* a, - lapack_int lda, double vl, double vu, - lapack_int il, lapack_int iu, double abstol, - lapack_int* m, double* w, double* z, - lapack_int ldz, lapack_int* isuppz, - double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); - -lapack_int LAPACKE_ssyevx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, float* a, - lapack_int lda, float vl, float vu, - lapack_int il, lapack_int iu, float abstol, - lapack_int* m, float* w, float* z, - lapack_int ldz, float* work, lapack_int lwork, - lapack_int* iwork, lapack_int* ifail ); -lapack_int LAPACKE_dsyevx_work( int matrix_order, char jobz, char range, - char uplo, lapack_int n, double* a, - lapack_int lda, double vl, double vu, - lapack_int il, lapack_int iu, double abstol, - lapack_int* m, double* w, double* z, - lapack_int ldz, double* work, lapack_int lwork, - lapack_int* iwork, lapack_int* ifail ); - -lapack_int LAPACKE_ssygst_work( int matrix_order, lapack_int itype, char uplo, - lapack_int n, float* a, lapack_int lda, - const float* b, lapack_int ldb ); -lapack_int LAPACKE_dsygst_work( int matrix_order, lapack_int itype, char uplo, - lapack_int n, double* a, lapack_int lda, - const double* b, lapack_int ldb ); - -lapack_int LAPACKE_ssygv_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, float* a, - lapack_int lda, float* b, lapack_int ldb, - float* w, float* work, lapack_int lwork ); -lapack_int LAPACKE_dsygv_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, double* a, - lapack_int lda, double* b, lapack_int ldb, - double* w, double* work, lapack_int lwork ); - -lapack_int LAPACKE_ssygvd_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, float* a, - lapack_int lda, float* b, lapack_int ldb, - float* w, float* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_dsygvd_work( int matrix_order, lapack_int itype, char jobz, - char uplo, lapack_int n, double* a, - lapack_int lda, double* b, lapack_int ldb, - double* w, double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); - -lapack_int LAPACKE_ssygvx_work( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, float* a, - lapack_int lda, float* b, lapack_int ldb, - float vl, float vu, lapack_int il, - lapack_int iu, float abstol, lapack_int* m, - float* w, float* z, lapack_int ldz, float* work, - lapack_int lwork, lapack_int* iwork, - lapack_int* ifail ); -lapack_int LAPACKE_dsygvx_work( int matrix_order, lapack_int itype, char jobz, - char range, char uplo, lapack_int n, double* a, - lapack_int lda, double* b, lapack_int ldb, - double vl, double vu, lapack_int il, - lapack_int iu, double abstol, lapack_int* m, - double* w, double* z, lapack_int ldz, - double* work, lapack_int lwork, - lapack_int* iwork, lapack_int* ifail ); - -lapack_int LAPACKE_ssyrfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - const float* af, lapack_int ldaf, - const lapack_int* ipiv, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* ferr, float* berr, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dsyrfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* a, - lapack_int lda, const double* af, - lapack_int ldaf, const lapack_int* ipiv, - const double* b, lapack_int ldb, double* x, - lapack_int ldx, double* ferr, double* berr, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_csyrfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* af, - lapack_int ldaf, const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_zsyrfs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_complex_double* af, - lapack_int ldaf, const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_ssyrfsx_work( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, const float* a, - lapack_int lda, const float* af, - lapack_int ldaf, const lapack_int* ipiv, - const float* s, const float* b, lapack_int ldb, - float* x, lapack_int ldx, float* rcond, - float* berr, lapack_int n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int nparams, float* params, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dsyrfsx_work( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, const double* a, - lapack_int lda, const double* af, - lapack_int ldaf, const lapack_int* ipiv, - const double* s, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_csyrfsx_work( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* af, - lapack_int ldaf, const lapack_int* ipiv, - const float* s, const lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zsyrfsx_work( int matrix_order, char uplo, char equed, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* af, - lapack_int ldaf, const lapack_int* ipiv, - const double* s, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_ssysv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, float* a, lapack_int lda, - lapack_int* ipiv, float* b, lapack_int ldb, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dsysv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, double* a, lapack_int lda, - lapack_int* ipiv, double* b, lapack_int ldb, - double* work, lapack_int lwork ); -lapack_int LAPACKE_csysv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_float* a, - lapack_int lda, lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zsysv_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, lapack_complex_double* a, - lapack_int lda, lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_ssysvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, const float* a, - lapack_int lda, float* af, lapack_int ldaf, - lapack_int* ipiv, const float* b, - lapack_int ldb, float* x, lapack_int ldx, - float* rcond, float* ferr, float* berr, - float* work, lapack_int lwork, - lapack_int* iwork ); -lapack_int LAPACKE_dsysvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, const double* a, - lapack_int lda, double* af, lapack_int ldaf, - lapack_int* ipiv, const double* b, - lapack_int ldb, double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - double* work, lapack_int lwork, - lapack_int* iwork ); -lapack_int LAPACKE_csysvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - lapack_int* ipiv, const lapack_complex_float* b, - lapack_int ldb, lapack_complex_float* x, - lapack_int ldx, float* rcond, float* ferr, - float* berr, lapack_complex_float* work, - lapack_int lwork, float* rwork ); -lapack_int LAPACKE_zsysvx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - lapack_int* ipiv, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, lapack_int lwork, - double* rwork ); - -lapack_int LAPACKE_ssysvxx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, float* a, - lapack_int lda, float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* s, - float* b, lapack_int ldb, float* x, - lapack_int ldx, float* rcond, float* rpvgrw, - float* berr, lapack_int n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int nparams, float* params, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dsysvxx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, double* a, - lapack_int lda, double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* s, - double* b, lapack_int ldb, double* x, - lapack_int ldx, double* rcond, double* rpvgrw, - double* berr, lapack_int n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int nparams, double* params, - double* work, lapack_int* iwork ); -lapack_int LAPACKE_csysvxx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, float* s, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* x, lapack_int ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int nparams, - float* params, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_zsysvxx_work( int matrix_order, char fact, char uplo, - lapack_int n, lapack_int nrhs, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* af, lapack_int ldaf, - lapack_int* ipiv, char* equed, double* s, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* x, lapack_int ldx, - double* rcond, double* rpvgrw, double* berr, - lapack_int n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int nparams, - double* params, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_ssytrd_work( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int lda, float* d, float* e, - float* tau, float* work, lapack_int lwork ); -lapack_int LAPACKE_dsytrd_work( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int lda, double* d, double* e, - double* tau, double* work, lapack_int lwork ); - -lapack_int LAPACKE_ssytrf_work( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int lda, lapack_int* ipiv, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dsytrf_work( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int lda, lapack_int* ipiv, - double* work, lapack_int lwork ); -lapack_int LAPACKE_csytrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_int* ipiv, lapack_complex_float* work, - lapack_int lwork ); -lapack_int LAPACKE_zsytrf_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_int* ipiv, lapack_complex_double* work, - lapack_int lwork ); - -lapack_int LAPACKE_ssytri_work( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int lda, - const lapack_int* ipiv, float* work ); -lapack_int LAPACKE_dsytri_work( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int lda, - const lapack_int* ipiv, double* work ); -lapack_int LAPACKE_csytri_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_float* work ); -lapack_int LAPACKE_zsytri_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_double* work ); - -lapack_int LAPACKE_ssytrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - const lapack_int* ipiv, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dsytrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* a, - lapack_int lda, const lapack_int* ipiv, - double* b, lapack_int ldb ); -lapack_int LAPACKE_csytrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_zsytrs_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_stbcon_work( int matrix_order, char norm, char uplo, - char diag, lapack_int n, lapack_int kd, - const float* ab, lapack_int ldab, float* rcond, - float* work, lapack_int* iwork ); -lapack_int LAPACKE_dtbcon_work( int matrix_order, char norm, char uplo, - char diag, lapack_int n, lapack_int kd, - const double* ab, lapack_int ldab, - double* rcond, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_ctbcon_work( int matrix_order, char norm, char uplo, - char diag, lapack_int n, lapack_int kd, - const lapack_complex_float* ab, lapack_int ldab, - float* rcond, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_ztbcon_work( int matrix_order, char norm, char uplo, - char diag, lapack_int n, lapack_int kd, - const lapack_complex_double* ab, - lapack_int ldab, double* rcond, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_stbrfs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int kd, - lapack_int nrhs, const float* ab, - lapack_int ldab, const float* b, lapack_int ldb, - const float* x, lapack_int ldx, float* ferr, - float* berr, float* work, lapack_int* iwork ); -lapack_int LAPACKE_dtbrfs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int kd, - lapack_int nrhs, const double* ab, - lapack_int ldab, const double* b, - lapack_int ldb, const double* x, lapack_int ldx, - double* ferr, double* berr, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_ctbrfs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int kd, - lapack_int nrhs, const lapack_complex_float* ab, - lapack_int ldab, const lapack_complex_float* b, - lapack_int ldb, const lapack_complex_float* x, - lapack_int ldx, float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_ztbrfs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int kd, - lapack_int nrhs, - const lapack_complex_double* ab, - lapack_int ldab, const lapack_complex_double* b, - lapack_int ldb, const lapack_complex_double* x, - lapack_int ldx, double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_stbtrs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int kd, - lapack_int nrhs, const float* ab, - lapack_int ldab, float* b, lapack_int ldb ); -lapack_int LAPACKE_dtbtrs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int kd, - lapack_int nrhs, const double* ab, - lapack_int ldab, double* b, lapack_int ldb ); -lapack_int LAPACKE_ctbtrs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int kd, - lapack_int nrhs, const lapack_complex_float* ab, - lapack_int ldab, lapack_complex_float* b, - lapack_int ldb ); -lapack_int LAPACKE_ztbtrs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int kd, - lapack_int nrhs, - const lapack_complex_double* ab, - lapack_int ldab, lapack_complex_double* b, - lapack_int ldb ); - -lapack_int LAPACKE_stfsm_work( int matrix_order, char transr, char side, - char uplo, char trans, char diag, lapack_int m, - lapack_int n, float alpha, const float* a, - float* b, lapack_int ldb ); -lapack_int LAPACKE_dtfsm_work( int matrix_order, char transr, char side, - char uplo, char trans, char diag, lapack_int m, - lapack_int n, double alpha, const double* a, - double* b, lapack_int ldb ); -lapack_int LAPACKE_ctfsm_work( int matrix_order, char transr, char side, - char uplo, char trans, char diag, lapack_int m, - lapack_int n, lapack_complex_float alpha, - const lapack_complex_float* a, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_ztfsm_work( int matrix_order, char transr, char side, - char uplo, char trans, char diag, lapack_int m, - lapack_int n, lapack_complex_double alpha, - const lapack_complex_double* a, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_stftri_work( int matrix_order, char transr, char uplo, - char diag, lapack_int n, float* a ); -lapack_int LAPACKE_dtftri_work( int matrix_order, char transr, char uplo, - char diag, lapack_int n, double* a ); -lapack_int LAPACKE_ctftri_work( int matrix_order, char transr, char uplo, - char diag, lapack_int n, - lapack_complex_float* a ); -lapack_int LAPACKE_ztftri_work( int matrix_order, char transr, char uplo, - char diag, lapack_int n, - lapack_complex_double* a ); - -lapack_int LAPACKE_stfttp_work( int matrix_order, char transr, char uplo, - lapack_int n, const float* arf, float* ap ); -lapack_int LAPACKE_dtfttp_work( int matrix_order, char transr, char uplo, - lapack_int n, const double* arf, double* ap ); -lapack_int LAPACKE_ctfttp_work( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_float* arf, - lapack_complex_float* ap ); -lapack_int LAPACKE_ztfttp_work( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_double* arf, - lapack_complex_double* ap ); - -lapack_int LAPACKE_stfttr_work( int matrix_order, char transr, char uplo, - lapack_int n, const float* arf, float* a, - lapack_int lda ); -lapack_int LAPACKE_dtfttr_work( int matrix_order, char transr, char uplo, - lapack_int n, const double* arf, double* a, - lapack_int lda ); -lapack_int LAPACKE_ctfttr_work( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_float* arf, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_ztfttr_work( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_double* arf, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_stgevc_work( int matrix_order, char side, char howmny, - const lapack_logical* select, lapack_int n, - const float* s, lapack_int lds, const float* p, - lapack_int ldp, float* vl, lapack_int ldvl, - float* vr, lapack_int ldvr, lapack_int mm, - lapack_int* m, float* work ); -lapack_int LAPACKE_dtgevc_work( int matrix_order, char side, char howmny, - const lapack_logical* select, lapack_int n, - const double* s, lapack_int lds, - const double* p, lapack_int ldp, double* vl, - lapack_int ldvl, double* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m, double* work ); -lapack_int LAPACKE_ctgevc_work( int matrix_order, char side, char howmny, - const lapack_logical* select, lapack_int n, - const lapack_complex_float* s, lapack_int lds, - const lapack_complex_float* p, lapack_int ldp, - lapack_complex_float* vl, lapack_int ldvl, - lapack_complex_float* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_ztgevc_work( int matrix_order, char side, char howmny, - const lapack_logical* select, lapack_int n, - const lapack_complex_double* s, lapack_int lds, - const lapack_complex_double* p, lapack_int ldp, - lapack_complex_double* vl, lapack_int ldvl, - lapack_complex_double* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_stgexc_work( int matrix_order, lapack_logical wantq, - lapack_logical wantz, lapack_int n, float* a, - lapack_int lda, float* b, lapack_int ldb, - float* q, lapack_int ldq, float* z, - lapack_int ldz, lapack_int* ifst, - lapack_int* ilst, float* work, - lapack_int lwork ); -lapack_int LAPACKE_dtgexc_work( int matrix_order, lapack_logical wantq, - lapack_logical wantz, lapack_int n, double* a, - lapack_int lda, double* b, lapack_int ldb, - double* q, lapack_int ldq, double* z, - lapack_int ldz, lapack_int* ifst, - lapack_int* ilst, double* work, - lapack_int lwork ); -lapack_int LAPACKE_ctgexc_work( int matrix_order, lapack_logical wantq, - lapack_logical wantz, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* q, lapack_int ldq, - lapack_complex_float* z, lapack_int ldz, - lapack_int ifst, lapack_int ilst ); -lapack_int LAPACKE_ztgexc_work( int matrix_order, lapack_logical wantq, - lapack_logical wantz, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* z, lapack_int ldz, - lapack_int ifst, lapack_int ilst ); - -lapack_int LAPACKE_stgsen_work( int matrix_order, lapack_int ijob, - lapack_logical wantq, lapack_logical wantz, - const lapack_logical* select, lapack_int n, - float* a, lapack_int lda, float* b, - lapack_int ldb, float* alphar, float* alphai, - float* beta, float* q, lapack_int ldq, float* z, - lapack_int ldz, lapack_int* m, float* pl, - float* pr, float* dif, float* work, - lapack_int lwork, lapack_int* iwork, - lapack_int liwork ); -lapack_int LAPACKE_dtgsen_work( int matrix_order, lapack_int ijob, - lapack_logical wantq, lapack_logical wantz, - const lapack_logical* select, lapack_int n, - double* a, lapack_int lda, double* b, - lapack_int ldb, double* alphar, double* alphai, - double* beta, double* q, lapack_int ldq, - double* z, lapack_int ldz, lapack_int* m, - double* pl, double* pr, double* dif, - double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_ctgsen_work( int matrix_order, lapack_int ijob, - lapack_logical wantq, lapack_logical wantz, - const lapack_logical* select, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* alpha, - lapack_complex_float* beta, - lapack_complex_float* q, lapack_int ldq, - lapack_complex_float* z, lapack_int ldz, - lapack_int* m, float* pl, float* pr, float* dif, - lapack_complex_float* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_ztgsen_work( int matrix_order, lapack_int ijob, - lapack_logical wantq, lapack_logical wantz, - const lapack_logical* select, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* alpha, - lapack_complex_double* beta, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* z, lapack_int ldz, - lapack_int* m, double* pl, double* pr, - double* dif, lapack_complex_double* work, - lapack_int lwork, lapack_int* iwork, - lapack_int liwork ); - -lapack_int LAPACKE_stgsja_work( int matrix_order, char jobu, char jobv, - char jobq, lapack_int m, lapack_int p, - lapack_int n, lapack_int k, lapack_int l, - float* a, lapack_int lda, float* b, - lapack_int ldb, float tola, float tolb, - float* alpha, float* beta, float* u, - lapack_int ldu, float* v, lapack_int ldv, - float* q, lapack_int ldq, float* work, - lapack_int* ncycle ); -lapack_int LAPACKE_dtgsja_work( int matrix_order, char jobu, char jobv, - char jobq, lapack_int m, lapack_int p, - lapack_int n, lapack_int k, lapack_int l, - double* a, lapack_int lda, double* b, - lapack_int ldb, double tola, double tolb, - double* alpha, double* beta, double* u, - lapack_int ldu, double* v, lapack_int ldv, - double* q, lapack_int ldq, double* work, - lapack_int* ncycle ); -lapack_int LAPACKE_ctgsja_work( int matrix_order, char jobu, char jobv, - char jobq, lapack_int m, lapack_int p, - lapack_int n, lapack_int k, lapack_int l, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - float tola, float tolb, float* alpha, - float* beta, lapack_complex_float* u, - lapack_int ldu, lapack_complex_float* v, - lapack_int ldv, lapack_complex_float* q, - lapack_int ldq, lapack_complex_float* work, - lapack_int* ncycle ); -lapack_int LAPACKE_ztgsja_work( int matrix_order, char jobu, char jobv, - char jobq, lapack_int m, lapack_int p, - lapack_int n, lapack_int k, lapack_int l, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - double tola, double tolb, double* alpha, - double* beta, lapack_complex_double* u, - lapack_int ldu, lapack_complex_double* v, - lapack_int ldv, lapack_complex_double* q, - lapack_int ldq, lapack_complex_double* work, - lapack_int* ncycle ); - -lapack_int LAPACKE_stgsna_work( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const float* a, lapack_int lda, const float* b, - lapack_int ldb, const float* vl, - lapack_int ldvl, const float* vr, - lapack_int ldvr, float* s, float* dif, - lapack_int mm, lapack_int* m, float* work, - lapack_int lwork, lapack_int* iwork ); -lapack_int LAPACKE_dtgsna_work( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const double* a, lapack_int lda, - const double* b, lapack_int ldb, - const double* vl, lapack_int ldvl, - const double* vr, lapack_int ldvr, double* s, - double* dif, lapack_int mm, lapack_int* m, - double* work, lapack_int lwork, - lapack_int* iwork ); -lapack_int LAPACKE_ctgsna_work( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* b, lapack_int ldb, - const lapack_complex_float* vl, lapack_int ldvl, - const lapack_complex_float* vr, lapack_int ldvr, - float* s, float* dif, lapack_int mm, - lapack_int* m, lapack_complex_float* work, - lapack_int lwork, lapack_int* iwork ); -lapack_int LAPACKE_ztgsna_work( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* b, lapack_int ldb, - const lapack_complex_double* vl, - lapack_int ldvl, - const lapack_complex_double* vr, - lapack_int ldvr, double* s, double* dif, - lapack_int mm, lapack_int* m, - lapack_complex_double* work, lapack_int lwork, - lapack_int* iwork ); - -lapack_int LAPACKE_stgsyl_work( int matrix_order, char trans, lapack_int ijob, - lapack_int m, lapack_int n, const float* a, - lapack_int lda, const float* b, lapack_int ldb, - float* c, lapack_int ldc, const float* d, - lapack_int ldd, const float* e, lapack_int lde, - float* f, lapack_int ldf, float* scale, - float* dif, float* work, lapack_int lwork, - lapack_int* iwork ); -lapack_int LAPACKE_dtgsyl_work( int matrix_order, char trans, lapack_int ijob, - lapack_int m, lapack_int n, const double* a, - lapack_int lda, const double* b, lapack_int ldb, - double* c, lapack_int ldc, const double* d, - lapack_int ldd, const double* e, lapack_int lde, - double* f, lapack_int ldf, double* scale, - double* dif, double* work, lapack_int lwork, - lapack_int* iwork ); -lapack_int LAPACKE_ctgsyl_work( int matrix_order, char trans, lapack_int ijob, - lapack_int m, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* c, lapack_int ldc, - const lapack_complex_float* d, lapack_int ldd, - const lapack_complex_float* e, lapack_int lde, - lapack_complex_float* f, lapack_int ldf, - float* scale, float* dif, - lapack_complex_float* work, lapack_int lwork, - lapack_int* iwork ); -lapack_int LAPACKE_ztgsyl_work( int matrix_order, char trans, lapack_int ijob, - lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* c, lapack_int ldc, - const lapack_complex_double* d, lapack_int ldd, - const lapack_complex_double* e, lapack_int lde, - lapack_complex_double* f, lapack_int ldf, - double* scale, double* dif, - lapack_complex_double* work, lapack_int lwork, - lapack_int* iwork ); - -lapack_int LAPACKE_stpcon_work( int matrix_order, char norm, char uplo, - char diag, lapack_int n, const float* ap, - float* rcond, float* work, lapack_int* iwork ); -lapack_int LAPACKE_dtpcon_work( int matrix_order, char norm, char uplo, - char diag, lapack_int n, const double* ap, - double* rcond, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_ctpcon_work( int matrix_order, char norm, char uplo, - char diag, lapack_int n, - const lapack_complex_float* ap, float* rcond, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_ztpcon_work( int matrix_order, char norm, char uplo, - char diag, lapack_int n, - const lapack_complex_double* ap, double* rcond, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_stprfs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const float* ap, const float* b, lapack_int ldb, - const float* x, lapack_int ldx, float* ferr, - float* berr, float* work, lapack_int* iwork ); -lapack_int LAPACKE_dtprfs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const double* ap, const double* b, - lapack_int ldb, const double* x, lapack_int ldx, - double* ferr, double* berr, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_ctprfs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const lapack_complex_float* ap, - const lapack_complex_float* b, lapack_int ldb, - const lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_ztprfs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const lapack_complex_double* ap, - const lapack_complex_double* b, lapack_int ldb, - const lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_stptri_work( int matrix_order, char uplo, char diag, - lapack_int n, float* ap ); -lapack_int LAPACKE_dtptri_work( int matrix_order, char uplo, char diag, - lapack_int n, double* ap ); -lapack_int LAPACKE_ctptri_work( int matrix_order, char uplo, char diag, - lapack_int n, lapack_complex_float* ap ); -lapack_int LAPACKE_ztptri_work( int matrix_order, char uplo, char diag, - lapack_int n, lapack_complex_double* ap ); - -lapack_int LAPACKE_stptrs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const float* ap, float* b, lapack_int ldb ); -lapack_int LAPACKE_dtptrs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const double* ap, double* b, lapack_int ldb ); -lapack_int LAPACKE_ctptrs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const lapack_complex_float* ap, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_ztptrs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const lapack_complex_double* ap, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_stpttf_work( int matrix_order, char transr, char uplo, - lapack_int n, const float* ap, float* arf ); -lapack_int LAPACKE_dtpttf_work( int matrix_order, char transr, char uplo, - lapack_int n, const double* ap, double* arf ); -lapack_int LAPACKE_ctpttf_work( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_float* ap, - lapack_complex_float* arf ); -lapack_int LAPACKE_ztpttf_work( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_double* ap, - lapack_complex_double* arf ); - -lapack_int LAPACKE_stpttr_work( int matrix_order, char uplo, lapack_int n, - const float* ap, float* a, lapack_int lda ); -lapack_int LAPACKE_dtpttr_work( int matrix_order, char uplo, lapack_int n, - const double* ap, double* a, lapack_int lda ); -lapack_int LAPACKE_ctpttr_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* ap, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_ztpttr_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* ap, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_strcon_work( int matrix_order, char norm, char uplo, - char diag, lapack_int n, const float* a, - lapack_int lda, float* rcond, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dtrcon_work( int matrix_order, char norm, char uplo, - char diag, lapack_int n, const double* a, - lapack_int lda, double* rcond, double* work, - lapack_int* iwork ); -lapack_int LAPACKE_ctrcon_work( int matrix_order, char norm, char uplo, - char diag, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - float* rcond, lapack_complex_float* work, - float* rwork ); -lapack_int LAPACKE_ztrcon_work( int matrix_order, char norm, char uplo, - char diag, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - double* rcond, lapack_complex_double* work, - double* rwork ); - -lapack_int LAPACKE_strevc_work( int matrix_order, char side, char howmny, - lapack_logical* select, lapack_int n, - const float* t, lapack_int ldt, float* vl, - lapack_int ldvl, float* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m, float* work ); -lapack_int LAPACKE_dtrevc_work( int matrix_order, char side, char howmny, - lapack_logical* select, lapack_int n, - const double* t, lapack_int ldt, double* vl, - lapack_int ldvl, double* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m, double* work ); -lapack_int LAPACKE_ctrevc_work( int matrix_order, char side, char howmny, - const lapack_logical* select, lapack_int n, - lapack_complex_float* t, lapack_int ldt, - lapack_complex_float* vl, lapack_int ldvl, - lapack_complex_float* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_ztrevc_work( int matrix_order, char side, char howmny, - const lapack_logical* select, lapack_int n, - lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* vl, lapack_int ldvl, - lapack_complex_double* vr, lapack_int ldvr, - lapack_int mm, lapack_int* m, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_strexc_work( int matrix_order, char compq, lapack_int n, - float* t, lapack_int ldt, float* q, - lapack_int ldq, lapack_int* ifst, - lapack_int* ilst, float* work ); -lapack_int LAPACKE_dtrexc_work( int matrix_order, char compq, lapack_int n, - double* t, lapack_int ldt, double* q, - lapack_int ldq, lapack_int* ifst, - lapack_int* ilst, double* work ); -lapack_int LAPACKE_ctrexc_work( int matrix_order, char compq, lapack_int n, - lapack_complex_float* t, lapack_int ldt, - lapack_complex_float* q, lapack_int ldq, - lapack_int ifst, lapack_int ilst ); -lapack_int LAPACKE_ztrexc_work( int matrix_order, char compq, lapack_int n, - lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* q, lapack_int ldq, - lapack_int ifst, lapack_int ilst ); - -lapack_int LAPACKE_strrfs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const float* a, lapack_int lda, const float* b, - lapack_int ldb, const float* x, lapack_int ldx, - float* ferr, float* berr, float* work, - lapack_int* iwork ); -lapack_int LAPACKE_dtrrfs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const double* a, lapack_int lda, - const double* b, lapack_int ldb, - const double* x, lapack_int ldx, double* ferr, - double* berr, double* work, lapack_int* iwork ); -lapack_int LAPACKE_ctrrfs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* b, lapack_int ldb, - const lapack_complex_float* x, lapack_int ldx, - float* ferr, float* berr, - lapack_complex_float* work, float* rwork ); -lapack_int LAPACKE_ztrrfs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* b, lapack_int ldb, - const lapack_complex_double* x, lapack_int ldx, - double* ferr, double* berr, - lapack_complex_double* work, double* rwork ); - -lapack_int LAPACKE_strsen_work( int matrix_order, char job, char compq, - const lapack_logical* select, lapack_int n, - float* t, lapack_int ldt, float* q, - lapack_int ldq, float* wr, float* wi, - lapack_int* m, float* s, float* sep, - float* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_dtrsen_work( int matrix_order, char job, char compq, - const lapack_logical* select, lapack_int n, - double* t, lapack_int ldt, double* q, - lapack_int ldq, double* wr, double* wi, - lapack_int* m, double* s, double* sep, - double* work, lapack_int lwork, - lapack_int* iwork, lapack_int liwork ); -lapack_int LAPACKE_ctrsen_work( int matrix_order, char job, char compq, - const lapack_logical* select, lapack_int n, - lapack_complex_float* t, lapack_int ldt, - lapack_complex_float* q, lapack_int ldq, - lapack_complex_float* w, lapack_int* m, - float* s, float* sep, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_ztrsen_work( int matrix_order, char job, char compq, - const lapack_logical* select, lapack_int n, - lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* w, lapack_int* m, - double* s, double* sep, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_strsna_work( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const float* t, lapack_int ldt, const float* vl, - lapack_int ldvl, const float* vr, - lapack_int ldvr, float* s, float* sep, - lapack_int mm, lapack_int* m, float* work, - lapack_int ldwork, lapack_int* iwork ); -lapack_int LAPACKE_dtrsna_work( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const double* t, lapack_int ldt, - const double* vl, lapack_int ldvl, - const double* vr, lapack_int ldvr, double* s, - double* sep, lapack_int mm, lapack_int* m, - double* work, lapack_int ldwork, - lapack_int* iwork ); -lapack_int LAPACKE_ctrsna_work( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const lapack_complex_float* t, lapack_int ldt, - const lapack_complex_float* vl, lapack_int ldvl, - const lapack_complex_float* vr, lapack_int ldvr, - float* s, float* sep, lapack_int mm, - lapack_int* m, lapack_complex_float* work, - lapack_int ldwork, float* rwork ); -lapack_int LAPACKE_ztrsna_work( int matrix_order, char job, char howmny, - const lapack_logical* select, lapack_int n, - const lapack_complex_double* t, lapack_int ldt, - const lapack_complex_double* vl, - lapack_int ldvl, - const lapack_complex_double* vr, - lapack_int ldvr, double* s, double* sep, - lapack_int mm, lapack_int* m, - lapack_complex_double* work, lapack_int ldwork, - double* rwork ); - -lapack_int LAPACKE_strsyl_work( int matrix_order, char trana, char tranb, - lapack_int isgn, lapack_int m, lapack_int n, - const float* a, lapack_int lda, const float* b, - lapack_int ldb, float* c, lapack_int ldc, - float* scale ); -lapack_int LAPACKE_dtrsyl_work( int matrix_order, char trana, char tranb, - lapack_int isgn, lapack_int m, lapack_int n, - const double* a, lapack_int lda, - const double* b, lapack_int ldb, double* c, - lapack_int ldc, double* scale ); -lapack_int LAPACKE_ctrsyl_work( int matrix_order, char trana, char tranb, - lapack_int isgn, lapack_int m, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* c, lapack_int ldc, - float* scale ); -lapack_int LAPACKE_ztrsyl_work( int matrix_order, char trana, char tranb, - lapack_int isgn, lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* c, lapack_int ldc, - double* scale ); - -lapack_int LAPACKE_strtri_work( int matrix_order, char uplo, char diag, - lapack_int n, float* a, lapack_int lda ); -lapack_int LAPACKE_dtrtri_work( int matrix_order, char uplo, char diag, - lapack_int n, double* a, lapack_int lda ); -lapack_int LAPACKE_ctrtri_work( int matrix_order, char uplo, char diag, - lapack_int n, lapack_complex_float* a, - lapack_int lda ); -lapack_int LAPACKE_ztrtri_work( int matrix_order, char uplo, char diag, - lapack_int n, lapack_complex_double* a, - lapack_int lda ); - -lapack_int LAPACKE_strtrs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const float* a, lapack_int lda, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dtrtrs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const double* a, lapack_int lda, double* b, - lapack_int ldb ); -lapack_int LAPACKE_ctrtrs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_ztrtrs_work( int matrix_order, char uplo, char trans, - char diag, lapack_int n, lapack_int nrhs, - const lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_strttf_work( int matrix_order, char transr, char uplo, - lapack_int n, const float* a, lapack_int lda, - float* arf ); -lapack_int LAPACKE_dtrttf_work( int matrix_order, char transr, char uplo, - lapack_int n, const double* a, lapack_int lda, - double* arf ); -lapack_int LAPACKE_ctrttf_work( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_float* a, - lapack_int lda, lapack_complex_float* arf ); -lapack_int LAPACKE_ztrttf_work( int matrix_order, char transr, char uplo, - lapack_int n, const lapack_complex_double* a, - lapack_int lda, lapack_complex_double* arf ); - -lapack_int LAPACKE_strttp_work( int matrix_order, char uplo, lapack_int n, - const float* a, lapack_int lda, float* ap ); -lapack_int LAPACKE_dtrttp_work( int matrix_order, char uplo, lapack_int n, - const double* a, lapack_int lda, double* ap ); -lapack_int LAPACKE_ctrttp_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - lapack_complex_float* ap ); -lapack_int LAPACKE_ztrttp_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - lapack_complex_double* ap ); - -lapack_int LAPACKE_stzrzf_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* tau, - float* work, lapack_int lwork ); -lapack_int LAPACKE_dtzrzf_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* tau, - double* work, lapack_int lwork ); -lapack_int LAPACKE_ctzrzf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_ztzrzf_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cungbr_work( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int k, - lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zungbr_work( int matrix_order, char vect, lapack_int m, - lapack_int n, lapack_int k, - lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cunghr_work( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zunghr_work( int matrix_order, lapack_int n, lapack_int ilo, - lapack_int ihi, lapack_complex_double* a, - lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cunglq_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zunglq_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_double* a, - lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cungql_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zungql_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_double* a, - lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cungqr_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zungqr_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_double* a, - lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cungrq_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zungrq_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int k, lapack_complex_double* a, - lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cungtr_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zungtr_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cunmbr_work( int matrix_order, char vect, char side, - char trans, lapack_int m, lapack_int n, - lapack_int k, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zunmbr_work( int matrix_order, char vect, char side, - char trans, lapack_int m, lapack_int n, - lapack_int k, const lapack_complex_double* a, - lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cunmhr_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int ilo, - lapack_int ihi, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zunmhr_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int ilo, - lapack_int ihi, const lapack_complex_double* a, - lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cunmlq_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zunmlq_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cunmql_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zunmql_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cunmqr_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zunmqr_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cunmrq_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zunmrq_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cunmrz_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, const lapack_complex_float* a, - lapack_int lda, const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zunmrz_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, const lapack_complex_double* a, - lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cunmtr_work( int matrix_order, char side, char uplo, - char trans, lapack_int m, lapack_int n, - const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zunmtr_work( int matrix_order, char side, char uplo, - char trans, lapack_int m, lapack_int n, - const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc, - lapack_complex_double* work, lapack_int lwork ); - -lapack_int LAPACKE_cupgtr_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_float* ap, - const lapack_complex_float* tau, - lapack_complex_float* q, lapack_int ldq, - lapack_complex_float* work ); -lapack_int LAPACKE_zupgtr_work( int matrix_order, char uplo, lapack_int n, - const lapack_complex_double* ap, - const lapack_complex_double* tau, - lapack_complex_double* q, lapack_int ldq, - lapack_complex_double* work ); - -lapack_int LAPACKE_cupmtr_work( int matrix_order, char side, char uplo, - char trans, lapack_int m, lapack_int n, - const lapack_complex_float* ap, - const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int ldc, - lapack_complex_float* work ); -lapack_int LAPACKE_zupmtr_work( int matrix_order, char side, char uplo, - char trans, lapack_int m, lapack_int n, - const lapack_complex_double* ap, - const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int ldc, - lapack_complex_double* work ); - -lapack_int LAPACKE_claghe( int matrix_order, lapack_int n, lapack_int k, - const float* d, lapack_complex_float* a, - lapack_int lda, lapack_int* iseed ); -lapack_int LAPACKE_zlaghe( int matrix_order, lapack_int n, lapack_int k, - const double* d, lapack_complex_double* a, - lapack_int lda, lapack_int* iseed ); - -lapack_int LAPACKE_slagsy( int matrix_order, lapack_int n, lapack_int k, - const float* d, float* a, lapack_int lda, - lapack_int* iseed ); -lapack_int LAPACKE_dlagsy( int matrix_order, lapack_int n, lapack_int k, - const double* d, double* a, lapack_int lda, - lapack_int* iseed ); -lapack_int LAPACKE_clagsy( int matrix_order, lapack_int n, lapack_int k, - const float* d, lapack_complex_float* a, - lapack_int lda, lapack_int* iseed ); -lapack_int LAPACKE_zlagsy( int matrix_order, lapack_int n, lapack_int k, - const double* d, lapack_complex_double* a, - lapack_int lda, lapack_int* iseed ); - -lapack_int LAPACKE_slapmr( int matrix_order, lapack_logical forwrd, - lapack_int m, lapack_int n, float* x, lapack_int ldx, - lapack_int* k ); -lapack_int LAPACKE_dlapmr( int matrix_order, lapack_logical forwrd, - lapack_int m, lapack_int n, double* x, - lapack_int ldx, lapack_int* k ); -lapack_int LAPACKE_clapmr( int matrix_order, lapack_logical forwrd, - lapack_int m, lapack_int n, lapack_complex_float* x, - lapack_int ldx, lapack_int* k ); -lapack_int LAPACKE_zlapmr( int matrix_order, lapack_logical forwrd, - lapack_int m, lapack_int n, lapack_complex_double* x, - lapack_int ldx, lapack_int* k ); - - -float LAPACKE_slapy2( float x, float y ); -double LAPACKE_dlapy2( double x, double y ); - -float LAPACKE_slapy3( float x, float y, float z ); -double LAPACKE_dlapy3( double x, double y, double z ); - -lapack_int LAPACKE_slartgp( float f, float g, float* cs, float* sn, float* r ); -lapack_int LAPACKE_dlartgp( double f, double g, double* cs, double* sn, - double* r ); - -lapack_int LAPACKE_slartgs( float x, float y, float sigma, float* cs, - float* sn ); -lapack_int LAPACKE_dlartgs( double x, double y, double sigma, double* cs, - double* sn ); - - -//LAPACK 3.3.0 -lapack_int LAPACKE_cbbcsd( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, lapack_int m, - lapack_int p, lapack_int q, float* theta, float* phi, - lapack_complex_float* u1, lapack_int ldu1, - lapack_complex_float* u2, lapack_int ldu2, - lapack_complex_float* v1t, lapack_int ldv1t, - lapack_complex_float* v2t, lapack_int ldv2t, - float* b11d, float* b11e, float* b12d, float* b12e, - float* b21d, float* b21e, float* b22d, float* b22e ); -lapack_int LAPACKE_cbbcsd_work( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, - lapack_int m, lapack_int p, lapack_int q, - float* theta, float* phi, - lapack_complex_float* u1, lapack_int ldu1, - lapack_complex_float* u2, lapack_int ldu2, - lapack_complex_float* v1t, lapack_int ldv1t, - lapack_complex_float* v2t, lapack_int ldv2t, - float* b11d, float* b11e, float* b12d, - float* b12e, float* b21d, float* b21e, - float* b22d, float* b22e, float* rwork, - lapack_int lrwork ); -lapack_int LAPACKE_cheswapr( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int i1, - lapack_int i2 ); -lapack_int LAPACKE_cheswapr_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int i1, - lapack_int i2 ); -lapack_int LAPACKE_chetri2( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv ); -lapack_int LAPACKE_chetri2_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_chetri2x( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, lapack_int nb ); -lapack_int LAPACKE_chetri2x_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_float* work, lapack_int nb ); -lapack_int LAPACKE_chetrs2( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_chetrs2_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* work ); -lapack_int LAPACKE_csyconv( int matrix_order, char uplo, char way, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv ); -lapack_int LAPACKE_csyconv_work( int matrix_order, char uplo, char way, - lapack_int n, lapack_complex_float* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_float* work ); -lapack_int LAPACKE_csyswapr( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int i1, - lapack_int i2 ); -lapack_int LAPACKE_csyswapr_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int i1, - lapack_int i2 ); -lapack_int LAPACKE_csytri2( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv ); -lapack_int LAPACKE_csytri2_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_csytri2x( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, lapack_int nb ); -lapack_int LAPACKE_csytri2x_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_float* work, lapack_int nb ); -lapack_int LAPACKE_csytrs2( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_csytrs2_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_float* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* work ); -lapack_int LAPACKE_cunbdb( int matrix_order, char trans, char signs, - lapack_int m, lapack_int p, lapack_int q, - lapack_complex_float* x11, lapack_int ldx11, - lapack_complex_float* x12, lapack_int ldx12, - lapack_complex_float* x21, lapack_int ldx21, - lapack_complex_float* x22, lapack_int ldx22, - float* theta, float* phi, - lapack_complex_float* taup1, - lapack_complex_float* taup2, - lapack_complex_float* tauq1, - lapack_complex_float* tauq2 ); -lapack_int LAPACKE_cunbdb_work( int matrix_order, char trans, char signs, - lapack_int m, lapack_int p, lapack_int q, - lapack_complex_float* x11, lapack_int ldx11, - lapack_complex_float* x12, lapack_int ldx12, - lapack_complex_float* x21, lapack_int ldx21, - lapack_complex_float* x22, lapack_int ldx22, - float* theta, float* phi, - lapack_complex_float* taup1, - lapack_complex_float* taup2, - lapack_complex_float* tauq1, - lapack_complex_float* tauq2, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_cuncsd( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, char signs, - lapack_int m, lapack_int p, lapack_int q, - lapack_complex_float* x11, lapack_int ldx11, - lapack_complex_float* x12, lapack_int ldx12, - lapack_complex_float* x21, lapack_int ldx21, - lapack_complex_float* x22, lapack_int ldx22, - float* theta, lapack_complex_float* u1, - lapack_int ldu1, lapack_complex_float* u2, - lapack_int ldu2, lapack_complex_float* v1t, - lapack_int ldv1t, lapack_complex_float* v2t, - lapack_int ldv2t ); -lapack_int LAPACKE_cuncsd_work( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, - char signs, lapack_int m, lapack_int p, - lapack_int q, lapack_complex_float* x11, - lapack_int ldx11, lapack_complex_float* x12, - lapack_int ldx12, lapack_complex_float* x21, - lapack_int ldx21, lapack_complex_float* x22, - lapack_int ldx22, float* theta, - lapack_complex_float* u1, lapack_int ldu1, - lapack_complex_float* u2, lapack_int ldu2, - lapack_complex_float* v1t, lapack_int ldv1t, - lapack_complex_float* v2t, lapack_int ldv2t, - lapack_complex_float* work, lapack_int lwork, - float* rwork, lapack_int lrwork, - lapack_int* iwork ); -lapack_int LAPACKE_dbbcsd( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, lapack_int m, - lapack_int p, lapack_int q, double* theta, - double* phi, double* u1, lapack_int ldu1, double* u2, - lapack_int ldu2, double* v1t, lapack_int ldv1t, - double* v2t, lapack_int ldv2t, double* b11d, - double* b11e, double* b12d, double* b12e, - double* b21d, double* b21e, double* b22d, - double* b22e ); -lapack_int LAPACKE_dbbcsd_work( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, - lapack_int m, lapack_int p, lapack_int q, - double* theta, double* phi, double* u1, - lapack_int ldu1, double* u2, lapack_int ldu2, - double* v1t, lapack_int ldv1t, double* v2t, - lapack_int ldv2t, double* b11d, double* b11e, - double* b12d, double* b12e, double* b21d, - double* b21e, double* b22d, double* b22e, - double* work, lapack_int lwork ); -lapack_int LAPACKE_dorbdb( int matrix_order, char trans, char signs, - lapack_int m, lapack_int p, lapack_int q, - double* x11, lapack_int ldx11, double* x12, - lapack_int ldx12, double* x21, lapack_int ldx21, - double* x22, lapack_int ldx22, double* theta, - double* phi, double* taup1, double* taup2, - double* tauq1, double* tauq2 ); -lapack_int LAPACKE_dorbdb_work( int matrix_order, char trans, char signs, - lapack_int m, lapack_int p, lapack_int q, - double* x11, lapack_int ldx11, double* x12, - lapack_int ldx12, double* x21, lapack_int ldx21, - double* x22, lapack_int ldx22, double* theta, - double* phi, double* taup1, double* taup2, - double* tauq1, double* tauq2, double* work, - lapack_int lwork ); -lapack_int LAPACKE_dorcsd( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, char signs, - lapack_int m, lapack_int p, lapack_int q, - double* x11, lapack_int ldx11, double* x12, - lapack_int ldx12, double* x21, lapack_int ldx21, - double* x22, lapack_int ldx22, double* theta, - double* u1, lapack_int ldu1, double* u2, - lapack_int ldu2, double* v1t, lapack_int ldv1t, - double* v2t, lapack_int ldv2t ); -lapack_int LAPACKE_dorcsd_work( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, - char signs, lapack_int m, lapack_int p, - lapack_int q, double* x11, lapack_int ldx11, - double* x12, lapack_int ldx12, double* x21, - lapack_int ldx21, double* x22, lapack_int ldx22, - double* theta, double* u1, lapack_int ldu1, - double* u2, lapack_int ldu2, double* v1t, - lapack_int ldv1t, double* v2t, lapack_int ldv2t, - double* work, lapack_int lwork, - lapack_int* iwork ); -lapack_int LAPACKE_dsyconv( int matrix_order, char uplo, char way, lapack_int n, - double* a, lapack_int lda, const lapack_int* ipiv ); -lapack_int LAPACKE_dsyconv_work( int matrix_order, char uplo, char way, - lapack_int n, double* a, lapack_int lda, - const lapack_int* ipiv, double* work ); -lapack_int LAPACKE_dsyswapr( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int i1, lapack_int i2 ); -lapack_int LAPACKE_dsyswapr_work( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int i1, lapack_int i2 ); -lapack_int LAPACKE_dsytri2( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int lda, const lapack_int* ipiv ); -lapack_int LAPACKE_dsytri2_work( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_double* work, lapack_int lwork ); -lapack_int LAPACKE_dsytri2x( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int lda, const lapack_int* ipiv, - lapack_int nb ); -lapack_int LAPACKE_dsytri2x_work( int matrix_order, char uplo, lapack_int n, - double* a, lapack_int lda, - const lapack_int* ipiv, double* work, - lapack_int nb ); -lapack_int LAPACKE_dsytrs2( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* a, lapack_int lda, - const lapack_int* ipiv, double* b, lapack_int ldb ); -lapack_int LAPACKE_dsytrs2_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const double* a, - lapack_int lda, const lapack_int* ipiv, - double* b, lapack_int ldb, double* work ); -lapack_int LAPACKE_sbbcsd( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, lapack_int m, - lapack_int p, lapack_int q, float* theta, float* phi, - float* u1, lapack_int ldu1, float* u2, - lapack_int ldu2, float* v1t, lapack_int ldv1t, - float* v2t, lapack_int ldv2t, float* b11d, - float* b11e, float* b12d, float* b12e, float* b21d, - float* b21e, float* b22d, float* b22e ); -lapack_int LAPACKE_sbbcsd_work( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, - lapack_int m, lapack_int p, lapack_int q, - float* theta, float* phi, float* u1, - lapack_int ldu1, float* u2, lapack_int ldu2, - float* v1t, lapack_int ldv1t, float* v2t, - lapack_int ldv2t, float* b11d, float* b11e, - float* b12d, float* b12e, float* b21d, - float* b21e, float* b22d, float* b22e, - float* work, lapack_int lwork ); -lapack_int LAPACKE_sorbdb( int matrix_order, char trans, char signs, - lapack_int m, lapack_int p, lapack_int q, float* x11, - lapack_int ldx11, float* x12, lapack_int ldx12, - float* x21, lapack_int ldx21, float* x22, - lapack_int ldx22, float* theta, float* phi, - float* taup1, float* taup2, float* tauq1, - float* tauq2 ); -lapack_int LAPACKE_sorbdb_work( int matrix_order, char trans, char signs, - lapack_int m, lapack_int p, lapack_int q, - float* x11, lapack_int ldx11, float* x12, - lapack_int ldx12, float* x21, lapack_int ldx21, - float* x22, lapack_int ldx22, float* theta, - float* phi, float* taup1, float* taup2, - float* tauq1, float* tauq2, float* work, - lapack_int lwork ); -lapack_int LAPACKE_sorcsd( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, char signs, - lapack_int m, lapack_int p, lapack_int q, float* x11, - lapack_int ldx11, float* x12, lapack_int ldx12, - float* x21, lapack_int ldx21, float* x22, - lapack_int ldx22, float* theta, float* u1, - lapack_int ldu1, float* u2, lapack_int ldu2, - float* v1t, lapack_int ldv1t, float* v2t, - lapack_int ldv2t ); -lapack_int LAPACKE_sorcsd_work( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, - char signs, lapack_int m, lapack_int p, - lapack_int q, float* x11, lapack_int ldx11, - float* x12, lapack_int ldx12, float* x21, - lapack_int ldx21, float* x22, lapack_int ldx22, - float* theta, float* u1, lapack_int ldu1, - float* u2, lapack_int ldu2, float* v1t, - lapack_int ldv1t, float* v2t, lapack_int ldv2t, - float* work, lapack_int lwork, - lapack_int* iwork ); -lapack_int LAPACKE_ssyconv( int matrix_order, char uplo, char way, lapack_int n, - float* a, lapack_int lda, const lapack_int* ipiv ); -lapack_int LAPACKE_ssyconv_work( int matrix_order, char uplo, char way, - lapack_int n, float* a, lapack_int lda, - const lapack_int* ipiv, float* work ); -lapack_int LAPACKE_ssyswapr( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int i1, lapack_int i2 ); -lapack_int LAPACKE_ssyswapr_work( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int i1, lapack_int i2 ); -lapack_int LAPACKE_ssytri2( int matrix_order, char uplo, lapack_int n, float* a, - lapack_int lda, const lapack_int* ipiv ); -lapack_int LAPACKE_ssytri2_work( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_ssytri2x( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int lda, const lapack_int* ipiv, - lapack_int nb ); -lapack_int LAPACKE_ssytri2x_work( int matrix_order, char uplo, lapack_int n, - float* a, lapack_int lda, - const lapack_int* ipiv, float* work, - lapack_int nb ); -lapack_int LAPACKE_ssytrs2( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* a, lapack_int lda, - const lapack_int* ipiv, float* b, lapack_int ldb ); -lapack_int LAPACKE_ssytrs2_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const float* a, - lapack_int lda, const lapack_int* ipiv, - float* b, lapack_int ldb, float* work ); -lapack_int LAPACKE_zbbcsd( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, lapack_int m, - lapack_int p, lapack_int q, double* theta, - double* phi, lapack_complex_double* u1, - lapack_int ldu1, lapack_complex_double* u2, - lapack_int ldu2, lapack_complex_double* v1t, - lapack_int ldv1t, lapack_complex_double* v2t, - lapack_int ldv2t, double* b11d, double* b11e, - double* b12d, double* b12e, double* b21d, - double* b21e, double* b22d, double* b22e ); -lapack_int LAPACKE_zbbcsd_work( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, - lapack_int m, lapack_int p, lapack_int q, - double* theta, double* phi, - lapack_complex_double* u1, lapack_int ldu1, - lapack_complex_double* u2, lapack_int ldu2, - lapack_complex_double* v1t, lapack_int ldv1t, - lapack_complex_double* v2t, lapack_int ldv2t, - double* b11d, double* b11e, double* b12d, - double* b12e, double* b21d, double* b21e, - double* b22d, double* b22e, double* rwork, - lapack_int lrwork ); -lapack_int LAPACKE_zheswapr( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int i1, - lapack_int i2 ); -lapack_int LAPACKE_zheswapr_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int i1, - lapack_int i2 ); -lapack_int LAPACKE_zhetri2( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv ); -lapack_int LAPACKE_zhetri2_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_double* work, lapack_int lwork ); -lapack_int LAPACKE_zhetri2x( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, lapack_int nb ); -lapack_int LAPACKE_zhetri2x_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_double* work, lapack_int nb ); -lapack_int LAPACKE_zhetrs2( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); -lapack_int LAPACKE_zhetrs2_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* work ); -lapack_int LAPACKE_zsyconv( int matrix_order, char uplo, char way, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv ); -lapack_int LAPACKE_zsyconv_work( int matrix_order, char uplo, char way, - lapack_int n, lapack_complex_double* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_double* work ); -lapack_int LAPACKE_zsyswapr( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int i1, - lapack_int i2 ); -lapack_int LAPACKE_zsyswapr_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int i1, - lapack_int i2 ); -lapack_int LAPACKE_zsytri2( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv ); -lapack_int LAPACKE_zsytri2_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_double* work, lapack_int lwork ); -lapack_int LAPACKE_zsytri2x( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, lapack_int nb ); -lapack_int LAPACKE_zsytri2x_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double* a, lapack_int lda, - const lapack_int* ipiv, - lapack_complex_double* work, lapack_int nb ); -lapack_int LAPACKE_zsytrs2( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb ); -lapack_int LAPACKE_zsytrs2_work( int matrix_order, char uplo, lapack_int n, - lapack_int nrhs, const lapack_complex_double* a, - lapack_int lda, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* work ); -lapack_int LAPACKE_zunbdb( int matrix_order, char trans, char signs, - lapack_int m, lapack_int p, lapack_int q, - lapack_complex_double* x11, lapack_int ldx11, - lapack_complex_double* x12, lapack_int ldx12, - lapack_complex_double* x21, lapack_int ldx21, - lapack_complex_double* x22, lapack_int ldx22, - double* theta, double* phi, - lapack_complex_double* taup1, - lapack_complex_double* taup2, - lapack_complex_double* tauq1, - lapack_complex_double* tauq2 ); -lapack_int LAPACKE_zunbdb_work( int matrix_order, char trans, char signs, - lapack_int m, lapack_int p, lapack_int q, - lapack_complex_double* x11, lapack_int ldx11, - lapack_complex_double* x12, lapack_int ldx12, - lapack_complex_double* x21, lapack_int ldx21, - lapack_complex_double* x22, lapack_int ldx22, - double* theta, double* phi, - lapack_complex_double* taup1, - lapack_complex_double* taup2, - lapack_complex_double* tauq1, - lapack_complex_double* tauq2, - lapack_complex_double* work, lapack_int lwork ); -lapack_int LAPACKE_zuncsd( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, char signs, - lapack_int m, lapack_int p, lapack_int q, - lapack_complex_double* x11, lapack_int ldx11, - lapack_complex_double* x12, lapack_int ldx12, - lapack_complex_double* x21, lapack_int ldx21, - lapack_complex_double* x22, lapack_int ldx22, - double* theta, lapack_complex_double* u1, - lapack_int ldu1, lapack_complex_double* u2, - lapack_int ldu2, lapack_complex_double* v1t, - lapack_int ldv1t, lapack_complex_double* v2t, - lapack_int ldv2t ); -lapack_int LAPACKE_zuncsd_work( int matrix_order, char jobu1, char jobu2, - char jobv1t, char jobv2t, char trans, - char signs, lapack_int m, lapack_int p, - lapack_int q, lapack_complex_double* x11, - lapack_int ldx11, lapack_complex_double* x12, - lapack_int ldx12, lapack_complex_double* x21, - lapack_int ldx21, lapack_complex_double* x22, - lapack_int ldx22, double* theta, - lapack_complex_double* u1, lapack_int ldu1, - lapack_complex_double* u2, lapack_int ldu2, - lapack_complex_double* v1t, lapack_int ldv1t, - lapack_complex_double* v2t, lapack_int ldv2t, - lapack_complex_double* work, lapack_int lwork, - double* rwork, lapack_int lrwork, - lapack_int* iwork ); -//LAPACK 3.4.0 -lapack_int LAPACKE_sgemqrt( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int nb, const float* v, lapack_int ldv, - const float* t, lapack_int ldt, float* c, - lapack_int ldc ); -lapack_int LAPACKE_dgemqrt( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int nb, const double* v, lapack_int ldv, - const double* t, lapack_int ldt, double* c, - lapack_int ldc ); -lapack_int LAPACKE_cgemqrt( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int nb, const lapack_complex_float* v, - lapack_int ldv, const lapack_complex_float* t, - lapack_int ldt, lapack_complex_float* c, - lapack_int ldc ); -lapack_int LAPACKE_zgemqrt( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int nb, const lapack_complex_double* v, - lapack_int ldv, const lapack_complex_double* t, - lapack_int ldt, lapack_complex_double* c, - lapack_int ldc ); - -lapack_int LAPACKE_sgeqrt( int matrix_order, lapack_int m, lapack_int n, - lapack_int nb, float* a, lapack_int lda, float* t, - lapack_int ldt ); -lapack_int LAPACKE_dgeqrt( int matrix_order, lapack_int m, lapack_int n, - lapack_int nb, double* a, lapack_int lda, double* t, - lapack_int ldt ); -lapack_int LAPACKE_cgeqrt( int matrix_order, lapack_int m, lapack_int n, - lapack_int nb, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* t, - lapack_int ldt ); -lapack_int LAPACKE_zgeqrt( int matrix_order, lapack_int m, lapack_int n, - lapack_int nb, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* t, - lapack_int ldt ); - -lapack_int LAPACKE_sgeqrt2( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* t, - lapack_int ldt ); -lapack_int LAPACKE_dgeqrt2( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* t, - lapack_int ldt ); -lapack_int LAPACKE_cgeqrt2( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* t, lapack_int ldt ); -lapack_int LAPACKE_zgeqrt2( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* t, lapack_int ldt ); - -lapack_int LAPACKE_sgeqrt3( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* t, - lapack_int ldt ); -lapack_int LAPACKE_dgeqrt3( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* t, - lapack_int ldt ); -lapack_int LAPACKE_cgeqrt3( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* t, lapack_int ldt ); -lapack_int LAPACKE_zgeqrt3( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* t, lapack_int ldt ); - -lapack_int LAPACKE_stpmqrt( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, lapack_int nb, const float* v, - lapack_int ldv, const float* t, lapack_int ldt, - float* a, lapack_int lda, float* b, - lapack_int ldb ); -lapack_int LAPACKE_dtpmqrt( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, lapack_int nb, const double* v, - lapack_int ldv, const double* t, lapack_int ldt, - double* a, lapack_int lda, double* b, - lapack_int ldb ); -lapack_int LAPACKE_ctpmqrt( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, lapack_int nb, - const lapack_complex_float* v, lapack_int ldv, - const lapack_complex_float* t, lapack_int ldt, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_ztpmqrt( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, lapack_int nb, - const lapack_complex_double* v, lapack_int ldv, - const lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb ); - -lapack_int LAPACKE_dtpqrt( int matrix_order, lapack_int m, lapack_int n, - lapack_int l, lapack_int nb, double* a, - lapack_int lda, double* b, lapack_int ldb, double* t, - lapack_int ldt ); -lapack_int LAPACKE_ctpqrt( int matrix_order, lapack_int m, lapack_int n, - lapack_int l, lapack_int nb, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* t, - lapack_complex_float* b, lapack_int ldb, - lapack_int ldt ); -lapack_int LAPACKE_ztpqrt( int matrix_order, lapack_int m, lapack_int n, - lapack_int l, lapack_int nb, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* t, lapack_int ldt ); - -lapack_int LAPACKE_stpqrt2( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* b, lapack_int ldb, - float* t, lapack_int ldt ); -lapack_int LAPACKE_dtpqrt2( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* b, - lapack_int ldb, double* t, lapack_int ldt ); -lapack_int LAPACKE_ctpqrt2( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* t, lapack_int ldt ); -lapack_int LAPACKE_ztpqrt2( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* t, lapack_int ldt ); - -lapack_int LAPACKE_stprfb( int matrix_order, char side, char trans, char direct, - char storev, lapack_int m, lapack_int n, - lapack_int k, lapack_int l, const float* v, - lapack_int ldv, const float* t, lapack_int ldt, - float* a, lapack_int lda, float* b, lapack_int ldb, - lapack_int myldwork ); -lapack_int LAPACKE_dtprfb( int matrix_order, char side, char trans, char direct, - char storev, lapack_int m, lapack_int n, - lapack_int k, lapack_int l, const double* v, - lapack_int ldv, const double* t, lapack_int ldt, - double* a, lapack_int lda, double* b, lapack_int ldb, - lapack_int myldwork ); -lapack_int LAPACKE_ctprfb( int matrix_order, char side, char trans, char direct, - char storev, lapack_int m, lapack_int n, - lapack_int k, lapack_int l, - const lapack_complex_float* v, lapack_int ldv, - const lapack_complex_float* t, lapack_int ldt, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_int myldwork ); -lapack_int LAPACKE_ztprfb( int matrix_order, char side, char trans, char direct, - char storev, lapack_int m, lapack_int n, - lapack_int k, lapack_int l, - const lapack_complex_double* v, lapack_int ldv, - const lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_int myldwork ); - -lapack_int LAPACKE_sgemqrt_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int nb, const float* v, lapack_int ldv, - const float* t, lapack_int ldt, float* c, - lapack_int ldc, float* work ); -lapack_int LAPACKE_dgemqrt_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int nb, const double* v, lapack_int ldv, - const double* t, lapack_int ldt, double* c, - lapack_int ldc, double* work ); -lapack_int LAPACKE_cgemqrt_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int nb, const lapack_complex_float* v, - lapack_int ldv, const lapack_complex_float* t, - lapack_int ldt, lapack_complex_float* c, - lapack_int ldc, lapack_complex_float* work ); -lapack_int LAPACKE_zgemqrt_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int nb, const lapack_complex_double* v, - lapack_int ldv, const lapack_complex_double* t, - lapack_int ldt, lapack_complex_double* c, - lapack_int ldc, lapack_complex_double* work ); - -lapack_int LAPACKE_sgeqrt_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nb, float* a, lapack_int lda, - float* t, lapack_int ldt, float* work ); -lapack_int LAPACKE_dgeqrt_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nb, double* a, lapack_int lda, - double* t, lapack_int ldt, double* work ); -lapack_int LAPACKE_cgeqrt_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nb, lapack_complex_float* a, - lapack_int lda, lapack_complex_float* t, - lapack_int ldt, lapack_complex_float* work ); -lapack_int LAPACKE_zgeqrt_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int nb, lapack_complex_double* a, - lapack_int lda, lapack_complex_double* t, - lapack_int ldt, lapack_complex_double* work ); - -lapack_int LAPACKE_sgeqrt2_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* t, - lapack_int ldt ); -lapack_int LAPACKE_dgeqrt2_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* t, - lapack_int ldt ); -lapack_int LAPACKE_cgeqrt2_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* t, lapack_int ldt ); -lapack_int LAPACKE_zgeqrt2_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* t, lapack_int ldt ); - -lapack_int LAPACKE_sgeqrt3_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* t, - lapack_int ldt ); -lapack_int LAPACKE_dgeqrt3_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* t, - lapack_int ldt ); -lapack_int LAPACKE_cgeqrt3_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* t, lapack_int ldt ); -lapack_int LAPACKE_zgeqrt3_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* t, lapack_int ldt ); - -lapack_int LAPACKE_stpmqrt_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, lapack_int nb, const float* v, - lapack_int ldv, const float* t, lapack_int ldt, - float* a, lapack_int lda, float* b, - lapack_int ldb, float* work ); -lapack_int LAPACKE_dtpmqrt_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, lapack_int nb, const double* v, - lapack_int ldv, const double* t, - lapack_int ldt, double* a, lapack_int lda, - double* b, lapack_int ldb, double* work ); -lapack_int LAPACKE_ctpmqrt_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, lapack_int nb, - const lapack_complex_float* v, lapack_int ldv, - const lapack_complex_float* t, lapack_int ldt, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* work ); -lapack_int LAPACKE_ztpmqrt_work( int matrix_order, char side, char trans, - lapack_int m, lapack_int n, lapack_int k, - lapack_int l, lapack_int nb, - const lapack_complex_double* v, lapack_int ldv, - const lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* work ); - -lapack_int LAPACKE_dtpqrt_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int l, lapack_int nb, double* a, - lapack_int lda, double* b, lapack_int ldb, - double* t, lapack_int ldt, double* work ); -lapack_int LAPACKE_ctpqrt_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int l, lapack_int nb, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* t, - lapack_complex_float* b, lapack_int ldb, - lapack_int ldt, lapack_complex_float* work ); -lapack_int LAPACKE_ztpqrt_work( int matrix_order, lapack_int m, lapack_int n, - lapack_int l, lapack_int nb, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* work ); - -lapack_int LAPACKE_stpqrt2_work( int matrix_order, lapack_int m, lapack_int n, - float* a, lapack_int lda, float* b, - lapack_int ldb, float* t, lapack_int ldt ); -lapack_int LAPACKE_dtpqrt2_work( int matrix_order, lapack_int m, lapack_int n, - double* a, lapack_int lda, double* b, - lapack_int ldb, double* t, lapack_int ldt ); -lapack_int LAPACKE_ctpqrt2_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - lapack_complex_float* t, lapack_int ldt ); -lapack_int LAPACKE_ztpqrt2_work( int matrix_order, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - lapack_complex_double* t, lapack_int ldt ); - -lapack_int LAPACKE_stprfb_work( int matrix_order, char side, char trans, - char direct, char storev, lapack_int m, - lapack_int n, lapack_int k, lapack_int l, - const float* v, lapack_int ldv, const float* t, - lapack_int ldt, float* a, lapack_int lda, - float* b, lapack_int ldb, const float* mywork, - lapack_int myldwork ); -lapack_int LAPACKE_dtprfb_work( int matrix_order, char side, char trans, - char direct, char storev, lapack_int m, - lapack_int n, lapack_int k, lapack_int l, - const double* v, lapack_int ldv, - const double* t, lapack_int ldt, double* a, - lapack_int lda, double* b, lapack_int ldb, - const double* mywork, lapack_int myldwork ); -lapack_int LAPACKE_ctprfb_work( int matrix_order, char side, char trans, - char direct, char storev, lapack_int m, - lapack_int n, lapack_int k, lapack_int l, - const lapack_complex_float* v, lapack_int ldv, - const lapack_complex_float* t, lapack_int ldt, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* b, lapack_int ldb, - const float* mywork, lapack_int myldwork ); -lapack_int LAPACKE_ztprfb_work( int matrix_order, char side, char trans, - char direct, char storev, lapack_int m, - lapack_int n, lapack_int k, lapack_int l, - const lapack_complex_double* v, lapack_int ldv, - const lapack_complex_double* t, lapack_int ldt, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* b, lapack_int ldb, - const double* mywork, lapack_int myldwork ); -//LAPACK 3.X.X -lapack_int LAPACKE_csyr( int matrix_order, char uplo, lapack_int n, - lapack_complex_float alpha, - const lapack_complex_float* x, lapack_int incx, - lapack_complex_float* a, lapack_int lda ); -lapack_int LAPACKE_zsyr( int matrix_order, char uplo, lapack_int n, - lapack_complex_double alpha, - const lapack_complex_double* x, lapack_int incx, - lapack_complex_double* a, lapack_int lda ); - -lapack_int LAPACKE_csyr_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_float alpha, - const lapack_complex_float* x, - lapack_int incx, lapack_complex_float* a, - lapack_int lda ); -lapack_int LAPACKE_zsyr_work( int matrix_order, char uplo, lapack_int n, - lapack_complex_double alpha, - const lapack_complex_double* x, - lapack_int incx, lapack_complex_double* a, - lapack_int lda ); - - - -#define LAPACK_sgetrf LAPACK_GLOBAL(sgetrf,SGETRF) -#define LAPACK_dgetrf LAPACK_GLOBAL(dgetrf,DGETRF) -#define LAPACK_cgetrf LAPACK_GLOBAL(cgetrf,CGETRF) -#define LAPACK_zgetrf LAPACK_GLOBAL(zgetrf,ZGETRF) -#define LAPACK_sgbtrf LAPACK_GLOBAL(sgbtrf,SGBTRF) -#define LAPACK_dgbtrf LAPACK_GLOBAL(dgbtrf,DGBTRF) -#define LAPACK_cgbtrf LAPACK_GLOBAL(cgbtrf,CGBTRF) -#define LAPACK_zgbtrf LAPACK_GLOBAL(zgbtrf,ZGBTRF) -#define LAPACK_sgttrf LAPACK_GLOBAL(sgttrf,SGTTRF) -#define LAPACK_dgttrf LAPACK_GLOBAL(dgttrf,DGTTRF) -#define LAPACK_cgttrf LAPACK_GLOBAL(cgttrf,CGTTRF) -#define LAPACK_zgttrf LAPACK_GLOBAL(zgttrf,ZGTTRF) -#define LAPACK_spotrf LAPACK_GLOBAL(spotrf,SPOTRF) -#define LAPACK_dpotrf LAPACK_GLOBAL(dpotrf,DPOTRF) -#define LAPACK_cpotrf LAPACK_GLOBAL(cpotrf,CPOTRF) -#define LAPACK_zpotrf LAPACK_GLOBAL(zpotrf,ZPOTRF) -#define LAPACK_dpstrf LAPACK_GLOBAL(dpstrf,DPSTRF) -#define LAPACK_spstrf LAPACK_GLOBAL(spstrf,SPSTRF) -#define LAPACK_zpstrf LAPACK_GLOBAL(zpstrf,ZPSTRF) -#define LAPACK_cpstrf LAPACK_GLOBAL(cpstrf,CPSTRF) -#define LAPACK_dpftrf LAPACK_GLOBAL(dpftrf,DPFTRF) -#define LAPACK_spftrf LAPACK_GLOBAL(spftrf,SPFTRF) -#define LAPACK_zpftrf LAPACK_GLOBAL(zpftrf,ZPFTRF) -#define LAPACK_cpftrf LAPACK_GLOBAL(cpftrf,CPFTRF) -#define LAPACK_spptrf LAPACK_GLOBAL(spptrf,SPPTRF) -#define LAPACK_dpptrf LAPACK_GLOBAL(dpptrf,DPPTRF) -#define LAPACK_cpptrf LAPACK_GLOBAL(cpptrf,CPPTRF) -#define LAPACK_zpptrf LAPACK_GLOBAL(zpptrf,ZPPTRF) -#define LAPACK_spbtrf LAPACK_GLOBAL(spbtrf,SPBTRF) -#define LAPACK_dpbtrf LAPACK_GLOBAL(dpbtrf,DPBTRF) -#define LAPACK_cpbtrf LAPACK_GLOBAL(cpbtrf,CPBTRF) -#define LAPACK_zpbtrf LAPACK_GLOBAL(zpbtrf,ZPBTRF) -#define LAPACK_spttrf LAPACK_GLOBAL(spttrf,SPTTRF) -#define LAPACK_dpttrf LAPACK_GLOBAL(dpttrf,DPTTRF) -#define LAPACK_cpttrf LAPACK_GLOBAL(cpttrf,CPTTRF) -#define LAPACK_zpttrf LAPACK_GLOBAL(zpttrf,ZPTTRF) -#define LAPACK_ssytrf LAPACK_GLOBAL(ssytrf,SSYTRF) -#define LAPACK_dsytrf LAPACK_GLOBAL(dsytrf,DSYTRF) -#define LAPACK_csytrf LAPACK_GLOBAL(csytrf,CSYTRF) -#define LAPACK_zsytrf LAPACK_GLOBAL(zsytrf,ZSYTRF) -#define LAPACK_chetrf LAPACK_GLOBAL(chetrf,CHETRF) -#define LAPACK_zhetrf LAPACK_GLOBAL(zhetrf,ZHETRF) -#define LAPACK_ssptrf LAPACK_GLOBAL(ssptrf,SSPTRF) -#define LAPACK_dsptrf LAPACK_GLOBAL(dsptrf,DSPTRF) -#define LAPACK_csptrf LAPACK_GLOBAL(csptrf,CSPTRF) -#define LAPACK_zsptrf LAPACK_GLOBAL(zsptrf,ZSPTRF) -#define LAPACK_chptrf LAPACK_GLOBAL(chptrf,CHPTRF) -#define LAPACK_zhptrf LAPACK_GLOBAL(zhptrf,ZHPTRF) -#define LAPACK_sgetrs LAPACK_GLOBAL(sgetrs,SGETRS) -#define LAPACK_dgetrs LAPACK_GLOBAL(dgetrs,DGETRS) -#define LAPACK_cgetrs LAPACK_GLOBAL(cgetrs,CGETRS) -#define LAPACK_zgetrs LAPACK_GLOBAL(zgetrs,ZGETRS) -#define LAPACK_sgbtrs LAPACK_GLOBAL(sgbtrs,SGBTRS) -#define LAPACK_dgbtrs LAPACK_GLOBAL(dgbtrs,DGBTRS) -#define LAPACK_cgbtrs LAPACK_GLOBAL(cgbtrs,CGBTRS) -#define LAPACK_zgbtrs LAPACK_GLOBAL(zgbtrs,ZGBTRS) -#define LAPACK_sgttrs LAPACK_GLOBAL(sgttrs,SGTTRS) -#define LAPACK_dgttrs LAPACK_GLOBAL(dgttrs,DGTTRS) -#define LAPACK_cgttrs LAPACK_GLOBAL(cgttrs,CGTTRS) -#define LAPACK_zgttrs LAPACK_GLOBAL(zgttrs,ZGTTRS) -#define LAPACK_spotrs LAPACK_GLOBAL(spotrs,SPOTRS) -#define LAPACK_dpotrs LAPACK_GLOBAL(dpotrs,DPOTRS) -#define LAPACK_cpotrs LAPACK_GLOBAL(cpotrs,CPOTRS) -#define LAPACK_zpotrs LAPACK_GLOBAL(zpotrs,ZPOTRS) -#define LAPACK_dpftrs LAPACK_GLOBAL(dpftrs,DPFTRS) -#define LAPACK_spftrs LAPACK_GLOBAL(spftrs,SPFTRS) -#define LAPACK_zpftrs LAPACK_GLOBAL(zpftrs,ZPFTRS) -#define LAPACK_cpftrs LAPACK_GLOBAL(cpftrs,CPFTRS) -#define LAPACK_spptrs LAPACK_GLOBAL(spptrs,SPPTRS) -#define LAPACK_dpptrs LAPACK_GLOBAL(dpptrs,DPPTRS) -#define LAPACK_cpptrs LAPACK_GLOBAL(cpptrs,CPPTRS) -#define LAPACK_zpptrs LAPACK_GLOBAL(zpptrs,ZPPTRS) -#define LAPACK_spbtrs LAPACK_GLOBAL(spbtrs,SPBTRS) -#define LAPACK_dpbtrs LAPACK_GLOBAL(dpbtrs,DPBTRS) -#define LAPACK_cpbtrs LAPACK_GLOBAL(cpbtrs,CPBTRS) -#define LAPACK_zpbtrs LAPACK_GLOBAL(zpbtrs,ZPBTRS) -#define LAPACK_spttrs LAPACK_GLOBAL(spttrs,SPTTRS) -#define LAPACK_dpttrs LAPACK_GLOBAL(dpttrs,DPTTRS) -#define LAPACK_cpttrs LAPACK_GLOBAL(cpttrs,CPTTRS) -#define LAPACK_zpttrs LAPACK_GLOBAL(zpttrs,ZPTTRS) -#define LAPACK_ssytrs LAPACK_GLOBAL(ssytrs,SSYTRS) -#define LAPACK_dsytrs LAPACK_GLOBAL(dsytrs,DSYTRS) -#define LAPACK_csytrs LAPACK_GLOBAL(csytrs,CSYTRS) -#define LAPACK_zsytrs LAPACK_GLOBAL(zsytrs,ZSYTRS) -#define LAPACK_chetrs LAPACK_GLOBAL(chetrs,CHETRS) -#define LAPACK_zhetrs LAPACK_GLOBAL(zhetrs,ZHETRS) -#define LAPACK_ssptrs LAPACK_GLOBAL(ssptrs,SSPTRS) -#define LAPACK_dsptrs LAPACK_GLOBAL(dsptrs,DSPTRS) -#define LAPACK_csptrs LAPACK_GLOBAL(csptrs,CSPTRS) -#define LAPACK_zsptrs LAPACK_GLOBAL(zsptrs,ZSPTRS) -#define LAPACK_chptrs LAPACK_GLOBAL(chptrs,CHPTRS) -#define LAPACK_zhptrs LAPACK_GLOBAL(zhptrs,ZHPTRS) -#define LAPACK_strtrs LAPACK_GLOBAL(strtrs,STRTRS) -#define LAPACK_dtrtrs LAPACK_GLOBAL(dtrtrs,DTRTRS) -#define LAPACK_ctrtrs LAPACK_GLOBAL(ctrtrs,CTRTRS) -#define LAPACK_ztrtrs LAPACK_GLOBAL(ztrtrs,ZTRTRS) -#define LAPACK_stptrs LAPACK_GLOBAL(stptrs,STPTRS) -#define LAPACK_dtptrs LAPACK_GLOBAL(dtptrs,DTPTRS) -#define LAPACK_ctptrs LAPACK_GLOBAL(ctptrs,CTPTRS) -#define LAPACK_ztptrs LAPACK_GLOBAL(ztptrs,ZTPTRS) -#define LAPACK_stbtrs LAPACK_GLOBAL(stbtrs,STBTRS) -#define LAPACK_dtbtrs LAPACK_GLOBAL(dtbtrs,DTBTRS) -#define LAPACK_ctbtrs LAPACK_GLOBAL(ctbtrs,CTBTRS) -#define LAPACK_ztbtrs LAPACK_GLOBAL(ztbtrs,ZTBTRS) -#define LAPACK_sgecon LAPACK_GLOBAL(sgecon,SGECON) -#define LAPACK_dgecon LAPACK_GLOBAL(dgecon,DGECON) -#define LAPACK_cgecon LAPACK_GLOBAL(cgecon,CGECON) -#define LAPACK_zgecon LAPACK_GLOBAL(zgecon,ZGECON) -#define LAPACK_sgbcon LAPACK_GLOBAL(sgbcon,SGBCON) -#define LAPACK_dgbcon LAPACK_GLOBAL(dgbcon,DGBCON) -#define LAPACK_cgbcon LAPACK_GLOBAL(cgbcon,CGBCON) -#define LAPACK_zgbcon LAPACK_GLOBAL(zgbcon,ZGBCON) -#define LAPACK_sgtcon LAPACK_GLOBAL(sgtcon,SGTCON) -#define LAPACK_dgtcon LAPACK_GLOBAL(dgtcon,DGTCON) -#define LAPACK_cgtcon LAPACK_GLOBAL(cgtcon,CGTCON) -#define LAPACK_zgtcon LAPACK_GLOBAL(zgtcon,ZGTCON) -#define LAPACK_spocon LAPACK_GLOBAL(spocon,SPOCON) -#define LAPACK_dpocon LAPACK_GLOBAL(dpocon,DPOCON) -#define LAPACK_cpocon LAPACK_GLOBAL(cpocon,CPOCON) -#define LAPACK_zpocon LAPACK_GLOBAL(zpocon,ZPOCON) -#define LAPACK_sppcon LAPACK_GLOBAL(sppcon,SPPCON) -#define LAPACK_dppcon LAPACK_GLOBAL(dppcon,DPPCON) -#define LAPACK_cppcon LAPACK_GLOBAL(cppcon,CPPCON) -#define LAPACK_zppcon LAPACK_GLOBAL(zppcon,ZPPCON) -#define LAPACK_spbcon LAPACK_GLOBAL(spbcon,SPBCON) -#define LAPACK_dpbcon LAPACK_GLOBAL(dpbcon,DPBCON) -#define LAPACK_cpbcon LAPACK_GLOBAL(cpbcon,CPBCON) -#define LAPACK_zpbcon LAPACK_GLOBAL(zpbcon,ZPBCON) -#define LAPACK_sptcon LAPACK_GLOBAL(sptcon,SPTCON) -#define LAPACK_dptcon LAPACK_GLOBAL(dptcon,DPTCON) -#define LAPACK_cptcon LAPACK_GLOBAL(cptcon,CPTCON) -#define LAPACK_zptcon LAPACK_GLOBAL(zptcon,ZPTCON) -#define LAPACK_ssycon LAPACK_GLOBAL(ssycon,SSYCON) -#define LAPACK_dsycon LAPACK_GLOBAL(dsycon,DSYCON) -#define LAPACK_csycon LAPACK_GLOBAL(csycon,CSYCON) -#define LAPACK_zsycon LAPACK_GLOBAL(zsycon,ZSYCON) -#define LAPACK_checon LAPACK_GLOBAL(checon,CHECON) -#define LAPACK_zhecon LAPACK_GLOBAL(zhecon,ZHECON) -#define LAPACK_sspcon LAPACK_GLOBAL(sspcon,SSPCON) -#define LAPACK_dspcon LAPACK_GLOBAL(dspcon,DSPCON) -#define LAPACK_cspcon LAPACK_GLOBAL(cspcon,CSPCON) -#define LAPACK_zspcon LAPACK_GLOBAL(zspcon,ZSPCON) -#define LAPACK_chpcon LAPACK_GLOBAL(chpcon,CHPCON) -#define LAPACK_zhpcon LAPACK_GLOBAL(zhpcon,ZHPCON) -#define LAPACK_strcon LAPACK_GLOBAL(strcon,STRCON) -#define LAPACK_dtrcon LAPACK_GLOBAL(dtrcon,DTRCON) -#define LAPACK_ctrcon LAPACK_GLOBAL(ctrcon,CTRCON) -#define LAPACK_ztrcon LAPACK_GLOBAL(ztrcon,ZTRCON) -#define LAPACK_stpcon LAPACK_GLOBAL(stpcon,STPCON) -#define LAPACK_dtpcon LAPACK_GLOBAL(dtpcon,DTPCON) -#define LAPACK_ctpcon LAPACK_GLOBAL(ctpcon,CTPCON) -#define LAPACK_ztpcon LAPACK_GLOBAL(ztpcon,ZTPCON) -#define LAPACK_stbcon LAPACK_GLOBAL(stbcon,STBCON) -#define LAPACK_dtbcon LAPACK_GLOBAL(dtbcon,DTBCON) -#define LAPACK_ctbcon LAPACK_GLOBAL(ctbcon,CTBCON) -#define LAPACK_ztbcon LAPACK_GLOBAL(ztbcon,ZTBCON) -#define LAPACK_sgerfs LAPACK_GLOBAL(sgerfs,SGERFS) -#define LAPACK_dgerfs LAPACK_GLOBAL(dgerfs,DGERFS) -#define LAPACK_cgerfs LAPACK_GLOBAL(cgerfs,CGERFS) -#define LAPACK_zgerfs LAPACK_GLOBAL(zgerfs,ZGERFS) -#define LAPACK_dgerfsx LAPACK_GLOBAL(dgerfsx,DGERFSX) -#define LAPACK_sgerfsx LAPACK_GLOBAL(sgerfsx,SGERFSX) -#define LAPACK_zgerfsx LAPACK_GLOBAL(zgerfsx,ZGERFSX) -#define LAPACK_cgerfsx LAPACK_GLOBAL(cgerfsx,CGERFSX) -#define LAPACK_sgbrfs LAPACK_GLOBAL(sgbrfs,SGBRFS) -#define LAPACK_dgbrfs LAPACK_GLOBAL(dgbrfs,DGBRFS) -#define LAPACK_cgbrfs LAPACK_GLOBAL(cgbrfs,CGBRFS) -#define LAPACK_zgbrfs LAPACK_GLOBAL(zgbrfs,ZGBRFS) -#define LAPACK_dgbrfsx LAPACK_GLOBAL(dgbrfsx,DGBRFSX) -#define LAPACK_sgbrfsx LAPACK_GLOBAL(sgbrfsx,SGBRFSX) -#define LAPACK_zgbrfsx LAPACK_GLOBAL(zgbrfsx,ZGBRFSX) -#define LAPACK_cgbrfsx LAPACK_GLOBAL(cgbrfsx,CGBRFSX) -#define LAPACK_sgtrfs LAPACK_GLOBAL(sgtrfs,SGTRFS) -#define LAPACK_dgtrfs LAPACK_GLOBAL(dgtrfs,DGTRFS) -#define LAPACK_cgtrfs LAPACK_GLOBAL(cgtrfs,CGTRFS) -#define LAPACK_zgtrfs LAPACK_GLOBAL(zgtrfs,ZGTRFS) -#define LAPACK_sporfs LAPACK_GLOBAL(sporfs,SPORFS) -#define LAPACK_dporfs LAPACK_GLOBAL(dporfs,DPORFS) -#define LAPACK_cporfs LAPACK_GLOBAL(cporfs,CPORFS) -#define LAPACK_zporfs LAPACK_GLOBAL(zporfs,ZPORFS) -#define LAPACK_dporfsx LAPACK_GLOBAL(dporfsx,DPORFSX) -#define LAPACK_sporfsx LAPACK_GLOBAL(sporfsx,SPORFSX) -#define LAPACK_zporfsx LAPACK_GLOBAL(zporfsx,ZPORFSX) -#define LAPACK_cporfsx LAPACK_GLOBAL(cporfsx,CPORFSX) -#define LAPACK_spprfs LAPACK_GLOBAL(spprfs,SPPRFS) -#define LAPACK_dpprfs LAPACK_GLOBAL(dpprfs,DPPRFS) -#define LAPACK_cpprfs LAPACK_GLOBAL(cpprfs,CPPRFS) -#define LAPACK_zpprfs LAPACK_GLOBAL(zpprfs,ZPPRFS) -#define LAPACK_spbrfs LAPACK_GLOBAL(spbrfs,SPBRFS) -#define LAPACK_dpbrfs LAPACK_GLOBAL(dpbrfs,DPBRFS) -#define LAPACK_cpbrfs LAPACK_GLOBAL(cpbrfs,CPBRFS) -#define LAPACK_zpbrfs LAPACK_GLOBAL(zpbrfs,ZPBRFS) -#define LAPACK_sptrfs LAPACK_GLOBAL(sptrfs,SPTRFS) -#define LAPACK_dptrfs LAPACK_GLOBAL(dptrfs,DPTRFS) -#define LAPACK_cptrfs LAPACK_GLOBAL(cptrfs,CPTRFS) -#define LAPACK_zptrfs LAPACK_GLOBAL(zptrfs,ZPTRFS) -#define LAPACK_ssyrfs LAPACK_GLOBAL(ssyrfs,SSYRFS) -#define LAPACK_dsyrfs LAPACK_GLOBAL(dsyrfs,DSYRFS) -#define LAPACK_csyrfs LAPACK_GLOBAL(csyrfs,CSYRFS) -#define LAPACK_zsyrfs LAPACK_GLOBAL(zsyrfs,ZSYRFS) -#define LAPACK_dsyrfsx LAPACK_GLOBAL(dsyrfsx,DSYRFSX) -#define LAPACK_ssyrfsx LAPACK_GLOBAL(ssyrfsx,SSYRFSX) -#define LAPACK_zsyrfsx LAPACK_GLOBAL(zsyrfsx,ZSYRFSX) -#define LAPACK_csyrfsx LAPACK_GLOBAL(csyrfsx,CSYRFSX) -#define LAPACK_cherfs LAPACK_GLOBAL(cherfs,CHERFS) -#define LAPACK_zherfs LAPACK_GLOBAL(zherfs,ZHERFS) -#define LAPACK_zherfsx LAPACK_GLOBAL(zherfsx,ZHERFSX) -#define LAPACK_cherfsx LAPACK_GLOBAL(cherfsx,CHERFSX) -#define LAPACK_ssprfs LAPACK_GLOBAL(ssprfs,SSPRFS) -#define LAPACK_dsprfs LAPACK_GLOBAL(dsprfs,DSPRFS) -#define LAPACK_csprfs LAPACK_GLOBAL(csprfs,CSPRFS) -#define LAPACK_zsprfs LAPACK_GLOBAL(zsprfs,ZSPRFS) -#define LAPACK_chprfs LAPACK_GLOBAL(chprfs,CHPRFS) -#define LAPACK_zhprfs LAPACK_GLOBAL(zhprfs,ZHPRFS) -#define LAPACK_strrfs LAPACK_GLOBAL(strrfs,STRRFS) -#define LAPACK_dtrrfs LAPACK_GLOBAL(dtrrfs,DTRRFS) -#define LAPACK_ctrrfs LAPACK_GLOBAL(ctrrfs,CTRRFS) -#define LAPACK_ztrrfs LAPACK_GLOBAL(ztrrfs,ZTRRFS) -#define LAPACK_stprfs LAPACK_GLOBAL(stprfs,STPRFS) -#define LAPACK_dtprfs LAPACK_GLOBAL(dtprfs,DTPRFS) -#define LAPACK_ctprfs LAPACK_GLOBAL(ctprfs,CTPRFS) -#define LAPACK_ztprfs LAPACK_GLOBAL(ztprfs,ZTPRFS) -#define LAPACK_stbrfs LAPACK_GLOBAL(stbrfs,STBRFS) -#define LAPACK_dtbrfs LAPACK_GLOBAL(dtbrfs,DTBRFS) -#define LAPACK_ctbrfs LAPACK_GLOBAL(ctbrfs,CTBRFS) -#define LAPACK_ztbrfs LAPACK_GLOBAL(ztbrfs,ZTBRFS) -#define LAPACK_sgetri LAPACK_GLOBAL(sgetri,SGETRI) -#define LAPACK_dgetri LAPACK_GLOBAL(dgetri,DGETRI) -#define LAPACK_cgetri LAPACK_GLOBAL(cgetri,CGETRI) -#define LAPACK_zgetri LAPACK_GLOBAL(zgetri,ZGETRI) -#define LAPACK_spotri LAPACK_GLOBAL(spotri,SPOTRI) -#define LAPACK_dpotri LAPACK_GLOBAL(dpotri,DPOTRI) -#define LAPACK_cpotri LAPACK_GLOBAL(cpotri,CPOTRI) -#define LAPACK_zpotri LAPACK_GLOBAL(zpotri,ZPOTRI) -#define LAPACK_dpftri LAPACK_GLOBAL(dpftri,DPFTRI) -#define LAPACK_spftri LAPACK_GLOBAL(spftri,SPFTRI) -#define LAPACK_zpftri LAPACK_GLOBAL(zpftri,ZPFTRI) -#define LAPACK_cpftri LAPACK_GLOBAL(cpftri,CPFTRI) -#define LAPACK_spptri LAPACK_GLOBAL(spptri,SPPTRI) -#define LAPACK_dpptri LAPACK_GLOBAL(dpptri,DPPTRI) -#define LAPACK_cpptri LAPACK_GLOBAL(cpptri,CPPTRI) -#define LAPACK_zpptri LAPACK_GLOBAL(zpptri,ZPPTRI) -#define LAPACK_ssytri LAPACK_GLOBAL(ssytri,SSYTRI) -#define LAPACK_dsytri LAPACK_GLOBAL(dsytri,DSYTRI) -#define LAPACK_csytri LAPACK_GLOBAL(csytri,CSYTRI) -#define LAPACK_zsytri LAPACK_GLOBAL(zsytri,ZSYTRI) -#define LAPACK_chetri LAPACK_GLOBAL(chetri,CHETRI) -#define LAPACK_zhetri LAPACK_GLOBAL(zhetri,ZHETRI) -#define LAPACK_ssptri LAPACK_GLOBAL(ssptri,SSPTRI) -#define LAPACK_dsptri LAPACK_GLOBAL(dsptri,DSPTRI) -#define LAPACK_csptri LAPACK_GLOBAL(csptri,CSPTRI) -#define LAPACK_zsptri LAPACK_GLOBAL(zsptri,ZSPTRI) -#define LAPACK_chptri LAPACK_GLOBAL(chptri,CHPTRI) -#define LAPACK_zhptri LAPACK_GLOBAL(zhptri,ZHPTRI) -#define LAPACK_strtri LAPACK_GLOBAL(strtri,STRTRI) -#define LAPACK_dtrtri LAPACK_GLOBAL(dtrtri,DTRTRI) -#define LAPACK_ctrtri LAPACK_GLOBAL(ctrtri,CTRTRI) -#define LAPACK_ztrtri LAPACK_GLOBAL(ztrtri,ZTRTRI) -#define LAPACK_dtftri LAPACK_GLOBAL(dtftri,DTFTRI) -#define LAPACK_stftri LAPACK_GLOBAL(stftri,STFTRI) -#define LAPACK_ztftri LAPACK_GLOBAL(ztftri,ZTFTRI) -#define LAPACK_ctftri LAPACK_GLOBAL(ctftri,CTFTRI) -#define LAPACK_stptri LAPACK_GLOBAL(stptri,STPTRI) -#define LAPACK_dtptri LAPACK_GLOBAL(dtptri,DTPTRI) -#define LAPACK_ctptri LAPACK_GLOBAL(ctptri,CTPTRI) -#define LAPACK_ztptri LAPACK_GLOBAL(ztptri,ZTPTRI) -#define LAPACK_sgeequ LAPACK_GLOBAL(sgeequ,SGEEQU) -#define LAPACK_dgeequ LAPACK_GLOBAL(dgeequ,DGEEQU) -#define LAPACK_cgeequ LAPACK_GLOBAL(cgeequ,CGEEQU) -#define LAPACK_zgeequ LAPACK_GLOBAL(zgeequ,ZGEEQU) -#define LAPACK_dgeequb LAPACK_GLOBAL(dgeequb,DGEEQUB) -#define LAPACK_sgeequb LAPACK_GLOBAL(sgeequb,SGEEQUB) -#define LAPACK_zgeequb LAPACK_GLOBAL(zgeequb,ZGEEQUB) -#define LAPACK_cgeequb LAPACK_GLOBAL(cgeequb,CGEEQUB) -#define LAPACK_sgbequ LAPACK_GLOBAL(sgbequ,SGBEQU) -#define LAPACK_dgbequ LAPACK_GLOBAL(dgbequ,DGBEQU) -#define LAPACK_cgbequ LAPACK_GLOBAL(cgbequ,CGBEQU) -#define LAPACK_zgbequ LAPACK_GLOBAL(zgbequ,ZGBEQU) -#define LAPACK_dgbequb LAPACK_GLOBAL(dgbequb,DGBEQUB) -#define LAPACK_sgbequb LAPACK_GLOBAL(sgbequb,SGBEQUB) -#define LAPACK_zgbequb LAPACK_GLOBAL(zgbequb,ZGBEQUB) -#define LAPACK_cgbequb LAPACK_GLOBAL(cgbequb,CGBEQUB) -#define LAPACK_spoequ LAPACK_GLOBAL(spoequ,SPOEQU) -#define LAPACK_dpoequ LAPACK_GLOBAL(dpoequ,DPOEQU) -#define LAPACK_cpoequ LAPACK_GLOBAL(cpoequ,CPOEQU) -#define LAPACK_zpoequ LAPACK_GLOBAL(zpoequ,ZPOEQU) -#define LAPACK_dpoequb LAPACK_GLOBAL(dpoequb,DPOEQUB) -#define LAPACK_spoequb LAPACK_GLOBAL(spoequb,SPOEQUB) -#define LAPACK_zpoequb LAPACK_GLOBAL(zpoequb,ZPOEQUB) -#define LAPACK_cpoequb LAPACK_GLOBAL(cpoequb,CPOEQUB) -#define LAPACK_sppequ LAPACK_GLOBAL(sppequ,SPPEQU) -#define LAPACK_dppequ LAPACK_GLOBAL(dppequ,DPPEQU) -#define LAPACK_cppequ LAPACK_GLOBAL(cppequ,CPPEQU) -#define LAPACK_zppequ LAPACK_GLOBAL(zppequ,ZPPEQU) -#define LAPACK_spbequ LAPACK_GLOBAL(spbequ,SPBEQU) -#define LAPACK_dpbequ LAPACK_GLOBAL(dpbequ,DPBEQU) -#define LAPACK_cpbequ LAPACK_GLOBAL(cpbequ,CPBEQU) -#define LAPACK_zpbequ LAPACK_GLOBAL(zpbequ,ZPBEQU) -#define LAPACK_dsyequb LAPACK_GLOBAL(dsyequb,DSYEQUB) -#define LAPACK_ssyequb LAPACK_GLOBAL(ssyequb,SSYEQUB) -#define LAPACK_zsyequb LAPACK_GLOBAL(zsyequb,ZSYEQUB) -#define LAPACK_csyequb LAPACK_GLOBAL(csyequb,CSYEQUB) -#define LAPACK_zheequb LAPACK_GLOBAL(zheequb,ZHEEQUB) -#define LAPACK_cheequb LAPACK_GLOBAL(cheequb,CHEEQUB) -#define LAPACK_sgesv LAPACK_GLOBAL(sgesv,SGESV) -#define LAPACK_dgesv LAPACK_GLOBAL(dgesv,DGESV) -#define LAPACK_cgesv LAPACK_GLOBAL(cgesv,CGESV) -#define LAPACK_zgesv LAPACK_GLOBAL(zgesv,ZGESV) -#define LAPACK_dsgesv LAPACK_GLOBAL(dsgesv,DSGESV) -#define LAPACK_zcgesv LAPACK_GLOBAL(zcgesv,ZCGESV) -#define LAPACK_sgesvx LAPACK_GLOBAL(sgesvx,SGESVX) -#define LAPACK_dgesvx LAPACK_GLOBAL(dgesvx,DGESVX) -#define LAPACK_cgesvx LAPACK_GLOBAL(cgesvx,CGESVX) -#define LAPACK_zgesvx LAPACK_GLOBAL(zgesvx,ZGESVX) -#define LAPACK_dgesvxx LAPACK_GLOBAL(dgesvxx,DGESVXX) -#define LAPACK_sgesvxx LAPACK_GLOBAL(sgesvxx,SGESVXX) -#define LAPACK_zgesvxx LAPACK_GLOBAL(zgesvxx,ZGESVXX) -#define LAPACK_cgesvxx LAPACK_GLOBAL(cgesvxx,CGESVXX) -#define LAPACK_sgbsv LAPACK_GLOBAL(sgbsv,SGBSV) -#define LAPACK_dgbsv LAPACK_GLOBAL(dgbsv,DGBSV) -#define LAPACK_cgbsv LAPACK_GLOBAL(cgbsv,CGBSV) -#define LAPACK_zgbsv LAPACK_GLOBAL(zgbsv,ZGBSV) -#define LAPACK_sgbsvx LAPACK_GLOBAL(sgbsvx,SGBSVX) -#define LAPACK_dgbsvx LAPACK_GLOBAL(dgbsvx,DGBSVX) -#define LAPACK_cgbsvx LAPACK_GLOBAL(cgbsvx,CGBSVX) -#define LAPACK_zgbsvx LAPACK_GLOBAL(zgbsvx,ZGBSVX) -#define LAPACK_dgbsvxx LAPACK_GLOBAL(dgbsvxx,DGBSVXX) -#define LAPACK_sgbsvxx LAPACK_GLOBAL(sgbsvxx,SGBSVXX) -#define LAPACK_zgbsvxx LAPACK_GLOBAL(zgbsvxx,ZGBSVXX) -#define LAPACK_cgbsvxx LAPACK_GLOBAL(cgbsvxx,CGBSVXX) -#define LAPACK_sgtsv LAPACK_GLOBAL(sgtsv,SGTSV) -#define LAPACK_dgtsv LAPACK_GLOBAL(dgtsv,DGTSV) -#define LAPACK_cgtsv LAPACK_GLOBAL(cgtsv,CGTSV) -#define LAPACK_zgtsv LAPACK_GLOBAL(zgtsv,ZGTSV) -#define LAPACK_sgtsvx LAPACK_GLOBAL(sgtsvx,SGTSVX) -#define LAPACK_dgtsvx LAPACK_GLOBAL(dgtsvx,DGTSVX) -#define LAPACK_cgtsvx LAPACK_GLOBAL(cgtsvx,CGTSVX) -#define LAPACK_zgtsvx LAPACK_GLOBAL(zgtsvx,ZGTSVX) -#define LAPACK_sposv LAPACK_GLOBAL(sposv,SPOSV) -#define LAPACK_dposv LAPACK_GLOBAL(dposv,DPOSV) -#define LAPACK_cposv LAPACK_GLOBAL(cposv,CPOSV) -#define LAPACK_zposv LAPACK_GLOBAL(zposv,ZPOSV) -#define LAPACK_dsposv LAPACK_GLOBAL(dsposv,DSPOSV) -#define LAPACK_zcposv LAPACK_GLOBAL(zcposv,ZCPOSV) -#define LAPACK_sposvx LAPACK_GLOBAL(sposvx,SPOSVX) -#define LAPACK_dposvx LAPACK_GLOBAL(dposvx,DPOSVX) -#define LAPACK_cposvx LAPACK_GLOBAL(cposvx,CPOSVX) -#define LAPACK_zposvx LAPACK_GLOBAL(zposvx,ZPOSVX) -#define LAPACK_dposvxx LAPACK_GLOBAL(dposvxx,DPOSVXX) -#define LAPACK_sposvxx LAPACK_GLOBAL(sposvxx,SPOSVXX) -#define LAPACK_zposvxx LAPACK_GLOBAL(zposvxx,ZPOSVXX) -#define LAPACK_cposvxx LAPACK_GLOBAL(cposvxx,CPOSVXX) -#define LAPACK_sppsv LAPACK_GLOBAL(sppsv,SPPSV) -#define LAPACK_dppsv LAPACK_GLOBAL(dppsv,DPPSV) -#define LAPACK_cppsv LAPACK_GLOBAL(cppsv,CPPSV) -#define LAPACK_zppsv LAPACK_GLOBAL(zppsv,ZPPSV) -#define LAPACK_sppsvx LAPACK_GLOBAL(sppsvx,SPPSVX) -#define LAPACK_dppsvx LAPACK_GLOBAL(dppsvx,DPPSVX) -#define LAPACK_cppsvx LAPACK_GLOBAL(cppsvx,CPPSVX) -#define LAPACK_zppsvx LAPACK_GLOBAL(zppsvx,ZPPSVX) -#define LAPACK_spbsv LAPACK_GLOBAL(spbsv,SPBSV) -#define LAPACK_dpbsv LAPACK_GLOBAL(dpbsv,DPBSV) -#define LAPACK_cpbsv LAPACK_GLOBAL(cpbsv,CPBSV) -#define LAPACK_zpbsv LAPACK_GLOBAL(zpbsv,ZPBSV) -#define LAPACK_spbsvx LAPACK_GLOBAL(spbsvx,SPBSVX) -#define LAPACK_dpbsvx LAPACK_GLOBAL(dpbsvx,DPBSVX) -#define LAPACK_cpbsvx LAPACK_GLOBAL(cpbsvx,CPBSVX) -#define LAPACK_zpbsvx LAPACK_GLOBAL(zpbsvx,ZPBSVX) -#define LAPACK_sptsv LAPACK_GLOBAL(sptsv,SPTSV) -#define LAPACK_dptsv LAPACK_GLOBAL(dptsv,DPTSV) -#define LAPACK_cptsv LAPACK_GLOBAL(cptsv,CPTSV) -#define LAPACK_zptsv LAPACK_GLOBAL(zptsv,ZPTSV) -#define LAPACK_sptsvx LAPACK_GLOBAL(sptsvx,SPTSVX) -#define LAPACK_dptsvx LAPACK_GLOBAL(dptsvx,DPTSVX) -#define LAPACK_cptsvx LAPACK_GLOBAL(cptsvx,CPTSVX) -#define LAPACK_zptsvx LAPACK_GLOBAL(zptsvx,ZPTSVX) -#define LAPACK_ssysv LAPACK_GLOBAL(ssysv,SSYSV) -#define LAPACK_dsysv LAPACK_GLOBAL(dsysv,DSYSV) -#define LAPACK_csysv LAPACK_GLOBAL(csysv,CSYSV) -#define LAPACK_zsysv LAPACK_GLOBAL(zsysv,ZSYSV) -#define LAPACK_ssysvx LAPACK_GLOBAL(ssysvx,SSYSVX) -#define LAPACK_dsysvx LAPACK_GLOBAL(dsysvx,DSYSVX) -#define LAPACK_csysvx LAPACK_GLOBAL(csysvx,CSYSVX) -#define LAPACK_zsysvx LAPACK_GLOBAL(zsysvx,ZSYSVX) -#define LAPACK_dsysvxx LAPACK_GLOBAL(dsysvxx,DSYSVXX) -#define LAPACK_ssysvxx LAPACK_GLOBAL(ssysvxx,SSYSVXX) -#define LAPACK_zsysvxx LAPACK_GLOBAL(zsysvxx,ZSYSVXX) -#define LAPACK_csysvxx LAPACK_GLOBAL(csysvxx,CSYSVXX) -#define LAPACK_chesv LAPACK_GLOBAL(chesv,CHESV) -#define LAPACK_zhesv LAPACK_GLOBAL(zhesv,ZHESV) -#define LAPACK_chesvx LAPACK_GLOBAL(chesvx,CHESVX) -#define LAPACK_zhesvx LAPACK_GLOBAL(zhesvx,ZHESVX) -#define LAPACK_zhesvxx LAPACK_GLOBAL(zhesvxx,ZHESVXX) -#define LAPACK_chesvxx LAPACK_GLOBAL(chesvxx,CHESVXX) -#define LAPACK_sspsv LAPACK_GLOBAL(sspsv,SSPSV) -#define LAPACK_dspsv LAPACK_GLOBAL(dspsv,DSPSV) -#define LAPACK_cspsv LAPACK_GLOBAL(cspsv,CSPSV) -#define LAPACK_zspsv LAPACK_GLOBAL(zspsv,ZSPSV) -#define LAPACK_sspsvx LAPACK_GLOBAL(sspsvx,SSPSVX) -#define LAPACK_dspsvx LAPACK_GLOBAL(dspsvx,DSPSVX) -#define LAPACK_cspsvx LAPACK_GLOBAL(cspsvx,CSPSVX) -#define LAPACK_zspsvx LAPACK_GLOBAL(zspsvx,ZSPSVX) -#define LAPACK_chpsv LAPACK_GLOBAL(chpsv,CHPSV) -#define LAPACK_zhpsv LAPACK_GLOBAL(zhpsv,ZHPSV) -#define LAPACK_chpsvx LAPACK_GLOBAL(chpsvx,CHPSVX) -#define LAPACK_zhpsvx LAPACK_GLOBAL(zhpsvx,ZHPSVX) -#define LAPACK_sgeqrf LAPACK_GLOBAL(sgeqrf,SGEQRF) -#define LAPACK_dgeqrf LAPACK_GLOBAL(dgeqrf,DGEQRF) -#define LAPACK_cgeqrf LAPACK_GLOBAL(cgeqrf,CGEQRF) -#define LAPACK_zgeqrf LAPACK_GLOBAL(zgeqrf,ZGEQRF) -#define LAPACK_sgeqpf LAPACK_GLOBAL(sgeqpf,SGEQPF) -#define LAPACK_dgeqpf LAPACK_GLOBAL(dgeqpf,DGEQPF) -#define LAPACK_cgeqpf LAPACK_GLOBAL(cgeqpf,CGEQPF) -#define LAPACK_zgeqpf LAPACK_GLOBAL(zgeqpf,ZGEQPF) -#define LAPACK_sgeqp3 LAPACK_GLOBAL(sgeqp3,SGEQP3) -#define LAPACK_dgeqp3 LAPACK_GLOBAL(dgeqp3,DGEQP3) -#define LAPACK_cgeqp3 LAPACK_GLOBAL(cgeqp3,CGEQP3) -#define LAPACK_zgeqp3 LAPACK_GLOBAL(zgeqp3,ZGEQP3) -#define LAPACK_sorgqr LAPACK_GLOBAL(sorgqr,SORGQR) -#define LAPACK_dorgqr LAPACK_GLOBAL(dorgqr,DORGQR) -#define LAPACK_sormqr LAPACK_GLOBAL(sormqr,SORMQR) -#define LAPACK_dormqr LAPACK_GLOBAL(dormqr,DORMQR) -#define LAPACK_cungqr LAPACK_GLOBAL(cungqr,CUNGQR) -#define LAPACK_zungqr LAPACK_GLOBAL(zungqr,ZUNGQR) -#define LAPACK_cunmqr LAPACK_GLOBAL(cunmqr,CUNMQR) -#define LAPACK_zunmqr LAPACK_GLOBAL(zunmqr,ZUNMQR) -#define LAPACK_sgelqf LAPACK_GLOBAL(sgelqf,SGELQF) -#define LAPACK_dgelqf LAPACK_GLOBAL(dgelqf,DGELQF) -#define LAPACK_cgelqf LAPACK_GLOBAL(cgelqf,CGELQF) -#define LAPACK_zgelqf LAPACK_GLOBAL(zgelqf,ZGELQF) -#define LAPACK_sorglq LAPACK_GLOBAL(sorglq,SORGLQ) -#define LAPACK_dorglq LAPACK_GLOBAL(dorglq,DORGLQ) -#define LAPACK_sormlq LAPACK_GLOBAL(sormlq,SORMLQ) -#define LAPACK_dormlq LAPACK_GLOBAL(dormlq,DORMLQ) -#define LAPACK_cunglq LAPACK_GLOBAL(cunglq,CUNGLQ) -#define LAPACK_zunglq LAPACK_GLOBAL(zunglq,ZUNGLQ) -#define LAPACK_cunmlq LAPACK_GLOBAL(cunmlq,CUNMLQ) -#define LAPACK_zunmlq LAPACK_GLOBAL(zunmlq,ZUNMLQ) -#define LAPACK_sgeqlf LAPACK_GLOBAL(sgeqlf,SGEQLF) -#define LAPACK_dgeqlf LAPACK_GLOBAL(dgeqlf,DGEQLF) -#define LAPACK_cgeqlf LAPACK_GLOBAL(cgeqlf,CGEQLF) -#define LAPACK_zgeqlf LAPACK_GLOBAL(zgeqlf,ZGEQLF) -#define LAPACK_sorgql LAPACK_GLOBAL(sorgql,SORGQL) -#define LAPACK_dorgql LAPACK_GLOBAL(dorgql,DORGQL) -#define LAPACK_cungql LAPACK_GLOBAL(cungql,CUNGQL) -#define LAPACK_zungql LAPACK_GLOBAL(zungql,ZUNGQL) -#define LAPACK_sormql LAPACK_GLOBAL(sormql,SORMQL) -#define LAPACK_dormql LAPACK_GLOBAL(dormql,DORMQL) -#define LAPACK_cunmql LAPACK_GLOBAL(cunmql,CUNMQL) -#define LAPACK_zunmql LAPACK_GLOBAL(zunmql,ZUNMQL) -#define LAPACK_sgerqf LAPACK_GLOBAL(sgerqf,SGERQF) -#define LAPACK_dgerqf LAPACK_GLOBAL(dgerqf,DGERQF) -#define LAPACK_cgerqf LAPACK_GLOBAL(cgerqf,CGERQF) -#define LAPACK_zgerqf LAPACK_GLOBAL(zgerqf,ZGERQF) -#define LAPACK_sorgrq LAPACK_GLOBAL(sorgrq,SORGRQ) -#define LAPACK_dorgrq LAPACK_GLOBAL(dorgrq,DORGRQ) -#define LAPACK_cungrq LAPACK_GLOBAL(cungrq,CUNGRQ) -#define LAPACK_zungrq LAPACK_GLOBAL(zungrq,ZUNGRQ) -#define LAPACK_sormrq LAPACK_GLOBAL(sormrq,SORMRQ) -#define LAPACK_dormrq LAPACK_GLOBAL(dormrq,DORMRQ) -#define LAPACK_cunmrq LAPACK_GLOBAL(cunmrq,CUNMRQ) -#define LAPACK_zunmrq LAPACK_GLOBAL(zunmrq,ZUNMRQ) -#define LAPACK_stzrzf LAPACK_GLOBAL(stzrzf,STZRZF) -#define LAPACK_dtzrzf LAPACK_GLOBAL(dtzrzf,DTZRZF) -#define LAPACK_ctzrzf LAPACK_GLOBAL(ctzrzf,CTZRZF) -#define LAPACK_ztzrzf LAPACK_GLOBAL(ztzrzf,ZTZRZF) -#define LAPACK_sormrz LAPACK_GLOBAL(sormrz,SORMRZ) -#define LAPACK_dormrz LAPACK_GLOBAL(dormrz,DORMRZ) -#define LAPACK_cunmrz LAPACK_GLOBAL(cunmrz,CUNMRZ) -#define LAPACK_zunmrz LAPACK_GLOBAL(zunmrz,ZUNMRZ) -#define LAPACK_sggqrf LAPACK_GLOBAL(sggqrf,SGGQRF) -#define LAPACK_dggqrf LAPACK_GLOBAL(dggqrf,DGGQRF) -#define LAPACK_cggqrf LAPACK_GLOBAL(cggqrf,CGGQRF) -#define LAPACK_zggqrf LAPACK_GLOBAL(zggqrf,ZGGQRF) -#define LAPACK_sggrqf LAPACK_GLOBAL(sggrqf,SGGRQF) -#define LAPACK_dggrqf LAPACK_GLOBAL(dggrqf,DGGRQF) -#define LAPACK_cggrqf LAPACK_GLOBAL(cggrqf,CGGRQF) -#define LAPACK_zggrqf LAPACK_GLOBAL(zggrqf,ZGGRQF) -#define LAPACK_sgebrd LAPACK_GLOBAL(sgebrd,SGEBRD) -#define LAPACK_dgebrd LAPACK_GLOBAL(dgebrd,DGEBRD) -#define LAPACK_cgebrd LAPACK_GLOBAL(cgebrd,CGEBRD) -#define LAPACK_zgebrd LAPACK_GLOBAL(zgebrd,ZGEBRD) -#define LAPACK_sgbbrd LAPACK_GLOBAL(sgbbrd,SGBBRD) -#define LAPACK_dgbbrd LAPACK_GLOBAL(dgbbrd,DGBBRD) -#define LAPACK_cgbbrd LAPACK_GLOBAL(cgbbrd,CGBBRD) -#define LAPACK_zgbbrd LAPACK_GLOBAL(zgbbrd,ZGBBRD) -#define LAPACK_sorgbr LAPACK_GLOBAL(sorgbr,SORGBR) -#define LAPACK_dorgbr LAPACK_GLOBAL(dorgbr,DORGBR) -#define LAPACK_sormbr LAPACK_GLOBAL(sormbr,SORMBR) -#define LAPACK_dormbr LAPACK_GLOBAL(dormbr,DORMBR) -#define LAPACK_cungbr LAPACK_GLOBAL(cungbr,CUNGBR) -#define LAPACK_zungbr LAPACK_GLOBAL(zungbr,ZUNGBR) -#define LAPACK_cunmbr LAPACK_GLOBAL(cunmbr,CUNMBR) -#define LAPACK_zunmbr LAPACK_GLOBAL(zunmbr,ZUNMBR) -#define LAPACK_sbdsqr LAPACK_GLOBAL(sbdsqr,SBDSQR) -#define LAPACK_dbdsqr LAPACK_GLOBAL(dbdsqr,DBDSQR) -#define LAPACK_cbdsqr LAPACK_GLOBAL(cbdsqr,CBDSQR) -#define LAPACK_zbdsqr LAPACK_GLOBAL(zbdsqr,ZBDSQR) -#define LAPACK_sbdsdc LAPACK_GLOBAL(sbdsdc,SBDSDC) -#define LAPACK_dbdsdc LAPACK_GLOBAL(dbdsdc,DBDSDC) -#define LAPACK_ssytrd LAPACK_GLOBAL(ssytrd,SSYTRD) -#define LAPACK_dsytrd LAPACK_GLOBAL(dsytrd,DSYTRD) -#define LAPACK_sorgtr LAPACK_GLOBAL(sorgtr,SORGTR) -#define LAPACK_dorgtr LAPACK_GLOBAL(dorgtr,DORGTR) -#define LAPACK_sormtr LAPACK_GLOBAL(sormtr,SORMTR) -#define LAPACK_dormtr LAPACK_GLOBAL(dormtr,DORMTR) -#define LAPACK_chetrd LAPACK_GLOBAL(chetrd,CHETRD) -#define LAPACK_zhetrd LAPACK_GLOBAL(zhetrd,ZHETRD) -#define LAPACK_cungtr LAPACK_GLOBAL(cungtr,CUNGTR) -#define LAPACK_zungtr LAPACK_GLOBAL(zungtr,ZUNGTR) -#define LAPACK_cunmtr LAPACK_GLOBAL(cunmtr,CUNMTR) -#define LAPACK_zunmtr LAPACK_GLOBAL(zunmtr,ZUNMTR) -#define LAPACK_ssptrd LAPACK_GLOBAL(ssptrd,SSPTRD) -#define LAPACK_dsptrd LAPACK_GLOBAL(dsptrd,DSPTRD) -#define LAPACK_sopgtr LAPACK_GLOBAL(sopgtr,SOPGTR) -#define LAPACK_dopgtr LAPACK_GLOBAL(dopgtr,DOPGTR) -#define LAPACK_sopmtr LAPACK_GLOBAL(sopmtr,SOPMTR) -#define LAPACK_dopmtr LAPACK_GLOBAL(dopmtr,DOPMTR) -#define LAPACK_chptrd LAPACK_GLOBAL(chptrd,CHPTRD) -#define LAPACK_zhptrd LAPACK_GLOBAL(zhptrd,ZHPTRD) -#define LAPACK_cupgtr LAPACK_GLOBAL(cupgtr,CUPGTR) -#define LAPACK_zupgtr LAPACK_GLOBAL(zupgtr,ZUPGTR) -#define LAPACK_cupmtr LAPACK_GLOBAL(cupmtr,CUPMTR) -#define LAPACK_zupmtr LAPACK_GLOBAL(zupmtr,ZUPMTR) -#define LAPACK_ssbtrd LAPACK_GLOBAL(ssbtrd,SSBTRD) -#define LAPACK_dsbtrd LAPACK_GLOBAL(dsbtrd,DSBTRD) -#define LAPACK_chbtrd LAPACK_GLOBAL(chbtrd,CHBTRD) -#define LAPACK_zhbtrd LAPACK_GLOBAL(zhbtrd,ZHBTRD) -#define LAPACK_ssterf LAPACK_GLOBAL(ssterf,SSTERF) -#define LAPACK_dsterf LAPACK_GLOBAL(dsterf,DSTERF) -#define LAPACK_ssteqr LAPACK_GLOBAL(ssteqr,SSTEQR) -#define LAPACK_dsteqr LAPACK_GLOBAL(dsteqr,DSTEQR) -#define LAPACK_csteqr LAPACK_GLOBAL(csteqr,CSTEQR) -#define LAPACK_zsteqr LAPACK_GLOBAL(zsteqr,ZSTEQR) -#define LAPACK_sstemr LAPACK_GLOBAL(sstemr,SSTEMR) -#define LAPACK_dstemr LAPACK_GLOBAL(dstemr,DSTEMR) -#define LAPACK_cstemr LAPACK_GLOBAL(cstemr,CSTEMR) -#define LAPACK_zstemr LAPACK_GLOBAL(zstemr,ZSTEMR) -#define LAPACK_sstedc LAPACK_GLOBAL(sstedc,SSTEDC) -#define LAPACK_dstedc LAPACK_GLOBAL(dstedc,DSTEDC) -#define LAPACK_cstedc LAPACK_GLOBAL(cstedc,CSTEDC) -#define LAPACK_zstedc LAPACK_GLOBAL(zstedc,ZSTEDC) -#define LAPACK_sstegr LAPACK_GLOBAL(sstegr,SSTEGR) -#define LAPACK_dstegr LAPACK_GLOBAL(dstegr,DSTEGR) -#define LAPACK_cstegr LAPACK_GLOBAL(cstegr,CSTEGR) -#define LAPACK_zstegr LAPACK_GLOBAL(zstegr,ZSTEGR) -#define LAPACK_spteqr LAPACK_GLOBAL(spteqr,SPTEQR) -#define LAPACK_dpteqr LAPACK_GLOBAL(dpteqr,DPTEQR) -#define LAPACK_cpteqr LAPACK_GLOBAL(cpteqr,CPTEQR) -#define LAPACK_zpteqr LAPACK_GLOBAL(zpteqr,ZPTEQR) -#define LAPACK_sstebz LAPACK_GLOBAL(sstebz,SSTEBZ) -#define LAPACK_dstebz LAPACK_GLOBAL(dstebz,DSTEBZ) -#define LAPACK_sstein LAPACK_GLOBAL(sstein,SSTEIN) -#define LAPACK_dstein LAPACK_GLOBAL(dstein,DSTEIN) -#define LAPACK_cstein LAPACK_GLOBAL(cstein,CSTEIN) -#define LAPACK_zstein LAPACK_GLOBAL(zstein,ZSTEIN) -#define LAPACK_sdisna LAPACK_GLOBAL(sdisna,SDISNA) -#define LAPACK_ddisna LAPACK_GLOBAL(ddisna,DDISNA) -#define LAPACK_ssygst LAPACK_GLOBAL(ssygst,SSYGST) -#define LAPACK_dsygst LAPACK_GLOBAL(dsygst,DSYGST) -#define LAPACK_chegst LAPACK_GLOBAL(chegst,CHEGST) -#define LAPACK_zhegst LAPACK_GLOBAL(zhegst,ZHEGST) -#define LAPACK_sspgst LAPACK_GLOBAL(sspgst,SSPGST) -#define LAPACK_dspgst LAPACK_GLOBAL(dspgst,DSPGST) -#define LAPACK_chpgst LAPACK_GLOBAL(chpgst,CHPGST) -#define LAPACK_zhpgst LAPACK_GLOBAL(zhpgst,ZHPGST) -#define LAPACK_ssbgst LAPACK_GLOBAL(ssbgst,SSBGST) -#define LAPACK_dsbgst LAPACK_GLOBAL(dsbgst,DSBGST) -#define LAPACK_chbgst LAPACK_GLOBAL(chbgst,CHBGST) -#define LAPACK_zhbgst LAPACK_GLOBAL(zhbgst,ZHBGST) -#define LAPACK_spbstf LAPACK_GLOBAL(spbstf,SPBSTF) -#define LAPACK_dpbstf LAPACK_GLOBAL(dpbstf,DPBSTF) -#define LAPACK_cpbstf LAPACK_GLOBAL(cpbstf,CPBSTF) -#define LAPACK_zpbstf LAPACK_GLOBAL(zpbstf,ZPBSTF) -#define LAPACK_sgehrd LAPACK_GLOBAL(sgehrd,SGEHRD) -#define LAPACK_dgehrd LAPACK_GLOBAL(dgehrd,DGEHRD) -#define LAPACK_cgehrd LAPACK_GLOBAL(cgehrd,CGEHRD) -#define LAPACK_zgehrd LAPACK_GLOBAL(zgehrd,ZGEHRD) -#define LAPACK_sorghr LAPACK_GLOBAL(sorghr,SORGHR) -#define LAPACK_dorghr LAPACK_GLOBAL(dorghr,DORGHR) -#define LAPACK_sormhr LAPACK_GLOBAL(sormhr,SORMHR) -#define LAPACK_dormhr LAPACK_GLOBAL(dormhr,DORMHR) -#define LAPACK_cunghr LAPACK_GLOBAL(cunghr,CUNGHR) -#define LAPACK_zunghr LAPACK_GLOBAL(zunghr,ZUNGHR) -#define LAPACK_cunmhr LAPACK_GLOBAL(cunmhr,CUNMHR) -#define LAPACK_zunmhr LAPACK_GLOBAL(zunmhr,ZUNMHR) -#define LAPACK_sgebal LAPACK_GLOBAL(sgebal,SGEBAL) -#define LAPACK_dgebal LAPACK_GLOBAL(dgebal,DGEBAL) -#define LAPACK_cgebal LAPACK_GLOBAL(cgebal,CGEBAL) -#define LAPACK_zgebal LAPACK_GLOBAL(zgebal,ZGEBAL) -#define LAPACK_sgebak LAPACK_GLOBAL(sgebak,SGEBAK) -#define LAPACK_dgebak LAPACK_GLOBAL(dgebak,DGEBAK) -#define LAPACK_cgebak LAPACK_GLOBAL(cgebak,CGEBAK) -#define LAPACK_zgebak LAPACK_GLOBAL(zgebak,ZGEBAK) -#define LAPACK_shseqr LAPACK_GLOBAL(shseqr,SHSEQR) -#define LAPACK_dhseqr LAPACK_GLOBAL(dhseqr,DHSEQR) -#define LAPACK_chseqr LAPACK_GLOBAL(chseqr,CHSEQR) -#define LAPACK_zhseqr LAPACK_GLOBAL(zhseqr,ZHSEQR) -#define LAPACK_shsein LAPACK_GLOBAL(shsein,SHSEIN) -#define LAPACK_dhsein LAPACK_GLOBAL(dhsein,DHSEIN) -#define LAPACK_chsein LAPACK_GLOBAL(chsein,CHSEIN) -#define LAPACK_zhsein LAPACK_GLOBAL(zhsein,ZHSEIN) -#define LAPACK_strevc LAPACK_GLOBAL(strevc,STREVC) -#define LAPACK_dtrevc LAPACK_GLOBAL(dtrevc,DTREVC) -#define LAPACK_ctrevc LAPACK_GLOBAL(ctrevc,CTREVC) -#define LAPACK_ztrevc LAPACK_GLOBAL(ztrevc,ZTREVC) -#define LAPACK_strsna LAPACK_GLOBAL(strsna,STRSNA) -#define LAPACK_dtrsna LAPACK_GLOBAL(dtrsna,DTRSNA) -#define LAPACK_ctrsna LAPACK_GLOBAL(ctrsna,CTRSNA) -#define LAPACK_ztrsna LAPACK_GLOBAL(ztrsna,ZTRSNA) -#define LAPACK_strexc LAPACK_GLOBAL(strexc,STREXC) -#define LAPACK_dtrexc LAPACK_GLOBAL(dtrexc,DTREXC) -#define LAPACK_ctrexc LAPACK_GLOBAL(ctrexc,CTREXC) -#define LAPACK_ztrexc LAPACK_GLOBAL(ztrexc,ZTREXC) -#define LAPACK_strsen LAPACK_GLOBAL(strsen,STRSEN) -#define LAPACK_dtrsen LAPACK_GLOBAL(dtrsen,DTRSEN) -#define LAPACK_ctrsen LAPACK_GLOBAL(ctrsen,CTRSEN) -#define LAPACK_ztrsen LAPACK_GLOBAL(ztrsen,ZTRSEN) -#define LAPACK_strsyl LAPACK_GLOBAL(strsyl,STRSYL) -#define LAPACK_dtrsyl LAPACK_GLOBAL(dtrsyl,DTRSYL) -#define LAPACK_ctrsyl LAPACK_GLOBAL(ctrsyl,CTRSYL) -#define LAPACK_ztrsyl LAPACK_GLOBAL(ztrsyl,ZTRSYL) -#define LAPACK_sgghrd LAPACK_GLOBAL(sgghrd,SGGHRD) -#define LAPACK_dgghrd LAPACK_GLOBAL(dgghrd,DGGHRD) -#define LAPACK_cgghrd LAPACK_GLOBAL(cgghrd,CGGHRD) -#define LAPACK_zgghrd LAPACK_GLOBAL(zgghrd,ZGGHRD) -#define LAPACK_sggbal LAPACK_GLOBAL(sggbal,SGGBAL) -#define LAPACK_dggbal LAPACK_GLOBAL(dggbal,DGGBAL) -#define LAPACK_cggbal LAPACK_GLOBAL(cggbal,CGGBAL) -#define LAPACK_zggbal LAPACK_GLOBAL(zggbal,ZGGBAL) -#define LAPACK_sggbak LAPACK_GLOBAL(sggbak,SGGBAK) -#define LAPACK_dggbak LAPACK_GLOBAL(dggbak,DGGBAK) -#define LAPACK_cggbak LAPACK_GLOBAL(cggbak,CGGBAK) -#define LAPACK_zggbak LAPACK_GLOBAL(zggbak,ZGGBAK) -#define LAPACK_shgeqz LAPACK_GLOBAL(shgeqz,SHGEQZ) -#define LAPACK_dhgeqz LAPACK_GLOBAL(dhgeqz,DHGEQZ) -#define LAPACK_chgeqz LAPACK_GLOBAL(chgeqz,CHGEQZ) -#define LAPACK_zhgeqz LAPACK_GLOBAL(zhgeqz,ZHGEQZ) -#define LAPACK_stgevc LAPACK_GLOBAL(stgevc,STGEVC) -#define LAPACK_dtgevc LAPACK_GLOBAL(dtgevc,DTGEVC) -#define LAPACK_ctgevc LAPACK_GLOBAL(ctgevc,CTGEVC) -#define LAPACK_ztgevc LAPACK_GLOBAL(ztgevc,ZTGEVC) -#define LAPACK_stgexc LAPACK_GLOBAL(stgexc,STGEXC) -#define LAPACK_dtgexc LAPACK_GLOBAL(dtgexc,DTGEXC) -#define LAPACK_ctgexc LAPACK_GLOBAL(ctgexc,CTGEXC) -#define LAPACK_ztgexc LAPACK_GLOBAL(ztgexc,ZTGEXC) -#define LAPACK_stgsen LAPACK_GLOBAL(stgsen,STGSEN) -#define LAPACK_dtgsen LAPACK_GLOBAL(dtgsen,DTGSEN) -#define LAPACK_ctgsen LAPACK_GLOBAL(ctgsen,CTGSEN) -#define LAPACK_ztgsen LAPACK_GLOBAL(ztgsen,ZTGSEN) -#define LAPACK_stgsyl LAPACK_GLOBAL(stgsyl,STGSYL) -#define LAPACK_dtgsyl LAPACK_GLOBAL(dtgsyl,DTGSYL) -#define LAPACK_ctgsyl LAPACK_GLOBAL(ctgsyl,CTGSYL) -#define LAPACK_ztgsyl LAPACK_GLOBAL(ztgsyl,ZTGSYL) -#define LAPACK_stgsna LAPACK_GLOBAL(stgsna,STGSNA) -#define LAPACK_dtgsna LAPACK_GLOBAL(dtgsna,DTGSNA) -#define LAPACK_ctgsna LAPACK_GLOBAL(ctgsna,CTGSNA) -#define LAPACK_ztgsna LAPACK_GLOBAL(ztgsna,ZTGSNA) -#define LAPACK_sggsvp LAPACK_GLOBAL(sggsvp,SGGSVP) -#define LAPACK_dggsvp LAPACK_GLOBAL(dggsvp,DGGSVP) -#define LAPACK_cggsvp LAPACK_GLOBAL(cggsvp,CGGSVP) -#define LAPACK_zggsvp LAPACK_GLOBAL(zggsvp,ZGGSVP) -#define LAPACK_stgsja LAPACK_GLOBAL(stgsja,STGSJA) -#define LAPACK_dtgsja LAPACK_GLOBAL(dtgsja,DTGSJA) -#define LAPACK_ctgsja LAPACK_GLOBAL(ctgsja,CTGSJA) -#define LAPACK_ztgsja LAPACK_GLOBAL(ztgsja,ZTGSJA) -#define LAPACK_sgels LAPACK_GLOBAL(sgels,SGELS) -#define LAPACK_dgels LAPACK_GLOBAL(dgels,DGELS) -#define LAPACK_cgels LAPACK_GLOBAL(cgels,CGELS) -#define LAPACK_zgels LAPACK_GLOBAL(zgels,ZGELS) -#define LAPACK_sgelsy LAPACK_GLOBAL(sgelsy,SGELSY) -#define LAPACK_dgelsy LAPACK_GLOBAL(dgelsy,DGELSY) -#define LAPACK_cgelsy LAPACK_GLOBAL(cgelsy,CGELSY) -#define LAPACK_zgelsy LAPACK_GLOBAL(zgelsy,ZGELSY) -#define LAPACK_sgelss LAPACK_GLOBAL(sgelss,SGELSS) -#define LAPACK_dgelss LAPACK_GLOBAL(dgelss,DGELSS) -#define LAPACK_cgelss LAPACK_GLOBAL(cgelss,CGELSS) -#define LAPACK_zgelss LAPACK_GLOBAL(zgelss,ZGELSS) -#define LAPACK_sgelsd LAPACK_GLOBAL(sgelsd,SGELSD) -#define LAPACK_dgelsd LAPACK_GLOBAL(dgelsd,DGELSD) -#define LAPACK_cgelsd LAPACK_GLOBAL(cgelsd,CGELSD) -#define LAPACK_zgelsd LAPACK_GLOBAL(zgelsd,ZGELSD) -#define LAPACK_sgglse LAPACK_GLOBAL(sgglse,SGGLSE) -#define LAPACK_dgglse LAPACK_GLOBAL(dgglse,DGGLSE) -#define LAPACK_cgglse LAPACK_GLOBAL(cgglse,CGGLSE) -#define LAPACK_zgglse LAPACK_GLOBAL(zgglse,ZGGLSE) -#define LAPACK_sggglm LAPACK_GLOBAL(sggglm,SGGGLM) -#define LAPACK_dggglm LAPACK_GLOBAL(dggglm,DGGGLM) -#define LAPACK_cggglm LAPACK_GLOBAL(cggglm,CGGGLM) -#define LAPACK_zggglm LAPACK_GLOBAL(zggglm,ZGGGLM) -#define LAPACK_ssyev LAPACK_GLOBAL(ssyev,SSYEV) -#define LAPACK_dsyev LAPACK_GLOBAL(dsyev,DSYEV) -#define LAPACK_cheev LAPACK_GLOBAL(cheev,CHEEV) -#define LAPACK_zheev LAPACK_GLOBAL(zheev,ZHEEV) -#define LAPACK_ssyevd LAPACK_GLOBAL(ssyevd,SSYEVD) -#define LAPACK_dsyevd LAPACK_GLOBAL(dsyevd,DSYEVD) -#define LAPACK_cheevd LAPACK_GLOBAL(cheevd,CHEEVD) -#define LAPACK_zheevd LAPACK_GLOBAL(zheevd,ZHEEVD) -#define LAPACK_ssyevx LAPACK_GLOBAL(ssyevx,SSYEVX) -#define LAPACK_dsyevx LAPACK_GLOBAL(dsyevx,DSYEVX) -#define LAPACK_cheevx LAPACK_GLOBAL(cheevx,CHEEVX) -#define LAPACK_zheevx LAPACK_GLOBAL(zheevx,ZHEEVX) -#define LAPACK_ssyevr LAPACK_GLOBAL(ssyevr,SSYEVR) -#define LAPACK_dsyevr LAPACK_GLOBAL(dsyevr,DSYEVR) -#define LAPACK_cheevr LAPACK_GLOBAL(cheevr,CHEEVR) -#define LAPACK_zheevr LAPACK_GLOBAL(zheevr,ZHEEVR) -#define LAPACK_sspev LAPACK_GLOBAL(sspev,SSPEV) -#define LAPACK_dspev LAPACK_GLOBAL(dspev,DSPEV) -#define LAPACK_chpev LAPACK_GLOBAL(chpev,CHPEV) -#define LAPACK_zhpev LAPACK_GLOBAL(zhpev,ZHPEV) -#define LAPACK_sspevd LAPACK_GLOBAL(sspevd,SSPEVD) -#define LAPACK_dspevd LAPACK_GLOBAL(dspevd,DSPEVD) -#define LAPACK_chpevd LAPACK_GLOBAL(chpevd,CHPEVD) -#define LAPACK_zhpevd LAPACK_GLOBAL(zhpevd,ZHPEVD) -#define LAPACK_sspevx LAPACK_GLOBAL(sspevx,SSPEVX) -#define LAPACK_dspevx LAPACK_GLOBAL(dspevx,DSPEVX) -#define LAPACK_chpevx LAPACK_GLOBAL(chpevx,CHPEVX) -#define LAPACK_zhpevx LAPACK_GLOBAL(zhpevx,ZHPEVX) -#define LAPACK_ssbev LAPACK_GLOBAL(ssbev,SSBEV) -#define LAPACK_dsbev LAPACK_GLOBAL(dsbev,DSBEV) -#define LAPACK_chbev LAPACK_GLOBAL(chbev,CHBEV) -#define LAPACK_zhbev LAPACK_GLOBAL(zhbev,ZHBEV) -#define LAPACK_ssbevd LAPACK_GLOBAL(ssbevd,SSBEVD) -#define LAPACK_dsbevd LAPACK_GLOBAL(dsbevd,DSBEVD) -#define LAPACK_chbevd LAPACK_GLOBAL(chbevd,CHBEVD) -#define LAPACK_zhbevd LAPACK_GLOBAL(zhbevd,ZHBEVD) -#define LAPACK_ssbevx LAPACK_GLOBAL(ssbevx,SSBEVX) -#define LAPACK_dsbevx LAPACK_GLOBAL(dsbevx,DSBEVX) -#define LAPACK_chbevx LAPACK_GLOBAL(chbevx,CHBEVX) -#define LAPACK_zhbevx LAPACK_GLOBAL(zhbevx,ZHBEVX) -#define LAPACK_sstev LAPACK_GLOBAL(sstev,SSTEV) -#define LAPACK_dstev LAPACK_GLOBAL(dstev,DSTEV) -#define LAPACK_sstevd LAPACK_GLOBAL(sstevd,SSTEVD) -#define LAPACK_dstevd LAPACK_GLOBAL(dstevd,DSTEVD) -#define LAPACK_sstevx LAPACK_GLOBAL(sstevx,SSTEVX) -#define LAPACK_dstevx LAPACK_GLOBAL(dstevx,DSTEVX) -#define LAPACK_sstevr LAPACK_GLOBAL(sstevr,SSTEVR) -#define LAPACK_dstevr LAPACK_GLOBAL(dstevr,DSTEVR) -#define LAPACK_sgees LAPACK_GLOBAL(sgees,SGEES) -#define LAPACK_dgees LAPACK_GLOBAL(dgees,DGEES) -#define LAPACK_cgees LAPACK_GLOBAL(cgees,CGEES) -#define LAPACK_zgees LAPACK_GLOBAL(zgees,ZGEES) -#define LAPACK_sgeesx LAPACK_GLOBAL(sgeesx,SGEESX) -#define LAPACK_dgeesx LAPACK_GLOBAL(dgeesx,DGEESX) -#define LAPACK_cgeesx LAPACK_GLOBAL(cgeesx,CGEESX) -#define LAPACK_zgeesx LAPACK_GLOBAL(zgeesx,ZGEESX) -#define LAPACK_sgeev LAPACK_GLOBAL(sgeev,SGEEV) -#define LAPACK_dgeev LAPACK_GLOBAL(dgeev,DGEEV) -#define LAPACK_cgeev LAPACK_GLOBAL(cgeev,CGEEV) -#define LAPACK_zgeev LAPACK_GLOBAL(zgeev,ZGEEV) -#define LAPACK_sgeevx LAPACK_GLOBAL(sgeevx,SGEEVX) -#define LAPACK_dgeevx LAPACK_GLOBAL(dgeevx,DGEEVX) -#define LAPACK_cgeevx LAPACK_GLOBAL(cgeevx,CGEEVX) -#define LAPACK_zgeevx LAPACK_GLOBAL(zgeevx,ZGEEVX) -#define LAPACK_sgesvd LAPACK_GLOBAL(sgesvd,SGESVD) -#define LAPACK_dgesvd LAPACK_GLOBAL(dgesvd,DGESVD) -#define LAPACK_cgesvd LAPACK_GLOBAL(cgesvd,CGESVD) -#define LAPACK_zgesvd LAPACK_GLOBAL(zgesvd,ZGESVD) -#define LAPACK_sgesdd LAPACK_GLOBAL(sgesdd,SGESDD) -#define LAPACK_dgesdd LAPACK_GLOBAL(dgesdd,DGESDD) -#define LAPACK_cgesdd LAPACK_GLOBAL(cgesdd,CGESDD) -#define LAPACK_zgesdd LAPACK_GLOBAL(zgesdd,ZGESDD) -#define LAPACK_dgejsv LAPACK_GLOBAL(dgejsv,DGEJSV) -#define LAPACK_sgejsv LAPACK_GLOBAL(sgejsv,SGEJSV) -#define LAPACK_dgesvj LAPACK_GLOBAL(dgesvj,DGESVJ) -#define LAPACK_sgesvj LAPACK_GLOBAL(sgesvj,SGESVJ) -#define LAPACK_sggsvd LAPACK_GLOBAL(sggsvd,SGGSVD) -#define LAPACK_dggsvd LAPACK_GLOBAL(dggsvd,DGGSVD) -#define LAPACK_cggsvd LAPACK_GLOBAL(cggsvd,CGGSVD) -#define LAPACK_zggsvd LAPACK_GLOBAL(zggsvd,ZGGSVD) -#define LAPACK_ssygv LAPACK_GLOBAL(ssygv,SSYGV) -#define LAPACK_dsygv LAPACK_GLOBAL(dsygv,DSYGV) -#define LAPACK_chegv LAPACK_GLOBAL(chegv,CHEGV) -#define LAPACK_zhegv LAPACK_GLOBAL(zhegv,ZHEGV) -#define LAPACK_ssygvd LAPACK_GLOBAL(ssygvd,SSYGVD) -#define LAPACK_dsygvd LAPACK_GLOBAL(dsygvd,DSYGVD) -#define LAPACK_chegvd LAPACK_GLOBAL(chegvd,CHEGVD) -#define LAPACK_zhegvd LAPACK_GLOBAL(zhegvd,ZHEGVD) -#define LAPACK_ssygvx LAPACK_GLOBAL(ssygvx,SSYGVX) -#define LAPACK_dsygvx LAPACK_GLOBAL(dsygvx,DSYGVX) -#define LAPACK_chegvx LAPACK_GLOBAL(chegvx,CHEGVX) -#define LAPACK_zhegvx LAPACK_GLOBAL(zhegvx,ZHEGVX) -#define LAPACK_sspgv LAPACK_GLOBAL(sspgv,SSPGV) -#define LAPACK_dspgv LAPACK_GLOBAL(dspgv,DSPGV) -#define LAPACK_chpgv LAPACK_GLOBAL(chpgv,CHPGV) -#define LAPACK_zhpgv LAPACK_GLOBAL(zhpgv,ZHPGV) -#define LAPACK_sspgvd LAPACK_GLOBAL(sspgvd,SSPGVD) -#define LAPACK_dspgvd LAPACK_GLOBAL(dspgvd,DSPGVD) -#define LAPACK_chpgvd LAPACK_GLOBAL(chpgvd,CHPGVD) -#define LAPACK_zhpgvd LAPACK_GLOBAL(zhpgvd,ZHPGVD) -#define LAPACK_sspgvx LAPACK_GLOBAL(sspgvx,SSPGVX) -#define LAPACK_dspgvx LAPACK_GLOBAL(dspgvx,DSPGVX) -#define LAPACK_chpgvx LAPACK_GLOBAL(chpgvx,CHPGVX) -#define LAPACK_zhpgvx LAPACK_GLOBAL(zhpgvx,ZHPGVX) -#define LAPACK_ssbgv LAPACK_GLOBAL(ssbgv,SSBGV) -#define LAPACK_dsbgv LAPACK_GLOBAL(dsbgv,DSBGV) -#define LAPACK_chbgv LAPACK_GLOBAL(chbgv,CHBGV) -#define LAPACK_zhbgv LAPACK_GLOBAL(zhbgv,ZHBGV) -#define LAPACK_ssbgvd LAPACK_GLOBAL(ssbgvd,SSBGVD) -#define LAPACK_dsbgvd LAPACK_GLOBAL(dsbgvd,DSBGVD) -#define LAPACK_chbgvd LAPACK_GLOBAL(chbgvd,CHBGVD) -#define LAPACK_zhbgvd LAPACK_GLOBAL(zhbgvd,ZHBGVD) -#define LAPACK_ssbgvx LAPACK_GLOBAL(ssbgvx,SSBGVX) -#define LAPACK_dsbgvx LAPACK_GLOBAL(dsbgvx,DSBGVX) -#define LAPACK_chbgvx LAPACK_GLOBAL(chbgvx,CHBGVX) -#define LAPACK_zhbgvx LAPACK_GLOBAL(zhbgvx,ZHBGVX) -#define LAPACK_sgges LAPACK_GLOBAL(sgges,SGGES) -#define LAPACK_dgges LAPACK_GLOBAL(dgges,DGGES) -#define LAPACK_cgges LAPACK_GLOBAL(cgges,CGGES) -#define LAPACK_zgges LAPACK_GLOBAL(zgges,ZGGES) -#define LAPACK_sggesx LAPACK_GLOBAL(sggesx,SGGESX) -#define LAPACK_dggesx LAPACK_GLOBAL(dggesx,DGGESX) -#define LAPACK_cggesx LAPACK_GLOBAL(cggesx,CGGESX) -#define LAPACK_zggesx LAPACK_GLOBAL(zggesx,ZGGESX) -#define LAPACK_sggev LAPACK_GLOBAL(sggev,SGGEV) -#define LAPACK_dggev LAPACK_GLOBAL(dggev,DGGEV) -#define LAPACK_cggev LAPACK_GLOBAL(cggev,CGGEV) -#define LAPACK_zggev LAPACK_GLOBAL(zggev,ZGGEV) -#define LAPACK_sggevx LAPACK_GLOBAL(sggevx,SGGEVX) -#define LAPACK_dggevx LAPACK_GLOBAL(dggevx,DGGEVX) -#define LAPACK_cggevx LAPACK_GLOBAL(cggevx,CGGEVX) -#define LAPACK_zggevx LAPACK_GLOBAL(zggevx,ZGGEVX) -#define LAPACK_dsfrk LAPACK_GLOBAL(dsfrk,DSFRK) -#define LAPACK_ssfrk LAPACK_GLOBAL(ssfrk,SSFRK) -#define LAPACK_zhfrk LAPACK_GLOBAL(zhfrk,ZHFRK) -#define LAPACK_chfrk LAPACK_GLOBAL(chfrk,CHFRK) -#define LAPACK_dtfsm LAPACK_GLOBAL(dtfsm,DTFSM) -#define LAPACK_stfsm LAPACK_GLOBAL(stfsm,STFSM) -#define LAPACK_ztfsm LAPACK_GLOBAL(ztfsm,ZTFSM) -#define LAPACK_ctfsm LAPACK_GLOBAL(ctfsm,CTFSM) -#define LAPACK_dtfttp LAPACK_GLOBAL(dtfttp,DTFTTP) -#define LAPACK_stfttp LAPACK_GLOBAL(stfttp,STFTTP) -#define LAPACK_ztfttp LAPACK_GLOBAL(ztfttp,ZTFTTP) -#define LAPACK_ctfttp LAPACK_GLOBAL(ctfttp,CTFTTP) -#define LAPACK_dtfttr LAPACK_GLOBAL(dtfttr,DTFTTR) -#define LAPACK_stfttr LAPACK_GLOBAL(stfttr,STFTTR) -#define LAPACK_ztfttr LAPACK_GLOBAL(ztfttr,ZTFTTR) -#define LAPACK_ctfttr LAPACK_GLOBAL(ctfttr,CTFTTR) -#define LAPACK_dtpttf LAPACK_GLOBAL(dtpttf,DTPTTF) -#define LAPACK_stpttf LAPACK_GLOBAL(stpttf,STPTTF) -#define LAPACK_ztpttf LAPACK_GLOBAL(ztpttf,ZTPTTF) -#define LAPACK_ctpttf LAPACK_GLOBAL(ctpttf,CTPTTF) -#define LAPACK_dtpttr LAPACK_GLOBAL(dtpttr,DTPTTR) -#define LAPACK_stpttr LAPACK_GLOBAL(stpttr,STPTTR) -#define LAPACK_ztpttr LAPACK_GLOBAL(ztpttr,ZTPTTR) -#define LAPACK_ctpttr LAPACK_GLOBAL(ctpttr,CTPTTR) -#define LAPACK_dtrttf LAPACK_GLOBAL(dtrttf,DTRTTF) -#define LAPACK_strttf LAPACK_GLOBAL(strttf,STRTTF) -#define LAPACK_ztrttf LAPACK_GLOBAL(ztrttf,ZTRTTF) -#define LAPACK_ctrttf LAPACK_GLOBAL(ctrttf,CTRTTF) -#define LAPACK_dtrttp LAPACK_GLOBAL(dtrttp,DTRTTP) -#define LAPACK_strttp LAPACK_GLOBAL(strttp,STRTTP) -#define LAPACK_ztrttp LAPACK_GLOBAL(ztrttp,ZTRTTP) -#define LAPACK_ctrttp LAPACK_GLOBAL(ctrttp,CTRTTP) -#define LAPACK_sgeqrfp LAPACK_GLOBAL(sgeqrfp,SGEQRFP) -#define LAPACK_dgeqrfp LAPACK_GLOBAL(dgeqrfp,DGEQRFP) -#define LAPACK_cgeqrfp LAPACK_GLOBAL(cgeqrfp,CGEQRFP) -#define LAPACK_zgeqrfp LAPACK_GLOBAL(zgeqrfp,ZGEQRFP) -#define LAPACK_clacgv LAPACK_GLOBAL(clacgv,CLACGV) -#define LAPACK_zlacgv LAPACK_GLOBAL(zlacgv,ZLACGV) -#define LAPACK_slarnv LAPACK_GLOBAL(slarnv,SLARNV) -#define LAPACK_dlarnv LAPACK_GLOBAL(dlarnv,DLARNV) -#define LAPACK_clarnv LAPACK_GLOBAL(clarnv,CLARNV) -#define LAPACK_zlarnv LAPACK_GLOBAL(zlarnv,ZLARNV) -#define LAPACK_sgeqr2 LAPACK_GLOBAL(sgeqr2,SGEQR2) -#define LAPACK_dgeqr2 LAPACK_GLOBAL(dgeqr2,DGEQR2) -#define LAPACK_cgeqr2 LAPACK_GLOBAL(cgeqr2,CGEQR2) -#define LAPACK_zgeqr2 LAPACK_GLOBAL(zgeqr2,ZGEQR2) -#define LAPACK_slacpy LAPACK_GLOBAL(slacpy,SLACPY) -#define LAPACK_dlacpy LAPACK_GLOBAL(dlacpy,DLACPY) -#define LAPACK_clacpy LAPACK_GLOBAL(clacpy,CLACPY) -#define LAPACK_zlacpy LAPACK_GLOBAL(zlacpy,ZLACPY) -#define LAPACK_sgetf2 LAPACK_GLOBAL(sgetf2,SGETF2) -#define LAPACK_dgetf2 LAPACK_GLOBAL(dgetf2,DGETF2) -#define LAPACK_cgetf2 LAPACK_GLOBAL(cgetf2,CGETF2) -#define LAPACK_zgetf2 LAPACK_GLOBAL(zgetf2,ZGETF2) -#define LAPACK_slaswp LAPACK_GLOBAL(slaswp,SLASWP) -#define LAPACK_dlaswp LAPACK_GLOBAL(dlaswp,DLASWP) -#define LAPACK_claswp LAPACK_GLOBAL(claswp,CLASWP) -#define LAPACK_zlaswp LAPACK_GLOBAL(zlaswp,ZLASWP) -#define LAPACK_slange LAPACK_GLOBAL(slange,SLANGE) -#define LAPACK_dlange LAPACK_GLOBAL(dlange,DLANGE) -#define LAPACK_clange LAPACK_GLOBAL(clange,CLANGE) -#define LAPACK_zlange LAPACK_GLOBAL(zlange,ZLANGE) -#define LAPACK_clanhe LAPACK_GLOBAL(clanhe,CLANHE) -#define LAPACK_zlanhe LAPACK_GLOBAL(zlanhe,ZLANHE) -#define LAPACK_slansy LAPACK_GLOBAL(slansy,SLANSY) -#define LAPACK_dlansy LAPACK_GLOBAL(dlansy,DLANSY) -#define LAPACK_clansy LAPACK_GLOBAL(clansy,CLANSY) -#define LAPACK_zlansy LAPACK_GLOBAL(zlansy,ZLANSY) -#define LAPACK_slantr LAPACK_GLOBAL(slantr,SLANTR) -#define LAPACK_dlantr LAPACK_GLOBAL(dlantr,DLANTR) -#define LAPACK_clantr LAPACK_GLOBAL(clantr,CLANTR) -#define LAPACK_zlantr LAPACK_GLOBAL(zlantr,ZLANTR) -#define LAPACK_slamch LAPACK_GLOBAL(slamch,SLAMCH) -#define LAPACK_dlamch LAPACK_GLOBAL(dlamch,DLAMCH) -#define LAPACK_sgelq2 LAPACK_GLOBAL(sgelq2,SGELQ2) -#define LAPACK_dgelq2 LAPACK_GLOBAL(dgelq2,DGELQ2) -#define LAPACK_cgelq2 LAPACK_GLOBAL(cgelq2,CGELQ2) -#define LAPACK_zgelq2 LAPACK_GLOBAL(zgelq2,ZGELQ2) -#define LAPACK_slarfb LAPACK_GLOBAL(slarfb,SLARFB) -#define LAPACK_dlarfb LAPACK_GLOBAL(dlarfb,DLARFB) -#define LAPACK_clarfb LAPACK_GLOBAL(clarfb,CLARFB) -#define LAPACK_zlarfb LAPACK_GLOBAL(zlarfb,ZLARFB) -#define LAPACK_slarfg LAPACK_GLOBAL(slarfg,SLARFG) -#define LAPACK_dlarfg LAPACK_GLOBAL(dlarfg,DLARFG) -#define LAPACK_clarfg LAPACK_GLOBAL(clarfg,CLARFG) -#define LAPACK_zlarfg LAPACK_GLOBAL(zlarfg,ZLARFG) -#define LAPACK_slarft LAPACK_GLOBAL(slarft,SLARFT) -#define LAPACK_dlarft LAPACK_GLOBAL(dlarft,DLARFT) -#define LAPACK_clarft LAPACK_GLOBAL(clarft,CLARFT) -#define LAPACK_zlarft LAPACK_GLOBAL(zlarft,ZLARFT) -#define LAPACK_slarfx LAPACK_GLOBAL(slarfx,SLARFX) -#define LAPACK_dlarfx LAPACK_GLOBAL(dlarfx,DLARFX) -#define LAPACK_clarfx LAPACK_GLOBAL(clarfx,CLARFX) -#define LAPACK_zlarfx LAPACK_GLOBAL(zlarfx,ZLARFX) -#define LAPACK_slatms LAPACK_GLOBAL(slatms,SLATMS) -#define LAPACK_dlatms LAPACK_GLOBAL(dlatms,DLATMS) -#define LAPACK_clatms LAPACK_GLOBAL(clatms,CLATMS) -#define LAPACK_zlatms LAPACK_GLOBAL(zlatms,ZLATMS) -#define LAPACK_slag2d LAPACK_GLOBAL(slag2d,SLAG2D) -#define LAPACK_dlag2s LAPACK_GLOBAL(dlag2s,DLAG2S) -#define LAPACK_clag2z LAPACK_GLOBAL(clag2z,CLAG2Z) -#define LAPACK_zlag2c LAPACK_GLOBAL(zlag2c,ZLAG2C) -#define LAPACK_slauum LAPACK_GLOBAL(slauum,SLAUUM) -#define LAPACK_dlauum LAPACK_GLOBAL(dlauum,DLAUUM) -#define LAPACK_clauum LAPACK_GLOBAL(clauum,CLAUUM) -#define LAPACK_zlauum LAPACK_GLOBAL(zlauum,ZLAUUM) -#define LAPACK_slagge LAPACK_GLOBAL(slagge,SLAGGE) -#define LAPACK_dlagge LAPACK_GLOBAL(dlagge,DLAGGE) -#define LAPACK_clagge LAPACK_GLOBAL(clagge,CLAGGE) -#define LAPACK_zlagge LAPACK_GLOBAL(zlagge,ZLAGGE) -#define LAPACK_slaset LAPACK_GLOBAL(slaset,SLASET) -#define LAPACK_dlaset LAPACK_GLOBAL(dlaset,DLASET) -#define LAPACK_claset LAPACK_GLOBAL(claset,CLASET) -#define LAPACK_zlaset LAPACK_GLOBAL(zlaset,ZLASET) -#define LAPACK_slasrt LAPACK_GLOBAL(slasrt,SLASRT) -#define LAPACK_dlasrt LAPACK_GLOBAL(dlasrt,DLASRT) -#define LAPACK_slagsy LAPACK_GLOBAL(slagsy,SLAGSY) -#define LAPACK_dlagsy LAPACK_GLOBAL(dlagsy,DLAGSY) -#define LAPACK_clagsy LAPACK_GLOBAL(clagsy,CLAGSY) -#define LAPACK_zlagsy LAPACK_GLOBAL(zlagsy,ZLAGSY) -#define LAPACK_claghe LAPACK_GLOBAL(claghe,CLAGHE) -#define LAPACK_zlaghe LAPACK_GLOBAL(zlaghe,ZLAGHE) -#define LAPACK_slapmr LAPACK_GLOBAL(slapmr,SLAPMR) -#define LAPACK_dlapmr LAPACK_GLOBAL(dlapmr,DLAPMR) -#define LAPACK_clapmr LAPACK_GLOBAL(clapmr,CLAPMR) -#define LAPACK_zlapmr LAPACK_GLOBAL(zlapmr,ZLAPMR) -#define LAPACK_slapy2 LAPACK_GLOBAL(slapy2,SLAPY2) -#define LAPACK_dlapy2 LAPACK_GLOBAL(dlapy2,DLAPY2) -#define LAPACK_slapy3 LAPACK_GLOBAL(slapy3,SLAPY3) -#define LAPACK_dlapy3 LAPACK_GLOBAL(dlapy3,DLAPY3) -#define LAPACK_slartgp LAPACK_GLOBAL(slartgp,SLARTGP) -#define LAPACK_dlartgp LAPACK_GLOBAL(dlartgp,DLARTGP) -#define LAPACK_slartgs LAPACK_GLOBAL(slartgs,SLARTGS) -#define LAPACK_dlartgs LAPACK_GLOBAL(dlartgs,DLARTGS) -// LAPACK 3.3.0 -#define LAPACK_cbbcsd LAPACK_GLOBAL(cbbcsd,CBBCSD) -#define LAPACK_cheswapr LAPACK_GLOBAL(cheswapr,CHESWAPR) -#define LAPACK_chetri2 LAPACK_GLOBAL(chetri2,CHETRI2) -#define LAPACK_chetri2x LAPACK_GLOBAL(chetri2x,CHETRI2X) -#define LAPACK_chetrs2 LAPACK_GLOBAL(chetrs2,CHETRS2) -#define LAPACK_csyconv LAPACK_GLOBAL(csyconv,CSYCONV) -#define LAPACK_csyswapr LAPACK_GLOBAL(csyswapr,CSYSWAPR) -#define LAPACK_csytri2 LAPACK_GLOBAL(csytri2,CSYTRI2) -#define LAPACK_csytri2x LAPACK_GLOBAL(csytri2x,CSYTRI2X) -#define LAPACK_csytrs2 LAPACK_GLOBAL(csytrs2,CSYTRS2) -#define LAPACK_cunbdb LAPACK_GLOBAL(cunbdb,CUNBDB) -#define LAPACK_cuncsd LAPACK_GLOBAL(cuncsd,CUNCSD) -#define LAPACK_dbbcsd LAPACK_GLOBAL(dbbcsd,DBBCSD) -#define LAPACK_dorbdb LAPACK_GLOBAL(dorbdb,DORBDB) -#define LAPACK_dorcsd LAPACK_GLOBAL(dorcsd,DORCSD) -#define LAPACK_dsyconv LAPACK_GLOBAL(dsyconv,DSYCONV) -#define LAPACK_dsyswapr LAPACK_GLOBAL(dsyswapr,DSYSWAPR) -#define LAPACK_dsytri2 LAPACK_GLOBAL(dsytri2,DSYTRI2) -#define LAPACK_dsytri2x LAPACK_GLOBAL(dsytri2x,DSYTRI2X) -#define LAPACK_dsytrs2 LAPACK_GLOBAL(dsytrs2,DSYTRS2) -#define LAPACK_sbbcsd LAPACK_GLOBAL(sbbcsd,SBBCSD) -#define LAPACK_sorbdb LAPACK_GLOBAL(sorbdb,SORBDB) -#define LAPACK_sorcsd LAPACK_GLOBAL(sorcsd,SORCSD) -#define LAPACK_ssyconv LAPACK_GLOBAL(ssyconv,SSYCONV) -#define LAPACK_ssyswapr LAPACK_GLOBAL(ssyswapr,SSYSWAPR) -#define LAPACK_ssytri2 LAPACK_GLOBAL(ssytri2,SSYTRI2) -#define LAPACK_ssytri2x LAPACK_GLOBAL(ssytri2x,SSYTRI2X) -#define LAPACK_ssytrs2 LAPACK_GLOBAL(ssytrs2,SSYTRS2) -#define LAPACK_zbbcsd LAPACK_GLOBAL(zbbcsd,ZBBCSD) -#define LAPACK_zheswapr LAPACK_GLOBAL(zheswapr,ZHESWAPR) -#define LAPACK_zhetri2 LAPACK_GLOBAL(zhetri2,ZHETRI2) -#define LAPACK_zhetri2x LAPACK_GLOBAL(zhetri2x,ZHETRI2X) -#define LAPACK_zhetrs2 LAPACK_GLOBAL(zhetrs2,ZHETRS2) -#define LAPACK_zsyconv LAPACK_GLOBAL(zsyconv,ZSYCONV) -#define LAPACK_zsyswapr LAPACK_GLOBAL(zsyswapr,ZSYSWAPR) -#define LAPACK_zsytri2 LAPACK_GLOBAL(zsytri2,ZSYTRI2) -#define LAPACK_zsytri2x LAPACK_GLOBAL(zsytri2x,ZSYTRI2X) -#define LAPACK_zsytrs2 LAPACK_GLOBAL(zsytrs2,ZSYTRS2) -#define LAPACK_zunbdb LAPACK_GLOBAL(zunbdb,ZUNBDB) -#define LAPACK_zuncsd LAPACK_GLOBAL(zuncsd,ZUNCSD) -// LAPACK 3.4.0 -#define LAPACK_sgemqrt LAPACK_GLOBAL(sgemqrt,SGEMQRT) -#define LAPACK_dgemqrt LAPACK_GLOBAL(dgemqrt,DGEMQRT) -#define LAPACK_cgemqrt LAPACK_GLOBAL(cgemqrt,CGEMQRT) -#define LAPACK_zgemqrt LAPACK_GLOBAL(zgemqrt,ZGEMQRT) -#define LAPACK_sgeqrt LAPACK_GLOBAL(sgeqrt,SGEQRT) -#define LAPACK_dgeqrt LAPACK_GLOBAL(dgeqrt,DGEQRT) -#define LAPACK_cgeqrt LAPACK_GLOBAL(cgeqrt,CGEQRT) -#define LAPACK_zgeqrt LAPACK_GLOBAL(zgeqrt,ZGEQRT) -#define LAPACK_sgeqrt2 LAPACK_GLOBAL(sgeqrt2,SGEQRT2) -#define LAPACK_dgeqrt2 LAPACK_GLOBAL(dgeqrt2,DGEQRT2) -#define LAPACK_cgeqrt2 LAPACK_GLOBAL(cgeqrt2,CGEQRT2) -#define LAPACK_zgeqrt2 LAPACK_GLOBAL(zgeqrt2,ZGEQRT2) -#define LAPACK_sgeqrt3 LAPACK_GLOBAL(sgeqrt3,SGEQRT3) -#define LAPACK_dgeqrt3 LAPACK_GLOBAL(dgeqrt3,DGEQRT3) -#define LAPACK_cgeqrt3 LAPACK_GLOBAL(cgeqrt3,CGEQRT3) -#define LAPACK_zgeqrt3 LAPACK_GLOBAL(zgeqrt3,ZGEQRT3) -#define LAPACK_stpmqrt LAPACK_GLOBAL(stpmqrt,STPMQRT) -#define LAPACK_dtpmqrt LAPACK_GLOBAL(dtpmqrt,DTPMQRT) -#define LAPACK_ctpmqrt LAPACK_GLOBAL(ctpmqrt,CTPMQRT) -#define LAPACK_ztpmqrt LAPACK_GLOBAL(ztpmqrt,ZTPMQRT) -#define LAPACK_dtpqrt LAPACK_GLOBAL(dtpqrt,DTPQRT) -#define LAPACK_ctpqrt LAPACK_GLOBAL(ctpqrt,CTPQRT) -#define LAPACK_ztpqrt LAPACK_GLOBAL(ztpqrt,ZTPQRT) -#define LAPACK_stpqrt2 LAPACK_GLOBAL(stpqrt2,STPQRT2) -#define LAPACK_dtpqrt2 LAPACK_GLOBAL(dtpqrt2,DTPQRT2) -#define LAPACK_ctpqrt2 LAPACK_GLOBAL(ctpqrt2,CTPQRT2) -#define LAPACK_ztpqrt2 LAPACK_GLOBAL(ztpqrt2,ZTPQRT2) -#define LAPACK_stprfb LAPACK_GLOBAL(stprfb,STPRFB) -#define LAPACK_dtprfb LAPACK_GLOBAL(dtprfb,DTPRFB) -#define LAPACK_ctprfb LAPACK_GLOBAL(ctprfb,CTPRFB) -#define LAPACK_ztprfb LAPACK_GLOBAL(ztprfb,ZTPRFB) -// LAPACK 3.X.X -#define LAPACK_csyr LAPACK_GLOBAL(csyr,CSYR) -#define LAPACK_zsyr LAPACK_GLOBAL(zsyr,ZSYR) - - -void LAPACK_sgetrf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_dgetrf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_cgetrf( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_int* ipiv, lapack_int *info ); -void LAPACK_zgetrf( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_int* ipiv, lapack_int *info ); -void LAPACK_sgbtrf( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, float* ab, lapack_int* ldab, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_dgbtrf( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, double* ab, lapack_int* ldab, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_cgbtrf( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_complex_float* ab, lapack_int* ldab, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_zgbtrf( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_complex_double* ab, lapack_int* ldab, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_sgttrf( lapack_int* n, float* dl, float* d, float* du, float* du2, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_dgttrf( lapack_int* n, double* dl, double* d, double* du, - double* du2, lapack_int* ipiv, lapack_int *info ); -void LAPACK_cgttrf( lapack_int* n, lapack_complex_float* dl, - lapack_complex_float* d, lapack_complex_float* du, - lapack_complex_float* du2, lapack_int* ipiv, - lapack_int *info ); -void LAPACK_zgttrf( lapack_int* n, lapack_complex_double* dl, - lapack_complex_double* d, lapack_complex_double* du, - lapack_complex_double* du2, lapack_int* ipiv, - lapack_int *info ); -void LAPACK_spotrf( char* uplo, lapack_int* n, float* a, lapack_int* lda, - lapack_int *info ); -void LAPACK_dpotrf( char* uplo, lapack_int* n, double* a, lapack_int* lda, - lapack_int *info ); -void LAPACK_cpotrf( char* uplo, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_int *info ); -void LAPACK_zpotrf( char* uplo, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_int *info ); -void LAPACK_dpstrf( char* uplo, lapack_int* n, double* a, lapack_int* lda, - lapack_int* piv, lapack_int* rank, double* tol, - double* work, lapack_int *info ); -void LAPACK_spstrf( char* uplo, lapack_int* n, float* a, lapack_int* lda, - lapack_int* piv, lapack_int* rank, float* tol, float* work, - lapack_int *info ); -void LAPACK_zpstrf( char* uplo, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_int* piv, lapack_int* rank, - double* tol, double* work, lapack_int *info ); -void LAPACK_cpstrf( char* uplo, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_int* piv, lapack_int* rank, - float* tol, float* work, lapack_int *info ); -void LAPACK_dpftrf( char* transr, char* uplo, lapack_int* n, double* a, - lapack_int *info ); -void LAPACK_spftrf( char* transr, char* uplo, lapack_int* n, float* a, - lapack_int *info ); -void LAPACK_zpftrf( char* transr, char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int *info ); -void LAPACK_cpftrf( char* transr, char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int *info ); -void LAPACK_spptrf( char* uplo, lapack_int* n, float* ap, lapack_int *info ); -void LAPACK_dpptrf( char* uplo, lapack_int* n, double* ap, lapack_int *info ); -void LAPACK_cpptrf( char* uplo, lapack_int* n, lapack_complex_float* ap, - lapack_int *info ); -void LAPACK_zpptrf( char* uplo, lapack_int* n, lapack_complex_double* ap, - lapack_int *info ); -void LAPACK_spbtrf( char* uplo, lapack_int* n, lapack_int* kd, float* ab, - lapack_int* ldab, lapack_int *info ); -void LAPACK_dpbtrf( char* uplo, lapack_int* n, lapack_int* kd, double* ab, - lapack_int* ldab, lapack_int *info ); -void LAPACK_cpbtrf( char* uplo, lapack_int* n, lapack_int* kd, - lapack_complex_float* ab, lapack_int* ldab, - lapack_int *info ); -void LAPACK_zpbtrf( char* uplo, lapack_int* n, lapack_int* kd, - lapack_complex_double* ab, lapack_int* ldab, - lapack_int *info ); -void LAPACK_spttrf( lapack_int* n, float* d, float* e, lapack_int *info ); -void LAPACK_dpttrf( lapack_int* n, double* d, double* e, lapack_int *info ); -void LAPACK_cpttrf( lapack_int* n, float* d, lapack_complex_float* e, - lapack_int *info ); -void LAPACK_zpttrf( lapack_int* n, double* d, lapack_complex_double* e, - lapack_int *info ); -void LAPACK_ssytrf( char* uplo, lapack_int* n, float* a, lapack_int* lda, - lapack_int* ipiv, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dsytrf( char* uplo, lapack_int* n, double* a, lapack_int* lda, - lapack_int* ipiv, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_csytrf( char* uplo, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_int* ipiv, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zsytrf( char* uplo, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_int* ipiv, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_chetrf( char* uplo, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_int* ipiv, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zhetrf( char* uplo, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_int* ipiv, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_ssptrf( char* uplo, lapack_int* n, float* ap, lapack_int* ipiv, - lapack_int *info ); -void LAPACK_dsptrf( char* uplo, lapack_int* n, double* ap, lapack_int* ipiv, - lapack_int *info ); -void LAPACK_csptrf( char* uplo, lapack_int* n, lapack_complex_float* ap, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_zsptrf( char* uplo, lapack_int* n, lapack_complex_double* ap, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_chptrf( char* uplo, lapack_int* n, lapack_complex_float* ap, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_zhptrf( char* uplo, lapack_int* n, lapack_complex_double* ap, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_sgetrs( char* trans, lapack_int* n, lapack_int* nrhs, - const float* a, lapack_int* lda, const lapack_int* ipiv, - float* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_dgetrs( char* trans, lapack_int* n, lapack_int* nrhs, - const double* a, lapack_int* lda, const lapack_int* ipiv, - double* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_cgetrs( char* trans, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - const lapack_int* ipiv, lapack_complex_float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_zgetrs( char* trans, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_int* ipiv, lapack_complex_double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_sgbtrs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku, - lapack_int* nrhs, const float* ab, lapack_int* ldab, - const lapack_int* ipiv, float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dgbtrs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku, - lapack_int* nrhs, const double* ab, lapack_int* ldab, - const lapack_int* ipiv, double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_cgbtrs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku, - lapack_int* nrhs, const lapack_complex_float* ab, - lapack_int* ldab, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_zgbtrs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku, - lapack_int* nrhs, const lapack_complex_double* ab, - lapack_int* ldab, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_sgttrs( char* trans, lapack_int* n, lapack_int* nrhs, - const float* dl, const float* d, const float* du, - const float* du2, const lapack_int* ipiv, float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_dgttrs( char* trans, lapack_int* n, lapack_int* nrhs, - const double* dl, const double* d, const double* du, - const double* du2, const lapack_int* ipiv, double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_cgttrs( char* trans, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* dl, - const lapack_complex_float* d, - const lapack_complex_float* du, - const lapack_complex_float* du2, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_zgttrs( char* trans, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* dl, - const lapack_complex_double* d, - const lapack_complex_double* du, - const lapack_complex_double* du2, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_spotrs( char* uplo, lapack_int* n, lapack_int* nrhs, const float* a, - lapack_int* lda, float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dpotrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const double* a, lapack_int* lda, double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_cpotrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_zpotrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dpftrs( char* transr, char* uplo, lapack_int* n, lapack_int* nrhs, - const double* a, double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_spftrs( char* transr, char* uplo, lapack_int* n, lapack_int* nrhs, - const float* a, float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_zpftrs( char* transr, char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_complex_double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_cpftrs( char* transr, char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_complex_float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_spptrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const float* ap, float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dpptrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const double* ap, double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_cpptrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* ap, lapack_complex_float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_zpptrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* ap, lapack_complex_double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_spbtrs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs, - const float* ab, lapack_int* ldab, float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_dpbtrs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs, - const double* ab, lapack_int* ldab, double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_cpbtrs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs, - const lapack_complex_float* ab, lapack_int* ldab, - lapack_complex_float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_zpbtrs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs, - const lapack_complex_double* ab, lapack_int* ldab, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_spttrs( lapack_int* n, lapack_int* nrhs, const float* d, - const float* e, float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dpttrs( lapack_int* n, lapack_int* nrhs, const double* d, - const double* e, double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_cpttrs( char* uplo, lapack_int* n, lapack_int* nrhs, const float* d, - const lapack_complex_float* e, lapack_complex_float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_zpttrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const double* d, const lapack_complex_double* e, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_ssytrs( char* uplo, lapack_int* n, lapack_int* nrhs, const float* a, - lapack_int* lda, const lapack_int* ipiv, float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_dsytrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const double* a, lapack_int* lda, const lapack_int* ipiv, - double* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_csytrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - const lapack_int* ipiv, lapack_complex_float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_zsytrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_int* ipiv, lapack_complex_double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_chetrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - const lapack_int* ipiv, lapack_complex_float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_zhetrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_int* ipiv, lapack_complex_double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_ssptrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const float* ap, const lapack_int* ipiv, float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_dsptrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const double* ap, const lapack_int* ipiv, double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_csptrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* ap, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_zsptrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* ap, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_chptrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* ap, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_zhptrs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* ap, const lapack_int* ipiv, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_strtrs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const float* a, lapack_int* lda, float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_dtrtrs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const double* a, lapack_int* lda, - double* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_ctrtrs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_ztrtrs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_stptrs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const float* ap, float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_dtptrs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const double* ap, double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_ctptrs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const lapack_complex_float* ap, - lapack_complex_float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_ztptrs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const lapack_complex_double* ap, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_stbtrs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* kd, lapack_int* nrhs, const float* ab, - lapack_int* ldab, float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dtbtrs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* kd, lapack_int* nrhs, const double* ab, - lapack_int* ldab, double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_ctbtrs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* kd, lapack_int* nrhs, - const lapack_complex_float* ab, lapack_int* ldab, - lapack_complex_float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_ztbtrs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* kd, lapack_int* nrhs, - const lapack_complex_double* ab, lapack_int* ldab, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_sgecon( char* norm, lapack_int* n, const float* a, lapack_int* lda, - float* anorm, float* rcond, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dgecon( char* norm, lapack_int* n, const double* a, lapack_int* lda, - double* anorm, double* rcond, double* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_cgecon( char* norm, lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, float* anorm, float* rcond, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zgecon( char* norm, lapack_int* n, const lapack_complex_double* a, - lapack_int* lda, double* anorm, double* rcond, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_sgbcon( char* norm, lapack_int* n, lapack_int* kl, lapack_int* ku, - const float* ab, lapack_int* ldab, const lapack_int* ipiv, - float* anorm, float* rcond, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dgbcon( char* norm, lapack_int* n, lapack_int* kl, lapack_int* ku, - const double* ab, lapack_int* ldab, const lapack_int* ipiv, - double* anorm, double* rcond, double* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_cgbcon( char* norm, lapack_int* n, lapack_int* kl, lapack_int* ku, - const lapack_complex_float* ab, lapack_int* ldab, - const lapack_int* ipiv, float* anorm, float* rcond, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zgbcon( char* norm, lapack_int* n, lapack_int* kl, lapack_int* ku, - const lapack_complex_double* ab, lapack_int* ldab, - const lapack_int* ipiv, double* anorm, double* rcond, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_sgtcon( char* norm, lapack_int* n, const float* dl, const float* d, - const float* du, const float* du2, const lapack_int* ipiv, - float* anorm, float* rcond, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dgtcon( char* norm, lapack_int* n, const double* dl, - const double* d, const double* du, const double* du2, - const lapack_int* ipiv, double* anorm, double* rcond, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_cgtcon( char* norm, lapack_int* n, const lapack_complex_float* dl, - const lapack_complex_float* d, - const lapack_complex_float* du, - const lapack_complex_float* du2, const lapack_int* ipiv, - float* anorm, float* rcond, lapack_complex_float* work, - lapack_int *info ); -void LAPACK_zgtcon( char* norm, lapack_int* n, const lapack_complex_double* dl, - const lapack_complex_double* d, - const lapack_complex_double* du, - const lapack_complex_double* du2, const lapack_int* ipiv, - double* anorm, double* rcond, lapack_complex_double* work, - lapack_int *info ); -void LAPACK_spocon( char* uplo, lapack_int* n, const float* a, lapack_int* lda, - float* anorm, float* rcond, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dpocon( char* uplo, lapack_int* n, const double* a, lapack_int* lda, - double* anorm, double* rcond, double* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_cpocon( char* uplo, lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, float* anorm, float* rcond, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zpocon( char* uplo, lapack_int* n, const lapack_complex_double* a, - lapack_int* lda, double* anorm, double* rcond, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_sppcon( char* uplo, lapack_int* n, const float* ap, float* anorm, - float* rcond, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dppcon( char* uplo, lapack_int* n, const double* ap, double* anorm, - double* rcond, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_cppcon( char* uplo, lapack_int* n, const lapack_complex_float* ap, - float* anorm, float* rcond, lapack_complex_float* work, - float* rwork, lapack_int *info ); -void LAPACK_zppcon( char* uplo, lapack_int* n, const lapack_complex_double* ap, - double* anorm, double* rcond, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_spbcon( char* uplo, lapack_int* n, lapack_int* kd, const float* ab, - lapack_int* ldab, float* anorm, float* rcond, float* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_dpbcon( char* uplo, lapack_int* n, lapack_int* kd, const double* ab, - lapack_int* ldab, double* anorm, double* rcond, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_cpbcon( char* uplo, lapack_int* n, lapack_int* kd, - const lapack_complex_float* ab, lapack_int* ldab, - float* anorm, float* rcond, lapack_complex_float* work, - float* rwork, lapack_int *info ); -void LAPACK_zpbcon( char* uplo, lapack_int* n, lapack_int* kd, - const lapack_complex_double* ab, lapack_int* ldab, - double* anorm, double* rcond, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_sptcon( lapack_int* n, const float* d, const float* e, float* anorm, - float* rcond, float* work, lapack_int *info ); -void LAPACK_dptcon( lapack_int* n, const double* d, const double* e, - double* anorm, double* rcond, double* work, - lapack_int *info ); -void LAPACK_cptcon( lapack_int* n, const float* d, - const lapack_complex_float* e, float* anorm, float* rcond, - float* work, lapack_int *info ); -void LAPACK_zptcon( lapack_int* n, const double* d, - const lapack_complex_double* e, double* anorm, - double* rcond, double* work, lapack_int *info ); -void LAPACK_ssycon( char* uplo, lapack_int* n, const float* a, lapack_int* lda, - const lapack_int* ipiv, float* anorm, float* rcond, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_dsycon( char* uplo, lapack_int* n, const double* a, lapack_int* lda, - const lapack_int* ipiv, double* anorm, double* rcond, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_csycon( char* uplo, lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, const lapack_int* ipiv, float* anorm, - float* rcond, lapack_complex_float* work, - lapack_int *info ); -void LAPACK_zsycon( char* uplo, lapack_int* n, const lapack_complex_double* a, - lapack_int* lda, const lapack_int* ipiv, double* anorm, - double* rcond, lapack_complex_double* work, - lapack_int *info ); -void LAPACK_checon( char* uplo, lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, const lapack_int* ipiv, float* anorm, - float* rcond, lapack_complex_float* work, - lapack_int *info ); -void LAPACK_zhecon( char* uplo, lapack_int* n, const lapack_complex_double* a, - lapack_int* lda, const lapack_int* ipiv, double* anorm, - double* rcond, lapack_complex_double* work, - lapack_int *info ); -void LAPACK_sspcon( char* uplo, lapack_int* n, const float* ap, - const lapack_int* ipiv, float* anorm, float* rcond, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_dspcon( char* uplo, lapack_int* n, const double* ap, - const lapack_int* ipiv, double* anorm, double* rcond, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_cspcon( char* uplo, lapack_int* n, const lapack_complex_float* ap, - const lapack_int* ipiv, float* anorm, float* rcond, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zspcon( char* uplo, lapack_int* n, const lapack_complex_double* ap, - const lapack_int* ipiv, double* anorm, double* rcond, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_chpcon( char* uplo, lapack_int* n, const lapack_complex_float* ap, - const lapack_int* ipiv, float* anorm, float* rcond, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zhpcon( char* uplo, lapack_int* n, const lapack_complex_double* ap, - const lapack_int* ipiv, double* anorm, double* rcond, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_strcon( char* norm, char* uplo, char* diag, lapack_int* n, - const float* a, lapack_int* lda, float* rcond, float* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_dtrcon( char* norm, char* uplo, char* diag, lapack_int* n, - const double* a, lapack_int* lda, double* rcond, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_ctrcon( char* norm, char* uplo, char* diag, lapack_int* n, - const lapack_complex_float* a, lapack_int* lda, - float* rcond, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_ztrcon( char* norm, char* uplo, char* diag, lapack_int* n, - const lapack_complex_double* a, lapack_int* lda, - double* rcond, lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_stpcon( char* norm, char* uplo, char* diag, lapack_int* n, - const float* ap, float* rcond, float* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_dtpcon( char* norm, char* uplo, char* diag, lapack_int* n, - const double* ap, double* rcond, double* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_ctpcon( char* norm, char* uplo, char* diag, lapack_int* n, - const lapack_complex_float* ap, float* rcond, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_ztpcon( char* norm, char* uplo, char* diag, lapack_int* n, - const lapack_complex_double* ap, double* rcond, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_stbcon( char* norm, char* uplo, char* diag, lapack_int* n, - lapack_int* kd, const float* ab, lapack_int* ldab, - float* rcond, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dtbcon( char* norm, char* uplo, char* diag, lapack_int* n, - lapack_int* kd, const double* ab, lapack_int* ldab, - double* rcond, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_ctbcon( char* norm, char* uplo, char* diag, lapack_int* n, - lapack_int* kd, const lapack_complex_float* ab, - lapack_int* ldab, float* rcond, lapack_complex_float* work, - float* rwork, lapack_int *info ); -void LAPACK_ztbcon( char* norm, char* uplo, char* diag, lapack_int* n, - lapack_int* kd, const lapack_complex_double* ab, - lapack_int* ldab, double* rcond, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_sgerfs( char* trans, lapack_int* n, lapack_int* nrhs, - const float* a, lapack_int* lda, const float* af, - lapack_int* ldaf, const lapack_int* ipiv, const float* b, - lapack_int* ldb, float* x, lapack_int* ldx, float* ferr, - float* berr, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dgerfs( char* trans, lapack_int* n, lapack_int* nrhs, - const double* a, lapack_int* lda, const double* af, - lapack_int* ldaf, const lapack_int* ipiv, const double* b, - lapack_int* ldb, double* x, lapack_int* ldx, double* ferr, - double* berr, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_cgerfs( char* trans, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* af, lapack_int* ldaf, - const lapack_int* ipiv, const lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx, - float* ferr, float* berr, lapack_complex_float* work, - float* rwork, lapack_int *info ); -void LAPACK_zgerfs( char* trans, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* af, lapack_int* ldaf, - const lapack_int* ipiv, const lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx, - double* ferr, double* berr, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_dgerfsx( char* trans, char* equed, lapack_int* n, lapack_int* nrhs, - const double* a, lapack_int* lda, const double* af, - lapack_int* ldaf, const lapack_int* ipiv, const double* r, - const double* c, const double* b, lapack_int* ldb, - double* x, lapack_int* ldx, double* rcond, double* berr, - lapack_int* n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int* nparams, double* params, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_sgerfsx( char* trans, char* equed, lapack_int* n, lapack_int* nrhs, - const float* a, lapack_int* lda, const float* af, - lapack_int* ldaf, const lapack_int* ipiv, const float* r, - const float* c, const float* b, lapack_int* ldb, float* x, - lapack_int* ldx, float* rcond, float* berr, - lapack_int* n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int* nparams, float* params, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_zgerfsx( char* trans, char* equed, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* af, lapack_int* ldaf, - const lapack_int* ipiv, const double* r, const double* c, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_cgerfsx( char* trans, char* equed, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* af, lapack_int* ldaf, - const lapack_int* ipiv, const float* r, const float* c, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* berr, lapack_int* n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int* nparams, float* params, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_sgbrfs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku, - lapack_int* nrhs, const float* ab, lapack_int* ldab, - const float* afb, lapack_int* ldafb, const lapack_int* ipiv, - const float* b, lapack_int* ldb, float* x, lapack_int* ldx, - float* ferr, float* berr, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dgbrfs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku, - lapack_int* nrhs, const double* ab, lapack_int* ldab, - const double* afb, lapack_int* ldafb, - const lapack_int* ipiv, const double* b, lapack_int* ldb, - double* x, lapack_int* ldx, double* ferr, double* berr, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_cgbrfs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku, - lapack_int* nrhs, const lapack_complex_float* ab, - lapack_int* ldab, const lapack_complex_float* afb, - lapack_int* ldafb, const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* ferr, - float* berr, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zgbrfs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku, - lapack_int* nrhs, const lapack_complex_double* ab, - lapack_int* ldab, const lapack_complex_double* afb, - lapack_int* ldafb, const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* ferr, - double* berr, lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_dgbrfsx( char* trans, char* equed, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_int* nrhs, const double* ab, - lapack_int* ldab, const double* afb, lapack_int* ldafb, - const lapack_int* ipiv, const double* r, const double* c, - const double* b, lapack_int* ldb, double* x, - lapack_int* ldx, double* rcond, double* berr, - lapack_int* n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int* nparams, double* params, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_sgbrfsx( char* trans, char* equed, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_int* nrhs, const float* ab, - lapack_int* ldab, const float* afb, lapack_int* ldafb, - const lapack_int* ipiv, const float* r, const float* c, - const float* b, lapack_int* ldb, float* x, lapack_int* ldx, - float* rcond, float* berr, lapack_int* n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int* nparams, float* params, float* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_zgbrfsx( char* trans, char* equed, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_int* nrhs, - const lapack_complex_double* ab, lapack_int* ldab, - const lapack_complex_double* afb, lapack_int* ldafb, - const lapack_int* ipiv, const double* r, const double* c, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_cgbrfsx( char* trans, char* equed, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_int* nrhs, - const lapack_complex_float* ab, lapack_int* ldab, - const lapack_complex_float* afb, lapack_int* ldafb, - const lapack_int* ipiv, const float* r, const float* c, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* berr, lapack_int* n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int* nparams, float* params, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_sgtrfs( char* trans, lapack_int* n, lapack_int* nrhs, - const float* dl, const float* d, const float* du, - const float* dlf, const float* df, const float* duf, - const float* du2, const lapack_int* ipiv, const float* b, - lapack_int* ldb, float* x, lapack_int* ldx, float* ferr, - float* berr, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dgtrfs( char* trans, lapack_int* n, lapack_int* nrhs, - const double* dl, const double* d, const double* du, - const double* dlf, const double* df, const double* duf, - const double* du2, const lapack_int* ipiv, const double* b, - lapack_int* ldb, double* x, lapack_int* ldx, double* ferr, - double* berr, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_cgtrfs( char* trans, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* dl, - const lapack_complex_float* d, - const lapack_complex_float* du, - const lapack_complex_float* dlf, - const lapack_complex_float* df, - const lapack_complex_float* duf, - const lapack_complex_float* du2, const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* ferr, - float* berr, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zgtrfs( char* trans, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* dl, - const lapack_complex_double* d, - const lapack_complex_double* du, - const lapack_complex_double* dlf, - const lapack_complex_double* df, - const lapack_complex_double* duf, - const lapack_complex_double* du2, const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* ferr, - double* berr, lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_sporfs( char* uplo, lapack_int* n, lapack_int* nrhs, const float* a, - lapack_int* lda, const float* af, lapack_int* ldaf, - const float* b, lapack_int* ldb, float* x, lapack_int* ldx, - float* ferr, float* berr, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dporfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const double* a, lapack_int* lda, const double* af, - lapack_int* ldaf, const double* b, lapack_int* ldb, - double* x, lapack_int* ldx, double* ferr, double* berr, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_cporfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* af, lapack_int* ldaf, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* ferr, - float* berr, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zporfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* af, lapack_int* ldaf, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* ferr, - double* berr, lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_dporfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs, - const double* a, lapack_int* lda, const double* af, - lapack_int* ldaf, const double* s, const double* b, - lapack_int* ldb, double* x, lapack_int* ldx, double* rcond, - double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, double* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_sporfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs, - const float* a, lapack_int* lda, const float* af, - lapack_int* ldaf, const float* s, const float* b, - lapack_int* ldb, float* x, lapack_int* ldx, float* rcond, - float* berr, lapack_int* n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int* nparams, float* params, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_zporfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* af, lapack_int* ldaf, - const double* s, const lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx, - double* rcond, double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_cporfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* af, lapack_int* ldaf, - const float* s, const lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx, - float* rcond, float* berr, lapack_int* n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int* nparams, float* params, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_spprfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const float* ap, const float* afp, const float* b, - lapack_int* ldb, float* x, lapack_int* ldx, float* ferr, - float* berr, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dpprfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const double* ap, const double* afp, const double* b, - lapack_int* ldb, double* x, lapack_int* ldx, double* ferr, - double* berr, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_cpprfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* ap, - const lapack_complex_float* afp, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* ferr, - float* berr, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zpprfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* ap, - const lapack_complex_double* afp, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* ferr, - double* berr, lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_spbrfs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs, - const float* ab, lapack_int* ldab, const float* afb, - lapack_int* ldafb, const float* b, lapack_int* ldb, - float* x, lapack_int* ldx, float* ferr, float* berr, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_dpbrfs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs, - const double* ab, lapack_int* ldab, const double* afb, - lapack_int* ldafb, const double* b, lapack_int* ldb, - double* x, lapack_int* ldx, double* ferr, double* berr, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_cpbrfs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs, - const lapack_complex_float* ab, lapack_int* ldab, - const lapack_complex_float* afb, lapack_int* ldafb, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* ferr, - float* berr, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zpbrfs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs, - const lapack_complex_double* ab, lapack_int* ldab, - const lapack_complex_double* afb, lapack_int* ldafb, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* ferr, - double* berr, lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_sptrfs( lapack_int* n, lapack_int* nrhs, const float* d, - const float* e, const float* df, const float* ef, - const float* b, lapack_int* ldb, float* x, lapack_int* ldx, - float* ferr, float* berr, float* work, lapack_int *info ); -void LAPACK_dptrfs( lapack_int* n, lapack_int* nrhs, const double* d, - const double* e, const double* df, const double* ef, - const double* b, lapack_int* ldb, double* x, - lapack_int* ldx, double* ferr, double* berr, double* work, - lapack_int *info ); -void LAPACK_cptrfs( char* uplo, lapack_int* n, lapack_int* nrhs, const float* d, - const lapack_complex_float* e, const float* df, - const lapack_complex_float* ef, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* ferr, - float* berr, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zptrfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const double* d, const lapack_complex_double* e, - const double* df, const lapack_complex_double* ef, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* ferr, - double* berr, lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_ssyrfs( char* uplo, lapack_int* n, lapack_int* nrhs, const float* a, - lapack_int* lda, const float* af, lapack_int* ldaf, - const lapack_int* ipiv, const float* b, lapack_int* ldb, - float* x, lapack_int* ldx, float* ferr, float* berr, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_dsyrfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const double* a, lapack_int* lda, const double* af, - lapack_int* ldaf, const lapack_int* ipiv, const double* b, - lapack_int* ldb, double* x, lapack_int* ldx, double* ferr, - double* berr, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_csyrfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* af, lapack_int* ldaf, - const lapack_int* ipiv, const lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx, - float* ferr, float* berr, lapack_complex_float* work, - float* rwork, lapack_int *info ); -void LAPACK_zsyrfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* af, lapack_int* ldaf, - const lapack_int* ipiv, const lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx, - double* ferr, double* berr, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_dsyrfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs, - const double* a, lapack_int* lda, const double* af, - lapack_int* ldaf, const lapack_int* ipiv, const double* s, - const double* b, lapack_int* ldb, double* x, - lapack_int* ldx, double* rcond, double* berr, - lapack_int* n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int* nparams, double* params, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_ssyrfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs, - const float* a, lapack_int* lda, const float* af, - lapack_int* ldaf, const lapack_int* ipiv, const float* s, - const float* b, lapack_int* ldb, float* x, lapack_int* ldx, - float* rcond, float* berr, lapack_int* n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int* nparams, float* params, float* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_zsyrfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* af, lapack_int* ldaf, - const lapack_int* ipiv, const double* s, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_csyrfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* af, lapack_int* ldaf, - const lapack_int* ipiv, const float* s, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* berr, lapack_int* n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int* nparams, float* params, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_cherfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* af, lapack_int* ldaf, - const lapack_int* ipiv, const lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx, - float* ferr, float* berr, lapack_complex_float* work, - float* rwork, lapack_int *info ); -void LAPACK_zherfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* af, lapack_int* ldaf, - const lapack_int* ipiv, const lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx, - double* ferr, double* berr, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_zherfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* af, lapack_int* ldaf, - const lapack_int* ipiv, const double* s, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_cherfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* af, lapack_int* ldaf, - const lapack_int* ipiv, const float* s, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* berr, lapack_int* n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int* nparams, float* params, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_ssprfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const float* ap, const float* afp, const lapack_int* ipiv, - const float* b, lapack_int* ldb, float* x, lapack_int* ldx, - float* ferr, float* berr, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dsprfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const double* ap, const double* afp, const lapack_int* ipiv, - const double* b, lapack_int* ldb, double* x, - lapack_int* ldx, double* ferr, double* berr, double* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_csprfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* ap, - const lapack_complex_float* afp, const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* ferr, - float* berr, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zsprfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* ap, - const lapack_complex_double* afp, const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* ferr, - double* berr, lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_chprfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* ap, - const lapack_complex_float* afp, const lapack_int* ipiv, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* ferr, - float* berr, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zhprfs( char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* ap, - const lapack_complex_double* afp, const lapack_int* ipiv, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* ferr, - double* berr, lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_strrfs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const float* a, lapack_int* lda, - const float* b, lapack_int* ldb, const float* x, - lapack_int* ldx, float* ferr, float* berr, float* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_dtrrfs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const double* a, lapack_int* lda, - const double* b, lapack_int* ldb, const double* x, - lapack_int* ldx, double* ferr, double* berr, double* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_ctrrfs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const lapack_complex_float* a, - lapack_int* lda, const lapack_complex_float* b, - lapack_int* ldb, const lapack_complex_float* x, - lapack_int* ldx, float* ferr, float* berr, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_ztrrfs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const lapack_complex_double* a, - lapack_int* lda, const lapack_complex_double* b, - lapack_int* ldb, const lapack_complex_double* x, - lapack_int* ldx, double* ferr, double* berr, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_stprfs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const float* ap, const float* b, - lapack_int* ldb, const float* x, lapack_int* ldx, - float* ferr, float* berr, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dtprfs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const double* ap, const double* b, - lapack_int* ldb, const double* x, lapack_int* ldx, - double* ferr, double* berr, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_ctprfs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const lapack_complex_float* ap, - const lapack_complex_float* b, lapack_int* ldb, - const lapack_complex_float* x, lapack_int* ldx, float* ferr, - float* berr, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_ztprfs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* nrhs, const lapack_complex_double* ap, - const lapack_complex_double* b, lapack_int* ldb, - const lapack_complex_double* x, lapack_int* ldx, - double* ferr, double* berr, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_stbrfs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* kd, lapack_int* nrhs, const float* ab, - lapack_int* ldab, const float* b, lapack_int* ldb, - const float* x, lapack_int* ldx, float* ferr, float* berr, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_dtbrfs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* kd, lapack_int* nrhs, const double* ab, - lapack_int* ldab, const double* b, lapack_int* ldb, - const double* x, lapack_int* ldx, double* ferr, - double* berr, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_ctbrfs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* kd, lapack_int* nrhs, - const lapack_complex_float* ab, lapack_int* ldab, - const lapack_complex_float* b, lapack_int* ldb, - const lapack_complex_float* x, lapack_int* ldx, float* ferr, - float* berr, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_ztbrfs( char* uplo, char* trans, char* diag, lapack_int* n, - lapack_int* kd, lapack_int* nrhs, - const lapack_complex_double* ab, lapack_int* ldab, - const lapack_complex_double* b, lapack_int* ldb, - const lapack_complex_double* x, lapack_int* ldx, - double* ferr, double* berr, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_sgetri( lapack_int* n, float* a, lapack_int* lda, - const lapack_int* ipiv, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dgetri( lapack_int* n, double* a, lapack_int* lda, - const lapack_int* ipiv, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cgetri( lapack_int* n, lapack_complex_float* a, lapack_int* lda, - const lapack_int* ipiv, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zgetri( lapack_int* n, lapack_complex_double* a, lapack_int* lda, - const lapack_int* ipiv, lapack_complex_double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_spotri( char* uplo, lapack_int* n, float* a, lapack_int* lda, - lapack_int *info ); -void LAPACK_dpotri( char* uplo, lapack_int* n, double* a, lapack_int* lda, - lapack_int *info ); -void LAPACK_cpotri( char* uplo, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_int *info ); -void LAPACK_zpotri( char* uplo, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_int *info ); -void LAPACK_dpftri( char* transr, char* uplo, lapack_int* n, double* a, - lapack_int *info ); -void LAPACK_spftri( char* transr, char* uplo, lapack_int* n, float* a, - lapack_int *info ); -void LAPACK_zpftri( char* transr, char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int *info ); -void LAPACK_cpftri( char* transr, char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int *info ); -void LAPACK_spptri( char* uplo, lapack_int* n, float* ap, lapack_int *info ); -void LAPACK_dpptri( char* uplo, lapack_int* n, double* ap, lapack_int *info ); -void LAPACK_cpptri( char* uplo, lapack_int* n, lapack_complex_float* ap, - lapack_int *info ); -void LAPACK_zpptri( char* uplo, lapack_int* n, lapack_complex_double* ap, - lapack_int *info ); -void LAPACK_ssytri( char* uplo, lapack_int* n, float* a, lapack_int* lda, - const lapack_int* ipiv, float* work, lapack_int *info ); -void LAPACK_dsytri( char* uplo, lapack_int* n, double* a, lapack_int* lda, - const lapack_int* ipiv, double* work, lapack_int *info ); -void LAPACK_csytri( char* uplo, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, const lapack_int* ipiv, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zsytri( char* uplo, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, const lapack_int* ipiv, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_chetri( char* uplo, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, const lapack_int* ipiv, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zhetri( char* uplo, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, const lapack_int* ipiv, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_ssptri( char* uplo, lapack_int* n, float* ap, - const lapack_int* ipiv, float* work, lapack_int *info ); -void LAPACK_dsptri( char* uplo, lapack_int* n, double* ap, - const lapack_int* ipiv, double* work, lapack_int *info ); -void LAPACK_csptri( char* uplo, lapack_int* n, lapack_complex_float* ap, - const lapack_int* ipiv, lapack_complex_float* work, - lapack_int *info ); -void LAPACK_zsptri( char* uplo, lapack_int* n, lapack_complex_double* ap, - const lapack_int* ipiv, lapack_complex_double* work, - lapack_int *info ); -void LAPACK_chptri( char* uplo, lapack_int* n, lapack_complex_float* ap, - const lapack_int* ipiv, lapack_complex_float* work, - lapack_int *info ); -void LAPACK_zhptri( char* uplo, lapack_int* n, lapack_complex_double* ap, - const lapack_int* ipiv, lapack_complex_double* work, - lapack_int *info ); -void LAPACK_strtri( char* uplo, char* diag, lapack_int* n, float* a, - lapack_int* lda, lapack_int *info ); -void LAPACK_dtrtri( char* uplo, char* diag, lapack_int* n, double* a, - lapack_int* lda, lapack_int *info ); -void LAPACK_ctrtri( char* uplo, char* diag, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - lapack_int *info ); -void LAPACK_ztrtri( char* uplo, char* diag, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - lapack_int *info ); -void LAPACK_dtftri( char* transr, char* uplo, char* diag, lapack_int* n, - double* a, lapack_int *info ); -void LAPACK_stftri( char* transr, char* uplo, char* diag, lapack_int* n, - float* a, lapack_int *info ); -void LAPACK_ztftri( char* transr, char* uplo, char* diag, lapack_int* n, - lapack_complex_double* a, lapack_int *info ); -void LAPACK_ctftri( char* transr, char* uplo, char* diag, lapack_int* n, - lapack_complex_float* a, lapack_int *info ); -void LAPACK_stptri( char* uplo, char* diag, lapack_int* n, float* ap, - lapack_int *info ); -void LAPACK_dtptri( char* uplo, char* diag, lapack_int* n, double* ap, - lapack_int *info ); -void LAPACK_ctptri( char* uplo, char* diag, lapack_int* n, - lapack_complex_float* ap, lapack_int *info ); -void LAPACK_ztptri( char* uplo, char* diag, lapack_int* n, - lapack_complex_double* ap, lapack_int *info ); -void LAPACK_sgeequ( lapack_int* m, lapack_int* n, const float* a, - lapack_int* lda, float* r, float* c, float* rowcnd, - float* colcnd, float* amax, lapack_int *info ); -void LAPACK_dgeequ( lapack_int* m, lapack_int* n, const double* a, - lapack_int* lda, double* r, double* c, double* rowcnd, - double* colcnd, double* amax, lapack_int *info ); -void LAPACK_cgeequ( lapack_int* m, lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, float* r, float* c, float* rowcnd, - float* colcnd, float* amax, lapack_int *info ); -void LAPACK_zgeequ( lapack_int* m, lapack_int* n, - const lapack_complex_double* a, lapack_int* lda, double* r, - double* c, double* rowcnd, double* colcnd, double* amax, - lapack_int *info ); -void LAPACK_dgeequb( lapack_int* m, lapack_int* n, const double* a, - lapack_int* lda, double* r, double* c, double* rowcnd, - double* colcnd, double* amax, lapack_int *info ); -void LAPACK_sgeequb( lapack_int* m, lapack_int* n, const float* a, - lapack_int* lda, float* r, float* c, float* rowcnd, - float* colcnd, float* amax, lapack_int *info ); -void LAPACK_zgeequb( lapack_int* m, lapack_int* n, - const lapack_complex_double* a, lapack_int* lda, double* r, - double* c, double* rowcnd, double* colcnd, double* amax, - lapack_int *info ); -void LAPACK_cgeequb( lapack_int* m, lapack_int* n, - const lapack_complex_float* a, lapack_int* lda, float* r, - float* c, float* rowcnd, float* colcnd, float* amax, - lapack_int *info ); -void LAPACK_sgbequ( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, const float* ab, lapack_int* ldab, float* r, - float* c, float* rowcnd, float* colcnd, float* amax, - lapack_int *info ); -void LAPACK_dgbequ( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, const double* ab, lapack_int* ldab, - double* r, double* c, double* rowcnd, double* colcnd, - double* amax, lapack_int *info ); -void LAPACK_cgbequ( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, const lapack_complex_float* ab, - lapack_int* ldab, float* r, float* c, float* rowcnd, - float* colcnd, float* amax, lapack_int *info ); -void LAPACK_zgbequ( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, const lapack_complex_double* ab, - lapack_int* ldab, double* r, double* c, double* rowcnd, - double* colcnd, double* amax, lapack_int *info ); -void LAPACK_dgbequb( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, const double* ab, lapack_int* ldab, - double* r, double* c, double* rowcnd, double* colcnd, - double* amax, lapack_int *info ); -void LAPACK_sgbequb( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, const float* ab, lapack_int* ldab, - float* r, float* c, float* rowcnd, float* colcnd, - float* amax, lapack_int *info ); -void LAPACK_zgbequb( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, const lapack_complex_double* ab, - lapack_int* ldab, double* r, double* c, double* rowcnd, - double* colcnd, double* amax, lapack_int *info ); -void LAPACK_cgbequb( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, const lapack_complex_float* ab, - lapack_int* ldab, float* r, float* c, float* rowcnd, - float* colcnd, float* amax, lapack_int *info ); -void LAPACK_spoequ( lapack_int* n, const float* a, lapack_int* lda, float* s, - float* scond, float* amax, lapack_int *info ); -void LAPACK_dpoequ( lapack_int* n, const double* a, lapack_int* lda, double* s, - double* scond, double* amax, lapack_int *info ); -void LAPACK_cpoequ( lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, float* s, float* scond, float* amax, - lapack_int *info ); -void LAPACK_zpoequ( lapack_int* n, const lapack_complex_double* a, - lapack_int* lda, double* s, double* scond, double* amax, - lapack_int *info ); -void LAPACK_dpoequb( lapack_int* n, const double* a, lapack_int* lda, double* s, - double* scond, double* amax, lapack_int *info ); -void LAPACK_spoequb( lapack_int* n, const float* a, lapack_int* lda, float* s, - float* scond, float* amax, lapack_int *info ); -void LAPACK_zpoequb( lapack_int* n, const lapack_complex_double* a, - lapack_int* lda, double* s, double* scond, double* amax, - lapack_int *info ); -void LAPACK_cpoequb( lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, float* s, float* scond, float* amax, - lapack_int *info ); -void LAPACK_sppequ( char* uplo, lapack_int* n, const float* ap, float* s, - float* scond, float* amax, lapack_int *info ); -void LAPACK_dppequ( char* uplo, lapack_int* n, const double* ap, double* s, - double* scond, double* amax, lapack_int *info ); -void LAPACK_cppequ( char* uplo, lapack_int* n, const lapack_complex_float* ap, - float* s, float* scond, float* amax, lapack_int *info ); -void LAPACK_zppequ( char* uplo, lapack_int* n, const lapack_complex_double* ap, - double* s, double* scond, double* amax, lapack_int *info ); -void LAPACK_spbequ( char* uplo, lapack_int* n, lapack_int* kd, const float* ab, - lapack_int* ldab, float* s, float* scond, float* amax, - lapack_int *info ); -void LAPACK_dpbequ( char* uplo, lapack_int* n, lapack_int* kd, const double* ab, - lapack_int* ldab, double* s, double* scond, double* amax, - lapack_int *info ); -void LAPACK_cpbequ( char* uplo, lapack_int* n, lapack_int* kd, - const lapack_complex_float* ab, lapack_int* ldab, float* s, - float* scond, float* amax, lapack_int *info ); -void LAPACK_zpbequ( char* uplo, lapack_int* n, lapack_int* kd, - const lapack_complex_double* ab, lapack_int* ldab, - double* s, double* scond, double* amax, lapack_int *info ); -void LAPACK_dsyequb( char* uplo, lapack_int* n, const double* a, - lapack_int* lda, double* s, double* scond, double* amax, - double* work, lapack_int *info ); -void LAPACK_ssyequb( char* uplo, lapack_int* n, const float* a, lapack_int* lda, - float* s, float* scond, float* amax, float* work, - lapack_int *info ); -void LAPACK_zsyequb( char* uplo, lapack_int* n, const lapack_complex_double* a, - lapack_int* lda, double* s, double* scond, double* amax, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_csyequb( char* uplo, lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, float* s, float* scond, float* amax, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zheequb( char* uplo, lapack_int* n, const lapack_complex_double* a, - lapack_int* lda, double* s, double* scond, double* amax, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_cheequb( char* uplo, lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, float* s, float* scond, float* amax, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_sgesv( lapack_int* n, lapack_int* nrhs, float* a, lapack_int* lda, - lapack_int* ipiv, float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dgesv( lapack_int* n, lapack_int* nrhs, double* a, lapack_int* lda, - lapack_int* ipiv, double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_cgesv( lapack_int* n, lapack_int* nrhs, lapack_complex_float* a, - lapack_int* lda, lapack_int* ipiv, lapack_complex_float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_zgesv( lapack_int* n, lapack_int* nrhs, lapack_complex_double* a, - lapack_int* lda, lapack_int* ipiv, lapack_complex_double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_dsgesv( lapack_int* n, lapack_int* nrhs, double* a, lapack_int* lda, - lapack_int* ipiv, double* b, lapack_int* ldb, double* x, - lapack_int* ldx, double* work, float* swork, - lapack_int* iter, lapack_int *info ); -void LAPACK_zcgesv( lapack_int* n, lapack_int* nrhs, lapack_complex_double* a, - lapack_int* lda, lapack_int* ipiv, lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx, - lapack_complex_double* work, lapack_complex_float* swork, - double* rwork, lapack_int* iter, lapack_int *info ); -void LAPACK_sgesvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs, - float* a, lapack_int* lda, float* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, float* r, float* c, float* b, - lapack_int* ldb, float* x, lapack_int* ldx, float* rcond, - float* ferr, float* berr, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dgesvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs, - double* a, lapack_int* lda, double* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, double* r, double* c, - double* b, lapack_int* ldb, double* x, lapack_int* ldx, - double* rcond, double* ferr, double* berr, double* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_cgesvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, float* r, float* c, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* ferr, float* berr, lapack_complex_float* work, - float* rwork, lapack_int *info ); -void LAPACK_zgesvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, double* r, double* c, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* ferr, double* berr, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_dgesvxx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs, - double* a, lapack_int* lda, double* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, double* r, double* c, - double* b, lapack_int* ldb, double* x, lapack_int* ldx, - double* rcond, double* rpvgrw, double* berr, - lapack_int* n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int* nparams, double* params, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_sgesvxx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs, - float* a, lapack_int* lda, float* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, float* r, float* c, - float* b, lapack_int* ldb, float* x, lapack_int* ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int* n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int* nparams, float* params, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_zgesvxx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, double* r, double* c, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* rpvgrw, double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_cgesvxx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, float* r, float* c, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* rpvgrw, float* berr, lapack_int* n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int* nparams, float* params, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_sgbsv( lapack_int* n, lapack_int* kl, lapack_int* ku, - lapack_int* nrhs, float* ab, lapack_int* ldab, - lapack_int* ipiv, float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dgbsv( lapack_int* n, lapack_int* kl, lapack_int* ku, - lapack_int* nrhs, double* ab, lapack_int* ldab, - lapack_int* ipiv, double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_cgbsv( lapack_int* n, lapack_int* kl, lapack_int* ku, - lapack_int* nrhs, lapack_complex_float* ab, lapack_int* ldab, - lapack_int* ipiv, lapack_complex_float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_zgbsv( lapack_int* n, lapack_int* kl, lapack_int* ku, - lapack_int* nrhs, lapack_complex_double* ab, - lapack_int* ldab, lapack_int* ipiv, lapack_complex_double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_sgbsvx( char* fact, char* trans, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_int* nrhs, float* ab, - lapack_int* ldab, float* afb, lapack_int* ldafb, - lapack_int* ipiv, char* equed, float* r, float* c, float* b, - lapack_int* ldb, float* x, lapack_int* ldx, float* rcond, - float* ferr, float* berr, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dgbsvx( char* fact, char* trans, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_int* nrhs, double* ab, - lapack_int* ldab, double* afb, lapack_int* ldafb, - lapack_int* ipiv, char* equed, double* r, double* c, - double* b, lapack_int* ldb, double* x, lapack_int* ldx, - double* rcond, double* ferr, double* berr, double* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_cgbsvx( char* fact, char* trans, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_int* nrhs, lapack_complex_float* ab, - lapack_int* ldab, lapack_complex_float* afb, - lapack_int* ldafb, lapack_int* ipiv, char* equed, float* r, - float* c, lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* ferr, float* berr, lapack_complex_float* work, - float* rwork, lapack_int *info ); -void LAPACK_zgbsvx( char* fact, char* trans, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_int* nrhs, lapack_complex_double* ab, - lapack_int* ldab, lapack_complex_double* afb, - lapack_int* ldafb, lapack_int* ipiv, char* equed, double* r, - double* c, lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* ferr, double* berr, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_dgbsvxx( char* fact, char* trans, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_int* nrhs, double* ab, - lapack_int* ldab, double* afb, lapack_int* ldafb, - lapack_int* ipiv, char* equed, double* r, double* c, - double* b, lapack_int* ldb, double* x, lapack_int* ldx, - double* rcond, double* rpvgrw, double* berr, - lapack_int* n_err_bnds, double* err_bnds_norm, - double* err_bnds_comp, lapack_int* nparams, double* params, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_sgbsvxx( char* fact, char* trans, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_int* nrhs, float* ab, - lapack_int* ldab, float* afb, lapack_int* ldafb, - lapack_int* ipiv, char* equed, float* r, float* c, - float* b, lapack_int* ldb, float* x, lapack_int* ldx, - float* rcond, float* rpvgrw, float* berr, - lapack_int* n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int* nparams, float* params, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_zgbsvxx( char* fact, char* trans, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_int* nrhs, - lapack_complex_double* ab, lapack_int* ldab, - lapack_complex_double* afb, lapack_int* ldafb, - lapack_int* ipiv, char* equed, double* r, double* c, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* rpvgrw, double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_cgbsvxx( char* fact, char* trans, lapack_int* n, lapack_int* kl, - lapack_int* ku, lapack_int* nrhs, lapack_complex_float* ab, - lapack_int* ldab, lapack_complex_float* afb, - lapack_int* ldafb, lapack_int* ipiv, char* equed, float* r, - float* c, lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* rpvgrw, float* berr, lapack_int* n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int* nparams, float* params, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_sgtsv( lapack_int* n, lapack_int* nrhs, float* dl, float* d, - float* du, float* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_dgtsv( lapack_int* n, lapack_int* nrhs, double* dl, double* d, - double* du, double* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_cgtsv( lapack_int* n, lapack_int* nrhs, lapack_complex_float* dl, - lapack_complex_float* d, lapack_complex_float* du, - lapack_complex_float* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_zgtsv( lapack_int* n, lapack_int* nrhs, lapack_complex_double* dl, - lapack_complex_double* d, lapack_complex_double* du, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_sgtsvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs, - const float* dl, const float* d, const float* du, - float* dlf, float* df, float* duf, float* du2, - lapack_int* ipiv, const float* b, lapack_int* ldb, float* x, - lapack_int* ldx, float* rcond, float* ferr, float* berr, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_dgtsvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs, - const double* dl, const double* d, const double* du, - double* dlf, double* df, double* duf, double* du2, - lapack_int* ipiv, const double* b, lapack_int* ldb, - double* x, lapack_int* ldx, double* rcond, double* ferr, - double* berr, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_cgtsvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* dl, - const lapack_complex_float* d, - const lapack_complex_float* du, lapack_complex_float* dlf, - lapack_complex_float* df, lapack_complex_float* duf, - lapack_complex_float* du2, lapack_int* ipiv, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* ferr, float* berr, lapack_complex_float* work, - float* rwork, lapack_int *info ); -void LAPACK_zgtsvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* dl, - const lapack_complex_double* d, - const lapack_complex_double* du, lapack_complex_double* dlf, - lapack_complex_double* df, lapack_complex_double* duf, - lapack_complex_double* du2, lapack_int* ipiv, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* ferr, double* berr, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_sposv( char* uplo, lapack_int* n, lapack_int* nrhs, float* a, - lapack_int* lda, float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dposv( char* uplo, lapack_int* n, lapack_int* nrhs, double* a, - lapack_int* lda, double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_cposv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_zposv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dsposv( char* uplo, lapack_int* n, lapack_int* nrhs, double* a, - lapack_int* lda, double* b, lapack_int* ldb, double* x, - lapack_int* ldx, double* work, float* swork, - lapack_int* iter, lapack_int *info ); -void LAPACK_zcposv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, - lapack_complex_double* work, lapack_complex_float* swork, - double* rwork, lapack_int* iter, lapack_int *info ); -void LAPACK_sposvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - float* a, lapack_int* lda, float* af, lapack_int* ldaf, - char* equed, float* s, float* b, lapack_int* ldb, float* x, - lapack_int* ldx, float* rcond, float* ferr, float* berr, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_dposvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - double* a, lapack_int* lda, double* af, lapack_int* ldaf, - char* equed, double* s, double* b, lapack_int* ldb, - double* x, lapack_int* ldx, double* rcond, double* ferr, - double* berr, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_cposvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* af, lapack_int* ldaf, char* equed, - float* s, lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* ferr, float* berr, lapack_complex_float* work, - float* rwork, lapack_int *info ); -void LAPACK_zposvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* af, lapack_int* ldaf, char* equed, - double* s, lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* ferr, double* berr, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_dposvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - double* a, lapack_int* lda, double* af, lapack_int* ldaf, - char* equed, double* s, double* b, lapack_int* ldb, - double* x, lapack_int* ldx, double* rcond, double* rpvgrw, - double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, double* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_sposvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - float* a, lapack_int* lda, float* af, lapack_int* ldaf, - char* equed, float* s, float* b, lapack_int* ldb, float* x, - lapack_int* ldx, float* rcond, float* rpvgrw, float* berr, - lapack_int* n_err_bnds, float* err_bnds_norm, - float* err_bnds_comp, lapack_int* nparams, float* params, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_zposvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* af, lapack_int* ldaf, char* equed, - double* s, lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* rpvgrw, double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_cposvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* af, lapack_int* ldaf, char* equed, - float* s, lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* rpvgrw, float* berr, lapack_int* n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int* nparams, float* params, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_sppsv( char* uplo, lapack_int* n, lapack_int* nrhs, float* ap, - float* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_dppsv( char* uplo, lapack_int* n, lapack_int* nrhs, double* ap, - double* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_cppsv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* ap, lapack_complex_float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_zppsv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* ap, lapack_complex_double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_sppsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - float* ap, float* afp, char* equed, float* s, float* b, - lapack_int* ldb, float* x, lapack_int* ldx, float* rcond, - float* ferr, float* berr, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dppsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - double* ap, double* afp, char* equed, double* s, double* b, - lapack_int* ldb, double* x, lapack_int* ldx, double* rcond, - double* ferr, double* berr, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_cppsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* ap, lapack_complex_float* afp, - char* equed, float* s, lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx, - float* rcond, float* ferr, float* berr, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zppsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* ap, lapack_complex_double* afp, - char* equed, double* s, lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_spbsv( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs, - float* ab, lapack_int* ldab, float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dpbsv( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs, - double* ab, lapack_int* ldab, double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_cpbsv( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs, - lapack_complex_float* ab, lapack_int* ldab, - lapack_complex_float* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_zpbsv( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs, - lapack_complex_double* ab, lapack_int* ldab, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_spbsvx( char* fact, char* uplo, lapack_int* n, lapack_int* kd, - lapack_int* nrhs, float* ab, lapack_int* ldab, float* afb, - lapack_int* ldafb, char* equed, float* s, float* b, - lapack_int* ldb, float* x, lapack_int* ldx, float* rcond, - float* ferr, float* berr, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dpbsvx( char* fact, char* uplo, lapack_int* n, lapack_int* kd, - lapack_int* nrhs, double* ab, lapack_int* ldab, double* afb, - lapack_int* ldafb, char* equed, double* s, double* b, - lapack_int* ldb, double* x, lapack_int* ldx, double* rcond, - double* ferr, double* berr, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_cpbsvx( char* fact, char* uplo, lapack_int* n, lapack_int* kd, - lapack_int* nrhs, lapack_complex_float* ab, - lapack_int* ldab, lapack_complex_float* afb, - lapack_int* ldafb, char* equed, float* s, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* ferr, float* berr, lapack_complex_float* work, - float* rwork, lapack_int *info ); -void LAPACK_zpbsvx( char* fact, char* uplo, lapack_int* n, lapack_int* kd, - lapack_int* nrhs, lapack_complex_double* ab, - lapack_int* ldab, lapack_complex_double* afb, - lapack_int* ldafb, char* equed, double* s, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* ferr, double* berr, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_sptsv( lapack_int* n, lapack_int* nrhs, float* d, float* e, - float* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_dptsv( lapack_int* n, lapack_int* nrhs, double* d, double* e, - double* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_cptsv( lapack_int* n, lapack_int* nrhs, float* d, - lapack_complex_float* e, lapack_complex_float* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_zptsv( lapack_int* n, lapack_int* nrhs, double* d, - lapack_complex_double* e, lapack_complex_double* b, - lapack_int* ldb, lapack_int *info ); -void LAPACK_sptsvx( char* fact, lapack_int* n, lapack_int* nrhs, const float* d, - const float* e, float* df, float* ef, const float* b, - lapack_int* ldb, float* x, lapack_int* ldx, float* rcond, - float* ferr, float* berr, float* work, lapack_int *info ); -void LAPACK_dptsvx( char* fact, lapack_int* n, lapack_int* nrhs, - const double* d, const double* e, double* df, double* ef, - const double* b, lapack_int* ldb, double* x, - lapack_int* ldx, double* rcond, double* ferr, double* berr, - double* work, lapack_int *info ); -void LAPACK_cptsvx( char* fact, lapack_int* n, lapack_int* nrhs, const float* d, - const lapack_complex_float* e, float* df, - lapack_complex_float* ef, const lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx, - float* rcond, float* ferr, float* berr, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zptsvx( char* fact, lapack_int* n, lapack_int* nrhs, - const double* d, const lapack_complex_double* e, double* df, - lapack_complex_double* ef, const lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_ssysv( char* uplo, lapack_int* n, lapack_int* nrhs, float* a, - lapack_int* lda, lapack_int* ipiv, float* b, lapack_int* ldb, - float* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_dsysv( char* uplo, lapack_int* n, lapack_int* nrhs, double* a, - lapack_int* lda, lapack_int* ipiv, double* b, - lapack_int* ldb, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_csysv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, lapack_int* ipiv, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zsysv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, lapack_int* ipiv, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_ssysvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - const float* a, lapack_int* lda, float* af, - lapack_int* ldaf, lapack_int* ipiv, const float* b, - lapack_int* ldb, float* x, lapack_int* ldx, float* rcond, - float* ferr, float* berr, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_dsysvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - const double* a, lapack_int* lda, double* af, - lapack_int* ldaf, lapack_int* ipiv, const double* b, - lapack_int* ldb, double* x, lapack_int* ldx, double* rcond, - double* ferr, double* berr, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_csysvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* af, lapack_int* ldaf, - lapack_int* ipiv, const lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx, - float* rcond, float* ferr, float* berr, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int *info ); -void LAPACK_zsysvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* af, lapack_int* ldaf, - lapack_int* ipiv, const lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int *info ); -void LAPACK_dsysvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - double* a, lapack_int* lda, double* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, double* s, double* b, - lapack_int* ldb, double* x, lapack_int* ldx, double* rcond, - double* rpvgrw, double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, double* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_ssysvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - float* a, lapack_int* lda, float* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, float* s, float* b, - lapack_int* ldb, float* x, lapack_int* ldx, float* rcond, - float* rpvgrw, float* berr, lapack_int* n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int* nparams, float* params, float* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_zsysvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, double* s, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* rpvgrw, double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_csysvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, float* s, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* rpvgrw, float* berr, lapack_int* n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int* nparams, float* params, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_chesv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, lapack_int* ipiv, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zhesv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, lapack_int* ipiv, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_chesvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* af, lapack_int* ldaf, - lapack_int* ipiv, const lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx, - float* rcond, float* ferr, float* berr, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int *info ); -void LAPACK_zhesvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* af, lapack_int* ldaf, - lapack_int* ipiv, const lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int *info ); -void LAPACK_zhesvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, double* s, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* x, lapack_int* ldx, double* rcond, - double* rpvgrw, double* berr, lapack_int* n_err_bnds, - double* err_bnds_norm, double* err_bnds_comp, - lapack_int* nparams, double* params, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_chesvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* af, lapack_int* ldaf, - lapack_int* ipiv, char* equed, float* s, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* x, lapack_int* ldx, float* rcond, - float* rpvgrw, float* berr, lapack_int* n_err_bnds, - float* err_bnds_norm, float* err_bnds_comp, - lapack_int* nparams, float* params, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_sspsv( char* uplo, lapack_int* n, lapack_int* nrhs, float* ap, - lapack_int* ipiv, float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dspsv( char* uplo, lapack_int* n, lapack_int* nrhs, double* ap, - lapack_int* ipiv, double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_cspsv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* ap, lapack_int* ipiv, - lapack_complex_float* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_zspsv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* ap, lapack_int* ipiv, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_sspsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - const float* ap, float* afp, lapack_int* ipiv, - const float* b, lapack_int* ldb, float* x, lapack_int* ldx, - float* rcond, float* ferr, float* berr, float* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_dspsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - const double* ap, double* afp, lapack_int* ipiv, - const double* b, lapack_int* ldb, double* x, - lapack_int* ldx, double* rcond, double* ferr, double* berr, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_cspsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* ap, lapack_complex_float* afp, - lapack_int* ipiv, const lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx, - float* rcond, float* ferr, float* berr, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zspsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* ap, lapack_complex_double* afp, - lapack_int* ipiv, const lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_chpsv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* ap, lapack_int* ipiv, - lapack_complex_float* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_zhpsv( char* uplo, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* ap, lapack_int* ipiv, - lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_chpsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_float* ap, lapack_complex_float* afp, - lapack_int* ipiv, const lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx, - float* rcond, float* ferr, float* berr, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zhpsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs, - const lapack_complex_double* ap, lapack_complex_double* afp, - lapack_int* ipiv, const lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx, - double* rcond, double* ferr, double* berr, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_sgeqrf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - float* tau, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dgeqrf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - double* tau, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cgeqrf( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* tau, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zgeqrf( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sgeqpf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - lapack_int* jpvt, float* tau, float* work, - lapack_int *info ); -void LAPACK_dgeqpf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - lapack_int* jpvt, double* tau, double* work, - lapack_int *info ); -void LAPACK_cgeqpf( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_int* jpvt, - lapack_complex_float* tau, lapack_complex_float* work, - float* rwork, lapack_int *info ); -void LAPACK_zgeqpf( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_int* jpvt, - lapack_complex_double* tau, lapack_complex_double* work, - double* rwork, lapack_int *info ); -void LAPACK_sgeqp3( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - lapack_int* jpvt, float* tau, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dgeqp3( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - lapack_int* jpvt, double* tau, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cgeqp3( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_int* jpvt, - lapack_complex_float* tau, lapack_complex_float* work, - lapack_int* lwork, float* rwork, lapack_int *info ); -void LAPACK_zgeqp3( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_int* jpvt, - lapack_complex_double* tau, lapack_complex_double* work, - lapack_int* lwork, double* rwork, lapack_int *info ); -void LAPACK_sorgqr( lapack_int* m, lapack_int* n, lapack_int* k, float* a, - lapack_int* lda, const float* tau, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dorgqr( lapack_int* m, lapack_int* n, lapack_int* k, double* a, - lapack_int* lda, const double* tau, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_sormqr( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const float* a, lapack_int* lda, - const float* tau, float* c, lapack_int* ldc, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dormqr( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const double* a, lapack_int* lda, - const double* tau, double* c, lapack_int* ldc, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cungqr( lapack_int* m, lapack_int* n, lapack_int* k, - lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* tau, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zungqr( lapack_int* m, lapack_int* n, lapack_int* k, - lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cunmqr( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const lapack_complex_float* a, - lapack_int* lda, const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int* ldc, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zunmqr( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const lapack_complex_double* a, - lapack_int* lda, const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int* ldc, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sgelqf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - float* tau, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dgelqf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - double* tau, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cgelqf( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* tau, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zgelqf( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sorglq( lapack_int* m, lapack_int* n, lapack_int* k, float* a, - lapack_int* lda, const float* tau, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dorglq( lapack_int* m, lapack_int* n, lapack_int* k, double* a, - lapack_int* lda, const double* tau, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_sormlq( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const float* a, lapack_int* lda, - const float* tau, float* c, lapack_int* ldc, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dormlq( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const double* a, lapack_int* lda, - const double* tau, double* c, lapack_int* ldc, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cunglq( lapack_int* m, lapack_int* n, lapack_int* k, - lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* tau, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zunglq( lapack_int* m, lapack_int* n, lapack_int* k, - lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cunmlq( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const lapack_complex_float* a, - lapack_int* lda, const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int* ldc, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zunmlq( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const lapack_complex_double* a, - lapack_int* lda, const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int* ldc, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sgeqlf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - float* tau, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dgeqlf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - double* tau, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cgeqlf( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* tau, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zgeqlf( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sorgql( lapack_int* m, lapack_int* n, lapack_int* k, float* a, - lapack_int* lda, const float* tau, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dorgql( lapack_int* m, lapack_int* n, lapack_int* k, double* a, - lapack_int* lda, const double* tau, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cungql( lapack_int* m, lapack_int* n, lapack_int* k, - lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* tau, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zungql( lapack_int* m, lapack_int* n, lapack_int* k, - lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sormql( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const float* a, lapack_int* lda, - const float* tau, float* c, lapack_int* ldc, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dormql( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const double* a, lapack_int* lda, - const double* tau, double* c, lapack_int* ldc, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cunmql( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const lapack_complex_float* a, - lapack_int* lda, const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int* ldc, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zunmql( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const lapack_complex_double* a, - lapack_int* lda, const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int* ldc, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sgerqf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - float* tau, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dgerqf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - double* tau, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cgerqf( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* tau, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zgerqf( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sorgrq( lapack_int* m, lapack_int* n, lapack_int* k, float* a, - lapack_int* lda, const float* tau, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dorgrq( lapack_int* m, lapack_int* n, lapack_int* k, double* a, - lapack_int* lda, const double* tau, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cungrq( lapack_int* m, lapack_int* n, lapack_int* k, - lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* tau, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zungrq( lapack_int* m, lapack_int* n, lapack_int* k, - lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sormrq( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const float* a, lapack_int* lda, - const float* tau, float* c, lapack_int* ldc, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dormrq( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const double* a, lapack_int* lda, - const double* tau, double* c, lapack_int* ldc, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cunmrq( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const lapack_complex_float* a, - lapack_int* lda, const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int* ldc, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zunmrq( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, const lapack_complex_double* a, - lapack_int* lda, const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int* ldc, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_stzrzf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - float* tau, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dtzrzf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - double* tau, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_ctzrzf( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* tau, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_ztzrzf( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sormrz( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, lapack_int* l, const float* a, - lapack_int* lda, const float* tau, float* c, - lapack_int* ldc, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dormrz( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, lapack_int* l, const double* a, - lapack_int* lda, const double* tau, double* c, - lapack_int* ldc, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cunmrz( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, lapack_int* l, const lapack_complex_float* a, - lapack_int* lda, const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int* ldc, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zunmrz( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, lapack_int* l, - const lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* tau, lapack_complex_double* c, - lapack_int* ldc, lapack_complex_double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_sggqrf( lapack_int* n, lapack_int* m, lapack_int* p, float* a, - lapack_int* lda, float* taua, float* b, lapack_int* ldb, - float* taub, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dggqrf( lapack_int* n, lapack_int* m, lapack_int* p, double* a, - lapack_int* lda, double* taua, double* b, lapack_int* ldb, - double* taub, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cggqrf( lapack_int* n, lapack_int* m, lapack_int* p, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* taua, lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* taub, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zggqrf( lapack_int* n, lapack_int* m, lapack_int* p, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* taua, lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* taub, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sggrqf( lapack_int* m, lapack_int* p, lapack_int* n, float* a, - lapack_int* lda, float* taua, float* b, lapack_int* ldb, - float* taub, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dggrqf( lapack_int* m, lapack_int* p, lapack_int* n, double* a, - lapack_int* lda, double* taua, double* b, lapack_int* ldb, - double* taub, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cggrqf( lapack_int* m, lapack_int* p, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* taua, lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* taub, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zggrqf( lapack_int* m, lapack_int* p, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* taua, lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* taub, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sgebrd( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - float* d, float* e, float* tauq, float* taup, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dgebrd( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - double* d, double* e, double* tauq, double* taup, - double* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_cgebrd( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, float* d, float* e, - lapack_complex_float* tauq, lapack_complex_float* taup, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zgebrd( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, double* d, double* e, - lapack_complex_double* tauq, lapack_complex_double* taup, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sgbbrd( char* vect, lapack_int* m, lapack_int* n, lapack_int* ncc, - lapack_int* kl, lapack_int* ku, float* ab, lapack_int* ldab, - float* d, float* e, float* q, lapack_int* ldq, float* pt, - lapack_int* ldpt, float* c, lapack_int* ldc, float* work, - lapack_int *info ); -void LAPACK_dgbbrd( char* vect, lapack_int* m, lapack_int* n, lapack_int* ncc, - lapack_int* kl, lapack_int* ku, double* ab, - lapack_int* ldab, double* d, double* e, double* q, - lapack_int* ldq, double* pt, lapack_int* ldpt, double* c, - lapack_int* ldc, double* work, lapack_int *info ); -void LAPACK_cgbbrd( char* vect, lapack_int* m, lapack_int* n, lapack_int* ncc, - lapack_int* kl, lapack_int* ku, lapack_complex_float* ab, - lapack_int* ldab, float* d, float* e, - lapack_complex_float* q, lapack_int* ldq, - lapack_complex_float* pt, lapack_int* ldpt, - lapack_complex_float* c, lapack_int* ldc, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zgbbrd( char* vect, lapack_int* m, lapack_int* n, lapack_int* ncc, - lapack_int* kl, lapack_int* ku, lapack_complex_double* ab, - lapack_int* ldab, double* d, double* e, - lapack_complex_double* q, lapack_int* ldq, - lapack_complex_double* pt, lapack_int* ldpt, - lapack_complex_double* c, lapack_int* ldc, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_sorgbr( char* vect, lapack_int* m, lapack_int* n, lapack_int* k, - float* a, lapack_int* lda, const float* tau, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dorgbr( char* vect, lapack_int* m, lapack_int* n, lapack_int* k, - double* a, lapack_int* lda, const double* tau, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_sormbr( char* vect, char* side, char* trans, lapack_int* m, - lapack_int* n, lapack_int* k, const float* a, - lapack_int* lda, const float* tau, float* c, - lapack_int* ldc, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dormbr( char* vect, char* side, char* trans, lapack_int* m, - lapack_int* n, lapack_int* k, const double* a, - lapack_int* lda, const double* tau, double* c, - lapack_int* ldc, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cungbr( char* vect, lapack_int* m, lapack_int* n, lapack_int* k, - lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* tau, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zungbr( char* vect, lapack_int* m, lapack_int* n, lapack_int* k, - lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cunmbr( char* vect, char* side, char* trans, lapack_int* m, - lapack_int* n, lapack_int* k, const lapack_complex_float* a, - lapack_int* lda, const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int* ldc, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zunmbr( char* vect, char* side, char* trans, lapack_int* m, - lapack_int* n, lapack_int* k, - const lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* tau, lapack_complex_double* c, - lapack_int* ldc, lapack_complex_double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_sbdsqr( char* uplo, lapack_int* n, lapack_int* ncvt, - lapack_int* nru, lapack_int* ncc, float* d, float* e, - float* vt, lapack_int* ldvt, float* u, lapack_int* ldu, - float* c, lapack_int* ldc, float* work, lapack_int *info ); -void LAPACK_dbdsqr( char* uplo, lapack_int* n, lapack_int* ncvt, - lapack_int* nru, lapack_int* ncc, double* d, double* e, - double* vt, lapack_int* ldvt, double* u, lapack_int* ldu, - double* c, lapack_int* ldc, double* work, - lapack_int *info ); -void LAPACK_cbdsqr( char* uplo, lapack_int* n, lapack_int* ncvt, - lapack_int* nru, lapack_int* ncc, float* d, float* e, - lapack_complex_float* vt, lapack_int* ldvt, - lapack_complex_float* u, lapack_int* ldu, - lapack_complex_float* c, lapack_int* ldc, float* work, - lapack_int *info ); -void LAPACK_zbdsqr( char* uplo, lapack_int* n, lapack_int* ncvt, - lapack_int* nru, lapack_int* ncc, double* d, double* e, - lapack_complex_double* vt, lapack_int* ldvt, - lapack_complex_double* u, lapack_int* ldu, - lapack_complex_double* c, lapack_int* ldc, double* work, - lapack_int *info ); -void LAPACK_sbdsdc( char* uplo, char* compq, lapack_int* n, float* d, float* e, - float* u, lapack_int* ldu, float* vt, lapack_int* ldvt, - float* q, lapack_int* iq, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dbdsdc( char* uplo, char* compq, lapack_int* n, double* d, - double* e, double* u, lapack_int* ldu, double* vt, - lapack_int* ldvt, double* q, lapack_int* iq, double* work, - lapack_int* iwork, lapack_int *info ); -void LAPACK_ssytrd( char* uplo, lapack_int* n, float* a, lapack_int* lda, - float* d, float* e, float* tau, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dsytrd( char* uplo, lapack_int* n, double* a, lapack_int* lda, - double* d, double* e, double* tau, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_sorgtr( char* uplo, lapack_int* n, float* a, lapack_int* lda, - const float* tau, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dorgtr( char* uplo, lapack_int* n, double* a, lapack_int* lda, - const double* tau, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sormtr( char* side, char* uplo, char* trans, lapack_int* m, - lapack_int* n, const float* a, lapack_int* lda, - const float* tau, float* c, lapack_int* ldc, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dormtr( char* side, char* uplo, char* trans, lapack_int* m, - lapack_int* n, const double* a, lapack_int* lda, - const double* tau, double* c, lapack_int* ldc, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_chetrd( char* uplo, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, float* d, float* e, - lapack_complex_float* tau, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zhetrd( char* uplo, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, double* d, double* e, - lapack_complex_double* tau, lapack_complex_double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cungtr( char* uplo, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, const lapack_complex_float* tau, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zungtr( char* uplo, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cunmtr( char* side, char* uplo, char* trans, lapack_int* m, - lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, const lapack_complex_float* tau, - lapack_complex_float* c, lapack_int* ldc, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zunmtr( char* side, char* uplo, char* trans, lapack_int* m, - lapack_int* n, const lapack_complex_double* a, - lapack_int* lda, const lapack_complex_double* tau, - lapack_complex_double* c, lapack_int* ldc, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_ssptrd( char* uplo, lapack_int* n, float* ap, float* d, float* e, - float* tau, lapack_int *info ); -void LAPACK_dsptrd( char* uplo, lapack_int* n, double* ap, double* d, double* e, - double* tau, lapack_int *info ); -void LAPACK_sopgtr( char* uplo, lapack_int* n, const float* ap, - const float* tau, float* q, lapack_int* ldq, float* work, - lapack_int *info ); -void LAPACK_dopgtr( char* uplo, lapack_int* n, const double* ap, - const double* tau, double* q, lapack_int* ldq, double* work, - lapack_int *info ); -void LAPACK_sopmtr( char* side, char* uplo, char* trans, lapack_int* m, - lapack_int* n, const float* ap, const float* tau, float* c, - lapack_int* ldc, float* work, lapack_int *info ); -void LAPACK_dopmtr( char* side, char* uplo, char* trans, lapack_int* m, - lapack_int* n, const double* ap, const double* tau, - double* c, lapack_int* ldc, double* work, - lapack_int *info ); -void LAPACK_chptrd( char* uplo, lapack_int* n, lapack_complex_float* ap, - float* d, float* e, lapack_complex_float* tau, - lapack_int *info ); -void LAPACK_zhptrd( char* uplo, lapack_int* n, lapack_complex_double* ap, - double* d, double* e, lapack_complex_double* tau, - lapack_int *info ); -void LAPACK_cupgtr( char* uplo, lapack_int* n, const lapack_complex_float* ap, - const lapack_complex_float* tau, lapack_complex_float* q, - lapack_int* ldq, lapack_complex_float* work, - lapack_int *info ); -void LAPACK_zupgtr( char* uplo, lapack_int* n, const lapack_complex_double* ap, - const lapack_complex_double* tau, lapack_complex_double* q, - lapack_int* ldq, lapack_complex_double* work, - lapack_int *info ); -void LAPACK_cupmtr( char* side, char* uplo, char* trans, lapack_int* m, - lapack_int* n, const lapack_complex_float* ap, - const lapack_complex_float* tau, lapack_complex_float* c, - lapack_int* ldc, lapack_complex_float* work, - lapack_int *info ); -void LAPACK_zupmtr( char* side, char* uplo, char* trans, lapack_int* m, - lapack_int* n, const lapack_complex_double* ap, - const lapack_complex_double* tau, lapack_complex_double* c, - lapack_int* ldc, lapack_complex_double* work, - lapack_int *info ); -void LAPACK_ssbtrd( char* vect, char* uplo, lapack_int* n, lapack_int* kd, - float* ab, lapack_int* ldab, float* d, float* e, float* q, - lapack_int* ldq, float* work, lapack_int *info ); -void LAPACK_dsbtrd( char* vect, char* uplo, lapack_int* n, lapack_int* kd, - double* ab, lapack_int* ldab, double* d, double* e, - double* q, lapack_int* ldq, double* work, - lapack_int *info ); -void LAPACK_chbtrd( char* vect, char* uplo, lapack_int* n, lapack_int* kd, - lapack_complex_float* ab, lapack_int* ldab, float* d, - float* e, lapack_complex_float* q, lapack_int* ldq, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zhbtrd( char* vect, char* uplo, lapack_int* n, lapack_int* kd, - lapack_complex_double* ab, lapack_int* ldab, double* d, - double* e, lapack_complex_double* q, lapack_int* ldq, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_ssterf( lapack_int* n, float* d, float* e, lapack_int *info ); -void LAPACK_dsterf( lapack_int* n, double* d, double* e, lapack_int *info ); -void LAPACK_ssteqr( char* compz, lapack_int* n, float* d, float* e, float* z, - lapack_int* ldz, float* work, lapack_int *info ); -void LAPACK_dsteqr( char* compz, lapack_int* n, double* d, double* e, double* z, - lapack_int* ldz, double* work, lapack_int *info ); -void LAPACK_csteqr( char* compz, lapack_int* n, float* d, float* e, - lapack_complex_float* z, lapack_int* ldz, float* work, - lapack_int *info ); -void LAPACK_zsteqr( char* compz, lapack_int* n, double* d, double* e, - lapack_complex_double* z, lapack_int* ldz, double* work, - lapack_int *info ); -void LAPACK_sstemr( char* jobz, char* range, lapack_int* n, float* d, float* e, - float* vl, float* vu, lapack_int* il, lapack_int* iu, - lapack_int* m, float* w, float* z, lapack_int* ldz, - lapack_int* nzc, lapack_int* isuppz, lapack_logical* tryrac, - float* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_dstemr( char* jobz, char* range, lapack_int* n, double* d, - double* e, double* vl, double* vu, lapack_int* il, - lapack_int* iu, lapack_int* m, double* w, double* z, - lapack_int* ldz, lapack_int* nzc, lapack_int* isuppz, - lapack_logical* tryrac, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_cstemr( char* jobz, char* range, lapack_int* n, float* d, float* e, - float* vl, float* vu, lapack_int* il, lapack_int* iu, - lapack_int* m, float* w, lapack_complex_float* z, - lapack_int* ldz, lapack_int* nzc, lapack_int* isuppz, - lapack_logical* tryrac, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_zstemr( char* jobz, char* range, lapack_int* n, double* d, - double* e, double* vl, double* vu, lapack_int* il, - lapack_int* iu, lapack_int* m, double* w, - lapack_complex_double* z, lapack_int* ldz, lapack_int* nzc, - lapack_int* isuppz, lapack_logical* tryrac, double* work, - lapack_int* lwork, lapack_int* iwork, lapack_int* liwork, - lapack_int *info ); -void LAPACK_sstedc( char* compz, lapack_int* n, float* d, float* e, float* z, - lapack_int* ldz, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_dstedc( char* compz, lapack_int* n, double* d, double* e, double* z, - lapack_int* ldz, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_cstedc( char* compz, lapack_int* n, float* d, float* e, - lapack_complex_float* z, lapack_int* ldz, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork, - lapack_int *info ); -void LAPACK_zstedc( char* compz, lapack_int* n, double* d, double* e, - lapack_complex_double* z, lapack_int* ldz, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int* lrwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_sstegr( char* jobz, char* range, lapack_int* n, float* d, float* e, - float* vl, float* vu, lapack_int* il, lapack_int* iu, - float* abstol, lapack_int* m, float* w, float* z, - lapack_int* ldz, lapack_int* isuppz, float* work, - lapack_int* lwork, lapack_int* iwork, lapack_int* liwork, - lapack_int *info ); -void LAPACK_dstegr( char* jobz, char* range, lapack_int* n, double* d, - double* e, double* vl, double* vu, lapack_int* il, - lapack_int* iu, double* abstol, lapack_int* m, double* w, - double* z, lapack_int* ldz, lapack_int* isuppz, - double* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_cstegr( char* jobz, char* range, lapack_int* n, float* d, float* e, - float* vl, float* vu, lapack_int* il, lapack_int* iu, - float* abstol, lapack_int* m, float* w, - lapack_complex_float* z, lapack_int* ldz, - lapack_int* isuppz, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_zstegr( char* jobz, char* range, lapack_int* n, double* d, - double* e, double* vl, double* vu, lapack_int* il, - lapack_int* iu, double* abstol, lapack_int* m, double* w, - lapack_complex_double* z, lapack_int* ldz, - lapack_int* isuppz, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_spteqr( char* compz, lapack_int* n, float* d, float* e, float* z, - lapack_int* ldz, float* work, lapack_int *info ); -void LAPACK_dpteqr( char* compz, lapack_int* n, double* d, double* e, double* z, - lapack_int* ldz, double* work, lapack_int *info ); -void LAPACK_cpteqr( char* compz, lapack_int* n, float* d, float* e, - lapack_complex_float* z, lapack_int* ldz, float* work, - lapack_int *info ); -void LAPACK_zpteqr( char* compz, lapack_int* n, double* d, double* e, - lapack_complex_double* z, lapack_int* ldz, double* work, - lapack_int *info ); -void LAPACK_sstebz( char* range, char* order, lapack_int* n, float* vl, - float* vu, lapack_int* il, lapack_int* iu, float* abstol, - const float* d, const float* e, lapack_int* m, - lapack_int* nsplit, float* w, lapack_int* iblock, - lapack_int* isplit, float* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dstebz( char* range, char* order, lapack_int* n, double* vl, - double* vu, lapack_int* il, lapack_int* iu, double* abstol, - const double* d, const double* e, lapack_int* m, - lapack_int* nsplit, double* w, lapack_int* iblock, - lapack_int* isplit, double* work, lapack_int* iwork, - lapack_int *info ); -void LAPACK_sstein( lapack_int* n, const float* d, const float* e, - lapack_int* m, const float* w, const lapack_int* iblock, - const lapack_int* isplit, float* z, lapack_int* ldz, - float* work, lapack_int* iwork, lapack_int* ifailv, - lapack_int *info ); -void LAPACK_dstein( lapack_int* n, const double* d, const double* e, - lapack_int* m, const double* w, const lapack_int* iblock, - const lapack_int* isplit, double* z, lapack_int* ldz, - double* work, lapack_int* iwork, lapack_int* ifailv, - lapack_int *info ); -void LAPACK_cstein( lapack_int* n, const float* d, const float* e, - lapack_int* m, const float* w, const lapack_int* iblock, - const lapack_int* isplit, lapack_complex_float* z, - lapack_int* ldz, float* work, lapack_int* iwork, - lapack_int* ifailv, lapack_int *info ); -void LAPACK_zstein( lapack_int* n, const double* d, const double* e, - lapack_int* m, const double* w, const lapack_int* iblock, - const lapack_int* isplit, lapack_complex_double* z, - lapack_int* ldz, double* work, lapack_int* iwork, - lapack_int* ifailv, lapack_int *info ); -void LAPACK_sdisna( char* job, lapack_int* m, lapack_int* n, const float* d, - float* sep, lapack_int *info ); -void LAPACK_ddisna( char* job, lapack_int* m, lapack_int* n, const double* d, - double* sep, lapack_int *info ); -void LAPACK_ssygst( lapack_int* itype, char* uplo, lapack_int* n, float* a, - lapack_int* lda, const float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_dsygst( lapack_int* itype, char* uplo, lapack_int* n, double* a, - lapack_int* lda, const double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_chegst( lapack_int* itype, char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_zhegst( lapack_int* itype, char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* b, lapack_int* ldb, - lapack_int *info ); -void LAPACK_sspgst( lapack_int* itype, char* uplo, lapack_int* n, float* ap, - const float* bp, lapack_int *info ); -void LAPACK_dspgst( lapack_int* itype, char* uplo, lapack_int* n, double* ap, - const double* bp, lapack_int *info ); -void LAPACK_chpgst( lapack_int* itype, char* uplo, lapack_int* n, - lapack_complex_float* ap, const lapack_complex_float* bp, - lapack_int *info ); -void LAPACK_zhpgst( lapack_int* itype, char* uplo, lapack_int* n, - lapack_complex_double* ap, const lapack_complex_double* bp, - lapack_int *info ); -void LAPACK_ssbgst( char* vect, char* uplo, lapack_int* n, lapack_int* ka, - lapack_int* kb, float* ab, lapack_int* ldab, - const float* bb, lapack_int* ldbb, float* x, - lapack_int* ldx, float* work, lapack_int *info ); -void LAPACK_dsbgst( char* vect, char* uplo, lapack_int* n, lapack_int* ka, - lapack_int* kb, double* ab, lapack_int* ldab, - const double* bb, lapack_int* ldbb, double* x, - lapack_int* ldx, double* work, lapack_int *info ); -void LAPACK_chbgst( char* vect, char* uplo, lapack_int* n, lapack_int* ka, - lapack_int* kb, lapack_complex_float* ab, lapack_int* ldab, - const lapack_complex_float* bb, lapack_int* ldbb, - lapack_complex_float* x, lapack_int* ldx, - lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zhbgst( char* vect, char* uplo, lapack_int* n, lapack_int* ka, - lapack_int* kb, lapack_complex_double* ab, lapack_int* ldab, - const lapack_complex_double* bb, lapack_int* ldbb, - lapack_complex_double* x, lapack_int* ldx, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_spbstf( char* uplo, lapack_int* n, lapack_int* kb, float* bb, - lapack_int* ldbb, lapack_int *info ); -void LAPACK_dpbstf( char* uplo, lapack_int* n, lapack_int* kb, double* bb, - lapack_int* ldbb, lapack_int *info ); -void LAPACK_cpbstf( char* uplo, lapack_int* n, lapack_int* kb, - lapack_complex_float* bb, lapack_int* ldbb, - lapack_int *info ); -void LAPACK_zpbstf( char* uplo, lapack_int* n, lapack_int* kb, - lapack_complex_double* bb, lapack_int* ldbb, - lapack_int *info ); -void LAPACK_sgehrd( lapack_int* n, lapack_int* ilo, lapack_int* ihi, float* a, - lapack_int* lda, float* tau, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dgehrd( lapack_int* n, lapack_int* ilo, lapack_int* ihi, double* a, - lapack_int* lda, double* tau, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cgehrd( lapack_int* n, lapack_int* ilo, lapack_int* ihi, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* tau, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zgehrd( lapack_int* n, lapack_int* ilo, lapack_int* ihi, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* tau, lapack_complex_double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_sorghr( lapack_int* n, lapack_int* ilo, lapack_int* ihi, float* a, - lapack_int* lda, const float* tau, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dorghr( lapack_int* n, lapack_int* ilo, lapack_int* ihi, double* a, - lapack_int* lda, const double* tau, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_sormhr( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* ilo, lapack_int* ihi, const float* a, - lapack_int* lda, const float* tau, float* c, - lapack_int* ldc, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dormhr( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* ilo, lapack_int* ihi, const double* a, - lapack_int* lda, const double* tau, double* c, - lapack_int* ldc, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cunghr( lapack_int* n, lapack_int* ilo, lapack_int* ihi, - lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* tau, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zunghr( lapack_int* n, lapack_int* ilo, lapack_int* ihi, - lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cunmhr( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* ilo, lapack_int* ihi, - const lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* tau, lapack_complex_float* c, - lapack_int* ldc, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zunmhr( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* ilo, lapack_int* ihi, - const lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* tau, lapack_complex_double* c, - lapack_int* ldc, lapack_complex_double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_sgebal( char* job, lapack_int* n, float* a, lapack_int* lda, - lapack_int* ilo, lapack_int* ihi, float* scale, - lapack_int *info ); -void LAPACK_dgebal( char* job, lapack_int* n, double* a, lapack_int* lda, - lapack_int* ilo, lapack_int* ihi, double* scale, - lapack_int *info ); -void LAPACK_cgebal( char* job, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_int* ilo, lapack_int* ihi, - float* scale, lapack_int *info ); -void LAPACK_zgebal( char* job, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_int* ilo, lapack_int* ihi, - double* scale, lapack_int *info ); -void LAPACK_sgebak( char* job, char* side, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, const float* scale, lapack_int* m, - float* v, lapack_int* ldv, lapack_int *info ); -void LAPACK_dgebak( char* job, char* side, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, const double* scale, lapack_int* m, - double* v, lapack_int* ldv, lapack_int *info ); -void LAPACK_cgebak( char* job, char* side, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, const float* scale, lapack_int* m, - lapack_complex_float* v, lapack_int* ldv, - lapack_int *info ); -void LAPACK_zgebak( char* job, char* side, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, const double* scale, lapack_int* m, - lapack_complex_double* v, lapack_int* ldv, - lapack_int *info ); -void LAPACK_shseqr( char* job, char* compz, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, float* h, lapack_int* ldh, float* wr, - float* wi, float* z, lapack_int* ldz, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dhseqr( char* job, char* compz, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, double* h, lapack_int* ldh, double* wr, - double* wi, double* z, lapack_int* ldz, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_chseqr( char* job, char* compz, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, lapack_complex_float* h, lapack_int* ldh, - lapack_complex_float* w, lapack_complex_float* z, - lapack_int* ldz, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zhseqr( char* job, char* compz, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, lapack_complex_double* h, lapack_int* ldh, - lapack_complex_double* w, lapack_complex_double* z, - lapack_int* ldz, lapack_complex_double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_shsein( char* job, char* eigsrc, char* initv, - lapack_logical* select, lapack_int* n, const float* h, - lapack_int* ldh, float* wr, const float* wi, float* vl, - lapack_int* ldvl, float* vr, lapack_int* ldvr, - lapack_int* mm, lapack_int* m, float* work, - lapack_int* ifaill, lapack_int* ifailr, lapack_int *info ); -void LAPACK_dhsein( char* job, char* eigsrc, char* initv, - lapack_logical* select, lapack_int* n, const double* h, - lapack_int* ldh, double* wr, const double* wi, double* vl, - lapack_int* ldvl, double* vr, lapack_int* ldvr, - lapack_int* mm, lapack_int* m, double* work, - lapack_int* ifaill, lapack_int* ifailr, lapack_int *info ); -void LAPACK_chsein( char* job, char* eigsrc, char* initv, - const lapack_logical* select, lapack_int* n, - const lapack_complex_float* h, lapack_int* ldh, - lapack_complex_float* w, lapack_complex_float* vl, - lapack_int* ldvl, lapack_complex_float* vr, - lapack_int* ldvr, lapack_int* mm, lapack_int* m, - lapack_complex_float* work, float* rwork, - lapack_int* ifaill, lapack_int* ifailr, lapack_int *info ); -void LAPACK_zhsein( char* job, char* eigsrc, char* initv, - const lapack_logical* select, lapack_int* n, - const lapack_complex_double* h, lapack_int* ldh, - lapack_complex_double* w, lapack_complex_double* vl, - lapack_int* ldvl, lapack_complex_double* vr, - lapack_int* ldvr, lapack_int* mm, lapack_int* m, - lapack_complex_double* work, double* rwork, - lapack_int* ifaill, lapack_int* ifailr, lapack_int *info ); -void LAPACK_strevc( char* side, char* howmny, lapack_logical* select, - lapack_int* n, const float* t, lapack_int* ldt, float* vl, - lapack_int* ldvl, float* vr, lapack_int* ldvr, - lapack_int* mm, lapack_int* m, float* work, - lapack_int *info ); -void LAPACK_dtrevc( char* side, char* howmny, lapack_logical* select, - lapack_int* n, const double* t, lapack_int* ldt, double* vl, - lapack_int* ldvl, double* vr, lapack_int* ldvr, - lapack_int* mm, lapack_int* m, double* work, - lapack_int *info ); -void LAPACK_ctrevc( char* side, char* howmny, const lapack_logical* select, - lapack_int* n, lapack_complex_float* t, lapack_int* ldt, - lapack_complex_float* vl, lapack_int* ldvl, - lapack_complex_float* vr, lapack_int* ldvr, lapack_int* mm, - lapack_int* m, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_ztrevc( char* side, char* howmny, const lapack_logical* select, - lapack_int* n, lapack_complex_double* t, lapack_int* ldt, - lapack_complex_double* vl, lapack_int* ldvl, - lapack_complex_double* vr, lapack_int* ldvr, lapack_int* mm, - lapack_int* m, lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_strsna( char* job, char* howmny, const lapack_logical* select, - lapack_int* n, const float* t, lapack_int* ldt, - const float* vl, lapack_int* ldvl, const float* vr, - lapack_int* ldvr, float* s, float* sep, lapack_int* mm, - lapack_int* m, float* work, lapack_int* ldwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_dtrsna( char* job, char* howmny, const lapack_logical* select, - lapack_int* n, const double* t, lapack_int* ldt, - const double* vl, lapack_int* ldvl, const double* vr, - lapack_int* ldvr, double* s, double* sep, lapack_int* mm, - lapack_int* m, double* work, lapack_int* ldwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_ctrsna( char* job, char* howmny, const lapack_logical* select, - lapack_int* n, const lapack_complex_float* t, - lapack_int* ldt, const lapack_complex_float* vl, - lapack_int* ldvl, const lapack_complex_float* vr, - lapack_int* ldvr, float* s, float* sep, lapack_int* mm, - lapack_int* m, lapack_complex_float* work, - lapack_int* ldwork, float* rwork, lapack_int *info ); -void LAPACK_ztrsna( char* job, char* howmny, const lapack_logical* select, - lapack_int* n, const lapack_complex_double* t, - lapack_int* ldt, const lapack_complex_double* vl, - lapack_int* ldvl, const lapack_complex_double* vr, - lapack_int* ldvr, double* s, double* sep, lapack_int* mm, - lapack_int* m, lapack_complex_double* work, - lapack_int* ldwork, double* rwork, lapack_int *info ); -void LAPACK_strexc( char* compq, lapack_int* n, float* t, lapack_int* ldt, - float* q, lapack_int* ldq, lapack_int* ifst, - lapack_int* ilst, float* work, lapack_int *info ); -void LAPACK_dtrexc( char* compq, lapack_int* n, double* t, lapack_int* ldt, - double* q, lapack_int* ldq, lapack_int* ifst, - lapack_int* ilst, double* work, lapack_int *info ); -void LAPACK_ctrexc( char* compq, lapack_int* n, lapack_complex_float* t, - lapack_int* ldt, lapack_complex_float* q, lapack_int* ldq, - lapack_int* ifst, lapack_int* ilst, lapack_int *info ); -void LAPACK_ztrexc( char* compq, lapack_int* n, lapack_complex_double* t, - lapack_int* ldt, lapack_complex_double* q, lapack_int* ldq, - lapack_int* ifst, lapack_int* ilst, lapack_int *info ); -void LAPACK_strsen( char* job, char* compq, const lapack_logical* select, - lapack_int* n, float* t, lapack_int* ldt, float* q, - lapack_int* ldq, float* wr, float* wi, lapack_int* m, - float* s, float* sep, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_dtrsen( char* job, char* compq, const lapack_logical* select, - lapack_int* n, double* t, lapack_int* ldt, double* q, - lapack_int* ldq, double* wr, double* wi, lapack_int* m, - double* s, double* sep, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_ctrsen( char* job, char* compq, const lapack_logical* select, - lapack_int* n, lapack_complex_float* t, lapack_int* ldt, - lapack_complex_float* q, lapack_int* ldq, - lapack_complex_float* w, lapack_int* m, float* s, - float* sep, lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_ztrsen( char* job, char* compq, const lapack_logical* select, - lapack_int* n, lapack_complex_double* t, lapack_int* ldt, - lapack_complex_double* q, lapack_int* ldq, - lapack_complex_double* w, lapack_int* m, double* s, - double* sep, lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_strsyl( char* trana, char* tranb, lapack_int* isgn, lapack_int* m, - lapack_int* n, const float* a, lapack_int* lda, - const float* b, lapack_int* ldb, float* c, lapack_int* ldc, - float* scale, lapack_int *info ); -void LAPACK_dtrsyl( char* trana, char* tranb, lapack_int* isgn, lapack_int* m, - lapack_int* n, const double* a, lapack_int* lda, - const double* b, lapack_int* ldb, double* c, - lapack_int* ldc, double* scale, lapack_int *info ); -void LAPACK_ctrsyl( char* trana, char* tranb, lapack_int* isgn, lapack_int* m, - lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, const lapack_complex_float* b, - lapack_int* ldb, lapack_complex_float* c, lapack_int* ldc, - float* scale, lapack_int *info ); -void LAPACK_ztrsyl( char* trana, char* tranb, lapack_int* isgn, lapack_int* m, - lapack_int* n, const lapack_complex_double* a, - lapack_int* lda, const lapack_complex_double* b, - lapack_int* ldb, lapack_complex_double* c, lapack_int* ldc, - double* scale, lapack_int *info ); -void LAPACK_sgghrd( char* compq, char* compz, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, float* a, lapack_int* lda, float* b, - lapack_int* ldb, float* q, lapack_int* ldq, float* z, - lapack_int* ldz, lapack_int *info ); -void LAPACK_dgghrd( char* compq, char* compz, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, double* a, lapack_int* lda, double* b, - lapack_int* ldb, double* q, lapack_int* ldq, double* z, - lapack_int* ldz, lapack_int *info ); -void LAPACK_cgghrd( char* compq, char* compz, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* q, lapack_int* ldq, - lapack_complex_float* z, lapack_int* ldz, - lapack_int *info ); -void LAPACK_zgghrd( char* compq, char* compz, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* q, lapack_int* ldq, - lapack_complex_double* z, lapack_int* ldz, - lapack_int *info ); -void LAPACK_sggbal( char* job, lapack_int* n, float* a, lapack_int* lda, - float* b, lapack_int* ldb, lapack_int* ilo, lapack_int* ihi, - float* lscale, float* rscale, float* work, - lapack_int *info ); -void LAPACK_dggbal( char* job, lapack_int* n, double* a, lapack_int* lda, - double* b, lapack_int* ldb, lapack_int* ilo, - lapack_int* ihi, double* lscale, double* rscale, - double* work, lapack_int *info ); -void LAPACK_cggbal( char* job, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* b, lapack_int* ldb, - lapack_int* ilo, lapack_int* ihi, float* lscale, - float* rscale, float* work, lapack_int *info ); -void LAPACK_zggbal( char* job, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* b, lapack_int* ldb, - lapack_int* ilo, lapack_int* ihi, double* lscale, - double* rscale, double* work, lapack_int *info ); -void LAPACK_sggbak( char* job, char* side, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, const float* lscale, const float* rscale, - lapack_int* m, float* v, lapack_int* ldv, - lapack_int *info ); -void LAPACK_dggbak( char* job, char* side, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, const double* lscale, const double* rscale, - lapack_int* m, double* v, lapack_int* ldv, - lapack_int *info ); -void LAPACK_cggbak( char* job, char* side, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, const float* lscale, const float* rscale, - lapack_int* m, lapack_complex_float* v, lapack_int* ldv, - lapack_int *info ); -void LAPACK_zggbak( char* job, char* side, lapack_int* n, lapack_int* ilo, - lapack_int* ihi, const double* lscale, const double* rscale, - lapack_int* m, lapack_complex_double* v, lapack_int* ldv, - lapack_int *info ); -void LAPACK_shgeqz( char* job, char* compq, char* compz, lapack_int* n, - lapack_int* ilo, lapack_int* ihi, float* h, lapack_int* ldh, - float* t, lapack_int* ldt, float* alphar, float* alphai, - float* beta, float* q, lapack_int* ldq, float* z, - lapack_int* ldz, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dhgeqz( char* job, char* compq, char* compz, lapack_int* n, - lapack_int* ilo, lapack_int* ihi, double* h, - lapack_int* ldh, double* t, lapack_int* ldt, double* alphar, - double* alphai, double* beta, double* q, lapack_int* ldq, - double* z, lapack_int* ldz, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_chgeqz( char* job, char* compq, char* compz, lapack_int* n, - lapack_int* ilo, lapack_int* ihi, lapack_complex_float* h, - lapack_int* ldh, lapack_complex_float* t, lapack_int* ldt, - lapack_complex_float* alpha, lapack_complex_float* beta, - lapack_complex_float* q, lapack_int* ldq, - lapack_complex_float* z, lapack_int* ldz, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int *info ); -void LAPACK_zhgeqz( char* job, char* compq, char* compz, lapack_int* n, - lapack_int* ilo, lapack_int* ihi, lapack_complex_double* h, - lapack_int* ldh, lapack_complex_double* t, lapack_int* ldt, - lapack_complex_double* alpha, lapack_complex_double* beta, - lapack_complex_double* q, lapack_int* ldq, - lapack_complex_double* z, lapack_int* ldz, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int *info ); -void LAPACK_stgevc( char* side, char* howmny, const lapack_logical* select, - lapack_int* n, const float* s, lapack_int* lds, - const float* p, lapack_int* ldp, float* vl, - lapack_int* ldvl, float* vr, lapack_int* ldvr, - lapack_int* mm, lapack_int* m, float* work, - lapack_int *info ); -void LAPACK_dtgevc( char* side, char* howmny, const lapack_logical* select, - lapack_int* n, const double* s, lapack_int* lds, - const double* p, lapack_int* ldp, double* vl, - lapack_int* ldvl, double* vr, lapack_int* ldvr, - lapack_int* mm, lapack_int* m, double* work, - lapack_int *info ); -void LAPACK_ctgevc( char* side, char* howmny, const lapack_logical* select, - lapack_int* n, const lapack_complex_float* s, - lapack_int* lds, const lapack_complex_float* p, - lapack_int* ldp, lapack_complex_float* vl, lapack_int* ldvl, - lapack_complex_float* vr, lapack_int* ldvr, lapack_int* mm, - lapack_int* m, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_ztgevc( char* side, char* howmny, const lapack_logical* select, - lapack_int* n, const lapack_complex_double* s, - lapack_int* lds, const lapack_complex_double* p, - lapack_int* ldp, lapack_complex_double* vl, - lapack_int* ldvl, lapack_complex_double* vr, - lapack_int* ldvr, lapack_int* mm, lapack_int* m, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_stgexc( lapack_logical* wantq, lapack_logical* wantz, lapack_int* n, - float* a, lapack_int* lda, float* b, lapack_int* ldb, - float* q, lapack_int* ldq, float* z, lapack_int* ldz, - lapack_int* ifst, lapack_int* ilst, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dtgexc( lapack_logical* wantq, lapack_logical* wantz, lapack_int* n, - double* a, lapack_int* lda, double* b, lapack_int* ldb, - double* q, lapack_int* ldq, double* z, lapack_int* ldz, - lapack_int* ifst, lapack_int* ilst, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_ctgexc( lapack_logical* wantq, lapack_logical* wantz, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* q, lapack_int* ldq, - lapack_complex_float* z, lapack_int* ldz, lapack_int* ifst, - lapack_int* ilst, lapack_int *info ); -void LAPACK_ztgexc( lapack_logical* wantq, lapack_logical* wantz, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* q, lapack_int* ldq, - lapack_complex_double* z, lapack_int* ldz, lapack_int* ifst, - lapack_int* ilst, lapack_int *info ); -void LAPACK_stgsen( lapack_int* ijob, lapack_logical* wantq, - lapack_logical* wantz, const lapack_logical* select, - lapack_int* n, float* a, lapack_int* lda, float* b, - lapack_int* ldb, float* alphar, float* alphai, float* beta, - float* q, lapack_int* ldq, float* z, lapack_int* ldz, - lapack_int* m, float* pl, float* pr, float* dif, - float* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_dtgsen( lapack_int* ijob, lapack_logical* wantq, - lapack_logical* wantz, const lapack_logical* select, - lapack_int* n, double* a, lapack_int* lda, double* b, - lapack_int* ldb, double* alphar, double* alphai, - double* beta, double* q, lapack_int* ldq, double* z, - lapack_int* ldz, lapack_int* m, double* pl, double* pr, - double* dif, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_ctgsen( lapack_int* ijob, lapack_logical* wantq, - lapack_logical* wantz, const lapack_logical* select, - lapack_int* n, lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* alpha, lapack_complex_float* beta, - lapack_complex_float* q, lapack_int* ldq, - lapack_complex_float* z, lapack_int* ldz, lapack_int* m, - float* pl, float* pr, float* dif, - lapack_complex_float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_ztgsen( lapack_int* ijob, lapack_logical* wantq, - lapack_logical* wantz, const lapack_logical* select, - lapack_int* n, lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* alpha, lapack_complex_double* beta, - lapack_complex_double* q, lapack_int* ldq, - lapack_complex_double* z, lapack_int* ldz, lapack_int* m, - double* pl, double* pr, double* dif, - lapack_complex_double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_stgsyl( char* trans, lapack_int* ijob, lapack_int* m, lapack_int* n, - const float* a, lapack_int* lda, const float* b, - lapack_int* ldb, float* c, lapack_int* ldc, const float* d, - lapack_int* ldd, const float* e, lapack_int* lde, float* f, - lapack_int* ldf, float* scale, float* dif, float* work, - lapack_int* lwork, lapack_int* iwork, lapack_int *info ); -void LAPACK_dtgsyl( char* trans, lapack_int* ijob, lapack_int* m, lapack_int* n, - const double* a, lapack_int* lda, const double* b, - lapack_int* ldb, double* c, lapack_int* ldc, - const double* d, lapack_int* ldd, const double* e, - lapack_int* lde, double* f, lapack_int* ldf, double* scale, - double* dif, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_ctgsyl( char* trans, lapack_int* ijob, lapack_int* m, lapack_int* n, - const lapack_complex_float* a, lapack_int* lda, - const lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* c, lapack_int* ldc, - const lapack_complex_float* d, lapack_int* ldd, - const lapack_complex_float* e, lapack_int* lde, - lapack_complex_float* f, lapack_int* ldf, float* scale, - float* dif, lapack_complex_float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_ztgsyl( char* trans, lapack_int* ijob, lapack_int* m, lapack_int* n, - const lapack_complex_double* a, lapack_int* lda, - const lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* c, lapack_int* ldc, - const lapack_complex_double* d, lapack_int* ldd, - const lapack_complex_double* e, lapack_int* lde, - lapack_complex_double* f, lapack_int* ldf, double* scale, - double* dif, lapack_complex_double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_stgsna( char* job, char* howmny, const lapack_logical* select, - lapack_int* n, const float* a, lapack_int* lda, - const float* b, lapack_int* ldb, const float* vl, - lapack_int* ldvl, const float* vr, lapack_int* ldvr, - float* s, float* dif, lapack_int* mm, lapack_int* m, - float* work, lapack_int* lwork, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dtgsna( char* job, char* howmny, const lapack_logical* select, - lapack_int* n, const double* a, lapack_int* lda, - const double* b, lapack_int* ldb, const double* vl, - lapack_int* ldvl, const double* vr, lapack_int* ldvr, - double* s, double* dif, lapack_int* mm, lapack_int* m, - double* work, lapack_int* lwork, lapack_int* iwork, - lapack_int *info ); -void LAPACK_ctgsna( char* job, char* howmny, const lapack_logical* select, - lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, const lapack_complex_float* b, - lapack_int* ldb, const lapack_complex_float* vl, - lapack_int* ldvl, const lapack_complex_float* vr, - lapack_int* ldvr, float* s, float* dif, lapack_int* mm, - lapack_int* m, lapack_complex_float* work, - lapack_int* lwork, lapack_int* iwork, lapack_int *info ); -void LAPACK_ztgsna( char* job, char* howmny, const lapack_logical* select, - lapack_int* n, const lapack_complex_double* a, - lapack_int* lda, const lapack_complex_double* b, - lapack_int* ldb, const lapack_complex_double* vl, - lapack_int* ldvl, const lapack_complex_double* vr, - lapack_int* ldvr, double* s, double* dif, lapack_int* mm, - lapack_int* m, lapack_complex_double* work, - lapack_int* lwork, lapack_int* iwork, lapack_int *info ); -void LAPACK_sggsvp( char* jobu, char* jobv, char* jobq, lapack_int* m, - lapack_int* p, lapack_int* n, float* a, lapack_int* lda, - float* b, lapack_int* ldb, float* tola, float* tolb, - lapack_int* k, lapack_int* l, float* u, lapack_int* ldu, - float* v, lapack_int* ldv, float* q, lapack_int* ldq, - lapack_int* iwork, float* tau, float* work, - lapack_int *info ); -void LAPACK_dggsvp( char* jobu, char* jobv, char* jobq, lapack_int* m, - lapack_int* p, lapack_int* n, double* a, lapack_int* lda, - double* b, lapack_int* ldb, double* tola, double* tolb, - lapack_int* k, lapack_int* l, double* u, lapack_int* ldu, - double* v, lapack_int* ldv, double* q, lapack_int* ldq, - lapack_int* iwork, double* tau, double* work, - lapack_int *info ); -void LAPACK_cggsvp( char* jobu, char* jobv, char* jobq, lapack_int* m, - lapack_int* p, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* b, lapack_int* ldb, - float* tola, float* tolb, lapack_int* k, lapack_int* l, - lapack_complex_float* u, lapack_int* ldu, - lapack_complex_float* v, lapack_int* ldv, - lapack_complex_float* q, lapack_int* ldq, lapack_int* iwork, - float* rwork, lapack_complex_float* tau, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zggsvp( char* jobu, char* jobv, char* jobq, lapack_int* m, - lapack_int* p, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* b, lapack_int* ldb, - double* tola, double* tolb, lapack_int* k, lapack_int* l, - lapack_complex_double* u, lapack_int* ldu, - lapack_complex_double* v, lapack_int* ldv, - lapack_complex_double* q, lapack_int* ldq, - lapack_int* iwork, double* rwork, - lapack_complex_double* tau, lapack_complex_double* work, - lapack_int *info ); -void LAPACK_stgsja( char* jobu, char* jobv, char* jobq, lapack_int* m, - lapack_int* p, lapack_int* n, lapack_int* k, lapack_int* l, - float* a, lapack_int* lda, float* b, lapack_int* ldb, - float* tola, float* tolb, float* alpha, float* beta, - float* u, lapack_int* ldu, float* v, lapack_int* ldv, - float* q, lapack_int* ldq, float* work, lapack_int* ncycle, - lapack_int *info ); -void LAPACK_dtgsja( char* jobu, char* jobv, char* jobq, lapack_int* m, - lapack_int* p, lapack_int* n, lapack_int* k, lapack_int* l, - double* a, lapack_int* lda, double* b, lapack_int* ldb, - double* tola, double* tolb, double* alpha, double* beta, - double* u, lapack_int* ldu, double* v, lapack_int* ldv, - double* q, lapack_int* ldq, double* work, - lapack_int* ncycle, lapack_int *info ); -void LAPACK_ctgsja( char* jobu, char* jobv, char* jobq, lapack_int* m, - lapack_int* p, lapack_int* n, lapack_int* k, lapack_int* l, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, float* tola, - float* tolb, float* alpha, float* beta, - lapack_complex_float* u, lapack_int* ldu, - lapack_complex_float* v, lapack_int* ldv, - lapack_complex_float* q, lapack_int* ldq, - lapack_complex_float* work, lapack_int* ncycle, - lapack_int *info ); -void LAPACK_ztgsja( char* jobu, char* jobv, char* jobq, lapack_int* m, - lapack_int* p, lapack_int* n, lapack_int* k, lapack_int* l, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, double* tola, - double* tolb, double* alpha, double* beta, - lapack_complex_double* u, lapack_int* ldu, - lapack_complex_double* v, lapack_int* ldv, - lapack_complex_double* q, lapack_int* ldq, - lapack_complex_double* work, lapack_int* ncycle, - lapack_int *info ); -void LAPACK_sgels( char* trans, lapack_int* m, lapack_int* n, lapack_int* nrhs, - float* a, lapack_int* lda, float* b, lapack_int* ldb, - float* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_dgels( char* trans, lapack_int* m, lapack_int* n, lapack_int* nrhs, - double* a, lapack_int* lda, double* b, lapack_int* ldb, - double* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_cgels( char* trans, lapack_int* m, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zgels( char* trans, lapack_int* m, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_sgelsy( lapack_int* m, lapack_int* n, lapack_int* nrhs, float* a, - lapack_int* lda, float* b, lapack_int* ldb, - lapack_int* jpvt, float* rcond, lapack_int* rank, - float* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_dgelsy( lapack_int* m, lapack_int* n, lapack_int* nrhs, double* a, - lapack_int* lda, double* b, lapack_int* ldb, - lapack_int* jpvt, double* rcond, lapack_int* rank, - double* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_cgelsy( lapack_int* m, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, lapack_int* jpvt, - float* rcond, lapack_int* rank, lapack_complex_float* work, - lapack_int* lwork, float* rwork, lapack_int *info ); -void LAPACK_zgelsy( lapack_int* m, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, lapack_int* jpvt, - double* rcond, lapack_int* rank, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int *info ); -void LAPACK_sgelss( lapack_int* m, lapack_int* n, lapack_int* nrhs, float* a, - lapack_int* lda, float* b, lapack_int* ldb, float* s, - float* rcond, lapack_int* rank, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dgelss( lapack_int* m, lapack_int* n, lapack_int* nrhs, double* a, - lapack_int* lda, double* b, lapack_int* ldb, double* s, - double* rcond, lapack_int* rank, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cgelss( lapack_int* m, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, float* s, - float* rcond, lapack_int* rank, lapack_complex_float* work, - lapack_int* lwork, float* rwork, lapack_int *info ); -void LAPACK_zgelss( lapack_int* m, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, double* s, - double* rcond, lapack_int* rank, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int *info ); -void LAPACK_sgelsd( lapack_int* m, lapack_int* n, lapack_int* nrhs, float* a, - lapack_int* lda, float* b, lapack_int* ldb, float* s, - float* rcond, lapack_int* rank, float* work, - lapack_int* lwork, lapack_int* iwork, lapack_int *info ); -void LAPACK_dgelsd( lapack_int* m, lapack_int* n, lapack_int* nrhs, double* a, - lapack_int* lda, double* b, lapack_int* ldb, double* s, - double* rcond, lapack_int* rank, double* work, - lapack_int* lwork, lapack_int* iwork, lapack_int *info ); -void LAPACK_cgelsd( lapack_int* m, lapack_int* n, lapack_int* nrhs, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, float* s, - float* rcond, lapack_int* rank, lapack_complex_float* work, - lapack_int* lwork, float* rwork, lapack_int* iwork, - lapack_int *info ); -void LAPACK_zgelsd( lapack_int* m, lapack_int* n, lapack_int* nrhs, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, double* s, - double* rcond, lapack_int* rank, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int* iwork, lapack_int *info ); -void LAPACK_sgglse( lapack_int* m, lapack_int* n, lapack_int* p, float* a, - lapack_int* lda, float* b, lapack_int* ldb, float* c, - float* d, float* x, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dgglse( lapack_int* m, lapack_int* n, lapack_int* p, double* a, - lapack_int* lda, double* b, lapack_int* ldb, double* c, - double* d, double* x, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cgglse( lapack_int* m, lapack_int* n, lapack_int* p, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* c, lapack_complex_float* d, - lapack_complex_float* x, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zgglse( lapack_int* m, lapack_int* n, lapack_int* p, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* c, lapack_complex_double* d, - lapack_complex_double* x, lapack_complex_double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_sggglm( lapack_int* n, lapack_int* m, lapack_int* p, float* a, - lapack_int* lda, float* b, lapack_int* ldb, float* d, - float* x, float* y, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dggglm( lapack_int* n, lapack_int* m, lapack_int* p, double* a, - lapack_int* lda, double* b, lapack_int* ldb, double* d, - double* x, double* y, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cggglm( lapack_int* n, lapack_int* m, lapack_int* p, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* d, lapack_complex_float* x, - lapack_complex_float* y, lapack_complex_float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_zggglm( lapack_int* n, lapack_int* m, lapack_int* p, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* d, lapack_complex_double* x, - lapack_complex_double* y, lapack_complex_double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_ssyev( char* jobz, char* uplo, lapack_int* n, float* a, - lapack_int* lda, float* w, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dsyev( char* jobz, char* uplo, lapack_int* n, double* a, - lapack_int* lda, double* w, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cheev( char* jobz, char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, float* w, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int *info ); -void LAPACK_zheev( char* jobz, char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, double* w, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int *info ); -void LAPACK_ssyevd( char* jobz, char* uplo, lapack_int* n, float* a, - lapack_int* lda, float* w, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_dsyevd( char* jobz, char* uplo, lapack_int* n, double* a, - lapack_int* lda, double* w, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_cheevd( char* jobz, char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, float* w, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork, - lapack_int *info ); -void LAPACK_zheevd( char* jobz, char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, double* w, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int* lrwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_ssyevx( char* jobz, char* range, char* uplo, lapack_int* n, - float* a, lapack_int* lda, float* vl, float* vu, - lapack_int* il, lapack_int* iu, float* abstol, - lapack_int* m, float* w, float* z, lapack_int* ldz, - float* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_dsyevx( char* jobz, char* range, char* uplo, lapack_int* n, - double* a, lapack_int* lda, double* vl, double* vu, - lapack_int* il, lapack_int* iu, double* abstol, - lapack_int* m, double* w, double* z, lapack_int* ldz, - double* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_cheevx( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, float* vl, - float* vu, lapack_int* il, lapack_int* iu, float* abstol, - lapack_int* m, float* w, lapack_complex_float* z, - lapack_int* ldz, lapack_complex_float* work, - lapack_int* lwork, float* rwork, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_zheevx( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, double* vl, - double* vu, lapack_int* il, lapack_int* iu, double* abstol, - lapack_int* m, double* w, lapack_complex_double* z, - lapack_int* ldz, lapack_complex_double* work, - lapack_int* lwork, double* rwork, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_ssyevr( char* jobz, char* range, char* uplo, lapack_int* n, - float* a, lapack_int* lda, float* vl, float* vu, - lapack_int* il, lapack_int* iu, float* abstol, - lapack_int* m, float* w, float* z, lapack_int* ldz, - lapack_int* isuppz, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_dsyevr( char* jobz, char* range, char* uplo, lapack_int* n, - double* a, lapack_int* lda, double* vl, double* vu, - lapack_int* il, lapack_int* iu, double* abstol, - lapack_int* m, double* w, double* z, lapack_int* ldz, - lapack_int* isuppz, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_cheevr( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, float* vl, - float* vu, lapack_int* il, lapack_int* iu, float* abstol, - lapack_int* m, float* w, lapack_complex_float* z, - lapack_int* ldz, lapack_int* isuppz, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork, - lapack_int *info ); -void LAPACK_zheevr( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, double* vl, - double* vu, lapack_int* il, lapack_int* iu, double* abstol, - lapack_int* m, double* w, lapack_complex_double* z, - lapack_int* ldz, lapack_int* isuppz, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int* lrwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_sspev( char* jobz, char* uplo, lapack_int* n, float* ap, float* w, - float* z, lapack_int* ldz, float* work, lapack_int *info ); -void LAPACK_dspev( char* jobz, char* uplo, lapack_int* n, double* ap, double* w, - double* z, lapack_int* ldz, double* work, lapack_int *info ); -void LAPACK_chpev( char* jobz, char* uplo, lapack_int* n, - lapack_complex_float* ap, float* w, lapack_complex_float* z, - lapack_int* ldz, lapack_complex_float* work, float* rwork, - lapack_int *info ); -void LAPACK_zhpev( char* jobz, char* uplo, lapack_int* n, - lapack_complex_double* ap, double* w, - lapack_complex_double* z, lapack_int* ldz, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_sspevd( char* jobz, char* uplo, lapack_int* n, float* ap, float* w, - float* z, lapack_int* ldz, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_dspevd( char* jobz, char* uplo, lapack_int* n, double* ap, - double* w, double* z, lapack_int* ldz, double* work, - lapack_int* lwork, lapack_int* iwork, lapack_int* liwork, - lapack_int *info ); -void LAPACK_chpevd( char* jobz, char* uplo, lapack_int* n, - lapack_complex_float* ap, float* w, lapack_complex_float* z, - lapack_int* ldz, lapack_complex_float* work, - lapack_int* lwork, float* rwork, lapack_int* lrwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_zhpevd( char* jobz, char* uplo, lapack_int* n, - lapack_complex_double* ap, double* w, - lapack_complex_double* z, lapack_int* ldz, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int* lrwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_sspevx( char* jobz, char* range, char* uplo, lapack_int* n, - float* ap, float* vl, float* vu, lapack_int* il, - lapack_int* iu, float* abstol, lapack_int* m, float* w, - float* z, lapack_int* ldz, float* work, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_dspevx( char* jobz, char* range, char* uplo, lapack_int* n, - double* ap, double* vl, double* vu, lapack_int* il, - lapack_int* iu, double* abstol, lapack_int* m, double* w, - double* z, lapack_int* ldz, double* work, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_chpevx( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_complex_float* ap, float* vl, float* vu, - lapack_int* il, lapack_int* iu, float* abstol, - lapack_int* m, float* w, lapack_complex_float* z, - lapack_int* ldz, lapack_complex_float* work, float* rwork, - lapack_int* iwork, lapack_int* ifail, lapack_int *info ); -void LAPACK_zhpevx( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_complex_double* ap, double* vl, double* vu, - lapack_int* il, lapack_int* iu, double* abstol, - lapack_int* m, double* w, lapack_complex_double* z, - lapack_int* ldz, lapack_complex_double* work, double* rwork, - lapack_int* iwork, lapack_int* ifail, lapack_int *info ); -void LAPACK_ssbev( char* jobz, char* uplo, lapack_int* n, lapack_int* kd, - float* ab, lapack_int* ldab, float* w, float* z, - lapack_int* ldz, float* work, lapack_int *info ); -void LAPACK_dsbev( char* jobz, char* uplo, lapack_int* n, lapack_int* kd, - double* ab, lapack_int* ldab, double* w, double* z, - lapack_int* ldz, double* work, lapack_int *info ); -void LAPACK_chbev( char* jobz, char* uplo, lapack_int* n, lapack_int* kd, - lapack_complex_float* ab, lapack_int* ldab, float* w, - lapack_complex_float* z, lapack_int* ldz, - lapack_complex_float* work, float* rwork, lapack_int *info ); -void LAPACK_zhbev( char* jobz, char* uplo, lapack_int* n, lapack_int* kd, - lapack_complex_double* ab, lapack_int* ldab, double* w, - lapack_complex_double* z, lapack_int* ldz, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_ssbevd( char* jobz, char* uplo, lapack_int* n, lapack_int* kd, - float* ab, lapack_int* ldab, float* w, float* z, - lapack_int* ldz, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_dsbevd( char* jobz, char* uplo, lapack_int* n, lapack_int* kd, - double* ab, lapack_int* ldab, double* w, double* z, - lapack_int* ldz, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_chbevd( char* jobz, char* uplo, lapack_int* n, lapack_int* kd, - lapack_complex_float* ab, lapack_int* ldab, float* w, - lapack_complex_float* z, lapack_int* ldz, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork, - lapack_int *info ); -void LAPACK_zhbevd( char* jobz, char* uplo, lapack_int* n, lapack_int* kd, - lapack_complex_double* ab, lapack_int* ldab, double* w, - lapack_complex_double* z, lapack_int* ldz, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int* lrwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_ssbevx( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_int* kd, float* ab, lapack_int* ldab, float* q, - lapack_int* ldq, float* vl, float* vu, lapack_int* il, - lapack_int* iu, float* abstol, lapack_int* m, float* w, - float* z, lapack_int* ldz, float* work, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_dsbevx( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_int* kd, double* ab, lapack_int* ldab, double* q, - lapack_int* ldq, double* vl, double* vu, lapack_int* il, - lapack_int* iu, double* abstol, lapack_int* m, double* w, - double* z, lapack_int* ldz, double* work, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_chbevx( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_int* kd, lapack_complex_float* ab, lapack_int* ldab, - lapack_complex_float* q, lapack_int* ldq, float* vl, - float* vu, lapack_int* il, lapack_int* iu, float* abstol, - lapack_int* m, float* w, lapack_complex_float* z, - lapack_int* ldz, lapack_complex_float* work, float* rwork, - lapack_int* iwork, lapack_int* ifail, lapack_int *info ); -void LAPACK_zhbevx( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_int* kd, lapack_complex_double* ab, lapack_int* ldab, - lapack_complex_double* q, lapack_int* ldq, double* vl, - double* vu, lapack_int* il, lapack_int* iu, double* abstol, - lapack_int* m, double* w, lapack_complex_double* z, - lapack_int* ldz, lapack_complex_double* work, double* rwork, - lapack_int* iwork, lapack_int* ifail, lapack_int *info ); -void LAPACK_sstev( char* jobz, lapack_int* n, float* d, float* e, float* z, - lapack_int* ldz, float* work, lapack_int *info ); -void LAPACK_dstev( char* jobz, lapack_int* n, double* d, double* e, double* z, - lapack_int* ldz, double* work, lapack_int *info ); -void LAPACK_sstevd( char* jobz, lapack_int* n, float* d, float* e, float* z, - lapack_int* ldz, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_dstevd( char* jobz, lapack_int* n, double* d, double* e, double* z, - lapack_int* ldz, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_sstevx( char* jobz, char* range, lapack_int* n, float* d, float* e, - float* vl, float* vu, lapack_int* il, lapack_int* iu, - float* abstol, lapack_int* m, float* w, float* z, - lapack_int* ldz, float* work, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_dstevx( char* jobz, char* range, lapack_int* n, double* d, - double* e, double* vl, double* vu, lapack_int* il, - lapack_int* iu, double* abstol, lapack_int* m, double* w, - double* z, lapack_int* ldz, double* work, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_sstevr( char* jobz, char* range, lapack_int* n, float* d, float* e, - float* vl, float* vu, lapack_int* il, lapack_int* iu, - float* abstol, lapack_int* m, float* w, float* z, - lapack_int* ldz, lapack_int* isuppz, float* work, - lapack_int* lwork, lapack_int* iwork, lapack_int* liwork, - lapack_int *info ); -void LAPACK_dstevr( char* jobz, char* range, lapack_int* n, double* d, - double* e, double* vl, double* vu, lapack_int* il, - lapack_int* iu, double* abstol, lapack_int* m, double* w, - double* z, lapack_int* ldz, lapack_int* isuppz, - double* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_sgees( char* jobvs, char* sort, LAPACK_S_SELECT2 select, - lapack_int* n, float* a, lapack_int* lda, lapack_int* sdim, - float* wr, float* wi, float* vs, lapack_int* ldvs, - float* work, lapack_int* lwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_dgees( char* jobvs, char* sort, LAPACK_D_SELECT2 select, - lapack_int* n, double* a, lapack_int* lda, lapack_int* sdim, - double* wr, double* wi, double* vs, lapack_int* ldvs, - double* work, lapack_int* lwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_cgees( char* jobvs, char* sort, LAPACK_C_SELECT1 select, - lapack_int* n, lapack_complex_float* a, lapack_int* lda, - lapack_int* sdim, lapack_complex_float* w, - lapack_complex_float* vs, lapack_int* ldvs, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_logical* bwork, lapack_int *info ); -void LAPACK_zgees( char* jobvs, char* sort, LAPACK_Z_SELECT1 select, - lapack_int* n, lapack_complex_double* a, lapack_int* lda, - lapack_int* sdim, lapack_complex_double* w, - lapack_complex_double* vs, lapack_int* ldvs, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_logical* bwork, lapack_int *info ); -void LAPACK_sgeesx( char* jobvs, char* sort, LAPACK_S_SELECT2 select, - char* sense, lapack_int* n, float* a, lapack_int* lda, - lapack_int* sdim, float* wr, float* wi, float* vs, - lapack_int* ldvs, float* rconde, float* rcondv, float* work, - lapack_int* lwork, lapack_int* iwork, lapack_int* liwork, - lapack_logical* bwork, lapack_int *info ); -void LAPACK_dgeesx( char* jobvs, char* sort, LAPACK_D_SELECT2 select, - char* sense, lapack_int* n, double* a, lapack_int* lda, - lapack_int* sdim, double* wr, double* wi, double* vs, - lapack_int* ldvs, double* rconde, double* rcondv, - double* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* liwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_cgeesx( char* jobvs, char* sort, LAPACK_C_SELECT1 select, - char* sense, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_int* sdim, lapack_complex_float* w, - lapack_complex_float* vs, lapack_int* ldvs, float* rconde, - float* rcondv, lapack_complex_float* work, - lapack_int* lwork, float* rwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_zgeesx( char* jobvs, char* sort, LAPACK_Z_SELECT1 select, - char* sense, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_int* sdim, lapack_complex_double* w, - lapack_complex_double* vs, lapack_int* ldvs, double* rconde, - double* rcondv, lapack_complex_double* work, - lapack_int* lwork, double* rwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_sgeev( char* jobvl, char* jobvr, lapack_int* n, float* a, - lapack_int* lda, float* wr, float* wi, float* vl, - lapack_int* ldvl, float* vr, lapack_int* ldvr, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dgeev( char* jobvl, char* jobvr, lapack_int* n, double* a, - lapack_int* lda, double* wr, double* wi, double* vl, - lapack_int* ldvl, double* vr, lapack_int* ldvr, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cgeev( char* jobvl, char* jobvr, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* w, lapack_complex_float* vl, - lapack_int* ldvl, lapack_complex_float* vr, lapack_int* ldvr, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int *info ); -void LAPACK_zgeev( char* jobvl, char* jobvr, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* w, lapack_complex_double* vl, - lapack_int* ldvl, lapack_complex_double* vr, - lapack_int* ldvr, lapack_complex_double* work, - lapack_int* lwork, double* rwork, lapack_int *info ); -void LAPACK_sgeevx( char* balanc, char* jobvl, char* jobvr, char* sense, - lapack_int* n, float* a, lapack_int* lda, float* wr, - float* wi, float* vl, lapack_int* ldvl, float* vr, - lapack_int* ldvr, lapack_int* ilo, lapack_int* ihi, - float* scale, float* abnrm, float* rconde, float* rcondv, - float* work, lapack_int* lwork, lapack_int* iwork, - lapack_int *info ); -void LAPACK_dgeevx( char* balanc, char* jobvl, char* jobvr, char* sense, - lapack_int* n, double* a, lapack_int* lda, double* wr, - double* wi, double* vl, lapack_int* ldvl, double* vr, - lapack_int* ldvr, lapack_int* ilo, lapack_int* ihi, - double* scale, double* abnrm, double* rconde, - double* rcondv, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_cgeevx( char* balanc, char* jobvl, char* jobvr, char* sense, - lapack_int* n, lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* w, lapack_complex_float* vl, - lapack_int* ldvl, lapack_complex_float* vr, - lapack_int* ldvr, lapack_int* ilo, lapack_int* ihi, - float* scale, float* abnrm, float* rconde, float* rcondv, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int *info ); -void LAPACK_zgeevx( char* balanc, char* jobvl, char* jobvr, char* sense, - lapack_int* n, lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* w, lapack_complex_double* vl, - lapack_int* ldvl, lapack_complex_double* vr, - lapack_int* ldvr, lapack_int* ilo, lapack_int* ihi, - double* scale, double* abnrm, double* rconde, - double* rcondv, lapack_complex_double* work, - lapack_int* lwork, double* rwork, lapack_int *info ); -void LAPACK_sgesvd( char* jobu, char* jobvt, lapack_int* m, lapack_int* n, - float* a, lapack_int* lda, float* s, float* u, - lapack_int* ldu, float* vt, lapack_int* ldvt, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_dgesvd( char* jobu, char* jobvt, lapack_int* m, lapack_int* n, - double* a, lapack_int* lda, double* s, double* u, - lapack_int* ldu, double* vt, lapack_int* ldvt, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cgesvd( char* jobu, char* jobvt, lapack_int* m, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, float* s, - lapack_complex_float* u, lapack_int* ldu, - lapack_complex_float* vt, lapack_int* ldvt, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int *info ); -void LAPACK_zgesvd( char* jobu, char* jobvt, lapack_int* m, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, double* s, - lapack_complex_double* u, lapack_int* ldu, - lapack_complex_double* vt, lapack_int* ldvt, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int *info ); -void LAPACK_sgesdd( char* jobz, lapack_int* m, lapack_int* n, float* a, - lapack_int* lda, float* s, float* u, lapack_int* ldu, - float* vt, lapack_int* ldvt, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_dgesdd( char* jobz, lapack_int* m, lapack_int* n, double* a, - lapack_int* lda, double* s, double* u, lapack_int* ldu, - double* vt, lapack_int* ldvt, double* work, - lapack_int* lwork, lapack_int* iwork, lapack_int *info ); -void LAPACK_cgesdd( char* jobz, lapack_int* m, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, float* s, - lapack_complex_float* u, lapack_int* ldu, - lapack_complex_float* vt, lapack_int* ldvt, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_zgesdd( char* jobz, lapack_int* m, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, double* s, - lapack_complex_double* u, lapack_int* ldu, - lapack_complex_double* vt, lapack_int* ldvt, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int* iwork, lapack_int *info ); -void LAPACK_dgejsv( char* joba, char* jobu, char* jobv, char* jobr, char* jobt, - char* jobp, lapack_int* m, lapack_int* n, double* a, - lapack_int* lda, double* sva, double* u, lapack_int* ldu, - double* v, lapack_int* ldv, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_sgejsv( char* joba, char* jobu, char* jobv, char* jobr, char* jobt, - char* jobp, lapack_int* m, lapack_int* n, float* a, - lapack_int* lda, float* sva, float* u, lapack_int* ldu, - float* v, lapack_int* ldv, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_dgesvj( char* joba, char* jobu, char* jobv, lapack_int* m, - lapack_int* n, double* a, lapack_int* lda, double* sva, - lapack_int* mv, double* v, lapack_int* ldv, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_sgesvj( char* joba, char* jobu, char* jobv, lapack_int* m, - lapack_int* n, float* a, lapack_int* lda, float* sva, - lapack_int* mv, float* v, lapack_int* ldv, float* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_sggsvd( char* jobu, char* jobv, char* jobq, lapack_int* m, - lapack_int* n, lapack_int* p, lapack_int* k, lapack_int* l, - float* a, lapack_int* lda, float* b, lapack_int* ldb, - float* alpha, float* beta, float* u, lapack_int* ldu, - float* v, lapack_int* ldv, float* q, lapack_int* ldq, - float* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_dggsvd( char* jobu, char* jobv, char* jobq, lapack_int* m, - lapack_int* n, lapack_int* p, lapack_int* k, lapack_int* l, - double* a, lapack_int* lda, double* b, lapack_int* ldb, - double* alpha, double* beta, double* u, lapack_int* ldu, - double* v, lapack_int* ldv, double* q, lapack_int* ldq, - double* work, lapack_int* iwork, lapack_int *info ); -void LAPACK_cggsvd( char* jobu, char* jobv, char* jobq, lapack_int* m, - lapack_int* n, lapack_int* p, lapack_int* k, lapack_int* l, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, float* alpha, - float* beta, lapack_complex_float* u, lapack_int* ldu, - lapack_complex_float* v, lapack_int* ldv, - lapack_complex_float* q, lapack_int* ldq, - lapack_complex_float* work, float* rwork, lapack_int* iwork, - lapack_int *info ); -void LAPACK_zggsvd( char* jobu, char* jobv, char* jobq, lapack_int* m, - lapack_int* n, lapack_int* p, lapack_int* k, lapack_int* l, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, double* alpha, - double* beta, lapack_complex_double* u, lapack_int* ldu, - lapack_complex_double* v, lapack_int* ldv, - lapack_complex_double* q, lapack_int* ldq, - lapack_complex_double* work, double* rwork, - lapack_int* iwork, lapack_int *info ); -void LAPACK_ssygv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - float* a, lapack_int* lda, float* b, lapack_int* ldb, - float* w, float* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_dsygv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - double* a, lapack_int* lda, double* b, lapack_int* ldb, - double* w, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_chegv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, float* w, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int *info ); -void LAPACK_zhegv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, double* w, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int *info ); -void LAPACK_ssygvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - float* a, lapack_int* lda, float* b, lapack_int* ldb, - float* w, float* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_dsygvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - double* a, lapack_int* lda, double* b, lapack_int* ldb, - double* w, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_chegvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, float* w, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork, - lapack_int *info ); -void LAPACK_zhegvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, double* w, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int* lrwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_ssygvx( lapack_int* itype, char* jobz, char* range, char* uplo, - lapack_int* n, float* a, lapack_int* lda, float* b, - lapack_int* ldb, float* vl, float* vu, lapack_int* il, - lapack_int* iu, float* abstol, lapack_int* m, float* w, - float* z, lapack_int* ldz, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* ifail, lapack_int *info ); -void LAPACK_dsygvx( lapack_int* itype, char* jobz, char* range, char* uplo, - lapack_int* n, double* a, lapack_int* lda, double* b, - lapack_int* ldb, double* vl, double* vu, lapack_int* il, - lapack_int* iu, double* abstol, lapack_int* m, double* w, - double* z, lapack_int* ldz, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* ifail, lapack_int *info ); -void LAPACK_chegvx( lapack_int* itype, char* jobz, char* range, char* uplo, - lapack_int* n, lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, float* vl, - float* vu, lapack_int* il, lapack_int* iu, float* abstol, - lapack_int* m, float* w, lapack_complex_float* z, - lapack_int* ldz, lapack_complex_float* work, - lapack_int* lwork, float* rwork, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_zhegvx( lapack_int* itype, char* jobz, char* range, char* uplo, - lapack_int* n, lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, double* vl, - double* vu, lapack_int* il, lapack_int* iu, double* abstol, - lapack_int* m, double* w, lapack_complex_double* z, - lapack_int* ldz, lapack_complex_double* work, - lapack_int* lwork, double* rwork, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_sspgv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - float* ap, float* bp, float* w, float* z, lapack_int* ldz, - float* work, lapack_int *info ); -void LAPACK_dspgv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - double* ap, double* bp, double* w, double* z, - lapack_int* ldz, double* work, lapack_int *info ); -void LAPACK_chpgv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - lapack_complex_float* ap, lapack_complex_float* bp, float* w, - lapack_complex_float* z, lapack_int* ldz, - lapack_complex_float* work, float* rwork, lapack_int *info ); -void LAPACK_zhpgv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - lapack_complex_double* ap, lapack_complex_double* bp, - double* w, lapack_complex_double* z, lapack_int* ldz, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_sspgvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - float* ap, float* bp, float* w, float* z, lapack_int* ldz, - float* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_dspgvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - double* ap, double* bp, double* w, double* z, - lapack_int* ldz, double* work, lapack_int* lwork, - lapack_int* iwork, lapack_int* liwork, lapack_int *info ); -void LAPACK_chpgvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - lapack_complex_float* ap, lapack_complex_float* bp, - float* w, lapack_complex_float* z, lapack_int* ldz, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork, - lapack_int *info ); -void LAPACK_zhpgvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n, - lapack_complex_double* ap, lapack_complex_double* bp, - double* w, lapack_complex_double* z, lapack_int* ldz, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int* lrwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_sspgvx( lapack_int* itype, char* jobz, char* range, char* uplo, - lapack_int* n, float* ap, float* bp, float* vl, float* vu, - lapack_int* il, lapack_int* iu, float* abstol, - lapack_int* m, float* w, float* z, lapack_int* ldz, - float* work, lapack_int* iwork, lapack_int* ifail, - lapack_int *info ); -void LAPACK_dspgvx( lapack_int* itype, char* jobz, char* range, char* uplo, - lapack_int* n, double* ap, double* bp, double* vl, - double* vu, lapack_int* il, lapack_int* iu, double* abstol, - lapack_int* m, double* w, double* z, lapack_int* ldz, - double* work, lapack_int* iwork, lapack_int* ifail, - lapack_int *info ); -void LAPACK_chpgvx( lapack_int* itype, char* jobz, char* range, char* uplo, - lapack_int* n, lapack_complex_float* ap, - lapack_complex_float* bp, float* vl, float* vu, - lapack_int* il, lapack_int* iu, float* abstol, - lapack_int* m, float* w, lapack_complex_float* z, - lapack_int* ldz, lapack_complex_float* work, float* rwork, - lapack_int* iwork, lapack_int* ifail, lapack_int *info ); -void LAPACK_zhpgvx( lapack_int* itype, char* jobz, char* range, char* uplo, - lapack_int* n, lapack_complex_double* ap, - lapack_complex_double* bp, double* vl, double* vu, - lapack_int* il, lapack_int* iu, double* abstol, - lapack_int* m, double* w, lapack_complex_double* z, - lapack_int* ldz, lapack_complex_double* work, double* rwork, - lapack_int* iwork, lapack_int* ifail, lapack_int *info ); -void LAPACK_ssbgv( char* jobz, char* uplo, lapack_int* n, lapack_int* ka, - lapack_int* kb, float* ab, lapack_int* ldab, float* bb, - lapack_int* ldbb, float* w, float* z, lapack_int* ldz, - float* work, lapack_int *info ); -void LAPACK_dsbgv( char* jobz, char* uplo, lapack_int* n, lapack_int* ka, - lapack_int* kb, double* ab, lapack_int* ldab, double* bb, - lapack_int* ldbb, double* w, double* z, lapack_int* ldz, - double* work, lapack_int *info ); -void LAPACK_chbgv( char* jobz, char* uplo, lapack_int* n, lapack_int* ka, - lapack_int* kb, lapack_complex_float* ab, lapack_int* ldab, - lapack_complex_float* bb, lapack_int* ldbb, float* w, - lapack_complex_float* z, lapack_int* ldz, - lapack_complex_float* work, float* rwork, lapack_int *info ); -void LAPACK_zhbgv( char* jobz, char* uplo, lapack_int* n, lapack_int* ka, - lapack_int* kb, lapack_complex_double* ab, lapack_int* ldab, - lapack_complex_double* bb, lapack_int* ldbb, double* w, - lapack_complex_double* z, lapack_int* ldz, - lapack_complex_double* work, double* rwork, - lapack_int *info ); -void LAPACK_ssbgvd( char* jobz, char* uplo, lapack_int* n, lapack_int* ka, - lapack_int* kb, float* ab, lapack_int* ldab, float* bb, - lapack_int* ldbb, float* w, float* z, lapack_int* ldz, - float* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_dsbgvd( char* jobz, char* uplo, lapack_int* n, lapack_int* ka, - lapack_int* kb, double* ab, lapack_int* ldab, double* bb, - lapack_int* ldbb, double* w, double* z, lapack_int* ldz, - double* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_chbgvd( char* jobz, char* uplo, lapack_int* n, lapack_int* ka, - lapack_int* kb, lapack_complex_float* ab, lapack_int* ldab, - lapack_complex_float* bb, lapack_int* ldbb, float* w, - lapack_complex_float* z, lapack_int* ldz, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork, - lapack_int *info ); -void LAPACK_zhbgvd( char* jobz, char* uplo, lapack_int* n, lapack_int* ka, - lapack_int* kb, lapack_complex_double* ab, lapack_int* ldab, - lapack_complex_double* bb, lapack_int* ldbb, double* w, - lapack_complex_double* z, lapack_int* ldz, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int* lrwork, lapack_int* iwork, - lapack_int* liwork, lapack_int *info ); -void LAPACK_ssbgvx( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_int* ka, lapack_int* kb, float* ab, lapack_int* ldab, - float* bb, lapack_int* ldbb, float* q, lapack_int* ldq, - float* vl, float* vu, lapack_int* il, lapack_int* iu, - float* abstol, lapack_int* m, float* w, float* z, - lapack_int* ldz, float* work, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_dsbgvx( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_int* ka, lapack_int* kb, double* ab, - lapack_int* ldab, double* bb, lapack_int* ldbb, double* q, - lapack_int* ldq, double* vl, double* vu, lapack_int* il, - lapack_int* iu, double* abstol, lapack_int* m, double* w, - double* z, lapack_int* ldz, double* work, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_chbgvx( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_int* ka, lapack_int* kb, lapack_complex_float* ab, - lapack_int* ldab, lapack_complex_float* bb, - lapack_int* ldbb, lapack_complex_float* q, lapack_int* ldq, - float* vl, float* vu, lapack_int* il, lapack_int* iu, - float* abstol, lapack_int* m, float* w, - lapack_complex_float* z, lapack_int* ldz, - lapack_complex_float* work, float* rwork, lapack_int* iwork, - lapack_int* ifail, lapack_int *info ); -void LAPACK_zhbgvx( char* jobz, char* range, char* uplo, lapack_int* n, - lapack_int* ka, lapack_int* kb, lapack_complex_double* ab, - lapack_int* ldab, lapack_complex_double* bb, - lapack_int* ldbb, lapack_complex_double* q, lapack_int* ldq, - double* vl, double* vu, lapack_int* il, lapack_int* iu, - double* abstol, lapack_int* m, double* w, - lapack_complex_double* z, lapack_int* ldz, - lapack_complex_double* work, double* rwork, - lapack_int* iwork, lapack_int* ifail, lapack_int *info ); -void LAPACK_sgges( char* jobvsl, char* jobvsr, char* sort, - LAPACK_S_SELECT3 selctg, lapack_int* n, float* a, - lapack_int* lda, float* b, lapack_int* ldb, lapack_int* sdim, - float* alphar, float* alphai, float* beta, float* vsl, - lapack_int* ldvsl, float* vsr, lapack_int* ldvsr, - float* work, lapack_int* lwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_dgges( char* jobvsl, char* jobvsr, char* sort, - LAPACK_D_SELECT3 selctg, lapack_int* n, double* a, - lapack_int* lda, double* b, lapack_int* ldb, - lapack_int* sdim, double* alphar, double* alphai, - double* beta, double* vsl, lapack_int* ldvsl, double* vsr, - lapack_int* ldvsr, double* work, lapack_int* lwork, - lapack_logical* bwork, lapack_int *info ); -void LAPACK_cgges( char* jobvsl, char* jobvsr, char* sort, - LAPACK_C_SELECT2 selctg, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, lapack_int* sdim, - lapack_complex_float* alpha, lapack_complex_float* beta, - lapack_complex_float* vsl, lapack_int* ldvsl, - lapack_complex_float* vsr, lapack_int* ldvsr, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_logical* bwork, lapack_int *info ); -void LAPACK_zgges( char* jobvsl, char* jobvsr, char* sort, - LAPACK_Z_SELECT2 selctg, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, lapack_int* sdim, - lapack_complex_double* alpha, lapack_complex_double* beta, - lapack_complex_double* vsl, lapack_int* ldvsl, - lapack_complex_double* vsr, lapack_int* ldvsr, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_logical* bwork, lapack_int *info ); -void LAPACK_sggesx( char* jobvsl, char* jobvsr, char* sort, - LAPACK_S_SELECT3 selctg, char* sense, lapack_int* n, - float* a, lapack_int* lda, float* b, lapack_int* ldb, - lapack_int* sdim, float* alphar, float* alphai, float* beta, - float* vsl, lapack_int* ldvsl, float* vsr, - lapack_int* ldvsr, float* rconde, float* rcondv, - float* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* liwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_dggesx( char* jobvsl, char* jobvsr, char* sort, - LAPACK_D_SELECT3 selctg, char* sense, lapack_int* n, - double* a, lapack_int* lda, double* b, lapack_int* ldb, - lapack_int* sdim, double* alphar, double* alphai, - double* beta, double* vsl, lapack_int* ldvsl, double* vsr, - lapack_int* ldvsr, double* rconde, double* rcondv, - double* work, lapack_int* lwork, lapack_int* iwork, - lapack_int* liwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_cggesx( char* jobvsl, char* jobvsr, char* sort, - LAPACK_C_SELECT2 selctg, char* sense, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, lapack_int* sdim, - lapack_complex_float* alpha, lapack_complex_float* beta, - lapack_complex_float* vsl, lapack_int* ldvsl, - lapack_complex_float* vsr, lapack_int* ldvsr, float* rconde, - float* rcondv, lapack_complex_float* work, - lapack_int* lwork, float* rwork, lapack_int* iwork, - lapack_int* liwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_zggesx( char* jobvsl, char* jobvsr, char* sort, - LAPACK_Z_SELECT2 selctg, char* sense, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, lapack_int* sdim, - lapack_complex_double* alpha, lapack_complex_double* beta, - lapack_complex_double* vsl, lapack_int* ldvsl, - lapack_complex_double* vsr, lapack_int* ldvsr, - double* rconde, double* rcondv, lapack_complex_double* work, - lapack_int* lwork, double* rwork, lapack_int* iwork, - lapack_int* liwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_sggev( char* jobvl, char* jobvr, lapack_int* n, float* a, - lapack_int* lda, float* b, lapack_int* ldb, float* alphar, - float* alphai, float* beta, float* vl, lapack_int* ldvl, - float* vr, lapack_int* ldvr, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dggev( char* jobvl, char* jobvr, lapack_int* n, double* a, - lapack_int* lda, double* b, lapack_int* ldb, double* alphar, - double* alphai, double* beta, double* vl, lapack_int* ldvl, - double* vr, lapack_int* ldvr, double* work, - lapack_int* lwork, lapack_int *info ); -void LAPACK_cggev( char* jobvl, char* jobvr, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* alpha, lapack_complex_float* beta, - lapack_complex_float* vl, lapack_int* ldvl, - lapack_complex_float* vr, lapack_int* ldvr, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int *info ); -void LAPACK_zggev( char* jobvl, char* jobvr, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* alpha, lapack_complex_double* beta, - lapack_complex_double* vl, lapack_int* ldvl, - lapack_complex_double* vr, lapack_int* ldvr, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int *info ); -void LAPACK_sggevx( char* balanc, char* jobvl, char* jobvr, char* sense, - lapack_int* n, float* a, lapack_int* lda, float* b, - lapack_int* ldb, float* alphar, float* alphai, float* beta, - float* vl, lapack_int* ldvl, float* vr, lapack_int* ldvr, - lapack_int* ilo, lapack_int* ihi, float* lscale, - float* rscale, float* abnrm, float* bbnrm, float* rconde, - float* rcondv, float* work, lapack_int* lwork, - lapack_int* iwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_dggevx( char* balanc, char* jobvl, char* jobvr, char* sense, - lapack_int* n, double* a, lapack_int* lda, double* b, - lapack_int* ldb, double* alphar, double* alphai, - double* beta, double* vl, lapack_int* ldvl, double* vr, - lapack_int* ldvr, lapack_int* ilo, lapack_int* ihi, - double* lscale, double* rscale, double* abnrm, - double* bbnrm, double* rconde, double* rcondv, double* work, - lapack_int* lwork, lapack_int* iwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_cggevx( char* balanc, char* jobvl, char* jobvr, char* sense, - lapack_int* n, lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* alpha, lapack_complex_float* beta, - lapack_complex_float* vl, lapack_int* ldvl, - lapack_complex_float* vr, lapack_int* ldvr, lapack_int* ilo, - lapack_int* ihi, float* lscale, float* rscale, float* abnrm, - float* bbnrm, float* rconde, float* rcondv, - lapack_complex_float* work, lapack_int* lwork, float* rwork, - lapack_int* iwork, lapack_logical* bwork, - lapack_int *info ); -void LAPACK_zggevx( char* balanc, char* jobvl, char* jobvr, char* sense, - lapack_int* n, lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* alpha, lapack_complex_double* beta, - lapack_complex_double* vl, lapack_int* ldvl, - lapack_complex_double* vr, lapack_int* ldvr, - lapack_int* ilo, lapack_int* ihi, double* lscale, - double* rscale, double* abnrm, double* bbnrm, - double* rconde, double* rcondv, lapack_complex_double* work, - lapack_int* lwork, double* rwork, lapack_int* iwork, - lapack_logical* bwork, lapack_int *info ); -void LAPACK_dsfrk( char* transr, char* uplo, char* trans, lapack_int* n, - lapack_int* k, double* alpha, const double* a, - lapack_int* lda, double* beta, double* c ); -void LAPACK_ssfrk( char* transr, char* uplo, char* trans, lapack_int* n, - lapack_int* k, float* alpha, const float* a, lapack_int* lda, - float* beta, float* c ); -void LAPACK_zhfrk( char* transr, char* uplo, char* trans, lapack_int* n, - lapack_int* k, double* alpha, const lapack_complex_double* a, - lapack_int* lda, double* beta, lapack_complex_double* c ); -void LAPACK_chfrk( char* transr, char* uplo, char* trans, lapack_int* n, - lapack_int* k, float* alpha, const lapack_complex_float* a, - lapack_int* lda, float* beta, lapack_complex_float* c ); -void LAPACK_dtfsm( char* transr, char* side, char* uplo, char* trans, - char* diag, lapack_int* m, lapack_int* n, double* alpha, - const double* a, double* b, lapack_int* ldb ); -void LAPACK_stfsm( char* transr, char* side, char* uplo, char* trans, - char* diag, lapack_int* m, lapack_int* n, float* alpha, - const float* a, float* b, lapack_int* ldb ); -void LAPACK_ztfsm( char* transr, char* side, char* uplo, char* trans, - char* diag, lapack_int* m, lapack_int* n, - lapack_complex_double* alpha, const lapack_complex_double* a, - lapack_complex_double* b, lapack_int* ldb ); -void LAPACK_ctfsm( char* transr, char* side, char* uplo, char* trans, - char* diag, lapack_int* m, lapack_int* n, - lapack_complex_float* alpha, const lapack_complex_float* a, - lapack_complex_float* b, lapack_int* ldb ); -void LAPACK_dtfttp( char* transr, char* uplo, lapack_int* n, const double* arf, - double* ap, lapack_int *info ); -void LAPACK_stfttp( char* transr, char* uplo, lapack_int* n, const float* arf, - float* ap, lapack_int *info ); -void LAPACK_ztfttp( char* transr, char* uplo, lapack_int* n, - const lapack_complex_double* arf, lapack_complex_double* ap, - lapack_int *info ); -void LAPACK_ctfttp( char* transr, char* uplo, lapack_int* n, - const lapack_complex_float* arf, lapack_complex_float* ap, - lapack_int *info ); -void LAPACK_dtfttr( char* transr, char* uplo, lapack_int* n, const double* arf, - double* a, lapack_int* lda, lapack_int *info ); -void LAPACK_stfttr( char* transr, char* uplo, lapack_int* n, const float* arf, - float* a, lapack_int* lda, lapack_int *info ); -void LAPACK_ztfttr( char* transr, char* uplo, lapack_int* n, - const lapack_complex_double* arf, lapack_complex_double* a, - lapack_int* lda, lapack_int *info ); -void LAPACK_ctfttr( char* transr, char* uplo, lapack_int* n, - const lapack_complex_float* arf, lapack_complex_float* a, - lapack_int* lda, lapack_int *info ); -void LAPACK_dtpttf( char* transr, char* uplo, lapack_int* n, const double* ap, - double* arf, lapack_int *info ); -void LAPACK_stpttf( char* transr, char* uplo, lapack_int* n, const float* ap, - float* arf, lapack_int *info ); -void LAPACK_ztpttf( char* transr, char* uplo, lapack_int* n, - const lapack_complex_double* ap, lapack_complex_double* arf, - lapack_int *info ); -void LAPACK_ctpttf( char* transr, char* uplo, lapack_int* n, - const lapack_complex_float* ap, lapack_complex_float* arf, - lapack_int *info ); -void LAPACK_dtpttr( char* uplo, lapack_int* n, const double* ap, double* a, - lapack_int* lda, lapack_int *info ); -void LAPACK_stpttr( char* uplo, lapack_int* n, const float* ap, float* a, - lapack_int* lda, lapack_int *info ); -void LAPACK_ztpttr( char* uplo, lapack_int* n, const lapack_complex_double* ap, - lapack_complex_double* a, lapack_int* lda, - lapack_int *info ); -void LAPACK_ctpttr( char* uplo, lapack_int* n, const lapack_complex_float* ap, - lapack_complex_float* a, lapack_int* lda, - lapack_int *info ); -void LAPACK_dtrttf( char* transr, char* uplo, lapack_int* n, const double* a, - lapack_int* lda, double* arf, lapack_int *info ); -void LAPACK_strttf( char* transr, char* uplo, lapack_int* n, const float* a, - lapack_int* lda, float* arf, lapack_int *info ); -void LAPACK_ztrttf( char* transr, char* uplo, lapack_int* n, - const lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* arf, lapack_int *info ); -void LAPACK_ctrttf( char* transr, char* uplo, lapack_int* n, - const lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* arf, lapack_int *info ); -void LAPACK_dtrttp( char* uplo, lapack_int* n, const double* a, lapack_int* lda, - double* ap, lapack_int *info ); -void LAPACK_strttp( char* uplo, lapack_int* n, const float* a, lapack_int* lda, - float* ap, lapack_int *info ); -void LAPACK_ztrttp( char* uplo, lapack_int* n, const lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* ap, - lapack_int *info ); -void LAPACK_ctrttp( char* uplo, lapack_int* n, const lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* ap, - lapack_int *info ); -void LAPACK_sgeqrfp( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - float* tau, float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_dgeqrfp( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - double* tau, double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_cgeqrfp( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* tau, - lapack_complex_float* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_zgeqrfp( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* tau, - lapack_complex_double* work, lapack_int* lwork, - lapack_int *info ); -void LAPACK_clacgv( lapack_int* n, lapack_complex_float* x, lapack_int* incx ); -void LAPACK_zlacgv( lapack_int* n, lapack_complex_double* x, lapack_int* incx ); -void LAPACK_slarnv( lapack_int* idist, lapack_int* iseed, lapack_int* n, - float* x ); -void LAPACK_dlarnv( lapack_int* idist, lapack_int* iseed, lapack_int* n, - double* x ); -void LAPACK_clarnv( lapack_int* idist, lapack_int* iseed, lapack_int* n, - lapack_complex_float* x ); -void LAPACK_zlarnv( lapack_int* idist, lapack_int* iseed, lapack_int* n, - lapack_complex_double* x ); -void LAPACK_sgeqr2( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - float* tau, float* work, lapack_int *info ); -void LAPACK_dgeqr2( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - double* tau, double* work, lapack_int *info ); -void LAPACK_cgeqr2( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* tau, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zgeqr2( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* tau, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_slacpy( char* uplo, lapack_int* m, lapack_int* n, const float* a, - lapack_int* lda, float* b, lapack_int* ldb ); -void LAPACK_dlacpy( char* uplo, lapack_int* m, lapack_int* n, const double* a, - lapack_int* lda, double* b, lapack_int* ldb ); -void LAPACK_clacpy( char* uplo, lapack_int* m, lapack_int* n, - const lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb ); -void LAPACK_zlacpy( char* uplo, lapack_int* m, lapack_int* n, - const lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb ); -void LAPACK_sgetf2( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_dgetf2( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - lapack_int* ipiv, lapack_int *info ); -void LAPACK_cgetf2( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_int* ipiv, lapack_int *info ); -void LAPACK_zgetf2( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_int* ipiv, lapack_int *info ); -void LAPACK_slaswp( lapack_int* n, float* a, lapack_int* lda, lapack_int* k1, - lapack_int* k2, const lapack_int* ipiv, lapack_int* incx ); -void LAPACK_dlaswp( lapack_int* n, double* a, lapack_int* lda, lapack_int* k1, - lapack_int* k2, const lapack_int* ipiv, lapack_int* incx ); -void LAPACK_claswp( lapack_int* n, lapack_complex_float* a, lapack_int* lda, - lapack_int* k1, lapack_int* k2, const lapack_int* ipiv, - lapack_int* incx ); -void LAPACK_zlaswp( lapack_int* n, lapack_complex_double* a, lapack_int* lda, - lapack_int* k1, lapack_int* k2, const lapack_int* ipiv, - lapack_int* incx ); -float LAPACK_slange( char* norm, lapack_int* m, lapack_int* n, const float* a, - lapack_int* lda, float* work ); -double LAPACK_dlange( char* norm, lapack_int* m, lapack_int* n, const double* a, - lapack_int* lda, double* work ); -float LAPACK_clange( char* norm, lapack_int* m, lapack_int* n, - const lapack_complex_float* a, lapack_int* lda, float* work ); -double LAPACK_zlange( char* norm, lapack_int* m, lapack_int* n, - const lapack_complex_double* a, lapack_int* lda, double* work ); -float LAPACK_clanhe( char* norm, char* uplo, lapack_int* n, - const lapack_complex_float* a, lapack_int* lda, float* work ); -double LAPACK_zlanhe( char* norm, char* uplo, lapack_int* n, - const lapack_complex_double* a, lapack_int* lda, double* work ); -float LAPACK_slansy( char* norm, char* uplo, lapack_int* n, const float* a, - lapack_int* lda, float* work ); -double LAPACK_dlansy( char* norm, char* uplo, lapack_int* n, const double* a, - lapack_int* lda, double* work ); -float LAPACK_clansy( char* norm, char* uplo, lapack_int* n, - const lapack_complex_float* a, lapack_int* lda, float* work ); -double LAPACK_zlansy( char* norm, char* uplo, lapack_int* n, - const lapack_complex_double* a, lapack_int* lda, double* work ); -float LAPACK_slantr( char* norm, char* uplo, char* diag, lapack_int* m, - lapack_int* n, const float* a, lapack_int* lda, float* work ); -double LAPACK_dlantr( char* norm, char* uplo, char* diag, lapack_int* m, - lapack_int* n, const double* a, lapack_int* lda, double* work ); -float LAPACK_clantr( char* norm, char* uplo, char* diag, lapack_int* m, - lapack_int* n, const lapack_complex_float* a, lapack_int* lda, - float* work ); -double LAPACK_zlantr( char* norm, char* uplo, char* diag, lapack_int* m, - lapack_int* n, const lapack_complex_double* a, lapack_int* lda, - double* work ); -float LAPACK_slamch( char* cmach ); -double LAPACK_dlamch( char* cmach ); -void LAPACK_sgelq2( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - float* tau, float* work, lapack_int *info ); -void LAPACK_dgelq2( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - double* tau, double* work, lapack_int *info ); -void LAPACK_cgelq2( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* tau, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zgelq2( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* tau, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_slarfb( char* side, char* trans, char* direct, char* storev, - lapack_int* m, lapack_int* n, lapack_int* k, const float* v, - lapack_int* ldv, const float* t, lapack_int* ldt, float* c, - lapack_int* ldc, float* work, lapack_int* ldwork ); -void LAPACK_dlarfb( char* side, char* trans, char* direct, char* storev, - lapack_int* m, lapack_int* n, lapack_int* k, - const double* v, lapack_int* ldv, const double* t, - lapack_int* ldt, double* c, lapack_int* ldc, double* work, - lapack_int* ldwork ); -void LAPACK_clarfb( char* side, char* trans, char* direct, char* storev, - lapack_int* m, lapack_int* n, lapack_int* k, - const lapack_complex_float* v, lapack_int* ldv, - const lapack_complex_float* t, lapack_int* ldt, - lapack_complex_float* c, lapack_int* ldc, - lapack_complex_float* work, lapack_int* ldwork ); -void LAPACK_zlarfb( char* side, char* trans, char* direct, char* storev, - lapack_int* m, lapack_int* n, lapack_int* k, - const lapack_complex_double* v, lapack_int* ldv, - const lapack_complex_double* t, lapack_int* ldt, - lapack_complex_double* c, lapack_int* ldc, - lapack_complex_double* work, lapack_int* ldwork ); -void LAPACK_slarfg( lapack_int* n, float* alpha, float* x, lapack_int* incx, - float* tau ); -void LAPACK_dlarfg( lapack_int* n, double* alpha, double* x, lapack_int* incx, - double* tau ); -void LAPACK_clarfg( lapack_int* n, lapack_complex_float* alpha, - lapack_complex_float* x, lapack_int* incx, - lapack_complex_float* tau ); -void LAPACK_zlarfg( lapack_int* n, lapack_complex_double* alpha, - lapack_complex_double* x, lapack_int* incx, - lapack_complex_double* tau ); -void LAPACK_slarft( char* direct, char* storev, lapack_int* n, lapack_int* k, - const float* v, lapack_int* ldv, const float* tau, float* t, - lapack_int* ldt ); -void LAPACK_dlarft( char* direct, char* storev, lapack_int* n, lapack_int* k, - const double* v, lapack_int* ldv, const double* tau, - double* t, lapack_int* ldt ); -void LAPACK_clarft( char* direct, char* storev, lapack_int* n, lapack_int* k, - const lapack_complex_float* v, lapack_int* ldv, - const lapack_complex_float* tau, lapack_complex_float* t, - lapack_int* ldt ); -void LAPACK_zlarft( char* direct, char* storev, lapack_int* n, lapack_int* k, - const lapack_complex_double* v, lapack_int* ldv, - const lapack_complex_double* tau, lapack_complex_double* t, - lapack_int* ldt ); -void LAPACK_slarfx( char* side, lapack_int* m, lapack_int* n, const float* v, - float* tau, float* c, lapack_int* ldc, float* work ); -void LAPACK_dlarfx( char* side, lapack_int* m, lapack_int* n, const double* v, - double* tau, double* c, lapack_int* ldc, double* work ); -void LAPACK_clarfx( char* side, lapack_int* m, lapack_int* n, - const lapack_complex_float* v, lapack_complex_float* tau, - lapack_complex_float* c, lapack_int* ldc, - lapack_complex_float* work ); -void LAPACK_zlarfx( char* side, lapack_int* m, lapack_int* n, - const lapack_complex_double* v, lapack_complex_double* tau, - lapack_complex_double* c, lapack_int* ldc, - lapack_complex_double* work ); -void LAPACK_slatms( lapack_int* m, lapack_int* n, char* dist, lapack_int* iseed, - char* sym, float* d, lapack_int* mode, float* cond, - float* dmax, lapack_int* kl, lapack_int* ku, char* pack, - float* a, lapack_int* lda, float* work, lapack_int *info ); -void LAPACK_dlatms( lapack_int* m, lapack_int* n, char* dist, lapack_int* iseed, - char* sym, double* d, lapack_int* mode, double* cond, - double* dmax, lapack_int* kl, lapack_int* ku, char* pack, - double* a, lapack_int* lda, double* work, - lapack_int *info ); -void LAPACK_clatms( lapack_int* m, lapack_int* n, char* dist, lapack_int* iseed, - char* sym, float* d, lapack_int* mode, float* cond, - float* dmax, lapack_int* kl, lapack_int* ku, char* pack, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zlatms( lapack_int* m, lapack_int* n, char* dist, lapack_int* iseed, - char* sym, double* d, lapack_int* mode, double* cond, - double* dmax, lapack_int* kl, lapack_int* ku, char* pack, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_slag2d( lapack_int* m, lapack_int* n, const float* sa, - lapack_int* ldsa, double* a, lapack_int* lda, - lapack_int *info ); -void LAPACK_dlag2s( lapack_int* m, lapack_int* n, const double* a, - lapack_int* lda, float* sa, lapack_int* ldsa, - lapack_int *info ); -void LAPACK_clag2z( lapack_int* m, lapack_int* n, - const lapack_complex_float* sa, lapack_int* ldsa, - lapack_complex_double* a, lapack_int* lda, - lapack_int *info ); -void LAPACK_zlag2c( lapack_int* m, lapack_int* n, - const lapack_complex_double* a, lapack_int* lda, - lapack_complex_float* sa, lapack_int* ldsa, - lapack_int *info ); -void LAPACK_slauum( char* uplo, lapack_int* n, float* a, lapack_int* lda, - lapack_int *info ); -void LAPACK_dlauum( char* uplo, lapack_int* n, double* a, lapack_int* lda, - lapack_int *info ); -void LAPACK_clauum( char* uplo, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_int *info ); -void LAPACK_zlauum( char* uplo, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_int *info ); -void LAPACK_slagge( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, const float* d, float* a, lapack_int* lda, - lapack_int* iseed, float* work, lapack_int *info ); -void LAPACK_dlagge( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, const double* d, double* a, lapack_int* lda, - lapack_int* iseed, double* work, lapack_int *info ); -void LAPACK_clagge( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, const float* d, lapack_complex_float* a, - lapack_int* lda, lapack_int* iseed, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zlagge( lapack_int* m, lapack_int* n, lapack_int* kl, - lapack_int* ku, const double* d, lapack_complex_double* a, - lapack_int* lda, lapack_int* iseed, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_slaset( char* uplo, lapack_int* m, lapack_int* n, float* alpha, - float* beta, float* a, lapack_int* lda ); -void LAPACK_dlaset( char* uplo, lapack_int* m, lapack_int* n, double* alpha, - double* beta, double* a, lapack_int* lda ); -void LAPACK_claset( char* uplo, lapack_int* m, lapack_int* n, - lapack_complex_float* alpha, lapack_complex_float* beta, - lapack_complex_float* a, lapack_int* lda ); -void LAPACK_zlaset( char* uplo, lapack_int* m, lapack_int* n, - lapack_complex_double* alpha, lapack_complex_double* beta, - lapack_complex_double* a, lapack_int* lda ); -void LAPACK_slasrt( char* id, lapack_int* n, float* d, lapack_int *info ); -void LAPACK_dlasrt( char* id, lapack_int* n, double* d, lapack_int *info ); -void LAPACK_claghe( lapack_int* n, lapack_int* k, const float* d, - lapack_complex_float* a, lapack_int* lda, lapack_int* iseed, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zlaghe( lapack_int* n, lapack_int* k, const double* d, - lapack_complex_double* a, lapack_int* lda, - lapack_int* iseed, lapack_complex_double* work, - lapack_int *info ); -void LAPACK_slagsy( lapack_int* n, lapack_int* k, const float* d, float* a, - lapack_int* lda, lapack_int* iseed, float* work, - lapack_int *info ); -void LAPACK_dlagsy( lapack_int* n, lapack_int* k, const double* d, double* a, - lapack_int* lda, lapack_int* iseed, double* work, - lapack_int *info ); -void LAPACK_clagsy( lapack_int* n, lapack_int* k, const float* d, - lapack_complex_float* a, lapack_int* lda, lapack_int* iseed, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zlagsy( lapack_int* n, lapack_int* k, const double* d, - lapack_complex_double* a, lapack_int* lda, - lapack_int* iseed, lapack_complex_double* work, - lapack_int *info ); -void LAPACK_slapmr( lapack_logical* forwrd, lapack_int* m, lapack_int* n, - float* x, lapack_int* ldx, lapack_int* k ); -void LAPACK_dlapmr( lapack_logical* forwrd, lapack_int* m, lapack_int* n, - double* x, lapack_int* ldx, lapack_int* k ); -void LAPACK_clapmr( lapack_logical* forwrd, lapack_int* m, lapack_int* n, - lapack_complex_float* x, lapack_int* ldx, lapack_int* k ); -void LAPACK_zlapmr( lapack_logical* forwrd, lapack_int* m, lapack_int* n, - lapack_complex_double* x, lapack_int* ldx, lapack_int* k ); -float LAPACK_slapy2( float* x, float* y ); -double LAPACK_dlapy2( double* x, double* y ); -float LAPACK_slapy3( float* x, float* y, float* z ); -double LAPACK_dlapy3( double* x, double* y, double* z ); -void LAPACK_slartgp( float* f, float* g, float* cs, float* sn, float* r ); -void LAPACK_dlartgp( double* f, double* g, double* cs, double* sn, double* r ); -void LAPACK_slartgs( float* x, float* y, float* sigma, float* cs, float* sn ); -void LAPACK_dlartgs( double* x, double* y, double* sigma, double* cs, - double* sn ); -// LAPACK 3.3.0 -void LAPACK_cbbcsd( char* jobu1, char* jobu2, - char* jobv1t, char* jobv2t, char* trans, - lapack_int* m, lapack_int* p, lapack_int* q, - float* theta, float* phi, - lapack_complex_float* u1, lapack_int* ldu1, - lapack_complex_float* u2, lapack_int* ldu2, - lapack_complex_float* v1t, lapack_int* ldv1t, - lapack_complex_float* v2t, lapack_int* ldv2t, - float* b11d, float* b11e, float* b12d, - float* b12e, float* b21d, float* b21e, - float* b22d, float* b22e, float* rwork, - lapack_int* lrwork , lapack_int *info ); -void LAPACK_cheswapr( char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* i1, - lapack_int* i2 ); -void LAPACK_chetri2( char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - const lapack_int* ipiv, - lapack_complex_float* work, lapack_int* lwork , lapack_int *info ); -void LAPACK_chetri2x( char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - const lapack_int* ipiv, - lapack_complex_float* work, lapack_int* nb , lapack_int *info ); -void LAPACK_chetrs2( char* uplo, lapack_int* n, - lapack_int* nrhs, const lapack_complex_float* a, - lapack_int* lda, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* work , lapack_int *info ); -void LAPACK_csyconv( char* uplo, char* way, - lapack_int* n, lapack_complex_float* a, - lapack_int* lda, const lapack_int* ipiv, - lapack_complex_float* work , lapack_int *info ); -void LAPACK_csyswapr( char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* i1, - lapack_int* i2 ); -void LAPACK_csytri2( char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - const lapack_int* ipiv, - lapack_complex_float* work, lapack_int* lwork , lapack_int *info ); -void LAPACK_csytri2x( char* uplo, lapack_int* n, - lapack_complex_float* a, lapack_int* lda, - const lapack_int* ipiv, - lapack_complex_float* work, lapack_int* nb , lapack_int *info ); -void LAPACK_csytrs2( char* uplo, lapack_int* n, - lapack_int* nrhs, const lapack_complex_float* a, - lapack_int* lda, const lapack_int* ipiv, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* work , lapack_int *info ); -void LAPACK_cunbdb( char* trans, char* signs, - lapack_int* m, lapack_int* p, lapack_int* q, - lapack_complex_float* x11, lapack_int* ldx11, - lapack_complex_float* x12, lapack_int* ldx12, - lapack_complex_float* x21, lapack_int* ldx21, - lapack_complex_float* x22, lapack_int* ldx22, - float* theta, float* phi, - lapack_complex_float* taup1, - lapack_complex_float* taup2, - lapack_complex_float* tauq1, - lapack_complex_float* tauq2, - lapack_complex_float* work, lapack_int* lwork , lapack_int *info ); -void LAPACK_cuncsd( char* jobu1, char* jobu2, - char* jobv1t, char* jobv2t, char* trans, - char* signs, lapack_int* m, lapack_int* p, - lapack_int* q, lapack_complex_float* x11, - lapack_int* ldx11, lapack_complex_float* x12, - lapack_int* ldx12, lapack_complex_float* x21, - lapack_int* ldx21, lapack_complex_float* x22, - lapack_int* ldx22, float* theta, - lapack_complex_float* u1, lapack_int* ldu1, - lapack_complex_float* u2, lapack_int* ldu2, - lapack_complex_float* v1t, lapack_int* ldv1t, - lapack_complex_float* v2t, lapack_int* ldv2t, - lapack_complex_float* work, lapack_int* lwork, - float* rwork, lapack_int* lrwork, - lapack_int* iwork , lapack_int *info ); -void LAPACK_dbbcsd( char* jobu1, char* jobu2, - char* jobv1t, char* jobv2t, char* trans, - lapack_int* m, lapack_int* p, lapack_int* q, - double* theta, double* phi, double* u1, - lapack_int* ldu1, double* u2, lapack_int* ldu2, - double* v1t, lapack_int* ldv1t, double* v2t, - lapack_int* ldv2t, double* b11d, double* b11e, - double* b12d, double* b12e, double* b21d, - double* b21e, double* b22d, double* b22e, - double* work, lapack_int* lwork , lapack_int *info ); -void LAPACK_dorbdb( char* trans, char* signs, - lapack_int* m, lapack_int* p, lapack_int* q, - double* x11, lapack_int* ldx11, double* x12, - lapack_int* ldx12, double* x21, lapack_int* ldx21, - double* x22, lapack_int* ldx22, double* theta, - double* phi, double* taup1, double* taup2, - double* tauq1, double* tauq2, double* work, - lapack_int* lwork , lapack_int *info ); -void LAPACK_dorcsd( char* jobu1, char* jobu2, - char* jobv1t, char* jobv2t, char* trans, - char* signs, lapack_int* m, lapack_int* p, - lapack_int* q, double* x11, lapack_int* ldx11, - double* x12, lapack_int* ldx12, double* x21, - lapack_int* ldx21, double* x22, lapack_int* ldx22, - double* theta, double* u1, lapack_int* ldu1, - double* u2, lapack_int* ldu2, double* v1t, - lapack_int* ldv1t, double* v2t, lapack_int* ldv2t, - double* work, lapack_int* lwork, - lapack_int* iwork , lapack_int *info ); -void LAPACK_dsyconv( char* uplo, char* way, - lapack_int* n, double* a, lapack_int* lda, - const lapack_int* ipiv, double* work , lapack_int *info ); -void LAPACK_dsyswapr( char* uplo, lapack_int* n, - double* a, lapack_int* i1, lapack_int* i2 ); -void LAPACK_dsytri2( char* uplo, lapack_int* n, - double* a, lapack_int* lda, - const lapack_int* ipiv, - lapack_complex_double* work, lapack_int* lwork , lapack_int *info ); -void LAPACK_dsytri2x( char* uplo, lapack_int* n, - double* a, lapack_int* lda, - const lapack_int* ipiv, double* work, - lapack_int* nb , lapack_int *info ); -void LAPACK_dsytrs2( char* uplo, lapack_int* n, - lapack_int* nrhs, const double* a, - lapack_int* lda, const lapack_int* ipiv, - double* b, lapack_int* ldb, double* work , lapack_int *info ); -void LAPACK_sbbcsd( char* jobu1, char* jobu2, - char* jobv1t, char* jobv2t, char* trans, - lapack_int* m, lapack_int* p, lapack_int* q, - float* theta, float* phi, float* u1, - lapack_int* ldu1, float* u2, lapack_int* ldu2, - float* v1t, lapack_int* ldv1t, float* v2t, - lapack_int* ldv2t, float* b11d, float* b11e, - float* b12d, float* b12e, float* b21d, - float* b21e, float* b22d, float* b22e, - float* work, lapack_int* lwork , lapack_int *info ); -void LAPACK_sorbdb( char* trans, char* signs, - lapack_int* m, lapack_int* p, lapack_int* q, - float* x11, lapack_int* ldx11, float* x12, - lapack_int* ldx12, float* x21, lapack_int* ldx21, - float* x22, lapack_int* ldx22, float* theta, - float* phi, float* taup1, float* taup2, - float* tauq1, float* tauq2, float* work, - lapack_int* lwork , lapack_int *info ); -void LAPACK_sorcsd( char* jobu1, char* jobu2, - char* jobv1t, char* jobv2t, char* trans, - char* signs, lapack_int* m, lapack_int* p, - lapack_int* q, float* x11, lapack_int* ldx11, - float* x12, lapack_int* ldx12, float* x21, - lapack_int* ldx21, float* x22, lapack_int* ldx22, - float* theta, float* u1, lapack_int* ldu1, - float* u2, lapack_int* ldu2, float* v1t, - lapack_int* ldv1t, float* v2t, lapack_int* ldv2t, - float* work, lapack_int* lwork, - lapack_int* iwork , lapack_int *info ); -void LAPACK_ssyconv( char* uplo, char* way, - lapack_int* n, float* a, lapack_int* lda, - const lapack_int* ipiv, float* work , lapack_int *info ); -void LAPACK_ssyswapr( char* uplo, lapack_int* n, - float* a, lapack_int* i1, lapack_int* i2 ); -void LAPACK_ssytri2( char* uplo, lapack_int* n, - float* a, lapack_int* lda, - const lapack_int* ipiv, - lapack_complex_float* work, lapack_int* lwork , lapack_int *info ); -void LAPACK_ssytri2x( char* uplo, lapack_int* n, - float* a, lapack_int* lda, - const lapack_int* ipiv, float* work, - lapack_int* nb , lapack_int *info ); -void LAPACK_ssytrs2( char* uplo, lapack_int* n, - lapack_int* nrhs, const float* a, - lapack_int* lda, const lapack_int* ipiv, - float* b, lapack_int* ldb, float* work , lapack_int *info ); -void LAPACK_zbbcsd( char* jobu1, char* jobu2, - char* jobv1t, char* jobv2t, char* trans, - lapack_int* m, lapack_int* p, lapack_int* q, - double* theta, double* phi, - lapack_complex_double* u1, lapack_int* ldu1, - lapack_complex_double* u2, lapack_int* ldu2, - lapack_complex_double* v1t, lapack_int* ldv1t, - lapack_complex_double* v2t, lapack_int* ldv2t, - double* b11d, double* b11e, double* b12d, - double* b12e, double* b21d, double* b21e, - double* b22d, double* b22e, double* rwork, - lapack_int* lrwork , lapack_int *info ); -void LAPACK_zheswapr( char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* i1, - lapack_int* i2 ); -void LAPACK_zhetri2( char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - const lapack_int* ipiv, - lapack_complex_double* work, lapack_int* lwork , lapack_int *info ); -void LAPACK_zhetri2x( char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - const lapack_int* ipiv, - lapack_complex_double* work, lapack_int* nb , lapack_int *info ); -void LAPACK_zhetrs2( char* uplo, lapack_int* n, - lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_int* ipiv, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* work , lapack_int *info ); -void LAPACK_zsyconv( char* uplo, char* way, - lapack_int* n, lapack_complex_double* a, - lapack_int* lda, const lapack_int* ipiv, - lapack_complex_double* work , lapack_int *info ); -void LAPACK_zsyswapr( char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* i1, - lapack_int* i2 ); -void LAPACK_zsytri2( char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - const lapack_int* ipiv, - lapack_complex_double* work, lapack_int* lwork , lapack_int *info ); -void LAPACK_zsytri2x( char* uplo, lapack_int* n, - lapack_complex_double* a, lapack_int* lda, - const lapack_int* ipiv, - lapack_complex_double* work, lapack_int* nb , lapack_int *info ); -void LAPACK_zsytrs2( char* uplo, lapack_int* n, - lapack_int* nrhs, - const lapack_complex_double* a, lapack_int* lda, - const lapack_int* ipiv, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* work , lapack_int *info ); -void LAPACK_zunbdb( char* trans, char* signs, - lapack_int* m, lapack_int* p, lapack_int* q, - lapack_complex_double* x11, lapack_int* ldx11, - lapack_complex_double* x12, lapack_int* ldx12, - lapack_complex_double* x21, lapack_int* ldx21, - lapack_complex_double* x22, lapack_int* ldx22, - double* theta, double* phi, - lapack_complex_double* taup1, - lapack_complex_double* taup2, - lapack_complex_double* tauq1, - lapack_complex_double* tauq2, - lapack_complex_double* work, lapack_int* lwork , lapack_int *info ); -void LAPACK_zuncsd( char* jobu1, char* jobu2, - char* jobv1t, char* jobv2t, char* trans, - char* signs, lapack_int* m, lapack_int* p, - lapack_int* q, lapack_complex_double* x11, - lapack_int* ldx11, lapack_complex_double* x12, - lapack_int* ldx12, lapack_complex_double* x21, - lapack_int* ldx21, lapack_complex_double* x22, - lapack_int* ldx22, double* theta, - lapack_complex_double* u1, lapack_int* ldu1, - lapack_complex_double* u2, lapack_int* ldu2, - lapack_complex_double* v1t, lapack_int* ldv1t, - lapack_complex_double* v2t, lapack_int* ldv2t, - lapack_complex_double* work, lapack_int* lwork, - double* rwork, lapack_int* lrwork, - lapack_int* iwork , lapack_int *info ); -// LAPACK 3.4.0 -void LAPACK_sgemqrt( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, lapack_int* nb, const float* v, - lapack_int* ldv, const float* t, lapack_int* ldt, float* c, - lapack_int* ldc, float* work, lapack_int *info ); -void LAPACK_dgemqrt( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, lapack_int* nb, const double* v, - lapack_int* ldv, const double* t, lapack_int* ldt, - double* c, lapack_int* ldc, double* work, - lapack_int *info ); -void LAPACK_cgemqrt( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, lapack_int* nb, - const lapack_complex_float* v, lapack_int* ldv, - const lapack_complex_float* t, lapack_int* ldt, - lapack_complex_float* c, lapack_int* ldc, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zgemqrt( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, lapack_int* nb, - const lapack_complex_double* v, lapack_int* ldv, - const lapack_complex_double* t, lapack_int* ldt, - lapack_complex_double* c, lapack_int* ldc, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_sgeqrt( lapack_int* m, lapack_int* n, lapack_int* nb, float* a, - lapack_int* lda, float* t, lapack_int* ldt, float* work, - lapack_int *info ); -void LAPACK_dgeqrt( lapack_int* m, lapack_int* n, lapack_int* nb, double* a, - lapack_int* lda, double* t, lapack_int* ldt, double* work, - lapack_int *info ); -void LAPACK_cgeqrt( lapack_int* m, lapack_int* n, lapack_int* nb, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* t, lapack_int* ldt, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_zgeqrt( lapack_int* m, lapack_int* n, lapack_int* nb, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* t, lapack_int* ldt, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_sgeqrt2( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - float* t, lapack_int* ldt, lapack_int *info ); -void LAPACK_dgeqrt2( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - double* t, lapack_int* ldt, lapack_int *info ); -void LAPACK_cgeqrt2( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* t, lapack_int* ldt, - lapack_int *info ); -void LAPACK_zgeqrt2( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* t, lapack_int* ldt, - lapack_int *info ); -void LAPACK_sgeqrt3( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - float* t, lapack_int* ldt, lapack_int *info ); -void LAPACK_dgeqrt3( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - double* t, lapack_int* ldt, lapack_int *info ); -void LAPACK_cgeqrt3( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* t, lapack_int* ldt, - lapack_int *info ); -void LAPACK_zgeqrt3( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* t, lapack_int* ldt, - lapack_int *info ); -void LAPACK_stpmqrt( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, lapack_int* l, lapack_int* nb, - const float* v, lapack_int* ldv, const float* t, - lapack_int* ldt, float* a, lapack_int* lda, float* b, - lapack_int* ldb, float* work, lapack_int *info ); -void LAPACK_dtpmqrt( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, lapack_int* l, lapack_int* nb, - const double* v, lapack_int* ldv, const double* t, - lapack_int* ldt, double* a, lapack_int* lda, double* b, - lapack_int* ldb, double* work, lapack_int *info ); -void LAPACK_ctpmqrt( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, lapack_int* l, lapack_int* nb, - const lapack_complex_float* v, lapack_int* ldv, - const lapack_complex_float* t, lapack_int* ldt, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_ztpmqrt( char* side, char* trans, lapack_int* m, lapack_int* n, - lapack_int* k, lapack_int* l, lapack_int* nb, - const lapack_complex_double* v, lapack_int* ldv, - const lapack_complex_double* t, lapack_int* ldt, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_dtpqrt( lapack_int* m, lapack_int* n, lapack_int* l, lapack_int* nb, - double* a, lapack_int* lda, double* b, lapack_int* ldb, - double* t, lapack_int* ldt, double* work, - lapack_int *info ); -void LAPACK_ctpqrt( lapack_int* m, lapack_int* n, lapack_int* l, lapack_int* nb, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* t, lapack_complex_float* b, - lapack_int* ldb, lapack_int* ldt, - lapack_complex_float* work, lapack_int *info ); -void LAPACK_ztpqrt( lapack_int* m, lapack_int* n, lapack_int* l, lapack_int* nb, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* t, lapack_int* ldt, - lapack_complex_double* work, lapack_int *info ); -void LAPACK_stpqrt2( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, - float* b, lapack_int* ldb, float* t, lapack_int* ldt, - lapack_int *info ); -void LAPACK_dtpqrt2( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, - double* b, lapack_int* ldb, double* t, lapack_int* ldt, - lapack_int *info ); -void LAPACK_ctpqrt2( lapack_int* m, lapack_int* n, lapack_complex_float* a, - lapack_int* lda, lapack_complex_float* b, lapack_int* ldb, - lapack_complex_float* t, lapack_int* ldt, - lapack_int *info ); -void LAPACK_ztpqrt2( lapack_int* m, lapack_int* n, lapack_complex_double* a, - lapack_int* lda, lapack_complex_double* b, lapack_int* ldb, - lapack_complex_double* t, lapack_int* ldt, - lapack_int *info ); -void LAPACK_stprfb( char* side, char* trans, char* direct, char* storev, - lapack_int* m, lapack_int* n, lapack_int* k, lapack_int* l, - const float* v, lapack_int* ldv, const float* t, - lapack_int* ldt, float* a, lapack_int* lda, float* b, - lapack_int* ldb, const float* mywork, - lapack_int* myldwork ); -void LAPACK_dtprfb( char* side, char* trans, char* direct, char* storev, - lapack_int* m, lapack_int* n, lapack_int* k, lapack_int* l, - const double* v, lapack_int* ldv, const double* t, - lapack_int* ldt, double* a, lapack_int* lda, double* b, - lapack_int* ldb, const double* mywork, - lapack_int* myldwork ); -void LAPACK_ctprfb( char* side, char* trans, char* direct, char* storev, - lapack_int* m, lapack_int* n, lapack_int* k, lapack_int* l, - const lapack_complex_float* v, lapack_int* ldv, - const lapack_complex_float* t, lapack_int* ldt, - lapack_complex_float* a, lapack_int* lda, - lapack_complex_float* b, lapack_int* ldb, - const float* mywork, lapack_int* myldwork ); -void LAPACK_ztprfb( char* side, char* trans, char* direct, char* storev, - lapack_int* m, lapack_int* n, lapack_int* k, lapack_int* l, - const lapack_complex_double* v, lapack_int* ldv, - const lapack_complex_double* t, lapack_int* ldt, - lapack_complex_double* a, lapack_int* lda, - lapack_complex_double* b, lapack_int* ldb, - const double* mywork, lapack_int* myldwork ); -// LAPACK 3.X.X -void LAPACK_csyr( char* uplo, lapack_int* n, lapack_complex_float* alpha, - const lapack_complex_float* x, lapack_int* incx, - lapack_complex_float* a, lapack_int* lda ); -void LAPACK_zsyr( char* uplo, lapack_int* n, lapack_complex_double* alpha, - const lapack_complex_double* x, lapack_int* incx, - lapack_complex_double* a, lapack_int* lda ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _LAPACKE_H_ */ - -#endif /* _MKL_LAPACKE_H_ */ diff --git a/include/Rivet/Math/eigen3/src/misc/lapacke_mangling.h b/include/Rivet/Math/eigen3/src/misc/lapacke_mangling.h deleted file mode 100644 --- a/include/Rivet/Math/eigen3/src/misc/lapacke_mangling.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef LAPACK_HEADER_INCLUDED -#define LAPACK_HEADER_INCLUDED - -#ifndef LAPACK_GLOBAL -#if defined(LAPACK_GLOBAL_PATTERN_LC) || defined(ADD_) -#define LAPACK_GLOBAL(lcname,UCNAME) lcname##_ -#elif defined(LAPACK_GLOBAL_PATTERN_UC) || defined(UPPER) -#define LAPACK_GLOBAL(lcname,UCNAME) UCNAME -#elif defined(LAPACK_GLOBAL_PATTERN_MC) || defined(NOCHANGE) -#define LAPACK_GLOBAL(lcname,UCNAME) lcname -#else -#define LAPACK_GLOBAL(lcname,UCNAME) lcname##_ -#endif -#endif - -#endif -