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 
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 
00058 #define TEUCHOS_MACRO_TEMPLATE_INSTANT_DOUBLE(INSTANT_MACRO)\
00059   INSTANT_MACRO(double)
00060 #define TEUCHOS_CLASS_TEMPLATE_INSTANT_DOUBLE(CLASSNAME)\
00061   template class CLASSNAME<double>;
00062 
00063 #ifdef HAVE_TEUCHOS_COMPLEX
00064 
00065 #  define TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_FLOAT(INSTANT_MACRO)\
00066      INSTANT_MACRO(std::complex<float>)
00067 #  define TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_FLOAT(CLASSNAME)\
00068      template class CLASSNAME<std::complex<float> >;
00069 
00070 #  define TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_DOUBLE(INSTANT_MACRO)\
00071      INSTANT_MACRO(std::complex<double>)
00072 #  define TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_DOUBLE(CLASSNAME)\
00073      template class CLASSNAME<std::complex<double> >;
00074 
00075 #endif
00076 
00077 
00080 #define TEUCHOS_MACRO_TEMPLATE_INSTANT_SCALAR_TYPES(MACRONAME)\
00081   TEUCHOS_MACRO_TEMPLATE_INSTANT_FLOAT(MACRONAME) \
00082   TEUCHOS_MACRO_TEMPLATE_INSTANT_DOUBLE(MACRONAME) \
00083   TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_FLOAT(MACRONAME) \
00084   TEUCHOS_MACRO_TEMPLATE_INSTANT_COMPLEX_DOUBLE(MACRONAME)
00085 
00086 
00089 #define TEUCHOS_CLASS_TEMPLATE_INSTANT_SCALAR_TYPES(CLASSNAME)\
00090   TEUCHOS_CLASS_TEMPLATE_INSTANT_FLOAT(CLASSNAME) \
00091   TEUCHOS_CLASS_TEMPLATE_INSTANT_DOUBLE(CLASSNAME) \
00092   TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_FLOAT(CLASSNAME) \
00093   TEUCHOS_CLASS_TEMPLATE_INSTANT_COMPLEX_DOUBLE(CLASSNAME)
00094 
00095 
00096 #endif  // TEUCHOS_EXPLICIT_INSTANTIATION_HELPERS_HPP

Generated on Wed May 12 21:40:32 2010 for Teuchos - Trilinos Tools Package by  doxygen 1.4.7