Changeset 98cb4d7 in sasmodels for sasmodels/models


Ignore:
Timestamp:
Apr 26, 2016 1:00:14 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
3a45c2c, 2a55a6f
Parents:
e9dc7df
Message:

only define tgamma when compiling for MSVC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/lib/sas_gamma.c

    re9dc7df r98cb4d7  
    11/* 
    22The wrapper for gamma function from OpenCL and standard libraries 
    3 The OpenCL gamma function fails misserably on values lower than 1.0 
     3The OpenCL gamma function fails miserably on values lower than 1.0 
    44while works fine on larger values. 
    55We use gamma definition Gamma(t + 1) = t * Gamma(t) to compute 
     
    77*/ 
    88 
    9 #ifdef tgamma 
    10 inline double sas_gamma( double x) { return tgamma(x+1)/x; } 
    11 #else 
     9#if defined(NEED_TGAMMA) 
    1210static double cephes_stirf(double x) 
    1311{ 
     
    3937} 
    4038 
    41 double sas_gamma(double x) { 
     39static double tgamma(double x) { 
    4240        double p, q, z; 
    4341        int sgngam; 
     
    137135} 
    138136#endif 
     137 
     138 
     139inline double sas_gamma( double x) { return tgamma(x+1)/x; } 
Note: See TracChangeset for help on using the changeset viewer.