Changeset 8fff00e in sasmodels for sasmodels/gen.py
- Timestamp:
- Feb 13, 2015 1:47:26 AM (9 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:
- be802cb
- Parents:
- df4dc86 (diff), 3fdb4b6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/gen.py
rdf4dc86 r8fff00e 438 438 Convert code from double precision to single precision. 439 439 """ 440 source = re.sub(r'(^|[^a-zA-Z0-9_])double($|[^a-zA-Z0-9_])', 440 # Convert double keyword to float. Accept an 'n' parameter for vector 441 # values, where n is 2, 4, 8 or 16. Assume complex numbers are represented 442 # as cdouble which is typedef'd to double2. 443 source = re.sub(r'(^|[^a-zA-Z0-9_]c?)double(([248]|16)?($|[^a-zA-Z0-9_]))', 441 444 r'\1float\2', source) 445 # Convert floating point constants to single by adding 'f' to the end. 446 # OS/X driver complains if you don't do this. 442 447 source = re.sub(r'[^a-zA-Z_](\d*[.]\d+|\d+[.]\d*)([eE][+-]?\d+)?', 443 448 r'\g<0>f', source)
Note: See TracChangeset
for help on using the changeset viewer.