Changeset 3699587 in sasmodels
- Timestamp:
- Feb 10, 2015 11:18:32 AM (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:
- 660cdd6
- Parents:
- 34756fd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/gen.py
r994d77f r3699587 422 422 Convert code from double precision to single precision. 423 423 """ 424 source = re.sub(r'(^|[^a-zA-Z0-9_])double($|[^a-zA-Z0-9_])', 424 # Convert double keyword to float. Accept an 'n' parameter for vector 425 # values, where n is 2, 4, 8 or 16. Assume complex numbers are represented 426 # as cdouble which is typedef'd to double2. 427 source = re.sub(r'(^|[^a-zA-Z0-9_]c?)double(([248]|16)?($|[^a-zA-Z0-9_]))', 425 428 r'\1float\2', source) 429 # Convert floating point constants to single by adding 'f' to the end. 430 # OS/X driver complains if you don't do this. 426 431 source = re.sub(r'[^a-zA-Z_](\d*[.]\d+|\d+[.]\d*)([eE][+-]?\d+)?', 427 432 r'\g<0>f', source)
Note: See TracChangeset
for help on using the changeset viewer.