-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parameter consistency check #270
Comments
Is this relevant to #775? or to http://trac.sasview.org/ticket/646? If not can probably move back to +1 |
Trac update at |
With a quick release turnaround for 4.1 moving this to next +1 |
Yet another instance of user frustration with the model was producing incorrect results and even crashing sasview because parameters were in the wrong order (in this case one of the parameters was the number of shells, which really didn't no like receiving overall thickness as its input), so I increased the importance of this task. Using structures would be easiest, since then all parameters would be sent to form volume and effective radius calculations without having to tag them as volume parameters, and the tag can be reserved for polydispersity parameters. It will require extensive testing to make sure it works across all OpenCL drivers. static double form_volume(ModelParameters *p) {
return M_4PI_3 * cube(p->radius);
} Another option is to pass array parameters but provide macros as array indices: // Autogenerated... what do we do about name collisions?
#define radius 0
// user code
static double form_volume(double p[]) {
return M_4PI_3 * cube(p[radius]);
}
Need to check how to pass the parameter array into the function since OpenCL cares about local vs. global memory pointers. |
parameters in the sasmodels description file must match the order of the parameters in the Iq and Iqxy calls.
Two alternatives:
(1) change the Iq/Iqxy definition so that it takes a !ParameterTable struct, with parameters referenced in the code as p.name instead of name.
(2) parse the Iq/Iqxy C code to make sure that the names of the parameters correspond exactly to the names of the parameters in the definition file.
Migrated from http://trac.sasview.org/ticket/609 [pkienzle 2016-08-08T15:52:58]
The text was updated successfully, but these errors were encountered: