Changeset 2e66ef5 in sasmodels for sasmodels/core.py


Ignore:
Timestamp:
May 8, 2017 2:16:09 AM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
a03fad8
Parents:
990d8df
Message:

add a short scripting guide; start in on developer docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/core.py

    r650c6d2 r2e66ef5  
    117117    Load model info and build model. 
    118118 
    119     *model_name* is the name of the model as used by :func:`load_model_info`. 
    120     Additional keyword arguments are passed directly to :func:`build_model`. 
     119    *model_name* is the name of the model, or perhaps a model expression 
     120    such as sphere*hardsphere or sphere+cylinder. 
     121 
     122    *dtype* and *platform* are given by :func:`build_model`. 
    121123    """ 
    122124    return build_model(load_model_info(model_name), 
     
    128130    """ 
    129131    Load a model definition given the model name. 
     132 
     133    *model_name* is the name of the model, or perhaps a model expression 
     134    such as sphere*hardsphere or sphere+cylinder. 
    130135 
    131136    This returns a handle to the module defining the model.  This can be 
     
    227232 
    228233    Possible types include 'half', 'single', 'double' and 'quad'.  If the 
    229     type is 'fast', then this is equivalent to dtype 'single' with the 
    230     fast flag set to True. 
     234    type is 'fast', then this is equivalent to dtype 'single' but using 
     235    fast native functions rather than those with the precision level guaranteed 
     236    by the OpenCL standard. 
     237 
     238    Platform preference can be specfied ("ocl" vs "dll"), with the default 
     239    being OpenCL if it is availabe.  If the dtype name ends with '!' then 
     240    platform is forced to be DLL rather than OpenCL. 
     241 
     242    This routine ignores the preferences within the model definition.  This 
     243    is by design.  It allows us to test models in single precision even when 
     244    we have flagged them as requiring double precision so we can easily check 
     245    the performance on different platforms without having to change the model 
     246    definition. 
    231247    """ 
    232248    # Assign default platform, overriding ocl with dll if OpenCL is unavailable 
Note: See TracChangeset for help on using the changeset viewer.