├── .appveyor.yml ├── .dont_use_travis.yml ├── .gitignore ├── .gitmodules ├── AUTHORS ├── CMakeLists.txt ├── ElementalREADME.md ├── Hydrogen_ReleaseNotes.txt ├── LICENSE ├── PUBLICATIONS.bib ├── README.md ├── REFERENCES.bib ├── cmake ├── El.png ├── configure_files │ ├── HydrogenConfig.cmake.in │ ├── HydrogenConfigVersion.cmake.in │ ├── config.h.in │ └── hydrogen_config.h.in ├── detect │ └── CXX.cmake └── modules │ ├── FindAndVerifyExtendedPrecision.cmake │ ├── FindAndVerifyLAPACK.cmake │ ├── FindAndVerifyMPI.cmake │ ├── FindAndVerifyOpenMP.cmake │ ├── FindCUB.cmake │ ├── FindGMP.cmake │ ├── FindHALF.cmake │ ├── FindMPC.cmake │ ├── FindMPFR.cmake │ ├── FindNVTX.cmake │ ├── FindQD.cmake │ ├── FindQuadmath.cmake │ ├── FindROCBLAS.cmake │ ├── FindRoctracer.cmake │ ├── FindVTUNE.cmake │ ├── FindValgrind.cmake │ ├── HydrogenCleanupHIPTargets.cmake │ ├── HydrogenETIGeneration.cmake │ └── PrintHydrogenSummary.cmake ├── compiler_bugs └── MSVC │ └── constexpr │ ├── CMakeLists.txt │ └── constexpr.cpp ├── data ├── lapack_like │ ├── c-41.mtx │ └── memplus.mtx ├── number_theory │ ├── SVP80_BKZ49.txt │ ├── SVPChallenge100.txt │ ├── SVPChallenge146.txt │ ├── SVPChallenge40.txt │ └── SVPChallenge80.txt └── optimization │ ├── adlittle.mps │ ├── afiro.mps │ ├── share1b.mps │ └── share2b.mps ├── debian ├── changelog ├── compat ├── control ├── copyright ├── rules └── source │ └── format ├── doxy └── Doxyfile.in ├── examples ├── blas_like │ └── Gemv.cpp ├── core │ ├── Arbitrary.cpp │ ├── Constructors.cpp │ ├── LambdaReduce.cpp │ └── MatrixCombination.cpp ├── interface │ ├── AlgebraicRelationSearch.py │ ├── BP.py │ ├── BPComplex.py │ ├── BPComplexDense.py │ ├── BPDN.py │ ├── BPDNDense.py │ ├── BPDense.py │ ├── C-Fill.c │ ├── CP.py │ ├── CPDense.py │ ├── DS.py │ ├── DSDense.py │ ├── DruinskyToledo.py │ ├── DynamicRegCounter.py │ ├── EN.py │ ├── ENDense.py │ ├── Eig.py │ ├── Fourier.py │ ├── FoxLi.py │ ├── GEPPGrowth.py │ ├── GLM.py │ ├── InvPos.py │ ├── JordanCholesky.py │ ├── LAV.py │ ├── LAVDense.py │ ├── LCF.py │ ├── LLL.py │ ├── LLLSingular.py │ ├── LPAffine.py │ ├── LPAffineDense.py │ ├── LPDirect.py │ ├── LPDirectDense.py │ ├── LSE.py │ ├── LatticeImageAndKernel.py │ ├── LeastSquares.py │ ├── LinearSolve.py │ ├── LongOnlyPortfolio.py │ ├── Multiply.py │ ├── NNLS.py │ ├── NNLSDense.py │ ├── PNorm.py │ ├── ProductLanczos.py │ ├── QPAffine.py │ ├── QPAffineDense.py │ ├── QPDirect.py │ ├── QPDirectDense.py │ ├── RLS.py │ ├── RNNLS.py │ ├── RemoteDistSparse.py │ ├── RemoteUpdate.py │ ├── SOC.py │ ├── SOCAtom.py │ ├── SOCP_trivial.py │ ├── SVM.py │ ├── SVMDense.py │ ├── SequentialLSE.py │ ├── SequentialLeastSquares.py │ ├── SequentialLinearSolve.py │ ├── Simple.py │ ├── SymmetricSolve.py │ ├── TV.py │ ├── Tikhonov.py │ ├── TriangEig.py │ └── ZDependenceSearch.py ├── io │ ├── Read.cpp │ └── Write.cpp ├── lapack_like │ ├── BunchKaufman.cpp │ ├── BusingerGolub.cpp │ ├── ChunkedPseudospectra.cpp │ ├── ChunkedTriangularPseudospectra.cpp │ ├── GLM.cpp │ ├── Helmholtz.cpp │ ├── HelmholtzPML3D.cpp │ ├── HermitianEig.cpp │ ├── HermitianSDC.cpp │ ├── Hilbert.cpp │ ├── ID.cpp │ ├── KernelAndImage.cpp │ ├── LeastSquares.cpp │ ├── LinearSolve.cpp │ ├── PerfectShifts.cpp │ ├── Polar.cpp │ ├── ProxyPivotedQR.cpp │ ├── Pseudoinverse.cpp │ ├── Pseudospectra.cpp │ ├── QDWH.cpp │ ├── QR.cpp │ ├── RealHermitianFunction.cpp │ ├── SequentialSVD.cpp │ ├── Sign.cpp │ ├── Skeleton.cpp │ └── TriangularPseudospectra.cpp └── matrices │ ├── Egorov.cpp │ ├── Legendre.cpp │ └── Walsh.cpp ├── experimental └── g3d │ └── G3DGemm.cpp ├── external ├── pmrrr │ ├── CMakeLists.txt │ ├── LICENSE │ ├── README │ ├── include │ │ ├── pmrrr.h │ │ └── pmrrr │ │ │ ├── counter.h │ │ │ ├── global.h │ │ │ ├── plarre.h │ │ │ ├── plarrv.h │ │ │ ├── process_task.h │ │ │ ├── queue.h │ │ │ ├── rrr.h │ │ │ ├── structs.h │ │ │ └── tasks.h │ └── src │ │ ├── blas │ │ ├── LICENSE │ │ ├── odcpy.c │ │ ├── odscal.c │ │ └── odswap.c │ │ ├── core │ │ ├── counter.c │ │ ├── queue.c │ │ ├── rrr.c │ │ └── tasks.c │ │ ├── lapack │ │ ├── LICENSE │ │ ├── ode2.c │ │ ├── odebz.c │ │ ├── odev2.c │ │ ├── odnan.c │ │ ├── odneg.c │ │ ├── odnst.c │ │ ├── odr1v.c │ │ ├── odrnv.c │ │ ├── odrra.c │ │ ├── odrrb.c │ │ ├── odrrc.c │ │ ├── odrrd.c │ │ ├── odrre.c │ │ ├── odrrf.c │ │ ├── odrrj.c │ │ ├── odrrk.c │ │ ├── odrrr.c │ │ ├── odrrv.c │ │ ├── odruv.c │ │ ├── odset.c │ │ ├── odsnan.c │ │ ├── odsq2.c │ │ ├── odsq3.c │ │ ├── odsq4.c │ │ ├── odsq5.c │ │ ├── odsq6.c │ │ ├── odsrt.c │ │ ├── odssq.c │ │ ├── odstmr.c │ │ ├── oerbla.c │ │ └── olsame.c │ │ ├── plarre.c │ │ ├── plarrv.c │ │ ├── pmrrr.c │ │ ├── process_c_task.c │ │ ├── process_r_task.c │ │ └── process_s_task.c └── suite_sparse │ ├── CMakeLists.txt │ ├── README │ ├── include │ └── ElSuiteSparse │ │ ├── amd.h │ │ ├── amd_internal.h │ │ ├── config.h │ │ ├── ldl.hpp │ │ └── ldl │ │ └── impl.hpp │ └── src │ ├── amd │ ├── amd_1.c │ ├── amd_2.c │ ├── amd_aat.c │ ├── amd_control.c │ ├── amd_defaults.c │ ├── amd_dump.c │ ├── amd_info.c │ ├── amd_order.c │ ├── amd_post_tree.c │ ├── amd_postorder.c │ ├── amd_preprocess.c │ └── amd_valid.c │ └── config.c ├── include ├── CMakeLists.txt ├── El-lite.hpp ├── El.hpp ├── El │ ├── CMakeLists.txt │ ├── blas_like.hpp │ ├── blas_like │ │ ├── CMakeLists.txt │ │ ├── level1.hpp │ │ ├── level1 │ │ │ ├── AllReduce.hpp │ │ │ ├── Axpy.hpp │ │ │ ├── Axpy │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── util.hpp │ │ │ ├── AxpyContract.hpp │ │ │ ├── AxpyTrapezoid.hpp │ │ │ ├── Broadcast.hpp │ │ │ ├── CMakeLists.txt │ │ │ ├── Concatenate.hpp │ │ │ ├── Conjugate.hpp │ │ │ ├── ConjugateDiagonal.hpp │ │ │ ├── ConjugateSubmatrix.hpp │ │ │ ├── Contract.hpp │ │ │ ├── Copy.hpp │ │ │ ├── Copy │ │ │ │ ├── AllGather.hpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── ColAllGather.hpp │ │ │ │ ├── ColAllToAllDemote.hpp │ │ │ │ ├── ColAllToAllPromote.hpp │ │ │ │ ├── ColFilter.hpp │ │ │ │ ├── Exchange.hpp │ │ │ │ ├── Filter.hpp │ │ │ │ ├── Gather.hpp │ │ │ │ ├── GeneralPurpose.hpp │ │ │ │ ├── PartialColAllGather.hpp │ │ │ │ ├── PartialColFilter.hpp │ │ │ │ ├── PartialRowAllGather.hpp │ │ │ │ ├── PartialRowFilter.hpp │ │ │ │ ├── RowAllGather.hpp │ │ │ │ ├── RowAllToAllDemote.hpp │ │ │ │ ├── RowAllToAllPromote.hpp │ │ │ │ ├── RowFilter.hpp │ │ │ │ ├── Scatter.hpp │ │ │ │ ├── Translate.hpp │ │ │ │ ├── TranslateBetweenGrids.hpp │ │ │ │ ├── TransposeDist.hpp │ │ │ │ ├── internal_decl.hpp │ │ │ │ ├── internal_impl.hpp │ │ │ │ └── util.hpp │ │ │ ├── CopyAsyncDistMatrix.hpp │ │ │ ├── CopyAsyncLocal.hpp │ │ │ ├── CopyDistMatrix.hpp │ │ │ ├── CopyFromRoot.hpp │ │ │ ├── CopyLocal.hpp │ │ │ ├── DiagonalScale.hpp │ │ │ ├── DiagonalScaleTrapezoid.hpp │ │ │ ├── DiagonalSolve.hpp │ │ │ ├── Dot.hpp │ │ │ ├── EntrywiseFill.hpp │ │ │ ├── EntrywiseMap.hpp │ │ │ ├── Fill.hpp │ │ │ ├── FillDiagonal.hpp │ │ │ ├── GetDiagonal.hpp │ │ │ ├── GetMappedDiagonal.hpp │ │ │ ├── GetSubmatrix.hpp │ │ │ ├── Givens.hpp │ │ │ ├── Hadamard.hpp │ │ │ ├── ImagPart.hpp │ │ │ ├── IndexDependentFill.hpp │ │ │ ├── IndexDependentMap.hpp │ │ │ ├── Kronecker.hpp │ │ │ ├── MakeDiagonalReal.hpp │ │ │ ├── MakeReal.hpp │ │ │ ├── MakeSubmatrixReal.hpp │ │ │ ├── MakeSymmetric.hpp │ │ │ ├── MakeTrapezoidal.hpp │ │ │ ├── Nrm2.hpp │ │ │ ├── QuasiDiagonalScale.hpp │ │ │ ├── QuasiDiagonalSolve.hpp │ │ │ ├── RealPart.hpp │ │ │ ├── Recv.hpp │ │ │ ├── Reshape.hpp │ │ │ ├── Rotate.hpp │ │ │ ├── Round.hpp │ │ │ ├── SafeScale.hpp │ │ │ ├── Scale.hpp │ │ │ ├── ScaleTrapezoid.hpp │ │ │ ├── Send.hpp │ │ │ ├── SendRecv.hpp │ │ │ ├── SetDiagonal.hpp │ │ │ ├── SetSubmatrix.hpp │ │ │ ├── Shift.hpp │ │ │ ├── ShiftDiagonal.hpp │ │ │ ├── Transpose.hpp │ │ │ ├── Transpose │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── ColAllGather.hpp │ │ │ │ ├── ColFilter.hpp │ │ │ │ ├── PartialColAllGather.hpp │ │ │ │ ├── PartialColFilter.hpp │ │ │ │ ├── PartialRowFilter.hpp │ │ │ │ └── RowFilter.hpp │ │ │ ├── TransposeAxpy.hpp │ │ │ ├── TransposeAxpyContract.hpp │ │ │ ├── TransposeContract.hpp │ │ │ ├── UpdateDiagonal.hpp │ │ │ ├── UpdateMappedDiagonal.hpp │ │ │ ├── UpdateSubmatrix.hpp │ │ │ ├── Zero.hpp │ │ │ ├── decl.hpp │ │ │ └── impl.hpp │ │ ├── level2.hpp │ │ ├── level2 │ │ │ ├── CMakeLists.txt │ │ │ └── CReflect.hpp │ │ ├── level3.hpp │ │ └── level3 │ │ │ ├── CMakeLists.txt │ │ │ └── CReflect.hpp │ ├── control.hpp │ ├── core.hpp │ ├── core │ │ ├── AbstractMatrix.hpp │ │ ├── AbstractMatrix │ │ │ ├── decl.hpp │ │ │ └── impl.hpp │ │ ├── CMakeLists.txt │ │ ├── CReflect.hpp │ │ ├── DistMap.hpp │ │ ├── DistMap │ │ │ ├── CMakeLists.txt │ │ │ └── decl.hpp │ │ ├── DistMatrix.hpp │ │ ├── DistMatrix │ │ │ ├── AbstractDistMatrix.hpp │ │ │ ├── Block.hpp │ │ │ ├── Block │ │ │ │ ├── CIRC_CIRC.hpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── MC_MR.hpp │ │ │ │ ├── MC_STAR.hpp │ │ │ │ ├── MD_STAR.hpp │ │ │ │ ├── MR_MC.hpp │ │ │ │ ├── MR_STAR.hpp │ │ │ │ ├── README.md │ │ │ │ ├── STAR_MC.hpp │ │ │ │ ├── STAR_MD.hpp │ │ │ │ ├── STAR_MR.hpp │ │ │ │ ├── STAR_STAR.hpp │ │ │ │ ├── STAR_VC.hpp │ │ │ │ ├── STAR_VR.hpp │ │ │ │ ├── VC_STAR.hpp │ │ │ │ └── VR_STAR.hpp │ │ │ ├── CMakeLists.txt │ │ │ ├── ElementMatrix.hpp │ │ │ └── ElementMatrix │ │ │ │ ├── CIRC_CIRC.hpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── MC_MR.hpp │ │ │ │ ├── MC_STAR.hpp │ │ │ │ ├── MD_STAR.hpp │ │ │ │ ├── MR_MC.hpp │ │ │ │ ├── MR_STAR.hpp │ │ │ │ ├── README.md │ │ │ │ ├── STAR_MC.hpp │ │ │ │ ├── STAR_MD.hpp │ │ │ │ ├── STAR_MR.hpp │ │ │ │ ├── STAR_STAR.hpp │ │ │ │ ├── STAR_VC.hpp │ │ │ │ ├── STAR_VR.hpp │ │ │ │ ├── VC_STAR.hpp │ │ │ │ └── VR_STAR.hpp │ │ ├── DistPermutation.hpp │ │ ├── Element.hpp │ │ ├── Element │ │ │ ├── CMakeLists.txt │ │ │ ├── Complex │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── decl.hpp │ │ │ │ └── impl.hpp │ │ │ ├── decl.hpp │ │ │ └── impl.hpp │ │ ├── FlamePart.hpp │ │ ├── FlamePart │ │ │ ├── CMakeLists.txt │ │ │ ├── Merge.hpp │ │ │ ├── Partition.hpp │ │ │ ├── Repartition.hpp │ │ │ └── SlidePartition.hpp │ │ ├── Grid.hpp │ │ ├── Matrix.hpp │ │ ├── Matrix │ │ │ ├── CMakeLists.txt │ │ │ ├── decl.hpp │ │ │ ├── impl.hpp │ │ │ ├── impl_cpu.hpp │ │ │ └── impl_gpu.hpp │ │ ├── Memory.hpp │ │ ├── Memory │ │ │ ├── CMakeLists.txt │ │ │ ├── decl.hpp │ │ │ └── impl.hpp │ │ ├── MemoryPool.hpp │ │ ├── Permutation.hpp │ │ ├── Profiling.hpp │ │ ├── Proxy.hpp │ │ ├── ProxyDevice.hpp │ │ ├── Serialize.hpp │ │ ├── Timer.hpp │ │ ├── View.hpp │ │ ├── View │ │ │ ├── CMakeLists.txt │ │ │ ├── decl.hpp │ │ │ └── impl.hpp │ │ ├── environment │ │ │ ├── CMakeLists.txt │ │ │ ├── decl.hpp │ │ │ └── impl.hpp │ │ ├── imports │ │ │ ├── CMakeLists.txt │ │ │ ├── aluminum.hpp │ │ │ ├── blas.hpp │ │ │ ├── choice.hpp │ │ │ ├── flame.hpp │ │ │ ├── lapack.hpp │ │ │ ├── mkl.hpp │ │ │ ├── mpfr.hpp │ │ │ ├── mpi.hpp │ │ │ ├── mpi │ │ │ │ ├── aluminum_comm.hpp │ │ │ │ ├── comm.hpp │ │ │ │ ├── comm_impl.hpp │ │ │ │ ├── error.hpp │ │ │ │ ├── meta.hpp │ │ │ │ └── plain_comm.hpp │ │ │ ├── mpi_choice.hpp │ │ │ ├── omp.hpp │ │ │ ├── openblas.hpp │ │ │ ├── pmrrr.hpp │ │ │ ├── qd.hpp │ │ │ ├── qt5.hpp │ │ │ ├── scalapack.hpp │ │ │ ├── scalapack │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── blacs.hpp │ │ │ │ └── pblas.hpp │ │ │ ├── suite_sparse.hpp │ │ │ └── valgrind.hpp │ │ ├── indexing │ │ │ ├── CMakeLists.txt │ │ │ ├── decl.hpp │ │ │ └── impl.hpp │ │ ├── limits.hpp │ │ ├── random │ │ │ ├── CMakeLists.txt │ │ │ ├── decl.hpp │ │ │ └── impl.hpp │ │ └── types.hpp │ ├── io.hpp │ ├── io │ │ ├── CMakeLists.txt │ │ ├── CReflect.hpp │ │ ├── ComplexDisplayWindow-premoc.hpp │ │ ├── DisplayWidget.hpp │ │ ├── DisplayWindow-premoc.hpp │ │ ├── SpyWidget.hpp │ │ └── SpyWindow.hpp │ ├── lapack_like.hpp │ ├── lapack_like │ │ ├── CMakeLists.txt │ │ ├── CReflect.hpp │ │ ├── condense.hpp │ │ ├── condense │ │ │ ├── CMakeLists.txt │ │ │ └── CReflect.hpp │ │ ├── equilibrate.hpp │ │ ├── euclidean_min.hpp │ │ ├── euclidean_min │ │ │ ├── CMakeLists.txt │ │ │ └── CReflect.hpp │ │ ├── factor.hpp │ │ ├── factor │ │ │ ├── CMakeLists.txt │ │ │ ├── CReflect.hpp │ │ │ ├── ldl │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── sparse │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── numeric.hpp │ │ │ │ │ ├── symbolic.hpp │ │ │ │ │ └── symbolic │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── NodeInfo.hpp │ │ │ │ │ └── Separator.hpp │ │ │ └── qr │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── ProxyHouseholder.hpp │ │ ├── funcs.hpp │ │ ├── perm.hpp │ │ ├── props.hpp │ │ ├── props │ │ │ ├── CMakeLists.txt │ │ │ └── CReflect.hpp │ │ ├── reflect.hpp │ │ ├── solve.hpp │ │ ├── solve │ │ │ ├── CMakeLists.txt │ │ │ ├── FGMRES.hpp │ │ │ ├── LGMRES.hpp │ │ │ └── Refined.hpp │ │ ├── spectral.hpp │ │ ├── spectral │ │ │ ├── CMakeLists.txt │ │ │ ├── CReflect.hpp │ │ │ ├── HermitianEig.hpp │ │ │ ├── Lanczos.hpp │ │ │ ├── ProductLanczos.hpp │ │ │ ├── SVD.hpp │ │ │ └── Schur.hpp │ │ └── util.hpp │ ├── macros │ │ ├── CInstantiate.h │ │ ├── CMakeLists.txt │ │ ├── DeviceGuardAndPayload.h │ │ ├── GuardAndPayload.h │ │ ├── Instantiate.h │ │ └── NestedGuardAndPayload.h │ ├── matrices.hpp │ └── matrices │ │ ├── CMakeLists.txt │ │ └── deterministic │ │ ├── CMakeLists.txt │ │ ├── classical │ │ ├── CMakeLists.txt │ │ └── Circulant.hpp │ │ └── lattice │ │ ├── CMakeLists.txt │ │ └── NTRUAttack.hpp └── hydrogen │ ├── Device.hpp │ ├── Error.hpp │ ├── MultiSync.hpp │ ├── PoolAllocator.hpp │ ├── SyncInfo.hpp │ ├── SyncInfoAllDecl.hpp │ ├── SyncInfoBase.hpp │ ├── SynchronizeAPI.hpp │ ├── blas │ ├── BLAS_Common.hpp │ ├── GPU_BLAS.hpp │ ├── GPU_BLAS_decl.hpp │ ├── GPU_BLAS_impl.hpp │ └── gpu │ │ ├── Axpy.hpp │ │ ├── CombineImpl.hpp │ │ ├── Copy.hpp │ │ ├── EntrywiseMapImpl.hpp │ │ ├── Fill.hpp │ │ ├── Hadamard.hpp │ │ ├── Scale.hpp │ │ └── Transpose.hpp │ ├── device │ ├── GPU.hpp │ └── gpu │ │ ├── BasicCopy.hpp │ │ ├── CUB.hpp │ │ ├── CUDA.hpp │ │ ├── GPUError.hpp │ │ ├── GPURuntime.hpp │ │ ├── ROCm.hpp │ │ ├── SyncInfo.hpp │ │ ├── cuda │ │ ├── CUDACopy.hpp │ │ ├── CUDAError.hpp │ │ ├── CUDALaunchKernel.hpp │ │ ├── CUDAManagement.hpp │ │ ├── SyncInfo.hpp │ │ ├── cuBLAS.hpp │ │ ├── cuBLASError.hpp │ │ ├── cuBLASManagement.hpp │ │ ├── cuBLASMeta.hpp │ │ ├── cuBLASUtil.hpp │ │ ├── cuBLAS_API.hpp │ │ ├── cuSOLVER.hpp │ │ ├── cuSOLVERError.hpp │ │ ├── cuSOLVERManagement.hpp │ │ ├── cuSOLVERMeta.hpp │ │ ├── cuSOLVERUtil.hpp │ │ └── cuSOLVER_API.hpp │ │ └── rocm │ │ ├── ROCmCopy.hpp │ │ ├── ROCmError.hpp │ │ ├── ROCmLaunchKernel.hpp │ │ ├── ROCmManagement.hpp │ │ ├── SyncInfo.hpp │ │ ├── rocBLAS.hpp │ │ ├── rocBLASError.hpp │ │ ├── rocBLASManagement.hpp │ │ ├── rocBLASMeta.hpp │ │ ├── rocBLASUtil.hpp │ │ ├── rocBLAS_API.hpp │ │ ├── rocSOLVER.hpp │ │ ├── rocSOLVERError.hpp │ │ ├── rocSOLVERManagement.hpp │ │ ├── rocSOLVERMeta.hpp │ │ ├── rocSOLVERUtil.hpp │ │ └── rocSOLVER_API.hpp │ ├── meta │ ├── IndexSequence.hpp │ ├── MetaUtilities.hpp │ ├── TypeList.hpp │ └── TypeTraits.hpp │ └── utils │ ├── HalfPrecision.hpp │ ├── NumericTypeConversion.hpp │ └── SimpleBuffer.hpp ├── redhat ├── elemental-release.spec └── elemental.spec ├── src ├── CMakeLists.txt ├── blas_like │ ├── CMakeLists.txt │ ├── blocksizes.cpp │ ├── level1 │ │ ├── CMakeLists.txt │ │ ├── ColumnMinAbs.cpp │ │ ├── ColumnNorms.cpp │ │ ├── Copy.cpp │ │ ├── HilbertSchmidt.cpp │ │ ├── Instantiate.cpp │ │ ├── Max.cpp │ │ ├── MaxAbs.cpp │ │ ├── MaxAbsLoc.cpp │ │ ├── MaxLoc.cpp │ │ ├── Min.cpp │ │ ├── MinAbsLoc.cpp │ │ ├── MinLoc.cpp │ │ ├── NormsFromScaledSquares.hpp │ │ ├── RowMinAbs.cpp │ │ ├── RowNorms.cpp │ │ ├── Swap.cpp │ │ ├── Symmetric2x2Inv.cpp │ │ └── Transform2x2.cpp │ ├── level2 │ │ ├── ApplyGivensSequence.cpp │ │ ├── CMakeLists.txt │ │ ├── Gemv.cpp │ │ ├── Gemv │ │ │ ├── CMakeLists.txt │ │ │ ├── Normal.hpp │ │ │ └── Transpose.hpp │ │ ├── Ger.cpp │ │ ├── Geru.cpp │ │ ├── Hemv.cpp │ │ ├── Her.cpp │ │ ├── Her2.cpp │ │ ├── QuasiTrsv.cpp │ │ ├── QuasiTrsv │ │ │ ├── CMakeLists.txt │ │ │ ├── LN.hpp │ │ │ ├── LT.hpp │ │ │ ├── UN.hpp │ │ │ └── UT.hpp │ │ ├── Symv.cpp │ │ ├── Symv │ │ │ ├── CMakeLists.txt │ │ │ ├── L.hpp │ │ │ └── U.hpp │ │ ├── Syr.cpp │ │ ├── Syr2.cpp │ │ ├── Trmv.cpp │ │ ├── Trr.cpp │ │ ├── Trr2.cpp │ │ ├── Trsv.cpp │ │ └── Trsv │ │ │ ├── CMakeLists.txt │ │ │ ├── LN.hpp │ │ │ ├── LT.hpp │ │ │ ├── UN.hpp │ │ │ └── UT.hpp │ └── level3 │ │ ├── CMakeLists.txt │ │ ├── Gemm.cpp │ │ ├── Gemm │ │ ├── CMakeLists.txt │ │ ├── NN.hpp │ │ ├── NN_Multistream.hpp │ │ ├── NT.hpp │ │ ├── NT_Multistream.hpp │ │ ├── TN.hpp │ │ ├── TN_Multistream.hpp │ │ └── TT.hpp │ │ ├── Hemm.cpp │ │ ├── Her2k.cpp │ │ ├── Herk.cpp │ │ ├── HermitianFromEVD.cpp │ │ ├── MultiShiftQuasiTrsm.cpp │ │ ├── MultiShiftQuasiTrsm │ │ ├── CMakeLists.txt │ │ ├── LLN.hpp │ │ ├── LLT.hpp │ │ ├── LUN.hpp │ │ └── LUT.hpp │ │ ├── MultiShiftTrsm.cpp │ │ ├── MultiShiftTrsm │ │ ├── CMakeLists.txt │ │ ├── LUN.hpp │ │ └── LUT.hpp │ │ ├── NormalFromEVD.cpp │ │ ├── QuasiTrsm.cpp │ │ ├── QuasiTrsm │ │ ├── CMakeLists.txt │ │ ├── LLN.hpp │ │ ├── LLT.hpp │ │ ├── LUN.hpp │ │ └── LUT.hpp │ │ ├── SafeMultiShiftTrsm.cpp │ │ ├── SafeMultiShiftTrsm │ │ ├── CMakeLists.txt │ │ ├── LUN.hpp │ │ └── Overflow.hpp │ │ ├── Symm.cpp │ │ ├── Symm │ │ ├── CMakeLists.txt │ │ ├── LL.hpp │ │ ├── LU.hpp │ │ ├── RL.hpp │ │ └── RU.hpp │ │ ├── SyncInfoPool.hpp │ │ ├── Syr2k.cpp │ │ ├── Syr2k │ │ ├── CMakeLists.txt │ │ ├── LN.hpp │ │ ├── LT.hpp │ │ ├── UN.hpp │ │ └── UT.hpp │ │ ├── Syrk.cpp │ │ ├── Syrk │ │ ├── CMakeLists.txt │ │ ├── LN.hpp │ │ ├── LT.hpp │ │ ├── UN.hpp │ │ └── UT.hpp │ │ ├── Trdtrmm.cpp │ │ ├── Trdtrmm │ │ ├── CMakeLists.txt │ │ ├── LVar1.hpp │ │ ├── UVar1.hpp │ │ └── Unblocked.hpp │ │ ├── Trmm.cpp │ │ ├── Trmm │ │ ├── CMakeLists.txt │ │ ├── LLN.hpp │ │ ├── LLT.hpp │ │ ├── LUN.hpp │ │ ├── LUT.hpp │ │ ├── RLN.hpp │ │ ├── RLT.hpp │ │ ├── RUN.hpp │ │ └── RUT.hpp │ │ ├── Trr2k.cpp │ │ ├── Trr2k │ │ ├── CMakeLists.txt │ │ ├── Local.hpp │ │ ├── NNNN.hpp │ │ ├── NNNT.hpp │ │ ├── NNTN.hpp │ │ ├── NNTT.hpp │ │ ├── NTNN.hpp │ │ ├── NTNT.hpp │ │ ├── NTTN.hpp │ │ ├── NTTT.hpp │ │ ├── README.md │ │ ├── TNNN.hpp │ │ ├── TNNT.hpp │ │ ├── TNTN.hpp │ │ ├── TNTT.hpp │ │ ├── TTNN.hpp │ │ ├── TTNT.hpp │ │ ├── TTTN.hpp │ │ └── TTTT.hpp │ │ ├── Trrk.cpp │ │ ├── Trrk │ │ ├── CMakeLists.txt │ │ ├── Local.hpp │ │ ├── NN.hpp │ │ ├── NT.hpp │ │ ├── README.md │ │ ├── TN.hpp │ │ └── TT.hpp │ │ ├── Trsm.cpp │ │ ├── Trsm │ │ ├── CMakeLists.txt │ │ ├── LLN.hpp │ │ ├── LLT.hpp │ │ ├── LUN.hpp │ │ ├── LUT.hpp │ │ ├── RLN.hpp │ │ ├── RLT.hpp │ │ ├── RUN.hpp │ │ └── RUT.hpp │ │ ├── Trstrm.cpp │ │ ├── Trstrm │ │ ├── CMakeLists.txt │ │ └── LLN.hpp │ │ ├── Trtrmm.cpp │ │ ├── Trtrmm │ │ ├── CMakeLists.txt │ │ ├── LVar1.hpp │ │ ├── UVar1.hpp │ │ └── Unblocked.hpp │ │ ├── TwoSidedTrmm.cpp │ │ ├── TwoSidedTrmm │ │ ├── CMakeLists.txt │ │ ├── LVar1.hpp │ │ ├── LVar2.hpp │ │ ├── LVar4.hpp │ │ ├── LVar5.hpp │ │ ├── UVar1.hpp │ │ ├── UVar2.hpp │ │ ├── UVar4.hpp │ │ ├── UVar5.hpp │ │ └── Unblocked.hpp │ │ ├── TwoSidedTrsm.cpp │ │ ├── TwoSidedTrsm │ │ ├── CMakeLists.txt │ │ ├── LVar1.hpp │ │ ├── LVar2.hpp │ │ ├── LVar3.hpp │ │ ├── LVar4.hpp │ │ ├── LVar5.hpp │ │ ├── UVar1.hpp │ │ ├── UVar2.hpp │ │ ├── UVar3.hpp │ │ ├── UVar4.hpp │ │ ├── UVar5.hpp │ │ └── Unblocked.hpp │ │ └── sync_info_pool_test.cpp ├── control │ ├── CMakeLists.txt │ ├── Lyapunov.cpp │ ├── README.md │ ├── Riccati.cpp │ └── Sylvester.cpp ├── core │ ├── CMakeLists.txt │ ├── DistMap.cpp │ ├── DistMatrix │ │ ├── AbstractDistMatrix.cpp │ │ ├── Block.cpp │ │ ├── Block │ │ │ ├── CIRC_CIRC.cpp │ │ │ ├── CMakeLists.txt │ │ │ ├── MC_MR.cpp │ │ │ ├── MC_STAR.cpp │ │ │ ├── MD_STAR.cpp │ │ │ ├── MR_MC.cpp │ │ │ ├── MR_STAR.cpp │ │ │ ├── README.md │ │ │ ├── STAR_MC.cpp │ │ │ ├── STAR_MD.cpp │ │ │ ├── STAR_MR.cpp │ │ │ ├── STAR_STAR.cpp │ │ │ ├── STAR_VC.cpp │ │ │ ├── STAR_VR.cpp │ │ │ ├── VC_STAR.cpp │ │ │ ├── VR_STAR.cpp │ │ │ └── setup.hpp │ │ ├── CMakeLists.txt │ │ ├── ElementMatrix.cpp │ │ └── ElementMatrix │ │ │ ├── CIRC_CIRC.cpp │ │ │ ├── CMakeLists.txt │ │ │ ├── MC_MR.cpp │ │ │ ├── MC_STAR.cpp │ │ │ ├── MD_STAR.cpp │ │ │ ├── MR_MC.cpp │ │ │ ├── MR_STAR.cpp │ │ │ ├── README.md │ │ │ ├── STAR_MC.cpp │ │ │ ├── STAR_MD.cpp │ │ │ ├── STAR_MR.cpp │ │ │ ├── STAR_STAR.cpp │ │ │ ├── STAR_VC.cpp │ │ │ ├── STAR_VR.cpp │ │ │ ├── VC_STAR.cpp │ │ │ ├── VR_STAR.cpp │ │ │ ├── gpu_instantiate.h │ │ │ └── setup.hpp │ ├── Element.cpp │ ├── FlamePart │ │ ├── CMakeLists.txt │ │ ├── Merge.cpp │ │ ├── Partition.cpp │ │ ├── Repartition.cpp │ │ └── SlidePartition.cpp │ ├── Grid.cpp │ ├── Instantiate.cpp │ ├── MemoryPool.cpp │ ├── Profiling.cpp │ ├── Serialize.cpp │ ├── Timer.cpp │ ├── callStack.cpp │ ├── environment.cpp │ ├── imports │ │ ├── CMakeLists.txt │ │ ├── blas.cpp │ │ ├── blas │ │ │ ├── Axpy.hpp │ │ │ ├── CMakeLists.txt │ │ │ ├── Copy.hpp │ │ │ ├── Dot.hpp │ │ │ ├── Gemm.hpp │ │ │ ├── Gemv.hpp │ │ │ ├── Ger.hpp │ │ │ ├── MaxInd.hpp │ │ │ ├── Nrm.hpp │ │ │ ├── Rot.hpp │ │ │ ├── Scal.hpp │ │ │ ├── Swap.hpp │ │ │ ├── Symm.hpp │ │ │ ├── Symv.hpp │ │ │ ├── Syr.hpp │ │ │ ├── Syr2.hpp │ │ │ ├── Syr2k.hpp │ │ │ ├── Syrk.hpp │ │ │ ├── Trmm.hpp │ │ │ ├── Trmv.hpp │ │ │ ├── Trsm.hpp │ │ │ └── Trsv.hpp │ │ ├── cub.cpp │ │ ├── cuda.cpp │ │ ├── flame.cpp │ │ ├── lapack.cpp │ │ ├── lapack │ │ │ ├── CMakeLists.txt │ │ │ ├── Schur.hpp │ │ │ └── TriangEig.hpp │ │ ├── mkl.cpp │ │ ├── mpfr.cpp │ │ ├── mpfr │ │ │ ├── BigFloat.cpp │ │ │ ├── BigInt.cpp │ │ │ └── CMakeLists.txt │ │ ├── mpi.cpp │ │ ├── mpi │ │ │ ├── AllGather.hpp │ │ │ ├── AllReduce.hpp │ │ │ ├── AllToAll.hpp │ │ │ ├── Broadcast.hpp │ │ │ ├── Gather.hpp │ │ │ ├── Reduce.hpp │ │ │ ├── ReduceScatter.hpp │ │ │ ├── Scatter.hpp │ │ │ └── SendRecv.hpp │ │ ├── mpi_collectives.hpp │ │ ├── mpi_utils.hpp │ │ ├── openblas.cpp │ │ ├── pmrrr.cpp │ │ ├── qd.cpp │ │ ├── qt5.cpp │ │ ├── scalapack.cpp │ │ └── scalapack │ │ │ ├── CMakeLists.txt │ │ │ ├── blacs.cpp │ │ │ └── pblas.cpp │ ├── indent.cpp │ ├── logging.cpp │ ├── mpi_register.cpp │ ├── random.cpp │ └── types.cpp ├── hydrogen │ ├── CMakeLists.txt │ ├── Error.cpp │ ├── blas │ │ ├── CMakeLists.txt │ │ └── gpu │ │ │ ├── Axpy.cu │ │ │ ├── CMakeLists.txt │ │ │ ├── Copy.cu │ │ │ ├── Fill.cu │ │ │ ├── Hadamard.cu │ │ │ ├── Scale.cu │ │ │ └── Transpose.cu │ └── device │ │ ├── CMakeLists.txt │ │ ├── CUDA.cpp │ │ ├── GPU.cpp │ │ ├── ROCm.cpp │ │ ├── cuBLAS.cpp │ │ ├── cuBLAS_API.cpp │ │ ├── cuSOLVER.cpp │ │ ├── cuSOLVER_API.cpp │ │ ├── rocBLAS.cpp │ │ ├── rocBLAS_API.cpp │ │ ├── rocSOLVER.cpp │ │ └── rocSOLVER_API.cpp ├── io.cpp ├── io │ ├── CMakeLists.txt │ ├── ColorMap.cpp │ ├── ComplexDisplayWindow.cpp │ ├── Display.cpp │ ├── DisplayWidget.cpp │ ├── DisplayWindow.cpp │ ├── File.cpp │ ├── Print.cpp │ ├── Read.cpp │ ├── Read │ │ ├── Ascii.hpp │ │ ├── AsciiMatlab.hpp │ │ ├── Binary.hpp │ │ ├── BinaryFlat.hpp │ │ ├── CMakeLists.txt │ │ └── MatrixMarket.hpp │ ├── Spy.cpp │ ├── SpyWidget.cpp │ ├── SpyWindow.cpp │ ├── Write.cpp │ └── Write │ │ ├── Ascii.hpp │ │ ├── AsciiMatlab.hpp │ │ ├── Binary.hpp │ │ ├── BinaryFlat.hpp │ │ ├── CMakeLists.txt │ │ ├── Image.hpp │ │ └── MatrixMarket.hpp ├── lapack_like │ ├── CMakeLists.txt │ ├── condense │ │ ├── Bidiag.cpp │ │ ├── Bidiag │ │ │ ├── Apply.hpp │ │ │ ├── CMakeLists.txt │ │ │ ├── LowerBlocked.hpp │ │ │ ├── LowerPanel.hpp │ │ │ ├── LowerUnblocked.hpp │ │ │ ├── UpperBlocked.hpp │ │ │ ├── UpperPanel.hpp │ │ │ └── UpperUnblocked.hpp │ │ ├── CMakeLists.txt │ │ ├── HermitianTridiag.cpp │ │ ├── HermitianTridiag │ │ │ ├── ApplyQ.hpp │ │ │ ├── CMakeLists.txt │ │ │ ├── LowerBlocked.hpp │ │ │ ├── LowerBlockedSquare.hpp │ │ │ ├── LowerPanel.hpp │ │ │ ├── LowerPanelSquare.hpp │ │ │ ├── UpperBlocked.hpp │ │ │ ├── UpperBlockedSquare.hpp │ │ │ ├── UpperPanel.hpp │ │ │ └── UpperPanelSquare.hpp │ │ ├── Hessenberg.cpp │ │ └── Hessenberg │ │ │ ├── ApplyQ.hpp │ │ │ ├── CMakeLists.txt │ │ │ ├── FormQ.hpp │ │ │ ├── LowerBlocked.hpp │ │ │ ├── LowerPanel.hpp │ │ │ ├── LowerUnblocked.hpp │ │ │ ├── UpperBlocked.hpp │ │ │ ├── UpperPanel.hpp │ │ │ └── UpperUnblocked.hpp │ ├── equilibrate │ │ ├── CMakeLists.txt │ │ ├── GeomEquil.cpp │ │ ├── RuizEquil.cpp │ │ ├── SymmetricDiagonalEquil.cpp │ │ ├── SymmetricGeomEquil.cpp │ │ ├── SymmetricRuizEquil.cpp │ │ └── Util.hpp │ ├── euclidean_min │ │ ├── CMakeLists.txt │ │ ├── GLM.cpp │ │ ├── LSE.cpp │ │ ├── LeastSquares.cpp │ │ ├── Ridge.cpp │ │ └── Tikhonov.cpp │ ├── factor │ │ ├── CMakeLists.txt │ │ ├── Cholesky.cpp │ │ ├── Cholesky │ │ │ ├── CMakeLists.txt │ │ │ ├── LowerMod.hpp │ │ │ ├── LowerVariant2.hpp │ │ │ ├── LowerVariant3.hpp │ │ │ ├── PivotedLowerVariant3.hpp │ │ │ ├── PivotedUpperVariant3.hpp │ │ │ ├── ReverseLowerVariant3.hpp │ │ │ ├── ReverseUpperVariant3.hpp │ │ │ ├── SolveAfter.hpp │ │ │ ├── UpperMod.hpp │ │ │ ├── UpperVariant2.hpp │ │ │ └── UpperVariant3.hpp │ │ ├── GQR.cpp │ │ ├── GRQ.cpp │ │ ├── ID.cpp │ │ ├── LDL.cpp │ │ ├── LDL │ │ │ ├── CMakeLists.txt │ │ │ ├── dense │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Inertia.hpp │ │ │ │ ├── MultiplyAfter.hpp │ │ │ │ ├── Pivoted.hpp │ │ │ │ ├── Pivoted │ │ │ │ │ ├── Blocked.hpp │ │ │ │ │ ├── BunchKaufmanA.hpp │ │ │ │ │ ├── BunchKaufmanD.hpp │ │ │ │ │ ├── BunchParlett.hpp │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Panel.hpp │ │ │ │ │ └── Unblocked.hpp │ │ │ │ ├── SolveAfter.hpp │ │ │ │ └── Var3.hpp │ │ │ └── sparse │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── numeric │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── ChangeFrontType.cpp │ │ │ │ ├── DiagonalScale.cpp │ │ │ │ ├── DiagonalSolve.cpp │ │ │ │ ├── DistFront.cpp │ │ │ │ ├── DistMatrixNode.cpp │ │ │ │ ├── DistMultiVecNode.cpp │ │ │ │ ├── DistSparseLDLFactorization.cpp │ │ │ │ ├── Front.cpp │ │ │ │ ├── FrontType.cpp │ │ │ │ ├── LowerMultiply │ │ │ │ │ ├── Backward.hpp │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Forward.hpp │ │ │ │ │ ├── FrontBackward.hpp │ │ │ │ │ └── FrontForward.hpp │ │ │ │ ├── LowerSolve │ │ │ │ │ ├── Backward.hpp │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Forward.hpp │ │ │ │ │ ├── FrontBackward.hpp │ │ │ │ │ ├── FrontForward.hpp │ │ │ │ │ └── FrontUtil.hpp │ │ │ │ ├── MatrixNode.cpp │ │ │ │ ├── Process.hpp │ │ │ │ ├── ProcessFront.hpp │ │ │ │ └── SparseLDLFactorization.cpp │ │ │ │ └── symbolic │ │ │ │ ├── Analysis.cpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── NaturalNestedDissection.cpp │ │ │ │ ├── NestedDissection.cpp │ │ │ │ ├── NodeInfo.cpp │ │ │ │ └── Separator.cpp │ │ ├── LQ.cpp │ │ ├── LQ │ │ │ ├── ApplyQ.hpp │ │ │ ├── CMakeLists.txt │ │ │ ├── Explicit.hpp │ │ │ ├── Householder.hpp │ │ │ ├── PanelHouseholder.hpp │ │ │ └── SolveAfter.hpp │ │ ├── LU.cpp │ │ ├── LU │ │ │ ├── CMakeLists.txt │ │ │ ├── Full.hpp │ │ │ ├── Local.hpp │ │ │ ├── Mod.hpp │ │ │ ├── Panel.hpp │ │ │ └── SolveAfter.hpp │ │ ├── QR.cpp │ │ ├── QR │ │ │ ├── ApplyQ.hpp │ │ │ ├── BusingerGolub.hpp │ │ │ ├── CMakeLists.txt │ │ │ ├── Cholesky.hpp │ │ │ ├── ColSwap.hpp │ │ │ ├── Explicit.hpp │ │ │ ├── Householder.hpp │ │ │ ├── PanelHouseholder.hpp │ │ │ ├── SolveAfter.hpp │ │ │ └── TS.hpp │ │ ├── RQ.cpp │ │ ├── RQ │ │ │ ├── ApplyQ.hpp │ │ │ ├── CMakeLists.txt │ │ │ ├── Cholesky.hpp │ │ │ ├── Explicit.hpp │ │ │ ├── Householder.hpp │ │ │ ├── PanelHouseholder.hpp │ │ │ └── SolveAfter.hpp │ │ ├── RegularizedLDL │ │ │ ├── CMakeLists.txt │ │ │ └── SolveAfter.cpp │ │ └── Skeleton.cpp │ ├── funcs │ │ ├── CMakeLists.txt │ │ ├── HermitianFunction.cpp │ │ ├── Inverse │ │ │ ├── CMakeLists.txt │ │ │ ├── General.cpp │ │ │ ├── General │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── LUPartialPiv.hpp │ │ │ ├── HPD.cpp │ │ │ ├── HPD │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── CholeskyLVar2.hpp │ │ │ │ └── CholeskyUVar2.hpp │ │ │ ├── Hermitian.cpp │ │ │ ├── Symmetric.cpp │ │ │ ├── Triangular.cpp │ │ │ └── Triangular │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── LVar3.hpp │ │ │ │ └── UVar3.hpp │ │ ├── Pseudoinverse.cpp │ │ ├── Sign.cpp │ │ └── SquareRoot.cpp │ ├── perm │ │ ├── CMakeLists.txt │ │ ├── DistPermutation.cpp │ │ ├── Permutation.cpp │ │ ├── PermutationMeta.cpp │ │ └── PivotsToPartialPermutation.cpp │ ├── props │ │ ├── CMakeLists.txt │ │ ├── Condition.cpp │ │ ├── Condition │ │ │ ├── CMakeLists.txt │ │ │ ├── Frobenius.cpp │ │ │ ├── Infinity.cpp │ │ │ ├── Max.cpp │ │ │ ├── One.cpp │ │ │ └── Two.cpp │ │ ├── Determinant.cpp │ │ ├── Determinant │ │ │ ├── CMakeLists.txt │ │ │ ├── Cholesky.hpp │ │ │ └── LUPartialPiv.hpp │ │ ├── Inertia.cpp │ │ ├── Norm.cpp │ │ ├── Norm │ │ │ ├── CMakeLists.txt │ │ │ ├── Entrywise.cpp │ │ │ ├── Frobenius.cpp │ │ │ ├── Infinity.cpp │ │ │ ├── KyFan.cpp │ │ │ ├── KyFanSchatten.cpp │ │ │ ├── Max.cpp │ │ │ ├── Nuclear.cpp │ │ │ ├── One.cpp │ │ │ ├── Schatten.cpp │ │ │ ├── Two.cpp │ │ │ ├── TwoEstimate.cpp │ │ │ └── Zero.cpp │ │ └── Trace.cpp │ ├── reflect │ │ ├── ApplyPacked.cpp │ │ ├── ApplyPacked │ │ │ ├── CMakeLists.txt │ │ │ ├── LLHB.hpp │ │ │ ├── LLHF.hpp │ │ │ ├── LLVB.hpp │ │ │ ├── LLVF.hpp │ │ │ ├── LUHB.hpp │ │ │ ├── LUHF.hpp │ │ │ ├── LUVB.hpp │ │ │ ├── LUVF.hpp │ │ │ ├── RLHB.hpp │ │ │ ├── RLHF.hpp │ │ │ ├── RLVB.hpp │ │ │ ├── RLVF.hpp │ │ │ ├── RUHB.hpp │ │ │ ├── RUHF.hpp │ │ │ ├── RUVB.hpp │ │ │ ├── RUVF.hpp │ │ │ └── Util.hpp │ │ ├── CMakeLists.txt │ │ ├── ExpandPacked.cpp │ │ ├── ExpandPacked │ │ │ ├── CMakeLists.txt │ │ │ └── LV.hpp │ │ ├── Householder.cpp │ │ ├── Householder │ │ │ ├── CMakeLists.txt │ │ │ ├── Col.hpp │ │ │ └── Row.hpp │ │ ├── Hyperbolic.cpp │ │ └── Hyperbolic │ │ │ ├── CMakeLists.txt │ │ │ ├── Col.hpp │ │ │ └── Row.hpp │ ├── solve │ │ ├── CMakeLists.txt │ │ ├── HPD.cpp │ │ ├── Hermitian.cpp │ │ ├── Linear.cpp │ │ ├── MultiShiftHess.cpp │ │ ├── SQSD.cpp │ │ └── Symmetric.cpp │ ├── spectral │ │ ├── BidiagSVD.cpp │ │ ├── BidiagSVD │ │ │ ├── CMakeLists.txt │ │ │ ├── DivideAndConquer.hpp │ │ │ └── QR.hpp │ │ ├── CMakeLists.txt │ │ ├── CubicSecular.cpp │ │ ├── Eig.cpp │ │ ├── HermitianEig.cpp │ │ ├── HermitianEig │ │ │ ├── CMakeLists.txt │ │ │ └── SDC.hpp │ │ ├── HermitianGenDefEig.cpp │ │ ├── HermitianSVD.cpp │ │ ├── HermitianTridiagEig.cpp │ │ ├── HermitianTridiagEig │ │ │ ├── CMakeLists.txt │ │ │ ├── DivideAndConquer.hpp │ │ │ └── QR.hpp │ │ ├── HessenbergSchur.cpp │ │ ├── HessenbergSchur │ │ │ ├── AED.hpp │ │ │ ├── AED │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── ModifyShifts.hpp │ │ │ │ ├── Nibble.hpp │ │ │ │ ├── SpikeDeflation.hpp │ │ │ │ └── UpdateDeflationSize.hpp │ │ │ ├── CMakeLists.txt │ │ │ ├── MultiBulge.hpp │ │ │ ├── MultiBulge │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── ComputeShifts.hpp │ │ │ │ ├── PairShifts.hpp │ │ │ │ ├── RedundantlyHandleWindow.hpp │ │ │ │ ├── Sweep.hpp │ │ │ │ ├── Sweep │ │ │ │ │ ├── ApplyReflector.hpp │ │ │ │ │ ├── ApplyReflectors.hpp │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── ComputeReflectors.hpp │ │ │ │ │ ├── Dist.hpp │ │ │ │ │ ├── Dist │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── InterBlockChase.hpp │ │ │ │ │ │ └── IntraBlockChase.hpp │ │ │ │ │ ├── IntroduceBulge.hpp │ │ │ │ │ └── VigilantDeflation.hpp │ │ │ │ ├── Transform.hpp │ │ │ │ └── TwoByTwo.hpp │ │ │ ├── Simple.hpp │ │ │ ├── Simple │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── DoubleShift.hpp │ │ │ │ ├── DoubleShift │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── Sweep.hpp │ │ │ │ ├── SingleShift.hpp │ │ │ │ └── SingleShift │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── Sweep.hpp │ │ │ └── Util │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Gather.hpp │ │ │ │ └── MakeSubdiagonalReal.hpp │ │ ├── ImageAndKernel.cpp │ │ ├── Polar.cpp │ │ ├── Polar │ │ │ ├── CMakeLists.txt │ │ │ ├── QDWH.hpp │ │ │ └── SVD.hpp │ │ ├── Pseudospectra.cpp │ │ ├── Pseudospectra │ │ │ ├── Analytic.hpp │ │ │ ├── CMakeLists.txt │ │ │ ├── HagerHigham.hpp │ │ │ ├── IRA.hpp │ │ │ ├── IRL.hpp │ │ │ ├── Lanczos.hpp │ │ │ ├── Power.hpp │ │ │ ├── Util.hpp │ │ │ └── Util │ │ │ │ ├── BasicMath.hpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Rearrange.hpp │ │ │ │ └── Snapshot.hpp │ │ ├── SVD.cpp │ │ ├── SVD │ │ │ ├── CMakeLists.txt │ │ │ ├── Chan.hpp │ │ │ ├── GolubReinsch.hpp │ │ │ ├── Product.hpp │ │ │ └── Util.hpp │ │ ├── Schur.cpp │ │ ├── Schur │ │ │ ├── CMakeLists.txt │ │ │ ├── CheckReal.hpp │ │ │ ├── Condense.hpp │ │ │ ├── InverseFreeSDC.hpp │ │ │ ├── QuasiTriangEig.hpp │ │ │ ├── RealToComplex.hpp │ │ │ └── SDC.hpp │ │ ├── SecularEVD.cpp │ │ ├── SecularEVD │ │ │ ├── CMakeLists.txt │ │ │ └── TwoByTwo.hpp │ │ ├── SecularSVD.cpp │ │ ├── SecularSVD │ │ │ ├── CMakeLists.txt │ │ │ └── TwoByTwo.hpp │ │ ├── SkewHermitianEig.cpp │ │ ├── TriangEig.cpp │ │ └── TriangEig │ │ │ ├── CMakeLists.txt │ │ │ └── MultiShiftSolve.hpp │ └── util │ │ ├── CMakeLists.txt │ │ ├── Median.cpp │ │ └── Sort.cpp └── matrices │ ├── CMakeLists.txt │ ├── deterministic │ ├── CMakeLists.txt │ ├── classical │ │ ├── CMakeLists.txt │ │ ├── Cauchy.cpp │ │ ├── CauchyLike.cpp │ │ ├── Diagonal.cpp │ │ ├── Egorov.cpp │ │ ├── Fiedler.cpp │ │ ├── Fourier.cpp │ │ ├── GCDMatrix.cpp │ │ ├── Hankel.cpp │ │ ├── Hilbert.cpp │ │ ├── Identity.cpp │ │ ├── Jordan.cpp │ │ ├── Ones.cpp │ │ ├── Toeplitz.cpp │ │ ├── Walsh.cpp │ │ └── Zeros.cpp │ ├── integral │ │ ├── CMakeLists.txt │ │ └── FoxLi.cpp │ ├── misc │ │ ├── CMakeLists.txt │ │ ├── Demmel.cpp │ │ ├── DruinskyToledo.cpp │ │ ├── DynamicRegCounter.cpp │ │ ├── Ehrenfest.cpp │ │ ├── ExtendedKahan.cpp │ │ ├── GEPPGrowth.cpp │ │ ├── GKS.cpp │ │ ├── Gear.cpp │ │ ├── Hanowa.cpp │ │ ├── JordanCholesky.cpp │ │ ├── KMS.cpp │ │ ├── Kahan.cpp │ │ ├── Lauchli.cpp │ │ ├── Legendre.cpp │ │ ├── Lehmer.cpp │ │ ├── Lotkin.cpp │ │ ├── MinIJ.cpp │ │ ├── Parter.cpp │ │ ├── Pei.cpp │ │ ├── Redheffer.cpp │ │ ├── Riffle.cpp │ │ ├── Ris.cpp │ │ └── Wilkinson.cpp │ ├── pde │ │ ├── CMakeLists.txt │ │ ├── Helmholtz.cpp │ │ ├── HelmholtzPML.cpp │ │ └── Laplacian.cpp │ └── sparse_toeplitz │ │ ├── BullsHead.cpp │ │ ├── CMakeLists.txt │ │ ├── Forsythe.cpp │ │ ├── Grcar.cpp │ │ ├── OneTwoOne.cpp │ │ ├── TrefethenEmbree.cpp │ │ ├── TriW.cpp │ │ ├── Triangle.cpp │ │ └── Whale.cpp │ └── random │ ├── CMakeLists.txt │ ├── independent │ ├── Bernoulli.cpp │ ├── CMakeLists.txt │ ├── Gaussian.cpp │ ├── Rademacher.cpp │ ├── ThreeValued.cpp │ └── Uniform.cpp │ ├── lattice │ ├── AjtaiTypeBasis.cpp │ ├── CMakeLists.txt │ └── KnapsackTypeBasis.cpp │ └── misc │ ├── CMakeLists.txt │ ├── Haar.cpp │ ├── HatanoNelson.cpp │ ├── HermitianUniformSpectrum.cpp │ ├── NormalUniformSpectrum.cpp │ ├── UniformHelmholtzGreens.cpp │ └── Wigner.cpp ├── tests ├── CMakeLists.txt ├── Makefile.cmake ├── blas_like │ ├── Axpy.cpp │ ├── BasicGemm.cpp │ ├── CMakeLists.txt │ ├── ColumnNorms.cpp │ ├── Dot.cpp │ ├── EntrywiseMap.cpp │ ├── Gemm.cpp │ ├── GemmHelpers │ │ └── SyncTimer.hpp │ ├── Gemm_Suite.cpp │ ├── Gemv.cpp │ ├── Hadamard.cpp │ ├── MaxAbs.cpp │ ├── MultiShiftQuasiTrsm.cpp │ ├── MultiShiftTrsm.cpp │ ├── Multiply.cpp │ ├── QuasiTrsm.cpp │ ├── SafeMultiShiftTrsm.cpp │ ├── Symm.cpp │ ├── Symv.cpp │ ├── Syr2k.cpp │ ├── Syrk.cpp │ ├── Trmm.cpp │ ├── Trsm.cpp │ ├── Trsv.cpp │ ├── TwoSidedTrmm.cpp │ └── TwoSidedTrsm.cpp ├── core │ ├── BasicBlockDistMatrix.cpp │ ├── CMakeLists.txt │ ├── Constants.cpp │ ├── DifferentGrids.cpp │ ├── DifferentGridsGeneralAllreduce.cpp │ ├── DifferentGridsGeneralBroadcastAll.cpp │ ├── DifferentGridsGeneralGather.cpp │ ├── DifferentGridsGeneralScatter.cpp │ ├── DistMatrix.cpp │ ├── Matrix.cpp │ ├── Pow.cpp │ ├── QDToInt.cpp │ ├── SafeDiv.cpp │ └── Version.cpp └── lapack_like │ ├── ApplyPackedReflectors.cpp │ ├── Bidiag.cpp │ ├── BidiagDCSVD.cpp │ ├── Bisection.cpp │ ├── CMakeLists.txt │ ├── Cholesky.cpp │ ├── CholeskyMod.cpp │ ├── CholeskyQR.cpp │ ├── Eig.cpp │ ├── HermitianEig.cpp │ ├── HermitianGenDefEig.cpp │ ├── HermitianTridiag.cpp │ ├── HermitianTridiagEig.cpp │ ├── Hessenberg.cpp │ ├── HessenbergSchur.cpp │ ├── LDL.cpp │ ├── LQ.cpp │ ├── LU.cpp │ ├── LUMod.cpp │ ├── LeastSquares.cpp │ ├── MultiShiftHessSolve.cpp │ ├── NestedDissection.cpp │ ├── QR.cpp │ ├── RQ.cpp │ ├── SVD.cpp │ ├── SVDTwoByTwoUpper.cpp │ ├── Schur.cpp │ ├── SchurSwap.cpp │ ├── SecularEVD.cpp │ ├── SecularSVD.cpp │ ├── SparseLDL.cpp │ ├── SparseLDLRange.cpp │ ├── SparseLDLRefactor.cpp │ ├── SparseSymmetricSolve.cpp │ ├── TSQR.cpp │ ├── TSSVD.cpp │ ├── TriangEig.cpp │ └── TriangularInverse.cpp └── unit_test ├── CMakeLists.txt ├── SequentialCatchMain.cpp ├── copy_cpu_gpu_half_test.cpp ├── copy_cpu_gpu_test.cpp ├── gpu_combine_test.cu ├── gpu_entrywise_map_test.cu ├── gpu_test.cpp ├── matrix_test.cpp └── pool_allocator_test.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | # Emacs backup garbage 2 | .backup/ 3 | 4 | # Other standard ignores 5 | *~ 6 | *.pyc 7 | \#*# 8 | .#* 9 | .*.swp 10 | .DS_Store 11 | *.bak 12 | 13 | # building/install not-entirely-out-of-source stuff 14 | build*/ 15 | install*/ 16 | 17 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/Elemental/a03e87101adce10d254dc9db26b70c811a1cfcfe/.gitmodules -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Authors of Elemental 2 | ==================== 3 | (Roughly in order of chronological contributions) 4 | 5 | Jack Poulson: 6 | Project founder and lead developer. 7 | 8 | Matthias Petschow, Paolo Bientinesi, and RWTH Aachen University: 9 | The PMRRR library for hybrid symmetric tridiagonal eigensolutions and a bug 10 | fix for the Grid class. 11 | 12 | Univ. of Tennessee, Univ. of California Berkeley, and NAG Ltd.: 13 | Several of the serial routines used within PMRRR. 14 | 15 | Jeff Hammond and Argonne National Laboratory: 16 | Several bug fixes and toolchain files for BlueGene/P and BlueGene/Q, and an 17 | improvement for Elemental's threading support. 18 | 19 | Bryan Marker and The University of Texas at Austin (via DxTer): 20 | Several significant performance improvements for Trmm, Trsm, and Hegst. 21 | 22 | Jed Brown and Argonne National Laboratory: 23 | Fixed several problems with Elemental installation, 24 | as well as fixing an MPI_Group leakage in the Grid class. 25 | 26 | Martin Schatz and The University of Texas at Austin: 27 | The experimental 3D Gemm and the AxpyInterface class for easily filling 28 | distributed matrices. 29 | 30 | Michael Grant: 31 | The SWIG Python interface and a large number of bugfixes. 32 | 33 | Jiahao Chen and Jake Bolewski: 34 | Travis configuration and several extensions to the CMake build system 35 | (e.g., better Python detection, CTest support, and bug fixes) 36 | -------------------------------------------------------------------------------- /Hydrogen_ReleaseNotes.txt: -------------------------------------------------------------------------------- 1 | Notes for v1.1.0: 2 | 3 | - Miscellaneous bug fixes. 4 | - Add profiling interface for VTune and NVProf. 5 | - Add half-precision support for the the CPU. GPU support is still 6 | work in progress. 7 | 8 | Notes for v1.0.1: 9 | 10 | - Significant tidying of build system 11 | 12 | - Added range-based version checking in CMake export 13 | 14 | - Added full Aluminum support for all collectives: AllGather, 15 | AllReduce, AllToAll, Broadcast, Gather, Reduce, ReduceScatter, 16 | and Scatter (and SendRecv). 17 | 18 | Notes for v1.0: 19 | 20 | - Added the notion of multiple "Devices" for matrices. 21 | 22 | - Added GPU support throughout the library. Support is still "as 23 | needed". Please report gaps to Tom Benson31. 24 | 25 | - Using distributed objects with GPU memory requires CUDA-aware MPI. 26 | 27 | - Added preliminary Aluminum integration (https://github.com/llnl/aluminum). 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Please see the file debian/copyright for an explicit, machine-readable overview 2 | and listing of the licenses associated with files within this project. 3 | Informally, the vast majority of Elemental is released under the terms of the 4 | 2-clause BSD License, but the cmake/ and external/ folders contain files 5 | released under the Boost 1.0, BSD 3-clause, GNU LGPL 2.1, and MIT licenses. 6 | 7 | In addition, the (optional) external dependencies: libquadmath, GNU MPFR, 8 | GNU MPC, and Qt 5, are licensed under the terms of the GNU LGPLv3. Lastly, 9 | the (required) external dependency METIS is licensed under the terms of the 10 | Apache License, Version 2.0. The optional external dependency ParMETIS is 11 | unfortunately licensed in a manner which only allows its usage for research 12 | purposes. 13 | -------------------------------------------------------------------------------- /cmake/El.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/Elemental/a03e87101adce10d254dc9db26b70c811a1cfcfe/cmake/El.png -------------------------------------------------------------------------------- /cmake/modules/FindCUB.cmake: -------------------------------------------------------------------------------- 1 | # Exports the following variables 2 | # 3 | # CUB_FOUND 4 | # CUB_INCLUDE_PATH 5 | # CUB_LIBRARIES 6 | # 7 | # Also adds the following imported target: 8 | # 9 | # cuda::cub 10 | # 11 | 12 | find_path(CUB_INCLUDE_PATH cub/cub.cuh 13 | HINTS ${CUB_DIR} $ENV{CUB_DIR} ${CUDA_TOOLKIT_ROOT_DIR} ${CUDA_SDK_ROOT_DIR} 14 | PATH_SUFFIXES include 15 | NO_DEFAULT_PATH 16 | DOC "The CUB header directory." 17 | ) 18 | find_path(CUB_INCLUDE_PATH cub/cub.cuh) 19 | 20 | # Standard handling of the package arguments 21 | include(FindPackageHandleStandardArgs) 22 | find_package_handle_standard_args(CUB 23 | DEFAULT_MSG CUB_INCLUDE_PATH) 24 | 25 | # Setup the imported target 26 | if (NOT TARGET cuda::cub) 27 | add_library(cuda::cub INTERFACE IMPORTED) 28 | endif (NOT TARGET cuda::cub) 29 | 30 | # Set the include directories for the target 31 | if (CUB_INCLUDE_PATH) 32 | set_property(TARGET cuda::cub 33 | PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CUB_INCLUDE_PATH}) 34 | endif () 35 | 36 | # 37 | # Cleanup 38 | # 39 | 40 | # Set the include directories 41 | mark_as_advanced(FORCE CUB_INCLUDE_PATH) 42 | 43 | # Set the libraries 44 | set(CUB_LIBRARIES cuda::cub) 45 | -------------------------------------------------------------------------------- /cmake/modules/FindNVTX.cmake: -------------------------------------------------------------------------------- 1 | # Sets the following variables 2 | # 3 | # NVTX_FOUND 4 | # NVTX_LIBRARY 5 | # NVTX_LIBRARIES 6 | # 7 | # Defines the following imported target: 8 | # 9 | # cuda::nvtx 10 | # 11 | 12 | find_library(NVTX_LIBRARY nvToolsExt 13 | HINTS ${NVTX_DIR} $ENV{NVTX_DIR} ${CUDA_TOOLKIT_ROOT_DIR} ${CUDA_SDK_ROOT_DIR} 14 | PATH_SUFFIXES lib64 lib 15 | DOC "The nvtx library." 16 | NO_DEFAULT_PATH) 17 | find_library(NVTX_LIBRARY nvToolsExt) 18 | 19 | include(FindPackageHandleStandardArgs) 20 | find_package_handle_standard_args(NVTX 21 | DEFAULT_MSG NVTX_LIBRARY) 22 | 23 | add_library(cuda::nvtx INTERFACE IMPORTED) 24 | 25 | if (NVTX_FOUND) 26 | set_property(TARGET cuda::nvtx PROPERTY 27 | INTERFACE_INCLUDE_DIRECTORIES "${CUDA_INCLUDE_DIRS}") 28 | 29 | set_property(TARGET cuda::nvtx PROPERTY 30 | INTERFACE_LINK_LIBRARIES "${NVTX_LIBRARY}") 31 | 32 | set(NVTX_LIBRARIES cuda::nvtx) 33 | endif (NVTX_FOUND) 34 | -------------------------------------------------------------------------------- /cmake/modules/FindVTUNE.cmake: -------------------------------------------------------------------------------- 1 | # Exports the following variables 2 | # 3 | # VTUNE_INCLUDE_PATH 4 | # VTUNE_LIBRARY 5 | # VTUNE_LIBRARIES 6 | # 7 | # The following IMPORTED target is also created: 8 | # 9 | # vtune::vtune 10 | # 11 | find_path(VTUNE_INCLUDE_PATH ittnotify.h 12 | HINTS ${VTUNE_DIR} $ENV{VTUNE_DIR} 13 | PATH_SUFFIXES include 14 | NO_DEFAULT_PATH 15 | DOC "The location of VTune headers.") 16 | find_path(VTUNE_INCLUDE_PATH ittnotify.h) 17 | 18 | find_library(VTUNE_LIBRARY NAMES libittnotify.a ittnotify 19 | HINTS ${VTUNE_DIR} $ENV{VTUNE_DIR} 20 | PATH_SUFFIXES lib64 lib 21 | NO_DEFAULT_PATH 22 | DOC "The location of VTune Static lib") 23 | find_library(VTUNE_LIBRARY NAMES libittnotify.a ittnotify) 24 | 25 | include(FindPackageHandleStandardArgs) 26 | find_package_handle_standard_args(VTUNE 27 | DEFAULT_MSG VTUNE_LIBRARY VTUNE_INCLUDE_PATH) 28 | 29 | add_library(vtune::vtune INTERFACE IMPORTED) 30 | 31 | if (VTUNE_FOUND) 32 | set_property(TARGET vtune::vtune PROPERTY 33 | INTERFACE_INCLUDE_DIRECTORIES "${VTUNE_INCLUDE_PATH}") 34 | 35 | set_property(TARGET vtune::vtune PROPERTY 36 | INTERFACE_LINK_LIBRARIES "${VTUNE_LIBRARY}") 37 | 38 | set(VTUNE_LIBRARIES vtune::vtune) 39 | endif (VTUNE_FOUND) 40 | -------------------------------------------------------------------------------- /cmake/modules/FindValgrind.cmake: -------------------------------------------------------------------------------- 1 | # Find Valgrind. 2 | # 3 | # This module defines: 4 | # VALGRIND_INCLUDE_DIR, where to find valgrind/memcheck.h, etc. 5 | # VALGRIND_PROGRAM, the valgrind executable. 6 | # VALGRIND_FOUND, If false, do not try to use valgrind. 7 | # 8 | # If you have valgrind installed in a non-standard place, you can define 9 | # VALGRIND_PREFIX to tell cmake where it is. 10 | # 11 | # NOTE: Copied from the opencog project, where it is distributed under the 12 | # terms of the New BSD License. 13 | 14 | message(STATUS "Valgrind Prefix: ${VALGRIND_PREFIX}") 15 | 16 | find_path(VALGRIND_INCLUDE_DIR valgrind/memcheck.h 17 | /usr/include /usr/local/include ${VALGRIND_PREFIX}/include) 18 | find_program(VALGRIND_PROGRAM NAMES valgrind PATH 19 | /usr/bin /usr/local/bin ${VALGRIND_PREFIX}/bin) 20 | 21 | find_package_handle_standard_args(VALGRIND DEFAULT_MSG 22 | VALGRIND_INCLUDE_DIR 23 | VALGRIND_PROGRAM) 24 | 25 | mark_as_advanced(VALGRIND_INCLUDE_DIR VALGRIND_PROGRAM) 26 | -------------------------------------------------------------------------------- /cmake/modules/HydrogenETIGeneration.cmake: -------------------------------------------------------------------------------- 1 | # This function sets the _ARG# variable and recurs through the parameters. 2 | function (h_gtpe_recur OUTVAR EXPRESSION_TEMPLATE THIS_EPARAM_ID THIS_EPARAM) 3 | foreach (_VAL IN LISTS ${THIS_EPARAM}) 4 | set(_ARG${THIS_EPARAM_ID} "${_VAL}") 5 | if (ARGN) 6 | math(EXPR _NEXT_ID "${THIS_EPARAM_ID} + 1") 7 | h_gtpe_recur(${OUTVAR} "${EXPRESSION_TEMPLATE}" ${_NEXT_ID} ${ARGN}) 8 | else () 9 | string(CONFIGURE "${EXPRESSION_TEMPLATE}" _THIS_EXPRESSION @ONLY) 10 | list(APPEND ${OUTVAR} "${_THIS_EXPRESSION}") 11 | endif () 12 | endforeach () 13 | set(${OUTVAR} "${${OUTVAR}}" PARENT_SCOPE) 14 | endfunction () 15 | 16 | # This function calls the recursive function above to generate each 17 | # function instance. 18 | # 19 | # DO NOT ADD A SEMICOLON TO THE EXPRESSION_TEMPLATE PARAMETER!!!!!!! 20 | function (h_generate_tensor_product_expression OUTVAR EXPRESSION_TEMPLATE) 21 | h_gtpe_recur(_ALL_EXPRESSIONS "${EXPRESSION_TEMPLATE}" 0 ${ARGN}) 22 | set(${OUTVAR} ${_ALL_EXPRESSIONS} PARENT_SCOPE) 23 | endfunction () 24 | 25 | # This function adds a semicolon to each function instance in the list 26 | # and joins them into a string with each function instance on its own 27 | # line. 28 | function (h_func_list_to_string OUTVAR INLIST) 29 | list(JOIN ${INLIST} ";\n" _TMP) 30 | set(${OUTVAR} "${_TMP};" PARENT_SCOPE) 31 | endfunction () 32 | -------------------------------------------------------------------------------- /compiler_bugs/MSVC/constexpr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2009-2015, Jack Poulson 3 | # All rights reserved. 4 | # 5 | # This file is part of Elemental and is under the BSD 2-Clause License, 6 | # which can be found in the LICENSE file in the root directory, or at 7 | # http://opensource.org/licenses/BSD-2-Clause 8 | # 9 | cmake_minimum_required(VERSION 2.8.12) 10 | project(ConstExprBug) 11 | 12 | # Ensure that we can find the FindCXXFeatures.cmake module to determine the 13 | # compiler flags needed to enable C++11 14 | list(APPEND CMAKE_MODULE_PATH 15 | "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/cmake/") 16 | include(FindCXXFeatures) 17 | message(STATUS "CXX11_COMPILER_FLAGS=${CXX11_COMPILER_FLAGS}") 18 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_COMPILER_FLAGS}") 19 | 20 | option(TEST_CONSTEXPR "Test the MSVC bug via the use of a constexpr?" ON) 21 | if(TEST_CONSTEXPR) 22 | add_definitions(-DUSE_CONSTEXPR) 23 | endif() 24 | 25 | option(BUILD_SHARED_LIBS "Build shared libraries?" ON) 26 | file(GLOB CONSTEXPR_CPP RELATIVE ${PROJECT_SOURCE_DIR} "*.cpp") 27 | 28 | add_library(ConstExpr ${CONSTEXPR_CPP}) 29 | -------------------------------------------------------------------------------- /compiler_bugs/MSVC/constexpr/constexpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2015, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | 11 | /* The following is meant to test for what appears to be a bug in the handling 12 | of constexpr's in template instantiations in Visual Studio 2015 (pre-release) 13 | */ 14 | 15 | enum Dist 16 | { 17 | MC, 18 | MD, 19 | MR, 20 | VC, 21 | VR, 22 | STAR, 23 | CIRC 24 | }; 25 | 26 | template constexpr Dist Collect() { return (U == CIRC) ? CIRC : STAR; } 27 | 28 | template 29 | class DistMatrix { }; 30 | 31 | template 32 | void AllGather 33 | (const DistMatrix& A, DistMatrix(),Collect()>& B) 34 | { } 35 | 36 | #ifdef USE_CONSTEXPR 37 | template void AllGather(const DistMatrix& A, DistMatrix(),Collect()>& B); 38 | template void AllGather(const DistMatrix& A, DistMatrix(),Collect()>& B); 39 | #else 40 | template void AllGather(const DistMatrix& A, DistMatrix& B); 41 | template void AllGather(const DistMatrix& A, DistMatrix& B); 42 | #endif 43 | 44 | int main(int argc, char* argv[]) 45 | { 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | elemental (0.87.4-8) unstable; urgency=low 2 | 3 | * No changes have been made to the official source, as this Debian package is 4 | being maintained within the official repository. 5 | 6 | -- Jack Poulson Tue, 15 Nov 2016 21:23:59 -0008 7 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | # OpenMPI is disabled until Debian includes a version at least as late as 1.8.1 2 | # (rather than 1.6.5). Further, while ideally different binary packages would 3 | # be generated for each combination of OpenMPI/MPICH and clang/gcc, etc., for 4 | # now we will settle on MPICH/gcc/python2. The compiler matters due to the MPI 5 | # compiler wrappers (e.g., mpicc) depending upon a specific compiler and C++ 6 | # unfortunately not having an ABI. 7 | # 8 | # Further, while Debian and Elemental both support qt5, this extension will be 9 | # left for future work. 10 | 11 | Source: elemental 12 | Maintainer: "Jack Poulson" 13 | Uploaders: "Ryan Lewis" 14 | Section: math 15 | Priority: extra 16 | Build-Depends: debhelper (>= 9), cmake, libgomp1, gfortran, libopenblas-dev, liblapack-dev, libmetis-dev, libgmp-dev, libmpfr-dev, libmpc-dev, libqd-dev, libmpich-dev, python-numpy 17 | Standards-Version: 3.9.7 18 | Homepage: http://libelemental.org 19 | Vcs-Browser: https://github.com/elemental/Elemental/tree/master/debian 20 | 21 | Package: elemental-mpich-python2 22 | Architecture: any 23 | Depends: libgomp1, gfortran, libopenblas-dev, liblapack-dev, libmetis-dev, libgmp-dev, libmpfr-dev, libmpc-dev, libqd-dev, libmpich-dev, python-numpy 24 | Description: the distributed math library Elemental built with MPICH and python2 25 | A build of the distributed linear algebra and optimization library Elemental 26 | using the MPICH MPI implementation and Python 2 support 27 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /examples/interface/BPDense.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2009-2016, Jack Poulson 3 | # All rights reserved. 4 | # 5 | # This file is part of Elemental and is under the BSD 2-Clause License, 6 | # which can be found in the LICENSE file in the root directory, or at 7 | # http://opensource.org/licenses/BSD-2-Clause 8 | # 9 | import El 10 | 11 | m = 1000 12 | n = 2000 13 | display = True 14 | worldRank = El.mpi.WorldRank() 15 | worldSize = El.mpi.WorldSize() 16 | 17 | def Rectang(height,width): 18 | A = El.DistMatrix() 19 | El.Uniform( A, height, width ) 20 | return A 21 | 22 | A = Rectang(m,n) 23 | b = El.DistMatrix() 24 | El.Gaussian( b, m, 1 ) 25 | if display: 26 | El.Display( A, "A" ) 27 | El.Display( b, "b" ) 28 | 29 | ctrl = El.BPCtrl_d(isSparse=False) 30 | ctrl.ipmCtrl.mehrotraCtrl.progress = True 31 | startBP = El.mpi.Time() 32 | x = El.BP( A, b, ctrl ) 33 | endBP = El.mpi.Time() 34 | if worldRank == 0: 35 | print('BP time: {} seconds'.format(endBP-startBP)) 36 | if display: 37 | El.Display( x, "x" ) 38 | 39 | xOneNorm = El.EntrywiseNorm( x, 1 ) 40 | e = El.DistMatrix() 41 | El.Copy( b, e ) 42 | El.Gemv( El.NORMAL, -1., A, x, 1., e ) 43 | if display: 44 | El.Display( e, "e" ) 45 | eTwoNorm = El.Nrm2( e ) 46 | if worldRank == 0: 47 | print('|| x ||_1 = {}'.format(xOneNorm)) 48 | print('|| A x - b ||_2 = {}'.format(eTwoNorm)) 49 | 50 | El.Finalize() 51 | -------------------------------------------------------------------------------- /examples/interface/DruinskyToledo.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2009-2016, Jack Poulson 3 | # All rights reserved. 4 | # 5 | # This file is part of Elemental and is under the BSD 2-Clause License, 6 | # which can be found in the LICENSE file in the root directory, or at 7 | # http://opensource.org/licenses/BSD-2-Clause 8 | # 9 | import math, El 10 | k = 140 # matrix size 11 | realRes = imagRes = 100 # grid resolution 12 | 13 | # Display an instance of the pathological example 14 | A = El.DistMatrix() 15 | El.DruinskyToledo(A,k) 16 | El.Display(A,"Bunch-Kaufman growth matrix") 17 | 18 | # Display the spectral portrait 19 | portrait, box = El.SpectralPortrait(A,realRes,imagRes) 20 | El.DisplayPortrait(portrait,box,"spectral portrait of BK growth matrix") 21 | 22 | # Make a copy before overwriting with LDL factorization 23 | A_LU = El.DistMatrix() 24 | El.Copy( A, A_LU ) 25 | 26 | # Display the relevant pieces of pivoted LDL factorization 27 | dSub, p = El.LDL(A,False,El.BUNCH_KAUFMAN_A) 28 | El.MakeTrapezoidal(El.LOWER,A) 29 | El.Display(dSub,"Subdiagonal of D from LDL") 30 | #P = El.DistMatrix(iTag,MC,MR,A.Grid()) 31 | # TODO: Construct P from p 32 | #El.Display(P,"P") 33 | El.EntrywiseMap(A,lambda x:math.log10(max(abs(x),1))) 34 | El.Display(A,"Logarithmically-scaled LDL triangular factor") 35 | 36 | # Display the relevant pieces of a pivoted LU factorization 37 | p_LU = El.LU(A_LU) 38 | El.Display(p_LU,"LU permutation") 39 | El.EntrywiseMap(A_LU,lambda x:math.log10(max(abs(x),1))) 40 | El.Display(A_LU,"Logarithmically-scaled LU factors") 41 | 42 | El.Finalize() 43 | -------------------------------------------------------------------------------- /examples/interface/DynamicRegCounter.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2009-2016, Jack Poulson 3 | # All rights reserved. 4 | # 5 | # This file is part of Elemental and is under the BSD 2-Clause License, 6 | # which can be found in the LICENSE file in the root directory, or at 7 | # http://opensource.org/licenses/BSD-2-Clause 8 | # 9 | import El 10 | import time 11 | 12 | n=30 13 | A = El.DistSparseMatrix() 14 | El.DynamicRegCounter( A, n ) 15 | El.Display( A, "A" ) 16 | 17 | El.Finalize() 18 | -------------------------------------------------------------------------------- /examples/interface/Eig.py: -------------------------------------------------------------------------------- 1 | import El 2 | 3 | n = 1000 4 | output = True 5 | 6 | A = El.Matrix(El.dTag) 7 | El.Uniform( A, n, n, 0., 10.) 8 | if output: 9 | El.Print( A, "AOrig" ) 10 | 11 | w, X = El.Eig( A ) 12 | 13 | if output: 14 | El.Print( A, "A" ) 15 | El.Print( w, "w" ) 16 | El.Print( X, "X" ) 17 | 18 | El.Finalize() 19 | -------------------------------------------------------------------------------- /examples/interface/Fourier.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2009-2016, Jack Poulson 3 | # All rights reserved. 4 | # 5 | # This file is part of Elemental and is under the BSD 2-Clause License, 6 | # which can be found in the LICENSE file in the root directory, or at 7 | # http://opensource.org/licenses/BSD-2-Clause 8 | # 9 | import El 10 | n = 200 # matrix size 11 | realRes = imagRes = 100 # grid resolution 12 | 13 | # Display an instance of the Fourier matrix 14 | A = El.DistMatrix(El.zTag) 15 | El.Fourier(A,n) 16 | El.Display(A,"Fourier matrix") 17 | 18 | # Display a submatrix and subvector of the Fourier matrix 19 | El.Display(A[(n/4):(3*n/4),(n/4):(3*n/4)],"Middle submatrix") 20 | El.Display(A[1,:],"Second row") 21 | 22 | # Display the spectral portrait 23 | portrait, box = El.SpectralPortrait(A,realRes,imagRes) 24 | El.DisplayPortrait(portrait,box,"spectral portrait of Fourier matrix") 25 | 26 | El.Finalize() 27 | -------------------------------------------------------------------------------- /examples/interface/GEPPGrowth.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2009-2016, Jack Poulson 3 | # All rights reserved. 4 | # 5 | # This file is part of Elemental and is under the BSD 2-Clause License, 6 | # which can be found in the LICENSE file in the root directory, or at 7 | # http://opensource.org/licenses/BSD-2-Clause 8 | # 9 | import math, El 10 | n = 100 # matrix size 11 | realRes = imagRes = 100 # grid resolution 12 | 13 | # Display an instance of the pathological example 14 | A = El.DistMatrix() 15 | El.GEPPGrowth(A,n) 16 | El.Display(A,"GEPP growth matrix") 17 | 18 | # Display the spectral portrait 19 | portrait, box = El.SpectralPortrait(A,realRes,imagRes) 20 | El.DisplayPortrait(portrait,box,"spectral portrait of GEPP growth matrix") 21 | 22 | # Display the relevant pieces of pivoted LU factorization 23 | p = El.LU(A) 24 | El.Display(p,"LU permutation") 25 | El.EntrywiseMap(A,lambda x:math.log10(max(abs(x),1))) 26 | El.Display(A,"Logarithmically-scaled LU factors") 27 | El.Display(A[0:n,n-1],"Last column of logarithmic U") 28 | 29 | El.Finalize() 30 | -------------------------------------------------------------------------------- /examples/interface/JordanCholesky.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2009-2016, Jack Poulson 3 | # All rights reserved. 4 | # 5 | # This file is part of Elemental and is under the BSD 2-Clause License, 6 | # which can be found in the LICENSE file in the root directory, or at 7 | # http://opensource.org/licenses/BSD-2-Clause 8 | # 9 | import El, time, math 10 | 11 | n=100 12 | realRes = imagRes = 50 # grid resolution 13 | 14 | A = El.DistMatrix() 15 | El.JordanCholesky( A, n ) 16 | El.Display( A, "A" ) 17 | 18 | El.Cholesky( El.UPPER, A ) 19 | El.MakeTrapezoidal( El.UPPER, A ) 20 | El.Display( A, "U" ) 21 | 22 | portrait = El.SpectralWindow(A,0,6,4,realRes,imagRes) 23 | box = El.SpectralBox_d() 24 | box.center = El.TagToType(El.Complexify(A.tag))(0) 25 | box.realWidth = 6 26 | box.imagWidth = 4 27 | El.DisplayPortrait(portrait,box,"spectral portrait of 2*J_{1/2}(n)") 28 | 29 | El.Finalize() 30 | -------------------------------------------------------------------------------- /examples/interface/LCF.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2009-2016, Jack Poulson 3 | # All rights reserved. 4 | # 5 | # This file is part of Elemental and is under the BSD 2-Clause License, 6 | # which can be found in the LICENSE file in the root directory, or at 7 | # http://opensource.org/licenses/BSD-2-Clause 8 | # 9 | import El 10 | 11 | def LCF(lcf): 12 | n = len(lcf) 13 | G = El.Graph() 14 | G.Resize(n,n) 15 | 16 | G.Reserve( 4*n ) 17 | for s in xrange(n): 18 | # Build the links to this node in the Hamiltonian cycle 19 | tL = (s-1) % n 20 | tR = (s+1) % n 21 | G.QueueConnection(s,tL) 22 | G.QueueConnection(s,tR) 23 | # Build the LCF links 24 | t = (s + lcf[s]) % n 25 | G.QueueConnection(s,t) 26 | G.QueueConnection(t,s) 27 | 28 | G.ProcessQueues() 29 | return G 30 | 31 | levi = [-13,-9,7,-7,9,13]*5 32 | dodec = [10,7,4,-4,-7,10,-4,7,-7,4]*2 33 | truncOct = [3,-7,7,-3]*6 34 | 35 | if El.mpi.WorldRank() == 0: 36 | El.Display( LCF(levi), "Levi graph" ) 37 | El.Display( LCF(dodec), "Dodecahedral graph" ) 38 | El.Display( LCF(truncOct), "Trunacted octahedral graph" ) 39 | 40 | El.Finalize() 41 | -------------------------------------------------------------------------------- /examples/interface/SOCP_trivial.py: -------------------------------------------------------------------------------- 1 | # The simplest example of solving an SOCP with Elemental. 2 | # Contributed by Steven Diamond. 3 | import El 4 | orders = El.DistMultiVec(El.iTag) 5 | orders.Resize(1, 1) 6 | orders.Set(0, 0, 1) 7 | firstInd = El.DistMultiVec(El.iTag) 8 | firstInd.Resize(1, 1) 9 | firstInd.Set(0, 0, 0) 10 | 11 | c = El.DistMultiVec() 12 | c.Resize(1, 1) 13 | c.Set(0, 0, -1.) 14 | 15 | h = El.DistMultiVec() 16 | h.Resize(1, 1) 17 | h.Set(0, 0, 1.) 18 | 19 | b = El.DistMultiVec() 20 | b.Resize(0, 1) 21 | 22 | A = El.DistSparseMatrix() 23 | A.Resize(0, 1) 24 | A.ProcessQueues() 25 | 26 | G = El.DistSparseMatrix() 27 | G.Resize(1, 1) 28 | G.Reserve(1) 29 | G.QueueUpdate(0, 0, 1., passive=True) 30 | G.ProcessLocalQueues() 31 | 32 | x = El.DistMultiVec() 33 | y = El.DistMultiVec() 34 | z = El.DistMultiVec() 35 | s = El.DistMultiVec() 36 | ctrl = El.SOCPAffineCtrl_d() 37 | ctrl.mehrotraCtrl.solveCtrl.progress = True 38 | ctrl.mehrotraCtrl.progress = True 39 | ctrl.mehrotraCtrl.outerEquil = True 40 | ctrl.mehrotraCtrl.time = True 41 | El.SOCPAffine(A,G,b,c,h,orders,firstInd,x,y,z,s,ctrl) 42 | 43 | El.Finalize() 44 | -------------------------------------------------------------------------------- /examples/interface/TriangEig.py: -------------------------------------------------------------------------------- 1 | import El 2 | 3 | n = 1000 4 | outputMatrices = False 5 | outputVector = True 6 | 7 | A = El.Matrix(El.zTag) 8 | El.Uniform( A, n, n, 0., 10.) 9 | 10 | T = El.Matrix(El.zTag) 11 | El.Copy(A,T) 12 | w, Q = El.Schur(T,fullTriangle=True,vectors=True) 13 | 14 | X = El.TriangEig(T) 15 | 16 | if outputMatrices: 17 | El.Print( A, "A" ) 18 | El.Print( Q, "Q" ) 19 | El.Print( T, "T" ) 20 | El.Print( X, "X" ) 21 | if outputVector: 22 | El.Print( w, "w" ) 23 | 24 | El.Finalize() 25 | -------------------------------------------------------------------------------- /examples/lapack_like/Polar.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | 11 | int 12 | main( int argc, char* argv[] ) 13 | { 14 | El::Environment env( argc, argv ); 15 | El::mpi::Comm comm = El::mpi::COMM_WORLD; 16 | 17 | try 18 | { 19 | typedef double Real; 20 | typedef El::Complex Scalar; 21 | 22 | const El::Int m = El::Input("--height","matrix height",100); 23 | const El::Int n = El::Input("--width","matrix width",100); 24 | const bool print = El::Input("--print","print matrices?",false); 25 | El::ProcessInput(); 26 | El::PrintInputReport(); 27 | 28 | const El::Grid grid(comm); 29 | El::DistMatrix A(grid), Q(grid), P(grid); 30 | El::Uniform( A, m, n ); 31 | 32 | // Compute the polar decomp of A (but do not overwrite A) 33 | Q = A; 34 | El::Polar( Q, P ); 35 | if( print ) 36 | { 37 | El::Print( A, "A" ); 38 | El::Print( Q, "Q" ); 39 | El::Print( P, "P" ); 40 | } 41 | } 42 | catch( std::exception& e ) { El::ReportException(e); } 43 | 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /external/pmrrr/src/lapack/odnan.c: -------------------------------------------------------------------------------- 1 | /* disnan.f -- translated by f2c (version 20061008) */ 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | int odnan(double *din) 11 | { 12 | /* System generated locals */ 13 | int ret_val; 14 | 15 | /* Local variables */ 16 | extern int odsnan(double *, double *); 17 | 18 | 19 | /* -- LAPACK auxiliary routine (version 3.2) -- */ 20 | /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */ 21 | /* November 2006 */ 22 | 23 | /* .. Scalar Arguments .. */ 24 | /* .. */ 25 | 26 | /* Purpose */ 27 | /* ======= */ 28 | 29 | /* DISNAN returns .TRUE. if its argument is NaN, and .FALSE. */ 30 | /* otherwise. To be replaced by the Fortran 2003 intrinsic in the */ 31 | /* future. */ 32 | 33 | /* Arguments */ 34 | /* ========= */ 35 | 36 | /* DIN (input) DOUBLE PRECISION */ 37 | /* Input to test for NaN. */ 38 | 39 | /* ===================================================================== */ 40 | 41 | /* .. External Functions .. */ 42 | /* .. */ 43 | /* .. Executable Statements .. */ 44 | ret_val = odsnan(din, din); 45 | return ret_val; 46 | } /* odnan_ */ 47 | -------------------------------------------------------------------------------- /external/suite_sparse/README: -------------------------------------------------------------------------------- 1 | This folder contains Elemental's modifications of a subset of SuiteSparse. Said 2 | modifications retain the (non-viral) GNU Lesser General Public License 3 | version 2.1, or (at your option) any later version. 4 | 5 | In particular, modifications of the AMD and LDL modules have been included, 6 | with an 'El' prefix to avoid conflicts with official versions of SuiteSparse. 7 | 8 | Note that amd.f and amdbar.f were removed since they served only as a 9 | historical reference, and amd_global.c was removed since it was empty. 10 | -------------------------------------------------------------------------------- /external/suite_sparse/src/amd/amd_defaults.c: -------------------------------------------------------------------------------- 1 | /* ========================================================================= */ 2 | /* === AMD_defaults ======================================================== */ 3 | /* ========================================================================= */ 4 | 5 | /* ------------------------------------------------------------------------- */ 6 | /* AMD, Copyright (c) Timothy A. Davis, */ 7 | /* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ 8 | /* email: DrTimothyAldenDavis@gmail.com */ 9 | /* ------------------------------------------------------------------------- */ 10 | 11 | /* User-callable. Sets default control parameters for AMD. See amd.h 12 | * for details. 13 | */ 14 | 15 | #include "ElSuiteSparse/amd_internal.h" 16 | 17 | /* ========================================================================= */ 18 | /* === AMD defaults ======================================================== */ 19 | /* ========================================================================= */ 20 | 21 | GLOBAL void ElAMD_defaults 22 | ( 23 | double Control [ ] 24 | ) 25 | { 26 | Int i ; 27 | 28 | if (Control != (double *) NULL) 29 | { 30 | for (i = 0 ; i < EL_AMD_CONTROL ; i++) 31 | { 32 | Control [i] = 0 ; 33 | } 34 | Control [EL_AMD_DENSE] = EL_AMD_DEFAULT_DENSE ; 35 | Control [EL_AMD_AGGRESSIVE] = EL_AMD_DEFAULT_AGGRESSIVE ; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | El.hpp 4 | El-lite.hpp 5 | ) 6 | 7 | # Add the subdirectories 8 | add_subdirectory(El) 9 | 10 | # Propagate the files up the tree 11 | set(HYDROGEN_HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /include/El-lite.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_LITE_HPP 10 | #define EL_LITE_HPP 11 | 12 | #include 13 | #include 14 | 15 | #endif // ifndef EL_LITE_HPP 16 | -------------------------------------------------------------------------------- /include/El.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_HPP 10 | #define EL_HPP 11 | 12 | #include 13 | 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | 20 | #include 21 | 22 | #include 23 | 24 | #endif // ifndef EL_HPP 25 | -------------------------------------------------------------------------------- /include/El/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | blas_like.hpp 4 | control.hpp 5 | core.hpp 6 | io.hpp 7 | lapack_like.hpp 8 | matrices.hpp 9 | ) 10 | 11 | # Add the subdirectories 12 | add_subdirectory(blas_like) 13 | add_subdirectory(core) 14 | add_subdirectory(io) 15 | add_subdirectory(lapack_like) 16 | add_subdirectory(macros) 17 | add_subdirectory(matrices) 18 | 19 | # Propagate the files up the tree 20 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 21 | -------------------------------------------------------------------------------- /include/El/blas_like.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_BLAS_HPP 10 | #define EL_BLAS_HPP 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #endif // ifndef EL_BLAS_HPP 17 | -------------------------------------------------------------------------------- /include/El/blas_like/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | level1.hpp 4 | level2.hpp 5 | level3.hpp 6 | ) 7 | 8 | # Add the subdirectories 9 | add_subdirectory(level1) 10 | add_subdirectory(level2) 11 | add_subdirectory(level3) 12 | 13 | # Propagate the files up the tree 14 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 15 | -------------------------------------------------------------------------------- /include/El/blas_like/level1.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_BLAS1_HPP 10 | #define EL_BLAS1_HPP 11 | 12 | #include 13 | #include 14 | 15 | #endif // ifndef EL_BLAS1_HPP 16 | -------------------------------------------------------------------------------- /include/El/blas_like/level1/Axpy/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | util.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /include/El/blas_like/level1/Copy/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | AllGather.hpp 4 | ColAllGather.hpp 5 | ColAllToAllDemote.hpp 6 | ColAllToAllPromote.hpp 7 | ColFilter.hpp 8 | Exchange.hpp 9 | Filter.hpp 10 | Gather.hpp 11 | GeneralPurpose.hpp 12 | PartialColAllGather.hpp 13 | PartialColFilter.hpp 14 | PartialRowAllGather.hpp 15 | PartialRowFilter.hpp 16 | RowAllGather.hpp 17 | RowAllToAllDemote.hpp 18 | RowAllToAllPromote.hpp 19 | RowFilter.hpp 20 | Scatter.hpp 21 | Translate.hpp 22 | TranslateBetweenGrids.hpp 23 | TransposeDist.hpp 24 | internal_decl.hpp 25 | internal_impl.hpp 26 | util.hpp 27 | ) 28 | 29 | # Propagate the files up the tree 30 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 31 | -------------------------------------------------------------------------------- /include/El/blas_like/level1/Shift.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_BLAS_SHIFT_HPP 10 | #define EL_BLAS_SHIFT_HPP 11 | 12 | namespace El { 13 | 14 | template 15 | void Shift( Matrix& A, S alpha ) 16 | { 17 | EL_DEBUG_CSE 18 | const Int height = A.Height(); 19 | const Int width = A.Width(); 20 | T* ABuf = A.Buffer(); 21 | const Int ALDim = A.LDim(); 22 | 23 | // Iterate over single loop if memory is contiguous. Otherwise 24 | // iterate over double loop. 25 | if( height == ALDim ) 26 | { 27 | for( Int i=0; i 46 | void Shift( AbstractDistMatrix& A, S alpha ) 47 | { 48 | EL_DEBUG_CSE 49 | Shift( A.Matrix(), alpha ); 50 | } 51 | 52 | } // namespace El 53 | 54 | #endif // ifndef EL_BLAS_SHIFT_HPP 55 | -------------------------------------------------------------------------------- /include/El/blas_like/level1/Transpose/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | ColAllGather.hpp 4 | ColFilter.hpp 5 | PartialColAllGather.hpp 6 | PartialColFilter.hpp 7 | PartialRowFilter.hpp 8 | RowFilter.hpp 9 | ) 10 | 11 | # Propagate the files up the tree 12 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 13 | -------------------------------------------------------------------------------- /include/El/blas_like/level2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | CReflect.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /include/El/blas_like/level2/CReflect.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_BLAS_LEVEL2_CREFLECT_C_HPP 10 | #define EL_BLAS_LEVEL2_CREFLECT_C_HPP 11 | 12 | namespace El { 13 | 14 | template 15 | ElSymvCtrl CReflect( const SymvCtrl& ctrl ) 16 | { 17 | ElSymvCtrl ctrlC; 18 | ctrlC.bsize = ctrl.bsize; 19 | ctrlC.avoidTrmvBasedLocalSymv = ctrl.avoidTrmvBasedLocalSymv; 20 | return ctrlC; 21 | } 22 | 23 | template 24 | SymvCtrl CReflect( const ElSymvCtrl& ctrlC ) 25 | { 26 | SymvCtrl ctrl; 27 | ctrl.bsize = ctrlC.bsize; 28 | ctrl.avoidTrmvBasedLocalSymv = ctrlC.avoidTrmvBasedLocalSymv; 29 | return ctrl; 30 | } 31 | 32 | } // namespace El 33 | 34 | #endif // ifndef EL_BLAS_LEVEL2_CREFLECT_C_HPP 35 | -------------------------------------------------------------------------------- /include/El/blas_like/level3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | CReflect.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /include/El/blas_like/level3/CReflect.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_BLAS_LEVEL3_CREFLECT_C_HPP 10 | #define EL_BLAS_LEVEL3_CREFLECT_C_HPP 11 | 12 | namespace El { 13 | 14 | inline ElGemmAlgorithm CReflect( GemmAlgorithm alg ) 15 | { return static_cast(alg); } 16 | inline GemmAlgorithm CReflect( ElGemmAlgorithm alg ) 17 | { return static_cast(alg); } 18 | 19 | } // namespace El 20 | 21 | #endif // ifndef EL_BLAS_LEVEL3_CREFLECT_C_HPP 22 | -------------------------------------------------------------------------------- /include/El/core/AbstractMatrix.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EL_CORE_ABSTRACTMATRIX_HPP_ 2 | #define EL_CORE_ABSTRACTMATRIX_HPP_ 3 | 4 | #include "AbstractMatrix/decl.hpp" 5 | #include "AbstractMatrix/impl.hpp" 6 | 7 | #endif // EL_CORE_ABSTRACTMATRIX_HPP_ 8 | -------------------------------------------------------------------------------- /include/El/core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | AbstractMatrix.hpp 4 | CReflect.hpp 5 | DistMap.hpp 6 | DistMatrix.hpp 7 | DistPermutation.hpp 8 | Element.hpp 9 | FlamePart.hpp 10 | Grid.hpp 11 | Matrix.hpp 12 | Memory.hpp 13 | MemoryPool.hpp 14 | Permutation.hpp 15 | Profiling.hpp 16 | Proxy.hpp 17 | Serialize.hpp 18 | Timer.hpp 19 | View.hpp 20 | limits.hpp 21 | types.hpp 22 | ) 23 | 24 | # Add the subdirectories 25 | add_subdirectory(DistMap) 26 | add_subdirectory(DistMatrix) 27 | add_subdirectory(Element) 28 | add_subdirectory(FlamePart) 29 | add_subdirectory(Matrix) 30 | add_subdirectory(Memory) 31 | add_subdirectory(View) 32 | add_subdirectory(environment) 33 | add_subdirectory(imports) 34 | add_subdirectory(indexing) 35 | add_subdirectory(random) 36 | 37 | # Propagate the files up the tree 38 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 39 | -------------------------------------------------------------------------------- /include/El/core/DistMap.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | Copyright (c) 2012 Jack Poulson, Lexing Ying, and 6 | The University of Texas at Austin. 7 | All rights reserved. 8 | 9 | Copyright (c) 2013 Jack Poulson, Lexing Ying, and Stanford University. 10 | All rights reserved. 11 | 12 | Copyright (c) 2014 Jack Poulson and The Georgia Institute of Technology. 13 | All rights reserved. 14 | 15 | This file is part of Elemental and is under the BSD 2-Clause License, 16 | which can be found in the LICENSE file in the root directory, or at 17 | http://opensource.org/licenses/BSD-2-Clause 18 | */ 19 | #ifndef EL_CORE_DISTMAP_HPP 20 | #define EL_CORE_DISTMAP_HPP 21 | 22 | #include 23 | 24 | #endif // ifndef EL_CORE_DISTMAP_HPP 25 | -------------------------------------------------------------------------------- /include/El/core/DistMap/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | decl.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /include/El/core/DistMatrix/Block/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | CIRC_CIRC.hpp 4 | MC_MR.hpp 5 | MC_STAR.hpp 6 | MD_STAR.hpp 7 | MR_MC.hpp 8 | MR_STAR.hpp 9 | STAR_MC.hpp 10 | STAR_MD.hpp 11 | STAR_MR.hpp 12 | STAR_STAR.hpp 13 | STAR_VC.hpp 14 | STAR_VR.hpp 15 | VC_STAR.hpp 16 | VR_STAR.hpp 17 | ) 18 | 19 | # Propagate the files up the tree 20 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 21 | -------------------------------------------------------------------------------- /include/El/core/DistMatrix/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | AbstractDistMatrix.hpp 4 | Block.hpp 5 | ElementMatrix.hpp 6 | ) 7 | 8 | # Add the subdirectories 9 | add_subdirectory(Block) 10 | add_subdirectory(ElementMatrix) 11 | 12 | # Propagate the files up the tree 13 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 14 | -------------------------------------------------------------------------------- /include/El/core/DistMatrix/ElementMatrix/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | CIRC_CIRC.hpp 4 | MC_MR.hpp 5 | MC_STAR.hpp 6 | MD_STAR.hpp 7 | MR_MC.hpp 8 | MR_STAR.hpp 9 | STAR_MC.hpp 10 | STAR_MD.hpp 11 | STAR_MR.hpp 12 | STAR_STAR.hpp 13 | STAR_VC.hpp 14 | STAR_VR.hpp 15 | VC_STAR.hpp 16 | VR_STAR.hpp 17 | ) 18 | 19 | # Propagate the files up the tree 20 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 21 | -------------------------------------------------------------------------------- /include/El/core/Element.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_ELEMENT_HPP 10 | #define EL_ELEMENT_HPP 11 | 12 | #include 13 | #include 14 | 15 | #endif // ifndef EL_ELEMENT_HPP 16 | -------------------------------------------------------------------------------- /include/El/core/Element/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | decl.hpp 4 | impl.hpp 5 | ) 6 | 7 | # Add the subdirectories 8 | add_subdirectory(Complex) 9 | 10 | # Propagate the files up the tree 11 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /include/El/core/Element/Complex/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | decl.hpp 4 | impl.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /include/El/core/FlamePart.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_FLAMEPART_HPP 10 | #define EL_FLAMEPART_HPP 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #endif // ifndef EL_FLAMEPART_HPP 18 | -------------------------------------------------------------------------------- /include/El/core/FlamePart/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | Merge.hpp 4 | Partition.hpp 5 | Repartition.hpp 6 | SlidePartition.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /include/El/core/Matrix.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_MATRIX_HPP 10 | #define EL_MATRIX_HPP 11 | 12 | #include 13 | #include 14 | 15 | #endif // ifndef EL_MATRIX_HPP 16 | -------------------------------------------------------------------------------- /include/El/core/Matrix/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | decl.hpp 4 | impl.hpp 5 | impl_cpu.hpp 6 | impl_gpu.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /include/El/core/Matrix/impl.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_MATRIX_IMPL_HPP 10 | #define EL_MATRIX_IMPL_HPP 11 | 12 | #include "impl_cpu.hpp" 13 | 14 | #ifdef HYDROGEN_HAVE_GPU 15 | #include "impl_gpu.hpp" 16 | #endif 17 | 18 | #endif // EL_MATRIX_IMPL_HPP 19 | -------------------------------------------------------------------------------- /include/El/core/Memory.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_MEMORY_HPP 10 | #define EL_MEMORY_HPP 11 | 12 | #include 13 | #include 14 | 15 | #endif // ifndef EL_MEMORY_HPP 16 | -------------------------------------------------------------------------------- /include/El/core/Memory/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | decl.hpp 4 | impl.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /include/El/core/Timer.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_TIMER_HPP 10 | #define EL_TIMER_HPP 11 | 12 | #include 13 | 14 | namespace El { 15 | 16 | using std::chrono::duration; 17 | using std::chrono::duration_cast; 18 | 19 | using Clock = std::conditional::type; 22 | 23 | class Timer 24 | { 25 | public: 26 | Timer( const string& name="[blank]" ); 27 | 28 | const string& Name() const; 29 | 30 | void Start(); 31 | double Stop(); 32 | double Partial() const; // time since last start 33 | double Total() const; // total elapsed time 34 | 35 | void Reset( const string& name="[blank]" ); 36 | private: 37 | bool running_ = false; 38 | string name_ = "[blank]"; 39 | double totalTime_=0, lastPartialTime_=0; 40 | Clock::time_point lastTime_; 41 | }; 42 | 43 | } // namespace El 44 | 45 | #endif // ifndef EL_TIMER_HPP 46 | -------------------------------------------------------------------------------- /include/El/core/View.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_VIEW_HPP 10 | #define EL_VIEW_HPP 11 | 12 | #include 13 | #include 14 | 15 | #endif // ifndef EL_VIEW_HPP 16 | -------------------------------------------------------------------------------- /include/El/core/View/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | decl.hpp 4 | impl.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /include/El/core/environment/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | decl.hpp 4 | impl.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /include/El/core/imports/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | blas.hpp 4 | choice.hpp 5 | flame.hpp 6 | lapack.hpp 7 | mkl.hpp 8 | mpfr.hpp 9 | mpi.hpp 10 | mpi_choice.hpp 11 | omp.hpp 12 | openblas.hpp 13 | qd.hpp 14 | qt5.hpp 15 | scalapack.hpp 16 | valgrind.hpp 17 | ) 18 | 19 | # Add the subdirectories 20 | add_subdirectory(scalapack) 21 | 22 | # Propagate the files up the tree 23 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 24 | -------------------------------------------------------------------------------- /include/El/core/imports/flame.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_IMPORTS_FLAME_HPP 10 | #define EL_IMPORTS_FLAME_HPP 11 | 12 | #ifdef EL_HAVE_FLA_BSVD 13 | namespace El { 14 | namespace flame { 15 | 16 | void BidiagSVD 17 | ( BlasInt k, BlasInt mU, BlasInt mV, float* d, float* e, 18 | float* U, BlasInt ldu, float* V, BlasInt ldv, 19 | BlasInt numAccum=32, BlasInt maxNumIts=30, BlasInt bAlg=512 ); 20 | 21 | void BidiagSVD 22 | ( BlasInt k, BlasInt mU, BlasInt mV, double* d, double* e, 23 | double* U, BlasInt ldu, double* V, BlasInt ldv, 24 | BlasInt numAccum=32, BlasInt maxNumIts=30, BlasInt bAlg=512 ); 25 | 26 | void BidiagSVD 27 | ( BlasInt k, BlasInt mU, BlasInt mV, float* d, float* e, 28 | Complex* U, BlasInt ldu, Complex* V, BlasInt ldv, 29 | BlasInt numAccum=32, BlasInt maxNumIts=30, BlasInt bAlg=512 ); 30 | 31 | void BidiagSVD 32 | ( BlasInt k, BlasInt mU, BlasInt mV, double* d, double* e, 33 | Complex* U, BlasInt ldu, Complex* V, BlasInt ldv, 34 | BlasInt numAccum=32, BlasInt maxNumIts=30, BlasInt bAlg=512 ); 35 | 36 | } // namespace flame 37 | } // namespace El 38 | #endif // ifdef EL_HAVE_FLA_BSVD 39 | 40 | #endif // ifndef EL_IMPORTS_FLAME_HPP 41 | -------------------------------------------------------------------------------- /include/El/core/imports/mpi/comm.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef EL_IMPORTS_MPI_COMM_HPP_ 3 | #define EL_IMPORTS_MPI_COMM_HPP_ 4 | 5 | #include 6 | #include 7 | #ifdef HYDROGEN_HAVE_ALUMINUM 8 | #include 9 | #endif // HYDROGEN_HAVE_ALUMINUM 10 | 11 | #include 12 | 13 | namespace El 14 | { 15 | namespace mpi 16 | { 17 | 18 | #ifdef HYDROGEN_HAVE_ALUMINUM 19 | using Comm = AluminumComm; 20 | #else 21 | using Comm = PlainComm; 22 | #endif // HYDROGEN_HAVE_ALUMINUM 23 | 24 | /** @brief Create a Comm that takes ownership of the given MPI_Comm 25 | * 26 | * The input communicator is not duplicated and the resource 27 | * management passes to the newly created Comm object. 28 | * 29 | * @param comm The MPI_Comm object over which this will take control. 30 | * 31 | * @return A new Comm object controlling the input MPI_Comm. 32 | */ 33 | inline Comm MakeControllingComm(MPI_Comm comm) EL_NO_RELEASE_EXCEPT 34 | { 35 | Comm controlling_comm; 36 | controlling_comm.Control(comm); 37 | return controlling_comm; 38 | } 39 | 40 | 41 | }// namespace mpi 42 | }// namespace El 43 | #endif /* EL_IMPORTS_MPI_COMM_HPP_ */ 44 | -------------------------------------------------------------------------------- /include/El/core/imports/mpi/plain_comm.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef EL_IMPORTS_MPI_PLAIN_COMM_HPP_ 3 | #define EL_IMPORTS_MPI_PLAIN_COMM_HPP_ 4 | 5 | #include 6 | 7 | namespace El 8 | { 9 | namespace mpi 10 | { 11 | 12 | /** @class PlainComm 13 | * @brief Plain ol' MPI-based communicator. 14 | */ 15 | class PlainComm : public CommImpl 16 | { 17 | public: 18 | PlainComm() EL_NO_EXCEPT = default; 19 | PlainComm(MPI_Comm comm) EL_NO_EXCEPT 20 | : CommImpl{comm} 21 | {} 22 | 23 | void DoReset() const EL_NO_EXCEPT {}; 24 | };// class PlainComm 25 | 26 | }// namespace mpi 27 | }// namespace El 28 | #endif /* EL_IMPORTS_MPI_PLAIN_COMM_HPP */ 29 | -------------------------------------------------------------------------------- /include/El/core/imports/qt5.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_IMPORTS_QT5_HPP 10 | #define EL_IMPORTS_QT5_HPP 11 | 12 | #ifdef EL_HAVE_QT5 13 | 14 | namespace El { 15 | 16 | void InitializeQt5( int& argc, char**& argv ); 17 | void FinalizeQt5(); 18 | 19 | // Return true if Qt5 was detected, but no GUI is allowed. 20 | // This is useful if images are to be written to file using Qt5's wrappers. 21 | bool GuiDisabled(); 22 | 23 | // When Elemental is finalized, if no window was opened, then it must call 24 | // app.exit() instead 25 | void OpenedWindow(); 26 | 27 | // For keeping track of the extreme values visualized so far 28 | double MinRealWindowVal(); 29 | double MaxRealWindowVal(); 30 | double MinImagWindowVal(); 31 | double MaxImagWindowVal(); 32 | void UpdateMinRealWindowVal( double minVal ); 33 | void UpdateMaxRealWindowVal( double maxVal ); 34 | void UpdateMinImagWindowVal( double minVal ); 35 | void UpdateMaxImagWindowVal( double maxVal ); 36 | 37 | } // namespace El 38 | 39 | #endif // ifdef EL_HAVE_QT5 40 | 41 | #endif // ifndef EL_IMPORTS_QT5_HPP 42 | -------------------------------------------------------------------------------- /include/El/core/imports/scalapack/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | blacs.hpp 4 | pblas.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /include/El/core/imports/suite_sparse.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_IMPORTS_SUITE_SPARSE_HPP 10 | #define EL_IMPORTS_SUITE_SPARSE_HPP 11 | 12 | namespace El { 13 | namespace suite_sparse { 14 | 15 | // TODO 16 | 17 | } // namespace suite_sparse 18 | } // namespace El 19 | 20 | #endif // ifndef EL_IMPORTS_SUITE_SPARSE_HPP 21 | -------------------------------------------------------------------------------- /include/El/core/imports/valgrind.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_IMPORTS_VALGRIND_HPP 10 | #define EL_IMPORTS_VALGRIND_HPP 11 | 12 | #ifdef EL_HAVE_VALGRIND 13 | 14 | # include 15 | # define EL_RUNNING_ON_VALGRIND RUNNING_ON_VALGRIND 16 | 17 | #else 18 | 19 | # define EL_RUNNING_ON_VALGRIND 0 20 | 21 | #endif // ifdef EL_HAVE_VALGRIND 22 | 23 | #endif // ifndef EL_IMPORTS_VALGRIND_HPP 24 | -------------------------------------------------------------------------------- /include/El/core/indexing/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | decl.hpp 4 | impl.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /include/El/core/random/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | decl.hpp 4 | impl.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /include/El/io/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | CReflect.hpp 4 | ComplexDisplayWindow-premoc.hpp 5 | DisplayWidget.hpp 6 | DisplayWindow-premoc.hpp 7 | SpyWidget.hpp 8 | SpyWindow.hpp 9 | ) 10 | 11 | # Propagate the files up the tree 12 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 13 | -------------------------------------------------------------------------------- /include/El/io/CReflect.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_IO_CREFLECT_C_HPP 10 | #define EL_IO_CREFLECT_C_HPP 11 | 12 | namespace El { 13 | 14 | // Input/Output 15 | // ------------ 16 | inline ElColorMap CReflect( ColorMap map ) 17 | { return static_cast(map); } 18 | inline ColorMap CReflect( ElColorMap map ) 19 | { return static_cast(map); } 20 | 21 | } // namespace El 22 | 23 | #endif // ifndef EL_IO_CREFLECT_C_HPP 24 | -------------------------------------------------------------------------------- /include/El/io/DisplayWidget.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_DISPLAYWIDGET_HPP 10 | #define EL_DISPLAYWIDGET_HPP 11 | #ifdef EL_HAVE_QT5 12 | 13 | #include 14 | 15 | namespace El { 16 | 17 | template 18 | class DisplayWidget : public QWidget 19 | { 20 | public: 21 | DisplayWidget( QWidget* parent=0 ); 22 | ~DisplayWidget(); 23 | // TODO: Generalize to function which displays f(A), where f is functor 24 | void DisplayReal( const Matrix* A ); 25 | void DisplayReal( const Matrix* A, Base minVal, Base maxVal ); 26 | void DisplayImag( const Matrix* A ); 27 | void DisplayImag( const Matrix* A, Base minVal, Base maxVal ); 28 | // TODO: Add colorbar 29 | 30 | void SavePng( string basename ) const; 31 | 32 | protected: 33 | void paintEvent( QPaintEvent* event ); 34 | 35 | private: 36 | QPixmap pixmap_; 37 | }; 38 | 39 | } // namespace El 40 | 41 | #endif // ifdef EL_HAVE_QT5 42 | #endif // ifndef EL_DISPLAYWIDGET_HPP 43 | -------------------------------------------------------------------------------- /include/El/io/SpyWidget.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_SPYWIDGET_HPP 10 | #define EL_SPYWIDGET_HPP 11 | #ifdef EL_HAVE_QT5 12 | 13 | #include 14 | 15 | namespace El { 16 | 17 | class SpyWidget : public QWidget 18 | { 19 | public: 20 | SpyWidget( QWidget* parent=0 ); 21 | ~SpyWidget(); 22 | void Spy( const Matrix* A ); 23 | // TODO: Change style 24 | protected: 25 | void paintEvent( QPaintEvent* event ); 26 | 27 | private: 28 | QPixmap pixmap_; 29 | }; 30 | 31 | } // namespace El 32 | 33 | #endif // ifdef EL_HAVE_QT5 34 | #endif // ifndef EL_SPYWIDGET_HPP 35 | -------------------------------------------------------------------------------- /include/El/io/SpyWindow.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_SPYWINDOW_HPP 10 | #define EL_SPYWINDOW_HPP 11 | #ifdef EL_HAVE_QT5 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | #include 18 | 19 | namespace El { 20 | 21 | class SpyWindow : public QWidget 22 | { 23 | public: 24 | SpyWindow( QWidget* parent=0 ); 25 | ~SpyWindow(); 26 | 27 | void Spy 28 | ( const Matrix* A, 29 | QString title=QString("Default title") ); 30 | 31 | private: 32 | QScrollArea *scroll_; 33 | SpyWidget *spy_; 34 | const Matrix *matrix_; 35 | }; 36 | 37 | } // namespace El 38 | 39 | #endif // ifdef EL_HAVE_QT5 40 | #endif // ifndef EL_SPYWINDOW_HPP 41 | -------------------------------------------------------------------------------- /include/El/lapack_like.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_LAPACK_HPP 10 | #define EL_LAPACK_HPP 11 | 12 | #include 13 | 14 | #include 15 | 16 | #include 17 | #include 18 | 19 | #include 20 | #include 21 | 22 | #include 23 | #include 24 | 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | #endif // ifndef EL_LAPACK_HPP 31 | -------------------------------------------------------------------------------- /include/El/lapack_like/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | CReflect.hpp 4 | condense.hpp 5 | equilibrate.hpp 6 | euclidean_min.hpp 7 | factor.hpp 8 | funcs.hpp 9 | perm.hpp 10 | props.hpp 11 | reflect.hpp 12 | solve.hpp 13 | spectral.hpp 14 | util.hpp 15 | ) 16 | 17 | # Add the subdirectories 18 | add_subdirectory(condense) 19 | add_subdirectory(euclidean_min) 20 | add_subdirectory(factor) 21 | add_subdirectory(props) 22 | add_subdirectory(solve) 23 | add_subdirectory(spectral) 24 | 25 | # Propagate the files up the tree 26 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 27 | -------------------------------------------------------------------------------- /include/El/lapack_like/CReflect.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_LAPACK_CREFLECT_C_HPP 10 | #define EL_LAPACK_CREFLECT_C_HPP 11 | 12 | namespace El { 13 | 14 | inline ElSortType CReflect( SortType type ) 15 | { return static_cast(type); } 16 | 17 | inline SortType CReflect( ElSortType type ) 18 | { return static_cast(type); } 19 | 20 | } // namespace El 21 | 22 | #endif // ifndef EL_LAPACK_CREFLECT_C_HPP 23 | -------------------------------------------------------------------------------- /include/El/lapack_like/condense/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | CReflect.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /include/El/lapack_like/condense/CReflect.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_LAPACK_CONDENSE_CREFLECT_C_HPP 10 | #define EL_LAPACK_CONDENSE_CREFLECT_C_HPP 11 | 12 | namespace El { 13 | 14 | inline ElHermitianTridiagApproach 15 | CReflect( HermitianTridiagApproach approach ) 16 | { return static_cast( approach ); } 17 | 18 | inline HermitianTridiagApproach 19 | CReflect( ElHermitianTridiagApproach approach ) 20 | { return static_cast( approach ); } 21 | 22 | template 23 | ElHermitianTridiagCtrl 24 | CReflect( const HermitianTridiagCtrl& ctrl ) 25 | { 26 | ElHermitianTridiagCtrl ctrlC; 27 | ctrlC.approach = CReflect(ctrl.approach); 28 | ctrlC.order = CReflect(ctrl.order); 29 | ctrlC.symvCtrl = CReflect(ctrl.symvCtrl); 30 | return ctrlC; 31 | } 32 | 33 | template 34 | HermitianTridiagCtrl 35 | CReflect( const ElHermitianTridiagCtrl& ctrlC ) 36 | { 37 | HermitianTridiagCtrl ctrl; 38 | ctrl.approach = CReflect(ctrlC.approach); 39 | ctrl.order = CReflect(ctrlC.order); 40 | ctrl.symvCtrl = CReflect(ctrlC.symvCtrl); 41 | return ctrl; 42 | } 43 | 44 | } // namespace El 45 | 46 | #endif // ifndef EL_LAPACK_CONDENSE_CREFLECT_C_HPP 47 | -------------------------------------------------------------------------------- /include/El/lapack_like/euclidean_min/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | CReflect.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /include/El/lapack_like/factor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | CReflect.hpp 4 | ) 5 | 6 | # Add the subdirectories 7 | #add_subdirectory(ldl) 8 | add_subdirectory(qr) 9 | 10 | # Propagate the files up the tree 11 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /include/El/lapack_like/factor/ldl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the subdirectories 2 | add_subdirectory(sparse) 3 | 4 | # Propagate the files up the tree 5 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 6 | -------------------------------------------------------------------------------- /include/El/lapack_like/factor/ldl/sparse/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | numeric.hpp 4 | symbolic.hpp 5 | ) 6 | 7 | # Add the subdirectories 8 | add_subdirectory(symbolic) 9 | 10 | # Propagate the files up the tree 11 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /include/El/lapack_like/factor/ldl/sparse/symbolic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | NodeInfo.hpp 4 | Separator.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /include/El/lapack_like/factor/qr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | ProxyHouseholder.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /include/El/lapack_like/perm.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_PERM_HPP 10 | #define EL_PERM_HPP 11 | 12 | namespace El { 13 | 14 | // Convert a pivot sequence to a partial permutation vector 15 | // ======================================================== 16 | // NOTE: These routine are now deprecated 17 | void PivotsToPartialPermutation 18 | ( const Matrix& pivots, 19 | Matrix& p, 20 | Matrix& pInv, 21 | Int offset=0 ); 22 | void PivotsToPartialPermutation 23 | ( const AbstractDistMatrix& pivots, 24 | AbstractDistMatrix& p, 25 | AbstractDistMatrix& pInv, 26 | Int offset=0 ); 27 | void PivotsToPartialPermutation 28 | ( const DistMatrix& pivots, 29 | AbstractDistMatrix& p, 30 | AbstractDistMatrix& pInv, 31 | Int offset=0 ); 32 | 33 | } // namespace El 34 | 35 | #endif // ifndef EL_PERM_HPP 36 | -------------------------------------------------------------------------------- /include/El/lapack_like/props/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | CReflect.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /include/El/lapack_like/props/CReflect.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_LAPACK_PROPS_CREFLECT_C_HPP 10 | #define EL_LAPACK_PROPS_CREFLECT_C_HPP 11 | 12 | namespace El { 13 | 14 | inline ElNormType CReflect( NormType type ) 15 | { return static_cast(type); } 16 | inline NormType CReflect( ElNormType type ) 17 | { return static_cast(type); } 18 | 19 | } // namespace El 20 | 21 | #endif // ifndef EL_LAPACK_PROPS_CREFLECT_C_HPP 22 | -------------------------------------------------------------------------------- /include/El/lapack_like/solve/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | FGMRES.hpp 4 | LGMRES.hpp 5 | Refined.hpp 6 | ) 7 | 8 | # Propagate the files up the tree 9 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 10 | -------------------------------------------------------------------------------- /include/El/lapack_like/spectral/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | CReflect.hpp 4 | HermitianEig.hpp 5 | Lanczos.hpp 6 | ProductLanczos.hpp 7 | SVD.hpp 8 | Schur.hpp 9 | ) 10 | 11 | # Propagate the files up the tree 12 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 13 | -------------------------------------------------------------------------------- /include/El/macros/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | CInstantiate.h 4 | GuardAndPayload.h 5 | Instantiate.h 6 | NestedGuardAndPayload.h 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /include/El/matrices/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the subdirectories 2 | add_subdirectory(deterministic) 3 | 4 | # Propagate the files up the tree 5 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 6 | -------------------------------------------------------------------------------- /include/El/matrices/deterministic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the subdirectories 2 | add_subdirectory(classical) 3 | add_subdirectory(lattice) 4 | 5 | # Propagate the files up the tree 6 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 7 | -------------------------------------------------------------------------------- /include/El/matrices/deterministic/classical/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | Circulant.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /include/El/matrices/deterministic/lattice/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the headers for this directory 2 | set_full_path(THIS_DIR_HEADERS 3 | NTRUAttack.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(HEADERS "${HEADERS}" "${THIS_DIR_HEADERS}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /include/El/matrices/deterministic/lattice/NTRUAttack.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_MATRICES_DETERMINISTIC_LATTICE_NTRUATTACK_HPP 10 | #define EL_MATRICES_DETERMINISTIC_LATTICE_NTRUATTACK_HPP 11 | 12 | namespace El { 13 | 14 | template 15 | void NTRUAttack( Matrix& A, const Matrix& h, Real alpha, Real q ) 16 | { 17 | EL_DEBUG_CSE 18 | const Int n = h.Height(); 19 | Zeros( A, 2*n, 2*n ); 20 | auto ATL = A( IR(0,n), IR(0,n) ); 21 | auto ABL = A( IR(n,2*n), IR(0,n) ); 22 | auto ABR = A( IR(n,2*n), IR(n,2*n) ); 23 | ShiftDiagonal( ATL, alpha ); 24 | ShiftDiagonal( ABR, q ); 25 | Circulant( ABL, h ); 26 | } 27 | 28 | } // namespace El 29 | 30 | #endif // ifndef EL_MATRICES_DETERMINISTIC_LATTICE_NTRUATTACK_HPP 31 | -------------------------------------------------------------------------------- /include/hydrogen/SyncInfo.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_SYNCINFO_HPP_ 2 | #define HYDROGEN_SYNCINFO_HPP_ 3 | 4 | #include "SyncInfoAllDecl.hpp" 5 | #include "SynchronizeAPI.hpp" 6 | #include "MultiSync.hpp" 7 | 8 | #endif // HYDROGEN_SYNCINFO_HPP_ 9 | -------------------------------------------------------------------------------- /include/hydrogen/SyncInfoAllDecl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_SYNCINFOALLDECL_HPP_ 2 | #define HYDROGEN_SYNCINFOALLDECL_HPP_ 3 | 4 | #include 5 | 6 | #include "SyncInfoBase.hpp" 7 | 8 | #ifdef HYDROGEN_HAVE_GPU 9 | #include "device/gpu/SyncInfo.hpp" 10 | #endif // HYDROGEN_HAVE_GPU 11 | 12 | #endif // HYDROGEN_SYNCINFOALLDECL_HPP_ 13 | -------------------------------------------------------------------------------- /include/hydrogen/blas/GPU_BLAS.hpp: -------------------------------------------------------------------------------- 1 | #include "GPU_BLAS_decl.hpp" 2 | #include "GPU_BLAS_impl.hpp" 3 | -------------------------------------------------------------------------------- /include/hydrogen/blas/gpu/Fill.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_BLAS_GPU_FILL_HPP_ 2 | #define HYDROGEN_BLAS_GPU_FILL_HPP_ 3 | 4 | /** @file 5 | * @todo Write documentation! 6 | */ 7 | 8 | #include 9 | #include 10 | 11 | #ifdef HYDROGEN_HAVE_CUDA 12 | #include 13 | #elif defined(HYDROGEN_HAVE_ROCM) 14 | #include 15 | #endif 16 | 17 | #include 18 | 19 | namespace hydrogen 20 | { 21 | 22 | template >> 23 | void Fill_GPU_impl(size_t height, size_t width, 24 | T const& alpha, T* buffer, size_t ldim, 25 | SyncInfo const& sync_info); 26 | 27 | template >, 29 | typename=void> 30 | void Fill_GPU_impl(size_t const&, size_t const&, 31 | T const&, T* const&, size_t const&, 32 | SyncInfo const&) 33 | { 34 | throw std::logic_error("Fill: Type not valid on GPU."); 35 | } 36 | 37 | template >> 38 | void Fill_GPU_1D_impl(T* buffer, size_t const& size, 39 | T const& alpha, 40 | SyncInfo const& sync_info) 41 | { 42 | Fill_GPU_impl(size, 1, alpha, buffer, size, sync_info); 43 | } 44 | 45 | }// namespace hydrogen 46 | #endif // HYDROGEN_BLAS_GPU_FILL_HPP_ 47 | -------------------------------------------------------------------------------- /include/hydrogen/blas/gpu/Hadamard.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_BLAS_GPU_HADAMARD_HPP_ 2 | #define HYDROGEN_BLAS_GPU_HADAMARD_HPP_ 3 | 4 | /** @file 5 | * @todo Write documentation! 6 | */ 7 | 8 | #include 9 | #include 10 | 11 | #ifdef HYDROGEN_HAVE_CUDA 12 | #include 13 | #elif defined(HYDROGEN_HAVE_ROCM) 14 | #include 15 | #endif 16 | 17 | #include 18 | 19 | namespace hydrogen 20 | { 21 | 22 | template >> 23 | void Hadamard_GPU_impl( 24 | size_t height, size_t width, 25 | T const* A, size_t row_stride_A, size_t lda, 26 | T const* B, size_t row_stride_B, size_t ldb, 27 | T* C, size_t row_stride_C, size_t ldc, 28 | SyncInfo const& sync_info); 29 | 30 | template >, 32 | typename=void> 33 | void Hadamard_GPU_impl( 34 | size_t const&, size_t const&, 35 | T const* const&, size_t const&, size_t const&, 36 | T const* const&, size_t const&, size_t const&, 37 | T* const&, size_t const&, size_t const&, 38 | SyncInfo const&) 39 | { 40 | throw std::logic_error("Hadamard: Type not valid on GPU."); 41 | } 42 | 43 | }// namespace hydrogen 44 | #endif // HYDROGEN_BLAS_GPU_HADAMARD_HPP_ 45 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/BasicCopy.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPU_BASICCOPY_HPP 2 | #define HYDROGEN_DEVICE_GPU_BASICCOPY_HPP 3 | 4 | #include 5 | 6 | #if defined(HYDROGEN_HAVE_CUDA) 7 | #include "cuda/CUDACopy.hpp" 8 | #elif defined(HYDROGEN_HAVE_ROCM) 9 | #include "rocm/ROCmCopy.hpp" 10 | #endif 11 | 12 | #endif // HYDROGEN_DEVICE_GPU_BASICCOPY_HPP 13 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/CUDA.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPU_CUDA_HPP_ 2 | #define HYDROGEN_DEVICE_GPU_CUDA_HPP_ 3 | 4 | #include "cuda/CUDAError.hpp" 5 | #include "cuda/CUDALaunchKernel.hpp" 6 | #include "cuda/CUDAManagement.hpp" 7 | 8 | #endif // HYDROGEN_DEVICE_GPU_CUDA_HPP_ 9 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/GPUError.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPUERROR_HPP_ 2 | #define HYDROGEN_DEVICE_GPUERROR_HPP_ 3 | 4 | #include 5 | 6 | #include 7 | 8 | namespace hydrogen 9 | { 10 | 11 | /** @name ErrorHandling */ 12 | ///@{ 13 | 14 | H_ADD_BASIC_EXCEPTION_CLASS(GPUError, std::runtime_error); 15 | 16 | ///@} 17 | }// namespace 18 | #endif // HYDROGEN_DEVICE_GPUERROR_HPP_ 19 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/GPURuntime.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_INCLUDE_HYDROGEN_DEVICE_GPU_GPURUNTIME_HPP_ 2 | #define HYDROGEN_INCLUDE_HYDROGEN_DEVICE_GPU_GPURUNTIME_HPP_ 3 | 4 | #include 5 | 6 | #include 7 | #ifdef HYDROGEN_HAVE_CUDA 8 | #include "CUDA.hpp" 9 | #include 10 | #elif defined(HYDROGEN_HAVE_ROCM) 11 | #include "ROCm.hpp" 12 | #include 13 | #endif 14 | 15 | #endif // HYDROGEN_INCLUDE_HYDROGEN_DEVICE_GPU_GPURUNTIME_HPP_ 16 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/ROCm.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPU_ROCM_HPP_ 2 | #define HYDROGEN_DEVICE_GPU_ROCM_HPP_ 3 | 4 | #include "rocm/ROCmError.hpp" 5 | #include "rocm/ROCmLaunchKernel.hpp" 6 | #include "rocm/ROCmManagement.hpp" 7 | 8 | #endif // HYDROGEN_DEVICE_GPU_ROCM_HPP_ 9 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/SyncInfo.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPU_SYNCINFO_HPP_ 2 | #define HYDROGEN_DEVICE_GPU_SYNCINFO_HPP_ 3 | 4 | #include 5 | 6 | #if defined HYDROGEN_HAVE_CUDA 7 | #include "cuda/SyncInfo.hpp" 8 | #elif defined HYDROGEN_HAVE_ROCM 9 | #include "rocm/SyncInfo.hpp" 10 | #endif 11 | 12 | #endif // HYDROGEN_DEVICE_GPU_SYNCINFO_HPP_ 13 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/cuda/cuBLAS.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPU_CUDA_CUBLAS_HPP_ 2 | #define HYDROGEN_DEVICE_GPU_CUDA_CUBLAS_HPP_ 3 | 4 | #include "cuBLASError.hpp" 5 | #include "cuBLASManagement.hpp" 6 | #include "cuBLASMeta.hpp" 7 | #include "cuBLASUtil.hpp" 8 | 9 | // The API wrapper declarations 10 | #include "cuBLAS_API.hpp" 11 | 12 | #endif // HYDROGEN_DEVICE_GPU_CUDA_CUBLAS_HPP_ 13 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/cuda/cuSOLVER.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPU_CUDA_CUSOLVER_HPP_ 2 | #define HYDROGEN_DEVICE_GPU_CUDA_CUSOLVER_HPP_ 3 | 4 | #include "cuSOLVERError.hpp" 5 | #include "cuSOLVERManagement.hpp" 6 | #include "cuSOLVERMeta.hpp" 7 | #include "cuSOLVERUtil.hpp" 8 | 9 | // The API wrapper declarations 10 | #include "cuSOLVER_API.hpp" 11 | 12 | #endif // HYDROGEN_DEVICE_GPU_CUDA_CUSOLVER_HPP_ 13 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/cuda/cuSOLVERUtil.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPU_CUDA_CUSOLVERUTIL_HPP_ 2 | #define HYDROGEN_DEVICE_GPU_CUDA_CUSOLVERUTIL_HPP_ 3 | 4 | #include 5 | 6 | #include 7 | 8 | namespace hydrogen 9 | { 10 | namespace cusolver 11 | { 12 | 13 | /** @brief cuSOLVER uses ints to represent sizes. */ 14 | using SizeT = int; 15 | 16 | /** @brief cuSOLVER uses ints to represent info variables. */ 17 | using InfoT = int; 18 | 19 | /** @brief Convert a value to the size type expected by the cuSOLVER 20 | * library. 21 | * 22 | * If `HYDROGEN_DO_BOUNDS_CHECKING` is defined, this will do a 23 | * "safe cast" (it will verify that `val` is in the dynamic range of 24 | * `int`. Otherwise it will do a regular static_cast. 25 | */ 26 | template 27 | #ifdef HYDROGEN_DO_BOUNDS_CHECKING 28 | SizeT ToSizeT(T const& val) 29 | { 30 | return narrow_cast(val); 31 | } 32 | #else 33 | SizeT ToSizeT(T const& val) noexcept 34 | { 35 | return static_cast(val); 36 | } 37 | #endif // HYDROGEN_DO_BOUNDS_CHECKING 38 | 39 | /** @brief Overload to prevent extra work in the case of dynamic range 40 | * checking. 41 | */ 42 | inline SizeT ToSizeT(SizeT const& val) noexcept 43 | { 44 | return val; 45 | } 46 | 47 | }// namespace cusolver 48 | }// namespace hydrogen 49 | #endif // HYDROGEN_DEVICE_GPU_CUDA_CUSOLVERUTIL_HPP_ 50 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/rocm/ROCmLaunchKernel.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPU_ROCMLAUNCHKERNEL_HPP_ 2 | #define HYDROGEN_DEVICE_GPU_ROCMLAUNCHKERNEL_HPP_ 3 | 4 | #include 5 | #include 6 | 7 | namespace hydrogen 8 | { 9 | namespace gpu 10 | { 11 | 12 | inline constexpr int Default2DTileSize() { return 64; } 13 | 14 | template 15 | void LaunchKernel( 16 | F kernel, dim3 const& gridDim, dim3 const& blkDim, 17 | size_t sharedMem, SyncInfo const& si, 18 | Args&&... kernel_args) 19 | { 20 | H_CHECK_HIP(hipGetLastError()); 21 | // Note that this is (currently) implemented as a macro; not clear 22 | // if std::forward-ing the arguments is appropriate... 23 | hipLaunchKernelGGL( 24 | kernel, gridDim, blkDim, 25 | sharedMem, si.Stream(), 26 | std::forward(kernel_args)...); 27 | H_CHECK_HIP(hipGetLastError()); 28 | } 29 | 30 | }// namespace gpu 31 | }// namespace hydrogen 32 | #endif // HYDROGEN_DEVICE_GPU_ROCMLAUNCHKERNEL_HPP_ 33 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/rocm/rocBLAS.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPU_ROCM_ROCBLAS_HPP_ 2 | #define HYDROGEN_DEVICE_GPU_ROCM_ROCBLAS_HPP_ 3 | 4 | #include "rocBLASError.hpp" 5 | #include "rocBLASManagement.hpp" 6 | #include "rocBLASMeta.hpp" 7 | #include "rocBLASUtil.hpp" 8 | 9 | // The API wrapper declarations 10 | #include "rocBLAS_API.hpp" 11 | 12 | #endif // HYDROGEN_DEVICE_GPU_ROCM_ROCBLAS_HPP_ 13 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/rocm/rocSOLVER.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPU_ROCM_ROCSOLVER_HPP_ 2 | #define HYDROGEN_DEVICE_GPU_ROCM_ROCSOLVER_HPP_ 3 | 4 | #include "rocSOLVERError.hpp" 5 | #include "rocSOLVERManagement.hpp" 6 | #include "rocSOLVERMeta.hpp" 7 | #include "rocSOLVERUtil.hpp" 8 | 9 | // The API wrapper declarations 10 | #include "rocSOLVER_API.hpp" 11 | 12 | #endif // HYDROGEN_DEVICE_GPU_ROCM_ROCSOLVER_HPP_ 13 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/rocm/rocSOLVERError.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPU_ROCM_ROCSOLVERERROR_HPP_ 2 | #define HYDROGEN_DEVICE_GPU_ROCM_ROCSOLVERERROR_HPP_ 3 | 4 | #include "rocBLASError.hpp" 5 | 6 | // Helper error-checking macro. Since the statuses are just rocBLAS 7 | // statuses, just use that macro. Yes, we could get a more precise 8 | // error class, e.g., "rocSOLVERError", but the command is still 9 | // printed verbatim, so any user will see that the rocSOLVER call is 10 | // causing the error. Errrr detecting the error... 11 | #define H_CHECK_ROCSOLVER(cmd) \ 12 | H_CHECK_ROCBLAS(cmd) 13 | 14 | #endif // HYDROGEN_DEVICE_GPU_ROCM_ROCSOLVERERROR_HPP_ 15 | -------------------------------------------------------------------------------- /include/hydrogen/device/gpu/rocm/rocSOLVERUtil.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_DEVICE_GPU_ROCM_ROCSOLVERUTIL_HPP_ 2 | #define HYDROGEN_DEVICE_GPU_ROCM_ROCSOLVERUTIL_HPP_ 3 | 4 | #include 5 | 6 | #include 7 | 8 | namespace hydrogen 9 | { 10 | namespace rocsolver 11 | { 12 | 13 | /** @brief rocSOLVER uses rocblas_ints to represent sizes. */ 14 | using SizeT = rocblas_int; 15 | 16 | /** @brief rocSOLVER uses rocblas_ints to represent info variables. */ 17 | using InfoT = rocblas_int; 18 | 19 | /** @brief Convert a value to the size type expected by the rocSOLVER 20 | * library. 21 | * 22 | * If `HYDROGEN_DO_BOUNDS_CHECKING` is defined, this will do a 23 | * "safe cast" (it will verify that `val` is in the dynamic range of 24 | * `int`. Otherwise it will do a regular static_cast. 25 | */ 26 | template 27 | #ifdef HYDROGEN_DO_BOUNDS_CHECKING 28 | SizeT ToSizeT(T const& val) 29 | { 30 | return narrow_cast(val); 31 | } 32 | #else 33 | SizeT ToSizeT(T const& val) noexcept 34 | { 35 | return static_cast(val); 36 | } 37 | #endif // HYDROGEN_DO_BOUNDS_CHECKING 38 | 39 | /** @brief Overload to prevent extra work in the case of dynamic range 40 | * checking. 41 | */ 42 | inline SizeT ToSizeT(SizeT const& val) noexcept 43 | { 44 | return val; 45 | } 46 | 47 | }// namespace rocsolver 48 | }// namespace hydrogen 49 | #endif // HYDROGEN_DEVICE_GPU_ROCM_ROCSOLVERUTIL_HPP_ 50 | -------------------------------------------------------------------------------- /include/hydrogen/meta/TypeTraits.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HYDROGEN_META_TYPE_TRAITS_HPP_ 2 | #define HYDROGEN_META_TYPE_TRAITS_HPP_ 3 | 4 | #include 5 | #include 6 | 7 | namespace hydrogen 8 | { 9 | 10 | template 11 | struct TypeTraits 12 | { 13 | static T One() noexcept { return T{1}; } 14 | static T Zero() noexcept { return T{0}; } 15 | static std::string Name() { return typeid(T).name(); } 16 | };// struct TypeTraits 17 | 18 | }// namespace hydrogen 19 | #endif // HYDROGEN_META_TYPE_TRAITS_HPP_ 20 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | io.cpp 4 | ) 5 | 6 | # Add the subdirectories 7 | add_subdirectory(blas_like) 8 | add_subdirectory(core) 9 | add_subdirectory(io) 10 | add_subdirectory(lapack_like) 11 | add_subdirectory(matrices) 12 | 13 | add_subdirectory(hydrogen) 14 | 15 | # Propagate the files up the tree 16 | set(HYDROGEN_SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 17 | if (HYDROGEN_HAVE_GPU) 18 | set(HYDROGEN_GPU_SOURCES "${GPU_SOURCES}" PARENT_SCOPE) 19 | endif () 20 | set(HYDROGEN_CATCH2_TEST_FILES 21 | "${CATCH2_TESTS}" "${THIS_DIR_CATCH2_TESTS}" PARENT_SCOPE) 22 | -------------------------------------------------------------------------------- /src/blas_like/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | blocksizes.cpp 4 | ) 5 | 6 | # Add the subdirectories 7 | add_subdirectory(level1) 8 | add_subdirectory(level2) 9 | add_subdirectory(level3) 10 | 11 | # Propagate the files up the tree 12 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 13 | set(CATCH2_TESTS "${CATCH2_TESTS}" "${THIS_DIR_CATCH2_TESTS}" PARENT_SCOPE) 14 | -------------------------------------------------------------------------------- /src/blas_like/level1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | ColumnMinAbs.cpp 4 | ColumnNorms.cpp 5 | Copy.cpp 6 | HilbertSchmidt.cpp 7 | Instantiate.cpp 8 | Max.cpp 9 | MaxAbs.cpp 10 | MaxAbsLoc.cpp 11 | MaxLoc.cpp 12 | Min.cpp 13 | MinAbsLoc.cpp 14 | MinLoc.cpp 15 | RowMinAbs.cpp 16 | RowNorms.cpp 17 | Swap.cpp 18 | Symmetric2x2Inv.cpp 19 | Transform2x2.cpp 20 | NormsFromScaledSquares.hpp 21 | ) 22 | 23 | # Propagate the files up the tree 24 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 25 | -------------------------------------------------------------------------------- /src/blas_like/level1/Instantiate.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #define EL_INSTANTIATE_BLAS_LEVEL1 10 | #include 11 | #include 12 | -------------------------------------------------------------------------------- /src/blas_like/level2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | ApplyGivensSequence.cpp 4 | Gemv.cpp 5 | Ger.cpp 6 | # Geru.cpp 7 | Hemv.cpp 8 | # Her.cpp 9 | Her2.cpp 10 | # QuasiTrsv.cpp 11 | Symv.cpp 12 | # Syr.cpp 13 | Syr2.cpp 14 | # Trmv.cpp 15 | # Trr.cpp 16 | # Trr2.cpp 17 | Trsv.cpp 18 | ) 19 | 20 | # Add the subdirectories 21 | add_subdirectory(Gemv) 22 | #add_subdirectory(QuasiTrsv) 23 | #add_subdirectory(Symv) 24 | #add_subdirectory(Trsv) 25 | 26 | # Propagate the files up the tree 27 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 28 | -------------------------------------------------------------------------------- /src/blas_like/level2/Gemv/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Normal.hpp 4 | Transpose.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/blas_like/level2/Her.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | 12 | namespace El { 13 | 14 | template 15 | void Her( UpperOrLower uplo, Base alpha, const Matrix& x, Matrix& A ) 16 | { 17 | EL_DEBUG_CSE 18 | Syr( uplo, T(alpha), x, A, true ); 19 | } 20 | 21 | template 22 | void Her 23 | ( UpperOrLower uplo, 24 | Base alpha, const AbstractDistMatrix& x, 25 | AbstractDistMatrix& A ) 26 | { 27 | EL_DEBUG_CSE 28 | Syr( uplo, T(alpha), x, A, true ); 29 | } 30 | 31 | #define PROTO(T) \ 32 | template void Her \ 33 | ( UpperOrLower uplo, Base alpha, const Matrix& x, Matrix& A ); \ 34 | template void Her \ 35 | ( UpperOrLower uplo, \ 36 | Base alpha, const AbstractDistMatrix& x, \ 37 | AbstractDistMatrix& A ); 38 | 39 | #define EL_ENABLE_DOUBLEDOUBLE 40 | #define EL_ENABLE_QUADDOUBLE 41 | #define EL_ENABLE_QUAD 42 | #define EL_ENABLE_BIGINT 43 | #define EL_ENABLE_BIGFLOAT 44 | #define EL_ENABLE_HALF 45 | #include 46 | 47 | } // namespace El 48 | -------------------------------------------------------------------------------- /src/blas_like/level2/Her2.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | 12 | namespace El { 13 | 14 | template 15 | void Her2 16 | ( UpperOrLower uplo, 17 | T alpha, const Matrix& x, const Matrix& y, Matrix& A ) 18 | { 19 | EL_DEBUG_CSE 20 | Syr2( uplo, T(alpha), x, y, A, true ); 21 | } 22 | 23 | #if 0 // TOM 24 | template 25 | void Her2 26 | ( UpperOrLower uplo, 27 | T alpha, const AbstractDistMatrix& x, const AbstractDistMatrix& y, 28 | AbstractDistMatrix& A ) 29 | { 30 | EL_DEBUG_CSE 31 | Syr2( uplo, T(alpha), x, y, A, true ); 32 | } 33 | #endif // 0 TOM 34 | 35 | #define PROTO(T) \ 36 | template void Her2 \ 37 | ( UpperOrLower uplo, T alpha, \ 38 | const Matrix& x, const Matrix& y, Matrix& A ); 39 | 40 | /* 41 | template void Her2 \ 42 | ( UpperOrLower uplo, T alpha, \ 43 | const AbstractDistMatrix& x, const AbstractDistMatrix& y, \ 44 | AbstractDistMatrix& A ); 45 | */ 46 | 47 | #define EL_ENABLE_DOUBLEDOUBLE 48 | #define EL_ENABLE_QUADDOUBLE 49 | #define EL_ENABLE_QUAD 50 | #define EL_ENABLE_BIGINT 51 | #define EL_ENABLE_BIGFLOAT 52 | /*#undef EL_ENABLE_HALF*/ 53 | #include 54 | 55 | } // namespace El 56 | -------------------------------------------------------------------------------- /src/blas_like/level2/QuasiTrsv/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LN.hpp 4 | LT.hpp 5 | UN.hpp 6 | UT.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/blas_like/level2/Symv/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | L.hpp 4 | U.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/blas_like/level2/Trsv/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LN.hpp 4 | LT.hpp 5 | UN.hpp 6 | UT.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/blas_like/level3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Gemm.cpp 4 | Hemm.cpp 5 | # Her2k.cpp 6 | Herk.cpp 7 | # HermitianFromEVD.cpp 8 | # MultiShiftQuasiTrsm.cpp 9 | # MultiShiftTrsm.cpp 10 | # NormalFromEVD.cpp 11 | # QuasiTrsm.cpp 12 | # SafeMultiShiftTrsm.cpp 13 | Symm.cpp 14 | # Syr2k.cpp 15 | Syrk.cpp 16 | # Trdtrmm.cpp 17 | # Trmm.cpp 18 | # Trr2k.cpp 19 | Trrk.cpp 20 | Trsm.cpp 21 | # Trstrm.cpp 22 | # Trtrmm.cpp 23 | # TwoSidedTrmm.cpp 24 | # TwoSidedTrsm.cpp 25 | ) 26 | 27 | # Add the subdirectories 28 | add_subdirectory(Gemm) 29 | #add_subdirectory(MultiShiftQuasiTrsm) 30 | #add_subdirectory(MultiShiftTrsm) 31 | #add_subdirectory(QuasiTrsm) 32 | #add_subdirectory(SafeMultiShiftTrsm) 33 | #add_subdirectory(Symm) 34 | #add_subdirectory(Syr2k) 35 | #add_subdirectory(Syrk) 36 | #add_subdirectory(Trdtrmm) 37 | #add_subdirectory(Trmm) 38 | #add_subdirectory(Trr2k) 39 | #add_subdirectory(Trrk) 40 | #add_subdirectory(Trsm) 41 | #add_subdirectory(Trstrm) 42 | #add_subdirectory(Trtrmm) 43 | #add_subdirectory(TwoSidedTrmm) 44 | #add_subdirectory(TwoSidedTrsm) 45 | 46 | if (HYDROGEN_HAVE_GPU AND HYDROGEN_HAVE_ALUMINUM) 47 | set_full_path(THIS_DIR_CATCH2_TESTS 48 | sync_info_pool_test.cpp 49 | ) 50 | endif () 51 | 52 | # Propagate the files up the tree 53 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 54 | set(CATCH2_TESTS "${CATCH2_TESTS}" "${THIS_DIR_CATCH2_TESTS}" PARENT_SCOPE) 55 | -------------------------------------------------------------------------------- /src/blas_like/level3/Gemm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | NN.hpp 4 | NT.hpp 5 | TN.hpp 6 | TT.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/blas_like/level3/MultiShiftQuasiTrsm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LLN.hpp 4 | LLT.hpp 5 | LUN.hpp 6 | LUT.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/blas_like/level3/MultiShiftTrsm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LUN.hpp 4 | LUT.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/blas_like/level3/QuasiTrsm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LLN.hpp 4 | LLT.hpp 5 | LUN.hpp 6 | LUT.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/blas_like/level3/SafeMultiShiftTrsm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LUN.hpp 4 | Overflow.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/blas_like/level3/SafeMultiShiftTrsm/Overflow.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | Copyright (c) 2015-2016, Tim Moon 6 | All rights reserved. 7 | 8 | This file is part of Elemental and is under the BSD 2-Clause License, 9 | which can be found in the LICENSE file in the root directory, or at 10 | http://opensource.org/licenses/BSD-2-Clause 11 | */ 12 | 13 | namespace El { 14 | namespace safemstrsm { 15 | 16 | /* Determine machine dependent parameters to control overflow 17 | * Note: LAPACK uses more complicated parameters to handle 18 | * issues that can happen on Cray machines. 19 | */ 20 | template 21 | pair OverflowParameters() 22 | { 23 | const Real underflow = limits::SafeMin(); 24 | const Real overflow = limits::Max(); 25 | const Real ulp = limits::Precision(); 26 | const Real smallNum = Max( underflow/ulp, Real(1)/(overflow*ulp) ); 27 | const Real bigNum = Real(1)/smallNum; 28 | return pair(smallNum,bigNum); 29 | } 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/blas_like/level3/Symm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LL.hpp 4 | LU.hpp 5 | RL.hpp 6 | RU.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/blas_like/level3/Syr2k/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LN.hpp 4 | LT.hpp 5 | UN.hpp 6 | UT.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/blas_like/level3/Syrk/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LN.hpp 4 | LT.hpp 5 | UN.hpp 6 | UT.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trdtrmm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LVar1.hpp 4 | UVar1.hpp 5 | Unblocked.hpp 6 | ) 7 | 8 | # Propagate the files up the tree 9 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 10 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trmm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LLN.hpp 4 | LLT.hpp 5 | LUN.hpp 6 | LUT.hpp 7 | RLN.hpp 8 | RLT.hpp 9 | RUN.hpp 10 | RUT.hpp 11 | ) 12 | 13 | # Propagate the files up the tree 14 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 15 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trr2k/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Local.hpp 4 | NNNN.hpp 5 | NNNT.hpp 6 | NNTN.hpp 7 | NNTT.hpp 8 | NTNN.hpp 9 | NTNT.hpp 10 | NTTN.hpp 11 | NTTT.hpp 12 | TNNN.hpp 13 | TNNT.hpp 14 | TNTN.hpp 15 | TNTT.hpp 16 | TTNN.hpp 17 | TTNT.hpp 18 | TTTN.hpp 19 | TTTT.hpp 20 | ) 21 | 22 | # Propagate the files up the tree 23 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 24 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trr2k/NTNN.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_TRR2K_NTNN_HPP 10 | #define EL_TRR2K_NTNN_HPP 11 | 12 | #include "./NNNT.hpp" 13 | 14 | namespace El { 15 | namespace trr2k { 16 | 17 | // E := alpha A B' + beta C D + E 18 | template 19 | void Trr2kNTNN 20 | ( UpperOrLower uplo, Orientation orientB, 21 | T alpha, const AbstractDistMatrix& A, const AbstractDistMatrix& B, 22 | T beta, const AbstractDistMatrix& C, const AbstractDistMatrix& D, 23 | AbstractDistMatrix& E ) 24 | { 25 | EL_DEBUG_CSE 26 | Trr2kNNNT( uplo, orientB, beta, C, D, alpha, A, B, E ); 27 | } 28 | 29 | } // namespace trr2k 30 | } // namespace El 31 | 32 | #endif // ifndef EL_TRR2K_NTNN_HPP 33 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trr2k/README.md: -------------------------------------------------------------------------------- 1 | ### `src/blas_like/Trr2k/` 2 | 3 | This folder contains the underlying implementations of rank-2k triangular 4 | updates. In particular, in addition to this file, it holds: 5 | 6 | - `Local.hpp`: all sequential implementations 7 | - `NNNN.hpp`: parallel normal/normal/normal/normal implementations 8 | - `NNNT.hpp`: parallel normal/normal/normal/transpose implementations 9 | - `NNTN.hpp`: parallel normal/normal/transpose/normal implementations 10 | - `NNTT.hpp`: etc. 11 | - `NTNN.hpp` 12 | - `NTNT.hpp` 13 | - `NTTN.hpp` 14 | - `NTTT.hpp` 15 | - `TNNN.hpp` 16 | - `TNNT.hpp` 17 | - `TNTN.hpp` 18 | - `TNTT.hpp` 19 | - `TTNN.hpp` 20 | - `TTNT.hpp` 21 | - `TTTN.hpp` 22 | - `TTTT.hpp` 23 | 24 | #### Notes 25 | 26 | There are currently two TODO items related to this folder: 27 | 28 | 1. Making the orientation options of LocalTrr2k more consistent with Trr2k 29 | 2. Implementing sequential versions of Trr2k 30 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trr2k/TNNN.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_TRR2K_TNNN_HPP 10 | #define EL_TRR2K_TNNN_HPP 11 | 12 | #include "./NNTN.hpp" 13 | 14 | namespace El { 15 | namespace trr2k { 16 | 17 | // E := alpha A' B + beta C D + E 18 | template 19 | void Trr2kTNNN 20 | ( UpperOrLower uplo, Orientation orientA, 21 | T alpha, const AbstractDistMatrix& A, const AbstractDistMatrix& B, 22 | T beta, const AbstractDistMatrix& C, const AbstractDistMatrix& D, 23 | AbstractDistMatrix& E ) 24 | { 25 | EL_DEBUG_CSE 26 | Trr2kNNTN( uplo, orientA, beta, C, D, alpha, A, B, E ); 27 | } 28 | 29 | } // namespace trr2k 30 | } // namespace El 31 | 32 | #endif // ifndef EL_TRR2K_TNNN_HPP 33 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trr2k/TNNT.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_TRR2K_TNNT_HPP 10 | #define EL_TRR2K_TNNT_HPP 11 | 12 | #include "./NTTN.hpp" 13 | 14 | namespace El { 15 | namespace trr2k { 16 | 17 | // E := alpha A' B + beta C D' + E 18 | template 19 | void Trr2kTNNT 20 | ( UpperOrLower uplo, Orientation orientA, Orientation orientD, 21 | T alpha, const AbstractDistMatrix& A, const AbstractDistMatrix& B, 22 | T beta, const AbstractDistMatrix& C, const AbstractDistMatrix& D, 23 | AbstractDistMatrix& E ) 24 | { 25 | EL_DEBUG_CSE 26 | Trr2kNTTN( uplo, orientD, orientA, beta, C, D, alpha, A, B, E ); 27 | } 28 | 29 | } // namespace trr2k 30 | } // namespace El 31 | 32 | #endif // ifndef EL_TRR2K_TNNT_HPP 33 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trr2k/TTNN.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_TRR2K_TTNN_HPP 10 | #define EL_TRR2K_TTNN_HPP 11 | 12 | #include "./NNTT.hpp" 13 | 14 | namespace El { 15 | namespace trr2k { 16 | 17 | // E := alpha A' B' + beta C D + E 18 | template 19 | void Trr2kTTNN 20 | ( UpperOrLower uplo, 21 | Orientation orientA, Orientation orientB, 22 | T alpha, const AbstractDistMatrix& A, const AbstractDistMatrix& B, 23 | T beta, const AbstractDistMatrix& C, const AbstractDistMatrix& D, 24 | AbstractDistMatrix& E ) 25 | { 26 | EL_DEBUG_CSE 27 | Trr2kNNTT( uplo, orientA, orientB, beta, C, D, alpha, A, B, E ); 28 | } 29 | 30 | } // namespace trr2k 31 | } // namespace El 32 | 33 | #endif // ifndef EL_TRR2K_TTNN_HPP 34 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trr2k/TTNT.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_TRR2K_TTNT_HPP 10 | #define EL_TRR2K_TTNT_HPP 11 | 12 | #include "./NTTT.hpp" 13 | 14 | namespace El { 15 | namespace trr2k { 16 | 17 | // E := alpha A' B' + beta C D' + E 18 | template 19 | void Trr2kTTNT 20 | ( UpperOrLower uplo, 21 | Orientation orientA, Orientation orientB, 22 | Orientation orientD, 23 | T alpha, const AbstractDistMatrix& A, const AbstractDistMatrix& B, 24 | T beta, const AbstractDistMatrix& C, const AbstractDistMatrix& D, 25 | AbstractDistMatrix& E ) 26 | { 27 | EL_DEBUG_CSE 28 | Trr2kNTTT( uplo, orientD, orientA, orientB, beta, C, D, alpha, A, B, E ); 29 | } 30 | 31 | } // namespace trr2k 32 | } // namespace El 33 | 34 | #endif // ifndef EL_TRR2K_TTNT_HPP 35 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trr2k/TTTN.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_TRR2K_TTTN_HPP 10 | #define EL_TRR2K_TTTN_HPP 11 | 12 | #include "./TNTT.hpp" 13 | 14 | namespace El { 15 | namespace trr2k { 16 | 17 | // E := alpha A' B' + beta C' D + E 18 | template 19 | void Trr2kTTTN 20 | ( UpperOrLower uplo, 21 | Orientation orientA, Orientation orientB, 22 | Orientation orientC, 23 | T alpha, const AbstractDistMatrix& A, const AbstractDistMatrix& B, 24 | T beta, const AbstractDistMatrix& C, const AbstractDistMatrix& D, 25 | AbstractDistMatrix& E ) 26 | { 27 | EL_DEBUG_CSE 28 | Trr2kTNTT( uplo, orientC, orientA, orientB, beta, C, D, alpha, A, B, E ); 29 | } 30 | 31 | } // namespace trr2k 32 | } // namespace El 33 | 34 | #endif // ifndef EL_TRR2K_TTTN_HPP 35 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trrk/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Local.hpp 4 | NN.hpp 5 | NT.hpp 6 | TN.hpp 7 | TT.hpp 8 | ) 9 | 10 | # Propagate the files up the tree 11 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trrk/README.md: -------------------------------------------------------------------------------- 1 | ### `src/blas_like/Trrk/` 2 | 3 | This folder contains the underlying implementations of rank-k triangular 4 | updates. In particular, in addition to this file, it holds: 5 | 6 | - `Local.hpp`: all sequential implementations 7 | - `NN.hpp`: parallel normal/normal implementations 8 | - `NT.hpp`: parallel normal/transposed implementations 9 | - `TN.hpp`: parallel transposed/normal implementations 10 | - `TT.hpp`: parallel transposed/transposed implementations 11 | 12 | #### Notes 13 | 14 | There is currently one TODO item related to this folder: 15 | 16 | 1. Making the orientation options of LocalTrrk more consistent with Trrk 17 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trsm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LLN.hpp 4 | LLT.hpp 5 | LUN.hpp 6 | LUT.hpp 7 | RLN.hpp 8 | RLT.hpp 9 | RUN.hpp 10 | RUT.hpp 11 | ) 12 | 13 | # Propagate the files up the tree 14 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 15 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trstrm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LLN.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /src/blas_like/level3/Trtrmm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LVar1.hpp 4 | UVar1.hpp 5 | Unblocked.hpp 6 | ) 7 | 8 | # Propagate the files up the tree 9 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 10 | -------------------------------------------------------------------------------- /src/blas_like/level3/TwoSidedTrmm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LVar1.hpp 4 | LVar2.hpp 5 | LVar4.hpp 6 | LVar5.hpp 7 | UVar1.hpp 8 | UVar2.hpp 9 | UVar4.hpp 10 | UVar5.hpp 11 | Unblocked.hpp 12 | ) 13 | 14 | # Propagate the files up the tree 15 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 16 | -------------------------------------------------------------------------------- /src/blas_like/level3/TwoSidedTrsm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LVar1.hpp 4 | LVar2.hpp 5 | LVar3.hpp 6 | LVar4.hpp 7 | LVar5.hpp 8 | UVar1.hpp 9 | UVar2.hpp 10 | UVar3.hpp 11 | UVar4.hpp 12 | UVar5.hpp 13 | Unblocked.hpp 14 | ) 15 | 16 | # Propagate the files up the tree 17 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 18 | -------------------------------------------------------------------------------- /src/control/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Lyapunov.cpp 4 | Riccati.cpp 5 | Sylvester.cpp 6 | ) 7 | 8 | # Propagate the files up the tree 9 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 10 | -------------------------------------------------------------------------------- /src/control/README.md: -------------------------------------------------------------------------------- 1 | ### `src/control/` 2 | 3 | A few matrix sign function based solvers for control theory: 4 | 5 | - `Lyapunov.hpp`: Solves A X + X A' = C for X when A has its eigenvalues 6 | in the open right-half plane 7 | - `Riccati.hpp`: Solves X K X - A' X - X A = L for X when K and L are 8 | Hermitian. 9 | - `Sylvester.hpp`: Solves A X + X B = C for X when A and B both have all of 10 | their eigenvalues in the open right-half plane 11 | 12 | #### TODO 13 | 14 | Implement algorithms from Benner, Quintana-Orti, and Quintana-Orti's 15 | "Solving Stable Sylvester Equations via Rational Iterative Schemes". 16 | -------------------------------------------------------------------------------- /src/core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | DistMap.cpp 4 | Element.cpp 5 | Grid.cpp 6 | Instantiate.cpp 7 | MemoryPool.cpp 8 | Profiling.cpp 9 | Serialize.cpp 10 | Timer.cpp 11 | callStack.cpp 12 | environment.cpp 13 | indent.cpp 14 | logging.cpp 15 | mpi_register.cpp 16 | random.cpp 17 | types.cpp 18 | ) 19 | 20 | # Add the subdirectories 21 | add_subdirectory(DistMatrix) 22 | add_subdirectory(FlamePart) 23 | add_subdirectory(imports) 24 | 25 | # Propagate the files up the tree 26 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 27 | -------------------------------------------------------------------------------- /src/core/DistMatrix/Block/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | CIRC_CIRC.cpp 4 | MC_MR.cpp 5 | MC_STAR.cpp 6 | MD_STAR.cpp 7 | MR_MC.cpp 8 | MR_STAR.cpp 9 | STAR_MC.cpp 10 | STAR_MD.cpp 11 | STAR_MR.cpp 12 | STAR_STAR.cpp 13 | STAR_VC.cpp 14 | STAR_VR.cpp 15 | VC_STAR.cpp 16 | VR_STAR.cpp 17 | setup.hpp 18 | ) 19 | 20 | # Propagate the files up the tree 21 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 22 | -------------------------------------------------------------------------------- /src/core/DistMatrix/Block/README.md: -------------------------------------------------------------------------------- 1 | ### `src/core/BlockDistMatrix/` 2 | 3 | This folder contains the source code for the various partial specializations of 4 | the `BlockDistMatrix` class; please see `include/El/core/BlockDistMatrix/` for 5 | the corresponding header-level prototypes and a detailed README explaining the 6 | various data distributions. 7 | -------------------------------------------------------------------------------- /src/core/DistMatrix/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | AbstractDistMatrix.cpp 4 | Block.cpp 5 | ElementMatrix.cpp 6 | ) 7 | 8 | # Add the subdirectories 9 | add_subdirectory(Block) 10 | add_subdirectory(ElementMatrix) 11 | 12 | # Propagate the files up the tree 13 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 14 | -------------------------------------------------------------------------------- /src/core/DistMatrix/ElementMatrix/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | CIRC_CIRC.cpp 4 | MC_MR.cpp 5 | MC_STAR.cpp 6 | MD_STAR.cpp 7 | MR_MC.cpp 8 | MR_STAR.cpp 9 | STAR_MC.cpp 10 | STAR_MD.cpp 11 | STAR_MR.cpp 12 | STAR_STAR.cpp 13 | STAR_VC.cpp 14 | STAR_VR.cpp 15 | VC_STAR.cpp 16 | VR_STAR.cpp 17 | setup.hpp 18 | ) 19 | 20 | # Propagate the files up the tree 21 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 22 | -------------------------------------------------------------------------------- /src/core/DistMatrix/ElementMatrix/README.md: -------------------------------------------------------------------------------- 1 | ### `src/core/DistMatrix/` 2 | 3 | This folder contains the source code for the various partial specializations of 4 | the `DistMatrix` class; please see `include/El/core/DistMatrix/` for the 5 | corresponding header-level prototypes and a detailed README explaining the 6 | various data distributions. 7 | -------------------------------------------------------------------------------- /src/core/FlamePart/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | # Merge.cpp 4 | Partition.cpp 5 | # Repartition.cpp 6 | # SlidePartition.cpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/core/Instantiate.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #define EL_INSTANTIATE_CORE 10 | #include 11 | -------------------------------------------------------------------------------- /src/core/Timer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | 11 | namespace El { 12 | 13 | Timer::Timer( const string& name ) 14 | : name_(name) 15 | { } 16 | 17 | void Timer::Start() 18 | { 19 | lastTime_ = Clock::now(); 20 | running_ = true; 21 | } 22 | 23 | double Timer::Stop() 24 | { 25 | EL_DEBUG_ONLY( 26 | if( !running_ ) 27 | LogicError("Tried to stop a timer before starting it."); 28 | ) 29 | lastPartialTime_ = Partial(); 30 | running_ = false; 31 | totalTime_ += lastPartialTime_; 32 | return lastPartialTime_; 33 | } 34 | 35 | void Timer::Reset( const string& name ) 36 | { 37 | name_ = name; 38 | running_ = false; 39 | totalTime_ = 0; 40 | lastPartialTime_ = 0; 41 | } 42 | 43 | const string& Timer::Name() const { return name_; } 44 | 45 | double Timer::Partial() const 46 | { 47 | if( running_ ) 48 | { 49 | auto now = Clock::now(); 50 | auto timeSpan = duration_cast>(now-lastTime_); 51 | return timeSpan.count(); 52 | } 53 | else 54 | return lastPartialTime_; 55 | } 56 | 57 | double Timer::Total() const 58 | { 59 | if( running_ ) 60 | return totalTime_ + Partial(); 61 | else 62 | return totalTime_; 63 | } 64 | 65 | } // namespace El 66 | -------------------------------------------------------------------------------- /src/core/imports/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | blas.cpp 4 | flame.cpp 5 | lapack.cpp 6 | mkl.cpp 7 | mpfr.cpp 8 | mpi.cpp 9 | openblas.cpp 10 | qd.cpp 11 | qt5.cpp 12 | scalapack.cpp 13 | ) 14 | 15 | if (HYDROGEN_HAVE_CUB) 16 | set_full_path(CUB_SOURCES cub.cpp) 17 | list(APPEND THIS_DIR_SOURCES ${CUB_SOURCES}) 18 | endif() 19 | 20 | # Add the subdirectories 21 | add_subdirectory(blas) 22 | if (HYDROGEN_HAVE_LAPACK) 23 | add_subdirectory(lapack) 24 | endif () 25 | add_subdirectory(mpfr) 26 | add_subdirectory(scalapack) 27 | 28 | # Propagate the files up the tree 29 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 30 | -------------------------------------------------------------------------------- /src/core/imports/blas.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | 11 | using El::BlasInt; 12 | using El::scomplex; 13 | using El::dcomplex; 14 | 15 | // Level 1 16 | #include "./blas/Axpy.hpp" 17 | #include "./blas/Copy.hpp" 18 | #include "./blas/Dot.hpp" 19 | #include "./blas/MaxInd.hpp" 20 | #include "./blas/Nrm.hpp" 21 | #include "./blas/Rot.hpp" 22 | #include "./blas/Scal.hpp" 23 | #include "./blas/Swap.hpp" 24 | 25 | // Level 2 26 | #include "./blas/Gemv.hpp" 27 | #include "./blas/Ger.hpp" 28 | #include "./blas/Symv.hpp" 29 | #include "./blas/Syr.hpp" 30 | #include "./blas/Syr2.hpp" 31 | #include "./blas/Trmv.hpp" 32 | #include "./blas/Trsv.hpp" 33 | 34 | // Level 3 35 | #include "./blas/Gemm.hpp" 36 | #include "./blas/Symm.hpp" 37 | #include "./blas/Syrk.hpp" 38 | #include "./blas/Syr2k.hpp" 39 | #include "./blas/Trmm.hpp" 40 | #include "./blas/Trsm.hpp" 41 | -------------------------------------------------------------------------------- /src/core/imports/blas/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Axpy.hpp 4 | Copy.hpp 5 | Dot.hpp 6 | Gemm.hpp 7 | Gemv.hpp 8 | Ger.hpp 9 | MaxInd.hpp 10 | Nrm.hpp 11 | Rot.hpp 12 | Scal.hpp 13 | Swap.hpp 14 | Symm.hpp 15 | Symv.hpp 16 | Syr.hpp 17 | Syr2.hpp 18 | Syr2k.hpp 19 | Syrk.hpp 20 | Trmm.hpp 21 | Trmv.hpp 22 | Trsm.hpp 23 | Trsv.hpp 24 | ) 25 | 26 | # Propagate the files up the tree 27 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 28 | -------------------------------------------------------------------------------- /src/core/imports/lapack/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Schur.hpp 4 | TriangEig.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/core/imports/mpfr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | BigFloat.cpp 4 | BigInt.cpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/core/imports/mpi_collectives.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | Copyright (c) 2013, Jeff Hammond 6 | All rights reserved. 7 | 8 | Copyright (c) 2013, Jed Brown 9 | All rights reserved. 10 | 11 | This file is part of Elemental and is under the BSD 2-Clause License, 12 | which can be found in the LICENSE file in the root directory, or at 13 | http://opensource.org/licenses/BSD-2-Clause 14 | */ 15 | #include 16 | #include "mpi_utils.hpp" 17 | 18 | #include 19 | 20 | namespace El 21 | { 22 | 23 | #ifdef HYDROGEN_HAVE_ALUMINUM 24 | Al::ReductionOperator MPI_Op2ReductionOperator(MPI_Op op) 25 | { 26 | if (op == MPI_SUM) 27 | return Al::ReductionOperator::sum; 28 | else if (op == MPI_PROD) 29 | return Al::ReductionOperator::prod; 30 | else if (op == MPI_MIN) 31 | return Al::ReductionOperator::min; 32 | else if (op == MPI_MAX) 33 | return Al::ReductionOperator::max; 34 | else 35 | LogicError("Given reduction operator not supported."); 36 | 37 | // Silence compiler warning 38 | return Al::ReductionOperator::sum; 39 | } 40 | #endif // HYDROGEN_HAVE_ALUMINUM 41 | 42 | } // namespace El 43 | 44 | #include "mpi/AllGather.hpp" 45 | #include "mpi/AllReduce.hpp" 46 | #include "mpi/AllToAll.hpp" 47 | #include "mpi/Broadcast.hpp" 48 | #include "mpi/Gather.hpp" 49 | #include "mpi/Reduce.hpp" 50 | #include "mpi/ReduceScatter.hpp" 51 | #include "mpi/Scatter.hpp" 52 | #include "mpi/SendRecv.hpp" 53 | -------------------------------------------------------------------------------- /src/core/imports/scalapack/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | blacs.cpp 4 | pblas.cpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/core/indent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | 11 | namespace { 12 | 13 | El::Int indentLevel=0; 14 | El::Int spacesPerIndent=2; 15 | 16 | } 17 | 18 | namespace El { 19 | 20 | Int PushIndent() { return ::indentLevel++; } 21 | Int PopIndent() { return ::indentLevel--; } 22 | void SetIndent( Int indent ) { ::indentLevel = indent; } 23 | void ClearIndent() { ::indentLevel = 0; } 24 | Int IndentLevel() { return ::indentLevel; } 25 | 26 | string Indent() 27 | { 28 | string ind; 29 | for( Int i=0; i < ::spacesPerIndent * ::indentLevel; ++i ) 30 | ind = ind + " "; 31 | return ind; 32 | } 33 | 34 | } // namespace El 35 | -------------------------------------------------------------------------------- /src/core/logging.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | 12 | namespace { 13 | 14 | // A (per-process) output file for logging 15 | std::ofstream logFile; 16 | 17 | } 18 | 19 | namespace El { 20 | 21 | void OpenLog( const char* filename ) 22 | { 23 | if( ::logFile.is_open() ) 24 | CloseLog(); 25 | ::logFile.open( filename ); 26 | } 27 | 28 | std::ostream& LogOS() 29 | { 30 | if( !::logFile.is_open() ) 31 | { 32 | std::ostringstream fileOS; 33 | fileOS << "El-Proc" << std::setfill('0') << std::setw(3) 34 | << mpi::Rank() << ".log"; 35 | ::logFile.open( fileOS.str().c_str() ); 36 | } 37 | return ::logFile; 38 | } 39 | 40 | void CloseLog() { ::logFile.close(); } 41 | 42 | } // namespace El 43 | -------------------------------------------------------------------------------- /src/hydrogen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(blas) 2 | add_subdirectory(device) 3 | 4 | set(SOURCES "${SOURCES}" PARENT_SCOPE) 5 | if (HYDROGEN_HAVE_GPU) 6 | set(GPU_SOURCES "${GPU_SOURCES}" PARENT_SCOPE) 7 | endif () 8 | 9 | set_full_path(THIS_DIR_CXX_SOURCES 10 | Error.cpp) 11 | 12 | set(SOURCES "${SOURCES}" "${THIS_DIR_CXX_SOURCES}" PARENT_SCOPE) 13 | -------------------------------------------------------------------------------- /src/hydrogen/Error.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace hydrogen 4 | { 5 | namespace 6 | { 7 | volatile size_t break_on_me_called_ = 0UL; 8 | } 9 | 10 | void break_on_me() 11 | { 12 | break_on_me_called_ += 1UL; 13 | } 14 | 15 | }// namespace hydrogen 16 | -------------------------------------------------------------------------------- /src/hydrogen/blas/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (HYDROGEN_HAVE_GPU) 2 | add_subdirectory(gpu) 3 | 4 | set(GPU_SOURCES "${GPU_SOURCES}" PARENT_SCOPE) 5 | endif () 6 | -------------------------------------------------------------------------------- /src/hydrogen/blas/gpu/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set_full_path(THIS_DIR_GPU_SOURCES 2 | Axpy.cu 3 | Copy.cu 4 | Fill.cu 5 | Hadamard.cu 6 | Scale.cu 7 | Transpose.cu 8 | ) 9 | 10 | # Propagate the files up the tree 11 | set(GPU_SOURCES "${GPU_SOURCES}" "${THIS_DIR_GPU_SOURCES}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /src/hydrogen/device/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (HYDROGEN_HAVE_GPU) 2 | if (HYDROGEN_HAVE_CUDA) 3 | set_full_path(THIS_DIR_CXX_SOURCES 4 | CUDA.cpp 5 | cuBLAS.cpp 6 | cuBLAS_API.cpp 7 | cuSOLVER.cpp 8 | cuSOLVER_API.cpp 9 | GPU.cpp) 10 | endif () 11 | if (HYDROGEN_HAVE_ROCM) 12 | set_full_path(THIS_DIR_CXX_SOURCES 13 | GPU.cpp 14 | ROCm.cpp 15 | rocBLAS.cpp 16 | rocBLAS_API.cpp 17 | rocSOLVER.cpp 18 | rocSOLVER_API.cpp 19 | ) 20 | endif () 21 | 22 | set(SOURCES "${SOURCES}" "${THIS_DIR_CXX_SOURCES}" PARENT_SCOPE) 23 | endif () 24 | -------------------------------------------------------------------------------- /src/hydrogen/device/rocSOLVER.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace hydrogen 4 | { 5 | namespace rocsolver 6 | { 7 | namespace // 8 | { 9 | bool rocsolver_is_initialized_ = false; 10 | }// namespace 11 | 12 | rocblas_handle GetDenseLibraryHandle() noexcept 13 | { 14 | return rocblas::GetLibraryHandle(); 15 | } 16 | 17 | bool IsDenseInitialized() noexcept 18 | { 19 | return rocsolver_is_initialized_; 20 | } 21 | 22 | void InitializeDense(rocblas_handle handle) 23 | { 24 | rocblas::Initialize(handle); 25 | rocsolver_is_initialized_ = true; 26 | } 27 | 28 | void FinalizeDense() 29 | { 30 | rocblas::Finalize(); 31 | rocsolver_is_initialized_ = false; 32 | } 33 | 34 | void ReplaceDenseLibraryHandle(rocblas_handle handle) 35 | { 36 | rocblas::ReplaceLibraryHandle(handle); 37 | } 38 | 39 | }// namespace rocsolver 40 | }// namespace hydrogen 41 | -------------------------------------------------------------------------------- /src/io.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | 11 | namespace { 12 | using namespace El; 13 | 14 | ColorMap colorMap=RED_BLACK_GREEN; 15 | Int numDiscreteColors = 15; 16 | 17 | } 18 | 19 | namespace El { 20 | 21 | void SetColorMap( ColorMap map ) 22 | { ::colorMap = map; } 23 | 24 | ColorMap GetColorMap() 25 | { return ::colorMap; } 26 | 27 | void SetNumDiscreteColors( Int numChunks ) 28 | { ::numDiscreteColors = numChunks; } 29 | 30 | Int NumDiscreteColors() 31 | { return ::numDiscreteColors; } 32 | 33 | } // namespace El 34 | -------------------------------------------------------------------------------- /src/io/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | ColorMap.cpp 4 | ComplexDisplayWindow.cpp 5 | Display.cpp 6 | DisplayWidget.cpp 7 | DisplayWindow.cpp 8 | File.cpp 9 | Print.cpp 10 | Read.cpp 11 | Spy.cpp 12 | SpyWidget.cpp 13 | SpyWindow.cpp 14 | Write.cpp 15 | ) 16 | 17 | # Add the subdirectories 18 | add_subdirectory(Read) 19 | add_subdirectory(Write) 20 | 21 | # Propagate the files up the tree 22 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 23 | -------------------------------------------------------------------------------- /src/io/Read/AsciiMatlab.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_READ_ASCIIMATLAB_HPP 10 | #define EL_READ_ASCIIMATLAB_HPP 11 | 12 | namespace El { 13 | namespace read { 14 | 15 | template 16 | inline void 17 | AsciiMatlab( Matrix& A, const string filename ) 18 | { 19 | EL_DEBUG_CSE 20 | std::ifstream file( filename.c_str() ); 21 | if( !file.is_open() ) 22 | RuntimeError("Could not open ",filename); 23 | LogicError("Not yet written"); 24 | } 25 | 26 | template 27 | inline void 28 | AsciiMatlab( AbstractDistMatrix& A, const string filename ) 29 | { 30 | EL_DEBUG_CSE 31 | std::ifstream file( filename.c_str() ); 32 | if( !file.is_open() ) 33 | RuntimeError("Could not open ",filename); 34 | LogicError("Not yet written"); 35 | } 36 | 37 | } // namespace read 38 | } // namespace El 39 | 40 | #endif // ifndef EL_READ_ASCIIMATLAB_HPP 41 | -------------------------------------------------------------------------------- /src/io/Read/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Ascii.hpp 4 | AsciiMatlab.hpp 5 | Binary.hpp 6 | BinaryFlat.hpp 7 | MatrixMarket.hpp 8 | ) 9 | 10 | # Propagate the files up the tree 11 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /src/io/SpyWindow.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include "El/io/SpyWindow.hpp" 11 | 12 | #ifdef EL_HAVE_QT5 13 | 14 | #include 15 | 16 | namespace El { 17 | 18 | SpyWindow::SpyWindow( QWidget* parent ) 19 | : QWidget(parent) 20 | { 21 | EL_DEBUG_CSE 22 | matrix_ = 0; 23 | 24 | // For the real matrix 25 | QHBoxLayout* matrixLayout = new QHBoxLayout(); 26 | spy_ = new SpyWidget(); 27 | scroll_ = new QScrollArea(); 28 | scroll_->setWidget( spy_ ); 29 | matrixLayout->addWidget( scroll_ ); 30 | setLayout( matrixLayout ); 31 | 32 | setAttribute( Qt::WA_DeleteOnClose ); 33 | 34 | // Elemental needs to know if a window was opened for cleanup purposes 35 | OpenedWindow(); 36 | } 37 | 38 | SpyWindow::~SpyWindow() 39 | { delete matrix_; } 40 | 41 | void 42 | SpyWindow::Spy( const Matrix* matrix, QString title ) 43 | { 44 | EL_DEBUG_CSE 45 | if( matrix_ != 0 ) 46 | delete matrix_; 47 | matrix_ = matrix; 48 | 49 | setWindowTitle( title ); 50 | spy_->Spy( matrix ); 51 | } 52 | 53 | } // namespace El 54 | 55 | #endif // ifdef EL_HAVE_QT5 56 | -------------------------------------------------------------------------------- /src/io/Write/Ascii.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_WRITE_ASCII_HPP 10 | #define EL_WRITE_ASCII_HPP 11 | 12 | namespace El { 13 | namespace write { 14 | 15 | template 16 | inline void 17 | Ascii( const Matrix& A, string basename="matrix", string title="" ) 18 | { 19 | EL_DEBUG_CSE 20 | string filename = basename + "." + FileExtension(ASCII); 21 | ofstream file( filename.c_str() ); 22 | if( !file.is_open() ) 23 | RuntimeError("Could not open ",filename); 24 | 25 | file.setf( std::ios::scientific ); 26 | Print( A, title, file ); 27 | } 28 | 29 | } // namespace write 30 | } // namespace El 31 | 32 | #endif // ifndef EL_WRITE_ASCII_HPP 33 | -------------------------------------------------------------------------------- /src/io/Write/AsciiMatlab.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_WRITE_ASCIIMATLAB_HPP 10 | #define EL_WRITE_ASCIIMATLAB_HPP 11 | 12 | namespace El { 13 | namespace write { 14 | 15 | template 16 | inline void 17 | AsciiMatlab 18 | ( const Matrix& A, string basename="matrix", string title="matrix" ) 19 | { 20 | EL_DEBUG_CSE 21 | // Empty titles are not legal 22 | if( title == "" ) 23 | title = "matrix"; 24 | 25 | string filename = basename + "." + FileExtension(ASCII_MATLAB); 26 | ofstream file( filename.c_str() ); 27 | if( !file.is_open() ) 28 | RuntimeError("Could not open ",filename); 29 | 30 | file.setf( std::ios::scientific ); 31 | file << title << " = [\n"; 32 | Print( A, "", file ); 33 | file << "];\n"; 34 | } 35 | 36 | } // namespace write 37 | } // namespace El 38 | 39 | #endif // ifndef EL_WRITE_ASCIIMATLAB_HPP 40 | -------------------------------------------------------------------------------- /src/io/Write/Binary.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_WRITE_BINARY_HPP 10 | #define EL_WRITE_BINARY_HPP 11 | 12 | namespace El { 13 | namespace write { 14 | 15 | template 16 | inline void 17 | Binary( const Matrix& A, string basename="matrix" ) 18 | { 19 | EL_DEBUG_CSE 20 | 21 | string filename = basename + "." + FileExtension(BINARY); 22 | ofstream file( filename.c_str(), std::ios::binary ); 23 | if( !file.is_open() ) 24 | RuntimeError("Could not open ",filename); 25 | 26 | Int n; 27 | n = A.Height(); 28 | file.write( (char*)&n, sizeof(Int) ); 29 | n = A.Width(); 30 | file.write( (char*)&n, sizeof(Int) ); 31 | if( A.Height() == A.LDim() ) 32 | file.write( (char*)A.LockedBuffer(), A.Height()*A.Width()*sizeof(T) ); 33 | else 34 | for( Int j=0; j 16 | inline void 17 | BinaryFlat( const Matrix& A, string basename="matrix" ) 18 | { 19 | EL_DEBUG_CSE 20 | 21 | string filename = basename + "." + FileExtension(BINARY_FLAT); 22 | ofstream file( filename.c_str(), std::ios::binary ); 23 | if( !file.is_open() ) 24 | RuntimeError("Could not open ",filename); 25 | 26 | if( A.Height() == A.LDim() ) 27 | file.write( (char*)A.LockedBuffer(), A.Height()*A.Width()*sizeof(T) ); 28 | else 29 | for( Int j=0; j 16 | void FormQ 17 | ( UpperOrLower uplo, 18 | const Matrix& A, 19 | const Matrix& householderScalars, 20 | Matrix& Q ) 21 | { 22 | EL_DEBUG_CSE 23 | // TODO: Make this smarter 24 | const Int n = A.Height(); 25 | Identity( Q, n, n ); 26 | ApplyQ( LEFT, uplo, NORMAL, A, householderScalars, Q ); 27 | } 28 | 29 | template 30 | void FormQ 31 | ( UpperOrLower uplo, 32 | const AbstractDistMatrix& A, 33 | const AbstractDistMatrix& householderScalars, 34 | AbstractDistMatrix& Q ) 35 | { 36 | EL_DEBUG_CSE 37 | // TODO: Make this smarter 38 | const Int n = A.Height(); 39 | Identity( Q, n, n ); 40 | ApplyQ( LEFT, uplo, NORMAL, A, householderScalars, Q ); 41 | } 42 | 43 | } // namespace hessenberg 44 | } // namespace El 45 | 46 | #endif // ifndef EL_HESSENBERG_FORMQ_HPP 47 | -------------------------------------------------------------------------------- /src/lapack_like/equilibrate/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | GeomEquil.cpp 4 | RuizEquil.cpp 5 | SymmetricDiagonalEquil.cpp 6 | SymmetricGeomEquil.cpp 7 | SymmetricRuizEquil.cpp 8 | Util.hpp 9 | ) 10 | 11 | # Propagate the files up the tree 12 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 13 | -------------------------------------------------------------------------------- /src/lapack_like/euclidean_min/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | GLM.cpp 4 | LSE.cpp 5 | LeastSquares.cpp 6 | Ridge.cpp 7 | Tikhonov.cpp 8 | ) 9 | 10 | # Propagate the files up the tree 11 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /src/lapack_like/factor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Cholesky.cpp 4 | # GQR.cpp 5 | # GRQ.cpp 6 | # ID.cpp 7 | # LDL.cpp 8 | # LQ.cpp 9 | # LU.cpp 10 | QR.cpp 11 | # RQ.cpp 12 | # Skeleton.cpp 13 | ) 14 | 15 | # Add the subdirectories 16 | add_subdirectory(Cholesky) 17 | #add_subdirectory(LDL) 18 | #add_subdirectory(LQ) 19 | #add_subdirectory(LU) 20 | add_subdirectory(QR) 21 | #add_subdirectory(RQ) 22 | #add_subdirectory(RegularizedLDL) 23 | 24 | # Propagate the files up the tree 25 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 26 | -------------------------------------------------------------------------------- /src/lapack_like/factor/Cholesky/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LowerMod.hpp 4 | LowerVariant2.hpp 5 | LowerVariant3.hpp 6 | PivotedLowerVariant3.hpp 7 | PivotedUpperVariant3.hpp 8 | ReverseLowerVariant3.hpp 9 | ReverseUpperVariant3.hpp 10 | SolveAfter.hpp 11 | UpperMod.hpp 12 | UpperVariant2.hpp 13 | UpperVariant3.hpp 14 | ) 15 | 16 | # Propagate the files up the tree 17 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 18 | -------------------------------------------------------------------------------- /src/lapack_like/factor/LDL/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the subdirectories 2 | add_subdirectory(dense) 3 | add_subdirectory(sparse) 4 | 5 | # Propagate the files up the tree 6 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 7 | -------------------------------------------------------------------------------- /src/lapack_like/factor/LDL/dense/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Inertia.hpp 4 | MultiplyAfter.hpp 5 | Pivoted.hpp 6 | SolveAfter.hpp 7 | Var3.hpp 8 | ) 9 | 10 | # Add the subdirectories 11 | add_subdirectory(Pivoted) 12 | 13 | # Propagate the files up the tree 14 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 15 | -------------------------------------------------------------------------------- /src/lapack_like/factor/LDL/dense/Pivoted/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Blocked.hpp 4 | BunchKaufmanA.hpp 5 | BunchKaufmanD.hpp 6 | BunchParlett.hpp 7 | Panel.hpp 8 | Unblocked.hpp 9 | ) 10 | 11 | # Propagate the files up the tree 12 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 13 | -------------------------------------------------------------------------------- /src/lapack_like/factor/LDL/sparse/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the subdirectories 2 | add_subdirectory(numeric) 3 | add_subdirectory(symbolic) 4 | 5 | # Propagate the files up the tree 6 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 7 | -------------------------------------------------------------------------------- /src/lapack_like/factor/LDL/sparse/numeric/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | ChangeFrontType.cpp 4 | DiagonalScale.cpp 5 | DiagonalSolve.cpp 6 | DistFront.cpp 7 | DistMatrixNode.cpp 8 | DistMultiVecNode.cpp 9 | DistSparseLDLFactorization.cpp 10 | Front.cpp 11 | FrontType.cpp 12 | MatrixNode.cpp 13 | SparseLDLFactorization.cpp 14 | Process.hpp 15 | ProcessFront.hpp 16 | ) 17 | 18 | # Add the subdirectories 19 | add_subdirectory(LowerMultiply) 20 | add_subdirectory(LowerSolve) 21 | 22 | # Propagate the files up the tree 23 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 24 | -------------------------------------------------------------------------------- /src/lapack_like/factor/LDL/sparse/numeric/LowerMultiply/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Backward.hpp 4 | Forward.hpp 5 | FrontBackward.hpp 6 | FrontForward.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/lapack_like/factor/LDL/sparse/numeric/LowerSolve/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Backward.hpp 4 | Forward.hpp 5 | FrontBackward.hpp 6 | FrontForward.hpp 7 | FrontUtil.hpp 8 | ) 9 | 10 | # Propagate the files up the tree 11 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /src/lapack_like/factor/LDL/sparse/symbolic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Analysis.cpp 4 | NaturalNestedDissection.cpp 5 | NestedDissection.cpp 6 | NodeInfo.cpp 7 | Separator.cpp 8 | ) 9 | 10 | # Propagate the files up the tree 11 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /src/lapack_like/factor/LQ/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | ApplyQ.hpp 4 | Explicit.hpp 5 | Householder.hpp 6 | PanelHouseholder.hpp 7 | SolveAfter.hpp 8 | ) 9 | 10 | # Propagate the files up the tree 11 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /src/lapack_like/factor/LU/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Full.hpp 4 | Local.hpp 5 | Mod.hpp 6 | Panel.hpp 7 | SolveAfter.hpp 8 | ) 9 | 10 | # Propagate the files up the tree 11 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /src/lapack_like/factor/QR/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | ApplyQ.hpp 4 | BusingerGolub.hpp 5 | Cholesky.hpp 6 | ColSwap.hpp 7 | Explicit.hpp 8 | Householder.hpp 9 | PanelHouseholder.hpp 10 | SolveAfter.hpp 11 | TS.hpp 12 | ) 13 | 14 | # Propagate the files up the tree 15 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 16 | -------------------------------------------------------------------------------- /src/lapack_like/factor/RQ/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | ApplyQ.hpp 4 | Cholesky.hpp 5 | Explicit.hpp 6 | Householder.hpp 7 | PanelHouseholder.hpp 8 | SolveAfter.hpp 9 | ) 10 | 11 | # Propagate the files up the tree 12 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 13 | -------------------------------------------------------------------------------- /src/lapack_like/factor/RQ/Explicit.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_RQ_EXPLICIT_HPP 10 | #define EL_RQ_EXPLICIT_HPP 11 | 12 | namespace El { 13 | namespace rq { 14 | 15 | template 16 | void ExplicitTriang( Matrix& A ) 17 | { 18 | EL_DEBUG_CSE 19 | Matrix t; 20 | Matrix> d; 21 | Householder( A, t, d ); 22 | MakeTrapezoidal( UPPER, A, A.Width()-A.Height() ); 23 | } 24 | 25 | template 26 | void ExplicitTriang( AbstractDistMatrix& A ) 27 | { 28 | EL_DEBUG_CSE 29 | DistMatrix householderScalars(A.Grid()); 30 | DistMatrix,MD,STAR> signature(A.Grid()); 31 | Householder( A, householderScalars, signature ); 32 | MakeTrapezoidal( UPPER, A, A.Width()-A.Height() ); 33 | } 34 | 35 | // TODO: ExplicitUnitary 36 | 37 | // TODO: Explicit 38 | 39 | } // namespace rq 40 | } // namespace El 41 | 42 | #endif // ifndef EL_RQ_EXPLICIT_HPP 43 | -------------------------------------------------------------------------------- /src/lapack_like/factor/RegularizedLDL/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | SolveAfter.cpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /src/lapack_like/funcs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | HermitianFunction.cpp 4 | Pseudoinverse.cpp 5 | Sign.cpp 6 | SquareRoot.cpp 7 | ) 8 | 9 | # Add the subdirectories 10 | add_subdirectory(Inverse) 11 | 12 | # Propagate the files up the tree 13 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 14 | -------------------------------------------------------------------------------- /src/lapack_like/funcs/Inverse/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | General.cpp 4 | HPD.cpp 5 | Hermitian.cpp 6 | Symmetric.cpp 7 | Triangular.cpp 8 | ) 9 | 10 | # Add the subdirectories 11 | add_subdirectory(General) 12 | add_subdirectory(HPD) 13 | add_subdirectory(Triangular) 14 | 15 | # Propagate the files up the tree 16 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 17 | -------------------------------------------------------------------------------- /src/lapack_like/funcs/Inverse/General.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | 11 | #include "./General/LUPartialPiv.hpp" 12 | 13 | namespace El { 14 | 15 | template 16 | void Inverse( Matrix& A ) 17 | { 18 | EL_DEBUG_CSE 19 | inverse::LUPartialPiv( A ); 20 | } 21 | 22 | template 23 | void Inverse( AbstractDistMatrix& A ) 24 | { 25 | EL_DEBUG_CSE 26 | inverse::LUPartialPiv( A ); 27 | } 28 | 29 | template 30 | void LocalInverse( DistMatrix& A ) 31 | { 32 | EL_DEBUG_CSE 33 | Inverse( A.Matrix() ); 34 | } 35 | 36 | #define PROTO(Field) \ 37 | template void Inverse( Matrix& A ); \ 38 | template void Inverse( AbstractDistMatrix& A ); \ 39 | template void LocalInverse( DistMatrix& A ); \ 40 | template void inverse::AfterLUPartialPiv \ 41 | ( Matrix& A, const Permutation& P ); \ 42 | template void inverse::AfterLUPartialPiv \ 43 | ( AbstractDistMatrix& A, const DistPermutation& P ); 44 | 45 | #define EL_NO_INT_PROTO 46 | #define EL_ENABLE_DOUBLEDOUBLE 47 | #define EL_ENABLE_QUADDOUBLE 48 | #define EL_ENABLE_QUAD 49 | #define EL_ENABLE_BIGFLOAT 50 | #define EL_ENABLE_HALF 51 | #include 52 | 53 | } // namespace El 54 | -------------------------------------------------------------------------------- /src/lapack_like/funcs/Inverse/General/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LUPartialPiv.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /src/lapack_like/funcs/Inverse/HPD/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | CholeskyLVar2.hpp 4 | CholeskyUVar2.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/lapack_like/funcs/Inverse/Triangular/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LVar3.hpp 4 | UVar3.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/lapack_like/perm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | # DistPermutation.cpp 4 | Permutation.cpp 5 | # PermutationMeta.cpp 6 | # PivotsToPartialPermutation.cpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/lapack_like/props/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | #set_full_path(THIS_DIR_SOURCES 3 | # Condition.cpp 4 | # Determinant.cpp 5 | # Inertia.cpp 6 | # Norm.cpp 7 | # Trace.cpp 8 | # ) 9 | 10 | # Add the subdirectories 11 | #add_subdirectory(Condition) 12 | #add_subdirectory(Determinant) 13 | add_subdirectory(Norm) 14 | 15 | # Propagate the files up the tree 16 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 17 | -------------------------------------------------------------------------------- /src/lapack_like/props/Condition/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Frobenius.cpp 4 | Infinity.cpp 5 | Max.cpp 6 | One.cpp 7 | Two.cpp 8 | ) 9 | 10 | # Propagate the files up the tree 11 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /src/lapack_like/props/Determinant/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Cholesky.hpp 4 | LUPartialPiv.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/lapack_like/props/Norm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Entrywise.cpp 4 | Frobenius.cpp 5 | Infinity.cpp 6 | # KyFan.cpp 7 | # KyFanSchatten.cpp 8 | Max.cpp 9 | # Nuclear.cpp 10 | One.cpp 11 | # Schatten.cpp 12 | # Two.cpp 13 | # TwoEstimate.cpp 14 | # Zero.cpp 15 | ) 16 | 17 | # Propagate the files up the tree 18 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 19 | -------------------------------------------------------------------------------- /src/lapack_like/reflect/ApplyPacked/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LLHB.hpp 4 | LLHF.hpp 5 | LLVB.hpp 6 | LLVF.hpp 7 | LUHB.hpp 8 | LUHF.hpp 9 | LUVB.hpp 10 | LUVF.hpp 11 | RLHB.hpp 12 | RLHF.hpp 13 | RLVB.hpp 14 | RLVF.hpp 15 | RUHB.hpp 16 | RUHF.hpp 17 | RUVB.hpp 18 | RUVF.hpp 19 | Util.hpp 20 | ) 21 | 22 | # Propagate the files up the tree 23 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 24 | -------------------------------------------------------------------------------- /src/lapack_like/reflect/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | ApplyPacked.cpp 4 | ExpandPacked.cpp 5 | Householder.cpp 6 | # Hyperbolic.cpp 7 | ) 8 | 9 | # Add the subdirectories 10 | add_subdirectory(ApplyPacked) 11 | # add_subdirectory(ExpandPacked) 12 | # add_subdirectory(Householder) 13 | # add_subdirectory(Hyperbolic) 14 | 15 | # Propagate the files up the tree 16 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 17 | -------------------------------------------------------------------------------- /src/lapack_like/reflect/ExpandPacked/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | LV.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /src/lapack_like/reflect/Householder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Col.hpp 4 | Row.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/lapack_like/reflect/Hyperbolic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Col.hpp 4 | Row.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/lapack_like/solve/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | HPD.cpp 4 | Hermitian.cpp 5 | Linear.cpp 6 | MultiShiftHess.cpp 7 | SQSD.cpp 8 | Symmetric.cpp 9 | ) 10 | 11 | # Propagate the files up the tree 12 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 13 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/BidiagSVD/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | DivideAndConquer.hpp 4 | QR.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | # BidiagSVD.cpp 4 | CubicSecular.cpp 5 | # Eig.cpp 6 | HermitianEig.cpp 7 | # HermitianGenDefEig.cpp 8 | # HermitianSVD.cpp 9 | HermitianTridiagEig.cpp 10 | # HessenbergSchur.cpp 11 | # ImageAndKernel.cpp 12 | # Polar.cpp 13 | # Pseudospectra.cpp 14 | # SVD.cpp 15 | # Schur.cpp 16 | SecularEVD.cpp 17 | # SecularSVD.cpp 18 | # SkewHermitianEig.cpp 19 | # TriangEig.cpp 20 | ) 21 | 22 | # Add the subdirectories 23 | # add_subdirectory(BidiagSVD) 24 | add_subdirectory(HermitianEig) 25 | add_subdirectory(HermitianTridiagEig) 26 | # add_subdirectory(HessenbergSchur) 27 | # add_subdirectory(Polar) 28 | # add_subdirectory(Pseudospectra) 29 | # add_subdirectory(SVD) 30 | # add_subdirectory(Schur) 31 | add_subdirectory(SecularEVD) 32 | # add_subdirectory(SecularSVD) 33 | # add_subdirectory(TriangEig) 34 | 35 | # Propagate the files up the tree 36 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 37 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/HermitianEig/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | SDC.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/HermitianTridiagEig/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | DivideAndConquer.hpp 4 | QR.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/HessenbergSchur/AED/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | ModifyShifts.hpp 4 | Nibble.hpp 5 | SpikeDeflation.hpp 6 | UpdateDeflationSize.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/HessenbergSchur/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | AED.hpp 4 | MultiBulge.hpp 5 | Simple.hpp 6 | ) 7 | 8 | # Add the subdirectories 9 | add_subdirectory(AED) 10 | add_subdirectory(MultiBulge) 11 | add_subdirectory(Simple) 12 | add_subdirectory(Util) 13 | 14 | # Propagate the files up the tree 15 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 16 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/HessenbergSchur/MultiBulge/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | ComputeShifts.hpp 4 | PairShifts.hpp 5 | RedundantlyHandleWindow.hpp 6 | Sweep.hpp 7 | Transform.hpp 8 | TwoByTwo.hpp 9 | ) 10 | 11 | # Add the subdirectories 12 | add_subdirectory(Sweep) 13 | 14 | # Propagate the files up the tree 15 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 16 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/HessenbergSchur/MultiBulge/Sweep/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | ApplyReflector.hpp 4 | ApplyReflectors.hpp 5 | ComputeReflectors.hpp 6 | Dist.hpp 7 | IntroduceBulge.hpp 8 | VigilantDeflation.hpp 9 | ) 10 | 11 | # Add the subdirectories 12 | add_subdirectory(Dist) 13 | 14 | # Propagate the files up the tree 15 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 16 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/HessenbergSchur/MultiBulge/Sweep/Dist/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | InterBlockChase.hpp 4 | IntraBlockChase.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/HessenbergSchur/Simple.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_HESS_SCHUR_SIMPLE_HPP 10 | #define EL_HESS_SCHUR_SIMPLE_HPP 11 | 12 | #include "./Simple/SingleShift.hpp" 13 | #include "./Simple/DoubleShift.hpp" 14 | 15 | namespace El { 16 | namespace hess_schur { 17 | 18 | template 19 | HessenbergSchurInfo 20 | Simple 21 | ( Matrix& H, 22 | Matrix>& w, 23 | Matrix& Z, 24 | const HessenbergSchurCtrl& ctrl ) 25 | { return DoubleShift( H, w, Z, ctrl ); } 26 | 27 | template 28 | HessenbergSchurInfo 29 | Simple 30 | ( Matrix>& H, 31 | Matrix>& w, 32 | Matrix>& Z, 33 | const HessenbergSchurCtrl& ctrl ) 34 | { return SingleShift( H, w, Z, ctrl ); } 35 | 36 | } // namespace hess_schur 37 | } // namespace El 38 | 39 | #endif // ifndef EL_HESS_SCHUR_SIMPLE_HPP 40 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/HessenbergSchur/Simple/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | DoubleShift.hpp 4 | SingleShift.hpp 5 | ) 6 | 7 | # Add the subdirectories 8 | add_subdirectory(DoubleShift) 9 | add_subdirectory(SingleShift) 10 | 11 | # Propagate the files up the tree 12 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 13 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/HessenbergSchur/Simple/DoubleShift/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Sweep.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/HessenbergSchur/Simple/SingleShift/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Sweep.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/HessenbergSchur/Util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Gather.hpp 4 | MakeSubdiagonalReal.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/Polar/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | QDWH.hpp 4 | SVD.hpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/Pseudospectra/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Analytic.hpp 4 | HagerHigham.hpp 5 | IRA.hpp 6 | IRL.hpp 7 | Lanczos.hpp 8 | Power.hpp 9 | Util.hpp 10 | ) 11 | 12 | # Add the subdirectories 13 | add_subdirectory(Util) 14 | 15 | # Propagate the files up the tree 16 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 17 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/Pseudospectra/Util.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #ifndef EL_PSEUDOSPECTRA_UTIL_HPP 10 | #define EL_PSEUDOSPECTRA_UTIL_HPP 11 | 12 | #include "./Util/Rearrange.hpp" 13 | #include "./Util/BasicMath.hpp" 14 | #include "./Util/Snapshot.hpp" 15 | 16 | #endif // ifndef EL_PSEUDOSPECTRA_UTIL_HPP 17 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/Pseudospectra/Util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | BasicMath.hpp 4 | Rearrange.hpp 5 | Snapshot.hpp 6 | ) 7 | 8 | # Propagate the files up the tree 9 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 10 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/SVD/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Chan.hpp 4 | GolubReinsch.hpp 5 | Product.hpp 6 | Util.hpp 7 | ) 8 | 9 | # Propagate the files up the tree 10 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 11 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/Schur/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | CheckReal.hpp 4 | Condense.hpp 5 | InverseFreeSDC.hpp 6 | QuasiTriangEig.hpp 7 | RealToComplex.hpp 8 | SDC.hpp 9 | ) 10 | 11 | # Propagate the files up the tree 12 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 13 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/SecularEVD/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | TwoByTwo.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/SecularSVD/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | TwoByTwo.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /src/lapack_like/spectral/TriangEig/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | MultiShiftSolve.hpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /src/lapack_like/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | # Median.cpp 4 | Sort.cpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/matrices/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the subdirectories 2 | add_subdirectory(deterministic) 3 | add_subdirectory(random) 4 | 5 | # Propagate the files up the tree 6 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 7 | -------------------------------------------------------------------------------- /src/matrices/deterministic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the subdirectories 2 | add_subdirectory(classical) 3 | #add_subdirectory(integral) 4 | add_subdirectory(misc) 5 | #add_subdirectory(pde) 6 | #add_subdirectory(sparse_toeplitz) 7 | 8 | # Propagate the files up the tree 9 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 10 | -------------------------------------------------------------------------------- /src/matrices/deterministic/classical/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Cauchy.cpp 4 | CauchyLike.cpp 5 | Diagonal.cpp 6 | Egorov.cpp 7 | Fiedler.cpp 8 | Fourier.cpp 9 | GCDMatrix.cpp 10 | Hankel.cpp 11 | Hilbert.cpp 12 | Identity.cpp 13 | Jordan.cpp 14 | Ones.cpp 15 | Toeplitz.cpp 16 | Walsh.cpp 17 | Zeros.cpp 18 | ) 19 | 20 | # Propagate the files up the tree 21 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 22 | -------------------------------------------------------------------------------- /src/matrices/deterministic/classical/GCDMatrix.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | #include 12 | 13 | namespace El { 14 | 15 | template 16 | void GCDMatrix( Matrix& G, Int m, Int n ) 17 | { 18 | EL_DEBUG_CSE 19 | G.Resize( m, n ); 20 | auto gcdFill = []( Int i, Int j ) { return T(GCD(i+1,j+1)); }; 21 | IndexDependentFill( G, function(gcdFill) ); 22 | } 23 | 24 | template 25 | void GCDMatrix( AbstractDistMatrix& G, Int m, Int n ) 26 | { 27 | EL_DEBUG_CSE 28 | G.Resize( m, n ); 29 | auto gcdFill = []( Int i, Int j ) { return T(GCD(i+1,j+1)); }; 30 | IndexDependentFill( G, function(gcdFill) ); 31 | } 32 | 33 | #define PROTO(T) \ 34 | template void GCDMatrix( Matrix& G, Int m, Int n ); \ 35 | template void GCDMatrix( AbstractDistMatrix& G, Int m, Int n ); 36 | 37 | #define EL_ENABLE_DOUBLEDOUBLE 38 | #define EL_ENABLE_QUADDOUBLE 39 | #define EL_ENABLE_QUAD 40 | #define EL_ENABLE_BIGINT 41 | #define EL_ENABLE_BIGFLOAT 42 | #define EL_ENABLE_HALF 43 | #include 44 | 45 | } // namespace El 46 | -------------------------------------------------------------------------------- /src/matrices/deterministic/classical/Hilbert.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | #include 12 | 13 | namespace El { 14 | 15 | template 16 | void Hilbert( Matrix& A, Int n ) 17 | { 18 | EL_DEBUG_CSE 19 | A.Resize( n, n ); 20 | auto hilbertFill = []( Int i, Int j ) { return F(1)/F(i+j+1); }; 21 | IndexDependentFill( A, function(hilbertFill) ); 22 | } 23 | 24 | template 25 | void Hilbert( AbstractDistMatrix& A, Int n ) 26 | { 27 | EL_DEBUG_CSE 28 | A.Resize( n, n ); 29 | auto hilbertFill = []( Int i, Int j ) { return F(1)/F(i+j+1); }; 30 | IndexDependentFill( A, function(hilbertFill) ); 31 | } 32 | 33 | #define PROTO(F) \ 34 | template void Hilbert( Matrix& A, Int n ); \ 35 | template void Hilbert( AbstractDistMatrix& A, Int n ); 36 | 37 | #define EL_NO_INT_PROTO 38 | #define EL_ENABLE_DOUBLEDOUBLE 39 | #define EL_ENABLE_QUADDOUBLE 40 | #define EL_ENABLE_QUAD 41 | #define EL_ENABLE_BIGFLOAT 42 | #define EL_ENABLE_HALF 43 | #include 44 | 45 | } // namespace El 46 | -------------------------------------------------------------------------------- /src/matrices/deterministic/classical/Jordan.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | #include 12 | 13 | namespace El { 14 | 15 | template 16 | void Jordan( Matrix& J, Int n, T lambda ) 17 | { 18 | EL_DEBUG_CSE 19 | Zeros( J, n, n ); 20 | FillDiagonal( J, lambda ); 21 | FillDiagonal( J, T(1), 1 ); 22 | } 23 | 24 | template 25 | void Jordan( AbstractDistMatrix& J, Int n, T lambda ) 26 | { 27 | EL_DEBUG_CSE 28 | Zeros( J, n, n ); 29 | FillDiagonal( J, lambda ); 30 | FillDiagonal( J, T(1), 1 ); 31 | } 32 | 33 | #define PROTO(T) \ 34 | template void Jordan( Matrix& J, Int n, T lambda ); \ 35 | template void Jordan( AbstractDistMatrix& J, Int n, T lambda ); 36 | 37 | #define EL_ENABLE_DOUBLEDOUBLE 38 | #define EL_ENABLE_QUADDOUBLE 39 | #define EL_ENABLE_QUAD 40 | #define EL_ENABLE_BIGINT 41 | #define EL_ENABLE_BIGFLOAT 42 | #define EL_ENABLE_HALF 43 | #include 44 | 45 | } // namespace El 46 | -------------------------------------------------------------------------------- /src/matrices/deterministic/classical/Ones.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | #include 12 | 13 | namespace El { 14 | 15 | template 16 | void Ones( Matrix& A, Int m, Int n ) 17 | { 18 | EL_DEBUG_CSE 19 | A.Resize( m, n ); 20 | Fill( A, TypeTraits::One() ); 21 | } 22 | 23 | template 24 | void Ones( AbstractMatrix& A, Int m, Int n ) 25 | { 26 | EL_DEBUG_CSE 27 | A.Resize( m, n ); 28 | Fill( A, TypeTraits::One() ); 29 | } 30 | 31 | template 32 | void Ones( AbstractDistMatrix& A, Int m, Int n ) 33 | { 34 | EL_DEBUG_CSE 35 | A.Resize( m, n ); 36 | Fill( A, TypeTraits::One() ); 37 | } 38 | 39 | 40 | #define PROTO(T) \ 41 | template void Ones( Matrix& A, Int m, Int n ); \ 42 | template void Ones( AbstractMatrix& A, Int m, Int n ); \ 43 | template void Ones( AbstractDistMatrix& A, Int m, Int n ); 44 | 45 | #ifdef HYDROGEN_GPU_USE_FP16 46 | PROTO(gpu_half_type) 47 | #endif 48 | 49 | #define EL_ENABLE_DOUBLEDOUBLE 50 | #define EL_ENABLE_QUADDOUBLE 51 | #define EL_ENABLE_QUAD 52 | #define EL_ENABLE_BIGINT 53 | #define EL_ENABLE_BIGFLOAT 54 | #define EL_ENABLE_HALF 55 | #include 56 | 57 | } // namespace El 58 | -------------------------------------------------------------------------------- /src/matrices/deterministic/integral/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | FoxLi.cpp 4 | ) 5 | 6 | # Propagate the files up the tree 7 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /src/matrices/deterministic/misc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | # Demmel.cpp 4 | # DruinskyToledo.cpp 5 | # DynamicRegCounter.cpp 6 | # Ehrenfest.cpp 7 | # ExtendedKahan.cpp 8 | # GEPPGrowth.cpp 9 | # GKS.cpp 10 | # Gear.cpp 11 | # Hanowa.cpp 12 | # JordanCholesky.cpp 13 | # KMS.cpp 14 | # Kahan.cpp 15 | # Lauchli.cpp 16 | # Legendre.cpp 17 | # Lehmer.cpp 18 | # Lotkin.cpp 19 | # MinIJ.cpp 20 | # Parter.cpp 21 | # Pei.cpp 22 | # Redheffer.cpp 23 | # Riffle.cpp 24 | # Ris.cpp 25 | Wilkinson.cpp 26 | ) 27 | 28 | # Propagate the files up the tree 29 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 30 | -------------------------------------------------------------------------------- /src/matrices/deterministic/misc/Lotkin.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | 12 | namespace El { 13 | 14 | template 15 | void Lotkin( Matrix& A, Int n ) 16 | { 17 | EL_DEBUG_CSE 18 | Hilbert( A, n ); 19 | // Set first row to all ones 20 | for( Int j=0; j 25 | void Lotkin( AbstractDistMatrix& A, Int n ) 26 | { 27 | EL_DEBUG_CSE 28 | Hilbert( A, n ); 29 | // Set first row to all ones 30 | if( A.ColShift() == 0 ) 31 | { 32 | const Int localWidth = A.LocalWidth(); 33 | for( Int jLoc=0; jLoc& A, Int n ); \ 40 | template void Lotkin( AbstractDistMatrix& A, Int n ); 41 | 42 | #define EL_NO_INT_PROTO 43 | #define EL_ENABLE_DOUBLEDOUBLE 44 | #define EL_ENABLE_QUADDOUBLE 45 | #define EL_ENABLE_QUAD 46 | #define EL_ENABLE_BIGFLOAT 47 | #define EL_ENABLE_HALF 48 | #include 49 | 50 | } // namespace El 51 | -------------------------------------------------------------------------------- /src/matrices/deterministic/misc/MinIJ.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | #include 12 | 13 | namespace El { 14 | 15 | template 16 | void MinIJ( Matrix& M, Int n ) 17 | { 18 | EL_DEBUG_CSE 19 | M.Resize( n, n ); 20 | auto minIJFill = []( Int i, Int j ) { return T(Min(i+1,j+1)); }; 21 | IndexDependentFill( M, function(minIJFill) ); 22 | } 23 | 24 | template 25 | void MinIJ( AbstractDistMatrix& M, Int n ) 26 | { 27 | EL_DEBUG_CSE 28 | M.Resize( n, n ); 29 | auto minIJFill = []( Int i, Int j ) { return T(Min(i+1,j+1)); }; 30 | IndexDependentFill( M, function(minIJFill) ); 31 | } 32 | 33 | #define PROTO(T) \ 34 | template void MinIJ( Matrix& M, Int n ); \ 35 | template void MinIJ( AbstractDistMatrix& M, Int n ); 36 | 37 | #define EL_ENABLE_DOUBLEDOUBLE 38 | #define EL_ENABLE_QUADDOUBLE 39 | #define EL_ENABLE_QUAD 40 | #define EL_ENABLE_BIGINT 41 | #define EL_ENABLE_BIGFLOAT 42 | #define EL_ENABLE_HALF 43 | #include 44 | 45 | } // namespace El 46 | -------------------------------------------------------------------------------- /src/matrices/deterministic/misc/Parter.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | #include 12 | 13 | namespace El { 14 | 15 | template 16 | void Parter( Matrix& P, Int n ) 17 | { 18 | EL_DEBUG_CSE 19 | P.Resize( n, n ); 20 | const F oneHalf = F(1)/F(2); 21 | auto parterFill = [=]( Int i, Int j ) { return F(1)/(F(i)-F(j)+oneHalf); }; 22 | IndexDependentFill( P, function(parterFill) ); 23 | } 24 | 25 | template 26 | void Parter( AbstractDistMatrix& P, Int n ) 27 | { 28 | EL_DEBUG_CSE 29 | P.Resize( n, n ); 30 | const F oneHalf = F(1)/F(2); 31 | auto parterFill = [=]( Int i, Int j ) { return F(1)/(F(i)-F(j)+oneHalf); }; 32 | IndexDependentFill( P, function(parterFill) ); 33 | } 34 | 35 | #define PROTO(F) \ 36 | template void Parter( Matrix& P, Int n ); \ 37 | template void Parter( AbstractDistMatrix& P, Int n ); 38 | 39 | #define EL_NO_INT_PROTO 40 | #define EL_ENABLE_DOUBLEDOUBLE 41 | #define EL_ENABLE_QUADDOUBLE 42 | #define EL_ENABLE_QUAD 43 | #define EL_ENABLE_BIGFLOAT 44 | #define EL_ENABLE_HALF 45 | #include 46 | 47 | } // namespace El 48 | -------------------------------------------------------------------------------- /src/matrices/deterministic/misc/Pei.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | #include 12 | 13 | namespace El { 14 | 15 | template 16 | void Pei( Matrix& P, Int n, T alpha ) 17 | { 18 | EL_DEBUG_CSE 19 | Ones( P, n, n ); 20 | ShiftDiagonal( P, alpha ); 21 | } 22 | 23 | template 24 | void Pei( AbstractDistMatrix& P, Int n, T alpha ) 25 | { 26 | EL_DEBUG_CSE 27 | Ones( P, n, n ); 28 | ShiftDiagonal( P, alpha ); 29 | } 30 | 31 | #define PROTO(T) \ 32 | template void Pei( Matrix& P, Int n, T alpha ); \ 33 | template void Pei( AbstractDistMatrix& P, Int n, T alpha ); 34 | 35 | #define EL_ENABLE_DOUBLEDOUBLE 36 | #define EL_ENABLE_QUADDOUBLE 37 | #define EL_ENABLE_QUAD 38 | #define EL_ENABLE_BIGINT 39 | #define EL_ENABLE_BIGFLOAT 40 | #define EL_ENABLE_HALF 41 | #include 42 | 43 | } // namespace El 44 | -------------------------------------------------------------------------------- /src/matrices/deterministic/misc/Ris.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | #include 12 | 13 | namespace El { 14 | 15 | template 16 | void Ris( Matrix& R, Int n ) 17 | { 18 | EL_DEBUG_CSE 19 | R.Resize( n, n ); 20 | const F oneHalf = F(1)/F(2); 21 | auto risFill = [=]( Int i, Int j ) { return oneHalf/(F(n-i-j)-oneHalf); }; 22 | IndexDependentFill( R, function(risFill) ); 23 | } 24 | 25 | template 26 | void Ris( AbstractDistMatrix& R, Int n ) 27 | { 28 | EL_DEBUG_CSE 29 | R.Resize( n, n ); 30 | const F oneHalf = F(1)/F(2); 31 | auto risFill = [=]( Int i, Int j ) { return oneHalf/(F(n-i-j)-oneHalf); }; 32 | IndexDependentFill( R, function(risFill) ); 33 | } 34 | 35 | #define PROTO(F) \ 36 | template void Ris( Matrix& R, Int n ); \ 37 | template void Ris( AbstractDistMatrix& R, Int n ); 38 | 39 | #define EL_NO_INT_PROTO 40 | #define EL_ENABLE_DOUBLEDOUBLE 41 | #define EL_ENABLE_QUADDOUBLE 42 | #define EL_ENABLE_QUAD 43 | #define EL_ENABLE_BIGFLOAT 44 | #define EL_ENABLE_HALF 45 | #include 46 | 47 | } // namespace El 48 | -------------------------------------------------------------------------------- /src/matrices/deterministic/pde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Helmholtz.cpp 4 | HelmholtzPML.cpp 5 | Laplacian.cpp 6 | ) 7 | 8 | # Propagate the files up the tree 9 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 10 | -------------------------------------------------------------------------------- /src/matrices/deterministic/sparse_toeplitz/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | BullsHead.cpp 4 | Forsythe.cpp 5 | Grcar.cpp 6 | OneTwoOne.cpp 7 | TrefethenEmbree.cpp 8 | TriW.cpp 9 | Triangle.cpp 10 | Whale.cpp 11 | ) 12 | 13 | # Propagate the files up the tree 14 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 15 | -------------------------------------------------------------------------------- /src/matrices/deterministic/sparse_toeplitz/Forsythe.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | 12 | namespace El { 13 | 14 | template 15 | void Forsythe( Matrix& J, Int n, T alpha, T lambda ) 16 | { 17 | EL_DEBUG_CSE 18 | Jordan( J, n, lambda ); 19 | if( n > 0 ) 20 | J.Set( n-1, 0, alpha ); 21 | } 22 | 23 | template 24 | void Forsythe( AbstractDistMatrix& J, Int n, T alpha, T lambda ) 25 | { 26 | EL_DEBUG_CSE 27 | Jordan( J, n, lambda ); 28 | if( n > 0 ) 29 | J.Set( n-1, 0, alpha ); 30 | } 31 | 32 | #define PROTO(T) \ 33 | template void Forsythe( Matrix& J, Int n, T alpha, T lambda ); \ 34 | template void Forsythe \ 35 | ( AbstractDistMatrix& J, Int n, T alpha, T lambda ); 36 | 37 | #define EL_ENABLE_DOUBLEDOUBLE 38 | #define EL_ENABLE_QUADDOUBLE 39 | #define EL_ENABLE_QUAD 40 | #define EL_ENABLE_BIGINT 41 | #define EL_ENABLE_BIGFLOAT 42 | #define EL_ENABLE_HALF 43 | #include 44 | 45 | } // namespace El 46 | -------------------------------------------------------------------------------- /src/matrices/deterministic/sparse_toeplitz/OneTwoOne.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | #include 12 | 13 | namespace El { 14 | 15 | template 16 | void OneTwoOne( Matrix& A, Int n ) 17 | { 18 | EL_DEBUG_CSE 19 | Zeros( A, n, n ); 20 | FillDiagonal( A, T(1), -1 ); 21 | FillDiagonal( A, T(2), 0 ); 22 | FillDiagonal( A, T(1), 1 ); 23 | } 24 | 25 | template 26 | void OneTwoOne( AbstractDistMatrix& A, Int n ) 27 | { 28 | EL_DEBUG_CSE 29 | Zeros( A, n, n ); 30 | FillDiagonal( A, T(1), -1 ); 31 | FillDiagonal( A, T(2), 0 ); 32 | FillDiagonal( A, T(1), 1 ); 33 | } 34 | 35 | #define PROTO(T) \ 36 | template void OneTwoOne( Matrix& A, Int n ); \ 37 | template void OneTwoOne( AbstractDistMatrix& A, Int n ); 38 | 39 | #define EL_ENABLE_DOUBLEDOUBLE 40 | #define EL_ENABLE_QUADDOUBLE 41 | #define EL_ENABLE_QUAD 42 | #define EL_ENABLE_BIGINT 43 | #define EL_ENABLE_BIGFLOAT 44 | #define EL_ENABLE_HALF 45 | #include 46 | 47 | } // namespace El 48 | -------------------------------------------------------------------------------- /src/matrices/random/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the subdirectories 2 | add_subdirectory(independent) 3 | add_subdirectory(lattice) 4 | add_subdirectory(misc) 5 | 6 | # Propagate the files up the tree 7 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 8 | -------------------------------------------------------------------------------- /src/matrices/random/independent/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Bernoulli.cpp 4 | Gaussian.cpp 5 | Rademacher.cpp 6 | ThreeValued.cpp 7 | Uniform.cpp 8 | ) 9 | 10 | # Propagate the files up the tree 11 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 12 | -------------------------------------------------------------------------------- /src/matrices/random/independent/Rademacher.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | 12 | namespace El { 13 | 14 | template 15 | void Rademacher( Matrix& A, Int m, Int n ) 16 | { 17 | EL_DEBUG_CSE 18 | ThreeValued( A, m, n, 1. ); 19 | } 20 | 21 | template 22 | void Rademacher( AbstractDistMatrix& A, Int m, Int n ) 23 | { 24 | EL_DEBUG_CSE 25 | ThreeValued( A, m, n, 1. ); 26 | } 27 | 28 | #define PROTO(T) \ 29 | template void Rademacher( Matrix& A, Int m, Int n ); \ 30 | template void Rademacher( AbstractDistMatrix& A, Int m, Int n ); 31 | 32 | #define EL_ENABLE_DOUBLEDOUBLE 33 | #define EL_ENABLE_QUADDOUBLE 34 | #define EL_ENABLE_QUAD 35 | #define EL_ENABLE_BIGINT 36 | #define EL_ENABLE_BIGFLOAT 37 | #define EL_ENABLE_HALF 38 | #include 39 | 40 | } // namespace El 41 | -------------------------------------------------------------------------------- /src/matrices/random/lattice/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | AjtaiTypeBasis.cpp 4 | KnapsackTypeBasis.cpp 5 | ) 6 | 7 | # Propagate the files up the tree 8 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 9 | -------------------------------------------------------------------------------- /src/matrices/random/misc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Haar.cpp 4 | # HatanoNelson.cpp 5 | HermitianUniformSpectrum.cpp 6 | # NormalUniformSpectrum.cpp 7 | # UniformHelmholtzGreens.cpp 8 | # Wigner.cpp 9 | ) 10 | 11 | # Propagate the files up the tree 12 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 13 | -------------------------------------------------------------------------------- /src/matrices/random/misc/Wigner.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | #include 11 | #include 12 | 13 | namespace El { 14 | 15 | template 16 | void Wigner( Matrix& A, Int n, F mean, Base stddev ) 17 | { 18 | EL_DEBUG_CSE 19 | Gaussian( A, n, n, mean, stddev ); 20 | MakeHermitian( LOWER, A ); 21 | } 22 | 23 | template 24 | void Wigner( ElementalMatrix& A, Int n, F mean, Base stddev ) 25 | { 26 | EL_DEBUG_CSE 27 | Gaussian( A, n, n, mean, stddev ); 28 | MakeHermitian( LOWER, A ); 29 | } 30 | 31 | #define PROTO(F) \ 32 | template void Wigner( Matrix& A, Int n, F mean, Base stddev ); \ 33 | template void Wigner \ 34 | ( ElementalMatrix& A, Int n, F mean, Base stddev ); 35 | 36 | #define EL_NO_INT_PROTO 37 | #define EL_ENABLE_DOUBLEDOUBLE 38 | #define EL_ENABLE_QUADDOUBLE 39 | #define EL_ENABLE_QUAD 40 | #define EL_ENABLE_BIGFLOAT 41 | #define EL_ENABLE_HALF 42 | #include 43 | 44 | } // namespace El 45 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the subdirectories 2 | add_subdirectory(blas_like) 3 | add_subdirectory(core) 4 | add_subdirectory(lapack_like) 5 | 6 | foreach (src_file ${SOURCES}) 7 | 8 | get_filename_component(__test_name "${src_file}" NAME_WE) 9 | 10 | # Create the executable 11 | add_executable("${__test_name}" ${src_file}) 12 | target_link_libraries("${__test_name}" PRIVATE ${HYDROGEN_LIBRARIES}) 13 | 14 | # FIXME: https://github.com/llnl/elemental/issues/159 15 | if (__test_name MATCHES "DifferentGridsGeneral") 16 | continue() 17 | endif () 18 | 19 | # Create test 20 | add_test(NAME "${__test_name}.test" 21 | COMMAND "${__test_name}") 22 | 23 | if (MPIEXEC) 24 | add_test(NAME "${__test_name}_mpi_np4.test" 25 | COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ${MPI_PREFLAGS} 26 | $ ${MPI_POSTFLAGS}) 27 | endif () 28 | endforeach () 29 | 30 | set_target_properties(HermitianEig 31 | PROPERTIES 32 | CXX_STANDARD 17 33 | CXX_EXTENSIONS OFF 34 | CXX_STANDARD_REQUIRED TRUE) 35 | -------------------------------------------------------------------------------- /tests/Makefile.cmake: -------------------------------------------------------------------------------- 1 | include @CMAKE_INSTALL_PREFIX@/conf/ElVars 2 | 3 | OS := $(shell uname) 4 | 5 | TESTS := $(shell ls *.cpp | sed s/\.cpp//g) 6 | 7 | .PHONY: all clean 8 | 9 | all: $(TESTS) 10 | 11 | %: %.cpp 12 | $(CXX) $(EL_COMPILE_FLAGS) $< -o $@ $(EL_LINK_FLAGS) $(EL_LIBS) 13 | if test x$(OS) = xLinux; then LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(EL_LIB) ./$@; fi 14 | if test x$(OS) = xDarwin; then DYLD_LIBRARY_PATH=$(DYLD_LIBRARY_PATH):$(EL_LIB) ./$@; fi 15 | rm $@ 16 | 17 | clean: 18 | rm -f $(TESTS) 19 | 20 | -------------------------------------------------------------------------------- /tests/blas_like/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | Axpy.cpp 4 | BasicGemm.cpp 5 | ColumnNorms.cpp 6 | Dot.cpp 7 | EntrywiseMap.cpp 8 | Gemm.cpp 9 | Gemm_Suite.cpp 10 | Gemv.cpp 11 | Hadamard.cpp 12 | # MaxAbs.cpp 13 | # MultiShiftQuasiTrsm.cpp 14 | # MultiShiftTrsm.cpp 15 | # QuasiTrsm.cpp 16 | # SafeMultiShiftTrsm.cpp 17 | # Symm.cpp 18 | # Symv.cpp 19 | # Syr2k.cpp 20 | # Syrk.cpp 21 | # Trmm.cpp 22 | # Trsm.cpp 23 | # Trsv.cpp 24 | # TwoSidedTrmm.cpp 25 | # TwoSidedTrsm.cpp 26 | ) 27 | 28 | # Propagate the files up the tree 29 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 30 | -------------------------------------------------------------------------------- /tests/core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | BasicBlockDistMatrix.cpp 4 | Constants.cpp 5 | DifferentGrids.cpp 6 | DifferentGridsGeneralAllreduce.cpp 7 | DifferentGridsGeneralBroadcastAll.cpp 8 | DifferentGridsGeneralGather.cpp 9 | DifferentGridsGeneralScatter.cpp 10 | #DistMatrix.cpp 11 | Matrix.cpp 12 | Pow.cpp 13 | QDToInt.cpp 14 | SafeDiv.cpp 15 | Version.cpp 16 | ) 17 | 18 | # Propagate the files up the tree 19 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 20 | -------------------------------------------------------------------------------- /tests/core/QDToInt.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | using namespace El; 11 | 12 | int main( int argc, char* argv[] ) 13 | { 14 | Environment env( argc, argv ); 15 | 16 | #ifdef EL_HAVE_QD 17 | try 18 | { 19 | DoubleDouble a( 17.1374 ); 20 | Output("a=",a,", round(a)=",static_cast(a)); 21 | 22 | a = 1e18; 23 | Output("a=",a,", round(a)=",static_cast(a)); 24 | 25 | // Test an overflow result 26 | a = 1e23; 27 | Output("a=",a,", round(a)=",static_cast(a)); 28 | 29 | 30 | QuadDouble b( 17.1374 ); 31 | Output("b=",b,", round(b)=",static_cast(b)); 32 | 33 | b = 1e18; 34 | Output("b=",b,", round(b)=",static_cast(b)); 35 | 36 | // Test an overflow result 37 | b = 1e23; 38 | Output("b=",b,", round(b)=",static_cast(b)); 39 | } 40 | catch( std::exception& e ) { ReportException(e); } 41 | #endif 42 | 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /tests/core/SafeDiv.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | 10 | /* 11 | Test division and compare round-off errors. 12 | */ 13 | #include "El.hpp" 14 | using namespace El; 15 | 16 | template 17 | void Test() 18 | { 19 | Output("Testing with ",TypeName>()); 20 | Complex x(Pow(Real(2),Real(1023)),Pow(Real(2),Real(-1023))); 21 | Complex y(Pow(Real(2),Real(677)),Pow(Real(2),Real(-677))); 22 | Complex z = x / y; 23 | Complex zSafe = SafeDiv( x, y ); 24 | PushIndent(); 25 | Output("x=",x,", y=",y,", z=",z,", zSafe=",zSafe); 26 | Output("|x-y*z|/|x|=",Abs(x-y*z)/Abs(x)); 27 | Output("|x-y*zSafe|/|x|=",Abs(x-y*zSafe)/Abs(x)); 28 | PopIndent(); 29 | } 30 | 31 | int main( int argc, char* argv[] ) 32 | { 33 | Environment env( argc, argv ); 34 | 35 | try 36 | { 37 | Test(); 38 | #ifdef EL_HAVE_QUAD 39 | Test(); 40 | #endif 41 | #ifdef EL_HAVE_MPC 42 | Test(); 43 | #endif 44 | } 45 | catch( std::exception& e ) { ReportException(e); } 46 | 47 | return 0; 48 | } 49 | -------------------------------------------------------------------------------- /tests/core/Version.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2016, Jack Poulson 3 | All rights reserved. 4 | 5 | This file is part of Elemental and is under the BSD 2-Clause License, 6 | which can be found in the LICENSE file in the root directory, or at 7 | http://opensource.org/licenses/BSD-2-Clause 8 | */ 9 | #include 10 | using namespace El; 11 | 12 | int 13 | main( int argc, char* argv[] ) 14 | { 15 | Environment env( argc, argv ); 16 | const Int commRank = mpi::Rank(mpi::COMM_WORLD); 17 | 18 | if( commRank == 0 ) 19 | { 20 | PrintVersion(); 21 | PrintCCompilerInfo(); 22 | PrintCxxCompilerInfo(); 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /tests/lapack_like/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Add the source files for this directory 2 | set_full_path(THIS_DIR_SOURCES 3 | # ApplyPackedReflectors.cpp 4 | # Bidiag.cpp 5 | # BidiagDCSVD.cpp 6 | # Cholesky.cpp 7 | # CholeskyMod.cpp 8 | # CholeskyQR.cpp 9 | # Eig.cpp 10 | HermitianEig.cpp 11 | # HermitianGenDefEig.cpp 12 | # HermitianTridiag.cpp 13 | # HermitianTridiagEig.cpp 14 | # Hessenberg.cpp 15 | # HessenbergSchur.cpp 16 | # LDL.cpp 17 | # LQ.cpp 18 | # LU.cpp 19 | # LUMod.cpp 20 | # MultiShiftHessSolve.cpp 21 | # QR.cpp 22 | # RQ.cpp 23 | # SVD.cpp 24 | # SVDTwoByTwoUpper.cpp 25 | # Schur.cpp 26 | # SchurSwap.cpp 27 | # SecularEVD.cpp 28 | # SecularSVD.cpp 29 | # TSQR.cpp 30 | # TSSVD.cpp 31 | # TriangEig.cpp 32 | # TriangularInverse.cpp 33 | ) 34 | 35 | # Propagate the files up the tree 36 | set(SOURCES "${SOURCES}" "${THIS_DIR_SOURCES}" PARENT_SCOPE) 37 | -------------------------------------------------------------------------------- /unit_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | list(APPEND HYDROGEN_CATCH2_TEST_FILES 2 | matrix_test.cpp 3 | ) 4 | if (HYDROGEN_HAVE_GPU) 5 | list(APPEND HYDROGEN_CATCH2_TEST_FILES 6 | gpu_test.cpp 7 | gpu_combine_test.cu 8 | gpu_entrywise_map_test.cu 9 | copy_cpu_gpu_test.cpp 10 | pool_allocator_test.cpp 11 | ) 12 | if (HYDROGEN_HAVE_HALF AND HYDROGEN_GPU_USE_FP16) 13 | list(APPEND HYDROGEN_CATCH2_TEST_FILES 14 | copy_cpu_gpu_half_test.cpp 15 | ) 16 | endif () 17 | endif (HYDROGEN_HAVE_GPU) 18 | 19 | # Add the sequential test main() function 20 | add_executable(seq-catch-tests 21 | SequentialCatchMain.cpp "${HYDROGEN_CATCH2_TEST_FILES}") 22 | 23 | target_link_libraries(seq-catch-tests 24 | PRIVATE 25 | ${HYDROGEN_LIBRARIES} Catch2::Catch2) 26 | 27 | if (HYDROGEN_HAVE_CUDA) 28 | check_compiler_flag(CUDA "--expt-extended-lambda" 29 | CUDA_COMPILER_SUPPORTS_EXTENDED_LAMBDA) 30 | if (CUDA_COMPILER_SUPPORTS_EXTENDED_LAMBDA) 31 | target_compile_options(seq-catch-tests 32 | PRIVATE 33 | $<$:--expt-extended-lambda>) 34 | endif () 35 | endif () 36 | 37 | catch_discover_tests(seq-catch-tests) 38 | 39 | # Add the parallel test main() function -- TODO 40 | -------------------------------------------------------------------------------- /unit_test/SequentialCatchMain.cpp: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_RUNNER 2 | #include 3 | 4 | #include 5 | #ifdef HYDROGEN_HAVE_GPU 6 | #include 7 | #endif // HYDROGEN_HAVE_GPU 8 | 9 | int main(int argc, char* argv[]) 10 | { 11 | #ifdef HYDROGEN_HAVE_GPU 12 | hydrogen::gpu::Initialize(); 13 | #endif // HYDROGEN_HAVE_GPU 14 | 15 | int result = Catch::Session().run(argc, argv); 16 | 17 | #ifdef HYDROGEN_HAVE_GPU 18 | hydrogen::gpu::Finalize(); 19 | #endif // HYDROGEN_HAVE_GPU 20 | return result; 21 | } 22 | -------------------------------------------------------------------------------- /unit_test/gpu_combine_test.cu: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "El.hpp" 4 | #include "hydrogen/blas/gpu/CombineImpl.hpp" 5 | 6 | namespace { 7 | using namespace El; 8 | 9 | template 10 | void TestAxpy(S alpha, 11 | Matrix const& A, 12 | Matrix& B) 13 | { 14 | Combine(A, B, 15 | [alpha] __device__ (S const& a, T const& b) 16 | { 17 | return T(alpha*a) + b; 18 | }); 19 | } 20 | }// namespace 21 | 22 | TEMPLATE_TEST_CASE("Testing hydrogen::Combine.", 23 | "[blas][utils][gpu]", 24 | float, double) 25 | { 26 | using T = TestType; 27 | using MatrixType = El::Matrix; 28 | using CPUMatrixType = El::Matrix; 29 | 30 | El::Int m = 128, n = 161; 31 | MatrixType A(m, n, m+3), B(m, n, m+7); 32 | Fill(A, T(1)); 33 | Fill(B, T(2)); 34 | 35 | REQUIRE_NOTHROW(TestAxpy(T(5), A, B)); 36 | 37 | CPUMatrixType Bcpu; 38 | El::Copy(B, Bcpu); 39 | 40 | std::vector> errors; 41 | for (El::Int col = 0; col < Bcpu.Width(); ++col) 42 | for (El::Int row = 0; row < Bcpu.Height(); ++row) 43 | { 44 | if (Bcpu.CRef(row, col) != T(7)) 45 | { 46 | errors.emplace_back(row, col, Bcpu(row, col)); 47 | } 48 | } 49 | 50 | auto const num_bad_entries = errors.size(); 51 | REQUIRE(num_bad_entries == 0ULL); 52 | } 53 | -------------------------------------------------------------------------------- /unit_test/gpu_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | TEST_CASE("Testing core GPU functionality", "[seq][gpu][init]") 6 | { 7 | // The "main()" function should handle initialization. 8 | REQUIRE(hydrogen::gpu::IsInitialized()); 9 | REQUIRE_FALSE(hydrogen::gpu::IsFinalized()); 10 | } 11 | --------------------------------------------------------------------------------