diff options
author | CNugteren <web@cedricnugteren.nl> | 2015-06-29 20:38:34 +0200 |
---|---|---|
committer | CNugteren <web@cedricnugteren.nl> | 2015-06-29 20:38:34 +0200 |
commit | 2914a285d43cac7e3a9d4885684229fbf82babb0 (patch) | |
tree | 01c740740d81fe893e88f40d8385d5c6325fabc0 /test/routines/xsymm.h | |
parent | e5c0edbfd7dcfe96af6cca6c25ca8b346871b014 (diff) |
Re-organized the performance-client infrastructure to avoid code duplication
Diffstat (limited to 'test/routines/xsymm.h')
-rw-r--r-- | test/routines/xsymm.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/test/routines/xsymm.h b/test/routines/xsymm.h index 93b4d30c..10476349 100644 --- a/test/routines/xsymm.h +++ b/test/routines/xsymm.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. // @@ -57,6 +57,18 @@ class TestXsymm { return c_two * args.c_ld + args.c_offset; } + // Describes how to set the sizes of all the buffers + static void SetSizes(Arguments<T> &args) { + args.a_size = GetSizeA(args); + args.b_size = GetSizeB(args); + args.c_size = GetSizeC(args); + } + + // Describes what the default values of the leading dimensions of the matrices are + static size_t DefaultLDA(const Arguments<T> &args) { return args.m; } + static size_t DefaultLDB(const Arguments<T> &args) { return args.n; } + static size_t DefaultLDC(const Arguments<T> &args) { return args.n; } + // Describes how to run the CLBlast routine static StatusCode RunRoutine(const Arguments<T> &args, const Buffers &buffers, CommandQueue &queue) { @@ -105,6 +117,14 @@ class TestXsymm { id1*args.c_ld + id2 + args.c_offset: id2*args.c_ld + id1 + args.c_offset; } + + // Describes how to compute performance metrics + static size_t GetFlops(const Arguments<T> &args) { + return 2 * args.m * args.n * args.m; + } + static size_t GetBytes(const Arguments<T> &args) { + return (args.m*args.m + args.m*args.n + 2*args.m*args.n) * sizeof(T); + } }; // ================================================================================================= |