Amesos2 - Direct Sparse Solver Interfaces Version of the Day
Amesos2_Cholmod_TypeMap.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Amesos2: Templated Direct Sparse Solver Package
4//
5// Copyright 2011 NTESS and the Amesos2 contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
19#ifndef AMESOS2_CHOLMOD_TYPEMAP_HPP
20#define AMESOS2_CHOLMOD_TYPEMAP_HPP
21
22#include <functional>
23#ifdef HAVE_TEUCHOS_COMPLEX
24#include <complex>
25#endif
26
27#include <Teuchos_as.hpp>
28#ifdef HAVE_TEUCHOS_COMPLEX
29#include <Teuchos_SerializationTraits.hpp>
30#endif
31
32#include "Amesos2_TypeMap.hpp"
33
34namespace Amesos2 {
35
36 // forward declaration due to circular reference
37 template <class, class> class Cholmod;
38
39 template <>
40 struct TypeMap<Cholmod,float> // Cholmod does not support float yet
41 {
42 typedef float type;
43 typedef float magnitude_type;
44 };
45
46 template <>
47 struct TypeMap<Cholmod,double>
48 {
49 typedef double type;
50 typedef double magnitude_type;
51 };
52
53#ifdef HAVE_TEUCHOS_COMPLEX
54
55 template <>
56 struct TypeMap<Cholmod,std::complex<double> >
57 {
58 typedef Kokkos::complex<double> type;
59 typedef double magnitude_type;
60 };
61
62 template <>
63 struct TypeMap<Cholmod,Kokkos::complex<double> >
64 {
65 typedef Kokkos::complex<double> type;
66 typedef double magnitude_type;
67 };
68
69 template <>
70 struct TypeMap<Cholmod,std::complex<float> > // Cholmod does not support float yet
71 {
72 typedef Kokkos::complex<float> type;
73 typedef float magnitude_type;
74 };
75
76 template <>
77 struct TypeMap<Cholmod,Kokkos::complex<float> > // Cholmod does not support float yet
78 {
79 typedef Kokkos::complex<float> type;
80 typedef float magnitude_type;
81 };
82
83#endif // HAVE_TEUCHOS_COMPLEX
84
85 /* \endcond Choldmod_type_specializations */
86
87} // end namespace Amesos
88
89#endif // AMESOS2_CHOLMOD_TYPEMAP_HPP