Amesos2 - Direct Sparse Solver Interfaces Version of the Day
Amesos2_cuSOLVER_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_CUSOLVER_TYPEMAP_HPP
11#define AMESOS2_CUSOLVER_TYPEMAP_HPP
12
13#include <functional>
14#ifdef HAVE_TEUCHOS_COMPLEX
15#include <complex>
16#endif
17
18#include "Amesos2_TypeMap.hpp"
19
20namespace Amesos2 {
21
22 // forward declaration due to circular reference
23 template <class, class> class cuSOLVER;
24
25 template <>
26 struct TypeMap<cuSOLVER,float>
27 {
28 typedef float type;
29 typedef float magnitude_type;
30 };
31
32 template <>
33 struct TypeMap<cuSOLVER,double>
34 {
35 typedef double type;
36 typedef double magnitude_type;
37 };
38
39#ifdef HAVE_TEUCHOS_COMPLEX
40
41 template <>
42 struct TypeMap<cuSOLVER,std::complex<float> >
43 {
44 typedef Kokkos::complex<float> type;
45 typedef float magnitude_type;
46 };
47
48 template <>
49 struct TypeMap<cuSOLVER,Kokkos::complex<float> >
50 {
51 typedef Kokkos::complex<float> type;
52 typedef float magnitude_type;
53 };
54
55 template <>
56 struct TypeMap<cuSOLVER,std::complex<double> >
57 {
58 typedef Kokkos::complex<double> type;
59 typedef double magnitude_type;
60 };
61
62 template <>
63 struct TypeMap<cuSOLVER,Kokkos::complex<double> >
64 {
65 typedef Kokkos::complex<double> type;
66 typedef double magnitude_type;
67 };
68
69#endif // HAVE_TEUCHOS_COMPLEX
70
71} // end namespace Amesos
72
73#endif // AMESOS2_CUSOLVER_TYPEMAP_HPP