Changeset 2a55a6f in sasmodels for sasmodels/kernel_template.c
- Timestamp:
- Apr 26, 2016 4:50:12 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- a062d18
- Parents:
- 98cb4d7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel_template.c
r98cb4d7 r2a55a6f 22 22 inline double fmin(double x, double y) { return x>y ? y : x; } 23 23 inline double fmax(double x, double y) { return x<y ? y : x; } 24 inline double isnan(double x) { return _isnan(x); } 24 #define isnan(x) _isnan(x) 25 #define isinf(x) (!_finite(x)) 26 #define isfinite(x) _finite(x) 25 27 #define NAN (std::numeric_limits<double>::quiet_NaN()) // non-signalling NaN 28 #define INFINITY (std::numeric_limits<double>::infinity()) 26 29 #define NEED_EXPM1 27 30 #define NEED_TGAMMA … … 32 35 # else 33 36 #include <stdio.h> 34 #include <tgmath.h> // C99 type-generic math, so sin(float) => sinf 37 #if defined(__TINYC__) 38 #include <math.h> 39 inline double trunc(double x) { return x>=0?floor(x):-floor(-x); } 40 inline double fmin(double x, double y) { return x>y ? y : x; } 41 inline double fmax(double x, double y) { return x<y ? y : x; } 42 // TODO: test isnan 43 inline double _isnan(double x) { return x != x; } // hope this doesn't optimize away! 44 #undef isnan 45 #define isnan(x) _isnan(x) 46 #define NEED_EXPM1 47 #define NEED_TGAMMA 48 #else 49 #include <tgmath.h> // C99 type-generic math, so sin(float) => sinf 50 #endif 35 51 // MSVC doesn't support C99, so no need for dllexport on C99 branch 36 52 #define kernel
Note: See TracChangeset
for help on using the changeset viewer.