Changeset 821a9c6 in sasmodels
- Timestamp:
- May 18, 2016 10:48:46 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:
- aa9e4e3
- Parents:
- de798b6
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernelcl.py
r4d76711 r821a9c6 50 50 import os 51 51 import warnings 52 import logging 52 53 53 54 import numpy as np … … 149 150 if fast else []) 150 151 program = cl.Program(context, source).build(options=options) 152 #print("done with "+program) 151 153 return program 152 154 … … 218 220 Compile the program for the device in the given context. 219 221 """ 220 key = "%s-%s -%s"%(name, dtype, fast)222 key = "%s-%s%s"%(name, dtype, ("-fast" if fast else "")) 221 223 if key not in self.compiled: 222 #print("compiling",name) 223 dtype = np.dtype(dtype) 224 program = compile_model(self.get_context(dtype), source, dtype, fast) 224 context = self.get_context(dtype) 225 logging.info("building %s for OpenCL %s" 226 % (key, context.devices[0].name)) 227 program = compile_model(context, source, np.dtype(dtype), fast) 225 228 self.compiled[key] = program 226 229 return self.compiled[key] -
sasmodels/kerneldll.py
r31bc9bf r821a9c6 52 52 import ctypes as ct 53 53 from ctypes import c_void_p, c_int, c_longdouble, c_double, c_float 54 import logging 54 55 55 56 import numpy as np … … 176 177 os.fdopen(fid, "w").write(source) 177 178 command = COMPILE%{"source":filename, "output":dll} 179 logging.info(command) 178 180 status = os.system(command) 179 181 if status != 0 or not os.path.exists(dll):
Note: See TracChangeset
for help on using the changeset viewer.