├── .bash └── apply-clang-format ├── .clang-format ├── .clang-tidy ├── .github └── workflows │ ├── clang_format.yml │ └── unit_tests.yml ├── .gitignore ├── BUILD.md ├── CHANGELOG.md ├── CITATION.cff ├── CMakeLists.txt ├── LICENSE ├── README.md ├── benchmarks └── CMakeLists.txt ├── cmake ├── .clang-format ├── Modules │ ├── CudaToolkit.cmake │ ├── DownloadGtest.txt.in │ ├── DownloadProject.CMakeLists.cmake.in │ ├── DownloadProject.cmake │ ├── FindTPLCUBLAS.cmake │ ├── FindTPLMPARK_VARIANT.cmake │ └── MorpheusDependenciesConfigure.cmake ├── MorpheusConfig.cmake.in ├── kokkos_requirements.cmake ├── morpheus_backends.cmake ├── morpheus_doxygen.cmake ├── morpheus_gtest.cmake ├── morpheus_test_cxx_std.cmake ├── morpheus_tpls.cmake └── morpheus_utils.cmake ├── core ├── CMakeLists.txt ├── cmake │ ├── .clang-format │ └── MorpheusCore_config.hpp.in ├── examples │ └── CMakeLists.txt ├── src │ ├── CMakeLists.txt │ ├── Morpheus_ContainerFactory.hpp │ ├── Morpheus_ContainerTraits.hpp │ ├── Morpheus_Convert.hpp │ ├── Morpheus_CooMatrix.hpp │ ├── Morpheus_Copy.hpp │ ├── Morpheus_Core.hpp │ ├── Morpheus_CsrMatrix.hpp │ ├── Morpheus_CustomBackend.hpp │ ├── Morpheus_DenseMatrix.hpp │ ├── Morpheus_DenseVector.hpp │ ├── Morpheus_DiaMatrix.hpp │ ├── Morpheus_Dot.hpp │ ├── Morpheus_DynamicMatrix.hpp │ ├── Morpheus_EllMatrix.hpp │ ├── Morpheus_Exceptions.hpp │ ├── Morpheus_FormatTags.hpp │ ├── Morpheus_FormatTraits.hpp │ ├── Morpheus_FormatsRegistry.hpp │ ├── Morpheus_GenericBackend.hpp │ ├── Morpheus_HdcMatrix.hpp │ ├── Morpheus_HybMatrix.hpp │ ├── Morpheus_Macros.hpp │ ├── Morpheus_MatrixAnalytics.hpp │ ├── Morpheus_MatrixBase.hpp │ ├── Morpheus_MatrixMarket.hpp │ ├── Morpheus_MatrixOperations.hpp │ ├── Morpheus_MatrixOptions.hpp │ ├── Morpheus_Metaprogramming.hpp │ ├── Morpheus_MirrorContainers.hpp │ ├── Morpheus_Multiply.hpp │ ├── Morpheus_Print.hpp │ ├── Morpheus_Reduction.hpp │ ├── Morpheus_Scan.hpp │ ├── Morpheus_Sort.hpp │ ├── Morpheus_SpaceTraits.hpp │ ├── Morpheus_Spaces.hpp │ ├── Morpheus_TypeTraits.hpp │ ├── Morpheus_VectorAnalytics.hpp │ ├── Morpheus_WAXPBY.hpp │ ├── dummy.cpp │ ├── fwd │ │ ├── Morpheus_Fwd_CooMatrix.hpp │ │ ├── Morpheus_Fwd_CsrMatrix.hpp │ │ ├── Morpheus_Fwd_DenseMatrix.hpp │ │ ├── Morpheus_Fwd_DenseVector.hpp │ │ ├── Morpheus_Fwd_DiaMatrix.hpp │ │ ├── Morpheus_Fwd_DynamicMatrix.hpp │ │ ├── Morpheus_Fwd_EllMatrix.hpp │ │ ├── Morpheus_Fwd_FormatTraits.hpp │ │ ├── Morpheus_Fwd_HdcMatrix.hpp │ │ ├── Morpheus_Fwd_HybMatrix.hpp │ │ ├── Morpheus_Fwd_MatrixBase.hpp │ │ └── Morpheus_Fwd_Spaces.hpp │ └── impl │ │ ├── Coo │ │ ├── Cuda │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ │ └── Morpheus_Sort_Impl.hpp │ │ ├── HIP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ │ └── Morpheus_Sort_Impl.hpp │ │ ├── Kernels │ │ │ ├── Morpheus_MatrixAnalytics_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ └── Morpheus_Multiply_Impl.hpp │ │ ├── Kokkos │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ │ └── Morpheus_Sort_Impl.hpp │ │ ├── Morpheus_Copy_Impl.hpp │ │ ├── Morpheus_Print_Impl.hpp │ │ ├── OpenMP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ │ └── Morpheus_Sort_Impl.hpp │ │ └── Serial │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ │ └── Morpheus_Sort_Impl.hpp │ │ ├── Csr │ │ ├── Cuda │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── HIP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Kernels │ │ │ ├── Morpheus_MatrixAnalytics_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ └── Morpheus_Multiply_Impl.hpp │ │ ├── Kokkos │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Morpheus_Copy_Impl.hpp │ │ ├── Morpheus_Print_Impl.hpp │ │ ├── OpenMP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ └── Serial │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── DenseMatrix │ │ ├── Cuda │ │ │ └── Morpheus_Convert_Impl.hpp │ │ ├── HIP │ │ │ └── Morpheus_Convert_Impl.hpp │ │ ├── Kokkos │ │ │ └── Morpheus_Convert_Impl.hpp │ │ ├── Morpheus_Copy_Impl.hpp │ │ ├── Morpheus_Print_Impl.hpp │ │ ├── OpenMP │ │ │ └── Morpheus_Convert_Impl.hpp │ │ └── Serial │ │ │ └── Morpheus_Convert_Impl.hpp │ │ ├── DenseVector │ │ ├── Cuda │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_Copy_Impl.hpp │ │ │ ├── Morpheus_Count_Occurences_Impl.hpp │ │ │ ├── Morpheus_Dot_Impl.hpp │ │ │ ├── Morpheus_Reduction_Impl.hpp │ │ │ ├── Morpheus_VectorAnalytics_Impl.hpp │ │ │ ├── Morpheus_WAXPBY_Impl.hpp │ │ │ ├── Morpheus_Workspace.cpp │ │ │ └── Morpheus_Workspace.hpp │ │ ├── HIP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_Copy_Impl.hpp │ │ │ ├── Morpheus_Count_Occurences_Impl.hpp │ │ │ ├── Morpheus_Dot_Impl.hpp │ │ │ ├── Morpheus_Reduction_Impl.hpp │ │ │ ├── Morpheus_VectorAnalytics_Impl.hpp │ │ │ ├── Morpheus_WAXPBY_Impl.hpp │ │ │ ├── Morpheus_Workspace.cpp │ │ │ └── Morpheus_Workspace.hpp │ │ ├── Kernels │ │ │ ├── Morpheus_Copy_Impl.hpp │ │ │ ├── Morpheus_Dot_Impl.hpp │ │ │ ├── Morpheus_Reduction_Impl.hpp │ │ │ ├── Morpheus_Segmented_Reduction_Impl.hpp │ │ │ ├── Morpheus_VectorAnalytics_Impl.hpp │ │ │ └── Morpheus_WAXPBY_Impl.hpp │ │ ├── Kokkos │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_Count_Occurences_Impl.hpp │ │ │ ├── Morpheus_Dot_Impl.hpp │ │ │ ├── Morpheus_Reduction_Impl.hpp │ │ │ ├── Morpheus_VectorAnalytics_Impl.hpp │ │ │ └── Morpheus_WAXPBY_Impl.hpp │ │ ├── Morpheus_Copy_Impl.hpp │ │ ├── Morpheus_Print_Impl.hpp │ │ ├── OpenMP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_Copy_Impl.hpp │ │ │ ├── Morpheus_Count_Occurences_Impl.hpp │ │ │ ├── Morpheus_Dot_Impl.hpp │ │ │ ├── Morpheus_Reduction_Impl.hpp │ │ │ ├── Morpheus_Scan_Impl.hpp │ │ │ ├── Morpheus_VectorAnalytics_Impl.hpp │ │ │ └── Morpheus_WAXPBY_Impl.hpp │ │ └── Serial │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_Copy_Impl.hpp │ │ │ ├── Morpheus_Count_Occurences_Impl.hpp │ │ │ ├── Morpheus_Dot_Impl.hpp │ │ │ ├── Morpheus_Reduction_Impl.hpp │ │ │ ├── Morpheus_Scan_Impl.hpp │ │ │ ├── Morpheus_VectorAnalytics_Impl.hpp │ │ │ └── Morpheus_WAXPBY_Impl.hpp │ │ ├── Dia │ │ ├── Cuda │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── HIP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Kernels │ │ │ ├── Morpheus_MatrixAnalytics_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ └── Morpheus_Multiply_Impl.hpp │ │ ├── Kokkos │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Morpheus_Copy_Impl.hpp │ │ ├── Morpheus_Print_Impl.hpp │ │ ├── Morpheus_Utils_Impl.hpp │ │ ├── OpenMP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ └── Serial │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Dynamic │ │ ├── Morpheus_Convert_Impl.hpp │ │ ├── Morpheus_Copy_Impl.hpp │ │ ├── Morpheus_DynamicMatrix_Impl.hpp │ │ ├── Morpheus_MatrixAnalytics_Impl.hpp │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ ├── Morpheus_Multiply_Impl.hpp │ │ ├── Morpheus_Print_Impl.hpp │ │ └── Morpheus_Sort_Impl.hpp │ │ ├── Ell │ │ ├── Cuda │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── HIP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Kernels │ │ │ ├── Morpheus_MatrixAnalytics_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ └── Morpheus_Multiply_Impl.hpp │ │ ├── Kokkos │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Morpheus_Copy_Impl.hpp │ │ ├── Morpheus_Print_Impl.hpp │ │ ├── OpenMP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ └── Serial │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Hdc │ │ ├── Cuda │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── HIP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Kokkos │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Morpheus_Copy_Impl.hpp │ │ ├── Morpheus_Print_Impl.hpp │ │ ├── OpenMP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ └── Serial │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Hyb │ │ ├── Cuda │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── HIP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Kokkos │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Morpheus_Copy_Impl.hpp │ │ ├── Morpheus_Print_Impl.hpp │ │ ├── OpenMP │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ └── Serial │ │ │ ├── Morpheus_Convert_Impl.hpp │ │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ │ ├── Morpheus_Multiply_Impl.hpp │ │ │ ├── Morpheus_NonZeros_Per_Diagonal_Impl.hpp │ │ │ └── Morpheus_NonZeros_Per_Row_Impl.hpp │ │ ├── Morpheus_ContainerFactory_Impl.hpp │ │ ├── Morpheus_ContainerTraits_Impl.hpp │ │ ├── Morpheus_Convert_Impl.hpp │ │ ├── Morpheus_Copy_Impl.hpp │ │ ├── Morpheus_Core.cpp │ │ ├── Morpheus_CudaUtils.hpp │ │ ├── Morpheus_Dot_Impl.hpp │ │ ├── Morpheus_Functors.hpp │ │ ├── Morpheus_HIPUtils.hpp │ │ ├── Morpheus_MatrixAnalytics_Impl.hpp │ │ ├── Morpheus_MatrixMarket_Impl.hpp │ │ ├── Morpheus_MatrixOperations_Impl.hpp │ │ ├── Morpheus_MatrixProxy.hpp │ │ ├── Morpheus_MatrixTags.hpp │ │ ├── Morpheus_Metaprogramming.hpp │ │ ├── Morpheus_MirrorContainers_Impl.hpp │ │ ├── Morpheus_Multiply_Impl.hpp │ │ ├── Morpheus_OpenMPUtils.hpp │ │ ├── Morpheus_Print_Impl.hpp │ │ ├── Morpheus_Reduction_Impl.hpp │ │ ├── Morpheus_Scan_Impl.hpp │ │ ├── Morpheus_Sort_Impl.hpp │ │ ├── Morpheus_Utils.hpp │ │ ├── Morpheus_Variant.hpp │ │ ├── Morpheus_VectorAnalytics_Impl.hpp │ │ ├── Morpheus_VectorTags.hpp │ │ └── Morpheus_WAXPBY_Impl.hpp └── tests │ ├── CMakeLists.txt │ ├── Cuda │ ├── Test_Convert.hpp │ ├── Test_Convert_Dynamic.hpp │ ├── Test_CustomBackend.hpp │ ├── Test_GenericBackend.hpp │ ├── Test_SpaceTraits.hpp │ └── Test_Spaces.hpp │ ├── HIP │ ├── Test_Convert.hpp │ ├── Test_Convert_Dynamic.hpp │ ├── Test_CustomBackend.hpp │ ├── Test_GenericBackend.hpp │ ├── Test_SpaceTraits.hpp │ └── Test_Spaces.hpp │ ├── OpenMP │ ├── Test_Convert.hpp │ ├── Test_Convert_Dynamic.hpp │ ├── Test_CustomBackend.hpp │ ├── Test_GenericBackend.hpp │ ├── Test_SpaceTraits.hpp │ └── Test_Spaces.hpp │ ├── Serial │ ├── Test_Convert.hpp │ ├── Test_Convert_Dynamic.hpp │ ├── Test_CustomBackend.hpp │ ├── Test_GenericBackend.hpp │ ├── Test_SpaceTraits.hpp │ └── Test_Spaces.hpp │ ├── TestMain.cpp │ ├── Test_ContainerFactory.hpp │ ├── Test_ContainerTraits.hpp │ ├── Test_CooMatrix.hpp │ ├── Test_CooMatrix_Binary.hpp │ ├── Test_CooMatrix_CompatibleBinary.hpp │ ├── Test_CooMatrix_CompatibleDynamicBinary.hpp │ ├── Test_Copy.hpp │ ├── Test_CsrMatrix.hpp │ ├── Test_CsrMatrix_Binary.hpp │ ├── Test_CsrMatrix_CompatibleBinary.hpp │ ├── Test_CsrMatrix_CompatibleDynamicBinary.hpp │ ├── Test_CustomBackend.hpp │ ├── Test_DenseMatrix.hpp │ ├── Test_DenseMatrix_Binary.hpp │ ├── Test_DenseMatrix_CompatibleBinary.hpp │ ├── Test_DenseVector.hpp │ ├── Test_DenseVector_Binary.hpp │ ├── Test_DenseVector_CompatibleBinary.hpp │ ├── Test_DiaMatrix.hpp │ ├── Test_DiaMatrix_Binary.hpp │ ├── Test_DiaMatrix_CompatibleBinary.hpp │ ├── Test_DiaMatrix_CompatibleDynamicBinary.hpp │ ├── Test_Dot.hpp │ ├── Test_DynamicMatrix.hpp │ ├── Test_DynamicMatrix_Binary.hpp │ ├── Test_DynamicMatrix_CompatibleBinary.hpp │ ├── Test_DynamicMatrix_CompatibleConcreteBinary.hpp │ ├── Test_EllMatrix.hpp │ ├── Test_EllMatrix_Binary.hpp │ ├── Test_EllMatrix_CompatibleBinary.hpp │ ├── Test_EllMatrix_CompatibleDynamicBinary.hpp │ ├── Test_FormatTags.hpp │ ├── Test_FormatTraits.hpp │ ├── Test_GenericBackend.hpp │ ├── Test_HdcMatrix.hpp │ ├── Test_HdcMatrix_Binary.hpp │ ├── Test_HdcMatrix_CompatibleBinary.hpp │ ├── Test_HdcMatrix_CompatibleDynamicBinary.hpp │ ├── Test_HybMatrix.hpp │ ├── Test_HybMatrix_Binary.hpp │ ├── Test_HybMatrix_CompatibleBinary.hpp │ ├── Test_HybMatrix_CompatibleDynamicBinary.hpp │ ├── Test_MatrixAnalytics.hpp │ ├── Test_MatrixAnalytics_Dynamic.hpp │ ├── Test_MatrixBase.hpp │ ├── Test_MatrixMarket.hpp │ ├── Test_MatrixOperations.hpp │ ├── Test_MatrixOperations_Dynamic.hpp │ ├── Test_Metaprogramming.hpp │ ├── Test_MirrorContainers.hpp │ ├── Test_Multiply.hpp │ ├── Test_Multiply_Dynamic.hpp │ ├── Test_Reduce.hpp │ ├── Test_SpaceTraits.hpp │ ├── Test_Spaces.hpp │ ├── Test_TypeTraits.hpp │ ├── Test_VectorAnalytics.hpp │ ├── Test_WAXPBY.hpp │ ├── category_files │ ├── TestCuda_Category.hpp │ ├── TestHIP_Category.hpp │ ├── TestOpenMP_Category.hpp │ └── TestSerial_Category.hpp │ ├── mm_data │ ├── array_invalid_size.mtx │ ├── array_invalid_symmetry_symmetric.mtx │ ├── array_invalid_type_complex.mtx │ ├── array_invalid_type_custom.mtx │ ├── array_invalid_type_pattern.mtx │ ├── array_unexpected_eof.mtx │ ├── array_unsymmetric_integer.mtx │ ├── array_unsymmetric_real.mtx │ ├── complex.mtx │ ├── hermitian.mtx │ ├── mat_invalid_banner.mtx │ ├── mat_invalid_column_over_index.mtx │ ├── mat_invalid_column_zero_index.mtx │ ├── mat_invalid_data_type.mtx │ ├── mat_invalid_row_over_index.mtx │ ├── mat_invalid_row_zero_index.mtx │ ├── mat_invalid_size.mtx │ ├── mat_invalid_storage_format.mtx │ ├── mat_invalid_symmetry.mtx │ ├── mat_unexpected_eof.mtx │ ├── skew-symmetric.mtx │ ├── symmetric_integer.mtx │ ├── symmetric_pattern.mtx │ ├── symmetric_real.mtx │ ├── unsymmetric_integer.mtx │ ├── unsymmetric_pattern.mtx │ ├── unsymmetric_real.mtx │ ├── unsymmetric_real_unsorted.mtx │ ├── vec_unsymmetric_integer.mtx │ └── vec_unsymmetric_real.mtx │ └── utils │ ├── Macros_CooMatrix.hpp │ ├── Macros_CsrMatrix.hpp │ ├── Macros_Definitions.hpp │ ├── Macros_DenseMatrix.hpp │ ├── Macros_DenseVector.hpp │ ├── Macros_DiaMatrix.hpp │ ├── Macros_DynamicMatrix.hpp │ ├── Macros_EllMatrix.hpp │ ├── Macros_HdcMatrix.hpp │ ├── Macros_HybMatrix.hpp │ ├── MatrixGenerator.hpp │ └── Utils.hpp ├── data ├── clSpMV │ └── download_matrices.sh ├── large_set │ └── download_matrices.sh └── small_set │ └── download_matrices.sh ├── docs └── Doxyfile.in ├── examples └── CMakeLists.txt └── scripts ├── benchmark_build.sh ├── kokkos_build.sh └── morpheus_build.sh /.bash/apply-clang-format: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # If CLANG_FORMAT_EXE exists in the environment, 4 | # it is used instead of 'clang-format'. 5 | CLANG_FORMAT_EXECUTABLE=${CLANG_FORMAT_EXE:-clang-format} 6 | 7 | if ! [ -x "$(command -v ${CLANG_FORMAT_EXECUTABLE})" ]; then 8 | echo "*** ${CLANG_FORMAT_EXECUTABLE} could not be found." 9 | exit 1 10 | fi 11 | 12 | CLANG_FORMAT_VERSION="$(${CLANG_FORMAT_EXECUTABLE} --version)" 13 | CLANG_FORMAT_MAJOR_VERSION=$(echo "${CLANG_FORMAT_VERSION}" | sed 's/^[^0-9]*\([0-9]*\).*$/\1/g') 14 | CLANG_FORMAT_MINOR_VERSION=$(echo "${CLANG_FORMAT_VERSION}" | sed 's/^[^0-9]*[0-9]*\.\([0-9]*\).*$/\1/g') 15 | 16 | if [ "${CLANG_FORMAT_MAJOR_VERSION}" -lt 8 ]; then 17 | echo "*** This indent script requires clang-format with major version 8+," 18 | echo "*** but version ${CLANG_FORMAT_MAJOR_VERSION}.${CLANG_FORMAT_MINOR_VERSION} was found instead." 19 | exit 1 20 | fi 21 | 22 | BASE_DIR="$(git rev-parse --show-toplevel)" 23 | cd $BASE_DIR 24 | if [ ! -f ".bash/apply-clang-format" ]; then 25 | echo "*** The indenting script must be executed from within the Morpheus clone!" 26 | exit 1 27 | fi 28 | 29 | TRACKED_FILES="$(git ls-files)" 30 | 31 | find ${TRACKED_FILES} \ 32 | -type f -name '*.cpp' -o -name '*.hpp' -o -name '*.cc' -o -name '*.h' | 33 | xargs -n 1 -P 10 ${CLANG_FORMAT_EXECUTABLE} -i --style=file 34 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | # Run manually to reformat a file: 2 | # clang-format -i --style=file 3 | #Official Tool: clang-format version 8.0.0 4 | BasedOnStyle: google 5 | SortIncludes: false 6 | AlignConsecutiveAssignments: true 7 | AllowShortCaseLabelsOnASingleLine: true 8 | AllowShortIfStatementsOnASingleLine: true -------------------------------------------------------------------------------- /.clang-tidy: -------------------------------------------------------------------------------- 1 | Checks: '-*,kokkos-*,modernize-use-using,modernize-use-nullptr,cppcoreguidelines-pro-type-cstyle-cast' 2 | FormatStyle: file 3 | HeaderFilterRegex: '.*/*.hpp' -------------------------------------------------------------------------------- /.github/workflows/clang_format.yml: -------------------------------------------------------------------------------- 1 | name: clang_format-Linux 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | code-format: 6 | runs-on: ubuntu-20.04 7 | 8 | steps: 9 | - uses: actions/checkout@v3 10 | with: 11 | ref: ${{ github.head_ref }} 12 | 13 | - name: Install dependencies 14 | run: | 15 | sudo apt update 16 | sudo apt install clang-format-8 17 | 18 | - name: Applying formatting 19 | run: | 20 | .bash/apply-clang-format 21 | 22 | - name: Pushing changes if any 23 | uses: stefanzweifel/git-auto-commit-action@v4 24 | with: 25 | commit_message: Applying code formatting (from Github Action) 26 | commit_user_name: cstyl 27 | commit_user_email: cstyl16@gmail.com 28 | commit_author: Christodoulos Stylianou -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: 1.3.0 2 | title: >- 3 | Morpheus: a library for efficient runtime switching 4 | of sparse matrix storage formats 5 | message: >- 6 | If you use this software, please cite it using the 7 | metadata from this file. 8 | type: software 9 | version: 0.3.1 10 | date-released: 2022-07-1 11 | authors: 12 | - given-names: Christodoulos 13 | family-names: Stylianou 14 | email: c.stylianou@ed.ac.uk 15 | license: Apache-2.0 16 | repository-code: 'https://github.com/morpheus-org/morpheus' 17 | -------------------------------------------------------------------------------- /benchmarks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | message(STATUS "Benchmarks are enabled") 2 | 3 | # This function takes in an example name and example source and handles setting 4 | # all of the associated properties and linking to build the example 5 | function(ConfigureBenchmark BENCHMARK_NAME BENCHMARK_SRC) 6 | add_executable(${BENCHMARK_NAME} "${BENCHMARK_SRC}") 7 | target_include_directories( 8 | ${BENCHMARK_NAME} PRIVATE "$") 9 | target_link_libraries(${BENCHMARK_NAME} morpheus) 10 | set_target_properties( 11 | ${BENCHMARK_NAME} 12 | PROPERTIES POSITION_INDEPENDENT_CODE ON 13 | RUNTIME_OUTPUT_DIRECTORY 14 | "$") 15 | endfunction() 16 | 17 | # These examples use the separate compilation 18 | set(SOURCES_IDIOMATIC_BENCHMARKS # TODO: Fill in with source files 19 | ) 20 | 21 | string(REPLACE ".cpp" "" BASENAMES_IDIOMATIC_BENCHMARKS 22 | "${SOURCES_IDIOMATIC_BENCHMARKS}") 23 | set(TARGETS_IDIOMATIC_BENCHMARKS ${BASENAMES_IDIOMATIC_BENCHMARKS}) 24 | 25 | foreach(name ${TARGETS_IDIOMATIC_BENCHMARKS}) 26 | configurebenchmark(${name} ${Morpheus_BENCHMARKS_DIR}/${name}.cpp) 27 | endforeach() 28 | -------------------------------------------------------------------------------- /cmake/.clang-format: -------------------------------------------------------------------------------- 1 | { 2 | "DisableFormat": true, 3 | "SortIncludes": false, 4 | } -------------------------------------------------------------------------------- /cmake/Modules/DownloadGtest.txt.in: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.2) 2 | project(googletest-download NONE) 3 | 4 | include(ExternalProject) 5 | ExternalProject_Add(googletest 6 | GIT_REPOSITORY https://github.com/google/googletest.git 7 | GIT_TAG master 8 | SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src" 9 | BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build" 10 | CONFIGURE_COMMAND "" 11 | BUILD_COMMAND "" 12 | INSTALL_COMMAND "" 13 | TEST_COMMAND "" 14 | ) -------------------------------------------------------------------------------- /cmake/Modules/DownloadProject.CMakeLists.cmake.in: -------------------------------------------------------------------------------- 1 | # Distributed under the OSI-approved MIT License. See accompanying 2 | # file LICENSE or https://github.com/Crascit/DownloadProject for details. 3 | 4 | cmake_minimum_required(VERSION 3.17) 5 | 6 | project(${DL_ARGS_PROJ}-download NONE) 7 | 8 | include(ExternalProject) 9 | if(${DL_ARGS_BUILD_PROJECT}) 10 | ExternalProject_Add(${DL_ARGS_PROJ}-download 11 | ${DL_ARGS_UNPARSED_ARGUMENTS} 12 | SOURCE_DIR "${DL_ARGS_SOURCE_DIR}" 13 | BUILD_IN_SOURCE TRUE 14 | TEST_COMMAND "" 15 | ) 16 | else() 17 | ExternalProject_Add(${DL_ARGS_PROJ}-download 18 | ${DL_ARGS_UNPARSED_ARGUMENTS} 19 | SOURCE_DIR "${DL_ARGS_SOURCE_DIR}" 20 | BUILD_IN_SOURCE TRUE 21 | TEST_COMMAND "" 22 | UPDATE_COMMAND "" 23 | CONFIGURE_COMMAND "" 24 | BUILD_COMMAND "" 25 | INSTALL_COMMAND "" 26 | ) 27 | endif() -------------------------------------------------------------------------------- /cmake/Modules/FindTPLCUBLAS.cmake: -------------------------------------------------------------------------------- 1 | if(NOT CUDAToolkit_ROOT) 2 | if(NOT CUDA_ROOT) 3 | set(CUDA_ROOT $ENV{CUDA_ROOT}) 4 | endif() 5 | if(CUDA_ROOT) 6 | set(CUDAToolkit_ROOT ${CUDA_ROOT}) 7 | endif() 8 | endif() 9 | 10 | include(${CMAKE_CURRENT_LIST_DIR}/CudaToolkit.cmake) 11 | 12 | include(FindPackageHandleStandardArgs) 13 | 14 | if(TARGET CUDA::cublas) 15 | set(FOUND_CUBLAS TRUE) 16 | morpheus_export_imported_tpl(CUDA::cublas IMPORTED_NAME CUDA::cublas) 17 | else() 18 | set(FOUND_CUBLAS FALSE) 19 | endif() 20 | 21 | include(FindPackageHandleStandardArgs) 22 | find_package_handle_standard_args( 23 | TPLCUBLAS "CuBLAS and cuBLAS_LT were not found!" FOUND_CUBLAS) 24 | if(FOUND_CUBLAS) 25 | morpheus_create_imported_tpl(CUBLAS INTERFACE LINK_LIBRARIES CUDA::cublas) 26 | endif() 27 | -------------------------------------------------------------------------------- /cmake/Modules/FindTPLMPARK_VARIANT.cmake: -------------------------------------------------------------------------------- 1 | if(MPARK_VARIANT_LIBRARY_DIRS AND MPARK_VARIANT_LIBRARIES) 2 | morpheus_find_imported( 3 | MPARK_VARIANT INTERFACE LIBRARIES ${MPARK_VARIANT_LIBRARIES} LIBRARY_PATHS 4 | ${MPARK_VARIANT_LIBRARY_DIRS}) 5 | elseif(MPARK_VARIANT_LIBRARIES) 6 | morpheus_find_imported(MPARK_VARIANT INTERFACE LIBRARIES 7 | ${MPARK_VARIANT_LIBRARIES}) 8 | elseif(MPARK_VARIANT_LIBRARY_DIRS) 9 | morpheus_find_imported(MPARK_VARIANT INTERFACE LIBRARIES mpark_variant 10 | LIBRARY_PATHS ${MPARK_VARIANT_LIBRARY_DIRS}) 11 | elseif(Morpheus_MPARK_VARIANT_ROOT OR DEFINED ENV{MPARK_VARIANT_DIR}) 12 | if(Morpheus_MPARK_VARIANT_ROOT AND DEFINED ENV{MPARK_VARIANT_DIR}) 13 | message( 14 | FATAL_ERROR 15 | "Both Morpheus_MPARK_VARIANT_ROOT and ENV{MPARK_VARIANT_DIR} are defined!" 16 | ) 17 | endif() 18 | 19 | if(Morpheus_MPARK_VARIANT_ROOT) 20 | set(MPARK_VARIANT_ROOT ${Morpheus_MPARK_VARIANT_ROOT}) 21 | else() 22 | set(MPARK_VARIANT_ROOT $ENV{MPARK_VARIANT_DIR}) 23 | endif() 24 | 25 | morpheus_find_imported( 26 | MPARK_VARIANT 27 | INTERFACE 28 | LIBRARIES 29 | LIBRARY_PATHS 30 | ${MPARK_VARIANT_ROOT}/lib 31 | HEADERS 32 | mpark/variant.hpp 33 | HEADER_PATHS 34 | ${MPARK_VARIANT_ROOT}/include) 35 | else() 36 | find_package(MPARK_VARIANT REQUIRED) 37 | morpheus_create_imported_tpl( 38 | MPARK_VARIANT INTERFACE LINK_LIBRARIES ${MPARK_VARIANT_LIBRARIES} INCLUDES 39 | ${MPARK_VARIANT_INCLUDE_DIRS}) 40 | endif() 41 | -------------------------------------------------------------------------------- /cmake/Modules/MorpheusDependenciesConfigure.cmake: -------------------------------------------------------------------------------- 1 | include(cmake/Modules/DownloadProject.cmake) 2 | 3 | function(morpheus_configure_googlebenchmark) 4 | 5 | if (CMAKE_VERSION VERSION_LESS 3.2) 6 | set(UPDATE_DISCONNECTED_IF_AVAILABLE "") 7 | else() 8 | set(UPDATE_DISCONNECTED_IF_AVAILABLE "UPDATE_DISCONNECTED 1") 9 | endif() 10 | 11 | download_project(PROJ googlebenchmark 12 | GIT_REPOSITORY https://github.com/google/benchmark.git 13 | GIT_TAG master 14 | SOURCE_DIR ${Morpheus_SOURCE_DIR}/tpl/googlebenchmark 15 | ${UPDATE_DISCONNECTED_IF_AVAILABLE} 16 | ) 17 | 18 | add_subdirectory(${googlebenchmark_SOURCE_DIR} ${googlebenchmark_BINARY_DIR}) 19 | 20 | include_directories("${googlebenchmark_SOURCE_DIR}/include") 21 | endfunction() 22 | -------------------------------------------------------------------------------- /cmake/MorpheusConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | # Compute paths 4 | GET_FILENAME_COMPONENT(Morpheus_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) 5 | 6 | include(CMakeFindDependencyMacro) 7 | 8 | @MORPHEUS_TPL_EXPORTS@ 9 | 10 | find_dependency(Kokkos HINTS @Kokkos_DIR@) 11 | 12 | SET(Morpheus_VERSION_MAJOR @Morpheus_VERSION_MAJOR@) 13 | SET(Morpheus_VERSION_MINOR @Morpheus_VERSION_MINOR@) 14 | SET(Morpheus_VERSION_PATCH @Morpheus_VERSION_PATCH@) 15 | SET(MORPHEUS_VERSION @MORPHEUS_VERSION@) 16 | 17 | SET(Morpheus_ENABLE_OPENMP @Morpheus_ENABLE_OPENMP@) 18 | SET(Morpheus_ENABLE_CUDA @Morpheus_ENABLE_CUDA@) 19 | SET(Morpheus_ENABLE_HIP @Morpheus_ENABLE_HIP@) 20 | SET(Morpheus_ENABLE_SERIAL @Morpheus_ENABLE_SERIAL@) 21 | 22 | SET(Morpheus_ENABLE_TPL_MPARK_VARIANT @Morpheus_ENABLE_TPL_MPARK_VARIANT@) 23 | SET(Morpheus_ENABLE_TPL_CUBLAS @Morpheus_ENABLE_TPL_CUBLAS@) 24 | 25 | SET(Morpheus_ENABLE_RAPID_TESTING @Morpheus_ENABLE_RAPID_TESTING@) 26 | 27 | if(Morpheus_ENABLE_TPL_MPARK_VARIANT) 28 | find_dependency(MPARK_VARIANT HINTS @MPARK_VARIANT_DIR@) 29 | endif() 30 | 31 | INCLUDE("${Morpheus_CMAKE_DIR}/MorpheusTargets.cmake") -------------------------------------------------------------------------------- /cmake/kokkos_requirements.cmake: -------------------------------------------------------------------------------- 1 | if(NOT MORPHEUS_HAS_PARENT) 2 | 3 | if(DEFINED Morpheus_REQUIRE_DEVICES) 4 | string(REPLACE "," ";" REQUIRE_DEVICES "${Morpheus_REQUIRE_DEVICES}") 5 | kokkos_check(DEVICES ${REQUIRE_DEVICES}) 6 | endif() 7 | 8 | if(DEFINED Morpheus_REQUIRE_OPTIONS) 9 | string(REPLACE "," ";" REQUIRE_OPTIONS "${Morpheus_REQUIRE_OPTIONS}") 10 | kokkos_check(OPTIONS ${REQUIRE_OPTIONS}) 11 | endif() 12 | 13 | if(DEFINED Morpheus_REQUIRE_ARCH) 14 | string(REPLACE "," ";" REQUIRE_ARCH "${Morpheus_REQUIRE_ARCH}") 15 | kokkos_check(ARCH ${REQUIRE_ARCH}) 16 | endif() 17 | 18 | if(DEFINED Morpheus_REQUIRE_TPLS) 19 | string(REPLACE "," ";" REQUIRE_TPLS "${Morpheus_REQUIRE_TPLS}") 20 | kokkos_check(TPLS ${REQUIRE_TPLS}) 21 | endif() 22 | 23 | endif() 24 | -------------------------------------------------------------------------------- /cmake/morpheus_backends.cmake: -------------------------------------------------------------------------------- 1 | # Kokkos only defines the variables if the backends are ON Define aux variables 2 | # that exist as on/off 3 | macro(CHECK_KOKKOS_BACKEND BE) 4 | if(Kokkos_ENABLE_${BE}) 5 | set(MORPHEUS_ENABLE_${BE} ON) 6 | else() 7 | set(MORPHEUS_ENABLE_${BE} OFF) 8 | endif() 9 | global_set(Morpheus_ENABLE_${BE} ${MORPHEUS_ENABLE_${BE}}) 10 | endmacro(CHECK_KOKKOS_BACKEND) 11 | 12 | check_kokkos_backend(CUDA) 13 | check_kokkos_backend(HIP) 14 | check_kokkos_backend(OPENMP) 15 | check_kokkos_backend(SERIAL) 16 | -------------------------------------------------------------------------------- /cmake/morpheus_doxygen.cmake: -------------------------------------------------------------------------------- 1 | message(STATUS "Setting up Doxygen for Documentation") 2 | 3 | # check if Doxygen is installed 4 | find_package(Doxygen) 5 | if(DOXYGEN_FOUND) 6 | # set input and output files 7 | set(DOXYGEN_IN ${MORPHEUS_TOP_SOURCE_DIR}/docs/Doxyfile.in) 8 | set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) 9 | 10 | # request to configure the file 11 | configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY) 12 | message("Doxygen build started") 13 | 14 | # note the option ALL which allows to build the docs together with the 15 | # application 16 | add_custom_target( 17 | docs ALL 18 | COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} 19 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 20 | COMMENT "Generating API documentation with Doxygen" 21 | VERBATIM) 22 | else(DOXYGEN_FOUND) 23 | message("Doxygen need to be installed to generate the doxygen documentation") 24 | endif(DOXYGEN_FOUND) 25 | 26 | message(STATUS "Morpheus_Gtest Library configured.") 27 | -------------------------------------------------------------------------------- /cmake/morpheus_gtest.cmake: -------------------------------------------------------------------------------- 1 | message(STATUS "Setting up Morpheus_Gtest library") 2 | 3 | find_package(GTest CONFIG) 4 | if(NOT GTest_FOUND) 5 | message(STATUS "find_package could not find GTest - Downloading GTest") 6 | include(FetchContent) 7 | FetchContent_Declare( 8 | googletest 9 | # Specify the commit you depend on and update it regularly. 10 | URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip 11 | ) 12 | # For Windows: Prevent overriding the parent project's compiler/linker 13 | # settings 14 | set(gtest_force_shared_crt 15 | ON 16 | CACHE BOOL "" FORCE) 17 | set(INSTALL_GTEST 18 | OFF 19 | CACHE BOOL "" FORCE) 20 | set(BUILD_GMOCK 21 | OFF 22 | CACHE BOOL "" FORCE) 23 | set(gtest_disable_pthreads 24 | ON 25 | CACHE BOOL "" FORCE) 26 | FetchContent_MakeAvailable(googletest) 27 | add_library(morpheus_gtest ALIAS gtest_main) 28 | else() 29 | set_target_properties(GTest::gtest PROPERTIES IMPORTED_GLOBAL TRUE) 30 | add_library(morpheus_gtest ALIAS GTest::gtest) 31 | endif() 32 | 33 | morpheus_add_option( 34 | ENABLE_RAPID_TESTING OFF BOOL 35 | "Whether rapid testing is enabled during unit tests. Default: OFF") 36 | if(Morpheus_ENABLE_RAPID_TESTING) 37 | set(MORPHEUS_RAPID_TESTING ON) 38 | endif() 39 | global_set(Morpheus_ENABLE_RAPID_TESTING ${MORPHEUS_RAPID_TESTING}) 40 | 41 | message(STATUS "Morpheus_Gtest Library configured.") 42 | -------------------------------------------------------------------------------- /cmake/morpheus_test_cxx_std.cmake: -------------------------------------------------------------------------------- 1 | message(STATUS "TODO: Enforce cxx std17 or above") 2 | -------------------------------------------------------------------------------- /core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | morpheus_subpackage(Core) 2 | 3 | if(NOT Morpheus_INSTALL_TESTING) 4 | add_subdirectory(src) 5 | endif() 6 | 7 | morpheus_add_test_directories(tests) 8 | morpheus_add_benchmark_directories(benchmarks) 9 | morpheus_add_example_directories(examples) 10 | -------------------------------------------------------------------------------- /core/cmake/.clang-format: -------------------------------------------------------------------------------- 1 | { 2 | "DisableFormat": true, 3 | "SortIncludes": false, 4 | } -------------------------------------------------------------------------------- /core/cmake/MorpheusCore_config.hpp.in: -------------------------------------------------------------------------------- 1 | #if !defined(MORPHEUS_MACROS_HPP) || defined(MORPHEUS_CORE_CONFIG_H) 2 | #error \ 3 | "Do not include MorpheusCore_config.hpp directly; include Moprheus_Macros.hpp instead." 4 | #else 5 | #define MORPHEUS_CORE_CONFIG_HPP 6 | #endif 7 | 8 | // MORPHEUS_VERSION % 100 is the patch level 9 | // MORPHEUS_VERSION / 100 % 100 is the minor version 10 | // MORPHEUS_VERSION / 10000 is the major version 11 | #cmakedefine MORPHEUS_VERSION @MORPHEUS_VERSION@ 12 | #cmakedefine Morpheus_VERSION_MAJOR @Morpheus_VERSION_MAJOR@ 13 | #cmakedefine Morpheus_VERSION_MINOR @Morpheus_VERSION_MINOR@ 14 | #cmakedefine Morpheus_VERSION_PATCH @Morpheus_VERSION_PATCH@ 15 | 16 | /* Execution Spaces */ 17 | #cmakedefine MORPHEUS_ENABLE_SERIAL // Kokkos::Serial execution and memory spaces 18 | #cmakedefine MORPHEUS_ENABLE_OPENMP // Kokkos::OpenMP execution and memory spaces 19 | #cmakedefine MORPHEUS_ENABLE_CUDA // Kokkos::Cuda execution and memory spaces 20 | #cmakedefine MORPHEUS_ENABLE_HIP // Kokkos::HIP execution and memory spaces 21 | 22 | /* Define if building in debug mode */ 23 | #cmakedefine HAVE_MORPHEUS_DEBUG 24 | 25 | /* 26 | * Third Party Libraries 27 | */ 28 | #cmakedefine MORPHEUS_ENABLE_TPL_MPARK_VARIANT /* Mpark::variant */ 29 | #cmakedefine MORPHEUS_ENABLE_TPL_CUBLAS /* CUBLAS */ 30 | 31 | /* Testing */ 32 | #cmakedefine MORPHEUS_RAPID_TESTING -------------------------------------------------------------------------------- /core/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | message(STATUS "Core Examples are enabled") 2 | -------------------------------------------------------------------------------- /core/src/Morpheus_Dot.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Dot.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_DOT_HPP 25 | #define MORPHEUS_DOT_HPP 26 | 27 | #include 28 | 29 | namespace Morpheus { 30 | /** 31 | * \addtogroup dense_vector_algorithms DenseVector Algorithms 32 | * \brief Algorithms for the DenseVector container. 33 | * \ingroup algorithms 34 | * \{ 35 | * 36 | */ 37 | 38 | /** 39 | * @brief Computes the dot product of two vectors. 40 | * 41 | * @tparam ExecSpace Execution space to run the algorithm 42 | * @tparam Vector1 Type of vector x 43 | * @tparam Vector2 Type of vector y 44 | * @param n The number of vector elements to run the operation for 45 | * @param x The first input vector 46 | * @param y The second input vector 47 | * @return Vector2::value_type Scalar value of the result 48 | * 49 | */ 50 | template 51 | inline typename Vector2::value_type dot(typename Vector1::size_type n, 52 | const Vector1& x, const Vector2& y) { 53 | static_assert(is_dense_vector_format_container_v, 54 | "x must be a DenseVector container"); 55 | static_assert(is_dense_vector_format_container_v, 56 | "y must be a DenseVector container"); 57 | return Impl::dot(n, x, y); 58 | } 59 | /*! \} // end of dense_vector_algorithms group 60 | */ 61 | } // namespace Morpheus 62 | 63 | #endif // MORPHEUS_DOT_HPP -------------------------------------------------------------------------------- /core/src/Morpheus_FormatsRegistry.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_FormatsRegistry.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_FORMATSREGISTRY_HPP 25 | #define MORPHEUS_FORMATSREGISTRY_HPP 26 | 27 | #ifdef __cplusplus 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #include 37 | 38 | namespace Morpheus { 39 | 40 | template 41 | struct MatrixFormats { 42 | using formats_proxy = typename Impl::MatrixFormatsProxy< 43 | typename CooMatrix::type, 44 | typename CsrMatrix::type, 45 | typename DiaMatrix::type, 46 | typename EllMatrix::type, 47 | typename HybMatrix::type, 48 | typename HdcMatrix::type>::type; 49 | using variant = typename formats_proxy::variant; 50 | using type_list = typename formats_proxy::type_list; 51 | }; 52 | 53 | #endif 54 | 55 | // Enums should be in the same order as types in MatrixFormatsProxy 56 | enum formats_e { 57 | COO_FORMAT = 0, 58 | CSR_FORMAT, 59 | DIA_FORMAT, 60 | ELL_FORMAT, 61 | HYB_FORMAT, 62 | HDC_FORMAT, 63 | NFORMATS 64 | }; 65 | 66 | #ifdef __cplusplus 67 | } // namespace Morpheus 68 | #endif 69 | 70 | #endif // MORPHEUS_FORMATSREGISTRY_HPP -------------------------------------------------------------------------------- /core/src/Morpheus_Macros.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Macros.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_MACROS_HPP 25 | #define MORPHEUS_MACROS_HPP 26 | 27 | #include 28 | 29 | #if defined(MORPHEUS_ENABLE_CUDA) || defined(MORPHEUS_ENABLE_HIP) 30 | #define MORPHEUS_INLINE_FUNCTION inline __device__ __host__ 31 | #define MORPHEUS_LAMBDA [=] __device__ 32 | #else 33 | #define MORPHEUS_INLINE_FUNCTION inline 34 | #define MORPHEUS_LAMBDA [=] 35 | #endif 36 | 37 | #define MORPHEUS_FORCEINLINE_FUNCTION KOKKOS_FORCEINLINE_FUNCTION 38 | 39 | #endif // MORPHEUS_MACROS_HPP -------------------------------------------------------------------------------- /core/src/Morpheus_MatrixOptions.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_MatrixOperations.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_MATRIXOPTIONS_HPP 25 | #define MORPHEUS_MATRIXOPTIONS_HPP 26 | 27 | namespace Morpheus { 28 | 29 | typedef enum { 30 | MATSTR_NONE = 0, 31 | MATSTR_SYMMETRIC = 1, 32 | MATSTR_STRUCTURALLY_SYMMETRIC = 2, 33 | MATSTR_HERMITIAN = 3, 34 | MATSTR_SPD = 4, 35 | } MatrixStructure; 36 | 37 | typedef enum { 38 | MATOPT_NONE = 0, 39 | MATOPT_SHORT_ROWS = 1, 40 | } MatrixOptions; 41 | 42 | } // namespace Morpheus 43 | 44 | #endif // MORPHEUS_MATRIXOPTIONS_HPP -------------------------------------------------------------------------------- /core/src/Morpheus_Print.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Print.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_PRINT_HPP 25 | #define MORPHEUS_PRINT_HPP 26 | 27 | #include 28 | #include 29 | 30 | namespace Morpheus { 31 | 32 | template 33 | void print(const Printable& p, Stream& s) { 34 | Impl::print(p, s); 35 | } 36 | 37 | template 38 | void print(const Printable& p) { 39 | Morpheus::print(p, std::cout); 40 | } 41 | 42 | } // namespace Morpheus 43 | 44 | #endif // MORPHEUS_PRINT_HPP -------------------------------------------------------------------------------- /core/src/Morpheus_Reduction.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Reduction.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_REDUCTION_HPP 25 | #define MORPHEUS_REDUCTION_HPP 26 | 27 | #include 28 | 29 | namespace Morpheus { 30 | /** 31 | * \addtogroup dense_vector_algorithms DenseVector Algorithms 32 | * \ingroup algorithms 33 | * \{ 34 | * 35 | */ 36 | 37 | /** 38 | * @brief Performs a sum reduction on the contents of a vector. 39 | * 40 | * @tparam ExecSpace Execution space to run the algorithm 41 | * @tparam Vector Type of input vector 42 | * @param in The input vector 43 | * @param size The number of vector elements to run the operation for 44 | * @return Vector::value_type Scalar value of the result 45 | */ 46 | template 47 | typename Vector::value_type reduce(const Vector& in, 48 | typename Vector::size_type size) { 49 | static_assert(is_dense_vector_format_container_v, 50 | "in must be a DenseVector container"); 51 | return Impl::reduce(in, size); 52 | } 53 | /*! \} // end of dense_vector_algorithms group 54 | */ 55 | } // namespace Morpheus 56 | 57 | #endif // MORPHEUS_REDUCTION_HPP -------------------------------------------------------------------------------- /core/src/Morpheus_Sort.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Sort.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_SORT_HPP 25 | #define MORPHEUS_SORT_HPP 26 | 27 | #include 28 | #include 29 | 30 | namespace Morpheus { 31 | 32 | template 33 | void sort_by_row_and_column(Matrix& mat, 34 | typename Matrix::index_type min_row = 0, 35 | typename Matrix::index_type max_row = 0, 36 | typename Matrix::index_type min_col = 0, 37 | typename Matrix::index_type max_col = 0) { 38 | Impl::sort_by_row_and_column(mat, min_row, max_row, min_col, 39 | max_col); 40 | } 41 | 42 | template 43 | bool is_sorted(Matrix& mat) { 44 | return Impl::is_sorted(mat); 45 | } 46 | 47 | } // namespace Morpheus 48 | 49 | #endif // MORPHEUS_SORT_HPP -------------------------------------------------------------------------------- /core/src/dummy.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * dummy.cpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | namespace Morpheus { 25 | namespace AvoidCompilerWarnings { 26 | int dontComplain() { 27 | // keep the compiler from complaining about emptiness 28 | return 0; 29 | } 30 | } // namespace AvoidCompilerWarnings 31 | } // namespace Morpheus -------------------------------------------------------------------------------- /core/src/fwd/Morpheus_Fwd_CooMatrix.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Fwd_CooMatrix.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_FWD_COOMATRIX_HPP 25 | #define MORPHEUS_FWD_COOMATRIX_HPP 26 | 27 | namespace Morpheus { 28 | template 29 | class CooMatrix; 30 | } // namespace Morpheus 31 | 32 | #endif // MORPHEUS_FWD_COOMATRIX_HPP -------------------------------------------------------------------------------- /core/src/fwd/Morpheus_Fwd_CsrMatrix.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Fwd_CsrMatrix.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_FWD_CSRMATRIX_HPP 25 | #define MORPHEUS_FWD_CSRMATRIX_HPP 26 | 27 | namespace Morpheus { 28 | template 29 | class CsrMatrix; 30 | } // namespace Morpheus 31 | 32 | #endif // MORPHEUS_FWD_CSRMATRIX_HPP -------------------------------------------------------------------------------- /core/src/fwd/Morpheus_Fwd_DenseMatrix.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Fwd_DenseMatrix.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_FWD_DENSEMATRIX_HPP 25 | #define MORPHEUS_FWD_DENSEMATRIX_HPP 26 | 27 | namespace Morpheus { 28 | template 29 | class DenseMatrix; 30 | } // namespace Morpheus 31 | 32 | #endif // MORPHEUS_FWD_DENSEMATRIX_HPP -------------------------------------------------------------------------------- /core/src/fwd/Morpheus_Fwd_DenseVector.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Fwd_DenseVector.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_FWD_DENSEVECTOR_HPP 25 | #define MORPHEUS_FWD_DENSEVECTOR_HPP 26 | 27 | namespace Morpheus { 28 | /* Forward declaration */ 29 | template 30 | class DenseVector; 31 | 32 | /* Alias type to match std::vector */ 33 | template 34 | using vector = DenseVector; 35 | } // namespace Morpheus 36 | 37 | #endif // MORPHEUS_FWD_DENSEVECTOR_HPP -------------------------------------------------------------------------------- /core/src/fwd/Morpheus_Fwd_DiaMatrix.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Fwd_DiaMatrix.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_FWD_DIAMATRIX_HPP 25 | #define MORPHEUS_FWD_DIAMATRIX_HPP 26 | 27 | namespace Morpheus { 28 | template 29 | class DiaMatrix; 30 | } // namespace Morpheus 31 | 32 | #endif // MORPHEUS_FWD_DIAMATRIX_HPP -------------------------------------------------------------------------------- /core/src/fwd/Morpheus_Fwd_DynamicMatrix.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Fwd_DynamicMatrix.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_FWD_DYNAMICMATRIX_HPP 25 | #define MORPHEUS_FWD_DYNAMICMATRIX_HPP 26 | 27 | namespace Morpheus { 28 | template 29 | class DynamicMatrix; 30 | } // namespace Morpheus 31 | 32 | #endif // MORPHEUS_FWD_DYNAMICMATRIX_HPP -------------------------------------------------------------------------------- /core/src/fwd/Morpheus_Fwd_EllMatrix.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Fwd_EllMatrix.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_FWD_ELLMATRIX_HPP 25 | #define MORPHEUS_FWD_ELLMATRIX_HPP 26 | 27 | namespace Morpheus { 28 | template 29 | class EllMatrix; 30 | } // namespace Morpheus 31 | 32 | #endif // MORPHEUS_FWD_ELLMATRIX_HPP -------------------------------------------------------------------------------- /core/src/fwd/Morpheus_Fwd_FormatTraits.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Fwd_FormatTraits.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_FWD_FORMATTRAITS_HPP 25 | #define MORPHEUS_FWD_FORMATTRAITS_HPP 26 | 27 | namespace Morpheus { 28 | template 29 | class is_matrix_container; 30 | template 31 | class is_vector_container; 32 | } // namespace Morpheus 33 | 34 | #endif // MORPHEUS_FWD_FORMATTRAITS_HPP -------------------------------------------------------------------------------- /core/src/fwd/Morpheus_Fwd_HdcMatrix.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Fwd_HdcMatrix.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_FWD_HDCMATRIX_HPP 25 | #define MORPHEUS_FWD_HDCMATRIX_HPP 26 | 27 | namespace Morpheus { 28 | template 29 | class HdcMatrix; 30 | } // namespace Morpheus 31 | 32 | #endif // MORPHEUS_FWD_HDCMATRIX_HPP -------------------------------------------------------------------------------- /core/src/fwd/Morpheus_Fwd_HybMatrix.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Morpheus_Fwd_HybMatrix.hpp 3 | * 4 | * EPCC, The University of Edinburgh 5 | * 6 | * (c) 2021 - 2023 The University of Edinburgh 7 | * 8 | * Contributing Authors: 9 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #ifndef MORPHEUS_FWD_HYBMATRIX_HPP 25 | #define MORPHEUS_FWD_HYBMATRIX_HPP 26 | 27 | namespace Morpheus { 28 | template 29 | class HybMatrix; 30 | } // namespace Morpheus 31 | 32 | #endif // MORPHEUS_FWD_HYBMATRIX_HPP -------------------------------------------------------------------------------- /core/src/fwd/Morpheus_Fwd_MatrixBase.hpp: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Morpheus_Fwd_MatrixBase.hpp 4 | * 5 | * EPCC, The University of Edinburgh 6 | * 7 | * (c) 2021 - 2023 The University of Edinburgh 8 | * 9 | * Contributing Authors: 10 | * Christodoulos Stylianou (c.stylianou@ed.ac.uk) 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the "License"); 13 | * you may not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * http://www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an "AS IS" BASIS, 20 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #ifndef MORPHEUS_FWD_MATRIXBASE_HPP 26 | #define MORPHEUS_FWD_MATRIXBASE_HPP 27 | 28 | namespace Morpheus { 29 | namespace Impl { 30 | template