Changeset 2de9a5e in sasmodels for code_lamellar.py


Ignore:
Timestamp:
Jul 11, 2014 2:47:47 PM (10 years ago)
Author:
HMP1 <helen.park@…>
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:
be5d7df
Parents:
8faffcd
Message:

Update for Aaron

File:
1 moved

Legend:

Unmodified
Added
Removed
  • code_lamellar.py

    r8a20be5 r2de9a5e  
    1111    if dtype == 'double': 
    1212        header = """\ 
     13#define real float 
     14""" 
     15    else: 
     16        header = """\ 
    1317#pragma OPENCL EXTENSION cl_khr_fp64: enable 
    1418#define real double 
    1519""" 
    16         return header+src,qx,qy 
    17     else: 
    18         return src,qx,qy 
     20    return header+src, qx, qy 
    1921 
    2022 
     
    2325        'scale':1, 'bi_thick':1, 'sld_bi':1e-6, 'sld_sol':0, 'background':0, 
    2426    } 
    25  
    26     def __init__(self, qx, qy, dtype='float'): 
     27    PD_PARS = {'bi_thick'} 
     28    def __init__(self, qx, qy, dtype='float32'): 
    2729 
    2830        #create context, queue, and build program 
     
    5153        for i in xrange(len(bi_thick.weight)): 
    5254            self.prg.LamellarKernel(self.queue, self.qx.shape, None, self.qx_b, self.qy_b, self.res_b, real(bi_thick.value[i]), 
    53                                     real(pars['scale']), real(sub), real(pars['background']), np.uint32(self.qx.size)) 
     55                                    real(pars['scale']), real(sub), np.uint32(self.qx.size)) 
    5456            cl.enqueue_copy(self.queue, self.res, self.res_b) 
    5557 
Note: See TracChangeset for help on using the changeset viewer.