Changeset 74e9b5f in sasmodels for sasmodels/kernel_iq.c
- Timestamp:
- Oct 12, 2018 10:52:48 PM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 4de14584
- Parents:
- b0de252
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel_iq.c
rb0de252 r74e9b5f 67 67 68 68 // Return value restricted between low and high 69 __device__70 69 static double clip(double value, double low, double high) 71 70 { … … 80 79 // du * (m_sigma_y + 1j*m_sigma_z); 81 80 // weights for spin crosssections: dd du real, ud real, uu, du imag, ud imag 82 __device__83 81 static void set_spin_weights(double in_spin, double out_spin, double weight[6]) 84 82 { … … 105 103 106 104 // Compute the magnetic sld 107 __device__108 105 static double mag_sld( 109 106 const unsigned int xs, // 0=dd, 1=du.real, 2=ud.real, 3=uu, 4=du.imag, 5=ud.imag … … 154 151 // jitter angles (dtheta, dphi). This matrix can be applied to all of the 155 152 // (qx, qy) points in the image to produce R*[qx,qy]' = [qa,qc]' 156 __device__157 153 static void 158 154 qac_rotation( … … 188 184 // Apply the rotation matrix returned from qac_rotation to the point (qx,qy), 189 185 // returning R*[qx,qy]' = [qa,qc]' 190 __device__191 186 static void 192 187 qac_apply( … … 216 211 // jitter angles (dtheta, dphi, dpsi). This matrix can be applied to all of the 217 212 // (qx, qy) points in the image to produce R*[qx,qy]' = [qa,qb,qc]' 218 __device__219 213 static void 220 214 qabc_rotation( … … 263 257 // Apply the rotation matrix returned from qabc_rotation to the point (qx,qy), 264 258 // returning R*[qx,qy]' = [qa,qb,qc]' 265 __device__266 259 static void 267 260 qabc_apply( … … 285 278 const int32_t pd_start, // where we are in the dispersity loop 286 279 const int32_t pd_stop, // where we are stopping in the dispersity loop 287 global_parconst ProblemDetails *details,288 global_parconst double *values,289 global_parconst double *q, // nq q values, with padding to boundary290 global_pardouble *result, // nq+1 return values, again with padding280 pglobal const ProblemDetails *details, 281 pglobal const double *values, 282 pglobal const double *q, // nq q values, with padding to boundary 283 pglobal double *result, // nq+1 return values, again with padding 291 284 const double cutoff // cutoff in the dispersity weight product 292 285 ) … … 386 379 const int n4 = pd_length[4]; 387 380 const int p4 = pd_par[4]; 388 global_varconst double *v4 = pd_value + pd_offset[4];389 global_varconst double *w4 = pd_weight + pd_offset[4];381 pglobal const double *v4 = pd_value + pd_offset[4]; 382 pglobal const double *w4 = pd_weight + pd_offset[4]; 390 383 int i4 = (pd_start/pd_stride[4])%n4; // position in level 4 at pd_start 391 384 … … 573 566 const int n##_LOOP = details->pd_length[_LOOP]; \ 574 567 const int p##_LOOP = details->pd_par[_LOOP]; \ 575 global_varconst double *v##_LOOP = pd_value + details->pd_offset[_LOOP]; \576 global_varconst double *w##_LOOP = pd_weight + details->pd_offset[_LOOP]; \568 pglobal const double *v##_LOOP = pd_value + details->pd_offset[_LOOP]; \ 569 pglobal const double *w##_LOOP = pd_weight + details->pd_offset[_LOOP]; \ 577 570 int i##_LOOP = (pd_start/details->pd_stride[_LOOP])%n##_LOOP; 578 571 … … 598 591 // Pointers to the start of the dispersity and weight vectors, if needed. 599 592 #if MAX_PD>0 600 global_varconst double *pd_value = values + NUM_VALUES;601 global_varconst double *pd_weight = pd_value + details->num_weights;593 pglobal const double *pd_value = values + NUM_VALUES; 594 pglobal const double *pd_weight = pd_value + details->num_weights; 602 595 #endif 603 596
Note: See TracChangeset
for help on using the changeset viewer.