/[escript]/trunk/escript/src/system_dep.h
ViewVC logotype

Annotation of /trunk/escript/src/system_dep.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4154 - (hide annotations)
Tue Jan 22 09:30:23 2013 UTC (6 years, 9 months ago) by jfenwick
File MIME type: text/plain
File size: 2215 byte(s)
Round 1 of copyright fixes
1 ksteube 1312
2 jfenwick 3981 /*****************************************************************************
3 ksteube 1811 *
4 jfenwick 4154 * Copyright (c) 2003-2013 by University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 ksteube 1811 *
7     * Primary Business: Queensland, Australia
8     * Licensed under the Open Software License version 3.0
9     * http://www.opensource.org/licenses/osl-3.0.php
10     *
11 jfenwick 3981 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12     * Development since 2012 by School of Earth Sciences
13     *
14     *****************************************************************************/
15 ksteube 1312
16 ksteube 1811
17 phornby 1031 /**
18 jfenwick 2519 \file escript/src/system_dep.h
19 phornby 1031 \ingroup Other
20     */
21 gross 1034 /*
22     @(#) system_dep.h
23     */
24 phornby 1031
25 gross 1034
26 phornby 1031 #ifndef escript_system_dep_h
27     #define escript_system_dep_h
28    
29    
30     #ifdef NO_FLOAT_H
31     # define DBL_EPSILON 2.2204460492503131E-16
32     # define DBL_MAX 1.7976931348623157E+308
33     # define DBL_MIN 2.2250738585072014E-308
34     #else /* for the rest of the world */
35     # include <float.h>
36     #endif
37     #include <limits.h>
38    
39 phornby 2018 #if defined(_WIN32) && defined(__INTEL_COMPILER)
40 gross 1034 /*
41     The Intel compiler on windows has an "improved" math library compared to the usual Visual C++ one
42     In particular it has a acosh and other similar functions which aren't implemented in Visual C++ math.h
43     Note you will get a compile time error if any other header (including system ones) includes math.h whilst mathimf.h
44     has been included. As a result system_dep.h must be included FIRST at all times (this prevents math.h from being included).
45     */
46 phornby 1031 # include <mathimf.h>
47     # else
48     # include <math.h>
49     # endif
50    
51     #ifndef M_PI
52     # define M_PI 3.14159265358979323846
53     #endif
54    
55     #ifndef SQRT_DBL_EPSILON
56     # define SQRT_DBL_EPSILON 1.4901161193847656e-08
57     #endif
58    
59     #ifndef M_LN2
60     # define M_LN2 0.69314718055994530942 /* log_e 2 */
61     #endif
62    
63 phornby 2029 #define ESCRIPT_DLL_API
64    
65 phornby 1031 #ifdef _WIN32
66 phornby 2031 # ifndef ESCRIPT_STATIC_LIB
67 phornby 2030 # undef ESCRIPT_DLL_API
68 phornby 1628 # ifdef ESCRIPT_EXPORTS
69     # define ESCRIPT_DLL_API __declspec(dllexport)
70     # else
71     # define ESCRIPT_DLL_API __declspec(dllimport)
72     # endif
73     # endif
74 phornby 1031 #endif
75    
76 jfenwick 2086 #ifndef ESCRIPT_MAX_DATA_RANK
77     #define ESCRIPT_MAX_DATA_RANK 4
78 phornby 1634 #endif
79 jfenwick 2271
80     /* you'll need this one day. */
81     #ifndef __const
82     # if (defined __STDC__ && __STDC__) || defined __cplusplus
83     # define __const const
84     # else
85     # define __const
86     # endif
87 jfenwick 2086 #endif
88 jfenwick 2271
89     #endif

  ViewVC Help
Powered by ViewVC 1.1.26