Changeset 5d316e9 in sasmodels for sasmodels/core.py
- Timestamp:
- Dec 8, 2015 8:08:51 AM (7 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:
- cf404cb
- Parents:
- eaca9eb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/core.py
r9404dd3 r5d316e9 65 65 return True 66 66 67 def load_model(model_definition, dtype="single", platform="ocl" ):67 def load_model(model_definition, dtype="single", platform="ocl", fast=False): 68 68 """ 69 69 Prepare the model for the default execution platform. … … 83 83 *platform* should be "dll" to force the dll to be used for C models, 84 84 otherwise it uses the default "ocl". 85 86 *fast* is True if fast inaccurate math is acceptable (40% speed increase). 85 87 """ 86 88 if isstr(model_definition): … … 102 104 if (platform=="dll" 103 105 or not HAVE_OPENCL 104 or (dtype == np.float64 and not kernelcl.environment().has_double)):106 or not kernelcl.environment().has_type(dtype)): 105 107 return kerneldll.load_dll(source, info, dtype) 106 108 else: 107 return kernelcl.GpuModel(source, info, dtype )109 return kernelcl.GpuModel(source, info, dtype, fast) 108 110 109 111 def make_kernel(model, q_vectors):
Note: See TracChangeset
for help on using the changeset viewer.