Skip to content

Commit

Permalink
Remove import from debug from openclpow, remove shebang, format
Browse files Browse the repository at this point in the history
  • Loading branch information
g1itch committed Feb 18, 2021
1 parent e77238f commit 81645ea
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/openclpow.py
@@ -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
try:
import numpy
import pyopencl as cl
libAvailable = True
except ImportError:
libAvailable = False


logger = logging.getLogger('default')

ctx = False
queue = False
program = False
Expand All @@ -19,17 +27,10 @@
vendors = []
hash_dt = None

try:
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:
return
del enabledGpus[:]
Expand Down

0 comments on commit 81645ea

Please sign in to comment.