From 56f300607b1d0b81ab3269894fda5a066c46cdeb Mon Sep 17 00:00:00 2001 From: Ivan Shapovalov Date: Tue, 18 Oct 2016 04:53:06 +0300 Subject: Routine: get rid of ::SetUp() Since we now use C++ exceptions inside the implementation (and exceptions can be thrown from constructors), there is no need for a separate Routine::SetUp() function. For this, we also change the way how the kernel source string is constructed. The kernel-specific source code is now passed to the Routine ctor via an initializer_list of C strings to avoid unnecessary data copying while also working around C1091 of MSVC 2013. --- scripts/generator/generator/cpp.py | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts/generator') diff --git a/scripts/generator/generator/cpp.py b/scripts/generator/generator/cpp.py index 507b0d28..a0d43667 100644 --- a/scripts/generator/generator/cpp.py +++ b/scripts/generator/generator/cpp.py @@ -52,7 +52,6 @@ def clblast_cc(routine): result += " try {" + NL result += " auto queue_cpp = Queue(*queue);" + NL result += " auto routine = X" + routine.name + "<" + routine.template.template + ">(queue_cpp, event);" + NL - result += " routine.SetUp();" + NL result += " routine.Do" + routine.name.capitalize() + "(" result += ("," + NL + indent1).join([a for a in routine.arguments_clcudaapi()]) result += ");" + NL -- cgit v1.2.3