summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2018-08-05 21:12:39 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2018-08-05 21:12:39 +0200
commitfe639455bd1e02c22c459f9e29654f82652e0a97 (patch)
treef908efbddf52b46f72a0dbc081aa6e9c5745e4f8 /scripts
parent2bea758165cd8c784d1fafe60a949154c2e10000 (diff)
Added an option to compile the Netlib API with static OpenCL device and context
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generator/generator.py2
-rw-r--r--scripts/generator/generator/cpp.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/generator/generator.py b/scripts/generator/generator.py
index 1db789d2..25a04273 100755
--- a/scripts/generator/generator.py
+++ b/scripts/generator/generator.py
@@ -49,7 +49,7 @@ FILES = [
"/src/clblast_cuda.cpp",
"/src/pyclblast/src/pyclblast.pyx"
]
-HEADER_LINES = [123, 21, 127, 24, 29, 45, 29, 65, 32, 95, 21, 290]
+HEADER_LINES = [123, 21, 127, 24, 29, 45, 29, 65, 40, 95, 21, 290]
FOOTER_LINES = [98, 57, 112, 275, 6, 6, 6, 9, 2, 41, 56, 37]
HEADER_LINES_DOC = 0
FOOTER_LINES_DOC = 232
diff --git a/scripts/generator/generator/cpp.py b/scripts/generator/generator/cpp.py
index 51ca047c..6dc3fc93 100644
--- a/scripts/generator/generator/cpp.py
+++ b/scripts/generator/generator/cpp.py
@@ -145,8 +145,8 @@ def clblast_netlib_c_cc(routine):
result += routine.routine_header_netlib(flavour, 9, "") + " {" + NL
# Initialize OpenCL
- result += " auto device = get_device();" + NL
- result += " auto context = clblast::Context(device);" + NL
+ result += " OPTIONAL_STATIC auto device = get_device();" + NL
+ result += " OPTIONAL_STATIC auto context = clblast::Context(device);" + NL
result += " auto queue = clblast::Queue(context, device);" + NL
# Set alpha and beta