diff options
author | Ivan Shapovalov <intelfx@intelfx.name> | 2016-10-18 04:53:06 +0300 |
---|---|---|
committer | Ivan Shapovalov <intelfx@intelfx.name> | 2016-10-22 08:45:27 +0300 |
commit | 56f300607b1d0b81ab3269894fda5a066c46cdeb (patch) | |
tree | 60b4c5566cc4bbfad15a7791a4e20c2a60e16707 /src/routines/level2 | |
parent | b98af44fcf89b9946e1de438b1f5527e6bf28905 (diff) |
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.
Diffstat (limited to 'src/routines/level2')
-rw-r--r-- | src/routines/level2/xgemv.cpp | 5 | ||||
-rw-r--r-- | src/routines/level2/xger.cpp | 5 | ||||
-rw-r--r-- | src/routines/level2/xher.cpp | 5 | ||||
-rw-r--r-- | src/routines/level2/xher2.cpp | 5 |
4 files changed, 8 insertions, 12 deletions
diff --git a/src/routines/level2/xgemv.cpp b/src/routines/level2/xgemv.cpp index 97dcd8ef..7b4c2e8f 100644 --- a/src/routines/level2/xgemv.cpp +++ b/src/routines/level2/xgemv.cpp @@ -22,11 +22,10 @@ namespace clblast { // Constructor: forwards to base class constructor template <typename T> Xgemv<T>::Xgemv(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Pad", "Xgemv", "XgemvFast", "XgemvFastRot"}, PrecisionValue<T>()) { - source_string_ = + Routine(queue, event, name, {"Pad", "Xgemv", "XgemvFast", "XgemvFastRot"}, PrecisionValue<T>(), {}, { #include "../../kernels/level2/xgemv.opencl" #include "../../kernels/level2/xgemv_fast.opencl" - ; + }) { } // ================================================================================================= diff --git a/src/routines/level2/xger.cpp b/src/routines/level2/xger.cpp index f22131bb..d16ebd11 100644 --- a/src/routines/level2/xger.cpp +++ b/src/routines/level2/xger.cpp @@ -22,11 +22,10 @@ namespace clblast { // Constructor: forwards to base class constructor template <typename T> Xger<T>::Xger(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xger"}, PrecisionValue<T>()) { - source_string_ = + Routine(queue, event, name, {"Xger"}, PrecisionValue<T>(), {}, { #include "../../kernels/level2/level2.opencl" #include "../../kernels/level2/xger.opencl" - ; + }) { } // ================================================================================================= diff --git a/src/routines/level2/xher.cpp b/src/routines/level2/xher.cpp index 4cf27702..6c334e63 100644 --- a/src/routines/level2/xher.cpp +++ b/src/routines/level2/xher.cpp @@ -21,11 +21,10 @@ namespace clblast { // Constructor: forwards to base class constructor template <typename T, typename U> Xher<T,U>::Xher(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xger"}, PrecisionValue<T>()) { - source_string_ = + Routine(queue, event, name, {"Xger"}, PrecisionValue<T>(), {}, { #include "../../kernels/level2/level2.opencl" #include "../../kernels/level2/xher.opencl" - ; + }) { } // ================================================================================================= diff --git a/src/routines/level2/xher2.cpp b/src/routines/level2/xher2.cpp index c93585de..11e2c871 100644 --- a/src/routines/level2/xher2.cpp +++ b/src/routines/level2/xher2.cpp @@ -21,11 +21,10 @@ namespace clblast { // Constructor: forwards to base class constructor template <typename T> Xher2<T>::Xher2(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xger"}, PrecisionValue<T>()) { - source_string_ = + Routine(queue, event, name, {"Xger"}, PrecisionValue<T>(), {}, { #include "../../kernels/level2/level2.opencl" #include "../../kernels/level2/xher2.opencl" - ; + }) { } // ================================================================================================= |