summaryrefslogtreecommitdiff
path: root/include/internal
diff options
context:
space:
mode:
authorCNugteren <web@cedricnugteren.nl>2015-09-19 17:40:38 +0200
committerCNugteren <web@cedricnugteren.nl>2015-09-19 17:40:38 +0200
commit80da67d28bbcff958071befb48ccacac05ebbe49 (patch)
tree04d25eaeefb6302871dd1fd32db866bcad33977b /include/internal
parentc32c4a973928536850aab594239000ce6ddc2c5a (diff)
Added the HPMV routine
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/routines/level2/xgemv.h4
-rw-r--r--include/internal/routines/level2/xhpmv.h49
2 files changed, 52 insertions, 1 deletions
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<T> {
using Routine<T>::TestVectorX;
using Routine<T>::TestVectorY;
using Routine<T>::TestMatrixA;
+ using Routine<T>::TestMatrixAP;
using Routine<T>::RunKernel;
using Routine<T>::ErrorIn;
@@ -55,7 +56,8 @@ class Xgemv: public Routine<T> {
const Buffer<T> &x_buffer, const size_t x_offset, const size_t x_inc,
const T beta,
const Buffer<T> &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 <www.cedricnugteren.nl>
+//
+// 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 <typename T>
+class Xhpmv: public Xgemv<T> {
+ public:
+
+ // Uses the generic matrix-vector routine
+ using Xgemv<T>::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<T> &ap_buffer, const size_t ap_offset,
+ const Buffer<T> &x_buffer, const size_t x_offset, const size_t x_inc,
+ const T beta,
+ const Buffer<T> &y_buffer, const size_t y_offset, const size_t y_inc);
+};
+
+// =================================================================================================
+} // namespace clblast
+
+// CLBLAST_ROUTINES_XHPMV_H_
+#endif