From 7b4c0e1cf03a94077c20f7f12ef15fb8717c74ca Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sat, 18 Jun 2016 14:56:55 +0200 Subject: Removed the template from the Routine base-class --- src/routine.cc | 17 +++-------------- src/routines/level1/xamax.cc | 2 +- src/routines/level1/xasum.cc | 2 +- src/routines/level1/xaxpy.cc | 2 +- src/routines/level1/xcopy.cc | 2 +- src/routines/level1/xdot.cc | 2 +- src/routines/level1/xnrm2.cc | 2 +- src/routines/level1/xscal.cc | 2 +- src/routines/level1/xswap.cc | 2 +- src/routines/level2/xgemv.cc | 2 +- src/routines/level2/xger.cc | 2 +- src/routines/level2/xher.cc | 2 +- src/routines/level2/xher2.cc | 2 +- src/routines/level3/xgemm.cc | 2 +- src/routines/level3/xher2k.cc | 2 +- src/routines/level3/xherk.cc | 2 +- src/routines/level3/xsyr2k.cc | 2 +- src/routines/level3/xsyrk.cc | 2 +- src/routines/levelx/xomatcopy.cc | 2 +- 19 files changed, 21 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/routine.cc b/src/routine.cc index 1086aead..9b1640b5 100644 --- a/src/routine.cc +++ b/src/routine.cc @@ -20,9 +20,8 @@ namespace clblast { // ================================================================================================= // Constructor: not much here, because no status codes can be returned -template -Routine::Routine(Queue &queue, EventPointer event, const std::string &name, - const std::vector &routines, const Precision precision): +Routine::Routine(Queue &queue, EventPointer event, const std::string &name, + const std::vector &routines, const Precision precision): precision_(precision), routine_name_(name), queue_(queue), @@ -36,8 +35,7 @@ Routine::Routine(Queue &queue, EventPointer event, const std::string &name, // ================================================================================================= // Separate set-up function to allow for status codes to be returned -template -StatusCode Routine::SetUp() { +StatusCode Routine::SetUp() { // Queries the cache to see whether or not the program (context-specific) is already there if (ProgramIsInCache(context_, precision_, routine_name_)) { return StatusCode::kSuccess; } @@ -174,14 +172,5 @@ StatusCode RunKernel(Kernel &kernel, Queue queue, const Device device, return RunKernel(kernel, queue, device, global, local, event, emptyWaitingList); } -// ================================================================================================= - -// Compiles the templated class -template class Routine; -template class Routine; -template class Routine; -template class Routine; -template class Routine; - // ================================================================================================= } // namespace clblast diff --git a/src/routines/level1/xamax.cc b/src/routines/level1/xamax.cc index 1a3441ef..b4add2a3 100644 --- a/src/routines/level1/xamax.cc +++ b/src/routines/level1/xamax.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xamax::Xamax(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { + Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/xamax.opencl" ; diff --git a/src/routines/level1/xasum.cc b/src/routines/level1/xasum.cc index 85c6e1ed..80f04829 100644 --- a/src/routines/level1/xasum.cc +++ b/src/routines/level1/xasum.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xasum::Xasum(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { + Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/xasum.opencl" ; diff --git a/src/routines/level1/xaxpy.cc b/src/routines/level1/xaxpy.cc index 39121067..4a548757 100644 --- a/src/routines/level1/xaxpy.cc +++ b/src/routines/level1/xaxpy.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xaxpy::Xaxpy(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { + Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xaxpy.opencl" diff --git a/src/routines/level1/xcopy.cc b/src/routines/level1/xcopy.cc index d85efca3..92d31786 100644 --- a/src/routines/level1/xcopy.cc +++ b/src/routines/level1/xcopy.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xcopy::Xcopy(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { + Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xcopy.opencl" diff --git a/src/routines/level1/xdot.cc b/src/routines/level1/xdot.cc index e3a6b1f0..8709c541 100644 --- a/src/routines/level1/xdot.cc +++ b/src/routines/level1/xdot.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xdot::Xdot(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { + Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/xdot.opencl" ; diff --git a/src/routines/level1/xnrm2.cc b/src/routines/level1/xnrm2.cc index 1730e144..105f991c 100644 --- a/src/routines/level1/xnrm2.cc +++ b/src/routines/level1/xnrm2.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xnrm2::Xnrm2(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { + Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/xnrm2.opencl" ; diff --git a/src/routines/level1/xscal.cc b/src/routines/level1/xscal.cc index 4792d40b..3c1b5257 100644 --- a/src/routines/level1/xscal.cc +++ b/src/routines/level1/xscal.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xscal::Xscal(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { + Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xscal.opencl" diff --git a/src/routines/level1/xswap.cc b/src/routines/level1/xswap.cc index 897515fb..27eb9b13 100644 --- a/src/routines/level1/xswap.cc +++ b/src/routines/level1/xswap.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xswap::Xswap(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { + Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xswap.opencl" diff --git a/src/routines/level2/xgemv.cc b/src/routines/level2/xgemv.cc index ea3b245d..ccadd131 100644 --- a/src/routines/level2/xgemv.cc +++ b/src/routines/level2/xgemv.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xgemv::Xgemv(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Pad", "Xgemv"}, PrecisionValue()) { + Routine(queue, event, name, {"Pad", "Xgemv"}, PrecisionValue()) { source_string_ = #include "../../kernels/level2/xgemv.opencl" #include "../../kernels/level2/xgemv_fast.opencl" diff --git a/src/routines/level2/xger.cc b/src/routines/level2/xger.cc index e487d41b..6ceaa00e 100644 --- a/src/routines/level2/xger.cc +++ b/src/routines/level2/xger.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xger::Xger(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xger"}, PrecisionValue()) { + Routine(queue, event, name, {"Xger"}, PrecisionValue()) { source_string_ = #include "../../kernels/level2/level2.opencl" #include "../../kernels/level2/xger.opencl" diff --git a/src/routines/level2/xher.cc b/src/routines/level2/xher.cc index 08ff5a2e..939e17bb 100644 --- a/src/routines/level2/xher.cc +++ b/src/routines/level2/xher.cc @@ -21,7 +21,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xher::Xher(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xger"}, PrecisionValue()) { + Routine(queue, event, name, {"Xger"}, PrecisionValue()) { source_string_ = #include "../../kernels/level2/level2.opencl" #include "../../kernels/level2/xher.opencl" diff --git a/src/routines/level2/xher2.cc b/src/routines/level2/xher2.cc index d5d4323b..95dbd87a 100644 --- a/src/routines/level2/xher2.cc +++ b/src/routines/level2/xher2.cc @@ -21,7 +21,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xher2::Xher2(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xger"}, PrecisionValue()) { + Routine(queue, event, name, {"Xger"}, PrecisionValue()) { source_string_ = #include "../../kernels/level2/level2.opencl" #include "../../kernels/level2/xher2.opencl" diff --git a/src/routines/level3/xgemm.cc b/src/routines/level3/xgemm.cc index 7d06c2a2..8386ad09 100644 --- a/src/routines/level3/xgemm.cc +++ b/src/routines/level3/xgemm.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xgemm::Xgemm(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" diff --git a/src/routines/level3/xher2k.cc b/src/routines/level3/xher2k.cc index 0e5178df..bd0f83dd 100644 --- a/src/routines/level3/xher2k.cc +++ b/src/routines/level3/xher2k.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xher2k::Xher2k(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" diff --git a/src/routines/level3/xherk.cc b/src/routines/level3/xherk.cc index f8ec217a..6155734a 100644 --- a/src/routines/level3/xherk.cc +++ b/src/routines/level3/xherk.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xherk::Xherk(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" diff --git a/src/routines/level3/xsyr2k.cc b/src/routines/level3/xsyr2k.cc index b517520c..f9655889 100644 --- a/src/routines/level3/xsyr2k.cc +++ b/src/routines/level3/xsyr2k.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xsyr2k::Xsyr2k(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" diff --git a/src/routines/level3/xsyrk.cc b/src/routines/level3/xsyrk.cc index ccf8710c..bceb6afd 100644 --- a/src/routines/level3/xsyrk.cc +++ b/src/routines/level3/xsyrk.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xsyrk::Xsyrk(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" diff --git a/src/routines/levelx/xomatcopy.cc b/src/routines/levelx/xomatcopy.cc index c724b56b..6e4bddb2 100644 --- a/src/routines/levelx/xomatcopy.cc +++ b/src/routines/levelx/xomatcopy.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xomatcopy::Xomatcopy(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose"}, PrecisionValue()) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" -- cgit v1.2.3