Teuchos_ExplicitInstantiationHelpers.hpp

00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //                    Teuchos: Common Tools Package
00005 //                 Copyright (2004) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef TEUCHOS_EXPLICIT_INSTANTIATION_HELPERS_HPP
00030 #define TEUCHOS_EXPLICIT_INSTANTIATION_HELPERS_HPP
00031 
00032 
00039 #include "Teuchos_ConfigDefs.hpp"
00040 
00041 
00042 //
00043 // 2007/07/10: rabartl: NOTE: Semicolons must only be used at the lowest level
00044 // of final code to ensure that there will not be any empty semicolon lines
00045 // that might issue a compiler warning or error. In general, I like to define
00046 // macros that need a semicolon when you use them because my emacs mode will
00047 // then do the indentation correctly.  However, this is not a big deal since
00048 // these macros only get used in a final *.cpp file and at that point they are
00049 // only used once in the entire mostly empty file.
00050 //
00051 
00052 #ifdef HAVE_TEUCHOS_FLOAT
00053 #  define TEUCHOS_MACRO_TEMPLATE_INSTANT_FLOAT(INSTANT_MACRO)\
00054     INSTANT_MACRO(float)
00055 #  define TEUCHOS_CLASS_TEMPLATE_INSTANT_FLOAT(CLASSNAME)\
00056     template class CLASSNAME<float>;
00057 #else
00058 #  define TEUCHOS_MACRO_TEMPLATE_INSTANT_FLOAT(INSTANT_MACRO)
00059 #  define TEUCHOS_CLASS_TEMPLATE_INSTANT_FLOAT(CLASSNAME)
00060 #endif
00061 
00062 
00063 #define TEUCHOS_MACRO_TEMPLATE_INSTANT_DOUBLE(INSTANT_MACRO)\
00064   INSTANT_MACRO(double)
00065 #define TEUCHOS_CLASS_TEMPLATE_INSTANT_DOUBLE(CLASSNAME)\
00066   template class CLASSNAME<double>;
00067 
00068 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(HAVE_TEUCHOS_FLOAT)
00069 #  define TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_FLOAT(INSTANT_MACRO)\
00070      INSTANT_MACRO(std::complex<float>)
00071 #  define TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_FLOAT(CLASSNAME)\
00072      template class CLASSNAME<std::complex<float> >;
00073 #else
00074 #  define TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_FLOAT(INSTANT_MACRO)
00075 #  define TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_FLOAT(CLASSNAME)
00076 #endif
00077 
00078 
00079 #ifdef HAVE_TEUCHOS_COMPLEX
00080 #  define TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_DOUBLE(INSTANT_MACRO)\
00081      INSTANT_MACRO(std::complex<double>)
00082 #  define TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_DOUBLE(CLASSNAME)\
00083      template class CLASSNAME<std::complex<double> >;
00084 #else
00085 #  define TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_DOUBLE(INSTANT_MACRO)
00086 #  define TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_DOUBLE(CLASSNAME)
00087 #endif
00088 
00089 
00093 #define TEUCHOS_MACRO_TEMPLATE_INSTANT_REAL_SCALAR_TYPES(MACRONAME) \
00094   TEUCHOS_MACRO_TEMPLATE_INSTANT_FLOAT(MACRONAME) \
00095   TEUCHOS_MACRO_TEMPLATE_INSTANT_DOUBLE(MACRONAME)
00096 
00097 
00101 #define TEUCHOS_MACRO_TEMPLATE_INSTANT_SCALAR_TYPES(MACRONAME)\
00102   TEUCHOS_MACRO_TEMPLATE_INSTANT_FLOAT(MACRONAME) \
00103   TEUCHOS_MACRO_TEMPLATE_INSTANT_DOUBLE(MACRONAME) \
00104   TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_FLOAT(MACRONAME) \
00105   TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_DOUBLE(MACRONAME)
00106 
00107 
00111 #define TEUCHOS_CLASS_TEMPLATE_INSTANT_REAL_SCALAR_TYPES(CLASSNAME)\
00112   TEUCHOS_CLASS_TEMPLATE_INSTANT_FLOAT(CLASSNAME) \
00113   TEUCHOS_CLASS_TEMPLATE_INSTANT_DOUBLE(CLASSNAME)
00114 
00115 
00119 #define TEUCHOS_CLASS_TEMPLATE_INSTANT_SCALAR_TYPES(CLASSNAME)\
00120   TEUCHOS_CLASS_TEMPLATE_INSTANT_FLOAT(CLASSNAME) \
00121   TEUCHOS_CLASS_TEMPLATE_INSTANT_DOUBLE(CLASSNAME) \
00122   TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_FLOAT(CLASSNAME) \
00123   TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_DOUBLE(CLASSNAME)
00124 
00125 
00126 #endif  // TEUCHOS_EXPLICIT_INSTANTIATION_HELPERS_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 09:57:43 2011 for Teuchos - Trilinos Tools Package by  doxygen 1.6.3