Amesos2 - Direct Sparse Solver Interfaces Version of the Day
Amesos2_ShyLUBasker_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
21#ifndef AMESOS2_SHYLUBASKER_TYPEMAP_HPP
22#define AMESOS2_SHYLUBASKER_TYPEMAP_HPP
23
24#include <functional>
25#ifdef HAVE_TEUCHOS_COMPLEX
26#include <complex>
27#endif
28
29#include <Teuchos_as.hpp>
30#ifdef HAVE_TEUCHOS_COMPLEX
31#include <Teuchos_SerializationTraits.hpp>
32#endif
33
34#include "Amesos2_TypeMap.hpp"
35
36namespace Amesos2 {
37
38template <class, class> class ShyLUBasker;
39
40/* Specialize the Amesos2::TypeMap struct for ShyLUBasker types
41 * TODO: Mostly dummy assignments as ShyLUBasker is templated. Remove if possible.
42 *
43 * \cond ShyLUBasker_type_specializations
44 */
45
46template <>
47struct TypeMap<ShyLUBasker,float>
48{
49 typedef float dtype;
50 typedef float type;
51};
52
53template <>
54struct TypeMap<ShyLUBasker,double>
55{
56 typedef double dtype;
57 typedef double type;
58};
59
60
61#ifdef HAVE_TEUCHOS_COMPLEX
62
63template <>
64struct TypeMap<ShyLUBasker,std::complex<float> >
65{
66 typedef std::complex<float> dtype;
67 typedef Kokkos::complex<float> type;
68};
69
70template <>
71struct TypeMap<ShyLUBasker,std::complex<double> >
72{
73 typedef std::complex<double> dtype;
74 typedef Kokkos::complex<double> type;
75};
76
77template <>
78struct TypeMap<ShyLUBasker,Kokkos::complex<float> >
79{
80 typedef std::complex<float> dtype;
81 typedef Kokkos::complex<float> type;
82};
83
84template <>
85struct TypeMap<ShyLUBasker,Kokkos::complex<double> >
86{
87 typedef std::complex<double> dtype;
88 typedef Kokkos::complex<double> type;
89};
90
91#endif // HAVE_TEUCHOS_COMPLEX
92
93/* \endcond ShyLUBasker_type_specializations */
94
95
96} // end namespace Amesos2
97
98#endif // AMESOS2_SHYLUBASKER_TYPEMAP_HPP