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 #include "Teuchos_config.h"
00040 
00041 #ifdef HAVE_TEUCHOS_DEBUG
00042 #  define TEUCHOS_DEBUG
00043 #  define HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00044 #endif
00045 
00046 #ifdef __cplusplus
00047 
00048 #if defined(_MSC_VER) || defined(__APPLE__)
00049 #  define TEUCHOS_NO_ZERO_ITERATOR_CONVERSION
00050 #endif
00051 
00052 #ifdef _AIX
00053 #  ifndef TEMPLATE_FRIENDS_NOT_SUPPORTED
00054 #    define TEMPLATE_FRIENDS_NOT_SUPPORTED
00055 #  endif
00056 #  ifndef TEUCHOS_PRIVIATE_DELETE_NOT_SUPPORTED
00057 #    define TEUCHOS_PRIVIATE_DELETE_NOT_SUPPORTED
00058 #  endif
00059 #endif
00060 
00061 /* Deprecated */
00062 #ifndef HAVE_COMPLEX
00063 #  define HAVE_COMPLEX
00064 #endif
00065 
00066 #include <cstdio>
00067 #include <cstdarg>
00068 #include <cerrno>
00069 #include <climits>
00070 #include <cstdlib>
00071 #include <string>
00072 #include <cstring>
00073 #include <cmath>
00074 #include <iostream>
00075 #include <iomanip>
00076 #include <fstream>
00077 #include <sstream>
00078 #include <stdexcept>
00079 #include <cassert>
00080 #include <complex>
00081 #include <map>
00082 #include <vector>
00083 #include <deque>
00084 #include <algorithm>
00085 #include <numeric>
00086 #include <list>
00087 #include <set>
00088 #include <typeinfo>
00089 #include <limits>
00090 #include <memory>
00091 
00092 namespace Teuchos { class DummyDummyClass; }
00093 // Above, is used for a dumb reason (see
00094 // Teuchs_StandardMemberCompositionMacros.hpp).
00095 
00096 const double Teuchos_MinDouble = 1.0E-100;
00097 const double Teuchos_MaxDouble = 1.0E+100;
00098 const double Teuchos_Overflow = 1.79E308; // Used to test if equilibration should be done.
00099 const double Teuchos_Underflow = 2.23E-308;
00100 
00101 // 2007/06/29: These are hacks for std::ostringstream that should be removed
00102 // now what we assume that a faily complete standard C++ library is available.
00103 
00104 #define TEUCHOS_OSTRINGSTREAM_GET_C_STR(OSS) (OSS).str().c_str()
00105 typedef std::ostringstream TeuchosOStringStream;
00106 
00107 #else /* __cplusplus */
00108 
00109 #include <stddef.h>
00110 
00111 #endif /* __cplusplus */
00112 
00113 /* Delete any previous definition of TEUCHOS_NO_ERROR_REPORTS */
00114 
00115 #ifdef TEUCHOS_CHK_ERR
00116 #undef TEUCHOS_CHK_ERR
00117 #endif
00118 #ifdef TEUCHOS_CHK_PTR
00119 #undef TEUCHOS_CHK_PTR
00120 #endif
00121 #ifdef TEUCHOS_CHK_REF
00122 #undef TEUCHOS_CHK_REF
00123 #endif
00124 
00125 /* The integral type that is used for the largest ordinal values on this
00126  * machine.
00127  *
00128  * On a 32 bit machine, ptrdiff_t will be an unsighed 32 bit integer and on a
00129  * 64 bit machine it will be an unsigned 64 bit integer.  Just what I want!
00130 */
00131 typedef TEUCHOS_ORDINAL_TYPE Teuchos_Ordinal;
00132 
00133 #ifdef __cplusplus
00134 namespace Teuchos { typedef Teuchos_Ordinal Ordinal; }
00135 #endif /* __cplusplus */
00136 
00137 /* Deprecated (use Teuchos_Ordinal) */
00138 typedef Teuchos_Ordinal Teuchos_Index;
00139 
00140 /* Make error report silent by defining TEUCHOS_NO_ERROR_REPORTS */
00141 
00142 #define TEUCHOS_CHK_ERR(a) { if (a != 0)  return(a);}
00143 #define TEUCHOS_CHK_PTR(a) { return(a);}
00144 #define TEUCHOS_CHK_REF(a) { return(a);}
00145 
00146 #ifdef __cplusplus
00147 const int Teuchos_DefaultTracebackMode = 1; /* Default value for traceback behavior */
00148 #endif /* __cplusplus */
00149 
00150 /* Define some macros */
00151 #define TEUCHOS_MAX(x,y) (( (x) > (y) ) ? (x)  : (y) )     /* max function  */
00152 #define TEUCHOS_MIN(x,y) (( (x) < (y) ) ? (x)  : (y) )     /* min function  */
00153 #define TEUCHOS_SGN(x)   (( (x) < 0.0 ) ? -1.0 : 1.0 )     /* sign function */
00154 
00155 #ifndef HAVE_FORTRAN_SUPPORT
00156 #  ifndef FORTRAN_DISABLED
00157 #    define FORTRAN_DISABLED
00158 #  endif
00159 #endif
00160 
00161 #include "Teuchos_DLLExportMacro.h"
00162 
00163 #endif /* TEUCHOS_CONFIGDEFS_HPP */

Generated on Tue Jul 13 09:22:59 2010 for Teuchos - Trilinos Tools Package by  doxygen 1.4.7