diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2016-03-19 11:09:09 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2016-03-19 11:09:09 +0100 |
commit | d9356954176eba875138e38b5cf0fb131e1ac925 (patch) | |
tree | 7844472ae9025bf0024c303f9de287910b8f2ecd /scripts/generator/generator.py | |
parent | 918797735da29f102f027b9dc19dccc751950c76 (diff) |
Added __declspec(dllexport) to create a DLL on Windows
Diffstat (limited to 'scripts/generator/generator.py')
-rw-r--r-- | scripts/generator/generator.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/generator/generator.py b/scripts/generator/generator.py index 99f326cd..867fe520 100644 --- a/scripts/generator/generator.py +++ b/scripts/generator/generator.py @@ -175,8 +175,8 @@ def clblast_cc(routines): result += " return StatusCode::kNotImplemented;\n" result += "}\n" for flavour in routine.flavours: - indent2 = " "*(23 + routine.Length() + len(flavour.template)) - result += "template StatusCode "+routine.name.capitalize()+"<"+flavour.template+">(" + indent2 = " "*(34 + routine.Length() + len(flavour.template)) + result += "template StatusCode PUBLIC_API "+routine.name.capitalize()+"<"+flavour.template+">(" result += (",\n"+indent2).join([a for a in routine.ArgumentsType(flavour)]) result += ",\n"+indent2+"cl_command_queue*, cl_event*);\n" return result @@ -189,7 +189,7 @@ def clblast_c_h(routines): for routine in routines: result += "\n// "+routine.description+": "+routine.ShortNames()+"\n" for flavour in routine.flavours: - result += routine.RoutineHeaderC(flavour, 20)+";\n" + result += routine.RoutineHeaderC(flavour, 20, "")+";\n" return result # The C API implementation (.cc) @@ -200,7 +200,7 @@ def clblast_c_cc(routines): for flavour in routine.flavours: template = "<"+flavour.template+">" if routine.NoScalars() else "" indent = " "*(26 + routine.Length() + len(template)) - result += routine.RoutineHeaderC(flavour, 20)+" {\n" + result += routine.RoutineHeaderC(flavour, 31, " PUBLIC_API")+" {\n" result += " auto status = clblast::"+routine.name.capitalize()+template+"(" result += (",\n"+indent).join([a for a in routine.ArgumentsCast(flavour, indent)]) result += ",\n"+indent+"queue, event);" @@ -247,7 +247,7 @@ files = [ path_clblast+"/src/clblast_c.cc", path_clblast+"/test/wrapper_clblas.h", ] -header_lines = [84, 63, 80, 24, 22] +header_lines = [84, 64, 80, 25, 22] footer_lines = [6, 3, 5, 2, 6] # Checks whether the command-line arguments are valid; exists otherwise |