Changeset 6773b02 in sasmodels


Ignore:
Timestamp:
Oct 19, 2017 3:11:08 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
e3571cb
Parents:
2c108a3
Message:

fix py3 support for opencl kernels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/generate.py

    r2c108a3 r6773b02  
    371371    """ 
    372372    # Note: need 0xffffffff&val to force an unsigned 32-bit number 
     373    try: 
     374        source = source.encode('utf8') 
     375    except AttributeError: # bytes has no encode attribute in python 3 
     376        pass 
    373377    return "%08X"%(0xffffffff&crc32(source)) 
    374378 
Note: See TracChangeset for help on using the changeset viewer.