Morpheus 1.0.0
Dynamic matrix type and algorithms for sparse matrices
Loading...
Searching...
No Matches
Morpheus_FormatsRegistry.hpp
1
24#ifndef MORPHEUS_FORMATSREGISTRY_HPP
25#define MORPHEUS_FORMATSREGISTRY_HPP
26
27#ifdef __cplusplus
28
29#include <fwd/Morpheus_Fwd_CooMatrix.hpp>
30#include <fwd/Morpheus_Fwd_CsrMatrix.hpp>
31#include <fwd/Morpheus_Fwd_DiaMatrix.hpp>
32
33#include <impl/Morpheus_MatrixProxy.hpp>
34
35namespace Morpheus {
36
37template <class ValueType, class... Properties>
39 using formats_proxy = typename Impl::MatrixFormatsProxy<
40 typename CooMatrix<ValueType, Properties...>::type,
41 typename CsrMatrix<ValueType, Properties...>::type,
42 typename DiaMatrix<ValueType, Properties...>::type>::type;
43 using variant = typename formats_proxy::variant;
44 using type_list = typename formats_proxy::type_list;
45};
46
47#endif
48
49// Enums should be in the same order as types in MatrixFormatsProxy
50enum formats_e { COO_FORMAT = 0, CSR_FORMAT, DIA_FORMAT, NFORMATS };
51
52#ifdef __cplusplus
53} // namespace Morpheus
54#endif
55
56#endif // MORPHEUS_FORMATSREGISTRY_HPP
Implementation of the Coordinate (COO) Sparse Matrix Format Representation.
Definition: Morpheus_CooMatrix.hpp:91
Implementation of the Compressed-Sparse Row (CSR) Sparse Matrix Format Representation.
Definition: Morpheus_CsrMatrix.hpp:91
Implementation of the Diagonal (DIA) Sparse Matrix Format Representation.
Definition: Morpheus_DiaMatrix.hpp:97
Generic Morpheus interfaces.
Definition: dummy.cpp:24
Definition: Morpheus_MatrixProxy.hpp:34
Definition: Morpheus_FormatsRegistry.hpp:38
A wrapper that checks if the provided type is a scalar type.
Definition: Morpheus_TypeTraits.hpp:85