Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/ElmerGUI/netgen/libsrc/include/mystdlib.h
3206 views
1
#ifndef FILE_MYSTDLIB
2
#define FILE_MYSTDLIB
3
4
5
#include <iostream>
6
#include <iomanip>
7
#include <fstream>
8
#include <sstream>
9
10
#ifdef OLDCINCLUDE
11
12
// e.g., CC compiler on SGI
13
#include <stdlib.h>
14
#include <stdio.h>
15
#include <math.h>
16
#include <malloc.h>
17
#include <ctype.h>
18
#include <time.h>
19
20
#else
21
22
// new standard
23
#include <cstdlib>
24
#include <cstdio>
25
#include <cmath>
26
#include <cctype>
27
#include <ctime>
28
#include <cstring>
29
#include <climits>
30
#endif
31
32
33
34
#include <new>
35
#include <string>
36
#include <typeinfo>
37
38
#ifdef PARALLEL
39
#undef SEEK_SET
40
#undef SEEK_CUR
41
#undef SEEK_END
42
#include <mpi.h>
43
#endif
44
45
#ifdef _OPENMP
46
#include <omp.h>
47
#endif
48
49
50
#ifdef METIS
51
namespace metis { extern "C" {
52
#include <metis.h>
53
} }
54
#endif
55
56
57
58
#ifndef NO_PARALLEL_THREADS
59
#ifndef WIN32
60
#include <pthread.h>
61
#endif
62
#endif
63
64
#ifndef M_PI
65
#define M_PI 3.14159265358979323846
66
#endif
67
68
69
/*** Windows headers ***/
70
#ifdef _MSC_VER
71
# define WIN32_LEAN_AND_MEAN
72
# ifndef NO_PARALLEL_THREADS
73
# include <afxwin.h>
74
# include <afxmt.h>
75
# endif
76
# include <windows.h>
77
# undef WIN32_LEAN_AND_MEAN
78
# include <winnt.h>
79
80
#else
81
# ifndef NO_PARALLEL_THREADS
82
# include <pthread.h>
83
# endif
84
#endif
85
86
/*
87
extern void* operator new(std::size_t) throw (std::bad_alloc);
88
extern void* operator new[](std::size_t) throw (std::bad_alloc);
89
extern void operator delete(void*) throw();
90
extern void operator delete[](void*) throw();
91
*/
92
93
/*
94
extern int mem_alloc;
95
extern int mem_total_alloc;
96
extern int mem_max_alloc;
97
extern int mem_total_alloc_array;
98
extern int mem_total_alloc_table;
99
*/
100
101
using namespace std;
102
103
#endif
104
105
106