Teuchos_ConfigDefs.hpp

Go to the documentation of this file.
00001 /*
00002 // @HEADER
00003 // ***********************************************************************
00004 // 
00005 //                    Teuchos: Common Tools Package
00006 //                 Copyright (2004) Sandia Corporation
00007 // 
00008 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00009 // license for use of this work by or on behalf of the U.S. Government.
00010 // 
00011 // This library is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Lesser General Public License as
00013 // published by the Free Software Foundation; either version 2.1 of the
00014 // License, or (at your option) any later version.
00015 //  
00016 // This library is distributed in the hope that it will be useful, but
00017 // WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 // Lesser General Public License for more details.
00020 //  
00021 // You should have received a copy of the GNU Lesser General Public
00022 // License along with this library; if not, write to the Free Software
00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024 // USA
00025 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00026 // 
00027 // ***********************************************************************
00028 // @HEADER
00029 */
00030 
00031 #ifndef TEUCHOS_CONFIGDEFS_HPP
00032 #define TEUCHOS_CONFIGDEFS_HPP
00033 
00039 /*
00040  * The macros PACKAGE, PACKAGE_NAME, etc, get defined for each package and need to
00041  * be undef'd here to avoid warnings when this file is included from another package.
00042  * KL 11/25/02
00043  */
00044 
00045 #ifdef PACKAGE
00046 #undef PACKAGE
00047 #endif
00048 
00049 #ifdef PACKAGE_NAME
00050 #undef PACKAGE_NAME
00051 #endif
00052 
00053 #ifdef PACKAGE_BUGREPORT
00054 #undef PACKAGE_BUGREPORT
00055 #endif
00056 
00057 #ifdef PACKAGE_STRING
00058 #undef PACKAGE_STRING
00059 #endif
00060 
00061 #ifdef PACKAGE_TARNAME
00062 #undef PACKAGE_TARNAME
00063 #endif
00064 
00065 #ifdef PACKAGE_VERSION
00066 #undef PACKAGE_VERSION
00067 #endif
00068 
00069 #ifdef VERSION
00070 #undef VERSION
00071 #endif
00072 
00073 #include "Teuchos_config.h"
00074 
00075 #ifdef HAVE_TEUCHOS_DEBUG
00076 #  define TEUCHOS_DEBUG
00077 #  define HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00078 #endif
00079 
00080 #ifdef __cplusplus
00081 
00082 #if defined(HAVE_GCC_CHECKEDSTL) && !defined(_GLIBCXX_DEBUG)
00083 #  define _GLIBCXX_DEBUG
00084 #endif
00085 
00086 #include <cstdio>
00087 #include <cstdarg>
00088 #include <cerrno>
00089 #include <climits>
00090 #include <cstdlib>
00091 #include <string>
00092 #include <cstring>
00093 #include <cmath>
00094 #include <iostream>
00095 #include <iomanip>
00096 #include <fstream>
00097 #include <sstream>
00098 #include <stdexcept>
00099 #include <cassert>
00100 #include <complex>
00101 #include <map>
00102 #include <vector>
00103 #include <deque>
00104 #include <algorithm>
00105 #include <numeric>
00106 #include <list>
00107 #include <set>
00108 #include <typeinfo>
00109 #include <limits>
00110 #include <memory>
00111 
00112 namespace Teuchos { class DummyDummyClass; }
00113 // Above, is used for a dumb reason (see
00114 // Teuchs_StandardMemberCompositionMacros.hpp).
00115 
00116 const double Teuchos_MinDouble = 1.0E-100;
00117 const double Teuchos_MaxDouble = 1.0E+100;
00118 const double Teuchos_Overflow = 1.79E308; // Used to test if equilibration should be done.
00119 const double Teuchos_Underflow = 2.23E-308;
00120 
00121 // 2007/06/29: These are hacks for std::ostringstream that should be removed
00122 // now what we assume that a faily complete standard C++ library is available.
00123 
00124 #define TEUCHOS_OSTRINGSTREAM_GET_C_STR(OSS) (OSS).str().c_str()
00125 typedef std::ostringstream TeuchosOStringStream;
00126 
00127 #endif /* __cplusplus */
00128 
00129 /* Delete any previous definition of TEUCHOS_NO_ERROR_REPORTS */
00130 
00131 #ifdef TEUCHOS_CHK_ERR
00132 #undef TEUCHOS_CHK_ERR
00133 #endif
00134 #ifdef TEUCHOS_CHK_PTR
00135 #undef TEUCHOS_CHK_PTR
00136 #endif
00137 #ifdef TEUCHOS_CHK_REF
00138 #undef TEUCHOS_CHK_REF
00139 #endif
00140 
00141 /* The integral type that is used for the largest ordinal values on this machine */
00142 typedef int Teuchos_Ordinal; /* ToDo: Determine this in configure for the machine */
00143 
00144 /* Deprecated (use Teuchos_Ordinal) */
00145 typedef Teuchos_Ordinal Teuchos_Index;
00146 
00147 /* Make error report silent by defining TEUCHOS_NO_ERROR_REPORTS */
00148 
00149 #define TEUCHOS_CHK_ERR(a) { if (a != 0)  return(a);}
00150 #define TEUCHOS_CHK_PTR(a) { return(a);}
00151 #define TEUCHOS_CHK_REF(a) { return(a);}
00152 
00153 #ifdef __cplusplus
00154 const int Teuchos_DefaultTracebackMode = 1; /* Default value for traceback behavior */
00155 #endif /* __cplusplus */
00156 
00157 /* Define some macros */
00158 #define TEUCHOS_MAX(x,y) (( (x) > (y) ) ? (x)  : (y) )     /* max function  */
00159 #define TEUCHOS_MIN(x,y) (( (x) < (y) ) ? (x)  : (y) )     /* min function  */
00160 #define TEUCHOS_SGN(x)   (( (x) < 0.0 ) ? -1.0 : 1.0 )     /* sign function */
00161 
00162 #ifndef HAVE_FORTRAN_SUPPORT
00163 #ifndef FORTRAN_DISABLED
00164 #define FORTRAN_DISABLED
00165 #endif
00166 #endif
00167 
00168 #endif /* TEUCHOS_CONFIGDEFS_HPP */

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