Changeset ce27e21 in sasmodels for compare-new.py


Ignore:
Timestamp:
Aug 24, 2014 7:18:14 PM (10 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:
1780d59
Parents:
14de349
Message:

first pass for sasview wrapper around opencl models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • compare-new.py

    r14de349 rce27e21  
    4848            gpu = model.theory() 
    4949        gpu_time = toc()*1000./Ngpu 
    50         print "ocl t=%.1f ms"%gpu_time 
     50        print "ocl t=%.1f ms, intensity=%.0f"%(gpu_time, sum(gpu[~np.isnan(gpu)])) 
    5151        #print max(gpu), min(gpu) 
    5252 
     
    6161        print "dll t=%.1f ms"%cpu_time 
    6262 
    63     elif 1: # Hack to check new vs old for GpuCylinder 
     63    elif 0: # Hack to check new vs old for GpuCylinder 
    6464        from Models.code_cylinder_f import GpuCylinder as oldgpu 
    6565        from sasmodel import SasModel 
     
    7878            cpu = cpumodel.evalDistribution([data.qx_data, data.qy_data]) 
    7979        cpu_time = toc()*1000./Ncpu 
    80         print "sasview t=%.1f ms"%cpu_time 
     80        print "sasview t=%.1f ms, intensity=%.0f"%(cpu_time, sum(cpu[model.index])) 
    8181 
    8282    if Ngpu > 0 and Ncpu > 0: 
Note: See TracChangeset for help on using the changeset viewer.