diff options
Diffstat (limited to 'test/routines/level3')
-rw-r--r-- | test/routines/level3/xgemm.h | 8 | ||||
-rw-r--r-- | test/routines/level3/xhemm.h | 8 | ||||
-rw-r--r-- | test/routines/level3/xher2k.h | 12 | ||||
-rw-r--r-- | test/routines/level3/xherk.h | 8 | ||||
-rw-r--r-- | test/routines/level3/xsymm.h | 8 | ||||
-rw-r--r-- | test/routines/level3/xsyr2k.h | 12 | ||||
-rw-r--r-- | test/routines/level3/xsyrk.h | 8 | ||||
-rw-r--r-- | test/routines/level3/xtrmm.h | 8 |
8 files changed, 68 insertions, 4 deletions
diff --git a/test/routines/level3/xgemm.h b/test/routines/level3/xgemm.h index f06719d6..695b58b7 100644 --- a/test/routines/level3/xgemm.h +++ b/test/routines/level3/xgemm.h @@ -29,6 +29,9 @@ template <typename T> class TestXgemm { public: + // The BLAS level: 1, 2, or 3 + static size_t BLASLevel() { return 3; } + // The list of arguments relevant for this routine static std::vector<std::string> GetOptions() { return {kArgM, kArgN, kArgK, @@ -69,6 +72,11 @@ class TestXgemm { static size_t DefaultLDB(const Arguments<T> &args) { return args.n; } static size_t DefaultLDC(const Arguments<T> &args) { return args.n; } + // Describes which transpose options are relevant for this routine + using Transposes = std::vector<Transpose>; + static Transposes GetATransposes(const Transposes &all) { return all; } + static Transposes GetBTransposes(const Transposes &all) { return all; } + // Describes how to run the CLBlast routine static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) { auto queue_plain = queue(); diff --git a/test/routines/level3/xhemm.h b/test/routines/level3/xhemm.h index 0c3b9c31..7b7134e5 100644 --- a/test/routines/level3/xhemm.h +++ b/test/routines/level3/xhemm.h @@ -29,6 +29,9 @@ template <typename T> class TestXhemm { public: + // The BLAS level: 1, 2, or 3 + static size_t BLASLevel() { return 3; } + // The list of arguments relevant for this routine static std::vector<std::string> GetOptions() { return {kArgM, kArgN, @@ -69,6 +72,11 @@ class TestXhemm { static size_t DefaultLDB(const Arguments<T> &args) { return args.n; } static size_t DefaultLDC(const Arguments<T> &args) { return args.n; } + // Describes which transpose options are relevant for this routine + using Transposes = std::vector<Transpose>; + static Transposes GetATransposes(const Transposes &) { return {}; } // N/A for this routine + static Transposes GetBTransposes(const Transposes &) { return {}; } // N/A for this routine + // Describes how to run the CLBlast routine static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) { auto queue_plain = queue(); diff --git a/test/routines/level3/xher2k.h b/test/routines/level3/xher2k.h index b20ec973..a7fbfcbe 100644 --- a/test/routines/level3/xher2k.h +++ b/test/routines/level3/xher2k.h @@ -29,6 +29,9 @@ template <typename T, typename U> class TestXher2k { public: + // The BLAS level: 1, 2, or 3 + static size_t BLASLevel() { return 3; } + // The list of arguments relevant for this routine static std::vector<std::string> GetOptions() { return {kArgN, kArgK, @@ -46,8 +49,8 @@ class TestXher2k { return a_two * args.a_ld + args.a_offset; } static size_t GetSizeB(const Arguments<U> &args) { - auto b_rotated = (args.layout == Layout::kColMajor && args.b_transpose != Transpose::kNo) || - (args.layout == Layout::kRowMajor && args.b_transpose == Transpose::kNo); + auto b_rotated = (args.layout == Layout::kColMajor && args.a_transpose != Transpose::kNo) || + (args.layout == Layout::kRowMajor && args.a_transpose == Transpose::kNo); auto b_two = (b_rotated) ? args.n : args.k; return b_two * args.b_ld + args.b_offset; } @@ -67,6 +70,11 @@ class TestXher2k { static size_t DefaultLDB(const Arguments<U> &args) { return args.k; } static size_t DefaultLDC(const Arguments<U> &args) { return args.n; } + // Describes which transpose options are relevant for this routine + using Transposes = std::vector<Transpose>; + static Transposes GetATransposes(const Transposes &) { return {Transpose::kNo, Transpose::kConjugate}; } + static Transposes GetBTransposes(const Transposes &) { return {}; } // N/A for this routine + // Describes how to run the CLBlast routine static StatusCode RunRoutine(const Arguments<U> &args, const Buffers<T> &buffers, Queue &queue) { auto queue_plain = queue(); diff --git a/test/routines/level3/xherk.h b/test/routines/level3/xherk.h index 20c2b4b8..f097672f 100644 --- a/test/routines/level3/xherk.h +++ b/test/routines/level3/xherk.h @@ -29,6 +29,9 @@ template <typename T, typename U> class TestXherk { public: + // The BLAS level: 1, 2, or 3 + static size_t BLASLevel() { return 3; } + // The list of arguments relevant for this routine static std::vector<std::string> GetOptions() { return {kArgN, kArgK, @@ -60,6 +63,11 @@ class TestXherk { static size_t DefaultLDB(const Arguments<U> &) { return 1; } // N/A for this routine static size_t DefaultLDC(const Arguments<U> &args) { return args.n; } + // Describes which transpose options are relevant for this routine + using Transposes = std::vector<Transpose>; + static Transposes GetATransposes(const Transposes &) { return {Transpose::kNo, Transpose::kConjugate}; } + static Transposes GetBTransposes(const Transposes &) { return {}; } // N/A for this routine + // Describes how to run the CLBlast routine static StatusCode RunRoutine(const Arguments<U> &args, const Buffers<T> &buffers, Queue &queue) { auto queue_plain = queue(); diff --git a/test/routines/level3/xsymm.h b/test/routines/level3/xsymm.h index 5b5ad351..03cf5de9 100644 --- a/test/routines/level3/xsymm.h +++ b/test/routines/level3/xsymm.h @@ -29,6 +29,9 @@ template <typename T> class TestXsymm { public: + // The BLAS level: 1, 2, or 3 + static size_t BLASLevel() { return 3; } + // The list of arguments relevant for this routine static std::vector<std::string> GetOptions() { return {kArgM, kArgN, @@ -69,6 +72,11 @@ class TestXsymm { static size_t DefaultLDB(const Arguments<T> &args) { return args.n; } static size_t DefaultLDC(const Arguments<T> &args) { return args.n; } + // Describes which transpose options are relevant for this routine + using Transposes = std::vector<Transpose>; + static Transposes GetATransposes(const Transposes &) { return {}; } // N/A for this routine + static Transposes GetBTransposes(const Transposes &) { return {}; } // N/A for this routine + // Describes how to run the CLBlast routine static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) { auto queue_plain = queue(); diff --git a/test/routines/level3/xsyr2k.h b/test/routines/level3/xsyr2k.h index 21fcee2a..89e77f83 100644 --- a/test/routines/level3/xsyr2k.h +++ b/test/routines/level3/xsyr2k.h @@ -29,6 +29,9 @@ template <typename T> class TestXsyr2k { public: + // The BLAS level: 1, 2, or 3 + static size_t BLASLevel() { return 3; } + // The list of arguments relevant for this routine static std::vector<std::string> GetOptions() { return {kArgN, kArgK, @@ -46,8 +49,8 @@ class TestXsyr2k { return a_two * args.a_ld + args.a_offset; } static size_t GetSizeB(const Arguments<T> &args) { - auto b_rotated = (args.layout == Layout::kColMajor && args.b_transpose != Transpose::kNo) || - (args.layout == Layout::kRowMajor && args.b_transpose == Transpose::kNo); + auto b_rotated = (args.layout == Layout::kColMajor && args.a_transpose != Transpose::kNo) || + (args.layout == Layout::kRowMajor && args.a_transpose == Transpose::kNo); auto b_two = (b_rotated) ? args.n : args.k; return b_two * args.b_ld + args.b_offset; } @@ -67,6 +70,11 @@ class TestXsyr2k { static size_t DefaultLDB(const Arguments<T> &args) { return args.k; } static size_t DefaultLDC(const Arguments<T> &args) { return args.n; } + // Describes which transpose options are relevant for this routine + using Transposes = std::vector<Transpose>; + static Transposes GetATransposes(const Transposes &) { return {Transpose::kNo, Transpose::kYes}; } + static Transposes GetBTransposes(const Transposes &) { return {}; } // N/A for this routine + // Describes how to run the CLBlast routine static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) { auto queue_plain = queue(); diff --git a/test/routines/level3/xsyrk.h b/test/routines/level3/xsyrk.h index c92693c2..8dacb5b3 100644 --- a/test/routines/level3/xsyrk.h +++ b/test/routines/level3/xsyrk.h @@ -29,6 +29,9 @@ template <typename T> class TestXsyrk { public: + // The BLAS level: 1, 2, or 3 + static size_t BLASLevel() { return 3; } + // The list of arguments relevant for this routine static std::vector<std::string> GetOptions() { return {kArgN, kArgK, @@ -60,6 +63,11 @@ class TestXsyrk { static size_t DefaultLDB(const Arguments<T> &) { return 1; } // N/A for this routine static size_t DefaultLDC(const Arguments<T> &args) { return args.n; } + // Describes which transpose options are relevant for this routine + using Transposes = std::vector<Transpose>; + static Transposes GetATransposes(const Transposes &) { return {Transpose::kNo, Transpose::kYes}; } + static Transposes GetBTransposes(const Transposes &) { return {}; } // N/A for this routine + // Describes how to run the CLBlast routine static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) { auto queue_plain = queue(); diff --git a/test/routines/level3/xtrmm.h b/test/routines/level3/xtrmm.h index d5a52903..152cdf58 100644 --- a/test/routines/level3/xtrmm.h +++ b/test/routines/level3/xtrmm.h @@ -29,6 +29,9 @@ template <typename T> class TestXtrmm { public: + // The BLAS level: 1, 2, or 3 + static size_t BLASLevel() { return 3; } + // The list of arguments relevant for this routine static std::vector<std::string> GetOptions() { return {kArgM, kArgN, @@ -60,6 +63,11 @@ class TestXtrmm { static size_t DefaultLDB(const Arguments<T> &args) { return args.n; } static size_t DefaultLDC(const Arguments<T> &) { return 1; } // N/A for this routine + // Describes which transpose options are relevant for this routine + using Transposes = std::vector<Transpose>; + static Transposes GetATransposes(const Transposes &all) { return all; } + static Transposes GetBTransposes(const Transposes &) { return {}; } // N/A for this routine + // Describes how to run the CLBlast routine static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) { auto queue_plain = queue(); |