Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
Loading...
Searching...
No Matches
core
src
Teuchos_ExplicitInstantiationHelpers.hpp
Go to the documentation of this file.
1
// @HEADER
2
// ***********************************************************************
3
//
4
// Teuchos: Common Tools Package
5
// Copyright (2004) Sandia Corporation
6
//
7
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8
// license for use of this work by or on behalf of the U.S. Government.
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 TEUCHOS_EXPLICIT_INSTANTIATION_HELPERS_HPP
43
#define TEUCHOS_EXPLICIT_INSTANTIATION_HELPERS_HPP
44
45
53
#include "
Teuchos_ConfigDefs.hpp
"
54
55
56
//
57
// 2007/07/10: rabartl: NOTE: Semicolons must only be used at the lowest level
58
// of final code to ensure that there will not be any empty semicolon lines
59
// that might issue a compiler warning or error. In general, I like to define
60
// macros that need a semicolon when you use them because my emacs mode will
61
// then do the indentation correctly. However, this is not a big deal since
62
// these macros only get used in a final *.cpp file and at that point they are
63
// only used once in the entire mostly empty file.
64
//
65
66
#ifdef HAVE_TEUCHOS_INST_FLOAT
67
# define TEUCHOS_MACRO_TEMPLATE_INSTANT_FLOAT(INSTANT_MACRO)\
68
INSTANT_MACRO(float)
69
# define TEUCHOS_CLASS_TEMPLATE_INSTANT_FLOAT(CLASSNAME)\
70
template class CLASSNAME<float>;
71
#else
72
# define TEUCHOS_MACRO_TEMPLATE_INSTANT_FLOAT(INSTANT_MACRO)
73
# define TEUCHOS_CLASS_TEMPLATE_INSTANT_FLOAT(CLASSNAME)
74
#endif
75
76
77
#define TEUCHOS_MACRO_TEMPLATE_INSTANT_DOUBLE(INSTANT_MACRO)\
78
INSTANT_MACRO(double)
79
#define TEUCHOS_CLASS_TEMPLATE_INSTANT_DOUBLE(CLASSNAME)\
80
template class CLASSNAME<double>;
81
82
83
#ifdef HAVE_TEUCHOS_INST_COMPLEX_FLOAT
84
# define TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_FLOAT(INSTANT_MACRO)\
85
INSTANT_MACRO(std::complex<float>)
86
# define TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_FLOAT(CLASSNAME)\
87
template class CLASSNAME<std::complex<float> >;
88
#else
89
# define TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_FLOAT(INSTANT_MACRO)
90
# define TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_FLOAT(CLASSNAME)
91
#endif
92
93
94
#ifdef HAVE_TEUCHOS_INST_COMPLEX_DOUBLE
95
# define TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_DOUBLE(INSTANT_MACRO)\
96
INSTANT_MACRO(std::complex<double>)
97
# define TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_DOUBLE(CLASSNAME)\
98
template class CLASSNAME<std::complex<double> >;
99
#else
100
# define TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_DOUBLE(INSTANT_MACRO)
101
# define TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_DOUBLE(CLASSNAME)
102
#endif
103
104
#ifdef HAVE_TEUCHOS_LONG_DOUBLE
105
# define TEUCHOS_MACRO_TEMPLATE_INSTANT_LONG_DOUBLE(INSTANT_MACRO)\
106
INSTANT_MACRO(long double)
107
# define TEUCHOS_CLASS_TEMPLATE_INSTANT_LONG_DOUBLE(CLASSNAME)\
108
template class CLASSNAME<long double>;
109
#else
110
# define TEUCHOS_MACRO_TEMPLATE_INSTANT_LONG_DOUBLE(INSTANT_MACRO)
111
# define TEUCHOS_CLASS_TEMPLATE_INSTANT_LONG_DOUBLE(CLASSNAME)
112
#endif
113
114
115
#ifdef HAVE_TEUCHOSCORE_QUADMATH
116
# define TEUCHOS_MACRO_TEMPLATE_INSTANT_FLOAT128(INSTANT_MACRO)\
117
INSTANT_MACRO(__float128)
118
# define TEUCHOS_CLASS_TEMPLATE_INSTANT_FLOAT128(CLASSNAME)\
119
template class CLASSNAME<__float128>;
120
#else
121
# define TEUCHOS_MACRO_TEMPLATE_INSTANT_FLOAT128(INSTANT_MACRO)
122
# define TEUCHOS_CLASS_TEMPLATE_INSTANT_FLOAT128(CLASSNAME)
123
#endif
// HAVE_TEUCHOSCORE_QUADMATH
124
125
129
#define TEUCHOS_MACRO_TEMPLATE_INSTANT_REAL_SCALAR_TYPES(MACRONAME) \
130
TEUCHOS_MACRO_TEMPLATE_INSTANT_FLOAT(MACRONAME) \
131
TEUCHOS_MACRO_TEMPLATE_INSTANT_DOUBLE(MACRONAME)
132
133
137
#define TEUCHOS_MACRO_TEMPLATE_INSTANT_SCALAR_TYPES(MACRONAME)\
138
TEUCHOS_MACRO_TEMPLATE_INSTANT_FLOAT(MACRONAME) \
139
TEUCHOS_MACRO_TEMPLATE_INSTANT_DOUBLE(MACRONAME) \
140
TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_FLOAT(MACRONAME) \
141
TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_DOUBLE(MACRONAME)
142
143
147
#define TEUCHOS_CLASS_TEMPLATE_INSTANT_REAL_SCALAR_TYPES(CLASSNAME)\
148
TEUCHOS_CLASS_TEMPLATE_INSTANT_FLOAT(CLASSNAME) \
149
TEUCHOS_CLASS_TEMPLATE_INSTANT_DOUBLE(CLASSNAME)
150
151
155
#define TEUCHOS_CLASS_TEMPLATE_INSTANT_SCALAR_TYPES(CLASSNAME)\
156
TEUCHOS_CLASS_TEMPLATE_INSTANT_FLOAT(CLASSNAME) \
157
TEUCHOS_CLASS_TEMPLATE_INSTANT_DOUBLE(CLASSNAME) \
158
TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_FLOAT(CLASSNAME) \
159
TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_DOUBLE(CLASSNAME)
160
161
162
#endif
// TEUCHOS_EXPLICIT_INSTANTIATION_HELPERS_HPP
Teuchos_ConfigDefs.hpp
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
Generated by
1.9.6