summaryrefslogtreecommitdiff
path: root/test/routines/xgemv.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/routines/xgemv.h')
-rw-r--r--test/routines/xgemv.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/test/routines/xgemv.h b/test/routines/xgemv.h
index ada3d6f4..73f7d76e 100644
--- a/test/routines/xgemv.h
+++ b/test/routines/xgemv.h
@@ -1,6 +1,6 @@
// =================================================================================================
-// This file is part of the CLBlast project. The project is licensed under the MIT license. This
+// 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.
//
@@ -55,6 +55,18 @@ class TestXgemv {
return m_real * args.y_inc + args.y_offset;
}
+ // Describes how to set the sizes of all the buffers
+ static void SetSizes(Arguments<T> &args) {
+ args.a_size = GetSizeA(args);
+ args.x_size = GetSizeX(args);
+ args.y_size = GetSizeY(args);
+ }
+
+ // Describes what the default values of the leading dimensions of the matrices are
+ static size_t DefaultLDA(const Arguments<T> &args) { return args.n; }
+ static size_t DefaultLDB(const Arguments<T> &) { return 1; } // N/A for this routine
+ static size_t DefaultLDC(const Arguments<T> &) { return 1; } // N/A for this routine
+
// Describes how to run the CLBlast routine
static StatusCode RunRoutine(const Arguments<T> &args, const Buffers &buffers,
CommandQueue &queue) {
@@ -99,10 +111,18 @@ class TestXgemv {
auto a_transposed = (args.a_transpose != Transpose::kNo);
return (a_transposed) ? args.n : args.m;
}
- static size_t ResultID2(const Arguments<T> &args) { return 1; } // N/A for this routine
- static size_t GetResultIndex(const Arguments<T> &args, const size_t id1, const size_t id2) {
+ static size_t ResultID2(const Arguments<T> &) { return 1; } // N/A for this routine
+ static size_t GetResultIndex(const Arguments<T> &args, const size_t id1, const size_t) {
return id1*args.y_inc + args.y_offset;
}
+
+ // Describes how to compute performance metrics
+ static size_t GetFlops(const Arguments<T> &args) {
+ return 2 * args.m * args.n;
+ }
+ static size_t GetBytes(const Arguments<T> &args) {
+ return (args.m*args.n + 2*args.m + args.n) * sizeof(T);
+ }
};
// =================================================================================================