Changeset a557a99 in sasmodels


Ignore:
Timestamp:
Sep 8, 2016 4:27:32 AM (8 years ago)
Author:
wojciech
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:
551398c
Parents:
c52f9da
Message:

A few fixes to make code cleaner and add PYOPENCL_CTX control

Location:
sasmodels
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    r8407d8c ra557a99  
    563563    elif dtype.endswith('!'): 
    564564        return eval_ctypes(model_info, data, dtype=dtype[:-1], cutoff=cutoff) 
    565     elif not model_info.opencl: 
    566         return eval_ctypes(model_info, data, dtype=dtype, cutoff=cutoff) 
    567565    else: 
    568566        return eval_opencl(model_info, data, dtype=dtype, cutoff=cutoff) 
  • sasmodels/core.py

    rc52f9da ra557a99  
    2222from . import kerneldll 
    2323 
    24 if "SAS_OPENCL" in os.environ and os.environ["SAS_OPENCL"]=="None": 
     24if os.environ.get("SAS_OPENCL", "").lower() == "none": 
    2525    HAVE_OPENCL = False 
    2626else: 
     
    229229        platform = "dll" 
    230230 
     231    # if platform is None: 
     232    #     platform = "ocl" if model_info.opencl else "dll" 
     233    # if platform == "ocl" and not HAVE_OPENCL: 
     234    #     platform = "dll" 
     235 
    231236    # Check if type indicates dll regardless of which platform is given 
    232237    if dtype is not None and dtype.endswith('!'): 
  • sasmodels/kernelcl.py

    r880a2ed ra557a99  
    231231            #Setting PYOPENCL_CTX as a SAS_OPENCL to create cl context 
    232232            os.environ["PYOPENCL_CTX"] = os.environ["SAS_OPENCL"] 
     233        if 'PYOPENCL_CTX' in os.environ: 
    233234            self._create_some_context() 
    234235 
  • sasmodels/models/cylinder.py

    r9a4811a ra557a99  
    104104            f(q,alpha)^(2)*sin(alpha)*dalpha + background 
    105105""" 
     106#opencl=False 
    106107category = "shape:cylinder" 
    107108 
Note: See TracChangeset for help on using the changeset viewer.