Changeset b297ba9 in sasmodels for sasmodels/kernelcuda.py


Ignore:
Timestamp:
Mar 20, 2019 7:03:50 PM (5 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
4e28511
Parents:
0d362b7
Message:

lint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernelcuda.py

    rfa26e78 rb297ba9  
    5959 
    6060import os 
    61 import warnings 
    6261import logging 
    6362import time 
     
    110109 
    111110def use_cuda(): 
     111    # type: None -> bool 
     112    """Returns True if CUDA is the default compute engine.""" 
    112113    sas_opencl = os.environ.get("SAS_OPENCL", "CUDA").lower() 
    113114    return HAVE_CUDA and sas_opencl.startswith("cuda") 
     
    136137        if not HAVE_CUDA: 
    137138            raise RuntimeError("CUDA startup failed with ***" 
    138                             + CUDA_ERROR + "***; using C compiler instead") 
     139                               + CUDA_ERROR + "***; using C compiler instead") 
    139140        reset_environment() 
    140141        if ENV is None: 
     
    198199    """ 
    199200    for match in FUNCTION_PATTERN.finditer(source): 
    200         print(match.group('qualifiers').replace('\n',r'\n'), match.group('function'), '(') 
     201        print(match.group('qualifiers').replace('\n', r'\n'), 
     202              match.group('function'), '(') 
    201203    return source 
    202204 
     
    260262 
    261263    def release(self): 
     264        """Free the CUDA device associated with this context.""" 
    262265        if self.context is not None: 
    263266            self.context.pop() 
Note: See TracChangeset for help on using the changeset viewer.