Changes in / [df4dc86:8fff00e] in sasmodels


Ignore:
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    rdf4dc86 rdf4dc86  
    55*.so 
    66*.obj 
     7/doc/_build/ 
     8/doc/api/ 
     9/doc/model/ 
     10.mplconfig 
  • sasmodels/gen.py

    rdf4dc86 rdf4dc86  
    438438    Convert code from double precision to single precision. 
    439439    """ 
    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_]))', 
    441444                    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. 
    442447    source = re.sub(r'[^a-zA-Z_](\d*[.]\d+|\d+[.]\d*)([eE][+-]?\d+)?', 
    443448                    r'\g<0>f', source) 
Note: See TracChangeset for help on using the changeset viewer.