Changeset a42fec0 in sasmodels for Models/code_lamellar.py
- Timestamp:
- Aug 4, 2014 5:20:07 PM (10 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:
- 8cdb9f1
- Parents:
- 099e053
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Models/code_lamellar.py
rca6c007 ra42fec0 5 5 import pyopencl as cl 6 6 from Models.weights import GaussianDispersion 7 8 def set_precision(src, qx, qy, dtype): 9 qx = np.ascontiguousarray(qx, dtype=dtype) 10 qy = np.ascontiguousarray(qy, dtype=dtype) 11 if dtype == 'double': 12 header = """\ 13 #define real float 14 """ 15 else: 16 header = """\ 17 #pragma OPENCL EXTENSION cl_khr_fp64: enable 18 #define real double 19 """ 20 return header+src, qx, qy 7 from sasmodel import set_precision 21 8 22 9
Note: See TracChangeset
for help on using the changeset viewer.