Changeset fa5fd8d in sasmodels for sasmodels/core.py
- Timestamp:
- Apr 12, 2016 4:02:41 PM (8 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:
- 04045f4
- Parents:
- 7ae2b7f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/core.py
r7ae2b7f rfa5fd8d 102 102 103 103 def build_model(model_info, dtype=None, platform="ocl"): 104 # type: (modelinfo.ModelInfo, DType, str) -> KernelModel104 # type: (modelinfo.ModelInfo, np.dtype, str) -> KernelModel 105 105 """ 106 106 Prepare the model for the default execution platform. … … 134 134 raise ValueError('unknown mixture type %s'%composition_type) 135 135 136 # If it is a python model, return it immediately 137 if callable(model_info.Iq): 138 return kernelpy.PyModel(model_info) 139 136 140 ## for debugging: 137 141 ## 1. uncomment open().write so that the source will be saved next time … … 144 148 source = generate.make_source(model_info) 145 149 if dtype is None: 146 dtype = 'single' if model_info.single else 'double' 147 if callable(model_info.Iq): 148 return kernelpy.PyModel(model_info) 150 dtype = generate.F32 if model_info.single else generate.F64 149 151 if (platform == "dll" 150 152 or not HAVE_OPENCL
Note: See TracChangeset
for help on using the changeset viewer.