Changeset 5cf3c33 in sasmodels
- Timestamp:
- Mar 21, 2016 5:13:19 AM (9 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:
- 3a45c2c
- Parents:
- 7ff3cf3
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel_header.c
r03cac08 r5cf3c33 45 45 } 46 46 #define expm1 cephes_expm1 47 typedef __int32 int32_t 47 48 #else 48 49 #define kernel extern "C" 50 #include <cstdint> 49 51 #endif 50 52 static void SINCOS(double angle, double &svar, double &cvar) { svar=sin(angle); cvar=cos(angle); } 51 53 # else 54 #include <inttypes.h> // C99 guarantees that int32_t types is here 52 55 #include <stdio.h> 53 56 #include <tgmath.h> // C99 type-generic math, so sin(float) => sinf … … 64 67 # define pown(a,b) pow(a,b) 65 68 #else 69 typedef int int32_t; 66 70 # if defined(USE_SINCOS) 67 71 # define SINCOS(angle,svar,cvar) svar=sincos(angle,&cvar) -
sasmodels/kernel_iq.c
r7ff3cf3 r5cf3c33 18 18 19 19 typedef struct { 20 int pd_par[MAX_PD]; // index of the nth polydispersity variable21 int pd_length[MAX_PD]; // length of the nth polydispersity weight vector22 int pd_offset[MAX_PD]; // offset of pd weights in the par & weight vector23 int pd_stride[MAX_PD]; // stride to move to the next index at this level24 int pd_isvol[MAX_PD]; // True if parameter is a volume weighting parameter25 int par_offset[NPARS]; // offset of par values in the par & weight vector26 int par_coord[NPARS]; // polydispersity coordination bitvector27 int fast_coord_index[NPARS]; // index of the fast coordination parameters28 int fast_coord_count; // number of parameters coordinated with pd 129 int theta_var; // id of spherical correction variable30 int fast_theta; // true if spherical correction depends on pd 120 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 31 31 } ProblemDetails; 32 32 … … 39 39 kernel 40 40 void KERNEL_NAME( 41 int nq, // number of q values42 const int pd_start, // where we are in the polydispersity loop43 const int pd_stop, // where we are stopping in the polydispersity loop41 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 44 44 global const ProblemDetails *problem, 45 45 global const double *weights,
Note: See TracChangeset
for help on using the changeset viewer.