Changeset 7fcdc9f in sasmodels
- Timestamp:
- Oct 16, 2016 4:38:03 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 248561a
- Parents:
- ff1fff5
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/generate.py
r234c532 r7fcdc9f 166 166 import re 167 167 import string 168 from zlib import crc32 168 169 169 170 import numpy as np # type: ignore … … 356 357 return newest 357 358 359 def tag_source(source): 360 # type: (str) -> str 361 """ 362 Return a unique tag for the source code. 363 """ 364 # Note: need 0xffffffff&val to force an unsigned 32-bit number 365 return "%08X"%(0xffffffff&crc32(source)) 358 366 359 367 def convert_type(source, dtype): -
sasmodels/kernelcl.py
r6e5b2a7 r7fcdc9f 294 294 # so we don't really need to cache things for ourselves. I'll do so 295 295 # anyway just to save some data munging time. 296 key = "%s-%s%s"%(name, dtype, ("-fast" if fast else "")) 296 tag = generate.tag_source(source) 297 key = "%s-%s-%s%s"%(name, dtype, tag, ("-fast" if fast else "")) 297 298 # Check timestamp on program 298 299 program, program_timestamp = self.compiled.get(key, (None, np.inf))
Note: See TracChangeset
for help on using the changeset viewer.