summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/performance/routines/level1/xaxpy.cc2
-rw-r--r--test/performance/routines/level1/xcopy.cc2
-rw-r--r--test/performance/routines/level1/xdot.cc2
-rw-r--r--test/performance/routines/level1/xdotc.cc2
-rw-r--r--test/performance/routines/level1/xdotu.cc2
-rw-r--r--test/performance/routines/level1/xscal.cc2
-rw-r--r--test/performance/routines/level1/xswap.cc2
-rw-r--r--test/performance/routines/level2/xgbmv.cc2
-rw-r--r--test/performance/routines/level2/xgemv.cc2
-rw-r--r--test/performance/routines/level2/xger.cc2
-rw-r--r--test/performance/routines/level2/xgerc.cc2
-rw-r--r--test/performance/routines/level2/xgeru.cc2
-rw-r--r--test/performance/routines/level2/xhbmv.cc2
-rw-r--r--test/performance/routines/level2/xhemv.cc2
-rw-r--r--test/performance/routines/level2/xher.cc2
-rw-r--r--test/performance/routines/level2/xher2.cc2
-rw-r--r--test/performance/routines/level2/xhpmv.cc2
-rw-r--r--test/performance/routines/level2/xhpr.cc2
-rw-r--r--test/performance/routines/level2/xhpr2.cc2
-rw-r--r--test/performance/routines/level2/xsbmv.cc2
-rw-r--r--test/performance/routines/level2/xspmv.cc2
-rw-r--r--test/performance/routines/level2/xspr.cc2
-rw-r--r--test/performance/routines/level2/xspr2.cc2
-rw-r--r--test/performance/routines/level2/xsymv.cc2
-rw-r--r--test/performance/routines/level2/xsyr.cc2
-rw-r--r--test/performance/routines/level2/xsyr2.cc2
-rw-r--r--test/performance/routines/level2/xtbmv.cc2
-rw-r--r--test/performance/routines/level2/xtbsv.cc2
-rw-r--r--test/performance/routines/level2/xtpmv.cc2
-rw-r--r--test/performance/routines/level2/xtpsv.cc2
-rw-r--r--test/performance/routines/level2/xtrmv.cc2
-rw-r--r--test/performance/routines/level2/xtrsv.cc2
-rw-r--r--test/performance/routines/level3/xgemm.cc2
-rw-r--r--test/performance/routines/level3/xhemm.cc2
-rw-r--r--test/performance/routines/level3/xher2k.cc2
-rw-r--r--test/performance/routines/level3/xherk.cc2
-rw-r--r--test/performance/routines/level3/xsymm.cc2
-rw-r--r--test/performance/routines/level3/xsyr2k.cc2
-rw-r--r--test/performance/routines/level3/xsyrk.cc2
-rw-r--r--test/performance/routines/level3/xtrmm.cc2
-rw-r--r--test/performance/routines/level3/xtrsm.cc2
-rw-r--r--test/routines/level2/xgemv.h2
-rw-r--r--test/routines/level2/xger.h131
-rw-r--r--test/routines/level2/xgerc.h131
-rw-r--r--test/routines/level2/xgeru.h131
-rw-r--r--test/routines/level2/xher.h122
-rw-r--r--test/routines/level2/xhpr.h122
-rw-r--r--test/routines/level2/xspr.h122
-rw-r--r--test/routines/level2/xsyr.h122
49 files changed, 923 insertions, 42 deletions
diff --git a/test/performance/routines/level1/xaxpy.cc b/test/performance/routines/level1/xaxpy.cc
index 7ab15f28..b423bc3a 100644
--- a/test/performance/routines/level1/xaxpy.cc
+++ b/test/performance/routines/level1/xaxpy.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXaxpy<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level1/xcopy.cc b/test/performance/routines/level1/xcopy.cc
index 6277e8fb..c04c6c1c 100644
--- a/test/performance/routines/level1/xcopy.cc
+++ b/test/performance/routines/level1/xcopy.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXcopy<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level1/xdot.cc b/test/performance/routines/level1/xdot.cc
index 5aa76762..f4616464 100644
--- a/test/performance/routines/level1/xdot.cc
+++ b/test/performance/routines/level1/xdot.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXdot<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level1/xdotc.cc b/test/performance/routines/level1/xdotc.cc
index 81511085..5f36b80e 100644
--- a/test/performance/routines/level1/xdotc.cc
+++ b/test/performance/routines/level1/xdotc.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level1/xdotu.cc b/test/performance/routines/level1/xdotu.cc
index 888eede3..f19f751b 100644
--- a/test/performance/routines/level1/xdotu.cc
+++ b/test/performance/routines/level1/xdotu.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level1/xscal.cc b/test/performance/routines/level1/xscal.cc
index be49c066..bd38f43e 100644
--- a/test/performance/routines/level1/xscal.cc
+++ b/test/performance/routines/level1/xscal.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXscal<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level1/xswap.cc b/test/performance/routines/level1/xswap.cc
index 52fdc580..112641d3 100644
--- a/test/performance/routines/level1/xswap.cc
+++ b/test/performance/routines/level1/xswap.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXswap<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xgbmv.cc b/test/performance/routines/level2/xgbmv.cc
index 629e2182..b050184d 100644
--- a/test/performance/routines/level2/xgbmv.cc
+++ b/test/performance/routines/level2/xgbmv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXgbmv<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xgemv.cc b/test/performance/routines/level2/xgemv.cc
index 2a1983de..51ab9a10 100644
--- a/test/performance/routines/level2/xgemv.cc
+++ b/test/performance/routines/level2/xgemv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXgemv<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xger.cc b/test/performance/routines/level2/xger.cc
index 5fb0d91d..2d956346 100644
--- a/test/performance/routines/level2/xger.cc
+++ b/test/performance/routines/level2/xger.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXger<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xgerc.cc b/test/performance/routines/level2/xgerc.cc
index fd511e42..acd0fab7 100644
--- a/test/performance/routines/level2/xgerc.cc
+++ b/test/performance/routines/level2/xgerc.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level2/xgeru.cc b/test/performance/routines/level2/xgeru.cc
index 689ab2b1..a5973777 100644
--- a/test/performance/routines/level2/xgeru.cc
+++ b/test/performance/routines/level2/xgeru.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level2/xhbmv.cc b/test/performance/routines/level2/xhbmv.cc
index dabe6ec8..28b71045 100644
--- a/test/performance/routines/level2/xhbmv.cc
+++ b/test/performance/routines/level2/xhbmv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level2/xhemv.cc b/test/performance/routines/level2/xhemv.cc
index 77447d76..622854a7 100644
--- a/test/performance/routines/level2/xhemv.cc
+++ b/test/performance/routines/level2/xhemv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level2/xher.cc b/test/performance/routines/level2/xher.cc
index 4ef87e45..613d7766 100644
--- a/test/performance/routines/level2/xher.cc
+++ b/test/performance/routines/level2/xher.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level2/xher2.cc b/test/performance/routines/level2/xher2.cc
index 2d7e17ab..c335d3be 100644
--- a/test/performance/routines/level2/xher2.cc
+++ b/test/performance/routines/level2/xher2.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level2/xhpmv.cc b/test/performance/routines/level2/xhpmv.cc
index b9dd3f82..1e726569 100644
--- a/test/performance/routines/level2/xhpmv.cc
+++ b/test/performance/routines/level2/xhpmv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level2/xhpr.cc b/test/performance/routines/level2/xhpr.cc
index f596682c..000b69af 100644
--- a/test/performance/routines/level2/xhpr.cc
+++ b/test/performance/routines/level2/xhpr.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level2/xhpr2.cc b/test/performance/routines/level2/xhpr2.cc
index 1c493226..19bafc46 100644
--- a/test/performance/routines/level2/xhpr2.cc
+++ b/test/performance/routines/level2/xhpr2.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level2/xsbmv.cc b/test/performance/routines/level2/xsbmv.cc
index febc6bfd..eabab3b7 100644
--- a/test/performance/routines/level2/xsbmv.cc
+++ b/test/performance/routines/level2/xsbmv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXsbmv<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xspmv.cc b/test/performance/routines/level2/xspmv.cc
index 97c6b032..2a9ef925 100644
--- a/test/performance/routines/level2/xspmv.cc
+++ b/test/performance/routines/level2/xspmv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXspmv<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xspr.cc b/test/performance/routines/level2/xspr.cc
index cc18d9b6..84331d74 100644
--- a/test/performance/routines/level2/xspr.cc
+++ b/test/performance/routines/level2/xspr.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXspr<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xspr2.cc b/test/performance/routines/level2/xspr2.cc
index 768452be..c42009a1 100644
--- a/test/performance/routines/level2/xspr2.cc
+++ b/test/performance/routines/level2/xspr2.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXspr2<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xsymv.cc b/test/performance/routines/level2/xsymv.cc
index 6748026f..3f72fe77 100644
--- a/test/performance/routines/level2/xsymv.cc
+++ b/test/performance/routines/level2/xsymv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXsymv<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xsyr.cc b/test/performance/routines/level2/xsyr.cc
index 84510e5d..6b31d3a9 100644
--- a/test/performance/routines/level2/xsyr.cc
+++ b/test/performance/routines/level2/xsyr.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXsyr<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xsyr2.cc b/test/performance/routines/level2/xsyr2.cc
index b8c177d8..0ad59d2d 100644
--- a/test/performance/routines/level2/xsyr2.cc
+++ b/test/performance/routines/level2/xsyr2.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXsyr2<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xtbmv.cc b/test/performance/routines/level2/xtbmv.cc
index 1663dca0..a3297f34 100644
--- a/test/performance/routines/level2/xtbmv.cc
+++ b/test/performance/routines/level2/xtbmv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXtbmv<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xtbsv.cc b/test/performance/routines/level2/xtbsv.cc
index e0cb9f2e..4dcd9a06 100644
--- a/test/performance/routines/level2/xtbsv.cc
+++ b/test/performance/routines/level2/xtbsv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXtbsv<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xtpmv.cc b/test/performance/routines/level2/xtpmv.cc
index 407fdc8c..72477f2d 100644
--- a/test/performance/routines/level2/xtpmv.cc
+++ b/test/performance/routines/level2/xtpmv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXtpmv<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xtpsv.cc b/test/performance/routines/level2/xtpsv.cc
index e402dc60..a3e3f7f1 100644
--- a/test/performance/routines/level2/xtpsv.cc
+++ b/test/performance/routines/level2/xtpsv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXtpsv<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xtrmv.cc b/test/performance/routines/level2/xtrmv.cc
index c5563240..894a7952 100644
--- a/test/performance/routines/level2/xtrmv.cc
+++ b/test/performance/routines/level2/xtrmv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXtrmv<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level2/xtrsv.cc b/test/performance/routines/level2/xtrsv.cc
index 136e2108..e8c65b0f 100644
--- a/test/performance/routines/level2/xtrsv.cc
+++ b/test/performance/routines/level2/xtrsv.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXtrsv<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level3/xgemm.cc b/test/performance/routines/level3/xgemm.cc
index 2082ceac..91897ee1 100644
--- a/test/performance/routines/level3/xgemm.cc
+++ b/test/performance/routines/level3/xgemm.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXgemm<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level3/xhemm.cc b/test/performance/routines/level3/xhemm.cc
index cc68e937..87650b9e 100644
--- a/test/performance/routines/level3/xhemm.cc
+++ b/test/performance/routines/level3/xhemm.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level3/xher2k.cc b/test/performance/routines/level3/xher2k.cc
index 70d76bed..06894816 100644
--- a/test/performance/routines/level3/xher2k.cc
+++ b/test/performance/routines/level3/xher2k.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level3/xherk.cc b/test/performance/routines/level3/xherk.cc
index b3b5dddf..d6f38fb2 100644
--- a/test/performance/routines/level3/xherk.cc
+++ b/test/performance/routines/level3/xherk.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kComplexSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
diff --git a/test/performance/routines/level3/xsymm.cc b/test/performance/routines/level3/xsymm.cc
index f2292273..e0feadd1 100644
--- a/test/performance/routines/level3/xsymm.cc
+++ b/test/performance/routines/level3/xsymm.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXsymm<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level3/xsyr2k.cc b/test/performance/routines/level3/xsyr2k.cc
index 0c8f8f7c..4a82ddc4 100644
--- a/test/performance/routines/level3/xsyr2k.cc
+++ b/test/performance/routines/level3/xsyr2k.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXsyr2k<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level3/xsyrk.cc b/test/performance/routines/level3/xsyrk.cc
index ccd4511a..70f61322 100644
--- a/test/performance/routines/level3/xsyrk.cc
+++ b/test/performance/routines/level3/xsyrk.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXsyrk<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level3/xtrmm.cc b/test/performance/routines/level3/xtrmm.cc
index 8278d077..6f6041e4 100644
--- a/test/performance/routines/level3/xtrmm.cc
+++ b/test/performance/routines/level3/xtrmm.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXtrmm<float>, float, float>(argc, argv); break;
diff --git a/test/performance/routines/level3/xtrsm.cc b/test/performance/routines/level3/xtrsm.cc
index 45f71c5e..76ef255a 100644
--- a/test/performance/routines/level3/xtrsm.cc
+++ b/test/performance/routines/level3/xtrsm.cc
@@ -18,7 +18,7 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- switch(clblast::GetPrecision(argc, argv)) {
+ switch(clblast::GetPrecision(argc, argv, clblast::Precision::kSingle)) {
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
case clblast::Precision::kSingle:
clblast::RunClient<clblast::TestXtrsm<float>, float, float>(argc, argv); break;
diff --git a/test/routines/level2/xgemv.h b/test/routines/level2/xgemv.h
index 927bfaee..2924d498 100644
--- a/test/routines/level2/xgemv.h
+++ b/test/routines/level2/xgemv.h
@@ -35,7 +35,7 @@ class TestXgemv {
// The list of arguments relevant for this routine
static std::vector<std::string> GetOptions() {
return {kArgM, kArgN,
- kArgLayout, kArgATransp,
+ kArgLayout, kArgATransp,
kArgALeadDim, kArgXInc, kArgYInc,
kArgAOffset, kArgXOffset, kArgYOffset,
kArgAlpha, kArgBeta};
diff --git a/test/routines/level2/xger.h b/test/routines/level2/xger.h
new file mode 100644
index 00000000..98296e92
--- /dev/null
+++ b/test/routines/level2/xger.h
@@ -0,0 +1,131 @@
+
+// =================================================================================================
+// 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 a class with static methods to describe the Xger routine. Examples of
+// such 'descriptions' are how to calculate the size a of buffer or how to run the routine. These
+// static methods are used by the correctness tester and the performance tester.
+//
+// =================================================================================================
+
+#ifndef CLBLAST_TEST_ROUTINES_XGER_H_
+#define CLBLAST_TEST_ROUTINES_XGER_H_
+
+#include <vector>
+#include <string>
+
+#include "wrapper_clblas.h"
+
+namespace clblast {
+// =================================================================================================
+
+// See comment at top of file for a description of the class
+template <typename T>
+class TestXger {
+ public:
+
+ // The BLAS level: 1, 2, or 3
+ static size_t BLASLevel() { return 2; }
+
+ // The list of arguments relevant for this routine
+ static std::vector<std::string> GetOptions() {
+ return {kArgM, kArgN,
+ kArgLayout,
+ kArgALeadDim, kArgXInc, kArgYInc,
+ kArgAOffset, kArgXOffset, kArgYOffset,
+ kArgAlpha};
+ }
+
+ // Describes how to obtain the sizes of the buffers
+ static size_t GetSizeX(const Arguments<T> &args) {
+ return args.m * args.x_inc + args.x_offset;
+ }
+ static size_t GetSizeY(const Arguments<T> &args) {
+ return args.n * args.y_inc + args.y_offset;
+ }
+ static size_t GetSizeA(const Arguments<T> &args) {
+ auto a_rotated = (args.layout == Layout::kRowMajor);
+ auto a_two = (a_rotated) ? args.m : args.n;
+ return a_two * args.a_ld + args.a_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 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();
+ auto event = cl_event{};
+ auto status = Ger(args.layout,
+ args.m, args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.y_vec(), args.y_offset, args.y_inc,
+ buffers.a_mat(), args.a_offset, args.a_ld,
+ &queue_plain, &event);
+ clWaitForEvents(1, &event);
+ return status;
+ }
+
+ // Describes how to run the clBLAS routine (for correctness/performance comparison)
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
+ auto queue_plain = queue();
+ auto event = cl_event{};
+ auto status = clblasXger(static_cast<clblasOrder>(args.layout),
+ args.m, args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.y_vec(), args.y_offset, args.y_inc,
+ buffers.a_mat(), args.a_offset, args.a_ld,
+ 1, &queue_plain, 0, nullptr, &event);
+ clWaitForEvents(1, &event);
+ return static_cast<StatusCode>(status);
+ }
+
+ // Describes how to download the results of the computation (more importantly: which buffer)
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
+ std::vector<T> result(args.a_size, static_cast<T>(0));
+ buffers.a_mat.Read(queue, args.a_size, result);
+ return result;
+ }
+
+ // Describes how to compute the indices of the result buffer
+ static size_t ResultID1(const Arguments<T> &args) { return args.m; }
+ static size_t ResultID2(const Arguments<T> &args) { return args.n; }
+ static size_t GetResultIndex(const Arguments<T> &args, const size_t id1, const size_t id2) {
+ return (args.layout == Layout::kRowMajor) ?
+ id1*args.a_ld + id2 + args.a_offset:
+ id2*args.a_ld + id1 + args.a_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 (2*args.m*args.n + args.m + args.n) * sizeof(T);
+ }
+};
+
+// =================================================================================================
+} // namespace clblast
+
+// CLBLAST_TEST_ROUTINES_XGER_H_
+#endif
diff --git a/test/routines/level2/xgerc.h b/test/routines/level2/xgerc.h
new file mode 100644
index 00000000..77258d92
--- /dev/null
+++ b/test/routines/level2/xgerc.h
@@ -0,0 +1,131 @@
+
+// =================================================================================================
+// 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 a class with static methods to describe the Xgerc routine. Examples of
+// such 'descriptions' are how to calculate the size a of buffer or how to run the routine. These
+// static methods are used by the correctness tester and the performance tester.
+//
+// =================================================================================================
+
+#ifndef CLBLAST_TEST_ROUTINES_XGERC_H_
+#define CLBLAST_TEST_ROUTINES_XGERC_H_
+
+#include <vector>
+#include <string>
+
+#include "wrapper_clblas.h"
+
+namespace clblast {
+// =================================================================================================
+
+// See comment at top of file for a description of the class
+template <typename T>
+class TestXgerc {
+ public:
+
+ // The BLAS level: 1, 2, or 3
+ static size_t BLASLevel() { return 2; }
+
+ // The list of arguments relevant for this routine
+ static std::vector<std::string> GetOptions() {
+ return {kArgM, kArgN,
+ kArgLayout,
+ kArgALeadDim, kArgXInc, kArgYInc,
+ kArgAOffset, kArgXOffset, kArgYOffset,
+ kArgAlpha};
+ }
+
+ // Describes how to obtain the sizes of the buffers
+ static size_t GetSizeX(const Arguments<T> &args) {
+ return args.m * args.x_inc + args.x_offset;
+ }
+ static size_t GetSizeY(const Arguments<T> &args) {
+ return args.n * args.y_inc + args.y_offset;
+ }
+ static size_t GetSizeA(const Arguments<T> &args) {
+ auto a_rotated = (args.layout == Layout::kRowMajor);
+ auto a_two = (a_rotated) ? args.m : args.n;
+ return a_two * args.a_ld + args.a_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 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();
+ auto event = cl_event{};
+ auto status = Gerc(args.layout,
+ args.m, args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.y_vec(), args.y_offset, args.y_inc,
+ buffers.a_mat(), args.a_offset, args.a_ld,
+ &queue_plain, &event);
+ clWaitForEvents(1, &event);
+ return status;
+ }
+
+ // Describes how to run the clBLAS routine (for correctness/performance comparison)
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
+ auto queue_plain = queue();
+ auto event = cl_event{};
+ auto status = clblasXgerc(static_cast<clblasOrder>(args.layout),
+ args.m, args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.y_vec(), args.y_offset, args.y_inc,
+ buffers.a_mat(), args.a_offset, args.a_ld,
+ 1, &queue_plain, 0, nullptr, &event);
+ clWaitForEvents(1, &event);
+ return static_cast<StatusCode>(status);
+ }
+
+ // Describes how to download the results of the computation (more importantly: which buffer)
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
+ std::vector<T> result(args.a_size, static_cast<T>(0));
+ buffers.a_mat.Read(queue, args.a_size, result);
+ return result;
+ }
+
+ // Describes how to compute the indices of the result buffer
+ static size_t ResultID1(const Arguments<T> &args) { return args.m; }
+ static size_t ResultID2(const Arguments<T> &args) { return args.n; }
+ static size_t GetResultIndex(const Arguments<T> &args, const size_t id1, const size_t id2) {
+ return (args.layout == Layout::kRowMajor) ?
+ id1*args.a_ld + id2 + args.a_offset:
+ id2*args.a_ld + id1 + args.a_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 (2*args.m*args.n + args.m + args.n) * sizeof(T);
+ }
+};
+
+// =================================================================================================
+} // namespace clblast
+
+// CLBLAST_TEST_ROUTINES_XGERC_H_
+#endif
diff --git a/test/routines/level2/xgeru.h b/test/routines/level2/xgeru.h
new file mode 100644
index 00000000..e5f5f235
--- /dev/null
+++ b/test/routines/level2/xgeru.h
@@ -0,0 +1,131 @@
+
+// =================================================================================================
+// 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 a class with static methods to describe the Xgeru routine. Examples of
+// such 'descriptions' are how to calculate the size a of buffer or how to run the routine. These
+// static methods are used by the correctness tester and the performance tester.
+//
+// =================================================================================================
+
+#ifndef CLBLAST_TEST_ROUTINES_XGERU_H_
+#define CLBLAST_TEST_ROUTINES_XGERU_H_
+
+#include <vector>
+#include <string>
+
+#include "wrapper_clblas.h"
+
+namespace clblast {
+// =================================================================================================
+
+// See comment at top of file for a description of the class
+template <typename T>
+class TestXgeru {
+ public:
+
+ // The BLAS level: 1, 2, or 3
+ static size_t BLASLevel() { return 2; }
+
+ // The list of arguments relevant for this routine
+ static std::vector<std::string> GetOptions() {
+ return {kArgM, kArgN,
+ kArgLayout,
+ kArgALeadDim, kArgXInc, kArgYInc,
+ kArgAOffset, kArgXOffset, kArgYOffset,
+ kArgAlpha};
+ }
+
+ // Describes how to obtain the sizes of the buffers
+ static size_t GetSizeX(const Arguments<T> &args) {
+ return args.m * args.x_inc + args.x_offset;
+ }
+ static size_t GetSizeY(const Arguments<T> &args) {
+ return args.n * args.y_inc + args.y_offset;
+ }
+ static size_t GetSizeA(const Arguments<T> &args) {
+ auto a_rotated = (args.layout == Layout::kRowMajor);
+ auto a_two = (a_rotated) ? args.m : args.n;
+ return a_two * args.a_ld + args.a_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 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();
+ auto event = cl_event{};
+ auto status = Geru(args.layout,
+ args.m, args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.y_vec(), args.y_offset, args.y_inc,
+ buffers.a_mat(), args.a_offset, args.a_ld,
+ &queue_plain, &event);
+ clWaitForEvents(1, &event);
+ return status;
+ }
+
+ // Describes how to run the clBLAS routine (for correctness/performance comparison)
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
+ auto queue_plain = queue();
+ auto event = cl_event{};
+ auto status = clblasXgeru(static_cast<clblasOrder>(args.layout),
+ args.m, args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.y_vec(), args.y_offset, args.y_inc,
+ buffers.a_mat(), args.a_offset, args.a_ld,
+ 1, &queue_plain, 0, nullptr, &event);
+ clWaitForEvents(1, &event);
+ return static_cast<StatusCode>(status);
+ }
+
+ // Describes how to download the results of the computation (more importantly: which buffer)
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
+ std::vector<T> result(args.a_size, static_cast<T>(0));
+ buffers.a_mat.Read(queue, args.a_size, result);
+ return result;
+ }
+
+ // Describes how to compute the indices of the result buffer
+ static size_t ResultID1(const Arguments<T> &args) { return args.m; }
+ static size_t ResultID2(const Arguments<T> &args) { return args.n; }
+ static size_t GetResultIndex(const Arguments<T> &args, const size_t id1, const size_t id2) {
+ return (args.layout == Layout::kRowMajor) ?
+ id1*args.a_ld + id2 + args.a_offset:
+ id2*args.a_ld + id1 + args.a_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 (2*args.m*args.n + args.m + args.n) * sizeof(T);
+ }
+};
+
+// =================================================================================================
+} // namespace clblast
+
+// CLBLAST_TEST_ROUTINES_XGERU_H_
+#endif
diff --git a/test/routines/level2/xher.h b/test/routines/level2/xher.h
new file mode 100644
index 00000000..53c4200f
--- /dev/null
+++ b/test/routines/level2/xher.h
@@ -0,0 +1,122 @@
+
+// =================================================================================================
+// 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 a class with static methods to describe the Xher routine. Examples of
+// such 'descriptions' are how to calculate the size a of buffer or how to run the routine. These
+// static methods are used by the correctness tester and the performance tester.
+//
+// =================================================================================================
+
+#ifndef CLBLAST_TEST_ROUTINES_XHER_H_
+#define CLBLAST_TEST_ROUTINES_XHER_H_
+
+#include <vector>
+#include <string>
+
+#include "wrapper_clblas.h"
+
+namespace clblast {
+// =================================================================================================
+
+// See comment at top of file for a description of the class
+template <typename T, typename U>
+class TestXher {
+ public:
+
+ // The BLAS level: 1, 2, or 3
+ static size_t BLASLevel() { return 2; }
+
+ // The list of arguments relevant for this routine
+ static std::vector<std::string> GetOptions() {
+ return {kArgN,
+ kArgLayout, kArgTriangle,
+ kArgALeadDim, kArgXInc,
+ kArgAOffset, kArgXOffset,
+ kArgAlpha};
+ }
+
+ // Describes how to obtain the sizes of the buffers
+ static size_t GetSizeX(const Arguments<U> &args) {
+ return args.n * args.x_inc + args.x_offset;
+ }
+ static size_t GetSizeA(const Arguments<U> &args) {
+ return args.n * args.a_ld + args.a_offset;
+ }
+
+ // Describes how to set the sizes of all the buffers
+ static void SetSizes(Arguments<U> &args) {
+ args.a_size = GetSizeA(args);
+ args.x_size = GetSizeX(args);
+ }
+
+ // Describes what the default values of the leading dimensions of the matrices are
+ static size_t DefaultLDA(const Arguments<U> &args) { return args.n; }
+ static size_t DefaultLDB(const Arguments<U> &) { return 1; } // N/A for this routine
+ static size_t DefaultLDC(const Arguments<U> &) { 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 &) { 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<U> &args, const Buffers<T> &buffers, Queue &queue) {
+ auto queue_plain = queue();
+ auto event = cl_event{};
+ auto status = Her(args.layout, args.triangle,
+ args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.a_mat(), args.a_offset, args.a_ld,
+ &queue_plain, &event);
+ clWaitForEvents(1, &event);
+ return status;
+ }
+
+ // Describes how to run the clBLAS routine (for correctness/performance comparison)
+ static StatusCode RunReference(const Arguments<U> &args, const Buffers<T> &buffers, Queue &queue) {
+ auto queue_plain = queue();
+ auto event = cl_event{};
+ auto status = clblasXher(static_cast<clblasOrder>(args.layout),
+ static_cast<clblasUplo>(args.triangle),
+ args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.a_mat(), args.a_offset, args.a_ld,
+ 1, &queue_plain, 0, nullptr, &event);
+ clWaitForEvents(1, &event);
+ return static_cast<StatusCode>(status);
+ }
+
+ // Describes how to download the results of the computation (more importantly: which buffer)
+ static std::vector<T> DownloadResult(const Arguments<U> &args, Buffers<T> &buffers, Queue &queue) {
+ std::vector<T> result(args.a_size, static_cast<T>(0));
+ buffers.a_mat.Read(queue, args.a_size, result);
+ return result;
+ }
+
+ // Describes how to compute the indices of the result buffer
+ static size_t ResultID1(const Arguments<U> &args) { return args.n; }
+ static size_t ResultID2(const Arguments<U> &args) { return args.n; }
+ static size_t GetResultIndex(const Arguments<U> &args, const size_t id1, const size_t id2) {
+ return id2*args.a_ld + id1 + args.a_offset;
+ }
+
+ // Describes how to compute performance metrics
+ static size_t GetFlops(const Arguments<U> &args) {
+ return 3 * args.n * args.n;
+ }
+ static size_t GetBytes(const Arguments<U> &args) {
+ return (args.n*args.n + args.n) * sizeof(T);
+ }
+};
+
+// =================================================================================================
+} // namespace clblast
+
+// CLBLAST_TEST_ROUTINES_XHER_H_
+#endif
diff --git a/test/routines/level2/xhpr.h b/test/routines/level2/xhpr.h
new file mode 100644
index 00000000..03599ddc
--- /dev/null
+++ b/test/routines/level2/xhpr.h
@@ -0,0 +1,122 @@
+
+// =================================================================================================
+// 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 a class with static methods to describe the Xhpr routine. Examples of
+// such 'descriptions' are how to calculate the size a of buffer or how to run the routine. These
+// static methods are used by the correctness tester and the performance tester.
+//
+// =================================================================================================
+
+#ifndef CLBLAST_TEST_ROUTINES_XHPR_H_
+#define CLBLAST_TEST_ROUTINES_XHPR_H_
+
+#include <vector>
+#include <string>
+
+#include "wrapper_clblas.h"
+
+namespace clblast {
+// =================================================================================================
+
+// See comment at top of file for a description of the class
+template <typename T, typename U>
+class TestXhpr {
+ public:
+
+ // The BLAS level: 1, 2, or 3
+ static size_t BLASLevel() { return 2; }
+
+ // The list of arguments relevant for this routine
+ static std::vector<std::string> GetOptions() {
+ return {kArgN,
+ kArgLayout, kArgTriangle,
+ kArgXInc,
+ kArgAPOffset, kArgXOffset,
+ kArgAlpha};
+ }
+
+ // Describes how to obtain the sizes of the buffers
+ static size_t GetSizeX(const Arguments<U> &args) {
+ return args.n * args.x_inc + args.x_offset;
+ }
+ static size_t GetSizeAP(const Arguments<U> &args) {
+ return ((args.n*(args.n+1)) / 2) + args.ap_offset;
+ }
+
+ // Describes how to set the sizes of all the buffers
+ static void SetSizes(Arguments<U> &args) {
+ args.ap_size = GetSizeAP(args);
+ args.x_size = GetSizeX(args);
+ }
+
+ // Describes what the default values of the leading dimensions of the matrices are
+ static size_t DefaultLDA(const Arguments<U> &args) { return args.n; }
+ static size_t DefaultLDB(const Arguments<U> &) { return 1; } // N/A for this routine
+ static size_t DefaultLDC(const Arguments<U> &) { 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 &) { 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<U> &args, const Buffers<T> &buffers, Queue &queue) {
+ auto queue_plain = queue();
+ auto event = cl_event{};
+ auto status = Hpr(args.layout, args.triangle,
+ args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.ap_mat(), args.ap_offset,
+ &queue_plain, &event);
+ clWaitForEvents(1, &event);
+ return status;
+ }
+
+ // Describes how to run the clBLAS routine (for correctness/performance comparison)
+ static StatusCode RunReference(const Arguments<U> &args, const Buffers<T> &buffers, Queue &queue) {
+ auto queue_plain = queue();
+ auto event = cl_event{};
+ auto status = clblasXhpr(static_cast<clblasOrder>(args.layout),
+ static_cast<clblasUplo>(args.triangle),
+ args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.ap_mat(), args.ap_offset,
+ 1, &queue_plain, 0, nullptr, &event);
+ clWaitForEvents(1, &event);
+ return static_cast<StatusCode>(status);
+ }
+
+ // Describes how to download the results of the computation (more importantly: which buffer)
+ static std::vector<T> DownloadResult(const Arguments<U> &args, Buffers<T> &buffers, Queue &queue) {
+ std::vector<T> result(args.ap_size, static_cast<T>(0));
+ buffers.ap_mat.Read(queue, args.ap_size, result);
+ return result;
+ }
+
+ // Describes how to compute the indices of the result buffer
+ static size_t ResultID1(const Arguments<U> &args) { return args.ap_size - args.ap_offset; }
+ static size_t ResultID2(const Arguments<U> &) { return 1; } // N/A for this routine
+ static size_t GetResultIndex(const Arguments<U> &args, const size_t id1, const size_t) {
+ return id1 + args.ap_offset;
+ }
+
+ // Describes how to compute performance metrics
+ static size_t GetFlops(const Arguments<U> &args) {
+ return 3 * ((args.n*(args.n+1)) / 2);
+ }
+ static size_t GetBytes(const Arguments<U> &args) {
+ return ((args.n*(args.n+1)) + args.n) * sizeof(T);
+ }
+};
+
+// =================================================================================================
+} // namespace clblast
+
+// CLBLAST_TEST_ROUTINES_XHPR_H_
+#endif
diff --git a/test/routines/level2/xspr.h b/test/routines/level2/xspr.h
new file mode 100644
index 00000000..819b1ca8
--- /dev/null
+++ b/test/routines/level2/xspr.h
@@ -0,0 +1,122 @@
+
+// =================================================================================================
+// 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 a class with static methods to describe the Xspr routine. Examples of
+// such 'descriptions' are how to calculate the size a of buffer or how to run the routine. These
+// static methods are used by the correctness tester and the performance tester.
+//
+// =================================================================================================
+
+#ifndef CLBLAST_TEST_ROUTINES_XSPR_H_
+#define CLBLAST_TEST_ROUTINES_XSPR_H_
+
+#include <vector>
+#include <string>
+
+#include "wrapper_clblas.h"
+
+namespace clblast {
+// =================================================================================================
+
+// See comment at top of file for a description of the class
+template <typename T>
+class TestXspr {
+ public:
+
+ // The BLAS level: 1, 2, or 3
+ static size_t BLASLevel() { return 2; }
+
+ // The list of arguments relevant for this routine
+ static std::vector<std::string> GetOptions() {
+ return {kArgN,
+ kArgLayout, kArgTriangle,
+ kArgXInc,
+ kArgAPOffset, kArgXOffset,
+ kArgAlpha};
+ }
+
+ // Describes how to obtain the sizes of the buffers
+ static size_t GetSizeX(const Arguments<T> &args) {
+ return args.n * args.x_inc + args.x_offset;
+ }
+ static size_t GetSizeAP(const Arguments<T> &args) {
+ return ((args.n*(args.n+1)) / 2) + args.ap_offset;
+ }
+
+ // Describes how to set the sizes of all the buffers
+ static void SetSizes(Arguments<T> &args) {
+ args.ap_size = GetSizeAP(args);
+ args.x_size = GetSizeX(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 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();
+ auto event = cl_event{};
+ auto status = Spr(args.layout, args.triangle,
+ args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.ap_mat(), args.ap_offset,
+ &queue_plain, &event);
+ clWaitForEvents(1, &event);
+ return status;
+ }
+
+ // Describes how to run the clBLAS routine (for correctness/performance comparison)
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
+ auto queue_plain = queue();
+ auto event = cl_event{};
+ auto status = clblasXspr(static_cast<clblasOrder>(args.layout),
+ static_cast<clblasUplo>(args.triangle),
+ args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.ap_mat(), args.ap_offset,
+ 1, &queue_plain, 0, nullptr, &event);
+ clWaitForEvents(1, &event);
+ return static_cast<StatusCode>(status);
+ }
+
+ // Describes how to download the results of the computation (more importantly: which buffer)
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
+ std::vector<T> result(args.ap_size, static_cast<T>(0));
+ buffers.ap_mat.Read(queue, args.ap_size, result);
+ return result;
+ }
+
+ // Describes how to compute the indices of the result buffer
+ static size_t ResultID1(const Arguments<T> &args) { return args.ap_size - args.ap_offset; }
+ 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.ap_offset;
+ }
+
+ // Describes how to compute performance metrics
+ static size_t GetFlops(const Arguments<T> &args) {
+ return 3 * ((args.n*(args.n+1)) / 2);
+ }
+ static size_t GetBytes(const Arguments<T> &args) {
+ return ((args.n*(args.n+1)) + args.n) * sizeof(T);
+ }
+};
+
+// =================================================================================================
+} // namespace clblast
+
+// CLBLAST_TEST_ROUTINES_XSPR_H_
+#endif
diff --git a/test/routines/level2/xsyr.h b/test/routines/level2/xsyr.h
new file mode 100644
index 00000000..66b75c0c
--- /dev/null
+++ b/test/routines/level2/xsyr.h
@@ -0,0 +1,122 @@
+
+// =================================================================================================
+// 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 a class with static methods to describe the Xsyr routine. Examples of
+// such 'descriptions' are how to calculate the size a of buffer or how to run the routine. These
+// static methods are used by the correctness tester and the performance tester.
+//
+// =================================================================================================
+
+#ifndef CLBLAST_TEST_ROUTINES_XSYR_H_
+#define CLBLAST_TEST_ROUTINES_XSYR_H_
+
+#include <vector>
+#include <string>
+
+#include "wrapper_clblas.h"
+
+namespace clblast {
+// =================================================================================================
+
+// See comment at top of file for a description of the class
+template <typename T>
+class TestXsyr {
+ public:
+
+ // The BLAS level: 1, 2, or 3
+ static size_t BLASLevel() { return 2; }
+
+ // The list of arguments relevant for this routine
+ static std::vector<std::string> GetOptions() {
+ return {kArgN,
+ kArgLayout, kArgTriangle,
+ kArgALeadDim, kArgXInc,
+ kArgAOffset, kArgXOffset,
+ kArgAlpha};
+ }
+
+ // Describes how to obtain the sizes of the buffers
+ static size_t GetSizeX(const Arguments<T> &args) {
+ return args.n * args.x_inc + args.x_offset;
+ }
+ static size_t GetSizeA(const Arguments<T> &args) {
+ return args.n * args.a_ld + args.a_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);
+ }
+
+ // 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 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();
+ auto event = cl_event{};
+ auto status = Syr(args.layout, args.triangle,
+ args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.a_mat(), args.a_offset, args.a_ld,
+ &queue_plain, &event);
+ clWaitForEvents(1, &event);
+ return status;
+ }
+
+ // Describes how to run the clBLAS routine (for correctness/performance comparison)
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
+ auto queue_plain = queue();
+ auto event = cl_event{};
+ auto status = clblasXsyr(static_cast<clblasOrder>(args.layout),
+ static_cast<clblasUplo>(args.triangle),
+ args.n, args.alpha,
+ buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers.a_mat(), args.a_offset, args.a_ld,
+ 1, &queue_plain, 0, nullptr, &event);
+ clWaitForEvents(1, &event);
+ return static_cast<StatusCode>(status);
+ }
+
+ // Describes how to download the results of the computation (more importantly: which buffer)
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
+ std::vector<T> result(args.a_size, static_cast<T>(0));
+ buffers.a_mat.Read(queue, args.a_size, result);
+ return result;
+ }
+
+ // Describes how to compute the indices of the result buffer
+ static size_t ResultID1(const Arguments<T> &args) { return args.n; }
+ static size_t ResultID2(const Arguments<T> &args) { return args.n; }
+ static size_t GetResultIndex(const Arguments<T> &args, const size_t id1, const size_t id2) {
+ return id2*args.a_ld + id1 + args.a_offset;
+ }
+
+ // Describes how to compute performance metrics
+ static size_t GetFlops(const Arguments<T> &args) {
+ return 3 * args.n * args.n;
+ }
+ static size_t GetBytes(const Arguments<T> &args) {
+ return (args.n*args.n + args.n) * sizeof(T);
+ }
+};
+
+// =================================================================================================
+} // namespace clblast
+
+// CLBLAST_TEST_ROUTINES_XSYR_H_
+#endif