Debian Codegraph @

packages/belos/tpetra/src/Belos_Details_Tpetra_registerLinearSolverFactory.cpp

raw
1 // @HEADER
2 // *****************************************************************************
3 // Belos: Block Linear Solvers Package
4 //
5 // Copyright 2004-2016 NTESS and the Belos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9
10 #include "BelosConfigDefs.hpp"
11
12 #ifdef HAVE_BELOS_TPETRA
13 # include "BelosTpetraAdapter.hpp" // must go first
14 # include "Belos_Details_registerLinearSolverFactory.hpp"
15 # include "Belos_Details_LinearSolverFactory.hpp"
16 # include "TpetraCore_ETIHelperMacros.h"
17
18 // Define Tpetra instantiation macros and typedefs that make the
19 // macros work. The fix for Bug 6380 makes this work whether or not
20 // ETI is ON. We use the Tpetra macros because Belos doesn't have
21 // its own macros.
22 TPETRA_ETI_MANGLING_TYPEDEFS()
23
24 // Macro that registers Belos's LinearSolverFactory for Tpetra
25 // objects, for the given four template parameters (Scalar = SC,
26 // LocalOrdinal = LO, GlobalOrdinal = GO, Node = NT). The macro is
27 // local to this file.
28 //
29 // NOTE: This macro does NOT do explicit instantiation! That's why I
30 // call it LCL_CALL and not LCL_INST. We are just using the macros to
31 // invoke this class method over the set of enabled template
32 // parameters.
33 #define LCL_CALL( SC, LO, GO, NT ) \
34 ::Belos::Details::LinearSolverFactory< ::Tpetra::MultiVector<SC, LO, GO, NT>, \
35 ::Tpetra::Operator<SC, LO, GO, NT>, \
36 SC, \
37 typename ::Tpetra::MultiVector<SC, LO, GO, NT>::mag_type>::registerLinearSolverFactory ();
38
39 namespace Belos {
40 namespace Details {
41 namespace Tpetra {
42
43 void
44 registerLinearSolverFactory ()
45 {
46 // Fill in the body of the function with all the type-specific
47 // run-time registration functions, for registering Belos's
48 // LinearSolverFactory with Tpetra objects.
49 TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR( LCL_CALL )
50 }
51
52 } // namespace Tpetra
53 } // namespace Details
54 } // namespace Belos
55
56 #endif // HAVE_BELOS_TPETRA
57