Changeset 6d6508e in sasmodels for sasmodels/kerneldll.py
- Timestamp:
- Apr 7, 2016 6:57:33 PM (8 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:
- d2fc9a4
- Parents:
- 3707eee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kerneldll.py
r1e2a1ba r6d6508e 55 55 56 56 from . import generate 57 from . import details 57 58 from .kernelpy import PyInput, PyModel 58 59 from .exception import annotate_exception … … 95 96 """ 96 97 bits = 8*dtype.itemsize 97 return "sas_%s%d"%(model_info ['id'], bits)98 return "sas_%s%d"%(model_info.id, bits) 98 99 99 100 def dll_path(model_info, dtype): … … 123 124 models are allowed as DLLs. 124 125 """ 125 if callable(model_info. get('Iq', None)):126 if callable(model_info.Iq): 126 127 return PyModel(model_info) 127 128 … … 259 260 self.result = np.empty(q_input.nq+3, q_input.dtype) 260 261 261 def __call__(self, details, weights, values, cutoff):262 def __call__(self, call_details, weights, values, cutoff): 262 263 real = (np.float32 if self.q_input.dtype == generate.F32 263 264 else np.float64 if self.q_input.dtype == generate.F64 264 265 else np.float128) 265 assert isinstance( details, generate.CoordinationDetails)266 assert isinstance(call_details, details.CallDetails) 266 267 assert weights.dtype == real and values.dtype == real 267 268 268 start, stop = 0, details.total_pd269 start, stop = 0, call_details.total_pd 269 270 #print("in kerneldll") 270 271 #print("weights", weights) … … 274 275 start, # pd_start 275 276 stop, # pd_stop pd_stride[MAX_PD] 276 details.ctypes.data, # problem277 call_details.ctypes.data, # problem 277 278 weights.ctypes.data, # weights 278 279 values.ctypes.data, #pars
Note: See TracChangeset
for help on using the changeset viewer.