diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2016-06-17 14:30:37 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2016-06-17 14:30:37 +0200 |
commit | f9947b4d7ffedcf98cdb128de835422f647e7f15 (patch) | |
tree | c42d427a23de5d14b3407943d529d18cd9e516f0 /include | |
parent | 536b7fe4bce4b183cb060a1b9045752ae39d842f (diff) |
Removed the precision argument from the routines in favor of a single templated function
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/routines/level1/xamax.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level1/xasum.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level1/xaxpy.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level1/xcopy.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level1/xdot.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level1/xnrm2.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level1/xscal.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level1/xswap.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level2/xgemv.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level2/xger.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level2/xher.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level2/xher2.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level3/xher2k.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level3/xherk.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level3/xsyr2k.h | 4 | ||||
-rw-r--r-- | include/internal/routines/level3/xsyrk.h | 4 | ||||
-rw-r--r-- | include/internal/routines/levelx/xomatcopy.h | 4 | ||||
-rw-r--r-- | include/internal/utilities.h | 4 |
18 files changed, 4 insertions, 68 deletions
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<T> { StatusCode DoAmax(const size_t n, const Buffer<unsigned int> &imax_buffer, const size_t imax_offset, const Buffer<T> &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<T> { StatusCode DoAsum(const size_t n, const Buffer<T> &asum_buffer, const size_t asum_offset, const Buffer<T> &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<T> { StatusCode DoAxpy(const size_t n, const T alpha, const Buffer<T> &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer<T> &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<T> { StatusCode DoCopy(const size_t n, const Buffer<T> &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer<T> &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<T> { const Buffer<T> &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer<T> &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<T> { StatusCode DoNrm2(const size_t n, const Buffer<T> &nrm2_buffer, const size_t nrm2_offset, const Buffer<T> &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<T> { // Templated-precision implementation of the routine StatusCode DoScal(const size_t n, const T alpha, const Buffer<T> &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<T> { StatusCode DoSwap(const size_t n, const Buffer<T> &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer<T> &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<T> { 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<T> { const Buffer<T> &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer<T> &y_buffer, const size_t y_offset, const size_t y_inc, const Buffer<T> &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<T> { const Buffer<T> &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer<T> &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<T> { const Buffer<T> &y_buffer, const size_t y_offset, const size_t y_inc, const Buffer<T> &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<T> { const Buffer<T> &b_buffer, const size_t b_offset, const size_t b_ld, const U beta, const Buffer<T> &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<T> { const Buffer<T> &a_buffer, const size_t a_offset, const size_t a_ld, const U beta, const Buffer<T> &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<T> { const Buffer<T> &b_buffer, const size_t b_offset, const size_t b_ld, const T beta, const Buffer<T> &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<T> { const Buffer<T> &a_buffer, const size_t a_offset, const size_t a_ld, const T beta, const Buffer<T> &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<T> { const size_t m, const size_t n, const T alpha, const Buffer<T> &a_buffer, const size_t a_offset, const size_t a_ld, const Buffer<T> &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 <typename T> +Precision PrecisionValue(); + // ================================================================================================= // Returns false is this precision is not supported by the device |