Changes in / [c0c3393:9f51b0e] in sasmodels


Ignore:
Location:
sasmodels
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernel_header.c

    r03cac08 r5cf3c33  
    4545         } 
    4646         #define expm1 cephes_expm1 
     47         typedef __int32 int32_t 
    4748     #else 
    4849         #define kernel extern "C" 
     50         #include <cstdint> 
    4951     #endif 
    5052     static void SINCOS(double angle, double &svar, double &cvar) { svar=sin(angle); cvar=cos(angle); } 
    5153#  else 
     54     #include <inttypes.h>  // C99 guarantees that int32_t types is here 
    5255     #include <stdio.h> 
    5356     #include <tgmath.h> // C99 type-generic math, so sin(float) => sinf 
     
    6467#  define pown(a,b) pow(a,b) 
    6568#else 
     69   typedef int int32_t; 
    6670#  if defined(USE_SINCOS) 
    6771#    define SINCOS(angle,svar,cvar) svar=sincos(angle,&cvar) 
  • sasmodels/kernel_iq.c

    r7ff3cf3 r5cf3c33  
    1818 
    1919typedef struct { 
    20     int pd_par[MAX_PD];     // index of the nth polydispersity variable 
    21     int pd_length[MAX_PD];  // length of the nth polydispersity weight vector 
    22     int pd_offset[MAX_PD];  // offset of pd weights in the par & weight vector 
    23     int pd_stride[MAX_PD];  // stride to move to the next index at this level 
    24     int pd_isvol[MAX_PD];   // True if parameter is a volume weighting parameter 
    25     int par_offset[NPARS];  // offset of par values in the par & weight vector 
    26     int par_coord[NPARS];   // polydispersity coordination bitvector 
    27     int fast_coord_index[NPARS]; // index of the fast coordination parameters 
    28     int fast_coord_count;   // number of parameters coordinated with pd 1 
    29     int theta_var;          // id of spherical correction variable 
    30     int fast_theta;         // true if spherical correction depends on pd 1 
     20    int32_t pd_par[MAX_PD];     // index of the nth polydispersity variable 
     21    int32_t pd_length[MAX_PD];  // length of the nth polydispersity weight vector 
     22    int32_t pd_offset[MAX_PD];  // offset of pd weights in the par & weight vector 
     23    int32_t pd_stride[MAX_PD];  // stride to move to the next index at this level 
     24    int32_t pd_isvol[MAX_PD];   // True if parameter is a volume weighting parameter 
     25    int32_t par_offset[NPARS];  // offset of par values in the par & weight vector 
     26    int32_t par_coord[NPARS];   // polydispersity coordination bitvector 
     27    int32_t fast_coord_index[NPARS]; // index of the fast coordination parameters 
     28    int32_t fast_coord_count;   // number of parameters coordinated with pd 1 
     29    int32_t theta_var;          // id of spherical correction variable 
     30    int32_t fast_theta;         // true if spherical correction depends on pd 1 
    3131} ProblemDetails; 
    3232 
     
    3939kernel 
    4040void KERNEL_NAME( 
    41     int nq,                 // number of q values 
    42     const int pd_start,     // where we are in the polydispersity loop 
    43     const int pd_stop,      // where we are stopping in the polydispersity loop 
     41    int32_t nq,                 // number of q values 
     42    const int32_t pd_start,     // where we are in the polydispersity loop 
     43    const int32_t pd_stop,      // where we are stopping in the polydispersity loop 
    4444    global const ProblemDetails *problem, 
    4545    global const double *weights, 
Note: See TracChangeset for help on using the changeset viewer.