Changeset ae7d639 in sasmodels for Models/code_cylinder_f.py


Ignore:
Timestamp:
Aug 8, 2014 2:55:23 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:
a953943
Parents:
1726b21
Message:

Ellipse now MUCH faster!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Models/code_cylinder_f.py

    r1726b21 rae7d639  
    22# -*- coding: utf-8 -*- 
    33 
    4 import sys 
     4 
    55import ctypes 
    66from ctypes import c_int, c_double, c_void_p 
     
    4545        loops_b = cl.Buffer(ctx, mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=loops) 
    4646        loops_l = cl.LocalMemory(len(loops.data)) 
     47 
    4748        self.prg.CylinderKernel(queue, self.qx.shape, None, 
    4849            self.qx_b, self.qy_b, self.res_b, 
     
    5152            real(pars['sldCyl']-pars['sldSolv']), 
    5253            *[np.uint32(pn) for pn in loop_lengths]) 
     54 
    5355        cl.enqueue_copy(queue, self.res, self.res_b) 
    5456        print toc()*1000, self.qx.shape[0] 
     
    8587        length.get_weights(pars['length'], 0, 10000, True), 
    8688        theta.get_weights(pars['cyl_theta'], -np.inf, np.inf, False), 
    87         theta.get_weights(pars['cyl_phi'], -np.inf, np.inf, False), 
     89        phi.get_weights(pars['cyl_phi'], -np.inf, np.inf, False), 
    8890        ] 
    8991    # Make sure that weights are normalized to peaks at 1 so that 
Note: See TracChangeset for help on using the changeset viewer.