Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_ConfigDefs.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Teuchos: Common Tools Package
4//
5// Copyright 2004 NTESS and the Teuchos contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef TEUCHOS_CONFIGDEFS_HPP
11#define TEUCHOS_CONFIGDEFS_HPP
12
18#include "TeuchosCore_config.h"
19#include "Teuchos_config.h"
20
21#ifdef HAVE_TEUCHOS_DEBUG
22# define TEUCHOS_DEBUG
23# define HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
24#endif
25
26#ifdef __cplusplus
27
28#if defined(_MSC_VER) || defined(__APPLE__)
29# define TEUCHOS_NO_ZERO_ITERATOR_CONVERSION
30#endif
31
32#if defined(__IBMC__) || defined(__IBMCPP__)
33# ifndef TEMPLATE_FRIENDS_NOT_SUPPORTED
34# define TEMPLATE_FRIENDS_NOT_SUPPORTED
35# endif
36# ifndef TEUCHOS_PRIVIATE_DELETE_NOT_SUPPORTED
37# define TEUCHOS_PRIVIATE_DELETE_NOT_SUPPORTED
38# endif
39#endif
40
41/* Deprecated */
42#ifndef HAVE_COMPLEX
43# define HAVE_COMPLEX
44#endif
45
46// #include <cstdio>
47// #include <cstdarg>
48// #include <cerrno>
49// #include <climits>
50#include <cstdlib>
51#include <string>
52#include <cstring>
53#include <cmath>
54#include <iostream>
55#include <iomanip>
56// #include <fstream>
57#include <sstream>
58#include <stdexcept>
59#include <cassert>
60#include <complex>
61// #include <map>
62// #include <vector>
63// #include <deque>
64#include <algorithm>
65// #include <numeric>
66// #include <list>
67// #include <set>
68// #include <typeinfo>
69#include <limits>
70// #include <memory>
71#include <cstddef>
72
73/* Avoid duplicating instantiation provided by IBM XL C++ runtime library. */
74#if defined(__IBMCPP__)
75# pragma do_not_instantiate std::fpos<mbstate_t>
76#endif
77
78const double Teuchos_MinDouble = 1.0E-100;
79const double Teuchos_MaxDouble = 1.0E+100;
80const double Teuchos_Overflow = 1.79E308; // Used to test if equilibration should be done.
81const double Teuchos_Underflow = 2.23E-308;
82
83#else /* __cplusplus */
84
85#include <stddef.h>
86
87#endif /* __cplusplus */
88
89/* Delete any previous definition of TEUCHOS_NO_ERROR_REPORTS */
90
91#ifdef TEUCHOS_CHK_ERR
92#undef TEUCHOS_CHK_ERR
93#endif
94#ifdef TEUCHOS_CHK_PTR
95#undef TEUCHOS_CHK_PTR
96#endif
97#ifdef TEUCHOS_CHK_REF
98#undef TEUCHOS_CHK_REF
99#endif
100
101/* The integral type that is used for the largest ordinal values on this
102 * machine.
103 *
104 * On a 32 bit machine, ptrdiff_t will be an unsighed 32 bit integer and on a
105 * 64 bit machine it will be an unsigned 64 bit integer. Just what I want!
106*/
107typedef TEUCHOS_ORDINAL_TYPE Teuchos_Ordinal;
108
109#ifdef __cplusplus
110namespace Teuchos { typedef Teuchos_Ordinal Ordinal; }
111#endif /* __cplusplus */
112
113/* Deprecated (use Teuchos_Ordinal instead) */
114TEUCHOS_DEPRECATED typedef Teuchos_Ordinal Teuchos_Index;
115
116/* Make error report silent by defining TEUCHOS_NO_ERROR_REPORTS */
117
118#define TEUCHOS_CHK_ERR(a) { if (a != 0) return(a);}
119#define TEUCHOS_CHK_PTR(a) { return(a);}
120#define TEUCHOS_CHK_REF(a) { return(a);}
121
122#ifdef __cplusplus
123const int Teuchos_DefaultTracebackMode = 1; /* Default value for traceback behavior */
124#endif /* __cplusplus */
125
126/* Define some macros */
127#define TEUCHOS_MAX(x,y) (( (x) > (y) ) ? (x) : (y) ) /* max function */
128#define TEUCHOS_MIN(x,y) (( (x) < (y) ) ? (x) : (y) ) /* min function */
129#define TEUCHOS_SGN(x) (( (x) < 0.0 ) ? -1.0 : 1.0 ) /* sign function */
130
131#ifndef HAVE_FORTRAN_SUPPORT
132# ifndef FORTRAN_DISABLED
133# define FORTRAN_DISABLED
134# endif
135#endif
136
137#include "Teuchos_DLLExportMacro.h"
138
139#endif /* TEUCHOS_CONFIGDEFS_HPP */
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...