Amesos2 - Direct Sparse Solver Interfaces  Version of the Day
Amesos2_ShyLUBasker_FunctionMap.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 
19 #ifndef AMESOS2_SHYLUBASKER_FUNCTIONMAP_HPP
20 #define AMESOS2_SHYLUBASKER_FUNCTIONMAP_HPP
21 
22 #ifdef HAVE_TEUCHOS_COMPLEX
23 #include <complex>
24 #endif
25 
26 #include "Amesos2_FunctionMap.hpp"
28 
29 //#include "shylubasker_decl.hpp"
30 //#include "shylubasker_def.hpp"
31 //#include "shylubasker_trilinos_decl.hpp"
32 
33 namespace Amesos2 {
34 
35  /* ==================== Specializations ====================
36  *
37  * \cond ShyLUBasker_function_specializations
38  */
39 
44 #ifdef HAVE_TEUCHOS_COMPLEX
45  template <>
46  struct FunctionMap<ShyLUBasker,Kokkos::complex<double>>
47  {
48  static std::complex<double> * convert_scalar(Kokkos::complex<double> * pData) {
49  return reinterpret_cast<std::complex<double> *>(pData);
50  }
51  };
52 
53 #endif // HAVE_TEUCHOS_COMPLEX
54 
55  // if not specialized, then assume generic conversion is fine
56  template <typename scalar_t>
57  struct FunctionMap<ShyLUBasker,scalar_t>
58  {
59  static scalar_t * convert_scalar(scalar_t * pData) {
60  return pData; // no conversion necessary
61  }
62  };
63 
64 
65  /* \endcond ShyLUBasker_function_specializations */
66 
67 
68 } // end namespace Amesos2
69 
70 #endif // AMESOS2_SHYLUBASKER_FUNCTIONMAP_HPP
Provides definition of ShyLUBasker types as well as conversions and type traits.
Declaration of Function mapping class for Amesos2.