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