/[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 1034 - (hide annotations)
Wed Mar 14 23:49:20 2007 UTC (12 years, 8 months ago) by gross
File MIME type: text/plain
File size: 1362 byte(s)
In VC++ boost has problems with numarray arguments from python. This
fixes that problem by taking python::object arguments from the python
level and converting it into python::numeric::array on the C++ level.
This hasn't been tested with VC++ yet.

Moreover the two Data methods dealing with big numarrays as argument and
return value have been removed.


1 phornby 1031 /**
2     \file system_dep.h
3     \ingroup Other
4     */
5 gross 1034 /*
6     @(#) system_dep.h
7     */
8 phornby 1031
9 gross 1034
10 phornby 1031 #ifndef escript_system_dep_h
11     #define escript_system_dep_h
12    
13    
14     #ifdef NO_FLOAT_H
15     # define DBL_EPSILON 2.2204460492503131E-16
16     # define DBL_MAX 1.7976931348623157E+308
17     # define DBL_MIN 2.2250738585072014E-308
18     #else /* for the rest of the world */
19     # include <float.h>
20     #endif
21     #include <limits.h>
22    
23     # ifdef __INTEL_COMPILER
24 gross 1034 /*
25     The Intel compiler on windows has an "improved" math library compared to the usual Visual C++ one
26     In particular it has a acosh and other similar functions which aren't implemented in Visual C++ math.h
27     Note you will get a compile time error if any other header (including system ones) includes math.h whilst mathimf.h
28     has been included. As a result system_dep.h must be included FIRST at all times (this prevents math.h from being included).
29     */
30 phornby 1031 # include <mathimf.h>
31     # else
32     # include <math.h>
33     # endif
34    
35     #ifndef M_PI
36     # define M_PI 3.14159265358979323846
37     #endif
38    
39     #ifndef SQRT_DBL_EPSILON
40     # define SQRT_DBL_EPSILON 1.4901161193847656e-08
41     #endif
42    
43     #ifndef M_LN2
44     # define M_LN2 0.69314718055994530942 /* log_e 2 */
45     #endif
46    
47     #ifdef _WIN32
48    
49     #ifndef INTERFACE_STATIC_LIB
50     # ifdef ESCRIPT_EXPORTS
51     # define ESCRIPT_DLL_API __declspec(dllexport)
52     # else
53     # define ESCRIPT_DLL_API __declspec(dllimport)
54     # endif
55     #endif
56    
57     #else
58     # define ESCRIPT_DLL_API
59     #endif
60    
61     #endif

  ViewVC Help
Powered by ViewVC 1.1.26