Removed the clblast namespace from the Netlib C API source file to ensure proper linking
parent
729862e873
commit
140121ef91
|
@ -163,7 +163,6 @@ set(PRECISIONS 32 64 3232 6464 16)
|
|||
|
||||
# Gathers all source-files
|
||||
set(SOURCES
|
||||
src/clblast_blas.cpp
|
||||
src/database/database.cpp
|
||||
src/routines/common.cpp
|
||||
src/utilities/clblast_exceptions.cpp
|
||||
|
@ -171,6 +170,7 @@ set(SOURCES
|
|||
src/cache.cpp
|
||||
src/clblast.cpp
|
||||
src/clblast_c.cpp
|
||||
src/clblast_blas.cpp
|
||||
src/routine.cpp
|
||||
)
|
||||
foreach(ROUTINE ${LEVEL1_ROUTINES})
|
||||
|
|
|
@ -42,7 +42,7 @@ FILES = [
|
|||
"/src/clblast_blas.cpp",
|
||||
]
|
||||
HEADER_LINES = [117, 73, 118, 22, 29, 41, 47, 32]
|
||||
FOOTER_LINES = [17, 80, 19, 18, 6, 6, 9, 3]
|
||||
FOOTER_LINES = [17, 80, 19, 18, 6, 6, 9, 2]
|
||||
|
||||
# Different possibilities for requirements
|
||||
ald_m = "The value of `a_ld` must be at least `m`."
|
||||
|
|
|
@ -112,13 +112,13 @@ def clblast_blas_cc(routine):
|
|||
# There is a version available in CBLAS
|
||||
if flavour.precision_name in ["S", "D", "C", "Z"]:
|
||||
template = "<" + flavour.template + ">" if routine.no_scalars() else ""
|
||||
indent = " " * (12 + routine.length() + len(template))
|
||||
indent = " " * (21 + routine.length() + len(template))
|
||||
result += routine.routine_header_netlib(flavour, 13, "") + " {" + NL
|
||||
|
||||
# Initialize OpenCL
|
||||
result += " auto device = get_device();" + NL
|
||||
result += " auto context = Context(device);" + NL
|
||||
result += " auto queue = Queue(context, device);" + NL
|
||||
result += " auto context = clblast::Context(device);" + NL
|
||||
result += " auto queue = clblast::Queue(context, device);" + NL
|
||||
|
||||
# Set alpha and beta
|
||||
result += "".join(" " + s + NL for s in routine.scalar_create_cpp(flavour))
|
||||
|
@ -134,13 +134,13 @@ def clblast_blas_cc(routine):
|
|||
|
||||
# The function call
|
||||
result += " auto queue_cl = queue();" + NL
|
||||
result += " auto s = " + routine.name.capitalize() + template + "("
|
||||
result += " auto s = clblast::" + routine.name.capitalize() + template + "("
|
||||
result += ("," + NL + indent).join([a for a in routine.arguments_netlib(flavour, indent)])
|
||||
result += "," + NL + indent + "&queue_cl);" + NL
|
||||
|
||||
# Error handling
|
||||
result += " if (s != StatusCode::kSuccess) {" + NL
|
||||
result += " throw std::runtime_error(\"CLBlast returned with error code \" + ToString(s));" + NL
|
||||
result += " if (s != clblast::StatusCode::kSuccess) {" + NL
|
||||
result += " throw std::runtime_error(\"CLBlast returned with error code \" + clblast::ToString(s));" + NL
|
||||
result += " }" + NL
|
||||
|
||||
# Copy back and clean-up
|
||||
|
|
|
@ -75,7 +75,7 @@ class Routine:
|
|||
@staticmethod
|
||||
def create_buffer(name, template):
|
||||
"""Creates a new CLCudaAPI buffer"""
|
||||
return "auto " + name + "_buffer = Buffer<" + template + ">(context, " + name + "_size);"
|
||||
return "auto " + name + "_buffer = clblast::Buffer<" + template + ">(context, " + name + "_size);"
|
||||
|
||||
@staticmethod
|
||||
def write_buffer(name, template):
|
||||
|
|
4181
src/clblast_blas.cpp
4181
src/clblast_blas.cpp
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue