Changeset ec8d4ac in sasmodels


Ignore:
Timestamp:
Jan 16, 2018 5:59:46 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
925b3b5
Parents:
88096f5
Message:

tinycc for windows 64 did not allow passing structures by value. Ref #1050

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernel_iq.c

    r6aee3ab rec8d4ac  
    173173static double 
    174174qac_apply( 
    175     QACRotation rotation, 
     175    QACRotation *rotation, 
    176176    double qx, double qy, 
    177177    double *qa_out, double *qc_out) 
    178178{ 
    179     const double dqc = rotation.R31*qx + rotation.R32*qy; 
     179    const double dqc = rotation->R31*qx + rotation->R32*qy; 
    180180    // Indirect calculation of qab, from qab^2 = |q|^2 - qc^2 
    181181    const double dqa = sqrt(-dqc*dqc + qx*qx + qy*qy); 
     
    246246static double 
    247247qabc_apply( 
    248     QABCRotation rotation, 
     248    QABCRotation *rotation, 
    249249    double qx, double qy, 
    250250    double *qa_out, double *qb_out, double *qc_out) 
    251251{ 
    252     *qa_out = rotation.R11*qx + rotation.R12*qy; 
    253     *qb_out = rotation.R21*qx + rotation.R22*qy; 
    254     *qc_out = rotation.R31*qx + rotation.R32*qy; 
     252    *qa_out = rotation->R11*qx + rotation->R12*qy; 
     253    *qb_out = rotation->R21*qx + rotation->R22*qy; 
     254    *qc_out = rotation->R31*qx + rotation->R32*qy; 
    255255} 
    256256 
     
    453453  // theta, phi, dtheta, dphi are defined below in projection to avoid repeated code. 
    454454  #define BUILD_ROTATION() qac_rotation(&rotation, theta, phi, dtheta, dphi); 
    455   #define APPLY_ROTATION() qac_apply(rotation, qx, qy, &qa, &qc) 
     455  #define APPLY_ROTATION() qac_apply(&rotation, qx, qy, &qa, &qc) 
    456456  #define CALL_KERNEL() CALL_IQ_AC(qa, qc, local_values.table) 
    457457 
     
    467467  local_values.table.psi = 0.; 
    468468  #define BUILD_ROTATION() qabc_rotation(&rotation, theta, phi, psi, dtheta, dphi, local_values.table.psi) 
    469   #define APPLY_ROTATION() qabc_apply(rotation, qx, qy, &qa, &qb, &qc) 
     469  #define APPLY_ROTATION() qabc_apply(&rotation, qx, qy, &qa, &qb, &qc) 
    470470  #define CALL_KERNEL() CALL_IQ_ABC(qa, qb, qc, local_values.table) 
    471471#endif 
Note: See TracChangeset for help on using the changeset viewer.