Changeset def2c1b in sasmodels


Ignore:
Timestamp:
Jul 15, 2016 5:26:27 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
b9c12fe5
Parents:
a738209
Message:

honour platform request when selecting kernel

Location:
sasmodels
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    ra738209 rdef2c1b  
    850850        engines.extend(['single', 'double']) 
    851851    elif len(engines) == 1: 
    852         if engines[0][0] != 'double': 
     852        if engines[0][0] == 'double': 
     853            engines.append('single') 
     854        else: 
    853855            engines.append('double') 
    854         else: 
    855             engines.append('single') 
    856856    elif len(engines) > 2: 
    857857        del engines[2:] 
  • sasmodels/core.py

    r56b2687 rdef2c1b  
    139139        return kernelpy.PyModel(model_info) 
    140140 
    141     numpy_dtype, fast, platform = parse_dtype(model_info, dtype) 
     141    numpy_dtype, fast, platform = parse_dtype(model_info, dtype, platform) 
    142142 
    143143    source = generate.make_source(model_info) 
     
    171171            try: 
    172172                kerneldll.DLL_PATH = path 
    173                 dll = kerneldll.make_dll(source, model_info, dtype=dtype) 
     173                dll = kerneldll.make_dll(source, model_info, dtype=numpy_dtype) 
    174174            finally: 
    175175                kerneldll.DLL_PATH = old_path 
  • sasmodels/kernel.py

    ra738209 rdef2c1b  
    4141    results = None # type: List[np.ndarray] 
    4242 
    43     def __call__(self, call_details, weights, values, cutoff): 
     43    def __call__(self, call_details, values, cutoff): 
    4444        # type: (CallDetails, np.ndarray, np.ndarray, float) -> np.ndarray 
    4545        raise NotImplementedError("need to implement __call__") 
  • sasmodels/kernelcl.py

    ra738209 rdef2c1b  
    509509        self.queue = env.get_queue(dtype) 
    510510 
    511         # details is int32 data, padded to an 8 integer boundary 
    512         size = ((max_pd*5 + npars*3 + 2 + 7)//8)*8 
    513511        self.result_b = cl.Buffer(self.queue.context, mf.READ_WRITE, 
    514512                               q_input.global_size[0] * dtype.itemsize) 
     
    532530        # Call kernel and retrieve results 
    533531        step = 100 
     532        #print("calling OpenCL") 
    534533        for start in range(0, call_details.pd_prod, step): 
    535534            stop = min(start+step, call_details.pd_prod) 
  • sasmodels/kerneldll.py

    ra738209 rdef2c1b  
    357357            self.real(cutoff), # cutoff 
    358358            ] 
     359        #print("calling DLL") 
    359360        self.kernel(*args) # type: ignore 
    360361        return self.result[:-1] 
Note: See TracChangeset for help on using the changeset viewer.