From 80da67d28bbcff958071befb48ccacac05ebbe49 Mon Sep 17 00:00:00 2001 From: CNugteren Date: Sat, 19 Sep 2015 17:40:38 +0200 Subject: Added the HPMV routine --- include/internal/routines/level2/xgemv.h | 4 ++- include/internal/routines/level2/xhpmv.h | 49 ++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 include/internal/routines/level2/xhpmv.h (limited to 'include/internal') diff --git a/include/internal/routines/level2/xgemv.h b/include/internal/routines/level2/xgemv.h index 47da5494..b31565ec 100644 --- a/include/internal/routines/level2/xgemv.h +++ b/include/internal/routines/level2/xgemv.h @@ -32,6 +32,7 @@ class Xgemv: public Routine { using Routine::TestVectorX; using Routine::TestVectorY; using Routine::TestMatrixA; + using Routine::TestMatrixAP; using Routine::RunKernel; using Routine::ErrorIn; @@ -55,7 +56,8 @@ 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, const size_t parameter, + bool fast_kernel, bool fast_kernel_rot, + const size_t parameter, const bool packed, const size_t kl, const size_t ku); private: diff --git a/include/internal/routines/level2/xhpmv.h b/include/internal/routines/level2/xhpmv.h new file mode 100644 index 00000000..48f1ed3f --- /dev/null +++ b/include/internal/routines/level2/xhpmv.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 Xhpmv routine. It is based on the generalized mat-vec multiplication +// routine (Xgemv). The Xhpmv class inherits from the templated class Xgemv, allowing it to call the +// "MatVec" function directly. +// +// ================================================================================================= + +#ifndef CLBLAST_ROUTINES_XHPMV_H_ +#define CLBLAST_ROUTINES_XHPMV_H_ + +#include "internal/routines/level2/xgemv.h" + +namespace clblast { +// ================================================================================================= + +// See comment at top of file for a description of the class +template +class Xhpmv: public Xgemv { + public: + + // Uses the generic matrix-vector routine + using Xgemv::MatVec; + + // Constructor + Xhpmv(Queue &queue, Event &event, const std::string &name = "HPMV"); + + // Templated-precision implementation of the routine + StatusCode DoHpmv(const Layout layout, const Triangle triangle, + const size_t n, + const T alpha, + const Buffer &ap_buffer, const size_t ap_offset, + 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_XHPMV_H_ +#endif -- cgit v1.2.3