Amesos2 - Direct Sparse Solver Interfaces Version of the Day
Amesos2_Tacho_TypeMap.hpp
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
10#ifndef AMESOS2_TACHO_TYPEMAP_HPP
11#define AMESOS2_TACHO_TYPEMAP_HPP
12
13#include <functional>
14#ifdef HAVE_TEUCHOS_COMPLEX
15#include <complex>
16#endif
17
18#include <Teuchos_as.hpp>
19#ifdef HAVE_TEUCHOS_COMPLEX
20#include <Teuchos_SerializationTraits.hpp>
21#endif
22
23#include "Amesos2_TypeMap.hpp"
24
25namespace Amesos2 {
26
27template <class, class> class TachoSolver;
28
29/* Specialize the Amesos2::TypeMap struct for Tacho types
30 *
31 * \cond Tacho_type_specializations
32 */
33
34template <>
35struct TypeMap<TachoSolver,float>
36{
37 typedef float type;
38 typedef float magnitude_type;
39};
40
41template <>
42struct TypeMap<TachoSolver,double>
43{
44 typedef double type;
45 typedef double magnitude_type;
46};
47
48
49#ifdef HAVE_TEUCHOS_COMPLEX
50
51
52template <>
53struct TypeMap<TachoSolver,std::complex<float> >
54{
55 typedef Kokkos::complex<float> type;
56 typedef float magnitude_type;
57};
58
59template <>
60struct TypeMap<TachoSolver,std::complex<double> >
61{
62 typedef Kokkos::complex<double> type;
63 typedef double magnitude_type;
64};
65
66template <>
67struct TypeMap<TachoSolver,Kokkos::complex<float> >
68{
69 typedef Kokkos::complex<float> type;
70 typedef float magnitude_type;
71};
72
73template <>
74struct TypeMap<TachoSolver,Kokkos::complex<double> >
75{
76 typedef Kokkos::complex<double> type;
77 typedef double magnitude_type;
78};
79
80#endif // HAVE_TEUCHOS_COMPLEX
81
82/* \endcond Tacho_type_specializations */
83
84
85} // end namespace Amesos2
86
87#endif // AMESOS2_TACHO_TYPEMAP_HPP