summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-06-17 11:41:10 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-06-17 11:41:10 +0200
commit520e28e7a72f288f04d04d86d4e7560d78159820 (patch)
tree6f32fc487d2bb0305e03220610d574f4af22075b /include
parentafe8852eaae20fbdd3f38e9cac63a9162251d90b (diff)
Moved the ErrorIn function from the Routine class to the utilities header
Diffstat (limited to 'include')
-rw-r--r--include/internal/routine.h3
-rw-r--r--include/internal/routines/level1/xamax.h1
-rw-r--r--include/internal/routines/level1/xasum.h1
-rw-r--r--include/internal/routines/level1/xaxpy.h1
-rw-r--r--include/internal/routines/level1/xcopy.h1
-rw-r--r--include/internal/routines/level1/xdot.h1
-rw-r--r--include/internal/routines/level1/xnrm2.h1
-rw-r--r--include/internal/routines/level1/xscal.h1
-rw-r--r--include/internal/routines/level1/xswap.h1
-rw-r--r--include/internal/routines/level2/xgemv.h1
-rw-r--r--include/internal/routines/level2/xger.h1
-rw-r--r--include/internal/routines/level2/xher.h1
-rw-r--r--include/internal/routines/level2/xher2.h1
-rw-r--r--include/internal/routines/level3/xgemm.h1
-rw-r--r--include/internal/routines/level3/xhemm.h1
-rw-r--r--include/internal/routines/level3/xher2k.h1
-rw-r--r--include/internal/routines/level3/xherk.h1
-rw-r--r--include/internal/routines/level3/xsymm.h1
-rw-r--r--include/internal/routines/level3/xsyr2k.h1
-rw-r--r--include/internal/routines/level3/xsyrk.h1
-rw-r--r--include/internal/routines/level3/xtrmm.h1
-rw-r--r--include/internal/routines/levelx/xomatcopy.h1
-rw-r--r--include/internal/utilities.h5
23 files changed, 5 insertions, 24 deletions
diff --git a/include/internal/routine.h b/include/internal/routine.h
index 0b53b82e..0f64c479 100644
--- a/include/internal/routine.h
+++ b/include/internal/routine.h
@@ -32,9 +32,6 @@ template <typename T>
class Routine {
public:
- // Helper functions which check for errors in the status code
- static constexpr bool ErrorIn(const StatusCode s) { return (s != StatusCode::kSuccess); }
-
// Base class constructor
explicit Routine(Queue &queue, EventPointer event, const std::string &name,
const std::vector<std::string> &routines, const Precision precision);
diff --git a/include/internal/routines/level1/xamax.h b/include/internal/routines/level1/xamax.h
index b44e0ceb..70d8a6b0 100644
--- a/include/internal/routines/level1/xamax.h
+++ b/include/internal/routines/level1/xamax.h
@@ -32,7 +32,6 @@ class Xamax: public Routine<T> {
using Routine<T>::context_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xamax(Queue &queue, EventPointer event, const std::string &name = "AMAX");
diff --git a/include/internal/routines/level1/xasum.h b/include/internal/routines/level1/xasum.h
index 8e22d76a..8b5c9c76 100644
--- a/include/internal/routines/level1/xasum.h
+++ b/include/internal/routines/level1/xasum.h
@@ -32,7 +32,6 @@ class Xasum: public Routine<T> {
using Routine<T>::context_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xasum(Queue &queue, EventPointer event, const std::string &name = "ASUM");
diff --git a/include/internal/routines/level1/xaxpy.h b/include/internal/routines/level1/xaxpy.h
index da5b2b0f..bd8f5892 100644
--- a/include/internal/routines/level1/xaxpy.h
+++ b/include/internal/routines/level1/xaxpy.h
@@ -32,7 +32,6 @@ class Xaxpy: public Routine<T> {
using Routine<T>::context_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xaxpy(Queue &queue, EventPointer event, const std::string &name = "AXPY");
diff --git a/include/internal/routines/level1/xcopy.h b/include/internal/routines/level1/xcopy.h
index 08e63ce4..f01d5b08 100644
--- a/include/internal/routines/level1/xcopy.h
+++ b/include/internal/routines/level1/xcopy.h
@@ -31,7 +31,6 @@ class Xcopy: public Routine<T> {
using Routine<T>::event_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xcopy(Queue &queue, EventPointer event, const std::string &name = "COPY");
diff --git a/include/internal/routines/level1/xdot.h b/include/internal/routines/level1/xdot.h
index 5c46e0dc..46cf9959 100644
--- a/include/internal/routines/level1/xdot.h
+++ b/include/internal/routines/level1/xdot.h
@@ -32,7 +32,6 @@ class Xdot: public Routine<T> {
using Routine<T>::context_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xdot(Queue &queue, EventPointer event, const std::string &name = "DOT");
diff --git a/include/internal/routines/level1/xnrm2.h b/include/internal/routines/level1/xnrm2.h
index 5abfaa59..3a0cf45c 100644
--- a/include/internal/routines/level1/xnrm2.h
+++ b/include/internal/routines/level1/xnrm2.h
@@ -32,7 +32,6 @@ class Xnrm2: public Routine<T> {
using Routine<T>::context_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xnrm2(Queue &queue, EventPointer event, const std::string &name = "NRM2");
diff --git a/include/internal/routines/level1/xscal.h b/include/internal/routines/level1/xscal.h
index 5786869f..9a0f83ab 100644
--- a/include/internal/routines/level1/xscal.h
+++ b/include/internal/routines/level1/xscal.h
@@ -31,7 +31,6 @@ class Xscal: public Routine<T> {
using Routine<T>::event_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xscal(Queue &queue, EventPointer event, const std::string &name = "SCAL");
diff --git a/include/internal/routines/level1/xswap.h b/include/internal/routines/level1/xswap.h
index 483f21d5..02360c38 100644
--- a/include/internal/routines/level1/xswap.h
+++ b/include/internal/routines/level1/xswap.h
@@ -31,7 +31,6 @@ class Xswap: public Routine<T> {
using Routine<T>::event_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xswap(Queue &queue, EventPointer event, const std::string &name = "SWAP");
diff --git a/include/internal/routines/level2/xgemv.h b/include/internal/routines/level2/xgemv.h
index 6e8f0e47..dcfcbd1f 100644
--- a/include/internal/routines/level2/xgemv.h
+++ b/include/internal/routines/level2/xgemv.h
@@ -32,7 +32,6 @@ class Xgemv: public Routine<T> {
using Routine<T>::context_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xgemv(Queue &queue, EventPointer event, const std::string &name = "GEMV");
diff --git a/include/internal/routines/level2/xger.h b/include/internal/routines/level2/xger.h
index b0c67798..a26ca24a 100644
--- a/include/internal/routines/level2/xger.h
+++ b/include/internal/routines/level2/xger.h
@@ -32,7 +32,6 @@ class Xger: public Routine<T> {
using Routine<T>::context_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xger(Queue &queue, EventPointer event, const std::string &name = "GER");
diff --git a/include/internal/routines/level2/xher.h b/include/internal/routines/level2/xher.h
index 7b735882..d32d337e 100644
--- a/include/internal/routines/level2/xher.h
+++ b/include/internal/routines/level2/xher.h
@@ -32,7 +32,6 @@ class Xher: public Routine<T> {
using Routine<T>::context_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xher(Queue &queue, EventPointer event, const std::string &name = "HER");
diff --git a/include/internal/routines/level2/xher2.h b/include/internal/routines/level2/xher2.h
index dd5ca4bf..956ffe6a 100644
--- a/include/internal/routines/level2/xher2.h
+++ b/include/internal/routines/level2/xher2.h
@@ -32,7 +32,6 @@ class Xher2: public Routine<T> {
using Routine<T>::context_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xher2(Queue &queue, EventPointer event, const std::string &name = "HER2");
diff --git a/include/internal/routines/level3/xgemm.h b/include/internal/routines/level3/xgemm.h
index 22624e61..8facaa76 100644
--- a/include/internal/routines/level3/xgemm.h
+++ b/include/internal/routines/level3/xgemm.h
@@ -33,7 +33,6 @@ class Xgemm: public Routine<T> {
using Routine<T>::GetProgramFromCache;
using Routine<T>::PadCopyTransposeMatrix;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xgemm(Queue &queue, EventPointer event, const std::string &name = "GEMM");
diff --git a/include/internal/routines/level3/xhemm.h b/include/internal/routines/level3/xhemm.h
index 9f4557b4..cf833f57 100644
--- a/include/internal/routines/level3/xhemm.h
+++ b/include/internal/routines/level3/xhemm.h
@@ -30,7 +30,6 @@ class Xhemm: public Xgemm<T> {
using Routine<T>::context_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Uses the regular Xgemm routine
using Xgemm<T>::DoGemm;
diff --git a/include/internal/routines/level3/xher2k.h b/include/internal/routines/level3/xher2k.h
index 8a4191a6..cdba33ab 100644
--- a/include/internal/routines/level3/xher2k.h
+++ b/include/internal/routines/level3/xher2k.h
@@ -35,7 +35,6 @@ class Xher2k: public Routine<T> {
using Routine<T>::GetProgramFromCache;
using Routine<T>::PadCopyTransposeMatrix;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xher2k(Queue &queue, EventPointer event, const std::string &name = "HER2K");
diff --git a/include/internal/routines/level3/xherk.h b/include/internal/routines/level3/xherk.h
index b279d724..a9d1615a 100644
--- a/include/internal/routines/level3/xherk.h
+++ b/include/internal/routines/level3/xherk.h
@@ -35,7 +35,6 @@ class Xherk: public Routine<T> {
using Routine<T>::GetProgramFromCache;
using Routine<T>::PadCopyTransposeMatrix;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xherk(Queue &queue, EventPointer event, const std::string &name = "HERK");
diff --git a/include/internal/routines/level3/xsymm.h b/include/internal/routines/level3/xsymm.h
index a0cb7b90..ec145a89 100644
--- a/include/internal/routines/level3/xsymm.h
+++ b/include/internal/routines/level3/xsymm.h
@@ -32,7 +32,6 @@ class Xsymm: public Xgemm<T> {
using Routine<T>::context_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Uses the regular Xgemm routine
using Xgemm<T>::DoGemm;
diff --git a/include/internal/routines/level3/xsyr2k.h b/include/internal/routines/level3/xsyr2k.h
index e498b7e6..1093d635 100644
--- a/include/internal/routines/level3/xsyr2k.h
+++ b/include/internal/routines/level3/xsyr2k.h
@@ -35,7 +35,6 @@ class Xsyr2k: public Routine<T> {
using Routine<T>::GetProgramFromCache;
using Routine<T>::PadCopyTransposeMatrix;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xsyr2k(Queue &queue, EventPointer event, const std::string &name = "SYR2K");
diff --git a/include/internal/routines/level3/xsyrk.h b/include/internal/routines/level3/xsyrk.h
index f7fa9b6a..c2edbf2b 100644
--- a/include/internal/routines/level3/xsyrk.h
+++ b/include/internal/routines/level3/xsyrk.h
@@ -37,7 +37,6 @@ class Xsyrk: public Routine<T> {
using Routine<T>::GetProgramFromCache;
using Routine<T>::PadCopyTransposeMatrix;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Constructor
Xsyrk(Queue &queue, EventPointer event, const std::string &name = "SYRK");
diff --git a/include/internal/routines/level3/xtrmm.h b/include/internal/routines/level3/xtrmm.h
index 8527df58..6cb46b01 100644
--- a/include/internal/routines/level3/xtrmm.h
+++ b/include/internal/routines/level3/xtrmm.h
@@ -31,7 +31,6 @@ class Xtrmm: public Xgemm<T> {
using Routine<T>::context_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::RunKernel;
- using Routine<T>::ErrorIn;
// Uses the regular Xgemm routine
using Xgemm<T>::DoGemm;
diff --git a/include/internal/routines/levelx/xomatcopy.h b/include/internal/routines/levelx/xomatcopy.h
index ec42d64a..ee38fa15 100644
--- a/include/internal/routines/levelx/xomatcopy.h
+++ b/include/internal/routines/levelx/xomatcopy.h
@@ -29,7 +29,6 @@ class Xomatcopy: public Routine<T> {
using Routine<T>::event_;
using Routine<T>::GetProgramFromCache;
using Routine<T>::PadCopyTransposeMatrix;
- using Routine<T>::ErrorIn;
// Constructor
Xomatcopy(Queue &queue, EventPointer event, const std::string &name = "OMATCOPY");
diff --git a/include/internal/utilities.h b/include/internal/utilities.h
index d3c8ebdb..26145528 100644
--- a/include/internal/utilities.h
+++ b/include/internal/utilities.h
@@ -200,6 +200,11 @@ bool CheckArgument(const int argc, char *argv[], std::string &help, const std::s
// =================================================================================================
+// Helper function to check for errors in the status code
+constexpr bool ErrorIn(const StatusCode s) { return (s != StatusCode::kSuccess); }
+
+// =================================================================================================
+
// Returns a random number to be used as a seed
unsigned int GetRandomSeed();