Tpetra parallel linear algebra  Version of the Day
Tpetra_ExplicitInstantiationHelpers.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Tpetra: Templated Linear Algebra Services Package
5 // Copyright (2008) Sandia Corporation
6 //
7 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
8 // the U.S. Government retains certain rights in this software.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38 //
39 // ************************************************************************
40 // @HEADER
41 
42 #ifndef TPETRA_EXPLICIT_INSTANTIATION_HELPERS_HPP
43 #define TPETRA_EXPLICIT_INSTANTIATION_HELPERS_HPP
44 
53 #include "Tpetra_ConfigDefs.hpp"
54 
55 //
56 // 2007/07/10: rabartl: NOTE: Semicolons must only be used at the lowest level
57 // of final code to ensure that there will not be any empty semicolon lines
58 // that might issue a compiler warning or error. In general, I like to define
59 // macros that need a semicolon when you use them because my emacs mode will
60 // then do the indentation correctly. However, this is not a big deal since
61 // these macros only get used in a final *.cpp file and at that point they are
62 // only used once in the entire mostly empty file.
63 //
64 
65 #define TPETRA_MACRO_TEMPLATE_INSTANT_ALL_CPUNODE(SCALAR,LO,GO,MACRO)
66 
67 #ifdef HAVE_TPETRA_INST_FLOAT
68 # define TPETRA_MACRO_TEMPLATE_INSTANT_FLOAT_ALL_CPUNODE(LO,GO,MACRO)\
69  TPETRA_MACRO_TEMPLATE_INSTANT_ALL_CPUNODE(float,LO,GO,MACRO)
70 #else
71 # define TPETRA_MACRO_TEMPLATE_INSTANT_FLOAT_ALL_CPUNODE(LO,GO,MACRO)
72 #endif
73 
74 #ifdef HAVE_TPETRA_INST_DOUBLE
75 # define TPETRA_MACRO_TEMPLATE_INSTANT_DOUBLE_ALL_CPUNODE(LO,GO,MACRO)\
76  TPETRA_MACRO_TEMPLATE_INSTANT_ALL_CPUNODE(double,LO,GO,MACRO)
77 #else
78 # define TPETRA_MACRO_TEMPLATE_INSTANT_DOUBLE_ALL_CPUNODE(LO,GO,MACRO)
79 #endif
80 
81 #ifdef HAVE_INST_TPETRA_COMPLEX_FLOAT
82 # define TPETRA_MACRO_TEMPLATE_INSTANT_COMPLEX_FLOAT_ALL_CPUNODE(LO,GO,MACRO)\
83  TPETRA_MACRO_TEMPLATE_INSTANT_ALL_CPUNODE(std::complex<float>,LO,GO,MACRO)
84 #else
85 # define TPETRA_MACRO_TEMPLATE_INSTANT_COMPLEX_FLOAT_ALL_CPUNODE(LO,GO,MACRO)
86 #endif
87 
88 #ifdef HAVE_INST_TPETRA_COMPLEX_DOUBLE
89 # define TPETRA_MACRO_TEMPLATE_INSTANT_COMPLEX_DOUBLE_ALL_CPUNODE(LO,GO,MACRO)\
90  TPETRA_MACRO_TEMPLATE_INSTANT_ALL_CPUNODE(std::complex<double>,LO,GO,MACRO)
91 #else
92 # define TPETRA_MACRO_TEMPLATE_INSTANT_COMPLEX_DOUBLE_ALL_CPUNODE(LO,GO,MACRO)
93 #endif
94 
95 #define TPETRA_MACRO_TEMPLATE_INSTANT_ALL_SCALAR_CPUNODE(LO,GO,MACRO)\
96  TPETRA_MACRO_TEMPLATE_INSTANT_FLOAT_ALL_CPUNODE(LO,GO,MACRO)\
97  TPETRA_MACRO_TEMPLATE_INSTANT_DOUBLE_ALL_CPUNODE(LO,GO,MACRO)\
98  TPETRA_MACRO_TEMPLATE_INSTANT_COMPLEX_FLOAT_ALL_CPUNODE(LO,GO,MACRO)\
99  TPETRA_MACRO_TEMPLATE_INSTANT_COMPLEX_DOUBLE_ALL_CPUNODE(LO,GO,MACRO)\
100  TPETRA_MACRO_TEMPLATE_INSTANT_ALL_CPUNODE(int,LO,GO,MACRO)
101 
103 #define TPETRA_MACRO_TEMPLATE_INSTANT_ALL_SCALAR_NODE(LO,GO,MACRO)\
104  TPETRA_MACRO_TEMPLATE_INSTANT_ALL_SCALAR_CPUNODE(LO,GO,MACRO)
105 
108 #define TPETRA_MACRO_TEMPLATE_INSTANT_ALL_SCALAR_ORDINAL_NODES(MACRO)\
109  TPETRA_MACRO_TEMPLATE_INSTANT_ALL_SCALAR_NODE(short,int,MACRO)\
110  TPETRA_MACRO_TEMPLATE_INSTANT_ALL_SCALAR_NODE(int,int,MACRO)
111 
112 #endif // TPETRA_EXPLICIT_INSTANTIATION_HELPERS_HPP