Amesos2 - Direct Sparse Solver Interfaces  Version of the Day
Amesos2_CssMKL_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 
10 
21 #ifndef AMESOS2_CSSMKL_FUNCTIONMAP_HPP
22 #define AMESOS2_CSSMKL_FUNCTIONMAP_HPP
23 
24 #ifdef HAVE_TEUCHOS_COMPLEX
25 #include <complex>
26 #endif
27 
28 #include "Amesos2_FunctionMap.hpp"
30 
31 
32 namespace Amesos2 {
33 
34  namespace PMKL {
35  #ifdef __MKL_PARDISO_H
36  #undef __MKL_PARDISO_H
37  #endif
38  #include "mkl_pardiso.h"
39  #ifdef __MKL_CLUSTER_SPARSE_SOLVER_H
40  #undef __MKL_CLUSTER_SPARSE_SOLVER_H
41  #endif
42  #include "mkl_cluster_sparse_solver.h"
43  }
44 
53  template <>
54  struct FunctionMap<CssMKL,PMKL::_INTEGER_t>
55  {
56  static void cluster_sparse_solver( void* pt,
57  PMKL::_INTEGER_t* maxfct, PMKL::_INTEGER_t* mnum,
58  PMKL::_INTEGER_t* mtype , PMKL::_INTEGER_t* phase,
59  PMKL::_INTEGER_t* n , void* a, PMKL::_INTEGER_t* ia,
60  PMKL::_INTEGER_t* ja , PMKL::_INTEGER_t* perm,
61  PMKL::_INTEGER_t* nrhs , PMKL::_INTEGER_t* iparm,
62  PMKL::_INTEGER_t* msglvl, void* b, void* x,
63  const MPI_Fint * comm , PMKL::_INTEGER_t* error)
64  {
65  PMKL::cluster_sparse_solver(pt, maxfct, mnum, mtype, phase, n, a, ia, ja,
66  perm, nrhs, iparm, msglvl, b, x, comm, error);
67  }
68  };
69 
70 
71  template <>
72  struct FunctionMap<CssMKL,long long int>
73  {
74  static void cluster_sparse_solver( void* pt,
75  long long int* maxfct, long long int* mnum,
76  long long int* mtype , long long int* phase,
77  long long int* n , void* a, long long int* ia,
78  long long int* ja , long long int* perm,
79  long long int* nrhs , long long int* iparm,
80  long long int* msglvl, void* b, void* x,
81  const MPI_Fint* comm , long long int* error)
82  {
83  PMKL::cluster_sparse_solver_64(pt, maxfct, mnum, mtype, phase, n, a, ia, ja,
84  perm, nrhs, iparm, msglvl, b, x, comm, error);
85  }
86  };
87 } // end namespace Amesos2
88 
89 #endif // AMESOS2_NEWSOLVER_FUNCTIONMAP_HPP
Provides definition of CssMKL types as well as conversions and type traits. For the purpose of demons...
Declaration of Function mapping class for Amesos2.
Amesos2 interface to the CssMKL package.
Definition: Amesos2_CssMKL_decl.hpp:49
Passes functions to TPL functions based on type.
Definition: Amesos2_FunctionMap.hpp:42