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