diff options
author | CNugteren <web@cedricnugteren.nl> | 2015-07-27 07:18:06 +0200 |
---|---|---|
committer | CNugteren <web@cedricnugteren.nl> | 2015-07-27 07:18:06 +0200 |
commit | f7199b831f847340f0921ef2140a4e64809db037 (patch) | |
tree | d725b7e63b0662598ad4be0a4c2457820ded8ed4 /include/internal/routines/level3 | |
parent | b10f4a633c4ffb3bb04d35503396ff94528df4d0 (diff) |
Now using the new Claduc C++11 OpenCL header
Diffstat (limited to 'include/internal/routines/level3')
-rw-r--r-- | include/internal/routines/level3/xgemm.h | 25 | ||||
-rw-r--r-- | include/internal/routines/level3/xhemm.h | 24 | ||||
-rw-r--r-- | include/internal/routines/level3/xher2k.h | 25 | ||||
-rw-r--r-- | include/internal/routines/level3/xherk.h | 22 | ||||
-rw-r--r-- | include/internal/routines/level3/xsymm.h | 24 | ||||
-rw-r--r-- | include/internal/routines/level3/xsyr2k.h | 25 | ||||
-rw-r--r-- | include/internal/routines/level3/xsyrk.h | 22 | ||||
-rw-r--r-- | include/internal/routines/level3/xtrmm.h | 22 |
8 files changed, 128 insertions, 61 deletions
diff --git a/include/internal/routines/level3/xgemm.h b/include/internal/routines/level3/xgemm.h index 7ad4fcfb..a0c8b595 100644 --- a/include/internal/routines/level3/xgemm.h +++ b/include/internal/routines/level3/xgemm.h @@ -21,18 +21,33 @@ namespace clblast { // See comment at top of file for a description of the class template <typename T> -class Xgemm: public Routine { +class Xgemm: public Routine<T> { public: - Xgemm(CommandQueue &queue, Event &event); + + // Members and methods from the base class + using Routine<T>::db_; + using Routine<T>::source_string_; + using Routine<T>::queue_; + using Routine<T>::context_; + using Routine<T>::GetProgramFromCache; + using Routine<T>::PadCopyTransposeMatrix; + using Routine<T>::TestMatrixA; + using Routine<T>::TestMatrixB; + using Routine<T>::TestMatrixC; + using Routine<T>::RunKernel; + using Routine<T>::ErrorIn; + + // Constructor + Xgemm(Queue &queue, Event &event); // Templated-precision implementation of the routine StatusCode DoGemm(const Layout layout, const Transpose a_transpose, const Transpose b_transpose, const size_t m, const size_t n, const size_t k, 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, + 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, const T beta, - const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); + const Buffer<T> &c_buffer, const size_t c_offset, const size_t c_ld); private: // Static variable to get the precision diff --git a/include/internal/routines/level3/xhemm.h b/include/internal/routines/level3/xhemm.h index 6cc9d9ec..5f1e8723 100644 --- a/include/internal/routines/level3/xhemm.h +++ b/include/internal/routines/level3/xhemm.h @@ -25,30 +25,28 @@ template <typename T> class Xhemm: public Xgemm<T> { public: - // Uses several variables from the Routine class - using Routine::db_; - using Routine::context_; - - // Uses several helper functions from the Routine class - using Routine::RunKernel; - using Routine::ErrorIn; - using Routine::TestMatrixA; - using Routine::GetProgramFromCache; + // Members and methods from the base class + using Routine<T>::db_; + using Routine<T>::context_; + using Routine<T>::GetProgramFromCache; + using Routine<T>::TestMatrixA; + using Routine<T>::RunKernel; + using Routine<T>::ErrorIn; // Uses the regular Xgemm routine using Xgemm<T>::DoGemm; // Constructor - Xhemm(CommandQueue &queue, Event &event); + Xhemm(Queue &queue, Event &event); // Templated-precision implementation of the routine StatusCode DoHemm(const Layout layout, const Side side, const Triangle triangle, 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, + 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, const T beta, - const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); + const Buffer<T> &c_buffer, const size_t c_offset, const size_t c_ld); }; // ================================================================================================= diff --git a/include/internal/routines/level3/xher2k.h b/include/internal/routines/level3/xher2k.h index 1836a812..9e961d23 100644 --- a/include/internal/routines/level3/xher2k.h +++ b/include/internal/routines/level3/xher2k.h @@ -23,18 +23,33 @@ namespace clblast { // See comment at top of file for a description of the class template <typename T, typename U> -class Xher2k: public Routine { +class Xher2k: public Routine<T> { public: - Xher2k(CommandQueue &queue, Event &event); + + // Members and methods from the base class + using Routine<T>::db_; + using Routine<T>::source_string_; + using Routine<T>::queue_; + using Routine<T>::context_; + using Routine<T>::GetProgramFromCache; + using Routine<T>::PadCopyTransposeMatrix; + using Routine<T>::TestMatrixA; + using Routine<T>::TestMatrixB; + using Routine<T>::TestMatrixC; + using Routine<T>::RunKernel; + using Routine<T>::ErrorIn; + + // Constructor + Xher2k(Queue &queue, Event &event); // Templated-precision implementation of the routine StatusCode DoHer2k(const Layout layout, const Triangle triangle, const Transpose ab_transpose, const size_t n, const size_t k, 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, + 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, const U beta, - const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); + const Buffer<T> &c_buffer, const size_t c_offset, const size_t c_ld); private: // Static variable to get the precision diff --git a/include/internal/routines/level3/xherk.h b/include/internal/routines/level3/xherk.h index 9b361254..f285a71c 100644 --- a/include/internal/routines/level3/xherk.h +++ b/include/internal/routines/level3/xherk.h @@ -23,17 +23,31 @@ namespace clblast { // See comment at top of file for a description of the class template <typename T, typename U> -class Xherk: public Routine { +class Xherk: public Routine<T> { public: - Xherk(CommandQueue &queue, Event &event); + + // Members and methods from the base class + using Routine<T>::db_; + using Routine<T>::source_string_; + using Routine<T>::queue_; + using Routine<T>::context_; + using Routine<T>::GetProgramFromCache; + using Routine<T>::PadCopyTransposeMatrix; + using Routine<T>::TestMatrixA; + using Routine<T>::TestMatrixC; + using Routine<T>::RunKernel; + using Routine<T>::ErrorIn; + + // Constructor + Xherk(Queue &queue, Event &event); // Templated-precision implementation of the routine StatusCode DoHerk(const Layout layout, const Triangle triangle, const Transpose a_transpose, const size_t n, const size_t k, const U alpha, - const Buffer &a_buffer, const size_t a_offset, const size_t a_ld, + const Buffer<T> &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); + const Buffer<T> &c_buffer, const size_t c_offset, const size_t c_ld); private: // Static variable to get the precision diff --git a/include/internal/routines/level3/xsymm.h b/include/internal/routines/level3/xsymm.h index 2028ceea..9ed3c722 100644 --- a/include/internal/routines/level3/xsymm.h +++ b/include/internal/routines/level3/xsymm.h @@ -27,30 +27,28 @@ template <typename T> class Xsymm: public Xgemm<T> { public: - // Uses several variables from the Routine class - using Routine::db_; - using Routine::context_; - - // Uses several helper functions from the Routine class - using Routine::RunKernel; - using Routine::ErrorIn; - using Routine::TestMatrixA; - using Routine::GetProgramFromCache; + // Members and methods from the base class + using Routine<T>::db_; + using Routine<T>::context_; + using Routine<T>::GetProgramFromCache; + using Routine<T>::TestMatrixA; + using Routine<T>::RunKernel; + using Routine<T>::ErrorIn; // Uses the regular Xgemm routine using Xgemm<T>::DoGemm; // Constructor - Xsymm(CommandQueue &queue, Event &event); + Xsymm(Queue &queue, Event &event); // Templated-precision implementation of the routine StatusCode DoSymm(const Layout layout, const Side side, const Triangle triangle, 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, + 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, const T beta, - const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); + const Buffer<T> &c_buffer, const size_t c_offset, const size_t c_ld); }; // ================================================================================================= diff --git a/include/internal/routines/level3/xsyr2k.h b/include/internal/routines/level3/xsyr2k.h index 6259313c..85936658 100644 --- a/include/internal/routines/level3/xsyr2k.h +++ b/include/internal/routines/level3/xsyr2k.h @@ -23,18 +23,33 @@ namespace clblast { // See comment at top of file for a description of the class template <typename T> -class Xsyr2k: public Routine { +class Xsyr2k: public Routine<T> { public: - Xsyr2k(CommandQueue &queue, Event &event); + + // Members and methods from the base class + using Routine<T>::db_; + using Routine<T>::source_string_; + using Routine<T>::queue_; + using Routine<T>::context_; + using Routine<T>::GetProgramFromCache; + using Routine<T>::PadCopyTransposeMatrix; + using Routine<T>::TestMatrixA; + using Routine<T>::TestMatrixB; + using Routine<T>::TestMatrixC; + using Routine<T>::RunKernel; + using Routine<T>::ErrorIn; + + // Constructor + Xsyr2k(Queue &queue, Event &event); // Templated-precision implementation of the routine StatusCode DoSyr2k(const Layout layout, const Triangle triangle, const Transpose ab_transpose, const size_t n, const size_t k, 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, + 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, const T beta, - const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); + const Buffer<T> &c_buffer, const size_t c_offset, const size_t c_ld); private: // Static variable to get the precision diff --git a/include/internal/routines/level3/xsyrk.h b/include/internal/routines/level3/xsyrk.h index 3dab731f..14d51a58 100644 --- a/include/internal/routines/level3/xsyrk.h +++ b/include/internal/routines/level3/xsyrk.h @@ -25,17 +25,31 @@ namespace clblast { // See comment at top of file for a description of the class template <typename T> -class Xsyrk: public Routine { +class Xsyrk: public Routine<T> { public: - Xsyrk(CommandQueue &queue, Event &event); + + // Members and methods from the base class + using Routine<T>::db_; + using Routine<T>::source_string_; + using Routine<T>::queue_; + using Routine<T>::context_; + using Routine<T>::GetProgramFromCache; + using Routine<T>::PadCopyTransposeMatrix; + using Routine<T>::TestMatrixA; + using Routine<T>::TestMatrixC; + using Routine<T>::RunKernel; + using Routine<T>::ErrorIn; + + // Constructor + Xsyrk(Queue &queue, Event &event); // Templated-precision implementation of the routine StatusCode DoSyrk(const Layout layout, const Triangle triangle, const Transpose a_transpose, const size_t n, const size_t k, const T alpha, - const Buffer &a_buffer, const size_t a_offset, const size_t a_ld, + const Buffer<T> &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); + const Buffer<T> &c_buffer, const size_t c_offset, const size_t c_ld); private: // Static variable to get the precision diff --git a/include/internal/routines/level3/xtrmm.h b/include/internal/routines/level3/xtrmm.h index 4f49bebd..d8ac60fd 100644 --- a/include/internal/routines/level3/xtrmm.h +++ b/include/internal/routines/level3/xtrmm.h @@ -26,29 +26,27 @@ template <typename T> class Xtrmm: public Xgemm<T> { public: - // Uses several variables from the Routine class - using Routine::db_; - using Routine::context_; - - // Uses several helper functions from the Routine class - using Routine::RunKernel; - using Routine::ErrorIn; - using Routine::TestMatrixA; - using Routine::GetProgramFromCache; + // Members and methods from the base class + using Routine<T>::db_; + using Routine<T>::context_; + using Routine<T>::GetProgramFromCache; + using Routine<T>::TestMatrixA; + using Routine<T>::RunKernel; + using Routine<T>::ErrorIn; // Uses the regular Xgemm routine using Xgemm<T>::DoGemm; // Constructor - Xtrmm(CommandQueue &queue, Event &event); + Xtrmm(Queue &queue, Event &event); // Templated-precision implementation of the routine StatusCode DoTrmm(const Layout layout, const Side side, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal, 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); + 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); }; // ================================================================================================= |