Showing preview only (9,352K chars total). Download the full file or copy to clipboard to get everything.
Repository: caffe2/AICamera
Branch: master
Commit: b9ada8e7bd83
Files: 787
Total size: 76.5 MB
Directory structure:
gitextract_mew1rzi9/
├── .gitignore
├── .idea/
│ ├── compiler.xml
│ ├── copyright/
│ │ └── profiles_settings.xml
│ ├── gradle.xml
│ ├── misc.xml
│ ├── runConfigurations.xml
│ └── vcs.xml
├── Exporting Squeezenet to mobile.ipynb
├── LICENSE
├── README.md
├── app/
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── facebook/
│ │ └── f8demo/
│ │ └── ExampleInstrumentedTest.java
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── assets/
│ │ │ ├── squeeze_init_net.pb
│ │ │ └── squeeze_predict_net.pb
│ │ ├── cpp/
│ │ │ ├── Eigen/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── Cholesky
│ │ │ │ ├── CholmodSupport
│ │ │ │ ├── Core
│ │ │ │ ├── Dense
│ │ │ │ ├── Eigen
│ │ │ │ ├── Eigenvalues
│ │ │ │ ├── Geometry
│ │ │ │ ├── Householder
│ │ │ │ ├── IterativeLinearSolvers
│ │ │ │ ├── Jacobi
│ │ │ │ ├── LU
│ │ │ │ ├── MetisSupport
│ │ │ │ ├── OrderingMethods
│ │ │ │ ├── PaStiXSupport
│ │ │ │ ├── PardisoSupport
│ │ │ │ ├── QR
│ │ │ │ ├── QtAlignedMalloc
│ │ │ │ ├── SPQRSupport
│ │ │ │ ├── SVD
│ │ │ │ ├── Sparse
│ │ │ │ ├── SparseCholesky
│ │ │ │ ├── SparseCore
│ │ │ │ ├── SparseLU
│ │ │ │ ├── SparseQR
│ │ │ │ ├── StdDeque
│ │ │ │ ├── StdList
│ │ │ │ ├── StdVector
│ │ │ │ ├── SuperLUSupport
│ │ │ │ ├── UmfPackSupport
│ │ │ │ └── src/
│ │ │ │ ├── Cholesky/
│ │ │ │ │ ├── LDLT.h
│ │ │ │ │ ├── LLT.h
│ │ │ │ │ └── LLT_LAPACKE.h
│ │ │ │ ├── CholmodSupport/
│ │ │ │ │ └── CholmodSupport.h
│ │ │ │ ├── Core/
│ │ │ │ │ ├── ArithmeticSequence.h
│ │ │ │ │ ├── Array.h
│ │ │ │ │ ├── ArrayBase.h
│ │ │ │ │ ├── ArrayWrapper.h
│ │ │ │ │ ├── Assign.h
│ │ │ │ │ ├── AssignEvaluator.h
│ │ │ │ │ ├── Assign_MKL.h
│ │ │ │ │ ├── BandMatrix.h
│ │ │ │ │ ├── Block.h
│ │ │ │ │ ├── BooleanRedux.h
│ │ │ │ │ ├── CommaInitializer.h
│ │ │ │ │ ├── ConditionEstimator.h
│ │ │ │ │ ├── CoreEvaluators.h
│ │ │ │ │ ├── CoreIterators.h
│ │ │ │ │ ├── CwiseBinaryOp.h
│ │ │ │ │ ├── CwiseNullaryOp.h
│ │ │ │ │ ├── CwiseTernaryOp.h
│ │ │ │ │ ├── CwiseUnaryOp.h
│ │ │ │ │ ├── CwiseUnaryView.h
│ │ │ │ │ ├── DenseBase.h
│ │ │ │ │ ├── DenseCoeffsBase.h
│ │ │ │ │ ├── DenseStorage.h
│ │ │ │ │ ├── Diagonal.h
│ │ │ │ │ ├── DiagonalMatrix.h
│ │ │ │ │ ├── DiagonalProduct.h
│ │ │ │ │ ├── Dot.h
│ │ │ │ │ ├── EigenBase.h
│ │ │ │ │ ├── ForceAlignedAccess.h
│ │ │ │ │ ├── Fuzzy.h
│ │ │ │ │ ├── GeneralProduct.h
│ │ │ │ │ ├── GenericPacketMath.h
│ │ │ │ │ ├── GlobalFunctions.h
│ │ │ │ │ ├── IO.h
│ │ │ │ │ ├── IndexedView.h
│ │ │ │ │ ├── Inverse.h
│ │ │ │ │ ├── Map.h
│ │ │ │ │ ├── MapBase.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ ├── MathFunctionsImpl.h
│ │ │ │ │ ├── Matrix.h
│ │ │ │ │ ├── MatrixBase.h
│ │ │ │ │ ├── NestByValue.h
│ │ │ │ │ ├── NoAlias.h
│ │ │ │ │ ├── NumTraits.h
│ │ │ │ │ ├── PermutationMatrix.h
│ │ │ │ │ ├── PlainObjectBase.h
│ │ │ │ │ ├── Product.h
│ │ │ │ │ ├── ProductEvaluators.h
│ │ │ │ │ ├── Random.h
│ │ │ │ │ ├── Redux.h
│ │ │ │ │ ├── Ref.h
│ │ │ │ │ ├── Replicate.h
│ │ │ │ │ ├── ReturnByValue.h
│ │ │ │ │ ├── Reverse.h
│ │ │ │ │ ├── Select.h
│ │ │ │ │ ├── SelfAdjointView.h
│ │ │ │ │ ├── SelfCwiseBinaryOp.h
│ │ │ │ │ ├── Solve.h
│ │ │ │ │ ├── SolveTriangular.h
│ │ │ │ │ ├── SolverBase.h
│ │ │ │ │ ├── StableNorm.h
│ │ │ │ │ ├── Stride.h
│ │ │ │ │ ├── Swap.h
│ │ │ │ │ ├── Transpose.h
│ │ │ │ │ ├── Transpositions.h
│ │ │ │ │ ├── TriangularMatrix.h
│ │ │ │ │ ├── VectorBlock.h
│ │ │ │ │ ├── VectorwiseOp.h
│ │ │ │ │ ├── Visitor.h
│ │ │ │ │ ├── arch/
│ │ │ │ │ │ ├── AVX/
│ │ │ │ │ │ │ ├── Complex.h
│ │ │ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ │ │ ├── PacketMath.h
│ │ │ │ │ │ │ └── TypeCasting.h
│ │ │ │ │ │ ├── AVX512/
│ │ │ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ │ │ └── PacketMath.h
│ │ │ │ │ │ ├── AltiVec/
│ │ │ │ │ │ │ ├── Complex.h
│ │ │ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ │ │ └── PacketMath.h
│ │ │ │ │ │ ├── CUDA/
│ │ │ │ │ │ │ ├── Complex.h
│ │ │ │ │ │ │ ├── Half.h
│ │ │ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ │ │ ├── PacketMath.h
│ │ │ │ │ │ │ ├── PacketMathHalf.h
│ │ │ │ │ │ │ └── TypeCasting.h
│ │ │ │ │ │ ├── Default/
│ │ │ │ │ │ │ └── Settings.h
│ │ │ │ │ │ ├── NEON/
│ │ │ │ │ │ │ ├── Complex.h
│ │ │ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ │ │ └── PacketMath.h
│ │ │ │ │ │ ├── SSE/
│ │ │ │ │ │ │ ├── Complex.h
│ │ │ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ │ │ ├── PacketMath.h
│ │ │ │ │ │ │ └── TypeCasting.h
│ │ │ │ │ │ └── ZVector/
│ │ │ │ │ │ ├── Complex.h
│ │ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ │ └── PacketMath.h
│ │ │ │ │ ├── functors/
│ │ │ │ │ │ ├── AssignmentFunctors.h
│ │ │ │ │ │ ├── BinaryFunctors.h
│ │ │ │ │ │ ├── NullaryFunctors.h
│ │ │ │ │ │ ├── StlFunctors.h
│ │ │ │ │ │ ├── TernaryFunctors.h
│ │ │ │ │ │ └── UnaryFunctors.h
│ │ │ │ │ ├── products/
│ │ │ │ │ │ ├── GeneralBlockPanelKernel.h
│ │ │ │ │ │ ├── GeneralMatrixMatrix.h
│ │ │ │ │ │ ├── GeneralMatrixMatrixTriangular.h
│ │ │ │ │ │ ├── GeneralMatrixMatrixTriangular_BLAS.h
│ │ │ │ │ │ ├── GeneralMatrixMatrix_BLAS.h
│ │ │ │ │ │ ├── GeneralMatrixVector.h
│ │ │ │ │ │ ├── GeneralMatrixVector_BLAS.h
│ │ │ │ │ │ ├── Parallelizer.h
│ │ │ │ │ │ ├── SelfadjointMatrixMatrix.h
│ │ │ │ │ │ ├── SelfadjointMatrixMatrix_BLAS.h
│ │ │ │ │ │ ├── SelfadjointMatrixVector.h
│ │ │ │ │ │ ├── SelfadjointMatrixVector_BLAS.h
│ │ │ │ │ │ ├── SelfadjointProduct.h
│ │ │ │ │ │ ├── SelfadjointRank2Update.h
│ │ │ │ │ │ ├── TriangularMatrixMatrix.h
│ │ │ │ │ │ ├── TriangularMatrixMatrix_BLAS.h
│ │ │ │ │ │ ├── TriangularMatrixVector.h
│ │ │ │ │ │ ├── TriangularMatrixVector_BLAS.h
│ │ │ │ │ │ ├── TriangularSolverMatrix.h
│ │ │ │ │ │ ├── TriangularSolverMatrix_BLAS.h
│ │ │ │ │ │ └── TriangularSolverVector.h
│ │ │ │ │ └── util/
│ │ │ │ │ ├── BlasUtil.h
│ │ │ │ │ ├── Constants.h
│ │ │ │ │ ├── DisableStupidWarnings.h
│ │ │ │ │ ├── ForwardDeclarations.h
│ │ │ │ │ ├── IndexedViewHelper.h
│ │ │ │ │ ├── IntegralConstant.h
│ │ │ │ │ ├── MKL_support.h
│ │ │ │ │ ├── Macros.h
│ │ │ │ │ ├── Memory.h
│ │ │ │ │ ├── Meta.h
│ │ │ │ │ ├── NonMPL2.h
│ │ │ │ │ ├── ReenableStupidWarnings.h
│ │ │ │ │ ├── StaticAssert.h
│ │ │ │ │ ├── SymbolicIndex.h
│ │ │ │ │ └── XprHelper.h
│ │ │ │ ├── Eigenvalues/
│ │ │ │ │ ├── ComplexEigenSolver.h
│ │ │ │ │ ├── ComplexSchur.h
│ │ │ │ │ ├── ComplexSchur_LAPACKE.h
│ │ │ │ │ ├── EigenSolver.h
│ │ │ │ │ ├── GeneralizedEigenSolver.h
│ │ │ │ │ ├── GeneralizedSelfAdjointEigenSolver.h
│ │ │ │ │ ├── HessenbergDecomposition.h
│ │ │ │ │ ├── MatrixBaseEigenvalues.h
│ │ │ │ │ ├── RealQZ.h
│ │ │ │ │ ├── RealSchur.h
│ │ │ │ │ ├── RealSchur_LAPACKE.h
│ │ │ │ │ ├── SelfAdjointEigenSolver.h
│ │ │ │ │ ├── SelfAdjointEigenSolver_LAPACKE.h
│ │ │ │ │ └── Tridiagonalization.h
│ │ │ │ ├── Geometry/
│ │ │ │ │ ├── AlignedBox.h
│ │ │ │ │ ├── AngleAxis.h
│ │ │ │ │ ├── EulerAngles.h
│ │ │ │ │ ├── Homogeneous.h
│ │ │ │ │ ├── Hyperplane.h
│ │ │ │ │ ├── OrthoMethods.h
│ │ │ │ │ ├── ParametrizedLine.h
│ │ │ │ │ ├── Quaternion.h
│ │ │ │ │ ├── Rotation2D.h
│ │ │ │ │ ├── RotationBase.h
│ │ │ │ │ ├── Scaling.h
│ │ │ │ │ ├── Transform.h
│ │ │ │ │ ├── Translation.h
│ │ │ │ │ ├── Umeyama.h
│ │ │ │ │ └── arch/
│ │ │ │ │ └── Geometry_SSE.h
│ │ │ │ ├── Householder/
│ │ │ │ │ ├── BlockHouseholder.h
│ │ │ │ │ ├── Householder.h
│ │ │ │ │ └── HouseholderSequence.h
│ │ │ │ ├── IterativeLinearSolvers/
│ │ │ │ │ ├── BasicPreconditioners.h
│ │ │ │ │ ├── BiCGSTAB.h
│ │ │ │ │ ├── ConjugateGradient.h
│ │ │ │ │ ├── IncompleteCholesky.h
│ │ │ │ │ ├── IncompleteLUT.h
│ │ │ │ │ ├── IterativeSolverBase.h
│ │ │ │ │ ├── LeastSquareConjugateGradient.h
│ │ │ │ │ └── SolveWithGuess.h
│ │ │ │ ├── Jacobi/
│ │ │ │ │ └── Jacobi.h
│ │ │ │ ├── LU/
│ │ │ │ │ ├── Determinant.h
│ │ │ │ │ ├── FullPivLU.h
│ │ │ │ │ ├── InverseImpl.h
│ │ │ │ │ ├── PartialPivLU.h
│ │ │ │ │ ├── PartialPivLU_LAPACKE.h
│ │ │ │ │ └── arch/
│ │ │ │ │ └── Inverse_SSE.h
│ │ │ │ ├── MetisSupport/
│ │ │ │ │ └── MetisSupport.h
│ │ │ │ ├── OrderingMethods/
│ │ │ │ │ ├── Amd.h
│ │ │ │ │ ├── Eigen_Colamd.h
│ │ │ │ │ └── Ordering.h
│ │ │ │ ├── PaStiXSupport/
│ │ │ │ │ └── PaStiXSupport.h
│ │ │ │ ├── PardisoSupport/
│ │ │ │ │ └── PardisoSupport.h
│ │ │ │ ├── QR/
│ │ │ │ │ ├── ColPivHouseholderQR.h
│ │ │ │ │ ├── ColPivHouseholderQR_LAPACKE.h
│ │ │ │ │ ├── CompleteOrthogonalDecomposition.h
│ │ │ │ │ ├── FullPivHouseholderQR.h
│ │ │ │ │ ├── HouseholderQR.h
│ │ │ │ │ └── HouseholderQR_LAPACKE.h
│ │ │ │ ├── SPQRSupport/
│ │ │ │ │ └── SuiteSparseQRSupport.h
│ │ │ │ ├── SVD/
│ │ │ │ │ ├── BDCSVD.h
│ │ │ │ │ ├── JacobiSVD.h
│ │ │ │ │ ├── JacobiSVD_LAPACKE.h
│ │ │ │ │ ├── SVDBase.h
│ │ │ │ │ └── UpperBidiagonalization.h
│ │ │ │ ├── SparseCholesky/
│ │ │ │ │ ├── SimplicialCholesky.h
│ │ │ │ │ └── SimplicialCholesky_impl.h
│ │ │ │ ├── SparseCore/
│ │ │ │ │ ├── AmbiVector.h
│ │ │ │ │ ├── CompressedStorage.h
│ │ │ │ │ ├── ConservativeSparseSparseProduct.h
│ │ │ │ │ ├── MappedSparseMatrix.h
│ │ │ │ │ ├── SparseAssign.h
│ │ │ │ │ ├── SparseBlock.h
│ │ │ │ │ ├── SparseColEtree.h
│ │ │ │ │ ├── SparseCompressedBase.h
│ │ │ │ │ ├── SparseCwiseBinaryOp.h
│ │ │ │ │ ├── SparseCwiseUnaryOp.h
│ │ │ │ │ ├── SparseDenseProduct.h
│ │ │ │ │ ├── SparseDiagonalProduct.h
│ │ │ │ │ ├── SparseDot.h
│ │ │ │ │ ├── SparseFuzzy.h
│ │ │ │ │ ├── SparseMap.h
│ │ │ │ │ ├── SparseMatrix.h
│ │ │ │ │ ├── SparseMatrixBase.h
│ │ │ │ │ ├── SparsePermutation.h
│ │ │ │ │ ├── SparseProduct.h
│ │ │ │ │ ├── SparseRedux.h
│ │ │ │ │ ├── SparseRef.h
│ │ │ │ │ ├── SparseSelfAdjointView.h
│ │ │ │ │ ├── SparseSolverBase.h
│ │ │ │ │ ├── SparseSparseProductWithPruning.h
│ │ │ │ │ ├── SparseTranspose.h
│ │ │ │ │ ├── SparseTriangularView.h
│ │ │ │ │ ├── SparseUtil.h
│ │ │ │ │ ├── SparseVector.h
│ │ │ │ │ ├── SparseView.h
│ │ │ │ │ └── TriangularSolver.h
│ │ │ │ ├── SparseLU/
│ │ │ │ │ ├── SparseLU.h
│ │ │ │ │ ├── SparseLUImpl.h
│ │ │ │ │ ├── SparseLU_Memory.h
│ │ │ │ │ ├── SparseLU_Structs.h
│ │ │ │ │ ├── SparseLU_SupernodalMatrix.h
│ │ │ │ │ ├── SparseLU_Utils.h
│ │ │ │ │ ├── SparseLU_column_bmod.h
│ │ │ │ │ ├── SparseLU_column_dfs.h
│ │ │ │ │ ├── SparseLU_copy_to_ucol.h
│ │ │ │ │ ├── SparseLU_gemm_kernel.h
│ │ │ │ │ ├── SparseLU_heap_relax_snode.h
│ │ │ │ │ ├── SparseLU_kernel_bmod.h
│ │ │ │ │ ├── SparseLU_panel_bmod.h
│ │ │ │ │ ├── SparseLU_panel_dfs.h
│ │ │ │ │ ├── SparseLU_pivotL.h
│ │ │ │ │ ├── SparseLU_pruneL.h
│ │ │ │ │ └── SparseLU_relax_snode.h
│ │ │ │ ├── SparseQR/
│ │ │ │ │ └── SparseQR.h
│ │ │ │ ├── StlSupport/
│ │ │ │ │ ├── StdDeque.h
│ │ │ │ │ ├── StdList.h
│ │ │ │ │ ├── StdVector.h
│ │ │ │ │ └── details.h
│ │ │ │ ├── SuperLUSupport/
│ │ │ │ │ └── SuperLUSupport.h
│ │ │ │ ├── UmfPackSupport/
│ │ │ │ │ └── UmfPackSupport.h
│ │ │ │ ├── misc/
│ │ │ │ │ ├── Image.h
│ │ │ │ │ ├── Kernel.h
│ │ │ │ │ ├── RealSvd2x2.h
│ │ │ │ │ ├── blas.h
│ │ │ │ │ ├── lapack.h
│ │ │ │ │ ├── lapacke.h
│ │ │ │ │ └── lapacke_mangling.h
│ │ │ │ └── plugins/
│ │ │ │ ├── ArrayCwiseBinaryOps.h
│ │ │ │ ├── ArrayCwiseUnaryOps.h
│ │ │ │ ├── BlockMethods.h
│ │ │ │ ├── CommonCwiseBinaryOps.h
│ │ │ │ ├── CommonCwiseUnaryOps.h
│ │ │ │ ├── IndexedViewMethods.h
│ │ │ │ ├── MatrixCwiseBinaryOps.h
│ │ │ │ └── MatrixCwiseUnaryOps.h
│ │ │ ├── caffe2/
│ │ │ │ ├── contrib/
│ │ │ │ │ ├── aten/
│ │ │ │ │ │ └── aten_op_template.h
│ │ │ │ │ ├── gloo/
│ │ │ │ │ │ ├── allreduce_ops.h
│ │ │ │ │ │ ├── barrier_ops.h
│ │ │ │ │ │ ├── broadcast_ops.h
│ │ │ │ │ │ ├── common.h
│ │ │ │ │ │ ├── common_world_ops.h
│ │ │ │ │ │ ├── context.h
│ │ │ │ │ │ └── store_handler.h
│ │ │ │ │ ├── nccl/
│ │ │ │ │ │ └── cuda_nccl_gpu.h
│ │ │ │ │ ├── nervana/
│ │ │ │ │ │ ├── nervana.h
│ │ │ │ │ │ └── nervana_c_api.h
│ │ │ │ │ ├── observers/
│ │ │ │ │ │ └── time_observer.h
│ │ │ │ │ ├── prof/
│ │ │ │ │ │ ├── htrace_conf.h
│ │ │ │ │ │ ├── prof_dag_net.h
│ │ │ │ │ │ └── prof_dag_stats_op.h
│ │ │ │ │ ├── shm_mutex/
│ │ │ │ │ │ └── shm_mutex.h
│ │ │ │ │ ├── torch/
│ │ │ │ │ │ └── torch_op.h
│ │ │ │ │ └── warpctc/
│ │ │ │ │ └── ctc_op.h
│ │ │ │ ├── core/
│ │ │ │ │ ├── allocator.h
│ │ │ │ │ ├── asan.h
│ │ │ │ │ ├── blob.h
│ │ │ │ │ ├── blob_serialization.h
│ │ │ │ │ ├── blob_serializer_base.h
│ │ │ │ │ ├── blob_stats.h
│ │ │ │ │ ├── common.h
│ │ │ │ │ ├── common_cudnn.h
│ │ │ │ │ ├── common_gpu.h
│ │ │ │ │ ├── common_omp.h
│ │ │ │ │ ├── context.h
│ │ │ │ │ ├── context_gpu.h
│ │ │ │ │ ├── db.h
│ │ │ │ │ ├── event.h
│ │ │ │ │ ├── flags.h
│ │ │ │ │ ├── graph.h
│ │ │ │ │ ├── init.h
│ │ │ │ │ ├── logging.h
│ │ │ │ │ ├── logging_is_google_glog.h
│ │ │ │ │ ├── logging_is_not_google_glog.h
│ │ │ │ │ ├── macros.h
│ │ │ │ │ ├── memonger.h
│ │ │ │ │ ├── net.h
│ │ │ │ │ ├── net_async_dag_gpu.h
│ │ │ │ │ ├── net_dag.h
│ │ │ │ │ ├── net_simple.h
│ │ │ │ │ ├── net_simple_async.h
│ │ │ │ │ ├── observer.h
│ │ │ │ │ ├── operator.h
│ │ │ │ │ ├── operator_gradient.h
│ │ │ │ │ ├── operator_schema.h
│ │ │ │ │ ├── plan_executor.h
│ │ │ │ │ ├── predictor.h
│ │ │ │ │ ├── qtensor.h
│ │ │ │ │ ├── qtensor_serialization.h
│ │ │ │ │ ├── registry.h
│ │ │ │ │ ├── scope_guard.h
│ │ │ │ │ ├── static_tracepoint.h
│ │ │ │ │ ├── static_tracepoint_elfx86.h
│ │ │ │ │ ├── stats.h
│ │ │ │ │ ├── tensor.h
│ │ │ │ │ ├── timer.h
│ │ │ │ │ ├── transform.h
│ │ │ │ │ ├── typeid.h
│ │ │ │ │ ├── types.h
│ │ │ │ │ └── workspace.h
│ │ │ │ ├── cuda_rtc/
│ │ │ │ │ └── common_rtc.h
│ │ │ │ ├── db/
│ │ │ │ │ └── create_db_op.h
│ │ │ │ ├── distributed/
│ │ │ │ │ ├── file_store_handler.h
│ │ │ │ │ ├── file_store_handler_op.h
│ │ │ │ │ ├── redis_store_handler.h
│ │ │ │ │ ├── redis_store_handler_op.h
│ │ │ │ │ ├── store_handler.h
│ │ │ │ │ └── store_ops.h
│ │ │ │ ├── experiments/
│ │ │ │ │ └── operators/
│ │ │ │ │ ├── fully_connected_op_decomposition.h
│ │ │ │ │ ├── fully_connected_op_prune.h
│ │ │ │ │ ├── fully_connected_op_sparse.h
│ │ │ │ │ ├── funhash_op.h
│ │ │ │ │ ├── sparse_funhash_op.h
│ │ │ │ │ ├── sparse_matrix_reshape_op.h
│ │ │ │ │ ├── tt_contraction_op.h
│ │ │ │ │ └── tt_pad_op.h
│ │ │ │ ├── image/
│ │ │ │ │ ├── image_input_op.h
│ │ │ │ │ └── transform_gpu.h
│ │ │ │ ├── mkl/
│ │ │ │ │ ├── mkl_utils.h
│ │ │ │ │ ├── operators/
│ │ │ │ │ │ └── operator_fallback_mkl.h
│ │ │ │ │ └── utils/
│ │ │ │ │ ├── mkl_context.h
│ │ │ │ │ ├── mkl_dnn_cppwrapper.h
│ │ │ │ │ ├── mkl_memory.h
│ │ │ │ │ ├── mkl_operator.h
│ │ │ │ │ ├── mkl_version_check.h
│ │ │ │ │ └── sgemm_pack.h
│ │ │ │ ├── mobile/
│ │ │ │ │ └── contrib/
│ │ │ │ │ ├── ios/
│ │ │ │ │ │ ├── ios_caffe.h
│ │ │ │ │ │ ├── ios_caffe_defines.h
│ │ │ │ │ │ ├── ios_caffe_predictor.h
│ │ │ │ │ │ └── mpscnn/
│ │ │ │ │ │ ├── mpscnn.h
│ │ │ │ │ │ ├── mpscnn_context.h
│ │ │ │ │ │ ├── mpscnn_graph_mask.h
│ │ │ │ │ │ ├── mpscnn_kernels.h
│ │ │ │ │ │ └── mpscnn_test.h
│ │ │ │ │ ├── libopencl-stub/
│ │ │ │ │ │ └── include/
│ │ │ │ │ │ ├── CL/
│ │ │ │ │ │ │ ├── cl.h
│ │ │ │ │ │ │ ├── cl_ext.h
│ │ │ │ │ │ │ ├── cl_gl.h
│ │ │ │ │ │ │ ├── cl_gl_ext.h
│ │ │ │ │ │ │ ├── cl_platform.h
│ │ │ │ │ │ │ └── opencl.h
│ │ │ │ │ │ └── libopencl.h
│ │ │ │ │ ├── opengl/
│ │ │ │ │ │ ├── android/
│ │ │ │ │ │ │ ├── AndroidGLContext.h
│ │ │ │ │ │ │ ├── arm_neon_support.h
│ │ │ │ │ │ │ └── gl3stub.h
│ │ │ │ │ │ ├── core/
│ │ │ │ │ │ │ ├── DataTransfer.h
│ │ │ │ │ │ │ ├── GL.h
│ │ │ │ │ │ │ ├── GLContext.h
│ │ │ │ │ │ │ ├── GLFilter.h
│ │ │ │ │ │ │ ├── GLImage.h
│ │ │ │ │ │ │ ├── GLImageAllocator.h
│ │ │ │ │ │ │ ├── GLLogging.h
│ │ │ │ │ │ │ ├── GLPBO.h
│ │ │ │ │ │ │ ├── GLPlainTexture.h
│ │ │ │ │ │ │ ├── GLPredictor.h
│ │ │ │ │ │ │ ├── GLTexture.h
│ │ │ │ │ │ │ ├── ImageAllocator.h
│ │ │ │ │ │ │ ├── arm_neon_support.h
│ │ │ │ │ │ │ └── rewrite_net.h
│ │ │ │ │ │ ├── ios/
│ │ │ │ │ │ │ ├── IOSGLContext.h
│ │ │ │ │ │ │ ├── IOSGLImageAllocator.h
│ │ │ │ │ │ │ └── IOSGLTexture.h
│ │ │ │ │ │ ├── operators/
│ │ │ │ │ │ │ └── gl_tiling_utils.h
│ │ │ │ │ │ └── test/
│ │ │ │ │ │ ├── TestGLConvolution.h
│ │ │ │ │ │ └── opengl_test.h
│ │ │ │ │ ├── snpe/
│ │ │ │ │ │ └── snpe_ffi.h
│ │ │ │ │ └── ulp2/
│ │ │ │ │ ├── ulp.h
│ │ │ │ │ └── ulp_neon.h
│ │ │ │ ├── mpi/
│ │ │ │ │ ├── mpi_common.h
│ │ │ │ │ └── mpi_ops.h
│ │ │ │ ├── operators/
│ │ │ │ │ ├── accumulate_op.h
│ │ │ │ │ ├── accuracy_op.h
│ │ │ │ │ ├── apmeter_op.h
│ │ │ │ │ ├── batch_box_cox_op.h
│ │ │ │ │ ├── batch_gather_ops.h
│ │ │ │ │ ├── batch_matmul_op.h
│ │ │ │ │ ├── boolean_mask_ops.h
│ │ │ │ │ ├── boolean_unmask_ops.h
│ │ │ │ │ ├── cast_op.h
│ │ │ │ │ ├── channel_shuffle_op.h
│ │ │ │ │ ├── clip_op.h
│ │ │ │ │ ├── concat_split_op.h
│ │ │ │ │ ├── conditional_op.h
│ │ │ │ │ ├── conv_op.h
│ │ │ │ │ ├── conv_op_cache_cudnn.h
│ │ │ │ │ ├── conv_op_impl.h
│ │ │ │ │ ├── conv_op_shared.h
│ │ │ │ │ ├── conv_pool_op_base.h
│ │ │ │ │ ├── conv_transpose_op.h
│ │ │ │ │ ├── conv_transpose_op_impl.h
│ │ │ │ │ ├── conv_transpose_op_mobile.h
│ │ │ │ │ ├── conv_transpose_op_mobile_impl.h
│ │ │ │ │ ├── conv_transpose_unpool_op_base.h
│ │ │ │ │ ├── cosine_embedding_criterion_op.h
│ │ │ │ │ ├── counter_ops.h
│ │ │ │ │ ├── create_scope_op.h
│ │ │ │ │ ├── cross_entropy_op.h
│ │ │ │ │ ├── dataset_ops.h
│ │ │ │ │ ├── distance_op.h
│ │ │ │ │ ├── do_op.h
│ │ │ │ │ ├── dropout_op.h
│ │ │ │ │ ├── elementwise_linear_op.h
│ │ │ │ │ ├── elementwise_logical_ops.h
│ │ │ │ │ ├── elementwise_op.h
│ │ │ │ │ ├── elementwise_op_test.h
│ │ │ │ │ ├── elu_op.h
│ │ │ │ │ ├── feed_blob_op.h
│ │ │ │ │ ├── filler_op.h
│ │ │ │ │ ├── find_duplicate_elements_op.h
│ │ │ │ │ ├── find_op.h
│ │ │ │ │ ├── free_op.h
│ │ │ │ │ ├── fully_connected_op.h
│ │ │ │ │ ├── given_tensor_fill_op.h
│ │ │ │ │ ├── gru_unit_op.h
│ │ │ │ │ ├── h_softmax_op.h
│ │ │ │ │ ├── half_float_ops.h
│ │ │ │ │ ├── if_op.h
│ │ │ │ │ ├── im2col_op.h
│ │ │ │ │ ├── index_hash_ops.h
│ │ │ │ │ ├── instance_norm_op.h
│ │ │ │ │ ├── layer_norm_op.h
│ │ │ │ │ ├── leaky_relu_op.h
│ │ │ │ │ ├── lengths_reducer_ops.h
│ │ │ │ │ ├── lengths_reducer_rowwise_8bit_ops.h
│ │ │ │ │ ├── lengths_tile_op.h
│ │ │ │ │ ├── lengths_top_k_op.h
│ │ │ │ │ ├── load_save_op.h
│ │ │ │ │ ├── local_response_normalization_op.h
│ │ │ │ │ ├── loss_op.h
│ │ │ │ │ ├── lpnorm_op.h
│ │ │ │ │ ├── lstm_unit_op.h
│ │ │ │ │ ├── map_ops.h
│ │ │ │ │ ├── margin_ranking_criterion_op.h
│ │ │ │ │ ├── math_ops.h
│ │ │ │ │ ├── matmul_op.h
│ │ │ │ │ ├── max_pool_with_index.h
│ │ │ │ │ ├── merge_id_lists_op.h
│ │ │ │ │ ├── multi_class_accuracy_op.h
│ │ │ │ │ ├── no_default_engine_op.h
│ │ │ │ │ ├── normalize_op.h
│ │ │ │ │ ├── one_hot_ops.h
│ │ │ │ │ ├── operator_fallback_gpu.h
│ │ │ │ │ ├── order_switch_ops.h
│ │ │ │ │ ├── pack_rnn_sequence_op.h
│ │ │ │ │ ├── pack_segments.h
│ │ │ │ │ ├── pad_op.h
│ │ │ │ │ ├── partition_ops.h
│ │ │ │ │ ├── perplexity_op.h
│ │ │ │ │ ├── piecewise_linear_transform_op.h
│ │ │ │ │ ├── pool_op.h
│ │ │ │ │ ├── prefetch_op.h
│ │ │ │ │ ├── prelu_op.h
│ │ │ │ │ ├── prepend_dim_op.h
│ │ │ │ │ ├── rank_loss_op.h
│ │ │ │ │ ├── recurrent_network_blob_fetcher_op.h
│ │ │ │ │ ├── recurrent_network_executor.h
│ │ │ │ │ ├── recurrent_network_executor_gpu.h
│ │ │ │ │ ├── recurrent_network_executor_incl.h
│ │ │ │ │ ├── recurrent_network_op.h
│ │ │ │ │ ├── recurrent_op_cudnn.h
│ │ │ │ │ ├── reducer_functors.h
│ │ │ │ │ ├── reduction_front_back_ops.h
│ │ │ │ │ ├── reduction_ops.h
│ │ │ │ │ ├── relu_op.h
│ │ │ │ │ ├── remove_data_blocks_op.h
│ │ │ │ │ ├── replace_nan_op.h
│ │ │ │ │ ├── reshape_op.h
│ │ │ │ │ ├── resize_op.h
│ │ │ │ │ ├── reverse_packed_segs_op.h
│ │ │ │ │ ├── rmac_regions_op.h
│ │ │ │ │ ├── roi_pool_op.h
│ │ │ │ │ ├── rowmul_op.h
│ │ │ │ │ ├── scale_op.h
│ │ │ │ │ ├── segment_reduction_op.h
│ │ │ │ │ ├── sequence_ops.h
│ │ │ │ │ ├── shape_op.h
│ │ │ │ │ ├── sinusoid_position_encoding_op.h
│ │ │ │ │ ├── slice_op.h
│ │ │ │ │ ├── softmax_op.h
│ │ │ │ │ ├── softmax_shared.h
│ │ │ │ │ ├── softmax_with_loss_op.h
│ │ │ │ │ ├── softplus_op.h
│ │ │ │ │ ├── space_batch_op.h
│ │ │ │ │ ├── sparse_to_dense_mask_op.h
│ │ │ │ │ ├── sparse_to_dense_op.h
│ │ │ │ │ ├── spatial_batch_norm_op.h
│ │ │ │ │ ├── spatial_softmax_with_loss_op.h
│ │ │ │ │ ├── square_root_divide_op.h
│ │ │ │ │ ├── stop_gradient.h
│ │ │ │ │ ├── string_ops.h
│ │ │ │ │ ├── summarize_op.h
│ │ │ │ │ ├── tensor_protos_db_input.h
│ │ │ │ │ ├── text_file_reader_utils.h
│ │ │ │ │ ├── tile_op.h
│ │ │ │ │ ├── top_k.h
│ │ │ │ │ ├── transpose_op.h
│ │ │ │ │ ├── tt_linear_op.h
│ │ │ │ │ ├── utility_ops.h
│ │ │ │ │ ├── while_op.h
│ │ │ │ │ └── zero_gradient_op.h
│ │ │ │ ├── perfkernels/
│ │ │ │ │ ├── common.h
│ │ │ │ │ ├── cvtsh_ss_bugfix.h
│ │ │ │ │ ├── embedding_lookup.h
│ │ │ │ │ └── typed_axpy.h
│ │ │ │ ├── proto/
│ │ │ │ │ ├── caffe2.pb.h
│ │ │ │ │ ├── caffe2_legacy.pb.h
│ │ │ │ │ ├── hsm.pb.h
│ │ │ │ │ ├── metanet.pb.h
│ │ │ │ │ ├── predictor_consts.pb.h
│ │ │ │ │ └── prof_dag.pb.h
│ │ │ │ ├── python/
│ │ │ │ │ └── pybind_state.h
│ │ │ │ ├── queue/
│ │ │ │ │ ├── blobs_queue.h
│ │ │ │ │ ├── blobs_queue_db.h
│ │ │ │ │ ├── queue_ops.h
│ │ │ │ │ ├── rebatching_queue.h
│ │ │ │ │ └── rebatching_queue_ops.h
│ │ │ │ ├── sgd/
│ │ │ │ │ ├── adagrad_op.h
│ │ │ │ │ ├── adam_op.h
│ │ │ │ │ ├── ftrl_op.h
│ │ │ │ │ ├── iter_op.h
│ │ │ │ │ ├── learning_rate_functors.h
│ │ │ │ │ ├── learning_rate_op.h
│ │ │ │ │ ├── momentum_sgd_op.h
│ │ │ │ │ ├── rmsprop_op.h
│ │ │ │ │ └── yellowfin_op.h
│ │ │ │ ├── transforms/
│ │ │ │ │ ├── common_subexpression_elimination.h
│ │ │ │ │ ├── conv_to_nnpack_transform.h
│ │ │ │ │ ├── pattern_net_transform.h
│ │ │ │ │ └── single_op_transform.h
│ │ │ │ ├── utils/
│ │ │ │ │ ├── cast.h
│ │ │ │ │ ├── cblas.h
│ │ │ │ │ ├── conversions.h
│ │ │ │ │ ├── cpu_neon.h
│ │ │ │ │ ├── cpuid.h
│ │ │ │ │ ├── fixed_divisor.h
│ │ │ │ │ ├── math-detail.h
│ │ │ │ │ ├── math.h
│ │ │ │ │ ├── murmur_hash3.h
│ │ │ │ │ ├── proto_utils.h
│ │ │ │ │ ├── signal_handler.h
│ │ │ │ │ ├── simple_queue.h
│ │ │ │ │ ├── smart_tensor_printer.h
│ │ │ │ │ ├── string_utils.h
│ │ │ │ │ ├── thread_pool.h
│ │ │ │ │ ├── threadpool/
│ │ │ │ │ │ ├── ThreadPool.h
│ │ │ │ │ │ ├── ThreadPoolCommon.h
│ │ │ │ │ │ ├── WorkersPool.h
│ │ │ │ │ │ ├── pthreadpool.h
│ │ │ │ │ │ └── pthreadpool_impl.h
│ │ │ │ │ └── zmq_helper.h
│ │ │ │ └── video/
│ │ │ │ ├── video_decoder.h
│ │ │ │ ├── video_input_op.h
│ │ │ │ └── video_io.h
│ │ │ ├── classes.h
│ │ │ ├── google/
│ │ │ │ └── protobuf/
│ │ │ │ ├── any.h
│ │ │ │ ├── any.pb.h
│ │ │ │ ├── any.proto
│ │ │ │ ├── api.pb.h
│ │ │ │ ├── api.proto
│ │ │ │ ├── arena.h
│ │ │ │ ├── arenastring.h
│ │ │ │ ├── compiler/
│ │ │ │ │ ├── code_generator.h
│ │ │ │ │ ├── command_line_interface.h
│ │ │ │ │ ├── cpp/
│ │ │ │ │ │ └── cpp_generator.h
│ │ │ │ │ ├── csharp/
│ │ │ │ │ │ ├── csharp_generator.h
│ │ │ │ │ │ └── csharp_names.h
│ │ │ │ │ ├── importer.h
│ │ │ │ │ ├── java/
│ │ │ │ │ │ ├── java_generator.h
│ │ │ │ │ │ └── java_names.h
│ │ │ │ │ ├── javanano/
│ │ │ │ │ │ └── javanano_generator.h
│ │ │ │ │ ├── js/
│ │ │ │ │ │ └── js_generator.h
│ │ │ │ │ ├── objectivec/
│ │ │ │ │ │ ├── objectivec_generator.h
│ │ │ │ │ │ └── objectivec_helpers.h
│ │ │ │ │ ├── parser.h
│ │ │ │ │ ├── php/
│ │ │ │ │ │ └── php_generator.h
│ │ │ │ │ ├── plugin.h
│ │ │ │ │ ├── plugin.pb.h
│ │ │ │ │ ├── plugin.proto
│ │ │ │ │ ├── python/
│ │ │ │ │ │ └── python_generator.h
│ │ │ │ │ └── ruby/
│ │ │ │ │ └── ruby_generator.h
│ │ │ │ ├── descriptor.h
│ │ │ │ ├── descriptor.pb.h
│ │ │ │ ├── descriptor.proto
│ │ │ │ ├── descriptor_database.h
│ │ │ │ ├── duration.pb.h
│ │ │ │ ├── duration.proto
│ │ │ │ ├── dynamic_message.h
│ │ │ │ ├── empty.pb.h
│ │ │ │ ├── empty.proto
│ │ │ │ ├── extension_set.h
│ │ │ │ ├── field_mask.pb.h
│ │ │ │ ├── field_mask.proto
│ │ │ │ ├── generated_enum_reflection.h
│ │ │ │ ├── generated_enum_util.h
│ │ │ │ ├── generated_message_reflection.h
│ │ │ │ ├── generated_message_util.h
│ │ │ │ ├── has_bits.h
│ │ │ │ ├── io/
│ │ │ │ │ ├── coded_stream.h
│ │ │ │ │ ├── gzip_stream.h
│ │ │ │ │ ├── printer.h
│ │ │ │ │ ├── strtod.h
│ │ │ │ │ ├── tokenizer.h
│ │ │ │ │ ├── zero_copy_stream.h
│ │ │ │ │ ├── zero_copy_stream_impl.h
│ │ │ │ │ └── zero_copy_stream_impl_lite.h
│ │ │ │ ├── map.h
│ │ │ │ ├── map_entry.h
│ │ │ │ ├── map_entry_lite.h
│ │ │ │ ├── map_field.h
│ │ │ │ ├── map_field_inl.h
│ │ │ │ ├── map_field_lite.h
│ │ │ │ ├── map_type_handler.h
│ │ │ │ ├── message.h
│ │ │ │ ├── message_lite.h
│ │ │ │ ├── metadata.h
│ │ │ │ ├── reflection.h
│ │ │ │ ├── reflection_ops.h
│ │ │ │ ├── repeated_field.h
│ │ │ │ ├── service.h
│ │ │ │ ├── source_context.pb.h
│ │ │ │ ├── source_context.proto
│ │ │ │ ├── struct.pb.h
│ │ │ │ ├── struct.proto
│ │ │ │ ├── stubs/
│ │ │ │ │ ├── atomic_sequence_num.h
│ │ │ │ │ ├── atomicops.h
│ │ │ │ │ ├── atomicops_internals_arm64_gcc.h
│ │ │ │ │ ├── atomicops_internals_arm_gcc.h
│ │ │ │ │ ├── atomicops_internals_arm_qnx.h
│ │ │ │ │ ├── atomicops_internals_atomicword_compat.h
│ │ │ │ │ ├── atomicops_internals_generic_gcc.h
│ │ │ │ │ ├── atomicops_internals_macosx.h
│ │ │ │ │ ├── atomicops_internals_mips_gcc.h
│ │ │ │ │ ├── atomicops_internals_pnacl.h
│ │ │ │ │ ├── atomicops_internals_power.h
│ │ │ │ │ ├── atomicops_internals_ppc_gcc.h
│ │ │ │ │ ├── atomicops_internals_solaris.h
│ │ │ │ │ ├── atomicops_internals_tsan.h
│ │ │ │ │ ├── atomicops_internals_x86_gcc.h
│ │ │ │ │ ├── atomicops_internals_x86_msvc.h
│ │ │ │ │ ├── bytestream.h
│ │ │ │ │ ├── callback.h
│ │ │ │ │ ├── casts.h
│ │ │ │ │ ├── common.h
│ │ │ │ │ ├── fastmem.h
│ │ │ │ │ ├── hash.h
│ │ │ │ │ ├── logging.h
│ │ │ │ │ ├── macros.h
│ │ │ │ │ ├── mutex.h
│ │ │ │ │ ├── once.h
│ │ │ │ │ ├── platform_macros.h
│ │ │ │ │ ├── port.h
│ │ │ │ │ ├── scoped_ptr.h
│ │ │ │ │ ├── shared_ptr.h
│ │ │ │ │ ├── singleton.h
│ │ │ │ │ ├── status.h
│ │ │ │ │ ├── stl_util.h
│ │ │ │ │ ├── stringpiece.h
│ │ │ │ │ ├── template_util.h
│ │ │ │ │ └── type_traits.h
│ │ │ │ ├── text_format.h
│ │ │ │ ├── timestamp.pb.h
│ │ │ │ ├── timestamp.proto
│ │ │ │ ├── type.pb.h
│ │ │ │ ├── type.proto
│ │ │ │ ├── unknown_field_set.h
│ │ │ │ ├── util/
│ │ │ │ │ ├── field_comparator.h
│ │ │ │ │ ├── field_mask_util.h
│ │ │ │ │ ├── json_util.h
│ │ │ │ │ ├── message_differencer.h
│ │ │ │ │ ├── time_util.h
│ │ │ │ │ ├── type_resolver.h
│ │ │ │ │ └── type_resolver_util.h
│ │ │ │ ├── wire_format.h
│ │ │ │ ├── wire_format_lite.h
│ │ │ │ ├── wire_format_lite_inl.h
│ │ │ │ ├── wrappers.pb.h
│ │ │ │ └── wrappers.proto
│ │ │ └── native-lib.cpp
│ │ ├── java/
│ │ │ └── facebook/
│ │ │ └── f8demo/
│ │ │ └── ClassifyCamera.java
│ │ ├── jniLibs/
│ │ │ └── armeabi-v7a/
│ │ │ ├── libCAFFE2_NNPACK.a
│ │ │ ├── libCAFFE2_PTHREADPOOL.a
│ │ │ ├── libCaffe2_CPU.a
│ │ │ ├── libcpufeatures.a
│ │ │ ├── libprotobuf-lite.a
│ │ │ └── libprotobuf.a
│ │ └── res/
│ │ ├── drawable/
│ │ │ ├── ic_logo.xml
│ │ │ └── ic_thumb.xml
│ │ ├── layout/
│ │ │ └── activity_classify_camera.xml
│ │ └── values/
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test/
│ └── java/
│ └── facebook/
│ └── f8demo/
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.idea/modules.xml
.DS_Store
/build
/captures
.externalNativeBuild
.ipynb_checkpoints/
================================================
FILE: .idea/compiler.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>
================================================
FILE: .idea/copyright/profiles_settings.xml
================================================
<component name="CopyrightManager">
<settings default="" />
</component>
================================================
FILE: .idea/gradle.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
================================================
FILE: .idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
================================================
FILE: .idea/runConfigurations.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>
================================================
FILE: .idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
================================================
FILE: Exporting Squeezenet to mobile.ipynb
================================================
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In this tutorial we'll show how to export squeezenet which is implemented and trained in pytorch to run on mobile devices.\n",
"Before we start, you should have [pytorch](https://github.com/pytorch/pytorch), [caffe2](https://github.com/caffe2/caffe2), [onnx](https://github.com/onnx/onnx) and [onnx-caffe2](https://github.com/onnx/onnx-caffe2) installed in your environment and cloned [AICamera](https://github.com/bwasti/AICamera).\n",
"Please checkout their github page for installation instructions."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Some standard imports\n",
"import io\n",
"import numpy as np\n",
"import torch.onnx"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The following implementation of squeezenet is from [torchvision](https://github.com/pytorch/vision/blob/master/torchvision/models/squeezenet.py)."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import math\n",
"import torch\n",
"import torch.nn as nn\n",
"import torch.nn.init as init\n",
"import torch.utils.model_zoo as model_zoo\n",
"\n",
"\n",
"__all__ = ['SqueezeNet', 'squeezenet1_0', 'squeezenet1_1']\n",
"\n",
"\n",
"model_urls = {\n",
" 'squeezenet1_0': 'https://download.pytorch.org/models/squeezenet1_0-a815701f.pth',\n",
" 'squeezenet1_1': 'https://download.pytorch.org/models/squeezenet1_1-f364aa15.pth',\n",
"}\n",
"\n",
"\n",
"class Fire(nn.Module):\n",
"\n",
" def __init__(self, inplanes, squeeze_planes,\n",
" expand1x1_planes, expand3x3_planes):\n",
" super(Fire, self).__init__()\n",
" self.inplanes = inplanes\n",
" self.squeeze = nn.Conv2d(inplanes, squeeze_planes, kernel_size=1)\n",
" self.squeeze_activation = nn.ReLU(inplace=True)\n",
" self.expand1x1 = nn.Conv2d(squeeze_planes, expand1x1_planes,\n",
" kernel_size=1)\n",
" self.expand1x1_activation = nn.ReLU(inplace=True)\n",
" self.expand3x3 = nn.Conv2d(squeeze_planes, expand3x3_planes,\n",
" kernel_size=3, padding=1)\n",
" self.expand3x3_activation = nn.ReLU(inplace=True)\n",
"\n",
" def forward(self, x):\n",
" x = self.squeeze_activation(self.squeeze(x))\n",
" return torch.cat([\n",
" self.expand1x1_activation(self.expand1x1(x)),\n",
" self.expand3x3_activation(self.expand3x3(x))\n",
" ], 1)\n",
"\n",
"\n",
"class SqueezeNet(nn.Module):\n",
"\n",
" def __init__(self, version=1.0, num_classes=1000):\n",
" super(SqueezeNet, self).__init__()\n",
" if version not in [1.0, 1.1]:\n",
" raise ValueError(\"Unsupported SqueezeNet version {version}:\"\n",
" \"1.0 or 1.1 expected\".format(version=version))\n",
" self.num_classes = num_classes\n",
" if version == 1.0:\n",
" self.features = nn.Sequential(\n",
" nn.Conv2d(3, 96, kernel_size=7, stride=2),\n",
" nn.ReLU(inplace=True),\n",
" nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=False),\n",
" Fire(96, 16, 64, 64),\n",
" Fire(128, 16, 64, 64),\n",
" Fire(128, 32, 128, 128),\n",
" nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=False),\n",
" Fire(256, 32, 128, 128),\n",
" Fire(256, 48, 192, 192),\n",
" Fire(384, 48, 192, 192),\n",
" Fire(384, 64, 256, 256),\n",
" nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=False),\n",
" Fire(512, 64, 256, 256),\n",
" )\n",
" else:\n",
" self.features = nn.Sequential(\n",
" nn.Conv2d(3, 64, kernel_size=3, stride=2),\n",
" nn.ReLU(inplace=True),\n",
" nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=False),\n",
" Fire(64, 16, 64, 64),\n",
" Fire(128, 16, 64, 64),\n",
" nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=False),\n",
" Fire(128, 32, 128, 128),\n",
" Fire(256, 32, 128, 128),\n",
" nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=False),\n",
" Fire(256, 48, 192, 192),\n",
" Fire(384, 48, 192, 192),\n",
" Fire(384, 64, 256, 256),\n",
" Fire(512, 64, 256, 256),\n",
" )\n",
" # Final convolution is initialized differently form the rest\n",
" final_conv = nn.Conv2d(512, self.num_classes, kernel_size=1)\n",
" self.classifier = nn.Sequential(\n",
" nn.Dropout(p=0.5),\n",
" final_conv,\n",
" nn.ReLU(inplace=True),\n",
" nn.AvgPool2d(13)\n",
" )\n",
"\n",
" for m in self.modules():\n",
" if isinstance(m, nn.Conv2d):\n",
" if m is final_conv:\n",
" init.normal(m.weight.data, mean=0.0, std=0.01)\n",
" else:\n",
" init.kaiming_uniform(m.weight.data)\n",
" if m.bias is not None:\n",
" m.bias.data.zero_()\n",
"\n",
" def forward(self, x):\n",
" x = self.features(x)\n",
" x = self.classifier(x)\n",
" return x.view(x.size(0), self.num_classes)\n",
"\n",
"\n",
"def squeezenet1_0(pretrained=False, **kwargs):\n",
" r\"\"\"SqueezeNet model architecture from the `\"SqueezeNet: AlexNet-level\n",
" accuracy with 50x fewer parameters and <0.5MB model size\"\n",
" <https://arxiv.org/abs/1602.07360>`_ paper.\n",
" Args:\n",
" pretrained (bool): If True, returns a model pre-trained on ImageNet\n",
" \"\"\"\n",
" model = SqueezeNet(version=1.0, **kwargs)\n",
" if pretrained:\n",
" model.load_state_dict(model_zoo.load_url(model_urls['squeezenet1_0']))\n",
" return model\n",
"\n",
"\n",
"def squeezenet1_1(pretrained=False, **kwargs):\n",
" r\"\"\"SqueezeNet 1.1 model from the `official SqueezeNet repo\n",
" <https://github.com/DeepScale/SqueezeNet/tree/master/SqueezeNet_v1.1>`_.\n",
" SqueezeNet 1.1 has 2.4x less computation and slightly fewer parameters\n",
" than SqueezeNet 1.0, without sacrificing accuracy.\n",
" Args:\n",
" pretrained (bool): If True, returns a model pre-trained on ImageNet\n",
" \"\"\"\n",
" model = SqueezeNet(version=1.1, **kwargs)\n",
" if pretrained:\n",
" model.load_state_dict(model_zoo.load_url(model_urls['squeezenet1_1']))\n",
" return model"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can get the torch model by calling the following function:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Get pretrained squeezenet model\n",
"torch_model = squeezenet1_1(True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"and export the pytorch model as onnx model:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from torch.autograd import Variable\n",
"batch_size = 1 # just a random number\n",
"\n",
"# Input to the model\n",
"x = Variable(torch.randn(batch_size, 3, 224, 224), requires_grad=True)\n",
"\n",
"# Export the model\n",
"torch_out = torch.onnx._export(torch_model, # model being run\n",
" x, # model input (or a tuple for multiple inputs)\n",
" \"squeezenet.onnx\", # where to save the model (can be a file or file-like object)\n",
" export_params=True) # store the trained parameter weights inside the model file\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"After that, we can prepare and run the model and verify that the result of the model running on pytorch matches the result running on onnx-caffe2 backend."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode.\n",
"WARNING:root:Debug message: No module named caffe2_pybind11_state_gpu\n"
]
}
],
"source": [
"import onnx\n",
"import onnx_caffe2.backend\n",
"from onnx import helper\n",
"\n",
"# Load the ONNX GraphProto object. Graph is a standard Python protobuf object\n",
"model = onnx.load(\"squeezenet.onnx\")\n",
"\n",
"# prepare the caffe2 backend for executing the model this converts the ONNX graph into a\n",
"# Caffe2 NetDef that can execute it. Other ONNX backends, like one for CNTK will be\n",
"# availiable soon.\n",
"prepared_backend = onnx_caffe2.backend.prepare(model)\n",
"\n",
"# run the model in Caffe2\n",
"\n",
"# Construct a map from input names to Tensor data.\n",
"# The graph itself contains inputs for all weight parameters, followed by the input image.\n",
"# Since the weights are already embedded, we just need to pass the input image.\n",
"# last input the grap\n",
"W = {model.graph.input[0].name: x.data.numpy()}\n",
"\n",
"# Run the Caffe2 net:\n",
"c2_out = prepared_backend.run(W)[0]\n",
"\n",
"# Verify the numerical correctness upto 3 decimal places\n",
"np.testing.assert_almost_equal(torch_out.data.cpu().numpy(), c2_out, decimal=3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then we can export the model to run on mobile devices, leveraging the cross-platform capability of caffe2."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Export to mobile\n",
"from onnx_caffe2.backend import Caffe2Backend as c2\n",
"\n",
"init_net, predict_net = c2.onnx_graph_to_caffe2_net(model.graph, True)\n",
"with open(\"squeeze_init_net.pb\", \"wb\") as f:\n",
" f.write(init_net.SerializeToString())\n",
"with open(\"squeeze_predict_net.pb\", \"wb\") as f:\n",
" f.write(predict_net.SerializeToString())\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You'll see squeeze_init_net.pb and squeeze_predict_net.pb in the same directory of this notebook. Let's make sure it can run with predictor since that's what we'll use in the Mobile App."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"# Verify it runs with predictor\n",
"with open(\"squeeze_init_net.pb\") as f:\n",
" init_net = f.read()\n",
"with open(\"squeeze_predict_net.pb\") as f:\n",
" predict_net = f.read()\n",
"from caffe2.python import workspace\n",
"p = workspace.Predictor(init_net, predict_net)\n",
"# The following code should run:\n",
"# img = np.random.rand(1, 3, 224, 224).astype(np.float32)\n",
"# p.run([img])\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"After we are sure that it runs with predictor, we can copy squeeze_init_net.pb and squeeze_predict_net.pb to \n",
"AICamera/app/src/main/assets.\n",
"Now we can open Android Studio and import the AICamera project, run the app by clicking the green play button."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
================================================
FILE: LICENSE
================================================
Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
The examples provided by Facebook are for non-commercial testing and evaluation
purposes only. Facebook reserves all rights not expressly granted.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
## AICamera
AICamera is a demo app that was displayed at Facebook's F8 event. The previous version (also on this repo) was getting quite old and attempted to demonstrate a build system that happened inside Android Studio. This led to some hacky techniques and I decided to rewrite the demo with a prebuilt Caffe2 library (which can be built using `build_android.sh` in the Caffe2 source).

### Download
git clone https://github.com/caffe2/AICamera.git
### Build
Click the green play button in Android Studio 3.0.1 and everything should build :)
### Tests
| Device | Network | FPS |
| ------------------ | ------------- | ----- |
| Samsung Galaxy S7 | SqueezeNet | 5.8 |
| Google Pixel | SqueezeNet | 5.7 |
### License
Please see the LICENSE file in the root directory the source tree.
================================================
FILE: app/.gitignore
================================================
/build
================================================
FILE: app/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.4.1)
add_library(
native-lib
SHARED
src/main/cpp/native-lib.cpp
)
find_library(
android-lib
android
)
include(AndroidNdkModules)
android_ndk_import_module_cpufeatures()
add_library(
caffe2
STATIC
IMPORTED
)
set_target_properties(
caffe2
PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_LIST_DIR}/src/main/jniLibs/${ANDROID_ABI}/libCaffe2_CPU.a
)
add_library(
thread_pool
STATIC
IMPORTED
)
set_target_properties(
thread_pool
PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_LIST_DIR}/src/main/jniLibs/${ANDROID_ABI}/libCAFFE2_PTHREADPOOL.a
)
add_library(
glog
SHARED
IMPORTED
)
set_target_properties(
glog
PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_LIST_DIR}/src/main/jniLibs/${ANDROID_ABI}/libglog.so
)
add_library(
protobuf
SHARED
IMPORTED
)
set_target_properties(
protobuf
PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_LIST_DIR}/src/main/jniLibs/${ANDROID_ABI}/libprotobuf.a
)
add_library(
NNPACK
STATIC
IMPORTED
)
set_target_properties(
NNPACK
PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_LIST_DIR}/src/main/jniLibs/${ANDROID_ABI}/libCAFFE2_NNPACK.a
)
include_directories( src/main/cpp )
find_library(
log-lib
log
)
target_link_libraries(
native-lib
-Wl,--whole-archive
caffe2
-Wl,--no-whole-archive
NNPACK
thread_pool
glog
protobuf
cpufeatures
${log-lib}
${android-lib})
================================================
FILE: app/build.gradle
================================================
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
defaultConfig {
applicationId "facebook.f8demo"
minSdkVersion 22
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-frtti -fexceptions -std=c++11"
arguments "-DANDROID_STL=gnustl_shared"
}
}
ndk {
// Specifies the ABI configurations of your native
// libraries Gradle should build and package with your APK.
abiFilters 'armeabi-v7a'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
packagingOptions {
pickFirst 'lib/armeabi-v7a/libgnustl_shared.so'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar', '*.so'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
================================================
FILE: app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/bwasti/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
================================================
FILE: app/src/androidTest/java/facebook/f8demo/ExampleInstrumentedTest.java
================================================
package facebook.f8demo;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("facebook.f8demo", appContext.getPackageName());
}
}
================================================
FILE: app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="facebook.f8demo">
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera2.full" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".ClassifyCamera" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
================================================
FILE: app/src/main/cpp/Eigen/CMakeLists.txt
================================================
include(RegexUtils)
test_escape_string_as_regex()
file(GLOB Eigen_directory_files "*")
escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
foreach(f ${Eigen_directory_files})
if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src")
list(APPEND Eigen_directory_files_to_install ${f})
endif()
endforeach(f ${Eigen_directory_files})
install(FILES
${Eigen_directory_files_to_install}
DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel
)
install(DIRECTORY src DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel FILES_MATCHING PATTERN "*.h")
================================================
FILE: app/src/main/cpp/Eigen/Cholesky
================================================
// 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_CHOLESKY_MODULE_H
#define EIGEN_CHOLESKY_MODULE_H
#include "Core"
#include "src/Core/util/DisableStupidWarnings.h"
/** \defgroup Cholesky_Module Cholesky module
*
*
*
* This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.
* Those decompositions are also accessible via the following methods:
* - MatrixBase::llt()
* - MatrixBase::ldlt()
* - SelfAdjointView::llt()
* - SelfAdjointView::ldlt()
*
* \code
* #include <Eigen/Cholesky>
* \endcode
*/
#include "src/Cholesky/LLT.h"
#include "src/Cholesky/LDLT.h"
#ifdef EIGEN_USE_LAPACKE
#include "src/misc/lapacke.h"
#include "src/Cholesky/LLT_LAPACKE.h"
#endif
#include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_CHOLESKY_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */
================================================
FILE: app/src/main/cpp/Eigen/CholmodSupport
================================================
// 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 <cholmod.h>
}
/** \ingroup Support_modules
* \defgroup CholmodSupport_Module CholmodSupport module
*
* This module provides an interface to the Cholmod library which is part of the <a href="http://www.suitesparse.com">suitesparse</a> 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 <Eigen/CholmodSupport>
* \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
================================================
FILE: app/src/main/cpp/Eigen/Core
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
// Copyright (C) 2007-2011 Benoit Jacob <jacob.benoit.1@gmail.com>
//
// 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_CORE_H
#define EIGEN_CORE_H
// first thing Eigen does: stop the compiler from committing suicide
#include "src/Core/util/DisableStupidWarnings.h"
// Handle NVCC/CUDA/SYCL
#if defined(__CUDACC__) || defined(__SYCL_DEVICE_ONLY__)
// Do not try asserts on CUDA and SYCL!
#ifndef EIGEN_NO_DEBUG
#define EIGEN_NO_DEBUG
#endif
#ifdef EIGEN_INTERNAL_DEBUGGING
#undef EIGEN_INTERNAL_DEBUGGING
#endif
#ifdef EIGEN_EXCEPTIONS
#undef EIGEN_EXCEPTIONS
#endif
// All functions callable from CUDA code must be qualified with __device__
#ifdef __CUDACC__
// Do not try to vectorize on CUDA and SYCL!
#ifndef EIGEN_DONT_VECTORIZE
#define EIGEN_DONT_VECTORIZE
#endif
#define EIGEN_DEVICE_FUNC __host__ __device__
// We need math_functions.hpp to ensure that that EIGEN_USING_STD_MATH macro
// works properly on the device side
#include <math_functions.hpp>
#else
#define EIGEN_DEVICE_FUNC
#endif
#else
#define EIGEN_DEVICE_FUNC
#endif
// When compiling CUDA device code with NVCC, pull in math functions from the
// global namespace. In host mode, and when device doee with clang, use the
// std versions.
#if defined(__CUDA_ARCH__) && defined(__NVCC__)
#define EIGEN_USING_STD_MATH(FUNC) using ::FUNC;
#else
#define EIGEN_USING_STD_MATH(FUNC) using std::FUNC;
#endif
#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(EIGEN_EXCEPTIONS) && !defined(EIGEN_USE_SYCL)
#define EIGEN_EXCEPTIONS
#endif
#ifdef EIGEN_EXCEPTIONS
#include <new>
#endif
// then include this file where all our macros are defined. It's really important to do it first because
// it's where we do all the alignment settings (platform detection and honoring the user's will if he
// defined e.g. EIGEN_DONT_ALIGN) so it needs to be done before we do anything with vectorization.
#include "src/Core/util/Macros.h"
// Disable the ipa-cp-clone optimization flag with MinGW 6.x or newer (enabled by default with -O3)
// See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=556 for details.
#if EIGEN_COMP_MINGW && EIGEN_GNUC_AT_LEAST(4,6)
#pragma GCC optimize ("-fno-ipa-cp-clone")
#endif
#include <complex>
// this include file manages BLAS and MKL related macros
// and inclusion of their respective header files
#include "src/Core/util/MKL_support.h"
// if alignment is disabled, then disable vectorization. Note: EIGEN_MAX_ALIGN_BYTES is the proper check, it takes into
// account both the user's will (EIGEN_MAX_ALIGN_BYTES,EIGEN_DONT_ALIGN) and our own platform checks
#if EIGEN_MAX_ALIGN_BYTES==0
#ifndef EIGEN_DONT_VECTORIZE
#define EIGEN_DONT_VECTORIZE
#endif
#endif
#if EIGEN_COMP_MSVC
#include <malloc.h> // for _aligned_malloc -- need it regardless of whether vectorization is enabled
#if (EIGEN_COMP_MSVC >= 1500) // 2008 or later
// Remember that usage of defined() in a #define is undefined by the standard.
// a user reported that in 64-bit mode, MSVC doesn't care to define _M_IX86_FP.
#if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || EIGEN_ARCH_x86_64
#define EIGEN_SSE2_ON_MSVC_2008_OR_LATER
#endif
#endif
#else
// Remember that usage of defined() in a #define is undefined by the standard
#if (defined __SSE2__) && ( (!EIGEN_COMP_GNUC) || EIGEN_COMP_ICC || EIGEN_GNUC_AT_LEAST(4,2) )
#define EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC
#endif
#endif
#ifndef EIGEN_DONT_VECTORIZE
#if defined (EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC) || defined(EIGEN_SSE2_ON_MSVC_2008_OR_LATER)
// Defines symbols for compile-time detection of which instructions are
// used.
// EIGEN_VECTORIZE_YY is defined if and only if the instruction set YY is used
#define EIGEN_VECTORIZE
#define EIGEN_VECTORIZE_SSE
#define EIGEN_VECTORIZE_SSE2
// Detect sse3/ssse3/sse4:
// gcc and icc defines __SSE3__, ...
// there is no way to know about this on msvc. You can define EIGEN_VECTORIZE_SSE* if you
// want to force the use of those instructions with msvc.
#ifdef __SSE3__
#define EIGEN_VECTORIZE_SSE3
#endif
#ifdef __SSSE3__
#define EIGEN_VECTORIZE_SSSE3
#endif
#ifdef __SSE4_1__
#define EIGEN_VECTORIZE_SSE4_1
#endif
#ifdef __SSE4_2__
#define EIGEN_VECTORIZE_SSE4_2
#endif
#ifdef __AVX__
#define EIGEN_VECTORIZE_AVX
#define EIGEN_VECTORIZE_SSE3
#define EIGEN_VECTORIZE_SSSE3
#define EIGEN_VECTORIZE_SSE4_1
#define EIGEN_VECTORIZE_SSE4_2
#endif
#ifdef __AVX2__
#define EIGEN_VECTORIZE_AVX2
#define EIGEN_VECTORIZE_AVX
#define EIGEN_VECTORIZE_SSE3
#define EIGEN_VECTORIZE_SSSE3
#define EIGEN_VECTORIZE_SSE4_1
#define EIGEN_VECTORIZE_SSE4_2
#endif
#ifdef __FMA__
#define EIGEN_VECTORIZE_FMA
#endif
#if defined(__AVX512F__)
#define EIGEN_VECTORIZE_AVX512
#define EIGEN_VECTORIZE_AVX2
#define EIGEN_VECTORIZE_AVX
#define EIGEN_VECTORIZE_FMA
#define EIGEN_VECTORIZE_SSE3
#define EIGEN_VECTORIZE_SSSE3
#define EIGEN_VECTORIZE_SSE4_1
#define EIGEN_VECTORIZE_SSE4_2
#ifdef __AVX512DQ__
#define EIGEN_VECTORIZE_AVX512DQ
#endif
#endif
// include files
// This extern "C" works around a MINGW-w64 compilation issue
// https://sourceforge.net/tracker/index.php?func=detail&aid=3018394&group_id=202880&atid=983354
// In essence, intrin.h is included by windows.h and also declares intrinsics (just as emmintrin.h etc. below do).
// However, intrin.h uses an extern "C" declaration, and g++ thus complains of duplicate declarations
// with conflicting linkage. The linkage for intrinsics doesn't matter, but at that stage the compiler doesn't know;
// so, to avoid compile errors when windows.h is included after Eigen/Core, ensure intrinsics are extern "C" here too.
// notice that since these are C headers, the extern "C" is theoretically needed anyways.
extern "C" {
// In theory we should only include immintrin.h and not the other *mmintrin.h header files directly.
// Doing so triggers some issues with ICC. However old gcc versions seems to not have this file, thus:
#if EIGEN_COMP_ICC >= 1110
#include <immintrin.h>
#else
#include <mmintrin.h>
#include <emmintrin.h>
#include <xmmintrin.h>
#ifdef EIGEN_VECTORIZE_SSE3
#include <pmmintrin.h>
#endif
#ifdef EIGEN_VECTORIZE_SSSE3
#include <tmmintrin.h>
#endif
#ifdef EIGEN_VECTORIZE_SSE4_1
#include <smmintrin.h>
#endif
#ifdef EIGEN_VECTORIZE_SSE4_2
#include <nmmintrin.h>
#endif
#if defined(EIGEN_VECTORIZE_AVX) || defined(EIGEN_VECTORIZE_AVX512)
#include <immintrin.h>
#endif
#endif
} // end extern "C"
#elif defined __VSX__
#define EIGEN_VECTORIZE
#define EIGEN_VECTORIZE_VSX
#include <altivec.h>
// We need to #undef all these ugly tokens defined in <altivec.h>
// => use __vector instead of vector
#undef bool
#undef vector
#undef pixel
#elif defined __ALTIVEC__
#define EIGEN_VECTORIZE
#define EIGEN_VECTORIZE_ALTIVEC
#include <altivec.h>
// We need to #undef all these ugly tokens defined in <altivec.h>
// => use __vector instead of vector
#undef bool
#undef vector
#undef pixel
#elif (defined __ARM_NEON) || (defined __ARM_NEON__)
#define EIGEN_VECTORIZE
#define EIGEN_VECTORIZE_NEON
#include <arm_neon.h>
#elif (defined __s390x__ && defined __VEC__)
#define EIGEN_VECTORIZE
#define EIGEN_VECTORIZE_ZVECTOR
#include <vecintrin.h>
#endif
#endif
#if defined(__F16C__) && !defined(EIGEN_COMP_CLANG)
// We can use the optimized fp16 to float and float to fp16 conversion routines
#define EIGEN_HAS_FP16_C
#endif
#if defined __CUDACC__
#define EIGEN_VECTORIZE_CUDA
#include <vector_types.h>
#if defined __CUDACC_VER__ && __CUDACC_VER__ >= 70500
#define EIGEN_HAS_CUDA_FP16
#endif
#endif
#if defined EIGEN_HAS_CUDA_FP16
#include <host_defines.h>
#include <cuda_fp16.h>
#endif
#if (defined _OPENMP) && (!defined EIGEN_DONT_PARALLELIZE)
#define EIGEN_HAS_OPENMP
#endif
#ifdef EIGEN_HAS_OPENMP
#include <omp.h>
#endif
// MSVC for windows mobile does not have the errno.h file
#if !(EIGEN_COMP_MSVC && EIGEN_OS_WINCE) && !EIGEN_COMP_ARM
#define EIGEN_HAS_ERRNO
#endif
#ifdef EIGEN_HAS_ERRNO
#include <cerrno>
#endif
#include <cstddef>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <functional>
#include <iosfwd>
#include <cstring>
#include <string>
#include <limits>
#include <climits> // for CHAR_BIT
// for min/max:
#include <algorithm>
// for std::is_nothrow_move_assignable
#ifdef EIGEN_INCLUDE_TYPE_TRAITS
#include <type_traits>
#endif
// for outputting debug info
#ifdef EIGEN_DEBUG_ASSIGN
#include <iostream>
#endif
// required for __cpuid, needs to be included after cmath
#if EIGEN_COMP_MSVC && EIGEN_ARCH_i386_OR_x86_64 && !EIGEN_OS_WINCE
#include <intrin.h>
#endif
#if defined(__SYCL_DEVICE_ONLY__)
#undef min
#undef max
#undef isnan
#undef isinf
#undef isfinite
#include <SYCL/sycl.hpp>
#endif
/** \brief Namespace containing all symbols from the %Eigen library. */
namespace Eigen {
inline static const char *SimdInstructionSetsInUse(void) {
#if defined(EIGEN_VECTORIZE_AVX512)
return "AVX512, FMA, AVX2, AVX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2";
#elif defined(EIGEN_VECTORIZE_AVX)
return "AVX SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2";
#elif defined(EIGEN_VECTORIZE_SSE4_2)
return "SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2";
#elif defined(EIGEN_VECTORIZE_SSE4_1)
return "SSE, SSE2, SSE3, SSSE3, SSE4.1";
#elif defined(EIGEN_VECTORIZE_SSSE3)
return "SSE, SSE2, SSE3, SSSE3";
#elif defined(EIGEN_VECTORIZE_SSE3)
return "SSE, SSE2, SSE3";
#elif defined(EIGEN_VECTORIZE_SSE2)
return "SSE, SSE2";
#elif defined(EIGEN_VECTORIZE_ALTIVEC)
return "AltiVec";
#elif defined(EIGEN_VECTORIZE_VSX)
return "VSX";
#elif defined(EIGEN_VECTORIZE_NEON)
return "ARM NEON";
#elif defined(EIGEN_VECTORIZE_ZVECTOR)
return "S390X ZVECTOR";
#else
return "None";
#endif
}
} // end namespace Eigen
#if defined EIGEN2_SUPPORT_STAGE40_FULL_EIGEN3_STRICTNESS || defined EIGEN2_SUPPORT_STAGE30_FULL_EIGEN3_API || defined EIGEN2_SUPPORT_STAGE20_RESOLVE_API_CONFLICTS || defined EIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API || defined EIGEN2_SUPPORT
// This will generate an error message:
#error Eigen2-support is only available up to version 3.2. Please go to "http://eigen.tuxfamily.org/index.php?title=Eigen2" for further information
#endif
namespace Eigen {
// we use size_t frequently and we'll never remember to prepend it with std:: everytime just to
// ensure QNX/QCC support
using std::size_t;
// gcc 4.6.0 wants std:: for ptrdiff_t
using std::ptrdiff_t;
}
/** \defgroup Core_Module Core module
* This is the main module of Eigen providing dense matrix and vector support
* (both fixed and dynamic size) with all the features corresponding to a BLAS library
* and much more...
*
* \code
* #include <Eigen/Core>
* \endcode
*/
#include "src/Core/util/Constants.h"
#include "src/Core/util/Meta.h"
#include "src/Core/util/ForwardDeclarations.h"
#include "src/Core/util/StaticAssert.h"
#include "src/Core/util/XprHelper.h"
#include "src/Core/util/Memory.h"
#include "src/Core/util/IntegralConstant.h"
#include "src/Core/util/SymbolicIndex.h"
#include "src/Core/NumTraits.h"
#include "src/Core/MathFunctions.h"
#include "src/Core/GenericPacketMath.h"
#include "src/Core/MathFunctionsImpl.h"
#if defined EIGEN_VECTORIZE_AVX512
#include "src/Core/arch/SSE/PacketMath.h"
#include "src/Core/arch/AVX/PacketMath.h"
#include "src/Core/arch/AVX512/PacketMath.h"
#include "src/Core/arch/SSE/MathFunctions.h"
#include "src/Core/arch/AVX/MathFunctions.h"
#include "src/Core/arch/AVX512/MathFunctions.h"
#elif defined EIGEN_VECTORIZE_AVX
// Use AVX for floats and doubles, SSE for integers
#include "src/Core/arch/SSE/PacketMath.h"
#include "src/Core/arch/SSE/Complex.h"
#include "src/Core/arch/SSE/MathFunctions.h"
#include "src/Core/arch/AVX/PacketMath.h"
#include "src/Core/arch/AVX/MathFunctions.h"
#include "src/Core/arch/AVX/Complex.h"
#include "src/Core/arch/AVX/TypeCasting.h"
#elif defined EIGEN_VECTORIZE_SSE
#include "src/Core/arch/SSE/PacketMath.h"
#include "src/Core/arch/SSE/MathFunctions.h"
#include "src/Core/arch/SSE/Complex.h"
#include "src/Core/arch/SSE/TypeCasting.h"
#elif defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
#include "src/Core/arch/AltiVec/PacketMath.h"
#include "src/Core/arch/AltiVec/MathFunctions.h"
#include "src/Core/arch/AltiVec/Complex.h"
#elif defined EIGEN_VECTORIZE_NEON
#include "src/Core/arch/NEON/PacketMath.h"
#include "src/Core/arch/NEON/MathFunctions.h"
#include "src/Core/arch/NEON/Complex.h"
#elif defined EIGEN_VECTORIZE_ZVECTOR
#include "src/Core/arch/ZVector/PacketMath.h"
#include "src/Core/arch/ZVector/MathFunctions.h"
#include "src/Core/arch/ZVector/Complex.h"
#endif
// Half float support
#include "src/Core/arch/CUDA/Half.h"
#include "src/Core/arch/CUDA/PacketMathHalf.h"
#include "src/Core/arch/CUDA/TypeCasting.h"
#if defined EIGEN_VECTORIZE_CUDA
#include "src/Core/arch/CUDA/PacketMath.h"
#include "src/Core/arch/CUDA/MathFunctions.h"
#endif
#include "src/Core/arch/Default/Settings.h"
#include "src/Core/functors/TernaryFunctors.h"
#include "src/Core/functors/BinaryFunctors.h"
#include "src/Core/functors/UnaryFunctors.h"
#include "src/Core/functors/NullaryFunctors.h"
#include "src/Core/functors/StlFunctors.h"
#include "src/Core/functors/AssignmentFunctors.h"
// Specialized functors to enable the processing of complex numbers
// on CUDA devices
#include "src/Core/arch/CUDA/Complex.h"
#include "src/Core/util/IndexedViewHelper.h"
#include "src/Core/ArithmeticSequence.h"
#include "src/Core/IO.h"
#include "src/Core/DenseCoeffsBase.h"
#include "src/Core/DenseBase.h"
#include "src/Core/MatrixBase.h"
#include "src/Core/EigenBase.h"
#include "src/Core/Product.h"
#include "src/Core/CoreEvaluators.h"
#include "src/Core/AssignEvaluator.h"
#ifndef EIGEN_PARSED_BY_DOXYGEN // work around Doxygen bug triggered by Assign.h r814874
// at least confirmed with Doxygen 1.5.5 and 1.5.6
#include "src/Core/Assign.h"
#endif
#include "src/Core/ArrayBase.h"
#include "src/Core/util/BlasUtil.h"
#include "src/Core/DenseStorage.h"
#include "src/Core/NestByValue.h"
// #include "src/Core/ForceAlignedAccess.h"
#include "src/Core/ReturnByValue.h"
#include "src/Core/NoAlias.h"
#include "src/Core/PlainObjectBase.h"
#include "src/Core/Matrix.h"
#include "src/Core/Array.h"
#include "src/Core/CwiseTernaryOp.h"
#include "src/Core/CwiseBinaryOp.h"
#include "src/Core/CwiseUnaryOp.h"
#include "src/Core/CwiseNullaryOp.h"
#include "src/Core/CwiseUnaryView.h"
#include "src/Core/SelfCwiseBinaryOp.h"
#include "src/Core/Dot.h"
#include "src/Core/StableNorm.h"
#include "src/Core/Stride.h"
#include "src/Core/MapBase.h"
#include "src/Core/Map.h"
#include "src/Core/Ref.h"
#include "src/Core/Block.h"
#include "src/Core/VectorBlock.h"
#include "src/Core/IndexedView.h"
#include "src/Core/Transpose.h"
#include "src/Core/DiagonalMatrix.h"
#include "src/Core/Diagonal.h"
#include "src/Core/DiagonalProduct.h"
#include "src/Core/Redux.h"
#include "src/Core/Visitor.h"
#include "src/Core/Fuzzy.h"
#include "src/Core/Swap.h"
#include "src/Core/CommaInitializer.h"
#include "src/Core/GeneralProduct.h"
#include "src/Core/Solve.h"
#include "src/Core/Inverse.h"
#include "src/Core/SolverBase.h"
#include "src/Core/PermutationMatrix.h"
#include "src/Core/Transpositions.h"
#include "src/Core/TriangularMatrix.h"
#include "src/Core/SelfAdjointView.h"
#include "src/Core/products/GeneralBlockPanelKernel.h"
#include "src/Core/products/Parallelizer.h"
#include "src/Core/ProductEvaluators.h"
#include "src/Core/products/GeneralMatrixVector.h"
#include "src/Core/products/GeneralMatrixMatrix.h"
#include "src/Core/SolveTriangular.h"
#include "src/Core/products/GeneralMatrixMatrixTriangular.h"
#include "src/Core/products/SelfadjointMatrixVector.h"
#include "src/Core/products/SelfadjointMatrixMatrix.h"
#include "src/Core/products/SelfadjointProduct.h"
#include "src/Core/products/SelfadjointRank2Update.h"
#include "src/Core/products/TriangularMatrixVector.h"
#include "src/Core/products/TriangularMatrixMatrix.h"
#include "src/Core/products/TriangularSolverMatrix.h"
#include "src/Core/products/TriangularSolverVector.h"
#include "src/Core/BandMatrix.h"
#include "src/Core/CoreIterators.h"
#include "src/Core/ConditionEstimator.h"
#include "src/Core/BooleanRedux.h"
#include "src/Core/Select.h"
#include "src/Core/VectorwiseOp.h"
#include "src/Core/Random.h"
#include "src/Core/Replicate.h"
#include "src/Core/Reverse.h"
#include "src/Core/ArrayWrapper.h"
#ifdef EIGEN_USE_BLAS
#include "src/Core/products/GeneralMatrixMatrix_BLAS.h"
#include "src/Core/products/GeneralMatrixVector_BLAS.h"
#include "src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h"
#include "src/Core/products/SelfadjointMatrixMatrix_BLAS.h"
#include "src/Core/products/SelfadjointMatrixVector_BLAS.h"
#include "src/Core/products/TriangularMatrixMatrix_BLAS.h"
#include "src/Core/products/TriangularMatrixVector_BLAS.h"
#include "src/Core/products/TriangularSolverMatrix_BLAS.h"
#endif // EIGEN_USE_BLAS
#ifdef EIGEN_USE_MKL_VML
#include "src/Core/Assign_MKL.h"
#endif
#include "src/Core/GlobalFunctions.h"
#include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_CORE_H
================================================
FILE: app/src/main/cpp/Eigen/Dense
================================================
#include "Core"
#include "LU"
#include "Cholesky"
#include "QR"
#include "SVD"
#include "Geometry"
#include "Eigenvalues"
================================================
FILE: app/src/main/cpp/Eigen/Eigen
================================================
#include "Dense"
#include "Sparse"
================================================
FILE: app/src/main/cpp/Eigen/Eigenvalues
================================================
// 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_EIGENVALUES_MODULE_H
#define EIGEN_EIGENVALUES_MODULE_H
#include "Core"
#include "src/Core/util/DisableStupidWarnings.h"
#include "Cholesky"
#include "Jacobi"
#include "Householder"
#include "LU"
#include "Geometry"
/** \defgroup Eigenvalues_Module Eigenvalues module
*
*
*
* This module mainly provides various eigenvalue solvers.
* This module also provides some MatrixBase methods, including:
* - MatrixBase::eigenvalues(),
* - MatrixBase::operatorNorm()
*
* \code
* #include <Eigen/Eigenvalues>
* \endcode
*/
#include "src/misc/RealSvd2x2.h"
#include "src/Eigenvalues/Tridiagonalization.h"
#include "src/Eigenvalues/RealSchur.h"
#include "src/Eigenvalues/EigenSolver.h"
#include "src/Eigenvalues/SelfAdjointEigenSolver.h"
#include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h"
#include "src/Eigenvalues/HessenbergDecomposition.h"
#include "src/Eigenvalues/ComplexSchur.h"
#include "src/Eigenvalues/ComplexEigenSolver.h"
#include "src/Eigenvalues/RealQZ.h"
#include "src/Eigenvalues/GeneralizedEigenSolver.h"
#include "src/Eigenvalues/MatrixBaseEigenvalues.h"
#ifdef EIGEN_USE_LAPACKE
#include "src/misc/lapacke.h"
#include "src/Eigenvalues/RealSchur_LAPACKE.h"
#include "src/Eigenvalues/ComplexSchur_LAPACKE.h"
#include "src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h"
#endif
#include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_EIGENVALUES_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */
================================================
FILE: app/src/main/cpp/Eigen/Geometry
================================================
// 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_GEOMETRY_MODULE_H
#define EIGEN_GEOMETRY_MODULE_H
#include "Core"
#include "src/Core/util/DisableStupidWarnings.h"
#include "SVD"
#include "LU"
#include <limits>
/** \defgroup Geometry_Module Geometry module
*
* This module provides support for:
* - fixed-size homogeneous transformations
* - translation, scaling, 2D and 3D rotations
* - \link Quaternion quaternions \endlink
* - cross products (\ref MatrixBase::cross, \ref MatrixBase::cross3)
* - orthognal vector generation (\ref MatrixBase::unitOrthogonal)
* - some linear components: \link ParametrizedLine parametrized-lines \endlink and \link Hyperplane hyperplanes \endlink
* - \link AlignedBox axis aligned bounding boxes \endlink
* - \link umeyama least-square transformation fitting \endlink
*
* \code
* #include <Eigen/Geometry>
* \endcode
*/
#include "src/Geometry/OrthoMethods.h"
#include "src/Geometry/EulerAngles.h"
#include "src/Geometry/Homogeneous.h"
#include "src/Geometry/RotationBase.h"
#include "src/Geometry/Rotation2D.h"
#include "src/Geometry/Quaternion.h"
#include "src/Geometry/AngleAxis.h"
#include "src/Geometry/Transform.h"
#include "src/Geometry/Translation.h"
#include "src/Geometry/Scaling.h"
#include "src/Geometry/Hyperplane.h"
#include "src/Geometry/ParametrizedLine.h"
#include "src/Geometry/AlignedBox.h"
#include "src/Geometry/Umeyama.h"
// Use the SSE optimized version whenever possible. At the moment the
// SSE version doesn't compile when AVX is enabled
#if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX
#include "src/Geometry/arch/Geometry_SSE.h"
#endif
#include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_GEOMETRY_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */
================================================
FILE: app/src/main/cpp/Eigen/Householder
================================================
// 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_HOUSEHOLDER_MODULE_H
#define EIGEN_HOUSEHOLDER_MODULE_H
#include "Core"
#include "src/Core/util/DisableStupidWarnings.h"
/** \defgroup Householder_Module Householder module
* This module provides Householder transformations.
*
* \code
* #include <Eigen/Householder>
* \endcode
*/
#include "src/Householder/Householder.h"
#include "src/Householder/HouseholderSequence.h"
#include "src/Householder/BlockHouseholder.h"
#include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_HOUSEHOLDER_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */
================================================
FILE: app/src/main/cpp/Eigen/IterativeLinearSolvers
================================================
// 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 <Eigen/IterativeLinearSolvers>
\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
================================================
FILE: app/src/main/cpp/Eigen/Jacobi
================================================
// 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_JACOBI_MODULE_H
#define EIGEN_JACOBI_MODULE_H
#include "Core"
#include "src/Core/util/DisableStupidWarnings.h"
/** \defgroup Jacobi_Module Jacobi module
* This module provides Jacobi and Givens rotations.
*
* \code
* #include <Eigen/Jacobi>
* \endcode
*
* In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation:
* - MatrixBase::applyOnTheLeft()
* - MatrixBase::applyOnTheRight().
*/
#include "src/Jacobi/Jacobi.h"
#include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_JACOBI_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */
================================================
FILE: app/src/main/cpp/Eigen/LU
================================================
// 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_LU_MODULE_H
#define EIGEN_LU_MODULE_H
#include "Core"
#include "src/Core/util/DisableStupidWarnings.h"
/** \defgroup LU_Module LU module
* This module includes %LU decomposition and related notions such as matrix inversion and determinant.
* This module defines the following MatrixBase methods:
* - MatrixBase::inverse()
* - MatrixBase::determinant()
*
* \code
* #include <Eigen/LU>
* \endcode
*/
#include "src/misc/Kernel.h"
#include "src/misc/Image.h"
#include "src/LU/FullPivLU.h"
#include "src/LU/PartialPivLU.h"
#ifdef EIGEN_USE_LAPACKE
#include "src/misc/lapacke.h"
#include "src/LU/PartialPivLU_LAPACKE.h"
#endif
#include "src/LU/Determinant.h"
#include "src/LU/InverseImpl.h"
// Use the SSE optimized version whenever possible. At the moment the
// SSE version doesn't compile when AVX is enabled
#if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX
#include "src/LU/arch/Inverse_SSE.h"
#endif
#include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_LU_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */
================================================
FILE: app/src/main/cpp/Eigen/MetisSupport
================================================
// 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 <metis.h>
}
/** \ingroup Support_modules
* \defgroup MetisSupport_Module MetisSupport module
*
* \code
* #include <Eigen/MetisSupport>
* \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
================================================
FILE: app/src/main/cpp/Eigen/OrderingMethods
================================================
// 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 <Eigen/OrderingMethods>
* \endcode
*
* A simple usage is as a template parameter in the sparse decomposition classes :
*
* \code
* SparseLU<MatrixType, COLAMDOrdering<int> > solver;
* \endcode
*
* \code
* SparseQR<MatrixType, COLAMDOrdering<int> > solver;
* \endcode
*
* It is possible as well to call directly a particular ordering method for your own purpose,
* \code
* AMDOrdering<int> ordering;
* PermutationMatrix<Dynamic, Dynamic, int> perm;
* SparseMatrix<double> 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<Lower>(), 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
================================================
FILE: app/src/main/cpp/Eigen/PaStiXSupport
================================================
// 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 <pastix_nompi.h>
#include <pastix.h>
}
#ifdef complex
#undef complex
#endif
/** \ingroup Support_modules
* \defgroup PaStiXSupport_Module PaStiXSupport module
*
* This module provides an interface to the <a href="http://pastix.gforge.inria.fr/">PaSTiX</a> 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 <Eigen/PaStiXSupport>
* \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
================================================
FILE: app/src/main/cpp/Eigen/PardisoSupport
================================================
// 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 <mkl_pardiso.h>
/** \ingroup Support_modules
* \defgroup PardisoSupport_Module PardisoSupport module
*
* This module brings support for the Intel(R) MKL PARDISO direct sparse solvers.
*
* \code
* #include <Eigen/PardisoSupport>
* \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
================================================
FILE: app/src/main/cpp/Eigen/QR
================================================
// 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_QR_MODULE_H
#define EIGEN_QR_MODULE_H
#include "Core"
#include "src/Core/util/DisableStupidWarnings.h"
#include "Cholesky"
#include "Jacobi"
#include "Householder"
/** \defgroup QR_Module QR module
*
*
*
* This module provides various QR decompositions
* This module also provides some MatrixBase methods, including:
* - MatrixBase::householderQr()
* - MatrixBase::colPivHouseholderQr()
* - MatrixBase::fullPivHouseholderQr()
*
* \code
* #include <Eigen/QR>
* \endcode
*/
#include "src/QR/HouseholderQR.h"
#include "src/QR/FullPivHouseholderQR.h"
#include "src/QR/ColPivHouseholderQR.h"
#include "src/QR/CompleteOrthogonalDecomposition.h"
#ifdef EIGEN_USE_LAPACKE
#include "src/misc/lapacke.h"
#include "src/QR/HouseholderQR_LAPACKE.h"
#include "src/QR/ColPivHouseholderQR_LAPACKE.h"
#endif
#include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_QR_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */
================================================
FILE: app/src/main/cpp/Eigen/QtAlignedMalloc
================================================
// 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: */
================================================
FILE: app/src/main/cpp/Eigen/SPQRSupport
================================================
// 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 <a href="http://www.suitesparse.com">suitesparse</a> package.
*
* \code
* #include <Eigen/SPQRSupport>
* \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
================================================
FILE: app/src/main/cpp/Eigen/SVD
================================================
// 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_SVD_MODULE_H
#define EIGEN_SVD_MODULE_H
#include "QR"
#include "Householder"
#include "Jacobi"
#include "src/Core/util/DisableStupidWarnings.h"
/** \defgroup SVD_Module SVD module
*
*
*
* This module provides SVD decomposition for matrices (both real and complex).
* Two decomposition algorithms are provided:
* - JacobiSVD implementing two-sided Jacobi iterations is numerically very accurate, fast for small matrices, but very slow for larger ones.
* - BDCSVD implementing a recursive divide & conquer strategy on top of an upper-bidiagonalization which remains fast for large problems.
* These decompositions are accessible via the respective classes and following MatrixBase methods:
* - MatrixBase::jacobiSvd()
* - MatrixBase::bdcSvd()
*
* \code
* #include <Eigen/SVD>
* \endcode
*/
#include "src/misc/RealSvd2x2.h"
#include "src/SVD/UpperBidiagonalization.h"
#include "src/SVD/SVDBase.h"
#include "src/SVD/JacobiSVD.h"
#include "src/SVD/BDCSVD.h"
#if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT)
#include "src/misc/lapacke.h"
#include "src/SVD/JacobiSVD_LAPACKE.h"
#endif
#include "src/Core/util/ReenableStupidWarnings.h"
#endif // EIGEN_SVD_MODULE_H
/* vim: set filetype=cpp et sw=2 ts=2 ai: */
================================================
FILE: app/src/main/cpp/Eigen/Sparse
================================================
// 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 <Eigen/Sparse>
\endcode
*/
#include "SparseCore"
#include "OrderingMethods"
#ifndef EIGEN_MPL2_ONLY
#include "SparseCholesky"
#endif
#include "SparseLU"
#include "SparseQR"
#include "IterativeLinearSolvers"
#endif // EIGEN_SPARSE_MODULE_H
================================================
FILE: app/src/main/cpp/Eigen/SparseCholesky
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2013 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// 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 <Eigen/SparseCholesky>
* \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
================================================
FILE: app/src/main/cpp/Eigen/SparseCore
================================================
// 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 <vector>
#include <map>
#include <cstdlib>
#include <cstring>
#include <algorithm>
/**
* \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 <Eigen/SparseCore>
* \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
================================================
FILE: app/src/main/cpp/Eigen/SparseLU
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>
// Copyright (C) 2012 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// 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
================================================
FILE: app/src/main/cpp/Eigen/SparseQR
================================================
// 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 <Eigen/SparseQR>
* \endcode
*
*
*/
#include "OrderingMethods"
#include "src/SparseCore/SparseColEtree.h"
#include "src/SparseQR/SparseQR.h"
#include "src/Core/util/ReenableStupidWarnings.h"
#endif
================================================
FILE: app/src/main/cpp/Eigen/StdDeque
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>
// Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>
//
// 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 <deque>
#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
================================================
FILE: app/src/main/cpp/Eigen/StdList
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>
//
// 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 <list>
#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
================================================
FILE: app/src/main/cpp/Eigen/StdVector
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>
// Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>
//
// 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 <vector>
#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
================================================
FILE: app/src/main/cpp/Eigen/SuperLUSupport
================================================
// 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 <slu_Cnames.h>
#include <supermatrix.h>
#include <slu_util.h>
// 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 <a href="http://crd-legacy.lbl.gov/~xiaoye/SuperLU/">SuperLU</a> 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 <Eigen/SuperLUSupport>
* \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
================================================
FILE: app/src/main/cpp/Eigen/UmfPackSupport
================================================
// 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 <umfpack.h>
}
/** \ingroup Support_modules
* \defgroup UmfPackSupport_Module UmfPackSupport module
*
* This module provides an interface to the UmfPack library which is part of the <a href="http://www.suitesparse.com">suitesparse</a> package.
* It provides the following factorization class:
* - class UmfPackLU: a multifrontal sequential LU factorization.
*
* \code
* #include <Eigen/UmfPackSupport>
* \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
================================================
FILE: app/src/main/cpp/Eigen/src/Cholesky/LDLT.h
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2011 Gael Guennebaud <gael.guennebaud@inria.fr>
// Copyright (C) 2009 Keir Mierle <mierle@gmail.com>
// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
// Copyright (C) 2011 Timothy E. Holy <tim.holy@gmail.com >
//
// 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_LDLT_H
#define EIGEN_LDLT_H
namespace Eigen {
namespace internal {
template<typename MatrixType, int UpLo> struct LDLT_Traits;
// PositiveSemiDef means positive semi-definite and non-zero; same for NegativeSemiDef
enum SignMatrix { PositiveSemiDef, NegativeSemiDef, ZeroSign, Indefinite };
}
/** \ingroup Cholesky_Module
*
* \class LDLT
*
* \brief Robust Cholesky decomposition of a matrix with pivoting
*
* \tparam _MatrixType the type of the matrix of which to compute the LDL^T Cholesky decomposition
* \tparam _UpLo the triangular part that will be used for the decompositon: Lower (default) or Upper.
* The other triangular part won't be read.
*
* Perform a robust Cholesky decomposition of a positive semidefinite or negative semidefinite
* matrix \f$ A \f$ such that \f$ A = P^TLDL^*P \f$, where P is a permutation matrix, L
* is lower triangular with a unit diagonal and D is a diagonal matrix.
*
* The decomposition uses pivoting to ensure stability, so that L will have
* zeros in the bottom right rank(A) - n submatrix. Avoiding the square root
* on D also stabilizes the computation.
*
* Remember that Cholesky decompositions are not rank-revealing. Also, do not use a Cholesky
* decomposition to determine whether a system of equations has a solution.
*
* This class supports the \link InplaceDecomposition inplace decomposition \endlink mechanism.
*
* \sa MatrixBase::ldlt(), SelfAdjointView::ldlt(), class LLT
*/
template<typename _MatrixType, int _UpLo> class LDLT
{
public:
typedef _MatrixType MatrixType;
enum {
RowsAtCompileTime = MatrixType::RowsAtCompileTime,
ColsAtCompileTime = MatrixType::ColsAtCompileTime,
MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,
UpLo = _UpLo
};
typedef typename MatrixType::Scalar Scalar;
typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
typedef typename MatrixType::StorageIndex StorageIndex;
typedef Matrix<Scalar, RowsAtCompileTime, 1, 0, MaxRowsAtCompileTime, 1> TmpMatrixType;
typedef Transpositions<RowsAtCompileTime, MaxRowsAtCompileTime> TranspositionType;
typedef PermutationMatrix<RowsAtCompileTime, MaxRowsAtCompileTime> PermutationType;
typedef internal::LDLT_Traits<MatrixType,UpLo> Traits;
/** \brief Default Constructor.
*
* The default constructor is useful in cases in which the user intends to
* perform decompositions via LDLT::compute(const MatrixType&).
*/
LDLT()
: m_matrix(),
m_transpositions(),
m_sign(internal::ZeroSign),
m_isInitialized(false)
{}
/** \brief Default Constructor with memory preallocation
*
* Like the default constructor but with preallocation of the internal data
* according to the specified problem \a size.
* \sa LDLT()
*/
explicit LDLT(Index size)
: m_matrix(size, size),
m_transpositions(size),
m_temporary(size),
m_sign(internal::ZeroSign),
m_isInitialized(false)
{}
/** \brief Constructor with decomposition
*
* This calculates the decomposition for the input \a matrix.
*
* \sa LDLT(Index size)
*/
template<typename InputType>
explicit LDLT(const EigenBase<InputType>& matrix)
: m_matrix(matrix.rows(), matrix.cols()),
m_transpositions(matrix.rows()),
m_temporary(matrix.rows()),
m_sign(internal::ZeroSign),
m_isInitialized(false)
{
compute(matrix.derived());
}
/** \brief Constructs a LDLT factorization from a given matrix
*
* This overloaded constructor is provided for \link InplaceDecomposition inplace decomposition \endlink when \c MatrixType is a Eigen::Ref.
*
* \sa LDLT(const EigenBase&)
*/
template<typename InputType>
explicit LDLT(EigenBase<InputType>& matrix)
: m_matrix(matrix.derived()),
m_transpositions(matrix.rows()),
m_temporary(matrix.rows()),
m_sign(internal::ZeroSign),
m_isInitialized(false)
{
compute(matrix.derived());
}
/** Clear any existing decomposition
* \sa rankUpdate(w,sigma)
*/
void setZero()
{
m_isInitialized = false;
}
/** \returns a view of the upper triangular matrix U */
inline typename Traits::MatrixU matrixU() const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
return Traits::getU(m_matrix);
}
/** \returns a view of the lower triangular matrix L */
inline typename Traits::MatrixL matrixL() const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
return Traits::getL(m_matrix);
}
/** \returns the permutation matrix P as a transposition sequence.
*/
inline const TranspositionType& transpositionsP() const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
return m_transpositions;
}
/** \returns the coefficients of the diagonal matrix D */
inline Diagonal<const MatrixType> vectorD() const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
return m_matrix.diagonal();
}
/** \returns true if the matrix is positive (semidefinite) */
inline bool isPositive() const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
return m_sign == internal::PositiveSemiDef || m_sign == internal::ZeroSign;
}
/** \returns true if the matrix is negative (semidefinite) */
inline bool isNegative(void) const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
return m_sign == internal::NegativeSemiDef || m_sign == internal::ZeroSign;
}
/** \returns a solution x of \f$ A x = b \f$ using the current decomposition of A.
*
* This function also supports in-place solves using the syntax <tt>x = decompositionObject.solve(x)</tt> .
*
* \note_about_checking_solutions
*
* More precisely, this method solves \f$ A x = b \f$ using the decomposition \f$ A = P^T L D L^* P \f$
* by solving the systems \f$ P^T y_1 = b \f$, \f$ L y_2 = y_1 \f$, \f$ D y_3 = y_2 \f$,
* \f$ L^* y_4 = y_3 \f$ and \f$ P x = y_4 \f$ in succession. If the matrix \f$ A \f$ is singular, then
* \f$ D \f$ will also be singular (all the other matrices are invertible). In that case, the
* least-square solution of \f$ D y_3 = y_2 \f$ is computed. This does not mean that this function
* computes the least-square solution of \f$ A x = b \f$ is \f$ A \f$ is singular.
*
* \sa MatrixBase::ldlt(), SelfAdjointView::ldlt()
*/
template<typename Rhs>
inline const Solve<LDLT, Rhs>
solve(const MatrixBase<Rhs>& b) const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
eigen_assert(m_matrix.rows()==b.rows()
&& "LDLT::solve(): invalid number of rows of the right hand side matrix b");
return Solve<LDLT, Rhs>(*this, b.derived());
}
template<typename Derived>
bool solveInPlace(MatrixBase<Derived> &bAndX) const;
template<typename InputType>
LDLT& compute(const EigenBase<InputType>& matrix);
/** \returns an estimate of the reciprocal condition number of the matrix of
* which \c *this is the LDLT decomposition.
*/
RealScalar rcond() const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
return internal::rcond_estimate_helper(m_l1_norm, *this);
}
template <typename Derived>
LDLT& rankUpdate(const MatrixBase<Derived>& w, const RealScalar& alpha=1);
/** \returns the internal LDLT decomposition matrix
*
* TODO: document the storage layout
*/
inline const MatrixType& matrixLDLT() const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
return m_matrix;
}
MatrixType reconstructedMatrix() const;
/** \returns the adjoint of \c *this, that is, a const reference to the decomposition itself as the underlying matrix is self-adjoint.
*
* This method is provided for compatibility with other matrix decompositions, thus enabling generic code such as:
* \code x = decomposition.adjoint().solve(b) \endcode
*/
const LDLT& adjoint() const { return *this; };
inline Index rows() const { return m_matrix.rows(); }
inline Index cols() const { return m_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 && "LDLT is not initialized.");
return m_info;
}
#ifndef EIGEN_PARSED_BY_DOXYGEN
template<typename RhsType, typename DstType>
void _solve_impl(const RhsType &rhs, DstType &dst) const;
#endif
protected:
static void check_template_parameters()
{
EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);
}
/** \internal
* Used to compute and store the Cholesky decomposition A = L D L^* = U^* D U.
* The strict upper part is used during the decomposition, the strict lower
* part correspond to the coefficients of L (its diagonal is equal to 1 and
* is not stored), and the diagonal entries correspond to D.
*/
MatrixType m_matrix;
RealScalar m_l1_norm;
TranspositionType m_transpositions;
TmpMatrixType m_temporary;
internal::SignMatrix m_sign;
bool m_isInitialized;
ComputationInfo m_info;
};
namespace internal {
template<int UpLo> struct ldlt_inplace;
template<> struct ldlt_inplace<Lower>
{
template<typename MatrixType, typename TranspositionType, typename Workspace>
static bool unblocked(MatrixType& mat, TranspositionType& transpositions, Workspace& temp, SignMatrix& sign)
{
using std::abs;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
typedef typename TranspositionType::StorageIndex IndexType;
eigen_assert(mat.rows()==mat.cols());
const Index size = mat.rows();
bool found_zero_pivot = false;
bool ret = true;
if (size <= 1)
{
transpositions.setIdentity();
if (numext::real(mat.coeff(0,0)) > static_cast<RealScalar>(0) ) sign = PositiveSemiDef;
else if (numext::real(mat.coeff(0,0)) < static_cast<RealScalar>(0)) sign = NegativeSemiDef;
else sign = ZeroSign;
return true;
}
for (Index k = 0; k < size; ++k)
{
// Find largest diagonal element
Index index_of_biggest_in_corner;
mat.diagonal().tail(size-k).cwiseAbs().maxCoeff(&index_of_biggest_in_corner);
index_of_biggest_in_corner += k;
transpositions.coeffRef(k) = IndexType(index_of_biggest_in_corner);
if(k != index_of_biggest_in_corner)
{
// apply the transposition while taking care to consider only
// the lower triangular part
Index s = size-index_of_biggest_in_corner-1; // trailing size after the biggest element
mat.row(k).head(k).swap(mat.row(index_of_biggest_in_corner).head(k));
mat.col(k).tail(s).swap(mat.col(index_of_biggest_in_corner).tail(s));
std::swap(mat.coeffRef(k,k),mat.coeffRef(index_of_biggest_in_corner,index_of_biggest_in_corner));
for(Index i=k+1;i<index_of_biggest_in_corner;++i)
{
Scalar tmp = mat.coeffRef(i,k);
mat.coeffRef(i,k) = numext::conj(mat.coeffRef(index_of_biggest_in_corner,i));
mat.coeffRef(index_of_biggest_in_corner,i) = numext::conj(tmp);
}
if(NumTraits<Scalar>::IsComplex)
mat.coeffRef(index_of_biggest_in_corner,k) = numext::conj(mat.coeff(index_of_biggest_in_corner,k));
}
// partition the matrix:
// A00 | - | -
// lu = A10 | A11 | -
// A20 | A21 | A22
Index rs = size - k - 1;
Block<MatrixType,Dynamic,1> A21(mat,k+1,k,rs,1);
Block<MatrixType,1,Dynamic> A10(mat,k,0,1,k);
Block<MatrixType,Dynamic,Dynamic> A20(mat,k+1,0,rs,k);
if(k>0)
{
temp.head(k) = mat.diagonal().real().head(k).asDiagonal() * A10.adjoint();
mat.coeffRef(k,k) -= (A10 * temp.head(k)).value();
if(rs>0)
A21.noalias() -= A20 * temp.head(k);
}
// In some previous versions of Eigen (e.g., 3.2.1), the scaling was omitted if the pivot
// was smaller than the cutoff value. However, since LDLT is not rank-revealing
// we should only make sure that we do not introduce INF or NaN values.
// Remark that LAPACK also uses 0 as the cutoff value.
RealScalar realAkk = numext::real(mat.coeffRef(k,k));
bool pivot_is_valid = (abs(realAkk) > RealScalar(0));
if(k==0 && !pivot_is_valid)
{
// The entire diagonal is zero, there is nothing more to do
// except filling the transpositions, and checking whether the matrix is zero.
sign = ZeroSign;
for(Index j = 0; j<size; ++j)
{
transpositions.coeffRef(j) = IndexType(j);
ret = ret && (mat.col(j).tail(size-j-1).array()==Scalar(0)).all();
}
return ret;
}
if((rs>0) && pivot_is_valid)
A21 /= realAkk;
if(found_zero_pivot && pivot_is_valid) ret = false; // factorization failed
else if(!pivot_is_valid) found_zero_pivot = true;
if (sign == PositiveSemiDef) {
if (realAkk < static_cast<RealScalar>(0)) sign = Indefinite;
} else if (sign == NegativeSemiDef) {
if (realAkk > static_cast<RealScalar>(0)) sign = Indefinite;
} else if (sign == ZeroSign) {
if (realAkk > static_cast<RealScalar>(0)) sign = PositiveSemiDef;
else if (realAkk < static_cast<RealScalar>(0)) sign = NegativeSemiDef;
}
}
return ret;
}
// Reference for the algorithm: Davis and Hager, "Multiple Rank
// Modifications of a Sparse Cholesky Factorization" (Algorithm 1)
// Trivial rearrangements of their computations (Timothy E. Holy)
// allow their algorithm to work for rank-1 updates even if the
// original matrix is not of full rank.
// Here only rank-1 updates are implemented, to reduce the
// requirement for intermediate storage and improve accuracy
template<typename MatrixType, typename WDerived>
static bool updateInPlace(MatrixType& mat, MatrixBase<WDerived>& w, const typename MatrixType::RealScalar& sigma=1)
{
using numext::isfinite;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
const Index size = mat.rows();
eigen_assert(mat.cols() == size && w.size()==size);
RealScalar alpha = 1;
// Apply the update
for (Index j = 0; j < size; j++)
{
// Check for termination due to an original decomposition of low-rank
if (!(isfinite)(alpha))
break;
// Update the diagonal terms
RealScalar dj = numext::real(mat.coeff(j,j));
Scalar wj = w.coeff(j);
RealScalar swj2 = sigma*numext::abs2(wj);
RealScalar gamma = dj*alpha + swj2;
mat.coeffRef(j,j) += swj2/alpha;
alpha += swj2/dj;
// Update the terms of L
Index rs = size-j-1;
w.tail(rs) -= wj * mat.col(j).tail(rs);
if(gamma != 0)
mat.col(j).tail(rs) += (sigma*numext::conj(wj)/gamma)*w.tail(rs);
}
return true;
}
template<typename MatrixType, typename TranspositionType, typename Workspace, typename WType>
static bool update(MatrixType& mat, const TranspositionType& transpositions, Workspace& tmp, const WType& w, const typename MatrixType::RealScalar& sigma=1)
{
// Apply the permutation to the input w
tmp = transpositions * w;
return ldlt_inplace<Lower>::updateInPlace(mat,tmp,sigma);
}
};
template<> struct ldlt_inplace<Upper>
{
template<typename MatrixType, typename TranspositionType, typename Workspace>
static EIGEN_STRONG_INLINE bool unblocked(MatrixType& mat, TranspositionType& transpositions, Workspace& temp, SignMatrix& sign)
{
Transpose<MatrixType> matt(mat);
return ldlt_inplace<Lower>::unblocked(matt, transpositions, temp, sign);
}
template<typename MatrixType, typename TranspositionType, typename Workspace, typename WType>
static EIGEN_STRONG_INLINE bool update(MatrixType& mat, TranspositionType& transpositions, Workspace& tmp, WType& w, const typename MatrixType::RealScalar& sigma=1)
{
Transpose<MatrixType> matt(mat);
return ldlt_inplace<Lower>::update(matt, transpositions, tmp, w.conjugate(), sigma);
}
};
template<typename MatrixType> struct LDLT_Traits<MatrixType,Lower>
{
typedef const TriangularView<const MatrixType, UnitLower> MatrixL;
typedef const TriangularView<const typename MatrixType::AdjointReturnType, UnitUpper> MatrixU;
static inline MatrixL getL(const MatrixType& m) { return MatrixL(m); }
static inline MatrixU getU(const MatrixType& m) { return MatrixU(m.adjoint()); }
};
template<typename MatrixType> struct LDLT_Traits<MatrixType,Upper>
{
typedef const TriangularView<const typename MatrixType::AdjointReturnType, UnitLower> MatrixL;
typedef const TriangularView<const MatrixType, UnitUpper> MatrixU;
static inline MatrixL getL(const MatrixType& m) { return MatrixL(m.adjoint()); }
static inline MatrixU getU(const MatrixType& m) { return MatrixU(m); }
};
} // end namespace internal
/** Compute / recompute the LDLT decomposition A = L D L^* = U^* D U of \a matrix
*/
template<typename MatrixType, int _UpLo>
template<typename InputType>
LDLT<MatrixType,_UpLo>& LDLT<MatrixType,_UpLo>::compute(const EigenBase<InputType>& a)
{
check_template_parameters();
eigen_assert(a.rows()==a.cols());
const Index size = a.rows();
m_matrix = a.derived();
// Compute matrix L1 norm = max abs column sum.
m_l1_norm = RealScalar(0);
// TODO move this code to SelfAdjointView
for (Index col = 0; col < size; ++col) {
RealScalar abs_col_sum;
if (_UpLo == Lower)
abs_col_sum = m_matrix.col(col).tail(size - col).template lpNorm<1>() + m_matrix.row(col).head(col).template lpNorm<1>();
else
abs_col_sum = m_matrix.col(col).head(col).template lpNorm<1>() + m_matrix.row(col).tail(size - col).template lpNorm<1>();
if (abs_col_sum > m_l1_norm)
m_l1_norm = abs_col_sum;
}
m_transpositions.resize(size);
m_isInitialized = false;
m_temporary.resize(size);
m_sign = internal::ZeroSign;
m_info = internal::ldlt_inplace<UpLo>::unblocked(m_matrix, m_transpositions, m_temporary, m_sign) ? Success : NumericalIssue;
m_isInitialized = true;
return *this;
}
/** Update the LDLT decomposition: given A = L D L^T, efficiently compute the decomposition of A + sigma w w^T.
* \param w a vector to be incorporated into the decomposition.
* \param sigma a scalar, +1 for updates and -1 for "downdates," which correspond to removing previously-added column vectors. Optional; default value is +1.
* \sa setZero()
*/
template<typename MatrixType, int _UpLo>
template<typename Derived>
LDLT<MatrixType,_UpLo>& LDLT<MatrixType,_UpLo>::rankUpdate(const MatrixBase<Derived>& w, const typename LDLT<MatrixType,_UpLo>::RealScalar& sigma)
{
typedef typename TranspositionType::StorageIndex IndexType;
const Index size = w.rows();
if (m_isInitialized)
{
eigen_assert(m_matrix.rows()==size);
}
else
{
m_matrix.resize(size,size);
m_matrix.setZero();
m_transpositions.resize(size);
for (Index i = 0; i < size; i++)
m_transpositions.coeffRef(i) = IndexType(i);
m_temporary.resize(size);
m_sign = sigma>=0 ? internal::PositiveSemiDef : internal::NegativeSemiDef;
m_isInitialized = true;
}
internal::ldlt_inplace<UpLo>::update(m_matrix, m_transpositions, m_temporary, w, sigma);
return *this;
}
#ifndef EIGEN_PARSED_BY_DOXYGEN
template<typename _MatrixType, int _UpLo>
template<typename RhsType, typename DstType>
void LDLT<_MatrixType,_UpLo>::_solve_impl(const RhsType &rhs, DstType &dst) const
{
eigen_assert(rhs.rows() == rows());
// dst = P b
dst = m_transpositions * rhs;
// dst = L^-1 (P b)
matrixL().solveInPlace(dst);
// dst = D^-1 (L^-1 P b)
// more precisely, use pseudo-inverse of D (see bug 241)
using std::abs;
const typename Diagonal<const MatrixType>::RealReturnType vecD(vectorD());
// In some previous versions, tolerance was set to the max of 1/highest and the maximal diagonal entry * epsilon
// as motivated by LAPACK's xGELSS:
// RealScalar tolerance = numext::maxi(vecD.array().abs().maxCoeff() * NumTraits<RealScalar>::epsilon(),RealScalar(1) / NumTraits<RealScalar>::highest());
// However, LDLT is not rank revealing, and so adjusting the tolerance wrt to the highest
// diagonal element is not well justified and leads to numerical issues in some cases.
// Moreover, Lapack's xSYTRS routines use 0 for the tolerance.
RealScalar tolerance = RealScalar(1) / NumTraits<RealScalar>::highest();
for (Index i = 0; i < vecD.size(); ++i)
{
if(abs(vecD(i)) > tolerance)
dst.row(i) /= vecD(i);
else
dst.row(i).setZero();
}
// dst = L^-T (D^-1 L^-1 P b)
matrixU().solveInPlace(dst);
// dst = P^-1 (L^-T D^-1 L^-1 P b) = A^-1 b
dst = m_transpositions.transpose() * dst;
}
#endif
/** \internal use x = ldlt_object.solve(x);
*
* This is the \em in-place version of solve().
*
* \param bAndX represents both the right-hand side matrix b and result x.
*
* \returns true always! If you need to check for existence of solutions, use another decomposition like LU, QR, or SVD.
*
* This version avoids a copy when the right hand side matrix b is not
* needed anymore.
*
* \sa LDLT::solve(), MatrixBase::ldlt()
*/
template<typename MatrixType,int _UpLo>
template<typename Derived>
bool LDLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
eigen_assert(m_matrix.rows() == bAndX.rows());
bAndX = this->solve(bAndX);
return true;
}
/** \returns the matrix represented by the decomposition,
* i.e., it returns the product: P^T L D L^* P.
* This function is provided for debug purpose. */
template<typename MatrixType, int _UpLo>
MatrixType LDLT<MatrixType,_UpLo>::reconstructedMatrix() const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
const Index size = m_matrix.rows();
MatrixType res(size,size);
// P
res.setIdentity();
res = transpositionsP() * res;
// L^* P
res = matrixU() * res;
// D(L^*P)
res = vectorD().real().asDiagonal() * res;
// L(DL^*P)
res = matrixL() * res;
// P^T (LDL^*P)
res = transpositionsP().transpose() * res;
return res;
}
/** \cholesky_module
* \returns the Cholesky decomposition with full pivoting without square root of \c *this
* \sa MatrixBase::ldlt()
*/
template<typename MatrixType, unsigned int UpLo>
inline const LDLT<typename SelfAdjointView<MatrixType, UpLo>::PlainObject, UpLo>
SelfAdjointView<MatrixType, UpLo>::ldlt() const
{
return LDLT<PlainObject,UpLo>(m_matrix);
}
/** \cholesky_module
* \returns the Cholesky decomposition with full pivoting without square root of \c *this
* \sa SelfAdjointView::ldlt()
*/
template<typename Derived>
inline const LDLT<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::ldlt() const
{
return LDLT<PlainObject>(derived());
}
} // end namespace Eigen
#endif // EIGEN_LDLT_H
================================================
FILE: app/src/main/cpp/Eigen/src/Cholesky/LLT.h
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// 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_LLT_H
#define EIGEN_LLT_H
namespace Eigen {
namespace internal{
template<typename MatrixType, int UpLo> struct LLT_Traits;
}
/** \ingroup Cholesky_Module
*
* \class LLT
*
* \brief Standard Cholesky decomposition (LL^T) of a matrix and associated features
*
* \tparam _MatrixType the type of the matrix of which we are computing the LL^T Cholesky decomposition
* \tparam _UpLo the triangular part that will be used for the decompositon: Lower (default) or Upper.
* The other triangular part won't be read.
*
* This class performs a LL^T Cholesky decomposition of a symmetric, positive definite
* matrix A such that A = LL^* = U^*U, where L is lower triangular.
*
* While the Cholesky decomposition is particularly useful to solve selfadjoint problems like D^*D x = b,
* for that purpose, we recommend the Cholesky decomposition without square root which is more stable
* and even faster. Nevertheless, this standard Cholesky decomposition remains useful in many other
* situations like generalised eigen problems with hermitian matrices.
*
* Remember that Cholesky decompositions are not rank-revealing. This LLT decomposition is only stable on positive definite matrices,
* use LDLT instead for the semidefinite case. Also, do not use a Cholesky decomposition to determine whether a system of equations
* has a solution.
*
* Example: \include LLT_example.cpp
* Output: \verbinclude LLT_example.out
*
* This class supports the \link InplaceDecomposition inplace decomposition \endlink mechanism.
*
* \sa MatrixBase::llt(), SelfAdjointView::llt(), class LDLT
*/
/* HEY THIS DOX IS DISABLED BECAUSE THERE's A BUG EITHER HERE OR IN LDLT ABOUT THAT (OR BOTH)
* Note that during the decomposition, only the upper triangular part of A is considered. Therefore,
* the strict lower part does not have to store correct values.
*/
template<typename _MatrixType, int _UpLo> class LLT
{
public:
typedef _MatrixType MatrixType;
enum {
RowsAtCompileTime = MatrixType::RowsAtCompileTime,
ColsAtCompileTime = MatrixType::ColsAtCompileTime,
MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
};
typedef typename MatrixType::Scalar Scalar;
typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
typedef typename MatrixType::StorageIndex StorageIndex;
enum {
PacketSize = internal::packet_traits<Scalar>::size,
AlignmentMask = int(PacketSize)-1,
UpLo = _UpLo
};
typedef internal::LLT_Traits<MatrixType,UpLo> Traits;
/**
* \brief Default Constructor.
*
* The default constructor is useful in cases in which the user intends to
* perform decompositions via LLT::compute(const MatrixType&).
*/
LLT() : m_matrix(), m_isInitialized(false) {}
/** \brief Default Constructor with memory preallocation
*
* Like the default constructor but with preallocation of the internal data
* according to the specified problem \a size.
* \sa LLT()
*/
explicit LLT(Index size) : m_matrix(size, size),
m_isInitialized(false) {}
template<typename InputType>
explicit LLT(const EigenBase<InputType>& matrix)
: m_matrix(matrix.rows(), matrix.cols()),
m_isInitialized(false)
{
compute(matrix.derived());
}
/** \brief Constructs a LDLT factorization from a given matrix
*
* This overloaded constructor is provided for \link InplaceDecomposition inplace decomposition \endlink when
* \c MatrixType is a Eigen::Ref.
*
* \sa LLT(const EigenBase&)
*/
template<typename InputType>
explicit LLT(EigenBase<InputType>& matrix)
: m_matrix(matrix.derived()),
m_isInitialized(false)
{
compute(matrix.derived());
}
/** \returns a view of the upper triangular matrix U */
inline typename Traits::MatrixU matrixU() const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
return Traits::getU(m_matrix);
}
/** \returns a view of the lower triangular matrix L */
inline typename Traits::MatrixL matrixL() const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
return Traits::getL(m_matrix);
}
/** \returns the solution x of \f$ A x = b \f$ using the current decomposition of A.
*
* Since this LLT class assumes anyway that the matrix A is invertible, the solution
* theoretically exists and is unique regardless of b.
*
* Example: \include LLT_solve.cpp
* Output: \verbinclude LLT_solve.out
*
* \sa solveInPlace(), MatrixBase::llt(), SelfAdjointView::llt()
*/
template<typename Rhs>
inline const Solve<LLT, Rhs>
solve(const MatrixBase<Rhs>& b) const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
eigen_assert(m_matrix.rows()==b.rows()
&& "LLT::solve(): invalid number of rows of the right hand side matrix b");
return Solve<LLT, Rhs>(*this, b.derived());
}
template<typename Derived>
void solveInPlace(MatrixBase<Derived> &bAndX) const;
template<typename InputType>
LLT& compute(const EigenBase<InputType>& matrix);
/** \returns an estimate of the reciprocal condition number of the matrix of
* which \c *this is the Cholesky decomposition.
*/
RealScalar rcond() const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
eigen_assert(m_info == Success && "LLT failed because matrix appears to be negative");
return internal::rcond_estimate_helper(m_l1_norm, *this);
}
/** \returns the LLT decomposition matrix
*
* TODO: document the storage layout
*/
inline const MatrixType& matrixLLT() const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
return m_matrix;
}
MatrixType reconstructedMatrix() const;
/** \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 && "LLT is not initialized.");
return m_info;
}
/** \returns the adjoint of \c *this, that is, a const reference to the decomposition itself as the underlying matrix is self-adjoint.
*
* This method is provided for compatibility with other matrix decompositions, thus enabling generic code such as:
* \code x = decomposition.adjoint().solve(b) \endcode
*/
const LLT& adjoint() const { return *this; };
inline Index rows() const { return m_matrix.rows(); }
inline Index cols() const { return m_matrix.cols(); }
template<typename VectorType>
LLT rankUpdate(const VectorType& vec, const RealScalar& sigma = 1);
#ifndef EIGEN_PARSED_BY_DOXYGEN
template<typename RhsType, typename DstType>
void _solve_impl(const RhsType &rhs, DstType &dst) const;
#endif
protected:
static void check_template_parameters()
{
EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);
}
/** \internal
* Used to compute and store L
* The strict upper part is not used and even not initialized.
*/
MatrixType m_matrix;
RealScalar m_l1_norm;
bool m_isInitialized;
ComputationInfo m_info;
};
namespace internal {
template<typename Scalar, int UpLo> struct llt_inplace;
template<typename MatrixType, typename VectorType>
static Index llt_rank_update_lower(MatrixType& mat, const VectorType& vec, const typename MatrixType::RealScalar& sigma)
{
using std::sqrt;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
typedef typename MatrixType::ColXpr ColXpr;
typedef typename internal::remove_all<ColXpr>::type ColXprCleaned;
typedef typename ColXprCleaned::SegmentReturnType ColXprSegment;
typedef Matrix<Scalar,Dynamic,1> TempVectorType;
typedef typename TempVectorType::SegmentReturnType TempVecSegment;
Index n = mat.cols();
eigen_assert(mat.rows()==n && vec.size()==n);
TempVectorType temp;
if(sigma>0)
{
// This version is based on Givens rotations.
// It is faster than the other one below, but only works for updates,
// i.e., for sigma > 0
temp = sqrt(sigma) * vec;
for(Index i=0; i<n; ++i)
{
JacobiRotation<Scalar> g;
g.makeGivens(mat(i,i), -temp(i), &mat(i,i));
Index rs = n-i-1;
if(rs>0)
{
ColXprSegment x(mat.col(i).tail(rs));
TempVecSegment y(temp.tail(rs));
apply_rotation_in_the_plane(x, y, g);
}
}
}
else
{
temp = vec;
RealScalar beta = 1;
for(Index j=0; j<n; ++j)
{
RealScalar Ljj = numext::real(mat.coeff(j,j));
RealScalar dj = numext::abs2(Ljj);
Scalar wj = temp.coeff(j);
RealScalar swj2 = sigma*numext::abs2(wj);
RealScalar gamma = dj*beta + swj2;
RealScalar x = dj + swj2/beta;
if (x<=RealScalar(0))
return j;
RealScalar nLjj = sqrt(x);
mat.coeffRef(j,j) = nLjj;
beta += swj2/dj;
// Update the terms of L
Index rs = n-j-1;
if(rs)
{
temp.tail(rs) -= (wj/Ljj) * mat.col(j).tail(rs);
if(gamma != 0)
mat.col(j).tail(rs) = (nLjj/Ljj) * mat.col(j).tail(rs) + (nLjj * sigma*numext::conj(wj)/gamma)*temp.tail(rs);
}
}
}
return -1;
}
template<typename Scalar> struct llt_inplace<Scalar, Lower>
{
typedef typename NumTraits<Scalar>::Real RealScalar;
template<typename MatrixType>
static Index unblocked(MatrixType& mat)
{
using std::sqrt;
eigen_assert(mat.rows()==mat.cols());
const Index size = mat.rows();
for(Index k = 0; k < size; ++k)
{
Index rs = size-k-1; // remaining size
Block<MatrixType,Dynamic,1> A21(mat,k+1,k,rs,1);
Block<MatrixType,1,Dynamic> A10(mat,k,0,1,k);
Block<MatrixType,Dynamic,Dynamic> A20(mat,k+1,0,rs,k);
RealScalar x = numext::real(mat.coeff(k,k));
if (k>0) x -= A10.squaredNorm();
if (x<=RealScalar(0))
return k;
mat.coeffRef(k,k) = x = sqrt(x);
if (k>0 && rs>0) A21.noalias() -= A20 * A10.adjoint();
if (rs>0) A21 /= x;
}
return -1;
}
template<typename MatrixType>
static Index blocked(MatrixType& m)
{
eigen_assert(m.rows()==m.cols());
Index size = m.rows();
if(size<32)
return unblocked(m);
Index blockSize = size/8;
blockSize = (blockSize/16)*16;
blockSize = (std::min)((std::max)(blockSize,Index(8)), Index(128));
for (Index k=0; k<size; k+=blockSize)
{
// partition the matrix:
// A00 | - | -
// lu = A10 | A11 | -
// A20 | A21 | A22
Index bs = (std::min)(blockSize, size-k);
Index rs = size - k - bs;
Block<MatrixType,Dynamic,Dynamic> A11(m,k, k, bs,bs);
Block<MatrixType,Dynamic,Dynamic> A21(m,k+bs,k, rs,bs);
Block<MatrixType,Dynamic,Dynamic> A22(m,k+bs,k+bs,rs,rs);
Index ret;
if((ret=unblocked(A11))>=0) return k+ret;
if(rs>0) A11.adjoint().template triangularView<Upper>().template solveInPlace<OnTheRight>(A21);
if(rs>0) A22.template selfadjointView<Lower>().rankUpdate(A21,typename NumTraits<RealScalar>::Literal(-1)); // bottleneck
}
return -1;
}
template<typename MatrixType, typename VectorType>
static Index rankUpdate(MatrixType& mat, const VectorType& vec, const RealScalar& sigma)
{
return Eigen::internal::llt_rank_update_lower(mat, vec, sigma);
}
};
template<typename Scalar> struct llt_inplace<Scalar, Upper>
{
typedef typename NumTraits<Scalar>::Real RealScalar;
template<typename MatrixType>
static EIGEN_STRONG_INLINE Index unblocked(MatrixType& mat)
{
Transpose<MatrixType> matt(mat);
return llt_inplace<Scalar, Lower>::unblocked(matt);
}
template<typename MatrixType>
static EIGEN_STRONG_INLINE Index blocked(MatrixType& mat)
{
Transpose<MatrixType> matt(mat);
return llt_inplace<Scalar, Lower>::blocked(matt);
}
template<typename MatrixType, typename VectorType>
static Index rankUpdate(MatrixType& mat, const VectorType& vec, const RealScalar& sigma)
{
Transpose<MatrixType> matt(mat);
return llt_inplace<Scalar, Lower>::rankUpdate(matt, vec.conjugate(), sigma);
}
};
template<typename MatrixType> struct LLT_Traits<MatrixType,Lower>
{
typedef const TriangularView<const MatrixType, Lower> MatrixL;
typedef const TriangularView<const typename MatrixType::AdjointReturnType, Upper> MatrixU;
static inline MatrixL getL(const MatrixType& m) { return MatrixL(m); }
static inline MatrixU getU(const MatrixType& m) { return MatrixU(m.adjoint()); }
static bool inplace_decomposition(MatrixType& m)
{ return llt_inplace<typename MatrixType::Scalar, Lower>::blocked(m)==-1; }
};
template<typename MatrixType> struct LLT_Traits<MatrixType,Upper>
{
typedef const TriangularView<const typename MatrixType::AdjointReturnType, Lower> MatrixL;
typedef const TriangularView<const MatrixType, Upper> MatrixU;
static inline MatrixL getL(const MatrixType& m) { return MatrixL(m.adjoint()); }
static inline MatrixU getU(const MatrixType& m) { return MatrixU(m); }
static bool inplace_decomposition(MatrixType& m)
{ return llt_inplace<typename MatrixType::Scalar, Upper>::blocked(m)==-1; }
};
} // end namespace internal
/** Computes / recomputes the Cholesky decomposition A = LL^* = U^*U of \a matrix
*
* \returns a reference to *this
*
* Example: \include TutorialLinAlgComputeTwice.cpp
* Output: \verbinclude TutorialLinAlgComputeTwice.out
*/
template<typename MatrixType, int _UpLo>
template<typename InputType>
LLT<MatrixType,_UpLo>& LLT<MatrixType,_UpLo>::compute(const EigenBase<InputType>& a)
{
check_template_parameters();
eigen_assert(a.rows()==a.cols());
const Index size = a.rows();
m_matrix.resize(size, size);
m_matrix = a.derived();
// Compute matrix L1 norm = max abs column sum.
m_l1_norm = RealScalar(0);
// TODO move this code to SelfAdjointView
for (Index col = 0; col < size; ++col) {
RealScalar abs_col_sum;
if (_UpLo == Lower)
abs_col_sum = m_matrix.col(col).tail(size - col).template lpNorm<1>() + m_matrix.row(col).head(col).template lpNorm<1>();
else
abs_col_sum = m_matrix.col(col).head(col).template lpNorm<1>() + m_matrix.row(col).tail(size - col).template lpNorm<1>();
if (abs_col_sum > m_l1_norm)
m_l1_norm = abs_col_sum;
}
m_isInitialized = true;
bool ok = Traits::inplace_decomposition(m_matrix);
m_info = ok ? Success : NumericalIssue;
return *this;
}
/** Performs a rank one update (or dowdate) of the current decomposition.
* If A = LL^* before the rank one update,
* then after it we have LL^* = A + sigma * v v^* where \a v must be a vector
* of same dimension.
*/
template<typename _MatrixType, int _UpLo>
template<typename VectorType>
LLT<_MatrixType,_UpLo> LLT<_MatrixType,_UpLo>::rankUpdate(const VectorType& v, const RealScalar& sigma)
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorType);
eigen_assert(v.size()==m_matrix.cols());
eigen_assert(m_isInitialized);
if(internal::llt_inplace<typename MatrixType::Scalar, UpLo>::rankUpdate(m_matrix,v,sigma)>=0)
m_info = NumericalIssue;
else
m_info = Success;
return *this;
}
#ifndef EIGEN_PARSED_BY_DOXYGEN
template<typename _MatrixType,int _UpLo>
template<typename RhsType, typename DstType>
void LLT<_MatrixType,_UpLo>::_solve_impl(const RhsType &rhs, DstType &dst) const
{
dst = rhs;
solveInPlace(dst);
}
#endif
/** \internal use x = llt_object.solve(x);
*
* This is the \em in-place version of solve().
*
* \param bAndX represents both the right-hand side matrix b and result x.
*
* This version avoids a copy when the right hand side matrix b is not needed anymore.
*
* \sa LLT::solve(), MatrixBase::llt()
*/
template<typename MatrixType, int _UpLo>
template<typename Derived>
void LLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
eigen_assert(m_matrix.rows()==bAndX.rows());
matrixL().solveInPlace(bAndX);
matrixU().solveInPlace(bAndX);
}
/** \returns the matrix represented by the decomposition,
* i.e., it returns the product: L L^*.
* This function is provided for debug purpose. */
template<typename MatrixType, int _UpLo>
MatrixType LLT<MatrixType,_UpLo>::reconstructedMatrix() const
{
eigen_assert(m_isInitialized && "LLT is not initialized.");
return matrixL() * matrixL().adjoint().toDenseMatrix();
}
/** \cholesky_module
* \returns the LLT decomposition of \c *this
* \sa SelfAdjointView::llt()
*/
template<typename Derived>
inline const LLT<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::llt() const
{
return LLT<PlainObject>(derived());
}
/** \cholesky_module
* \returns the LLT decomposition of \c *this
* \sa SelfAdjointView::llt()
*/
template<typename MatrixType, unsigned int UpLo>
inline const LLT<typename SelfAdjointView<MatrixType, UpLo>::PlainObject, UpLo>
SelfAdjointView<MatrixType, UpLo>::llt() const
{
return LLT<PlainObject,UpLo>(m_matrix);
}
} // end namespace Eigen
#endif // EIGEN_LLT_H
================================================
FILE: app/src/main/cpp/Eigen/src/Cholesky/LLT_LAPACKE.h
================================================
/*
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<typename Scalar> struct lapacke_llt;
#define EIGEN_LAPACKE_LLT(EIGTYPE, BLASTYPE, LAPACKE_PREFIX) \
template<> struct lapacke_llt<EIGTYPE> \
{ \
template<typename MatrixType> \
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<lapack_int>(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<lapack_int>(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<EIGTYPE, Lower> \
{ \
template<typename MatrixType> \
static Index blocked(MatrixType& m) \
{ \
return lapacke_llt<EIGTYPE>::potrf(m, 'L'); \
} \
template<typename MatrixType, typename VectorType> \
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<EIGTYPE, Upper> \
{ \
template<typename MatrixType> \
static Index blocked(MatrixType& m) \
{ \
return lapacke_llt<EIGTYPE>::potrf(m, 'U'); \
} \
template<typename MatrixType, typename VectorType> \
static Index rankUpdate(MatrixType& mat, const VectorType& vec, const typename MatrixType::RealScalar& sigma) \
{ \
Transpose<MatrixType> matt(mat); \
return llt_inplace<EIGTYPE, Lower>::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
================================================
FILE: app/src/main/cpp/Eigen/src/CholmodSupport/CholmodSupport.h
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// 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<typename Scalar> struct cholmod_configure_matrix;
template<> struct cholmod_configure_matrix<double> {
template<typename CholmodType>
static void run(CholmodType& mat) {
mat.xtype = CHOLMOD_REAL;
mat.dtype = CHOLMOD_DOUBLE;
}
};
template<> struct cholmod_configure_matrix<std::complex<double> > {
template<typename CholmodType>
static void run(CholmodType& mat) {
mat.xtype = CHOLMOD_COMPLEX;
mat.dtype = CHOLMOD_DOUBLE;
}
};
// Other scalar types are not yet supported by Cholmod
// template<> struct cholmod_configure_matrix<float> {
// template<typename CholmodType>
// static void run(CholmodType& mat) {
// mat.xtype = CHOLMOD_REAL;
// mat.dtype = CHOLMOD_SINGLE;
// }
// };
//
// template<> struct cholmod_configure_matrix<std::complex<float> > {
// template<typename CholmodType>
// 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<typename _Scalar, int _Options, typename _StorageIndex>
cholmod_sparse viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_StorageIndex> > 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<typename _Scalar, int _Options, typename _Index>
const cholmod_sparse viewAsCholmod(const SparseMatrix<_Scalar,_Options,_Index>& mat)
{
cholmod_sparse res = viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_Index> >(mat.const_cast_derived()));
return res;
}
template<typename _Scalar, int _Options, typename _Index>
const cholmod_sparse viewAsCholmod(const SparseVector<_Scalar,_Options,_Index>& mat)
{
cholmod_sparse res = viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_Index> >(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<typename _Scalar, int _Options, typename _Index, unsigned int UpLo>
cholmod_sparse viewAsCholmod(const SparseSelfAdjointView<const SparseMatrix<_Scalar,_Options,_Index>, UpLo>& mat)
{
cholmod_sparse res = viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_Index> >(mat.matrix().const_cast_derived()));
if(UpLo==Upper) res.stype = 1;
if(UpLo==Lower) res.stype = -1;
// swap stype for rowmajor matrices (only works for real matrices)
EIGEN_STATIC_ASSERT((_Options & RowMajorBit) == 0 || NumTraits<_Scalar>::IsComplex == 0, THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);
if(_Options & RowMajorBit) 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<typename Derived>
cholmod_dense viewAsCholmod(MatrixBase<Derived>& mat)
{
EIGEN_STATIC_ASSERT((internal::traits<Derived>::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<Scalar>::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<typename Scalar, int Flags, typename StorageIndex>
MappedSparseMatrix<Scalar,Flags,StorageIndex> viewAsEigen(cholmod_sparse& cm)
{
return MappedSparseMatrix<Scalar,Flags,StorageIndex>
(cm.nrow, cm.ncol, static_cast<StorageIndex*>(cm.p)[cm.ncol],
static_cast<StorageIndex*>(cm.p), static_cast<StorageIndex*>(cm.i),static_cast<Scalar*>(cm.x) );
}
namespace internal {
// template specializations for int and long that call the correct cholmod method
#define EIGEN_CHOLMOD_SPECIALIZE0(ret, name) \
template<typename _StorageIndex> ret cm_ ## name (cholmod_common &Common) { return cholmod_ ## name (&Common); } \
template<> ret cm_ ## name<long> (cholmod_common &Common) { return cholmod_l_ ## name (&Common); }
#define EIGEN_CHOLMOD_SPECIALIZE1(ret, name, t1, a1) \
template<typename _StorageIndex> ret cm_ ## name (t1& a1, cholmod_common &Common) { return cholmod_ ## name (&a1, &Common); } \
template<> ret cm_ ## name<long> (t1& a1, cholmod_common &Common) { return cholmod_l_ ## name (&a1, &Common); }
EIGEN_CHOLMOD_SPECIALIZE0(int, start)
EIGEN_CHOLMOD_SPECIALIZE0(int, finish)
EIGEN_CHOLMOD_SPECIALIZE1(int, free_factor, cholmod_factor*, L)
EIGEN_CHOLMOD_SPECIALIZE1(int, free_dense, cholmod_dense*, X)
EIGEN_CHOLMOD_SPECIALIZE1(int, free_sparse, cholmod_sparse*, A)
EIGEN_CHOLMOD_SPECIALIZE1(cholmod_factor*, analyze, cholmod_sparse, A)
template<typename _StorageIndex> cholmod_dense* cm_solve (int sys, cholmod_factor& L, cholmod_dense& B, cholmod_common &Common) { return cholmod_solve (sys, &L, &B, &Common); }
template<> cholmod_dense* cm_solve<long> (int sys, cholmod_factor& L, cholmod_dense& B, cholmod_common &Common) { return cholmod_l_solve (sys, &L, &B, &Common); }
template<typename _StorageIndex> cholmod_sparse* cm_spsolve (int sys, cholmod_factor& L, cholmod_sparse& B, cholmod_common &Common) { return cholmod_spsolve (sys, &L, &B, &Common); }
template<> cholmod_sparse* cm_spsolve<long> (int sys, cholmod_factor& L, cholmod_sparse& B, cholmod_common &Common) { return cholmod_l_spsolve (sys, &L, &B, &Common); }
template<typename _StorageIndex>
int cm_factorize_p (cholmod_sparse* A, double beta[2], _StorageIndex* fset, std::size_t fsize, cholmod_factor* L, cholmod_common &Common) { return cholmod_factorize_p (A, beta, fset, fsize, L, &Common); }
template<>
int cm_factorize_p<long> (cholmod_sparse* A, double beta[2], long* fset, std::size_t fsize, cholmod_factor* L, cholmod_common &Common) { return cholmod_l_factorize_p (A, beta, fset, fsize, L, &Common); }
#undef EIGEN_CHOLMOD_SPECIALIZE0
#undef EIGEN_CHOLMOD_SPECIALIZE1
} // namespace internal
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<typename _MatrixType, int _UpLo, typename Derived>
class CholmodBase : public SparseSolverBase<Derived>
{
protected:
typedef SparseSolverBase<Derived> 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<double,RealScalar>::value), CHOLMOD_SUPPORTS_DOUBLE_PRECISION_ONLY);
m_shiftOffset[0] = m_shiftOffset[1] = 0.0;
internal::cm_start<StorageIndex>(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<double,RealScalar>::value), CHOLMOD_SUPPORTS_DOUBLE_PRECISION_ONLY);
m_shiftOffset[0] = m_shiftOffset[1] = 0.0;
internal::cm_start<StorageIndex>(m_cholmod);
compute(matrix);
}
~CholmodBase()
{
if(m_cholmodFactor)
internal::cm_free_factor<StorageIndex>(m_cholmodFactor, m_cholmod);
internal::cm_finish<StorageIndex>(m_cholmod);
}
inline StorageIndex cols() const { return internal::convert_index<StorageIndex, Index>(m_cholmodFactor->n); }
inline StorageIndex rows() const { return internal::convert_index<StorageIndex, Index>(m_cholmodFactor->n); }
/** \brief Reports whether previous computation was successful.
*
* \returns \c Success if computation was successful,
* \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)
{
internal::cm_free_factor<StorageIndex>(m_cholmodFactor, m_cholmod);
m_cholmodFactor = 0;
}
cholmod_sparse A = viewAsCholmod(matrix.template selfadjointView<UpLo>());
m_cholmodFactor = internal::cm_analyze<StorageIndex>(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<UpLo>());
internal::cm_factorize_p<StorageIndex>(&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<typename Rhs,typename Dest>
void _solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &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 storage without inner-stride, which corresponds to the default behavior of Ref.
Ref<const Matrix<typename Rhs::Scalar,Dynamic,Dynamic,ColMajor> > b_ref(b.derived());
cholmod_dense b_cd = viewAsCholmod(b_ref);
cholmod_dense* x_cd = internal::cm_solve<StorageIndex>(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.)
// NOTE Actually, the copy can be avoided by calling cholmod_solve2 instead of cholmod_solve
dest = Matrix<Scalar,Dest::RowsAtCompileTime,Dest::ColsAtCompileTime>::Map(reinterpret_cast<Scalar*>(x_cd->x),b.rows(),b.cols());
internal::cm_free_dense<StorageIndex>(x_cd, m_cholmod);
}
/** \internal */
template<typename RhsDerived, typename DestDerived>
void _solve_impl(const SparseMatrixBase<RhsDerived> &b, SparseMatrixBase<DestDerived> &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<SparseMatrix<typename RhsDerived::Scalar,ColMajor,typename RhsDerived::StorageIndex> > b_ref(b.const_cast_derived());
cholmod_sparse b_cs = viewAsCholmod(b_ref);
cholmod_sparse* x_cs = internal::cm_spsolve<StorageIndex>(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.)
// NOTE cholmod_spsolve in fact just calls the dense solver for blocks of 4 columns at a time (similar to Eigen's sparse solver)
dest.derived() = viewAsEigen<typename DestDerived::Scalar,ColMajor,typename DestDerived::StorageIndex>(*x_cs);
internal::cm_free_sparse<StorageIndex>(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<Scalar*>(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<StorageIndex*>(m_cholmodFactor->super);
// pi[k] == offset to the description of row indices
StorageIndex *pi = static_cast<StorageIndex*>(m_cholmodFactor->pi);
// px[k] == offset to the respective dense block
StorageIndex *px = static_cast<StorageIndex*>(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<const Array<Scalar,1,Dynamic>, 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<StorageIndex*>(m_cholmodFactor->p);
Index size = m_cholmodFactor->n;
for (Index k=0; k<size; ++k)
logDet += log(real( x[p[k]] ));
}
if (m_cholmodFactor->is_ll)
logDet *= 2.0;
return logDet;
};
template<typename Stream>
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<typename _MatrixType, int _UpLo = Lower>
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<typename _MatrixType, int _UpLo = Lower>
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<typename _MatrixType, int _UpLo = Lower>
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<typename _MatrixType, int _UpLo = Lower>
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
================================================
FILE: app/src/main/cpp/Eigen/src/Core/ArithmeticSequence.h
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// 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_ARITHMETIC_SEQUENCE_H
#define EIGEN_ARITHMETIC_SEQUENCE_H
namespace Eigen {
namespace internal {
#if (!EIGEN_HAS_CXX11) || !((!EIGEN_COMP_GNUC) || EIGEN_COMP_GNUC>=48)
template<typename T> struct aseq_negate {};
template<> struct aseq_negate<Index> {
typedef Index type;
};
template<int N> struct aseq_negate<FixedInt<N> > {
typedef FixedInt<-N> type;
};
// Compilation error in the following case:
template<> struct aseq_negate<FixedInt<DynamicIndex> > {};
template<typename FirstType,typename SizeType,typename IncrType,
bool FirstIsSymbolic=Symbolic::is_symbolic<FirstType>::value,
bool SizeIsSymbolic =Symbolic::is_symbolic<SizeType>::value>
struct aseq_reverse_first_type {
typedef Index type;
};
template<typename FirstType,typename SizeType,typename IncrType>
struct aseq_reverse_first_type<FirstType,SizeType,IncrType,true,true> {
typedef Symbolic::AddExpr<FirstType,
Symbolic::ProductExpr<Symbolic::AddExpr<SizeType,Symbolic::ValueExpr<FixedInt<-1> > >,
Symbolic::ValueExpr<IncrType> >
> type;
};
template<typename SizeType,typename IncrType,typename EnableIf = void>
struct aseq_reverse_first_type_aux {
typedef Index type;
};
template<typename SizeType,typename IncrType>
struct aseq_reverse_first_type_aux<SizeType,IncrType,typename internal::enable_if<bool((SizeType::value+IncrType::value)|0x1)>::type> {
typedef FixedInt<(SizeType::value-1)*IncrType::value> type;
};
template<typename FirstType,typename SizeType,typename IncrType>
struct aseq_reverse_first_type<FirstType,SizeType,IncrType,true,false> {
typedef typename aseq_reverse_first_type_aux<SizeType,IncrType>::type Aux;
typedef Symbolic::AddExpr<FirstType,Symbolic::ValueExpr<Aux> > type;
};
template<typename FirstType,typename SizeType,typename IncrType>
struct aseq_reverse_first_type<FirstType,SizeType,IncrType,false,true> {
typedef Symbolic::AddExpr<Symbolic::ProductExpr<Symbolic::AddExpr<SizeType,Symbolic::ValueExpr<FixedInt<-1> > >,
Symbolic::ValueExpr<IncrType> >,
Symbolic::ValueExpr<> > type;
};
#endif
// Helper to cleanup the type of the increment:
template<typename T> struct cleanup_seq_incr {
typedef typename cleanup_index_type<T,DynamicIndex>::type type;
};
}
//--------------------------------------------------------------------------------
// seq(first,last,incr) and seqN(first,size,incr)
//--------------------------------------------------------------------------------
template<typename FirstType=Index,typename SizeType=Index,typename IncrType=internal::FixedInt<1> >
class ArithmeticSequence;
template<typename FirstType,typename SizeType,typename IncrType>
ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,
typename internal::cleanup_index_type<SizeType>::type,
typename internal::cleanup_seq_incr<IncrType>::type >
seqN(FirstType first, SizeType size, IncrType incr);
/** \class ArithmeticSequence
* \ingroup Core_Module
*
* This class represents an arithmetic progression \f$ a_0, a_1, a_2, ..., a_{n-1}\f$ defined by
* its \em first value \f$ a_0 \f$, its \em size (aka length) \em n, and the \em increment (aka stride)
* that is equal to \f$ a_{i+1}-a_{i}\f$ for any \em i.
*
* It is internally used as the return type of the Eigen::seq and Eigen::seqN functions, and as the input arguments
* of DenseBase::operator()(const RowIndices&, const ColIndices&), and most of the time this is the
* only way it is used.
*
* \tparam FirstType type of the first element, usually an Index,
* but internally it can be a symbolic expression
* \tparam SizeType type representing the size of the sequence, usually an Index
* or a compile time integral constant. Internally, it can also be a symbolic expression
* \tparam IncrType type of the increment, can be a runtime Index, or a compile time integral constant (default is compile-time 1)
*
* \sa Eigen::seq, Eigen::seqN, DenseBase::operator()(const RowIndices&, const ColIndices&), class IndexedView
*/
template<typename FirstType,typename SizeType,typename IncrType>
class ArithmeticSequence
{
public:
ArithmeticSequence(FirstType first, SizeType size) : m_first(first), m_size(size) {}
ArithmeticSequence(FirstType first, SizeType size, IncrType incr) : m_first(first), m_size(size), m_incr(incr) {}
enum {
SizeAtCompileTime = internal::get_fixed_value<SizeType>::value,
IncrAtCompileTime = internal::get_fixed_value<IncrType,DynamicIndex>::value
};
/** \returns the size, i.e., number of elements, of the sequence */
Index size() const { return m_size; }
/** \returns the first element \f$ a_0 \f$ in the sequence */
Index first() const { return m_first; }
/** \returns the value \f$ a_i \f$ at index \a i in the sequence. */
Index operator[](Index i) const { return m_first + i * m_incr; }
const FirstType& firstObject() const { return m_first; }
const SizeType& sizeObject() const { return m_size; }
const IncrType& incrObject() const { return m_incr; }
protected:
FirstType m_first;
SizeType m_size;
IncrType m_incr;
public:
#if EIGEN_HAS_CXX11 && ((!EIGEN_COMP_GNUC) || EIGEN_COMP_GNUC>=48)
auto reverse() const -> decltype(Eigen::seqN(m_first+(m_size+fix<-1>())*m_incr,m_size,-m_incr)) {
return seqN(m_first+(m_size+fix<-1>())*m_incr,m_size,-m_incr);
}
#else
protected:
typedef typename internal::aseq_negate<IncrType>::type ReverseIncrType;
typedef typename internal::aseq_reverse_first_type<FirstType,SizeType,IncrType>::type ReverseFirstType;
public:
ArithmeticSequence<ReverseFirstType,SizeType,ReverseIncrType>
reverse() const {
return seqN(m_first+(m_size+fix<-1>())*m_incr,m_size,-m_incr);
}
#endif
};
/** \returns an ArithmeticSequence starting at \a first, of length \a size, and increment \a incr
*
* \sa seqN(FirstType,SizeType), seq(FirstType,LastType,IncrType) */
template<typename FirstType,typename SizeType,typename IncrType>
ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,typename internal::cleanup_index_type<SizeType>::type,typename internal::cleanup_seq_incr<IncrType>::type >
seqN(FirstType first, SizeType size, IncrType incr) {
return ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,typename internal::cleanup_index_type<SizeType>::type,typename internal::cleanup_seq_incr<IncrType>::type>(first,size,incr);
}
/** \returns an ArithmeticSequence starting at \a first, of length \a size, and unit increment
*
* \sa seqN(FirstType,SizeType,IncrType), seq(FirstType,LastType) */
template<typename FirstType,typename SizeType>
ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,typename internal::cleanup_index_type<SizeType>::type >
seqN(FirstType first, SizeType size) {
return ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,typename internal::cleanup_index_type<SizeType>::type>(first,size);
}
#ifdef EIGEN_PARSED_BY_DOXYGEN
/** \returns an ArithmeticSequence starting at \a f, up (or down) to \a l, and with positive (or negative) increment \a incr
*
* It is essentially an alias to:
* \code
* seqN(f, (l-f+incr)/incr, incr);
* \endcode
*
* \sa seqN(FirstType,SizeType,IncrType), seq(FirstType,LastType)
*/
template<typename FirstType,typename LastType, typename IncrType>
auto seq(FirstType f, LastType l, IncrType incr);
/** \returns an ArithmeticSequence starting at \a f, up (or down) to \a l, and unit increment
*
* It is essentially an alias to:
* \code
* seqN(f,l-f+1);
* \endcode
*
* \sa seqN(FirstType,SizeType), seq(FirstType,LastType,IncrType)
*/
template<typename FirstType,typename LastType>
auto seq(FirstType f, LastType l);
#else // EIGEN_PARSED_BY_DOXYGEN
#if EIGEN_HAS_CXX11
template<typename FirstType,typename LastType>
auto seq(FirstType f, LastType l) -> decltype(seqN(typename internal::cleanup_index_type<FirstType>::type(f),
( typename internal::cleanup_index_type<LastType>::type(l)
- typename internal::cleanup_index_type<FirstType>::type(f)+fix<1>())))
{
return seqN(typename internal::cleanup_index_type<FirstType>::type(f),
(typename internal::cleanup_index_type<LastType>::type(l)
-typename internal::cleanup_index_type<FirstType>::type(f)+fix<1>()));
}
template<typename FirstType,typename LastType, typename IncrType>
auto seq(FirstType f, LastType l, IncrType incr)
-> decltype(seqN(typename internal::cleanup_index_type<FirstType>::type(f),
( typename internal::cleanup_index_type<LastType>::type(l)
- typename internal::cleanup_index_type<FirstType>::type(f)+typename internal::cleanup_seq_incr<IncrType>::type(incr)
) / typename internal::cleanup_seq_incr<IncrType>::type(incr),
typename internal::cleanup_seq_incr<IncrType>::type(incr)))
{
typedef typename internal::cleanup_seq_incr<IncrType>::type CleanedIncrType;
return seqN(typename internal::cleanup_index_type<FirstType>::type(f),
( typename internal::cleanup_index_type<LastType>::type(l)
-typename internal::cleanup_index_type<FirstType>::type(f)+CleanedIncrType(incr)) / CleanedIncrType(incr),
CleanedIncrType(incr));
}
#else
template<typename FirstType,typename LastType>
typename internal::enable_if<!(Symbolic::is_symbolic<FirstType>::value || Symbolic::is_symbolic<LastType>::value),
ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,Index> >::type
seq(FirstType f, LastType l)
{
return seqN(typename internal::cleanup_index_type<FirstType>::type(f),
Index((typename internal::cleanup_index_type<LastType>::type(l)-typename internal::cleanup_index_type<FirstType>::type(f)+fix<1>())));
}
template<typename FirstTypeDerived,typename LastType>
typename internal::enable_if<!Symbolic::is_symbolic<LastType>::value,
ArithmeticSequence<FirstTypeDerived, Symbolic::AddExpr<Symbolic::AddExpr<Symbolic::NegateExpr<FirstTypeDerived>,Symbolic::ValueExpr<> >,
Symbolic::ValueExpr<internal::FixedInt<1> > > > >::type
seq(const Symbolic::BaseExpr<FirstTypeDerived> &f, LastType l)
{
return seqN(f.derived(),(typename internal::cleanup_index_type<LastType>::type(l)-f.derived()+fix<1>()));
}
template<typename FirstType,typename LastTypeDerived>
typename internal::enable_if<!Symbolic::is_symbolic<FirstType>::value,
ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,
Symbolic::AddExpr<Symbolic::AddExpr<LastTypeDerived,Symbolic::ValueExpr<> >,
Symbolic::ValueExpr<internal::FixedInt<1> > > > >::type
seq(FirstType f, const Symbolic::BaseExpr<LastTypeDerived> &l)
{
return seqN(typename internal::cleanup_index_type<FirstType>::type(f),(l.derived()-typename internal::cleanup_index_type<FirstType>::type(f)+fix<1>()));
}
template<typename FirstTypeDerived,typename LastTypeDerived>
ArithmeticSequence<FirstTypeDerived,
Symbolic::AddExpr<Symbolic::AddExpr<LastTypeDerived,Symbolic::NegateExpr<FirstTypeDerived> >,Symbolic::ValueExpr<internal::FixedInt<1> > > >
seq(const Symbolic::BaseExpr<FirstTypeDerived> &f, const Symbolic::BaseExpr<LastTypeDerived> &l)
{
return seqN(f.derived(),(l.derived()-f.derived()+fix<1>()));
}
template<typename FirstType,typename LastType, typename IncrType>
typename internal::enable_if<!(Symbolic::is_symbolic<FirstType>::value || Symbolic::is_symbolic<LastType>::value),
ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,Index,typename internal::cleanup_seq_incr<IncrType>::type> >::type
seq(FirstType f, LastType l, IncrType incr)
{
typedef typename internal::cleanup_seq_incr<IncrType>::type CleanedIncrType;
return seqN(typename internal::cleanup_index_type<FirstType>::type(f),
Index((typename internal::cleanup_index_type<LastType>::type(l)-typename internal::cleanup_index_type<FirstType>::type(f)+CleanedIncrType(incr))/CleanedIncrType(incr)), incr);
}
template<typename FirstTypeDerived,typename LastType, typename IncrType>
typename internal::enable_if<!Symbolic::is_symbolic<LastType>::value,
ArithmeticSequence<FirstTypeDerived,
Symbolic::QuotientExpr<Symbolic::AddExpr<Symbolic::AddExpr<Symbolic::NegateExpr<FirstTypeDerived>,
Symbolic::ValueExpr<> >,
Symbolic::ValueExpr<typename internal::cleanup_seq_incr<IncrType>::type> >,
Symbolic::ValueExpr<typename internal::cleanup_seq_incr<IncrType>::type> >,
typename internal::cleanup_seq_incr<IncrType>::type> >::type
seq(const Symbolic::BaseExpr<FirstTypeDerived> &f, LastType l, IncrType incr)
{
typedef typename internal::cleanup_seq_incr<IncrType>::type CleanedIncrType;
return seqN(f.derived(),(typename internal::cleanup_index_type<LastType>::type(l)-f.derived()+CleanedIncrType(incr))/CleanedIncrType(incr), incr);
}
template<typename FirstType,typename LastTypeDerived, typename IncrType>
typename internal::enable_if<!Symbolic::is_symbolic<FirstType>::value,
ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,
Symbolic::QuotientExpr<Symbolic::AddExpr<Symbolic::AddExpr<LastTypeDerived,Symbolic::ValueExpr<> >,
Symbolic::ValueExpr<typename internal::cleanup_seq_incr<IncrType>::type> >,
Symbolic::ValueExpr<typename internal::cleanup_seq_incr<IncrType>::type> >,
typename internal::cleanup_seq_incr<IncrType>::type> >::type
seq(FirstType f, const Symbolic::BaseExpr<LastTypeDerived> &l, IncrType incr)
{
typedef typename internal::cleanup_seq_incr<IncrType>::type CleanedIncrType;
return seqN(typename internal::cleanup_index_type<FirstType>::type(f),
(l.derived()-typename internal::cleanup_index_type<FirstType>::type(f)+CleanedIncrType(incr))/CleanedIncrType(incr), incr);
}
template<typename FirstTypeDerived,typename LastTypeDerived, typename IncrType>
ArithmeticSequence<FirstTypeDerived,
Symbolic::QuotientExpr<Symbolic::AddExpr<Symbolic::AddExpr<LastTypeDerived,
Symbolic::NegateExpr<FirstTypeDerived> >,
Symbolic::ValueExpr<typename internal::cleanup_seq_incr<IncrType>::type> >,
Symbolic::ValueExpr<typename internal::cleanup_seq_incr<IncrType>::type> >,
typename internal::cleanup_seq_incr<IncrType>::type>
seq(const Symbolic::BaseExpr<FirstTypeDerived> &f, const Symbolic::BaseExpr<LastTypeDerived> &l, IncrType incr)
{
typedef typename internal::cleanup_seq_incr<IncrType>::type CleanedIncrType;
return seqN(f.derived(),(l.derived()-f.derived()+CleanedIncrType(incr))/CleanedIncrType(incr), incr);
}
#endif
#endif // EIGEN_PARSED_BY_DOXYGEN
namespace internal {
// Convert a symbolic span into a usable one (i.e., remove last/end "keywords")
template<typename T>
struct make_size_type {
typedef typename internal::conditional<Symbolic::is_symbolic<T>::value, Index, T>::type type;
};
template<typename FirstType,typename SizeType,typename IncrType,int XprSize>
struct IndexedViewCompatibleType<ArithmeticSequence<FirstType,SizeType,IncrType>, XprSize> {
typedef ArithmeticSequence<Index,typename make_size_type<SizeType>::type,IncrType> type;
};
template<typename FirstType,typename SizeType,typename IncrType>
ArithmeticSequence<Index,typename make_size_type<SizeType>::type,IncrType>
makeIndexedViewCompatible(const ArithmeticSequence<FirstType,SizeType,IncrType>& ids, Index size,SpecializedType) {
return ArithmeticSequence<Index,typename make_size_type<SizeType>::type,IncrType>(
eval_expr_given_size(ids.firstObject(),size),eval_expr_given_size(ids.sizeObject(),size),ids.incrObject());
}
template<typename FirstType,typename SizeType,typename IncrType>
struct get_compile_time_incr<ArithmeticSequence<FirstType,SizeType,IncrType> > {
enum { value = get_fixed_value<IncrType,DynamicIndex>::value };
};
} // end namespace internal
} // end namespace Eigen
#endif // EIGEN_ARITHMETIC_SEQUENCE_H
================================================
FILE: app/src/main/cpp/Eigen/src/Core/Array.h
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// 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_ARRAY_H
#define EIGEN_ARRAY_H
namespace Eigen {
namespace internal {
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
struct traits<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> > : traits<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
{
typedef ArrayXpr XprKind;
typedef ArrayBase<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> > XprBase;
};
}
/** \class Array
* \ingroup Core_Module
*
* \brief General-purpose arrays with easy API for coefficient-wise operations
*
* The %Array class is very similar to the Matrix class. It provides
* general-purpose one- and two-dimensional arrays. The difference between the
* %Array and the %Matrix class is primarily in the API: the API for the
* %Array class provides easy access to coefficient-wise operations, while the
* API for the %Matrix class provides easy access to linear-algebra
* operations.
*
* See documentation of class Matrix for detailed information on the template parameters
* storage layout.
*
* 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_ARRAY_PLUGIN.
*
* \sa \blank \ref TutorialArrayClass, \ref TopicClassHierarchy
*/
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
class Array
: public PlainObjectBase<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
{
public:
typedef PlainObjectBase<Array> Base;
EIGEN_DENSE_PUBLIC_INTERFACE(Array)
enum { Options = _Options };
typedef typename Base::PlainObject PlainObject;
protected:
template <typename Derived, typename OtherDerived, bool IsVector>
friend struct internal::conservative_resize_like_impl;
using Base::m_storage;
public:
using Base::base;
using Base::coeff;
using Base::coeffRef;
/**
* The usage of
* using Base::operator=;
* fails on MSVC. Since the code below is working with GCC and MSVC, we skipped
* the usage of 'using'. This should be done only for operator=.
*/
template<typename OtherDerived>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Array& operator=(const EigenBase<OtherDerived> &other)
{
return Base::operator=(other);
}
/** Set all the entries to \a value.
* \sa DenseBase::setConstant(), DenseBase::fill()
*/
/* This overload is needed because the usage of
* using Base::operator=;
* fails on MSVC. Since the code below is working with GCC and MSVC, we skipped
* the usage of 'using'. This should be done only for operator=.
*/
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Array& operator=(const Scalar &value)
{
Base::setConstant(value);
return *this;
}
/** Copies the value of the expression \a other into \c *this with automatic resizing.
*
* *this might be resized to match the dimensions of \a other. If *this was a null matrix (not already initialized),
* it will be initialized.
*
* Note that copying a row-vector into a vector (and conversely) is allowed.
* The resizing, if any, is then done in the appropriate way so that row-vectors
* remain row-vectors and vectors remain vectors.
*/
template<typename OtherDerived>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Array& operator=(const DenseBase<OtherDerived>& other)
{
return Base::_set(other);
}
/** This is a special case of the templated operator=. Its purpose is to
* prevent a default operator= from hiding the templated operator=.
*/
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Array& operator=(const Array& other)
{
return Base::_set(other);
}
/** Default constructor.
*
* For fixed-size matrices, does nothing.
*
* For dynamic-size matrices, creates an empty matrix of size 0. Does not allocate any array. Such a matrix
* is called a null matrix. This constructor is the unique way to create null matrices: resizing
* a matrix to 0 is not supported.
*
* \sa resize(Index,Index)
*/
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Array() : Base()
{
Base::_check_template_params();
EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
}
#ifndef EIGEN_PARSED_BY_DOXYGEN
// FIXME is it still needed ??
/** \internal */
EIGEN_DEVICE_FUNC
Array(internal::constructor_without_unaligned_array_assert)
: Base(internal::constructor_without_unaligned_array_assert())
{
Base::_check_template_params();
EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
}
#endif
#if EIGEN_HAS_RVALUE_REFERENCES
EIGEN_DEVICE_FUNC
Array(Array&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_constructible<Scalar>::value)
: Base(std::move(other))
{
Base::_check_template_params();
if (RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic)
Base::_set_noalias(other);
}
EIGEN_DEVICE_FUNC
Array& operator=(Array&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable<Scalar>::value)
{
other.swap(*this);
return *this;
}
#endif
#ifndef EIGEN_PARSED_BY_DOXYGEN
template<typename T>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE explicit Array(const T& x)
{
Base::_check_template_params();
Base::template _init1<T>(x);
}
template<typename T0, typename T1>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Array(const T0& val0, const T1& val1)
{
Base::_check_template_params();
this->template _init2<T0,T1>(val0, val1);
}
#else
/** \brief Constructs a fixed-sized array initialized with coefficients starting at \a data */
EIGEN_DEVICE_FUNC explicit Array(const Scalar *data);
/** Constructs a vector or row-vector with given dimension. \only_for_vectors
*
* Note that this is only useful for dynamic-size vectors. For fixed-size vectors,
* it is redundant to pass the dimension here, so it makes more sense to use the default
* constructor Array() instead.
*/
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE explicit Array(Index dim);
/** constructs an initialized 1x1 Array with the given coefficient */
Array(const Scalar& value);
/** constructs an uninitialized array with \a rows rows and \a cols columns.
*
* This is useful for dynamic-size arrays. For fixed-size arrays,
* it is redundant to pass these parameters, so one should use the default constructor
* Array() instead. */
Array(Index rows, Index cols);
/** constructs an initialized 2D vector with given coefficients */
Array(const Scalar& val0, const Scalar& val1);
#endif
/** constructs an initialized 3D vector with given coefficients */
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Array(const Scalar& val0, const Scalar& val1, const Scalar& val2)
{
Base::_check_template_params();
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Array, 3)
m_storage.data()[0] = val0;
m_storage.data()[1] = val1;
m_storage.data()[2] = val2;
}
/** constructs an initialized 4D vector with given coefficients */
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Array(const Scalar& val0, const Scalar& val1, const Scalar& val2, const Scalar& val3)
{
Base::_check_template_params();
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Array, 4)
m_storage.data()[0] = val0;
m_storage.data()[1] = val1;
m_storage.data()[2] = val2;
m_storage.data()[3] = val3;
}
/** Copy constructor */
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Array(const Array& other)
: Base(other)
{ }
/** \sa MatrixBase::operator=(const EigenBase<OtherDerived>&) */
template<typename OtherDerived>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Array(const EigenBase<OtherDerived> &other)
: Base(other.derived())
{ }
EIGEN_DEVICE_FUNC inline Index innerStride() const { return 1; }
EIGEN_DEVICE_FUNC inline Index outerStride() const { return this->innerSize(); }
#ifdef EIGEN_ARRAY_PLUGIN
#include EIGEN_ARRAY_PLUGIN
#endif
private:
template<typename MatrixType, typename OtherDerived, bool SwapPointers>
friend struct internal::matrix_swap_impl;
};
/** \defgroup arraytypedefs Global array typedefs
* \ingroup Core_Module
*
* Eigen defines several typedef shortcuts for most common 1D and 2D array types.
*
* The general patterns are the following:
*
* \c ArrayRowsColsType where \c Rows and \c Cols can be \c 2,\c 3,\c 4 for fixed size square matrices or \c X for dynamic size,
* and where \c Type can be \c i for integer, \c f for float, \c d for double, \c cf for complex float, \c cd
* for complex double.
*
* For example, \c Array33d is a fixed-size 3x3 array type of doubles, and \c ArrayXXf is a dynamic-size matrix of floats.
*
* There are also \c ArraySizeType which are self-explanatory. For example, \c Array4cf is
* a fixed-size 1D array of 4 complex floats.
*
* \sa class Array
*/
#define EIGEN_MAKE_ARRAY_TYPEDEFS(Type, TypeSuffix, Size, SizeSuffix) \
/** \ingroup arraytypedefs */ \
typedef Array<Type, Size, Size> Array##SizeSuffix##SizeSuffix##TypeSuffix; \
/** \ingroup arraytypedefs */ \
typedef Array<Type, Size, 1> Array##SizeSuffix##TypeSuffix;
#define EIGEN_MAKE_ARRAY_FIXED_TYPEDEFS(Type, TypeSuffix, Size) \
/** \ingroup arraytypedefs */ \
typedef Array<Type, Size, Dynamic> Array##Size##X##TypeSuffix; \
/** \ingroup arraytypedefs */ \
typedef Array<Type, Dynamic, Size> Array##X##Size##TypeSuffix;
#define EIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(Type, TypeSuffix) \
EIGEN_MAKE_ARRAY_TYPEDEFS(Type, TypeSuffix, 2, 2) \
EIGEN_MAKE_ARRAY_TYPEDEFS(Type, TypeSuffix, 3, 3) \
EIGEN_MAKE_ARRAY_TYPEDEFS(Type, TypeSuffix, 4, 4) \
EIGEN_MAKE_ARRAY_TYPEDEFS(Type, TypeSuffix, Dynamic, X) \
EIGEN_MAKE_ARRAY_FIXED_TYPEDEFS(Type, TypeSuffix, 2) \
EIGEN_MAKE_ARRAY_FIXED_TYPEDEFS(Type, TypeSuffix, 3) \
EIGEN_MAKE_ARRAY_FIXED_TYPEDEFS(Type, TypeSuffix, 4)
EIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(int, i)
EIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(float, f)
EIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(double, d)
EIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(std::complex<float>, cf)
EIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(std::complex<double>, cd)
#undef EIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES
#undef EIGEN_MAKE_ARRAY_TYPEDEFS
#undef EIGEN_MAKE_ARRAY_TYPEDEFS_LARGE
#define EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, SizeSuffix) \
using Eigen::Matrix##SizeSuffix##TypeSuffix; \
using Eigen::Vector##SizeSuffix##TypeSuffix; \
using Eigen::RowVector##SizeSuffix##TypeSuffix;
#define EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE(TypeSuffix) \
EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 2) \
EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 3) \
EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 4) \
EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, X) \
#define EIGEN_USING_ARRAY_TYPEDEFS \
EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE(i) \
EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE(f) \
EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE(d) \
EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE(cf) \
EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE(cd)
} // end namespace Eigen
#endif // EIGEN_ARRAY_H
================================================
FILE: app/src/main/cpp/Eigen/src/Core/ArrayBase.h
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// 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_ARRAYBASE_H
#define EIGEN_ARRAYBASE_H
namespace Eigen {
template<typename ExpressionType> class MatrixWrapper;
/** \class ArrayBase
* \ingroup Core_Module
*
* \brief Base class for all 1D and 2D array, and related expressions
*
* An array is similar to a dense vector or matrix. While matrices are mathematical
* objects with well defined linear algebra operators, an array is just a collection
* of scalar values arranged in a one or two dimensionnal fashion. As the main consequence,
* all operations applied to an array are performed coefficient wise. Furthermore,
* arrays support scalar math functions of the c++ standard library (e.g., std::sin(x)), and convenient
* constructors allowing to easily write generic code working for both scalar values
* and arrays.
*
* This class is the base that is inherited by all array expression types.
*
* \tparam Derived is the derived type, e.g., an array or an expression type.
*
* 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_ARRAYBASE_PLUGIN.
*
* \sa class MatrixBase, \ref TopicClassHierarchy
*/
template<typename Derived> class ArrayBase
: public DenseBase<Derived>
{
public:
#ifndef EIGEN_PARSED_BY_DOXYGEN
/** The base class for a given storage type. */
typedef ArrayBase StorageBaseType;
typedef ArrayBase Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl;
typedef typename internal::traits<Derived>::StorageKind StorageKind;
typedef typename internal::traits<Derived>::Scalar Scalar;
typedef typename internal::packet_traits<Scalar>::type PacketScalar;
typedef typename NumTraits<Scalar>::Real RealScalar;
typedef DenseBase<Derived> Base;
using Base::RowsAtCompileTime;
using Base::ColsAtCompileTime;
using Base::SizeAtCompileTime;
using Base::MaxRowsAtCompileTime;
using Base::MaxColsAtCompileTime;
using Base::MaxSizeAtCompileTime;
using Base::IsVectorAtCompileTime;
using Base::Flags;
using Base::derived;
using Base::const_cast_derived;
using Base::rows;
using Base::cols;
using Base::size;
using Base::coeff;
using Base::coeffRef;
using Base::lazyAssign;
using Base::operator-;
using Base::operator=;
using Base::operator+=;
using Base::operator-=;
using Base::operator*=;
using Base::operator/=;
typedef typename Base::CoeffReturnType CoeffReturnType;
#endif // not EIGEN_PARSED_BY_DOXYGEN
#ifndef EIGEN_PARSED_BY_DOXYGEN
typedef typename Base::PlainObject PlainObject;
/** \internal Represents a matrix with all coefficients equal to one another*/
typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,PlainObject> ConstantReturnType;
#endif // not EIGEN_PARSED_BY_DOXYGEN
#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::ArrayBase
#define EIGEN_DOC_UNARY_ADDONS(X,Y)
# include "../plugins/MatrixCwiseUnaryOps.h"
# include "../plugins/ArrayCwiseUnaryOps.h"
# include "../plugins/CommonCwiseBinaryOps.h"
# include "../plugins/MatrixCwiseBinaryOps.h"
# include "../plugins/ArrayCwiseBinaryOps.h"
# ifdef EIGEN_ARRAYBASE_PLUGIN
# include EIGEN_ARRAYBASE_PLUGIN
# endif
#undef EIGEN_CURRENT_STORAGE_BASE_CLASS
#undef EIGEN_DOC_UNARY_ADDONS
/** Special case of the template operator=, in order to prevent the compiler
* from generating a default operator= (issue hit with g++ 4.1)
*/
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Derived& operator=(const ArrayBase& other)
{
internal::call_assignment(derived(), other.derived());
return derived();
}
/** Set all the entries to \a value.
* \sa DenseBase::setConstant(), DenseBase::fill() */
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Derived& operator=(const Scalar &value)
{ Base::setConstant(value); return derived(); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Derived& operator+=(const Scalar& scalar);
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Derived& operator-=(const Scalar& scalar);
template<typename OtherDerived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Derived& operator+=(const ArrayBase<OtherDerived>& other);
template<typename OtherDerived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Derived& operator-=(const ArrayBase<OtherDerived>& other);
template<typename OtherDerived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Derived& operator*=(const ArrayBase<OtherDerived>& other);
template<typename OtherDerived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Derived& operator/=(const ArrayBase<OtherDerived>& other);
public:
EIGEN_DEVICE_FUNC
ArrayBase<Derived>& array() { return *this; }
EIGEN_DEVICE_FUNC
const ArrayBase<Derived>& array() const { return *this; }
/** \returns an \link Eigen::MatrixBase Matrix \endlink expression of this array
* \sa MatrixBase::array() */
EIGEN_DEVICE_FUNC
MatrixWrapper<Derived> matrix() { return MatrixWrapper<Derived>(derived()); }
EIGEN_DEVICE_FUNC
const MatrixWrapper<const Derived> matrix() const { return MatrixWrapper<const Derived>(derived()); }
// template<typename Dest>
// inline void evalTo(Dest& dst) const { dst = matrix(); }
protected:
EIGEN_DEVICE_FUNC
ArrayBase() : Base() {}
private:
explicit ArrayBase(Index);
ArrayBase(Index,Index);
template<typename OtherDerived> explicit ArrayBase(const ArrayBase<OtherDerived>&);
protected:
// mixing arrays and matrices is not legal
template<typename OtherDerived> Derived& operator+=(const MatrixBase<OtherDerived>& )
{EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}
// mixing arrays and matrices is not legal
template<typename OtherDerived> Derived& operator-=(const MatrixBase<OtherDerived>& )
{EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}
};
/** replaces \c *this by \c *this - \a other.
*
* \returns a reference to \c *this
*/
template<typename Derived>
template<typename OtherDerived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
ArrayBase<Derived>::operator-=(const ArrayBase<OtherDerived> &other)
{
call_assignment(derived(), other.derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());
return derived();
}
/** replaces \c *this by \c *this + \a other.
*
* \returns a reference to \c *this
*/
template<typename Derived>
template<typename OtherDerived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
ArrayBase<Derived>::operator+=(const ArrayBase<OtherDerived>& other)
{
call_assignment(derived(), other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());
return derived();
}
/** replaces \c *this by \c *this * \a other coefficient wise.
*
* \returns a reference to \c *this
*/
template<typename Derived>
template<typename OtherDerived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
ArrayBase<Derived>::operator*=(const ArrayBase<OtherDerived>& other)
{
call_assignment(derived(), other.derived(), internal::mul_assign_op<Scalar,typename OtherDerived::Scalar>());
return derived();
}
/** replaces \c *this by \c *this / \a other coefficient wise.
*
* \returns a reference to \c *this
*/
template<typename Derived>
template<typename OtherDerived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
ArrayBase<Derived>::operator/=(const ArrayBase<OtherDerived>& other)
{
call_assignment(derived(), other.derived(), internal::div_assign_op<Scalar,typename OtherDerived::Scalar>());
return derived();
}
} // end namespace Eigen
#endif // EIGEN_ARRAYBASE_H
================================================
FILE: app/src/main/cpp/Eigen/src/Core/ArrayWrapper.h
================================================
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// 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_ARRAYWRAPPER_H
#define EIGEN_ARRAYWRAPPER_H
namespace Eigen {
/** \class ArrayWrapper
* \ingroup Core_Module
*
* \brief Expression of a mathematical vector or matrix as an array object
*
* This class is the return type of MatrixBase::array(), and most of the time
* this is the only way it is use.
*
* \sa MatrixBase::array(), class MatrixWrapper
*/
namespace internal {
template<typename ExpressionType>
struct traits<ArrayWrapper<ExpressionType> >
: public traits<typename remove_all<typename ExpressionType::Nested>::type >
{
typedef ArrayXpr XprKind;
// Let's remove NestByRefBit
enum {
Flags0 = traits<typename remove_all<typename ExpressionType::Nested>::type >::Flags,
Flags = Flags0 & ~NestByRefBit
};
};
}
template<typename ExpressionType>
class ArrayWrapper : public ArrayBase<ArrayWrapper<ExpressionType> >
{
public:
typedef ArrayBase<ArrayWrapper> Base;
EIGEN_DENSE_PUBLIC_INTERFACE(ArrayWrapper)
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(ArrayWrapper)
typedef typename internal::remove_all<ExpressionType>::type NestedExpression;
typedef typename internal::conditional<
internal::is_lvalue<ExpressionType>::value,
Scalar,
const Scalar
>::type ScalarWithConstIfNotLvalue;
typedef typename internal::ref_selector<ExpressionType>::non_const_type NestedExpressionType;
using Base::coeffRef;
EIGEN_DEVICE_FUNC
explicit EIGEN_STRONG_INLINE ArrayWrapper(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 ScalarWithConstIfNotLvalue* data() { return m_expression.data(); }
EIGEN_DEVICE_FUNC
inline const Scalar* data() const { return m_expression.data(); }
EIGEN_DEVICE_FUNC
inline const Scalar& coeffRef(Index rowId, Index colId) const
{
return m_expression.coeffRef(rowId, colId);
}
EIGEN_DEVICE_FUNC
inline const Scalar& coeffRef(Index index) const
{
return m_expression.coeffRef(index);
}
template<typename Dest>
EIGEN_DEVICE_FUNC
inline void evalTo(Dest& dst) const { dst = m_expression; }
const typename internal::remove_all<NestedExpressionType>::type&
EIGEN_DEVICE_FUNC
nestedExpression() const
{
return m_expression;
}
/** Forwards the resizing request to the nested expression
* \sa DenseBase::resize(Index) */
EIGEN_DEVICE_FUNC
void resize(Index newSize) { m_expression.resize(newSize); }
/** Forwards the resizing request to the nested expression
* \sa DenseBase::resize(Index,Index)*/
EIGEN_DEVICE_FUNC
void resize(Index rows, Index cols) { m_expression.resize(rows,cols); }
protected:
NestedExpressionType m_expression;
};
/** \class MatrixWrapper
* \ingroup Core_Module
*
* \brief Expression of an array as a mathematical vector or matrix
*
* This class is the return type of ArrayBase::matrix(), and most of the time
* this is the only way it is use.
*
* \sa MatrixBase::matrix(), class ArrayWrapper
*/
namespace internal {
template<typename Expres
gitextract_mew1rzi9/ ├── .gitignore ├── .idea/ │ ├── compiler.xml │ ├── copyright/ │ │ └── profiles_settings.xml │ ├── gradle.xml │ ├── misc.xml │ ├── runConfigurations.xml │ └── vcs.xml ├── Exporting Squeezenet to mobile.ipynb ├── LICENSE ├── README.md ├── app/ │ ├── .gitignore │ ├── CMakeLists.txt │ ├── build.gradle │ ├── proguard-rules.pro │ └── src/ │ ├── androidTest/ │ │ └── java/ │ │ └── facebook/ │ │ └── f8demo/ │ │ └── ExampleInstrumentedTest.java │ ├── main/ │ │ ├── AndroidManifest.xml │ │ ├── assets/ │ │ │ ├── squeeze_init_net.pb │ │ │ └── squeeze_predict_net.pb │ │ ├── cpp/ │ │ │ ├── Eigen/ │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Cholesky │ │ │ │ ├── CholmodSupport │ │ │ │ ├── Core │ │ │ │ ├── Dense │ │ │ │ ├── Eigen │ │ │ │ ├── Eigenvalues │ │ │ │ ├── Geometry │ │ │ │ ├── Householder │ │ │ │ ├── IterativeLinearSolvers │ │ │ │ ├── Jacobi │ │ │ │ ├── LU │ │ │ │ ├── MetisSupport │ │ │ │ ├── OrderingMethods │ │ │ │ ├── PaStiXSupport │ │ │ │ ├── PardisoSupport │ │ │ │ ├── QR │ │ │ │ ├── QtAlignedMalloc │ │ │ │ ├── SPQRSupport │ │ │ │ ├── SVD │ │ │ │ ├── Sparse │ │ │ │ ├── SparseCholesky │ │ │ │ ├── SparseCore │ │ │ │ ├── SparseLU │ │ │ │ ├── SparseQR │ │ │ │ ├── StdDeque │ │ │ │ ├── StdList │ │ │ │ ├── StdVector │ │ │ │ ├── SuperLUSupport │ │ │ │ ├── UmfPackSupport │ │ │ │ └── src/ │ │ │ │ ├── Cholesky/ │ │ │ │ │ ├── LDLT.h │ │ │ │ │ ├── LLT.h │ │ │ │ │ └── LLT_LAPACKE.h │ │ │ │ ├── CholmodSupport/ │ │ │ │ │ └── CholmodSupport.h │ │ │ │ ├── Core/ │ │ │ │ │ ├── ArithmeticSequence.h │ │ │ │ │ ├── Array.h │ │ │ │ │ ├── ArrayBase.h │ │ │ │ │ ├── ArrayWrapper.h │ │ │ │ │ ├── Assign.h │ │ │ │ │ ├── AssignEvaluator.h │ │ │ │ │ ├── Assign_MKL.h │ │ │ │ │ ├── BandMatrix.h │ │ │ │ │ ├── Block.h │ │ │ │ │ ├── BooleanRedux.h │ │ │ │ │ ├── CommaInitializer.h │ │ │ │ │ ├── ConditionEstimator.h │ │ │ │ │ ├── CoreEvaluators.h │ │ │ │ │ ├── CoreIterators.h │ │ │ │ │ ├── CwiseBinaryOp.h │ │ │ │ │ ├── CwiseNullaryOp.h │ │ │ │ │ ├── CwiseTernaryOp.h │ │ │ │ │ ├── CwiseUnaryOp.h │ │ │ │ │ ├── CwiseUnaryView.h │ │ │ │ │ ├── DenseBase.h │ │ │ │ │ ├── DenseCoeffsBase.h │ │ │ │ │ ├── DenseStorage.h │ │ │ │ │ ├── Diagonal.h │ │ │ │ │ ├── DiagonalMatrix.h │ │ │ │ │ ├── DiagonalProduct.h │ │ │ │ │ ├── Dot.h │ │ │ │ │ ├── EigenBase.h │ │ │ │ │ ├── ForceAlignedAccess.h │ │ │ │ │ ├── Fuzzy.h │ │ │ │ │ ├── GeneralProduct.h │ │ │ │ │ ├── GenericPacketMath.h │ │ │ │ │ ├── GlobalFunctions.h │ │ │ │ │ ├── IO.h │ │ │ │ │ ├── IndexedView.h │ │ │ │ │ ├── Inverse.h │ │ │ │ │ ├── Map.h │ │ │ │ │ ├── MapBase.h │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ ├── MathFunctionsImpl.h │ │ │ │ │ ├── Matrix.h │ │ │ │ │ ├── MatrixBase.h │ │ │ │ │ ├── NestByValue.h │ │ │ │ │ ├── NoAlias.h │ │ │ │ │ ├── NumTraits.h │ │ │ │ │ ├── PermutationMatrix.h │ │ │ │ │ ├── PlainObjectBase.h │ │ │ │ │ ├── Product.h │ │ │ │ │ ├── ProductEvaluators.h │ │ │ │ │ ├── Random.h │ │ │ │ │ ├── Redux.h │ │ │ │ │ ├── Ref.h │ │ │ │ │ ├── Replicate.h │ │ │ │ │ ├── ReturnByValue.h │ │ │ │ │ ├── Reverse.h │ │ │ │ │ ├── Select.h │ │ │ │ │ ├── SelfAdjointView.h │ │ │ │ │ ├── SelfCwiseBinaryOp.h │ │ │ │ │ ├── Solve.h │ │ │ │ │ ├── SolveTriangular.h │ │ │ │ │ ├── SolverBase.h │ │ │ │ │ ├── StableNorm.h │ │ │ │ │ ├── Stride.h │ │ │ │ │ ├── Swap.h │ │ │ │ │ ├── Transpose.h │ │ │ │ │ ├── Transpositions.h │ │ │ │ │ ├── TriangularMatrix.h │ │ │ │ │ ├── VectorBlock.h │ │ │ │ │ ├── VectorwiseOp.h │ │ │ │ │ ├── Visitor.h │ │ │ │ │ ├── arch/ │ │ │ │ │ │ ├── AVX/ │ │ │ │ │ │ │ ├── Complex.h │ │ │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ │ │ ├── PacketMath.h │ │ │ │ │ │ │ └── TypeCasting.h │ │ │ │ │ │ ├── AVX512/ │ │ │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ │ │ └── PacketMath.h │ │ │ │ │ │ ├── AltiVec/ │ │ │ │ │ │ │ ├── Complex.h │ │ │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ │ │ └── PacketMath.h │ │ │ │ │ │ ├── CUDA/ │ │ │ │ │ │ │ ├── Complex.h │ │ │ │ │ │ │ ├── Half.h │ │ │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ │ │ ├── PacketMath.h │ │ │ │ │ │ │ ├── PacketMathHalf.h │ │ │ │ │ │ │ └── TypeCasting.h │ │ │ │ │ │ ├── Default/ │ │ │ │ │ │ │ └── Settings.h │ │ │ │ │ │ ├── NEON/ │ │ │ │ │ │ │ ├── Complex.h │ │ │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ │ │ └── PacketMath.h │ │ │ │ │ │ ├── SSE/ │ │ │ │ │ │ │ ├── Complex.h │ │ │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ │ │ ├── PacketMath.h │ │ │ │ │ │ │ └── TypeCasting.h │ │ │ │ │ │ └── ZVector/ │ │ │ │ │ │ ├── Complex.h │ │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ │ └── PacketMath.h │ │ │ │ │ ├── functors/ │ │ │ │ │ │ ├── AssignmentFunctors.h │ │ │ │ │ │ ├── BinaryFunctors.h │ │ │ │ │ │ ├── NullaryFunctors.h │ │ │ │ │ │ ├── StlFunctors.h │ │ │ │ │ │ ├── TernaryFunctors.h │ │ │ │ │ │ └── UnaryFunctors.h │ │ │ │ │ ├── products/ │ │ │ │ │ │ ├── GeneralBlockPanelKernel.h │ │ │ │ │ │ ├── GeneralMatrixMatrix.h │ │ │ │ │ │ ├── GeneralMatrixMatrixTriangular.h │ │ │ │ │ │ ├── GeneralMatrixMatrixTriangular_BLAS.h │ │ │ │ │ │ ├── GeneralMatrixMatrix_BLAS.h │ │ │ │ │ │ ├── GeneralMatrixVector.h │ │ │ │ │ │ ├── GeneralMatrixVector_BLAS.h │ │ │ │ │ │ ├── Parallelizer.h │ │ │ │ │ │ ├── SelfadjointMatrixMatrix.h │ │ │ │ │ │ ├── SelfadjointMatrixMatrix_BLAS.h │ │ │ │ │ │ ├── SelfadjointMatrixVector.h │ │ │ │ │ │ ├── SelfadjointMatrixVector_BLAS.h │ │ │ │ │ │ ├── SelfadjointProduct.h │ │ │ │ │ │ ├── SelfadjointRank2Update.h │ │ │ │ │ │ ├── TriangularMatrixMatrix.h │ │ │ │ │ │ ├── TriangularMatrixMatrix_BLAS.h │ │ │ │ │ │ ├── TriangularMatrixVector.h │ │ │ │ │ │ ├── TriangularMatrixVector_BLAS.h │ │ │ │ │ │ ├── TriangularSolverMatrix.h │ │ │ │ │ │ ├── TriangularSolverMatrix_BLAS.h │ │ │ │ │ │ └── TriangularSolverVector.h │ │ │ │ │ └── util/ │ │ │ │ │ ├── BlasUtil.h │ │ │ │ │ ├── Constants.h │ │ │ │ │ ├── DisableStupidWarnings.h │ │ │ │ │ ├── ForwardDeclarations.h │ │ │ │ │ ├── IndexedViewHelper.h │ │ │ │ │ ├── IntegralConstant.h │ │ │ │ │ ├── MKL_support.h │ │ │ │ │ ├── Macros.h │ │ │ │ │ ├── Memory.h │ │ │ │ │ ├── Meta.h │ │ │ │ │ ├── NonMPL2.h │ │ │ │ │ ├── ReenableStupidWarnings.h │ │ │ │ │ ├── StaticAssert.h │ │ │ │ │ ├── SymbolicIndex.h │ │ │ │ │ └── XprHelper.h │ │ │ │ ├── Eigenvalues/ │ │ │ │ │ ├── ComplexEigenSolver.h │ │ │ │ │ ├── ComplexSchur.h │ │ │ │ │ ├── ComplexSchur_LAPACKE.h │ │ │ │ │ ├── EigenSolver.h │ │ │ │ │ ├── GeneralizedEigenSolver.h │ │ │ │ │ ├── GeneralizedSelfAdjointEigenSolver.h │ │ │ │ │ ├── HessenbergDecomposition.h │ │ │ │ │ ├── MatrixBaseEigenvalues.h │ │ │ │ │ ├── RealQZ.h │ │ │ │ │ ├── RealSchur.h │ │ │ │ │ ├── RealSchur_LAPACKE.h │ │ │ │ │ ├── SelfAdjointEigenSolver.h │ │ │ │ │ ├── SelfAdjointEigenSolver_LAPACKE.h │ │ │ │ │ └── Tridiagonalization.h │ │ │ │ ├── Geometry/ │ │ │ │ │ ├── AlignedBox.h │ │ │ │ │ ├── AngleAxis.h │ │ │ │ │ ├── EulerAngles.h │ │ │ │ │ ├── Homogeneous.h │ │ │ │ │ ├── Hyperplane.h │ │ │ │ │ ├── OrthoMethods.h │ │ │ │ │ ├── ParametrizedLine.h │ │ │ │ │ ├── Quaternion.h │ │ │ │ │ ├── Rotation2D.h │ │ │ │ │ ├── RotationBase.h │ │ │ │ │ ├── Scaling.h │ │ │ │ │ ├── Transform.h │ │ │ │ │ ├── Translation.h │ │ │ │ │ ├── Umeyama.h │ │ │ │ │ └── arch/ │ │ │ │ │ └── Geometry_SSE.h │ │ │ │ ├── Householder/ │ │ │ │ │ ├── BlockHouseholder.h │ │ │ │ │ ├── Householder.h │ │ │ │ │ └── HouseholderSequence.h │ │ │ │ ├── IterativeLinearSolvers/ │ │ │ │ │ ├── BasicPreconditioners.h │ │ │ │ │ ├── BiCGSTAB.h │ │ │ │ │ ├── ConjugateGradient.h │ │ │ │ │ ├── IncompleteCholesky.h │ │ │ │ │ ├── IncompleteLUT.h │ │ │ │ │ ├── IterativeSolverBase.h │ │ │ │ │ ├── LeastSquareConjugateGradient.h │ │ │ │ │ └── SolveWithGuess.h │ │ │ │ ├── Jacobi/ │ │ │ │ │ └── Jacobi.h │ │ │ │ ├── LU/ │ │ │ │ │ ├── Determinant.h │ │ │ │ │ ├── FullPivLU.h │ │ │ │ │ ├── InverseImpl.h │ │ │ │ │ ├── PartialPivLU.h │ │ │ │ │ ├── PartialPivLU_LAPACKE.h │ │ │ │ │ └── arch/ │ │ │ │ │ └── Inverse_SSE.h │ │ │ │ ├── MetisSupport/ │ │ │ │ │ └── MetisSupport.h │ │ │ │ ├── OrderingMethods/ │ │ │ │ │ ├── Amd.h │ │ │ │ │ ├── Eigen_Colamd.h │ │ │ │ │ └── Ordering.h │ │ │ │ ├── PaStiXSupport/ │ │ │ │ │ └── PaStiXSupport.h │ │ │ │ ├── PardisoSupport/ │ │ │ │ │ └── PardisoSupport.h │ │ │ │ ├── QR/ │ │ │ │ │ ├── ColPivHouseholderQR.h │ │ │ │ │ ├── ColPivHouseholderQR_LAPACKE.h │ │ │ │ │ ├── CompleteOrthogonalDecomposition.h │ │ │ │ │ ├── FullPivHouseholderQR.h │ │ │ │ │ ├── HouseholderQR.h │ │ │ │ │ └── HouseholderQR_LAPACKE.h │ │ │ │ ├── SPQRSupport/ │ │ │ │ │ └── SuiteSparseQRSupport.h │ │ │ │ ├── SVD/ │ │ │ │ │ ├── BDCSVD.h │ │ │ │ │ ├── JacobiSVD.h │ │ │ │ │ ├── JacobiSVD_LAPACKE.h │ │ │ │ │ ├── SVDBase.h │ │ │ │ │ └── UpperBidiagonalization.h │ │ │ │ ├── SparseCholesky/ │ │ │ │ │ ├── SimplicialCholesky.h │ │ │ │ │ └── SimplicialCholesky_impl.h │ │ │ │ ├── SparseCore/ │ │ │ │ │ ├── AmbiVector.h │ │ │ │ │ ├── CompressedStorage.h │ │ │ │ │ ├── ConservativeSparseSparseProduct.h │ │ │ │ │ ├── MappedSparseMatrix.h │ │ │ │ │ ├── SparseAssign.h │ │ │ │ │ ├── SparseBlock.h │ │ │ │ │ ├── SparseColEtree.h │ │ │ │ │ ├── SparseCompressedBase.h │ │ │ │ │ ├── SparseCwiseBinaryOp.h │ │ │ │ │ ├── SparseCwiseUnaryOp.h │ │ │ │ │ ├── SparseDenseProduct.h │ │ │ │ │ ├── SparseDiagonalProduct.h │ │ │ │ │ ├── SparseDot.h │ │ │ │ │ ├── SparseFuzzy.h │ │ │ │ │ ├── SparseMap.h │ │ │ │ │ ├── SparseMatrix.h │ │ │ │ │ ├── SparseMatrixBase.h │ │ │ │ │ ├── SparsePermutation.h │ │ │ │ │ ├── SparseProduct.h │ │ │ │ │ ├── SparseRedux.h │ │ │ │ │ ├── SparseRef.h │ │ │ │ │ ├── SparseSelfAdjointView.h │ │ │ │ │ ├── SparseSolverBase.h │ │ │ │ │ ├── SparseSparseProductWithPruning.h │ │ │ │ │ ├── SparseTranspose.h │ │ │ │ │ ├── SparseTriangularView.h │ │ │ │ │ ├── SparseUtil.h │ │ │ │ │ ├── SparseVector.h │ │ │ │ │ ├── SparseView.h │ │ │ │ │ └── TriangularSolver.h │ │ │ │ ├── SparseLU/ │ │ │ │ │ ├── SparseLU.h │ │ │ │ │ ├── SparseLUImpl.h │ │ │ │ │ ├── SparseLU_Memory.h │ │ │ │ │ ├── SparseLU_Structs.h │ │ │ │ │ ├── SparseLU_SupernodalMatrix.h │ │ │ │ │ ├── SparseLU_Utils.h │ │ │ │ │ ├── SparseLU_column_bmod.h │ │ │ │ │ ├── SparseLU_column_dfs.h │ │ │ │ │ ├── SparseLU_copy_to_ucol.h │ │ │ │ │ ├── SparseLU_gemm_kernel.h │ │ │ │ │ ├── SparseLU_heap_relax_snode.h │ │ │ │ │ ├── SparseLU_kernel_bmod.h │ │ │ │ │ ├── SparseLU_panel_bmod.h │ │ │ │ │ ├── SparseLU_panel_dfs.h │ │ │ │ │ ├── SparseLU_pivotL.h │ │ │ │ │ ├── SparseLU_pruneL.h │ │ │ │ │ └── SparseLU_relax_snode.h │ │ │ │ ├── SparseQR/ │ │ │ │ │ └── SparseQR.h │ │ │ │ ├── StlSupport/ │ │ │ │ │ ├── StdDeque.h │ │ │ │ │ ├── StdList.h │ │ │ │ │ ├── StdVector.h │ │ │ │ │ └── details.h │ │ │ │ ├── SuperLUSupport/ │ │ │ │ │ └── SuperLUSupport.h │ │ │ │ ├── UmfPackSupport/ │ │ │ │ │ └── UmfPackSupport.h │ │ │ │ ├── misc/ │ │ │ │ │ ├── Image.h │ │ │ │ │ ├── Kernel.h │ │ │ │ │ ├── RealSvd2x2.h │ │ │ │ │ ├── blas.h │ │ │ │ │ ├── lapack.h │ │ │ │ │ ├── lapacke.h │ │ │ │ │ └── lapacke_mangling.h │ │ │ │ └── plugins/ │ │ │ │ ├── ArrayCwiseBinaryOps.h │ │ │ │ ├── ArrayCwiseUnaryOps.h │ │ │ │ ├── BlockMethods.h │ │ │ │ ├── CommonCwiseBinaryOps.h │ │ │ │ ├── CommonCwiseUnaryOps.h │ │ │ │ ├── IndexedViewMethods.h │ │ │ │ ├── MatrixCwiseBinaryOps.h │ │ │ │ └── MatrixCwiseUnaryOps.h │ │ │ ├── caffe2/ │ │ │ │ ├── contrib/ │ │ │ │ │ ├── aten/ │ │ │ │ │ │ └── aten_op_template.h │ │ │ │ │ ├── gloo/ │ │ │ │ │ │ ├── allreduce_ops.h │ │ │ │ │ │ ├── barrier_ops.h │ │ │ │ │ │ ├── broadcast_ops.h │ │ │ │ │ │ ├── common.h │ │ │ │ │ │ ├── common_world_ops.h │ │ │ │ │ │ ├── context.h │ │ │ │ │ │ └── store_handler.h │ │ │ │ │ ├── nccl/ │ │ │ │ │ │ └── cuda_nccl_gpu.h │ │ │ │ │ ├── nervana/ │ │ │ │ │ │ ├── nervana.h │ │ │ │ │ │ └── nervana_c_api.h │ │ │ │ │ ├── observers/ │ │ │ │ │ │ └── time_observer.h │ │ │ │ │ ├── prof/ │ │ │ │ │ │ ├── htrace_conf.h │ │ │ │ │ │ ├── prof_dag_net.h │ │ │ │ │ │ └── prof_dag_stats_op.h │ │ │ │ │ ├── shm_mutex/ │ │ │ │ │ │ └── shm_mutex.h │ │ │ │ │ ├── torch/ │ │ │ │ │ │ └── torch_op.h │ │ │ │ │ └── warpctc/ │ │ │ │ │ └── ctc_op.h │ │ │ │ ├── core/ │ │ │ │ │ ├── allocator.h │ │ │ │ │ ├── asan.h │ │ │ │ │ ├── blob.h │ │ │ │ │ ├── blob_serialization.h │ │ │ │ │ ├── blob_serializer_base.h │ │ │ │ │ ├── blob_stats.h │ │ │ │ │ ├── common.h │ │ │ │ │ ├── common_cudnn.h │ │ │ │ │ ├── common_gpu.h │ │ │ │ │ ├── common_omp.h │ │ │ │ │ ├── context.h │ │ │ │ │ ├── context_gpu.h │ │ │ │ │ ├── db.h │ │ │ │ │ ├── event.h │ │ │ │ │ ├── flags.h │ │ │ │ │ ├── graph.h │ │ │ │ │ ├── init.h │ │ │ │ │ ├── logging.h │ │ │ │ │ ├── logging_is_google_glog.h │ │ │ │ │ ├── logging_is_not_google_glog.h │ │ │ │ │ ├── macros.h │ │ │ │ │ ├── memonger.h │ │ │ │ │ ├── net.h │ │ │ │ │ ├── net_async_dag_gpu.h │ │ │ │ │ ├── net_dag.h │ │ │ │ │ ├── net_simple.h │ │ │ │ │ ├── net_simple_async.h │ │ │ │ │ ├── observer.h │ │ │ │ │ ├── operator.h │ │ │ │ │ ├── operator_gradient.h │ │ │ │ │ ├── operator_schema.h │ │ │ │ │ ├── plan_executor.h │ │ │ │ │ ├── predictor.h │ │ │ │ │ ├── qtensor.h │ │ │ │ │ ├── qtensor_serialization.h │ │ │ │ │ ├── registry.h │ │ │ │ │ ├── scope_guard.h │ │ │ │ │ ├── static_tracepoint.h │ │ │ │ │ ├── static_tracepoint_elfx86.h │ │ │ │ │ ├── stats.h │ │ │ │ │ ├── tensor.h │ │ │ │ │ ├── timer.h │ │ │ │ │ ├── transform.h │ │ │ │ │ ├── typeid.h │ │ │ │ │ ├── types.h │ │ │ │ │ └── workspace.h │ │ │ │ ├── cuda_rtc/ │ │ │ │ │ └── common_rtc.h │ │ │ │ ├── db/ │ │ │ │ │ └── create_db_op.h │ │ │ │ ├── distributed/ │ │ │ │ │ ├── file_store_handler.h │ │ │ │ │ ├── file_store_handler_op.h │ │ │ │ │ ├── redis_store_handler.h │ │ │ │ │ ├── redis_store_handler_op.h │ │ │ │ │ ├── store_handler.h │ │ │ │ │ └── store_ops.h │ │ │ │ ├── experiments/ │ │ │ │ │ └── operators/ │ │ │ │ │ ├── fully_connected_op_decomposition.h │ │ │ │ │ ├── fully_connected_op_prune.h │ │ │ │ │ ├── fully_connected_op_sparse.h │ │ │ │ │ ├── funhash_op.h │ │ │ │ │ ├── sparse_funhash_op.h │ │ │ │ │ ├── sparse_matrix_reshape_op.h │ │ │ │ │ ├── tt_contraction_op.h │ │ │ │ │ └── tt_pad_op.h │ │ │ │ ├── image/ │ │ │ │ │ ├── image_input_op.h │ │ │ │ │ └── transform_gpu.h │ │ │ │ ├── mkl/ │ │ │ │ │ ├── mkl_utils.h │ │ │ │ │ ├── operators/ │ │ │ │ │ │ └── operator_fallback_mkl.h │ │ │ │ │ └── utils/ │ │ │ │ │ ├── mkl_context.h │ │ │ │ │ ├── mkl_dnn_cppwrapper.h │ │ │ │ │ ├── mkl_memory.h │ │ │ │ │ ├── mkl_operator.h │ │ │ │ │ ├── mkl_version_check.h │ │ │ │ │ └── sgemm_pack.h │ │ │ │ ├── mobile/ │ │ │ │ │ └── contrib/ │ │ │ │ │ ├── ios/ │ │ │ │ │ │ ├── ios_caffe.h │ │ │ │ │ │ ├── ios_caffe_defines.h │ │ │ │ │ │ ├── ios_caffe_predictor.h │ │ │ │ │ │ └── mpscnn/ │ │ │ │ │ │ ├── mpscnn.h │ │ │ │ │ │ ├── mpscnn_context.h │ │ │ │ │ │ ├── mpscnn_graph_mask.h │ │ │ │ │ │ ├── mpscnn_kernels.h │ │ │ │ │ │ └── mpscnn_test.h │ │ │ │ │ ├── libopencl-stub/ │ │ │ │ │ │ └── include/ │ │ │ │ │ │ ├── CL/ │ │ │ │ │ │ │ ├── cl.h │ │ │ │ │ │ │ ├── cl_ext.h │ │ │ │ │ │ │ ├── cl_gl.h │ │ │ │ │ │ │ ├── cl_gl_ext.h │ │ │ │ │ │ │ ├── cl_platform.h │ │ │ │ │ │ │ └── opencl.h │ │ │ │ │ │ └── libopencl.h │ │ │ │ │ ├── opengl/ │ │ │ │ │ │ ├── android/ │ │ │ │ │ │ │ ├── AndroidGLContext.h │ │ │ │ │ │ │ ├── arm_neon_support.h │ │ │ │ │ │ │ └── gl3stub.h │ │ │ │ │ │ ├── core/ │ │ │ │ │ │ │ ├── DataTransfer.h │ │ │ │ │ │ │ ├── GL.h │ │ │ │ │ │ │ ├── GLContext.h │ │ │ │ │ │ │ ├── GLFilter.h │ │ │ │ │ │ │ ├── GLImage.h │ │ │ │ │ │ │ ├── GLImageAllocator.h │ │ │ │ │ │ │ ├── GLLogging.h │ │ │ │ │ │ │ ├── GLPBO.h │ │ │ │ │ │ │ ├── GLPlainTexture.h │ │ │ │ │ │ │ ├── GLPredictor.h │ │ │ │ │ │ │ ├── GLTexture.h │ │ │ │ │ │ │ ├── ImageAllocator.h │ │ │ │ │ │ │ ├── arm_neon_support.h │ │ │ │ │ │ │ └── rewrite_net.h │ │ │ │ │ │ ├── ios/ │ │ │ │ │ │ │ ├── IOSGLContext.h │ │ │ │ │ │ │ ├── IOSGLImageAllocator.h │ │ │ │ │ │ │ └── IOSGLTexture.h │ │ │ │ │ │ ├── operators/ │ │ │ │ │ │ │ └── gl_tiling_utils.h │ │ │ │ │ │ └── test/ │ │ │ │ │ │ ├── TestGLConvolution.h │ │ │ │ │ │ └── opengl_test.h │ │ │ │ │ ├── snpe/ │ │ │ │ │ │ └── snpe_ffi.h │ │ │ │ │ └── ulp2/ │ │ │ │ │ ├── ulp.h │ │ │ │ │ └── ulp_neon.h │ │ │ │ ├── mpi/ │ │ │ │ │ ├── mpi_common.h │ │ │ │ │ └── mpi_ops.h │ │ │ │ ├── operators/ │ │ │ │ │ ├── accumulate_op.h │ │ │ │ │ ├── accuracy_op.h │ │ │ │ │ ├── apmeter_op.h │ │ │ │ │ ├── batch_box_cox_op.h │ │ │ │ │ ├── batch_gather_ops.h │ │ │ │ │ ├── batch_matmul_op.h │ │ │ │ │ ├── boolean_mask_ops.h │ │ │ │ │ ├── boolean_unmask_ops.h │ │ │ │ │ ├── cast_op.h │ │ │ │ │ ├── channel_shuffle_op.h │ │ │ │ │ ├── clip_op.h │ │ │ │ │ ├── concat_split_op.h │ │ │ │ │ ├── conditional_op.h │ │ │ │ │ ├── conv_op.h │ │ │ │ │ ├── conv_op_cache_cudnn.h │ │ │ │ │ ├── conv_op_impl.h │ │ │ │ │ ├── conv_op_shared.h │ │ │ │ │ ├── conv_pool_op_base.h │ │ │ │ │ ├── conv_transpose_op.h │ │ │ │ │ ├── conv_transpose_op_impl.h │ │ │ │ │ ├── conv_transpose_op_mobile.h │ │ │ │ │ ├── conv_transpose_op_mobile_impl.h │ │ │ │ │ ├── conv_transpose_unpool_op_base.h │ │ │ │ │ ├── cosine_embedding_criterion_op.h │ │ │ │ │ ├── counter_ops.h │ │ │ │ │ ├── create_scope_op.h │ │ │ │ │ ├── cross_entropy_op.h │ │ │ │ │ ├── dataset_ops.h │ │ │ │ │ ├── distance_op.h │ │ │ │ │ ├── do_op.h │ │ │ │ │ ├── dropout_op.h │ │ │ │ │ ├── elementwise_linear_op.h │ │ │ │ │ ├── elementwise_logical_ops.h │ │ │ │ │ ├── elementwise_op.h │ │ │ │ │ ├── elementwise_op_test.h │ │ │ │ │ ├── elu_op.h │ │ │ │ │ ├── feed_blob_op.h │ │ │ │ │ ├── filler_op.h │ │ │ │ │ ├── find_duplicate_elements_op.h │ │ │ │ │ ├── find_op.h │ │ │ │ │ ├── free_op.h │ │ │ │ │ ├── fully_connected_op.h │ │ │ │ │ ├── given_tensor_fill_op.h │ │ │ │ │ ├── gru_unit_op.h │ │ │ │ │ ├── h_softmax_op.h │ │ │ │ │ ├── half_float_ops.h │ │ │ │ │ ├── if_op.h │ │ │ │ │ ├── im2col_op.h │ │ │ │ │ ├── index_hash_ops.h │ │ │ │ │ ├── instance_norm_op.h │ │ │ │ │ ├── layer_norm_op.h │ │ │ │ │ ├── leaky_relu_op.h │ │ │ │ │ ├── lengths_reducer_ops.h │ │ │ │ │ ├── lengths_reducer_rowwise_8bit_ops.h │ │ │ │ │ ├── lengths_tile_op.h │ │ │ │ │ ├── lengths_top_k_op.h │ │ │ │ │ ├── load_save_op.h │ │ │ │ │ ├── local_response_normalization_op.h │ │ │ │ │ ├── loss_op.h │ │ │ │ │ ├── lpnorm_op.h │ │ │ │ │ ├── lstm_unit_op.h │ │ │ │ │ ├── map_ops.h │ │ │ │ │ ├── margin_ranking_criterion_op.h │ │ │ │ │ ├── math_ops.h │ │ │ │ │ ├── matmul_op.h │ │ │ │ │ ├── max_pool_with_index.h │ │ │ │ │ ├── merge_id_lists_op.h │ │ │ │ │ ├── multi_class_accuracy_op.h │ │ │ │ │ ├── no_default_engine_op.h │ │ │ │ │ ├── normalize_op.h │ │ │ │ │ ├── one_hot_ops.h │ │ │ │ │ ├── operator_fallback_gpu.h │ │ │ │ │ ├── order_switch_ops.h │ │ │ │ │ ├── pack_rnn_sequence_op.h │ │ │ │ │ ├── pack_segments.h │ │ │ │ │ ├── pad_op.h │ │ │ │ │ ├── partition_ops.h │ │ │ │ │ ├── perplexity_op.h │ │ │ │ │ ├── piecewise_linear_transform_op.h │ │ │ │ │ ├── pool_op.h │ │ │ │ │ ├── prefetch_op.h │ │ │ │ │ ├── prelu_op.h │ │ │ │ │ ├── prepend_dim_op.h │ │ │ │ │ ├── rank_loss_op.h │ │ │ │ │ ├── recurrent_network_blob_fetcher_op.h │ │ │ │ │ ├── recurrent_network_executor.h │ │ │ │ │ ├── recurrent_network_executor_gpu.h │ │ │ │ │ ├── recurrent_network_executor_incl.h │ │ │ │ │ ├── recurrent_network_op.h │ │ │ │ │ ├── recurrent_op_cudnn.h │ │ │ │ │ ├── reducer_functors.h │ │ │ │ │ ├── reduction_front_back_ops.h │ │ │ │ │ ├── reduction_ops.h │ │ │ │ │ ├── relu_op.h │ │ │ │ │ ├── remove_data_blocks_op.h │ │ │ │ │ ├── replace_nan_op.h │ │ │ │ │ ├── reshape_op.h │ │ │ │ │ ├── resize_op.h │ │ │ │ │ ├── reverse_packed_segs_op.h │ │ │ │ │ ├── rmac_regions_op.h │ │ │ │ │ ├── roi_pool_op.h │ │ │ │ │ ├── rowmul_op.h │ │ │ │ │ ├── scale_op.h │ │ │ │ │ ├── segment_reduction_op.h │ │ │ │ │ ├── sequence_ops.h │ │ │ │ │ ├── shape_op.h │ │ │ │ │ ├── sinusoid_position_encoding_op.h │ │ │ │ │ ├── slice_op.h │ │ │ │ │ ├── softmax_op.h │ │ │ │ │ ├── softmax_shared.h │ │ │ │ │ ├── softmax_with_loss_op.h │ │ │ │ │ ├── softplus_op.h │ │ │ │ │ ├── space_batch_op.h │ │ │ │ │ ├── sparse_to_dense_mask_op.h │ │ │ │ │ ├── sparse_to_dense_op.h │ │ │ │ │ ├── spatial_batch_norm_op.h │ │ │ │ │ ├── spatial_softmax_with_loss_op.h │ │ │ │ │ ├── square_root_divide_op.h │ │ │ │ │ ├── stop_gradient.h │ │ │ │ │ ├── string_ops.h │ │ │ │ │ ├── summarize_op.h │ │ │ │ │ ├── tensor_protos_db_input.h │ │ │ │ │ ├── text_file_reader_utils.h │ │ │ │ │ ├── tile_op.h │ │ │ │ │ ├── top_k.h │ │ │ │ │ ├── transpose_op.h │ │ │ │ │ ├── tt_linear_op.h │ │ │ │ │ ├── utility_ops.h │ │ │ │ │ ├── while_op.h │ │ │ │ │ └── zero_gradient_op.h │ │ │ │ ├── perfkernels/ │ │ │ │ │ ├── common.h │ │ │ │ │ ├── cvtsh_ss_bugfix.h │ │ │ │ │ ├── embedding_lookup.h │ │ │ │ │ └── typed_axpy.h │ │ │ │ ├── proto/ │ │ │ │ │ ├── caffe2.pb.h │ │ │ │ │ ├── caffe2_legacy.pb.h │ │ │ │ │ ├── hsm.pb.h │ │ │ │ │ ├── metanet.pb.h │ │ │ │ │ ├── predictor_consts.pb.h │ │ │ │ │ └── prof_dag.pb.h │ │ │ │ ├── python/ │ │ │ │ │ └── pybind_state.h │ │ │ │ ├── queue/ │ │ │ │ │ ├── blobs_queue.h │ │ │ │ │ ├── blobs_queue_db.h │ │ │ │ │ ├── queue_ops.h │ │ │ │ │ ├── rebatching_queue.h │ │ │ │ │ └── rebatching_queue_ops.h │ │ │ │ ├── sgd/ │ │ │ │ │ ├── adagrad_op.h │ │ │ │ │ ├── adam_op.h │ │ │ │ │ ├── ftrl_op.h │ │ │ │ │ ├── iter_op.h │ │ │ │ │ ├── learning_rate_functors.h │ │ │ │ │ ├── learning_rate_op.h │ │ │ │ │ ├── momentum_sgd_op.h │ │ │ │ │ ├── rmsprop_op.h │ │ │ │ │ └── yellowfin_op.h │ │ │ │ ├── transforms/ │ │ │ │ │ ├── common_subexpression_elimination.h │ │ │ │ │ ├── conv_to_nnpack_transform.h │ │ │ │ │ ├── pattern_net_transform.h │ │ │ │ │ └── single_op_transform.h │ │ │ │ ├── utils/ │ │ │ │ │ ├── cast.h │ │ │ │ │ ├── cblas.h │ │ │ │ │ ├── conversions.h │ │ │ │ │ ├── cpu_neon.h │ │ │ │ │ ├── cpuid.h │ │ │ │ │ ├── fixed_divisor.h │ │ │ │ │ ├── math-detail.h │ │ │ │ │ ├── math.h │ │ │ │ │ ├── murmur_hash3.h │ │ │ │ │ ├── proto_utils.h │ │ │ │ │ ├── signal_handler.h │ │ │ │ │ ├── simple_queue.h │ │ │ │ │ ├── smart_tensor_printer.h │ │ │ │ │ ├── string_utils.h │ │ │ │ │ ├── thread_pool.h │ │ │ │ │ ├── threadpool/ │ │ │ │ │ │ ├── ThreadPool.h │ │ │ │ │ │ ├── ThreadPoolCommon.h │ │ │ │ │ │ ├── WorkersPool.h │ │ │ │ │ │ ├── pthreadpool.h │ │ │ │ │ │ └── pthreadpool_impl.h │ │ │ │ │ └── zmq_helper.h │ │ │ │ └── video/ │ │ │ │ ├── video_decoder.h │ │ │ │ ├── video_input_op.h │ │ │ │ └── video_io.h │ │ │ ├── classes.h │ │ │ ├── google/ │ │ │ │ └── protobuf/ │ │ │ │ ├── any.h │ │ │ │ ├── any.pb.h │ │ │ │ ├── any.proto │ │ │ │ ├── api.pb.h │ │ │ │ ├── api.proto │ │ │ │ ├── arena.h │ │ │ │ ├── arenastring.h │ │ │ │ ├── compiler/ │ │ │ │ │ ├── code_generator.h │ │ │ │ │ ├── command_line_interface.h │ │ │ │ │ ├── cpp/ │ │ │ │ │ │ └── cpp_generator.h │ │ │ │ │ ├── csharp/ │ │ │ │ │ │ ├── csharp_generator.h │ │ │ │ │ │ └── csharp_names.h │ │ │ │ │ ├── importer.h │ │ │ │ │ ├── java/ │ │ │ │ │ │ ├── java_generator.h │ │ │ │ │ │ └── java_names.h │ │ │ │ │ ├── javanano/ │ │ │ │ │ │ └── javanano_generator.h │ │ │ │ │ ├── js/ │ │ │ │ │ │ └── js_generator.h │ │ │ │ │ ├── objectivec/ │ │ │ │ │ │ ├── objectivec_generator.h │ │ │ │ │ │ └── objectivec_helpers.h │ │ │ │ │ ├── parser.h │ │ │ │ │ ├── php/ │ │ │ │ │ │ └── php_generator.h │ │ │ │ │ ├── plugin.h │ │ │ │ │ ├── plugin.pb.h │ │ │ │ │ ├── plugin.proto │ │ │ │ │ ├── python/ │ │ │ │ │ │ └── python_generator.h │ │ │ │ │ └── ruby/ │ │ │ │ │ └── ruby_generator.h │ │ │ │ ├── descriptor.h │ │ │ │ ├── descriptor.pb.h │ │ │ │ ├── descriptor.proto │ │ │ │ ├── descriptor_database.h │ │ │ │ ├── duration.pb.h │ │ │ │ ├── duration.proto │ │ │ │ ├── dynamic_message.h │ │ │ │ ├── empty.pb.h │ │ │ │ ├── empty.proto │ │ │ │ ├── extension_set.h │ │ │ │ ├── field_mask.pb.h │ │ │ │ ├── field_mask.proto │ │ │ │ ├── generated_enum_reflection.h │ │ │ │ ├── generated_enum_util.h │ │ │ │ ├── generated_message_reflection.h │ │ │ │ ├── generated_message_util.h │ │ │ │ ├── has_bits.h │ │ │ │ ├── io/ │ │ │ │ │ ├── coded_stream.h │ │ │ │ │ ├── gzip_stream.h │ │ │ │ │ ├── printer.h │ │ │ │ │ ├── strtod.h │ │ │ │ │ ├── tokenizer.h │ │ │ │ │ ├── zero_copy_stream.h │ │ │ │ │ ├── zero_copy_stream_impl.h │ │ │ │ │ └── zero_copy_stream_impl_lite.h │ │ │ │ ├── map.h │ │ │ │ ├── map_entry.h │ │ │ │ ├── map_entry_lite.h │ │ │ │ ├── map_field.h │ │ │ │ ├── map_field_inl.h │ │ │ │ ├── map_field_lite.h │ │ │ │ ├── map_type_handler.h │ │ │ │ ├── message.h │ │ │ │ ├── message_lite.h │ │ │ │ ├── metadata.h │ │ │ │ ├── reflection.h │ │ │ │ ├── reflection_ops.h │ │ │ │ ├── repeated_field.h │ │ │ │ ├── service.h │ │ │ │ ├── source_context.pb.h │ │ │ │ ├── source_context.proto │ │ │ │ ├── struct.pb.h │ │ │ │ ├── struct.proto │ │ │ │ ├── stubs/ │ │ │ │ │ ├── atomic_sequence_num.h │ │ │ │ │ ├── atomicops.h │ │ │ │ │ ├── atomicops_internals_arm64_gcc.h │ │ │ │ │ ├── atomicops_internals_arm_gcc.h │ │ │ │ │ ├── atomicops_internals_arm_qnx.h │ │ │ │ │ ├── atomicops_internals_atomicword_compat.h │ │ │ │ │ ├── atomicops_internals_generic_gcc.h │ │ │ │ │ ├── atomicops_internals_macosx.h │ │ │ │ │ ├── atomicops_internals_mips_gcc.h │ │ │ │ │ ├── atomicops_internals_pnacl.h │ │ │ │ │ ├── atomicops_internals_power.h │ │ │ │ │ ├── atomicops_internals_ppc_gcc.h │ │ │ │ │ ├── atomicops_internals_solaris.h │ │ │ │ │ ├── atomicops_internals_tsan.h │ │ │ │ │ ├── atomicops_internals_x86_gcc.h │ │ │ │ │ ├── atomicops_internals_x86_msvc.h │ │ │ │ │ ├── bytestream.h │ │ │ │ │ ├── callback.h │ │ │ │ │ ├── casts.h │ │ │ │ │ ├── common.h │ │ │ │ │ ├── fastmem.h │ │ │ │ │ ├── hash.h │ │ │ │ │ ├── logging.h │ │ │ │ │ ├── macros.h │ │ │ │ │ ├── mutex.h │ │ │ │ │ ├── once.h │ │ │ │ │ ├── platform_macros.h │ │ │ │ │ ├── port.h │ │ │ │ │ ├── scoped_ptr.h │ │ │ │ │ ├── shared_ptr.h │ │ │ │ │ ├── singleton.h │ │ │ │ │ ├── status.h │ │ │ │ │ ├── stl_util.h │ │ │ │ │ ├── stringpiece.h │ │ │ │ │ ├── template_util.h │ │ │ │ │ └── type_traits.h │ │ │ │ ├── text_format.h │ │ │ │ ├── timestamp.pb.h │ │ │ │ ├── timestamp.proto │ │ │ │ ├── type.pb.h │ │ │ │ ├── type.proto │ │ │ │ ├── unknown_field_set.h │ │ │ │ ├── util/ │ │ │ │ │ ├── field_comparator.h │ │ │ │ │ ├── field_mask_util.h │ │ │ │ │ ├── json_util.h │ │ │ │ │ ├── message_differencer.h │ │ │ │ │ ├── time_util.h │ │ │ │ │ ├── type_resolver.h │ │ │ │ │ └── type_resolver_util.h │ │ │ │ ├── wire_format.h │ │ │ │ ├── wire_format_lite.h │ │ │ │ ├── wire_format_lite_inl.h │ │ │ │ ├── wrappers.pb.h │ │ │ │ └── wrappers.proto │ │ │ └── native-lib.cpp │ │ ├── java/ │ │ │ └── facebook/ │ │ │ └── f8demo/ │ │ │ └── ClassifyCamera.java │ │ ├── jniLibs/ │ │ │ └── armeabi-v7a/ │ │ │ ├── libCAFFE2_NNPACK.a │ │ │ ├── libCAFFE2_PTHREADPOOL.a │ │ │ ├── libCaffe2_CPU.a │ │ │ ├── libcpufeatures.a │ │ │ ├── libprotobuf-lite.a │ │ │ └── libprotobuf.a │ │ └── res/ │ │ ├── drawable/ │ │ │ ├── ic_logo.xml │ │ │ └── ic_thumb.xml │ │ ├── layout/ │ │ │ └── activity_classify_camera.xml │ │ └── values/ │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test/ │ └── java/ │ └── facebook/ │ └── f8demo/ │ └── ExampleUnitTest.java ├── build.gradle ├── gradle/ │ └── wrapper/ │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── gradlew ├── gradlew.bat └── settings.gradle
Condensed preview — 787 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (9,499K chars).
[
{
"path": ".gitignore",
"chars": 156,
"preview": "*.iml\n.gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.idea/modules.xml\n.DS_Store\n/build\n/captures\n.exte"
},
{
"path": ".idea/compiler.xml",
"chars": 686,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"CompilerConfiguration\">\n <resourceExt"
},
{
"path": ".idea/copyright/profiles_settings.xml",
"chars": 74,
"preview": "<component name=\"CopyrightManager\">\n <settings default=\"\" />\n</component>"
},
{
"path": ".idea/gradle.xml",
"chars": 626,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"GradleSettings\">\n <option name=\"linke"
},
{
"path": ".idea/misc.xml",
"chars": 1716,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"EntryPointsManager\">\n <entry_points v"
},
{
"path": ".idea/runConfigurations.xml",
"chars": 564,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"RunConfigurationProducerService\">\n <o"
},
{
"path": ".idea/vcs.xml",
"chars": 180,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "Exporting Squeezenet to mobile.ipynb",
"chars": 12788,
"preview": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"In this tutorial we'll show how to "
},
{
"path": "LICENSE",
"chars": 650,
"preview": "Copyright (c) 2017-present, Facebook, Inc. All rights reserved.\n\nThe examples provided by Facebook are for non-commercia"
},
{
"path": "README.md",
"chars": 918,
"preview": "## AICamera\n\nAICamera is a demo app that was displayed at Facebook's F8 event. The previous version (also on this repo)"
},
{
"path": "app/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "app/CMakeLists.txt",
"chars": 1818,
"preview": "cmake_minimum_required(VERSION 3.4.1)\n\nadd_library(\n native-lib\n SHARED\n src/main/cp"
},
{
"path": "app/build.gradle",
"chars": 1472,
"preview": "apply plugin: 'com.android.application'\n\nandroid {\n compileSdkVersion 25\n defaultConfig {\n applicationId \"f"
},
{
"path": "app/proguard-rules.pro",
"chars": 935,
"preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /U"
},
{
"path": "app/src/androidTest/java/facebook/f8demo/ExampleInstrumentedTest.java",
"chars": 734,
"preview": "package facebook.f8demo;\n\nimport android.content.Context;\nimport android.support.test.InstrumentationRegistry;\nimport an"
},
{
"path": "app/src/main/AndroidManifest.xml",
"chars": 878,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "app/src/main/cpp/Eigen/CMakeLists.txt",
"chars": 694,
"preview": "include(RegexUtils)\ntest_escape_string_as_regex()\n\nfile(GLOB Eigen_directory_files \"*\")\n\nescape_string_as_regex(ESCAPED_"
},
{
"path": "app/src/main/cpp/Eigen/Cholesky",
"chars": 1129,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/CholmodSupport",
"chars": 1900,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/Core",
"chars": 18094,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/Dense",
"chars": 122,
"preview": "#include \"Core\"\n#include \"LU\"\n#include \"Cholesky\"\n#include \"QR\"\n#include \"SVD\"\n#include \"Geometry\"\n#include \"Eigenvalues"
},
{
"path": "app/src/main/cpp/Eigen/Eigen",
"chars": 35,
"preview": "#include \"Dense\"\n#include \"Sparse\"\n"
},
{
"path": "app/src/main/cpp/Eigen/Eigenvalues",
"chars": 1763,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/Geometry",
"chars": 2049,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/Householder",
"chars": 874,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/IterativeLinearSolvers",
"chars": 2083,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/Jacobi",
"chars": 939,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/LU",
"chars": 1374,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/MetisSupport",
"chars": 991,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/OrderingMethods",
"chars": 2483,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/PaStiXSupport",
"chars": 1676,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/PardisoSupport",
"chars": 1116,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/QR",
"chars": 1258,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/QtAlignedMalloc",
"chars": 940,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/SPQRSupport",
"chars": 1162,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/SVD",
"chars": 1570,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/Sparse",
"chars": 919,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/SparseCholesky",
"chars": 1371,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2013 G"
},
{
"path": "app/src/main/cpp/Eigen/SparseCore",
"chars": 2240,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/SparseLU",
"chars": 1711,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré"
},
{
"path": "app/src/main/cpp/Eigen/SparseQR",
"chars": 1222,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/StdDeque",
"chars": 797,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/StdList",
"chars": 726,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Hauke "
},
{
"path": "app/src/main/cpp/Eigen/StdVector",
"chars": 803,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/SuperLUSupport",
"chars": 2243,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/UmfPackSupport",
"chars": 1382,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/src/Cholesky/LDLT.h",
"chars": 24232,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2011 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Cholesky/LLT.h",
"chars": 17812,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Cholesky/LLT_LAPACKE.h",
"chars": 3974,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
},
{
"path": "app/src/main/cpp/Eigen/src/CholmodSupport/CholmodSupport.h",
"chars": 25405,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/ArithmeticSequence.h",
"chars": 17244,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Array.h",
"chars": 11944,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/ArrayBase.h",
"chars": 8159,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/ArrayWrapper.h",
"chars": 6571,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Assign.h",
"chars": 2738,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007 Michae"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/AssignEvaluator.h",
"chars": 38120,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Assign_MKL.h",
"chars": 12221,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inr"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/BandMatrix.h",
"chars": 13910,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Block.h",
"chars": 18064,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/BooleanRedux.h",
"chars": 4301,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/CommaInitializer.h",
"chars": 5725,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/ConditionEstimator.h",
"chars": 6970,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Rasmus"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/CoreEvaluators.h",
"chars": 63657,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/CoreIterators.h",
"chars": 4745,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/CwiseBinaryOp.h",
"chars": 7628,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/CwiseNullaryOp.h",
"chars": 31460,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/CwiseTernaryOp.h",
"chars": 8256,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/CwiseUnaryOp.h",
"chars": 3877,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/CwiseUnaryView.h",
"chars": 5282,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/DenseBase.h",
"chars": 27579,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007-2010 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/DenseCoeffsBase.h",
"chars": 24212,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2010 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/DenseStorage.h",
"chars": 21959,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Diagonal.h",
"chars": 9615,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007-2009 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/DiagonalMatrix.h",
"chars": 12680,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/DiagonalProduct.h",
"chars": 988,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Dot.h",
"chars": 11536,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008, "
},
{
"path": "app/src/main/cpp/Eigen/src/Core/EigenBase.h",
"chars": 5594,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/ForceAlignedAccess.h",
"chars": 4769,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Fuzzy.h",
"chars": 5759,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/GeneralProduct.h",
"chars": 21137,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/GenericPacketMath.h",
"chars": 22401,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/GlobalFunctions.h",
"chars": 10332,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010-2016 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/IO.h",
"chars": 7076,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/IndexedView.h",
"chars": 8412,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Inverse.h",
"chars": 3519,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Map.h",
"chars": 6655,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007-2010 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/MapBase.h",
"chars": 10621,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007-2010 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/MathFunctions.h",
"chars": 48632,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2010 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/MathFunctionsImpl.h",
"chars": 2475,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Pedro "
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Matrix.h",
"chars": 19170,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2010 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/MatrixBase.h",
"chars": 22355,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2009 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/NestByValue.h",
"chars": 3490,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/NoAlias.h",
"chars": 3582,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/NumTraits.h",
"chars": 9224,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2010 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/PermutationMatrix.h",
"chars": 21646,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/PlainObjectBase.h",
"chars": 45040,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Product.h",
"chars": 7149,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2011 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/ProductEvaluators.h",
"chars": 48549,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Random.h",
"chars": 6397,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Redux.h",
"chars": 17958,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Ref.h",
"chars": 12945,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Replicate.h",
"chars": 5631,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/ReturnByValue.h",
"chars": 4218,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Reverse.h",
"chars": 7127,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Select.h",
"chars": 6020,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/SelfAdjointView.h",
"chars": 14171,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/SelfCwiseBinaryOp.h",
"chars": 1909,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Solve.h",
"chars": 6765,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/SolveTriangular.h",
"chars": 9049,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/SolverBase.h",
"chars": 4365,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/StableNorm.h",
"chars": 7686,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Stride.h",
"chars": 3865,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Swap.h",
"chars": 2683,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Transpose.h",
"chars": 14867,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Transpositions.h",
"chars": 14396,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010-2011 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/TriangularMatrix.h",
"chars": 37356,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/VectorBlock.h",
"chars": 3462,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/VectorwiseOp.h",
"chars": 29477,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/Visitor.h",
"chars": 8074,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/AVX/Complex.h",
"chars": 19305,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/AVX/MathFunctions.h",
"chars": 17776,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Pedro "
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/AVX/PacketMath.h",
"chars": 27870,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/AVX/TypeCasting.h",
"chars": 1194,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/AVX512/MathFunctions.h",
"chars": 15827,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Pedro "
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/AVX512/PacketMath.h",
"chars": 49872,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/AltiVec/Complex.h",
"chars": 17722,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/AltiVec/MathFunctions.h",
"chars": 10797,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007 Julien"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/AltiVec/PacketMath.h",
"chars": 37102,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2016 K"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/CUDA/Complex.h",
"chars": 4240,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/CUDA/Half.h",
"chars": 19771,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/CUDA/MathFunctions.h",
"chars": 2697,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/CUDA/PacketMath.h",
"chars": 10780,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/CUDA/PacketMathHalf.h",
"chars": 35709,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/CUDA/TypeCasting.h",
"chars": 5509,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/Default/Settings.h",
"chars": 1746,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/NEON/Complex.h",
"chars": 17570,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/NEON/MathFunctions.h",
"chars": 2846,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is "
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/NEON/PacketMath.h",
"chars": 27884,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/SSE/Complex.h",
"chars": 20720,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/SSE/MathFunctions.h",
"chars": 18888,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007 Julien"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/SSE/PacketMath.h",
"chars": 36953,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/SSE/TypeCasting.h",
"chars": 1726,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/ZVector/Complex.h",
"chars": 15259,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/ZVector/MathFunctions.h",
"chars": 4418,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007 Julien"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/arch/ZVector/PacketMath.h",
"chars": 32283,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Konsta"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/functors/AssignmentFunctors.h",
"chars": 6284,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/functors/BinaryFunctors.h",
"chars": 18081,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/functors/NullaryFunctors.h",
"chars": 8257,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2016 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/functors/StlFunctors.h",
"chars": 4184,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/functors/TernaryFunctors.h",
"chars": 607,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Eugene"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/functors/UnaryFunctors.h",
"chars": 28902,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2016 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/GeneralBlockPanelKernel.h",
"chars": 81106,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/GeneralMatrixMatrix.h",
"chars": 18478,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h",
"chars": 14830,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h",
"chars": 6712,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h",
"chars": 4730,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/GeneralMatrixVector.h",
"chars": 16834,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2016 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h",
"chars": 6053,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/Parallelizer.h",
"chars": 4905,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/SelfadjointMatrixMatrix.h",
"chars": 19632,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h",
"chars": 10614,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/SelfadjointMatrixVector.h",
"chars": 9901,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h",
"chars": 4903,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/SelfadjointProduct.h",
"chars": 6123,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/SelfadjointRank2Update.h",
"chars": 4084,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/TriangularMatrixMatrix.h",
"chars": 19345,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h",
"chars": 13238,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/TriangularMatrixVector.h",
"chars": 14216,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h",
"chars": 9895,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/TriangularSolverMatrix.h",
"chars": 13979,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h",
"chars": 6024,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/products/TriangularSolverVector.h",
"chars": 5741,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/BlasUtil.h",
"chars": 15911,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/Constants.h",
"chars": 21738,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/DisableStupidWarnings.h",
"chars": 3628,
"preview": "#ifndef EIGEN_WARNINGS_DISABLED\n#define EIGEN_WARNINGS_DISABLED\n\n#ifdef _MSC_VER\n // 4100 - unreferenced formal paramet"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/ForwardDeclarations.h",
"chars": 14238,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007-2010 B"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/IndexedViewHelper.h",
"chars": 5966,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/IntegralConstant.h",
"chars": 10821,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/MKL_support.h",
"chars": 3970,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/Macros.h",
"chars": 37555,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/Memory.h",
"chars": 39659,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/Meta.h",
"chars": 20236,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/NonMPL2.h",
"chars": 85,
"preview": "#ifdef EIGEN_MPL2_ONLY\n#error Including non-MPL2 code in EIGEN_MPL2_ONLY mode\n#endif\n"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/ReenableStupidWarnings.h",
"chars": 809,
"preview": "#ifdef EIGEN_WARNINGS_DISABLED\n#undef EIGEN_WARNINGS_DISABLED\n\n#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS\n #ifde"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/StaticAssert.h",
"chars": 10284,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/SymbolicIndex.h",
"chars": 12224,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Core/util/XprHelper.h",
"chars": 34362,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/ComplexEigenSolver.h",
"chars": 12558,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Claire"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/ComplexSchur.h",
"chars": 17021,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Claire"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h",
"chars": 4178,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/EigenSolver.h",
"chars": 22944,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h",
"chars": 17191,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012-2016 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h",
"chars": 9715,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/HessenbergDecomposition.h",
"chars": 14351,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h",
"chars": 5715,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/RealQZ.h",
"chars": 23586,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Alexey"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/RealSchur.h",
"chars": 20268,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael G"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h",
"chars": 3650,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h",
"chars": 33674,
"preview": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 G"
},
{
"path": "app/src/main/cpp/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h",
"chars": 4378,
"preview": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, wit"
}
]
// ... and 587 more files (download for full content)
About this extraction
This page contains the full source code of the caffe2/AICamera GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 787 files (76.5 MB), approximately 2.3M tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.