Changes in / [afda63c:31641b2] in sasmodels
- Location:
- sasmodels
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
r1edf610 ra4e2ae5 452 452 """ 453 453 # initialize the code so time is more accurate 454 #value = calculator(**suppress_pd(pars)) 454 if Nevals > 1: 455 value = calculator(**suppress_pd(pars)) 455 456 toc = tic() 456 457 for _ in range(max(Nevals, 1)): # make sure there is at least one eval -
sasmodels/core.py
r1edf610 r88aa3ee 222 222 """ 223 223 if mono: 224 values = [pars.get(p.name, p.default) for p in kernel.info['parameters']] 225 weights = [1.0]*len(values) 226 else: 227 vw_pairs = [get_weights(p, pars) for p in kernel.info['parameters']] 228 values, weights = zip(*vw_pairs) 229 230 #TODO: This is what we thought to do if max([len(w) for w in weights]) > 1: 231 print("from") 232 import pprint; pprint.pprint(weights) 233 print("to") 224 active = lambda name: False 225 elif kernel.dim == '1d': 226 active = lambda name: name in set(kernel.info['par_type']['1d']) 227 elif kernel.dim == '2d': 228 active = lambda name: name in set(kernel.info['par_type']['2d']) 229 else: 230 active = lambda name: True 231 232 vw_pairs = [(get_weights(p, pars) if active(p.name) else ([p.default], [1])) 233 for p in kernel.info['parameters']] 234 values, weights = zip(*vw_pairs) 235 234 236 if max([len(w) for w in weights]) > 1: 235 237 details = generate.poly_details(kernel.info, weights) -
sasmodels/kernelcl.py
rc072f83 r445d1c0 446 446 q_input = GpuInput(q_vectors, dtype) 447 447 self.dtype = dtype 448 self.dim = '2d' if q_input.is_2d else '1d' 448 449 self.kernel = kernel 449 450 self.info = model_info … … 452 453 # plus three for the normalization values 453 454 self.result = np.empty(q_input.nq+3, q_input.dtype) 454 #self.dim = '2d' if q_input.is_2d else '1d'455 455 456 456 # Inputs and outputs for each kernel call -
sasmodels/kerneldll.py
r0880966 r445d1c0 256 256 self.kernel = kernel 257 257 self.res = np.empty(q_input.nq+3, q_input.dtype) 258 dim = '2d' if q_input.is_2d else '1d' 259 self.parameters = model_info['par_type'][dim] 258 self.dim = '2d' if q_input.is_2d else '1d' 260 259 261 260 # In dll kernel, but not in opencl kernel
Note: See TracChangeset
for help on using the changeset viewer.