Changeset 407bf48 in sasmodels
- Timestamp:
- Aug 24, 2016 5:19:52 AM (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:
- 8407d8c
- Parents:
- 0dc34c3
- Location:
- sasmodels
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
rb32dafd r407bf48 563 563 elif dtype.endswith('!'): 564 564 return eval_ctypes(model_info, data, dtype=dtype[:-1], cutoff=cutoff) 565 elif not model_info.gpu: 566 return eval_ctypes(model_info, data, dtype=dtype, cutoff=cutoff) 565 567 else: 566 568 return eval_opencl(model_info, data, dtype=dtype, cutoff=cutoff) -
sasmodels/core.py
r725ee36 r407bf48 46 46 # build_model 47 47 48 KINDS = ("all", "py", "c", "double", "single", " 1d", "2d",48 KINDS = ("all", "py", "c", "double", "single", "gpu", "1d", "2d", 49 49 "nonmagnetic", "magnetic") 50 50 def list_models(kind=None): … … 60 60 * single: models which support single precision 61 61 * double: models which require double precision 62 * gpu: models which compiles on GPU 62 63 * 1d: models which are 1D only, or 2D using abs(q) 63 64 * 2d: models which can be 2D … … 85 86 return True 86 87 elif kind == "single" and info.single: 88 return True 89 elif kind == "gpu" and info.gpu: 87 90 return True 88 91 elif kind == "2d" and any(p.type == 'orientation' for p in pars): … … 215 218 """ 216 219 # Assign default platform, overriding ocl with dll if OpenCL is unavailable 220 # If gpu=False OpenCL is switched off 217 221 if platform is None: 218 222 platform = "ocl" 219 if platform == "ocl" and not HAVE_OPENCL :223 if platform == "ocl" and not HAVE_OPENCL or not model_info.gpu: 220 224 platform = "dll" 221 225 -
sasmodels/modelinfo.py
r40a87fa r407bf48 731 731 info.category = getattr(kernel_module, 'category', None) 732 732 info.single = getattr(kernel_module, 'single', True) 733 info.gpu = getattr(kernel_module, 'gpu', True) 733 734 info.structure_factor = getattr(kernel_module, 'structure_factor', False) 734 735 info.profile_axes = getattr(kernel_module, 'profile_axes', ['x', 'y'])
Note: See TracChangeset
for help on using the changeset viewer.