From aebd156869738f88c21a78a8df27e391e67da39b Mon Sep 17 00:00:00 2001 From: CNugteren Date: Sat, 19 Sep 2015 11:11:34 +0200 Subject: Added the HBMV routine --- include/internal/routines/level2/xgemv.h | 2 +- include/internal/routines/level2/xhbmv.h | 49 ++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 include/internal/routines/level2/xhbmv.h (limited to 'include/internal') diff --git a/include/internal/routines/level2/xgemv.h b/include/internal/routines/level2/xgemv.h index d18f05b4..47da5494 100644 --- a/include/internal/routines/level2/xgemv.h +++ b/include/internal/routines/level2/xgemv.h @@ -55,7 +55,7 @@ class Xgemv: public Routine { const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const T beta, const Buffer &y_buffer, const size_t y_offset, const size_t y_inc, - bool fast_kernel, bool fast_kernel_rot, bool reversed, + bool fast_kernel, bool fast_kernel_rot, const size_t parameter, const size_t kl, const size_t ku); private: diff --git a/include/internal/routines/level2/xhbmv.h b/include/internal/routines/level2/xhbmv.h new file mode 100644 index 00000000..65138424 --- /dev/null +++ b/include/internal/routines/level2/xhbmv.h @@ -0,0 +1,49 @@ + +// ================================================================================================= +// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This +// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max- +// width of 100 characters per line. +// +// Author(s): +// Cedric Nugteren +// +// This file implements the Xhbmv routine. It is based on the generalized mat-vec multiplication +// routine (Xgemv). The Xhbmv class inherits from the templated class Xgemv, allowing it to call the +// "MatVec" function directly. +// +// ================================================================================================= + +#ifndef CLBLAST_ROUTINES_XHBMV_H_ +#define CLBLAST_ROUTINES_XHBMV_H_ + +#include "internal/routines/level2/xgemv.h" + +namespace clblast { +// ================================================================================================= + +// See comment at top of file for a description of the class +template +class Xhbmv: public Xgemv { + public: + + // Uses the generic matrix-vector routine + using Xgemv::MatVec; + + // Constructor + Xhbmv(Queue &queue, Event &event, const std::string &name = "HBMV"); + + // Templated-precision implementation of the routine + StatusCode DoHbmv(const Layout layout, const Triangle triangle, + 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 &x_buffer, const size_t x_offset, const size_t x_inc, + const T beta, + const Buffer &y_buffer, const size_t y_offset, const size_t y_inc); +}; + +// ================================================================================================= +} // namespace clblast + +// CLBLAST_ROUTINES_XHBMV_H_ +#endif -- cgit v1.2.3