From f9947b4d7ffedcf98cdb128de835422f647e7f15 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Fri, 17 Jun 2016 14:30:37 +0200 Subject: Removed the precision argument from the routines in favor of a single templated function --- include/internal/routines/level1/xamax.h | 4 ---- include/internal/routines/level1/xasum.h | 4 ---- include/internal/routines/level1/xaxpy.h | 4 ---- include/internal/routines/level1/xcopy.h | 4 ---- include/internal/routines/level1/xdot.h | 4 ---- include/internal/routines/level1/xnrm2.h | 4 ---- include/internal/routines/level1/xscal.h | 4 ---- include/internal/routines/level1/xswap.h | 4 ---- include/internal/routines/level2/xgemv.h | 4 ---- include/internal/routines/level2/xger.h | 4 ---- include/internal/routines/level2/xher.h | 4 ---- include/internal/routines/level2/xher2.h | 4 ---- include/internal/routines/level3/xher2k.h | 4 ---- include/internal/routines/level3/xherk.h | 4 ---- include/internal/routines/level3/xsyr2k.h | 4 ---- include/internal/routines/level3/xsyrk.h | 4 ---- include/internal/routines/levelx/xomatcopy.h | 4 ---- include/internal/utilities.h | 4 ++++ 18 files changed, 4 insertions(+), 68 deletions(-) (limited to 'include') diff --git a/include/internal/routines/level1/xamax.h b/include/internal/routines/level1/xamax.h index ec1de346..8b80044e 100644 --- a/include/internal/routines/level1/xamax.h +++ b/include/internal/routines/level1/xamax.h @@ -40,10 +40,6 @@ class Xamax: public Routine { StatusCode DoAmax(const size_t n, const Buffer &imax_buffer, const size_t imax_offset, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xasum.h b/include/internal/routines/level1/xasum.h index b6c8e4e6..fe8529e3 100644 --- a/include/internal/routines/level1/xasum.h +++ b/include/internal/routines/level1/xasum.h @@ -40,10 +40,6 @@ class Xasum: public Routine { StatusCode DoAsum(const size_t n, const Buffer &asum_buffer, const size_t asum_offset, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xaxpy.h b/include/internal/routines/level1/xaxpy.h index 71e7c01c..af48086a 100644 --- a/include/internal/routines/level1/xaxpy.h +++ b/include/internal/routines/level1/xaxpy.h @@ -40,10 +40,6 @@ class Xaxpy: public Routine { StatusCode DoAxpy(const size_t n, const T alpha, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer &y_buffer, const size_t y_offset, const size_t y_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xcopy.h b/include/internal/routines/level1/xcopy.h index de9edaaf..eb245192 100644 --- a/include/internal/routines/level1/xcopy.h +++ b/include/internal/routines/level1/xcopy.h @@ -40,10 +40,6 @@ class Xcopy: public Routine { StatusCode DoCopy(const size_t n, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer &y_buffer, const size_t y_offset, const size_t y_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xdot.h b/include/internal/routines/level1/xdot.h index b70ff3fe..ce26d267 100644 --- a/include/internal/routines/level1/xdot.h +++ b/include/internal/routines/level1/xdot.h @@ -42,10 +42,6 @@ class Xdot: public Routine { const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer &y_buffer, const size_t y_offset, const size_t y_inc, const bool do_conjugate = false); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xnrm2.h b/include/internal/routines/level1/xnrm2.h index 1cb22728..5186acc5 100644 --- a/include/internal/routines/level1/xnrm2.h +++ b/include/internal/routines/level1/xnrm2.h @@ -40,10 +40,6 @@ class Xnrm2: public Routine { StatusCode DoNrm2(const size_t n, const Buffer &nrm2_buffer, const size_t nrm2_offset, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xscal.h b/include/internal/routines/level1/xscal.h index c2b2c1bf..6c82dd89 100644 --- a/include/internal/routines/level1/xscal.h +++ b/include/internal/routines/level1/xscal.h @@ -39,10 +39,6 @@ class Xscal: public Routine { // Templated-precision implementation of the routine StatusCode DoScal(const size_t n, const T alpha, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xswap.h b/include/internal/routines/level1/xswap.h index 45e34dd6..6a568377 100644 --- a/include/internal/routines/level1/xswap.h +++ b/include/internal/routines/level1/xswap.h @@ -40,10 +40,6 @@ class Xswap: public Routine { StatusCode DoSwap(const size_t n, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer &y_buffer, const size_t y_offset, const size_t y_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level2/xgemv.h b/include/internal/routines/level2/xgemv.h index b28536bd..b1277079 100644 --- a/include/internal/routines/level2/xgemv.h +++ b/include/internal/routines/level2/xgemv.h @@ -56,10 +56,6 @@ class Xgemv: public Routine { bool fast_kernel, bool fast_kernel_rot, const size_t parameter, const bool packed, const size_t kl, const size_t ku); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level2/xger.h b/include/internal/routines/level2/xger.h index 996e0fc8..aab5075d 100644 --- a/include/internal/routines/level2/xger.h +++ b/include/internal/routines/level2/xger.h @@ -43,10 +43,6 @@ class Xger: public Routine { const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer &y_buffer, const size_t y_offset, const size_t y_inc, const Buffer &a_buffer, const size_t a_offset, const size_t a_ld); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level2/xher.h b/include/internal/routines/level2/xher.h index a4a25c3c..97ccfde7 100644 --- a/include/internal/routines/level2/xher.h +++ b/include/internal/routines/level2/xher.h @@ -46,10 +46,6 @@ class Xher: public Routine { const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer &a_buffer, const size_t a_offset, const size_t a_ld, const bool packed = false); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level2/xher2.h b/include/internal/routines/level2/xher2.h index de8583f4..067f85e6 100644 --- a/include/internal/routines/level2/xher2.h +++ b/include/internal/routines/level2/xher2.h @@ -44,10 +44,6 @@ class Xher2: public Routine { const Buffer &y_buffer, const size_t y_offset, const size_t y_inc, const Buffer &a_buffer, const size_t a_offset, const size_t a_ld, const bool packed = false); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level3/xher2k.h b/include/internal/routines/level3/xher2k.h index 092d7246..dfeb737e 100644 --- a/include/internal/routines/level3/xher2k.h +++ b/include/internal/routines/level3/xher2k.h @@ -46,10 +46,6 @@ class Xher2k: public Routine { const Buffer &b_buffer, const size_t b_offset, const size_t b_ld, const U beta, const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level3/xherk.h b/include/internal/routines/level3/xherk.h index b5e2d723..7ea59579 100644 --- a/include/internal/routines/level3/xherk.h +++ b/include/internal/routines/level3/xherk.h @@ -45,10 +45,6 @@ class Xherk: public Routine { const Buffer &a_buffer, const size_t a_offset, const size_t a_ld, const U beta, const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level3/xsyr2k.h b/include/internal/routines/level3/xsyr2k.h index c7ae1678..aefd016d 100644 --- a/include/internal/routines/level3/xsyr2k.h +++ b/include/internal/routines/level3/xsyr2k.h @@ -46,10 +46,6 @@ class Xsyr2k: public Routine { const Buffer &b_buffer, const size_t b_offset, const size_t b_ld, const T beta, const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level3/xsyrk.h b/include/internal/routines/level3/xsyrk.h index 860f8e10..75726496 100644 --- a/include/internal/routines/level3/xsyrk.h +++ b/include/internal/routines/level3/xsyrk.h @@ -47,10 +47,6 @@ class Xsyrk: public Routine { const Buffer &a_buffer, const size_t a_offset, const size_t a_ld, const T beta, const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/levelx/xomatcopy.h b/include/internal/routines/levelx/xomatcopy.h index 29f33aac..e5c0529f 100644 --- a/include/internal/routines/levelx/xomatcopy.h +++ b/include/internal/routines/levelx/xomatcopy.h @@ -41,10 +41,6 @@ class Xomatcopy: public Routine { const size_t m, const size_t n, const T alpha, const Buffer &a_buffer, const size_t a_offset, const size_t a_ld, const Buffer &b_buffer, const size_t b_offset, const size_t b_ld); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/utilities.h b/include/internal/utilities.h index 26145528..7092bcdd 100644 --- a/include/internal/utilities.h +++ b/include/internal/utilities.h @@ -240,6 +240,10 @@ bool IsMultiple(const size_t a, const size_t b); // Convert the precision enum into bytes, e.g. a double takes up 8 bytes size_t GetBytes(const Precision precision); +// Convert the template argument into a precision value +template +Precision PrecisionValue(); + // ================================================================================================= // Returns false is this precision is not supported by the device -- cgit v1.2.3