Teuchos Package Browser (Single Doxygen Collection) Version of the Day
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 // Redistribution and use in source and binary forms, with or without
00012 // modification, are permitted provided that the following conditions are
00013 // met:
00014 //
00015 // 1. Redistributions of source code must retain the above copyright
00016 // notice, this list of conditions and the following disclaimer.
00017 //
00018 // 2. Redistributions in binary form must reproduce the above copyright
00019 // notice, this list of conditions and the following disclaimer in the
00020 // documentation and/or other materials provided with the distribution.
00021 //
00022 // 3. Neither the name of the Corporation nor the names of the
00023 // contributors may be used to endorse or promote products derived from
00024 // this software without specific prior written permission.
00025 //
00026 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00027 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00029 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00030 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00031 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00032 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00033 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00034 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00035 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00036 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037 //
00038 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
00039 //
00040 // ***********************************************************************
00041 // @HEADER
00042 */
00043 
00044 #ifndef TEUCHOS_CONFIGDEFS_HPP
00045 #define TEUCHOS_CONFIGDEFS_HPP
00046 
00052 #include "Teuchos_config.h"
00053 
00054 #ifdef HAVE_TEUCHOS_DEBUG
00055 #  define TEUCHOS_DEBUG
00056 #  define HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00057 #endif
00058 
00059 #ifdef __cplusplus
00060 
00061 #if defined(_MSC_VER) || defined(__APPLE__)
00062 #  define TEUCHOS_NO_ZERO_ITERATOR_CONVERSION
00063 #endif
00064 
00065 #if defined(__IBMC__) || defined(__IBMCPP__)
00066 #  ifndef TEMPLATE_FRIENDS_NOT_SUPPORTED
00067 #    define TEMPLATE_FRIENDS_NOT_SUPPORTED
00068 #  endif
00069 #  ifndef TEUCHOS_PRIVIATE_DELETE_NOT_SUPPORTED
00070 #    define TEUCHOS_PRIVIATE_DELETE_NOT_SUPPORTED
00071 #  endif
00072 #endif
00073 
00074 /* Deprecated */
00075 #ifndef HAVE_COMPLEX
00076 #  define HAVE_COMPLEX
00077 #endif
00078 
00079 #include <cstdio>
00080 #include <cstdarg>
00081 #include <cerrno>
00082 #include <climits>
00083 #include <cstdlib>
00084 #include <string>
00085 #include <cstring>
00086 #include <cmath>
00087 #include <iostream>
00088 #include <iomanip>
00089 #include <fstream>
00090 #include <sstream>
00091 #include <stdexcept>
00092 #include <cassert>
00093 #include <complex>
00094 #include <map>
00095 #include <vector>
00096 #include <deque>
00097 #include <algorithm>
00098 #include <numeric>
00099 #include <list>
00100 #include <set>
00101 #include <typeinfo>
00102 #include <limits>
00103 #include <memory>
00104 #include <cstddef>
00105 
00106 /* Avoid duplicating instantiation provided by IBM XL C++ runtime library. */
00107 #if defined(__IBMCPP__)
00108 # pragma do_not_instantiate std::fpos<mbstate_t>
00109 #endif
00110 
00111 namespace Teuchos { class DummyDummyClass; }
00112 // Above, is used for a dumb reason (see
00113 // Teuchs_StandardMemberCompositionMacros.hpp).
00114 
00115 const double Teuchos_MinDouble = 1.0E-100;
00116 const double Teuchos_MaxDouble = 1.0E+100;
00117 const double Teuchos_Overflow = 1.79E308; // Used to test if equilibration should be done.
00118 const double Teuchos_Underflow = 2.23E-308;
00119 
00120 // 2007/06/29: These are hacks for std::ostringstream that should be removed
00121 // now what we assume that a faily complete standard C++ library is available.
00122 
00123 #define TEUCHOS_OSTRINGSTREAM_GET_C_STR(OSS) (OSS).str().c_str()
00124 typedef std::ostringstream TeuchosOStringStream;
00125 
00126 #else /* __cplusplus */
00127 
00128 #include <stddef.h>
00129 
00130 #endif /* __cplusplus */
00131 
00132 /* Delete any previous definition of TEUCHOS_NO_ERROR_REPORTS */
00133 
00134 #ifdef TEUCHOS_CHK_ERR
00135 #undef TEUCHOS_CHK_ERR
00136 #endif
00137 #ifdef TEUCHOS_CHK_PTR
00138 #undef TEUCHOS_CHK_PTR
00139 #endif
00140 #ifdef TEUCHOS_CHK_REF
00141 #undef TEUCHOS_CHK_REF
00142 #endif
00143 
00144 /* The integral type that is used for the largest ordinal values on this
00145  * machine.
00146  *
00147  * On a 32 bit machine, ptrdiff_t will be an unsighed 32 bit integer and on a
00148  * 64 bit machine it will be an unsigned 64 bit integer.  Just what I want!
00149 */
00150 typedef TEUCHOS_ORDINAL_TYPE Teuchos_Ordinal;
00151 
00152 #ifdef __cplusplus
00153 namespace Teuchos { typedef Teuchos_Ordinal Ordinal; }
00154 #endif /* __cplusplus */
00155 
00156 /* Deprecated (use Teuchos_Ordinal) */
00157 typedef Teuchos_Ordinal Teuchos_Index;
00158 
00159 /* Make error report silent by defining TEUCHOS_NO_ERROR_REPORTS */
00160 
00161 #define TEUCHOS_CHK_ERR(a) { if (a != 0)  return(a);}
00162 #define TEUCHOS_CHK_PTR(a) { return(a);}
00163 #define TEUCHOS_CHK_REF(a) { return(a);}
00164 
00165 #ifdef __cplusplus
00166 const int Teuchos_DefaultTracebackMode = 1; /* Default value for traceback behavior */
00167 #endif /* __cplusplus */
00168 
00169 /* Define some macros */
00170 #define TEUCHOS_MAX(x,y) (( (x) > (y) ) ? (x)  : (y) )     /* max function  */
00171 #define TEUCHOS_MIN(x,y) (( (x) < (y) ) ? (x)  : (y) )     /* min function  */
00172 #define TEUCHOS_SGN(x)   (( (x) < 0.0 ) ? -1.0 : 1.0 )     /* sign function */
00173 
00174 #ifndef HAVE_FORTRAN_SUPPORT
00175 #  ifndef FORTRAN_DISABLED
00176 #    define FORTRAN_DISABLED
00177 #  endif
00178 #endif
00179 
00180 #include "Teuchos_DLLExportMacro.h"
00181 
00182 #endif /* TEUCHOS_CONFIGDEFS_HPP */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines