Remove import from debug from openclpow, remove shebang, format

This commit is contained in:
Dmitri Bogomolov 2021-02-06 21:51:47 +02:00
parent e77238fa07
commit 81645eadef
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
1 changed files with 12 additions and 11 deletions

View File

@ -1,16 +1,24 @@
#!/usr/bin/env python2.7
Module for Proof of Work using OpenCL
import logging
import os
from struct import pack
import paths
from bmconfigparser import BMConfigParser
from debug import logger
from state import shutdown
libAvailable = True
import numpy
import pyopencl as cl
libAvailable = True
except ImportError:
libAvailable = False
logger = logging.getLogger('default')
ctx = False
queue = False
program = False
@ -19,17 +27,10 @@ enabledGpus = []
vendors = []
hash_dt = None
import pyopencl as cl
import numpy
except ImportError:
libAvailable = False
def initCL():
"""Initlialise OpenCL engine"""
# pylint: disable=global-statement
global ctx, queue, program, hash_dt, libAvailable
global ctx, queue, program, hash_dt # pylint: disable=global-statement
if libAvailable is False:
del enabledGpus[:]