summaryrefslogtreecommitdiff
path: root/test/correctness
diff options
context:
space:
mode:
Diffstat (limited to 'test/correctness')
-rw-r--r--test/correctness/routines/level1/xamax.cpp30
-rw-r--r--test/correctness/routines/level1/xasum.cpp30
-rw-r--r--test/correctness/routines/level1/xaxpy.cpp30
-rw-r--r--test/correctness/routines/level1/xcopy.cpp30
-rw-r--r--test/correctness/routines/level1/xdot.cpp (renamed from test/correctness/routines/level1/xasum.cc)14
-rw-r--r--test/correctness/routines/level1/xdotc.cpp27
-rw-r--r--test/correctness/routines/level1/xdotu.cpp27
-rw-r--r--test/correctness/routines/level1/xnrm2.cc28
-rw-r--r--test/correctness/routines/level1/xnrm2.cpp30
-rw-r--r--test/correctness/routines/level1/xrot.cpp (renamed from test/correctness/routines/level1/xdotc.cc)11
-rw-r--r--test/correctness/routines/level1/xrotg.cc26
-rw-r--r--test/correctness/routines/level1/xrotg.cpp (renamed from test/correctness/routines/level1/xdot.cc)11
-rw-r--r--test/correctness/routines/level1/xrotm.cc26
-rw-r--r--test/correctness/routines/level1/xrotm.cpp (renamed from test/correctness/routines/level1/xdotu.cc)11
-rw-r--r--test/correctness/routines/level1/xrotmg.cc26
-rw-r--r--test/correctness/routines/level1/xrotmg.cpp (renamed from test/correctness/routines/level1/xrot.cc)11
-rw-r--r--test/correctness/routines/level1/xscal.cc28
-rw-r--r--test/correctness/routines/level1/xscal.cpp30
-rw-r--r--test/correctness/routines/level1/xswap.cc28
-rw-r--r--test/correctness/routines/level1/xswap.cpp30
-rw-r--r--test/correctness/routines/level2/xgbmv.cc28
-rw-r--r--test/correctness/routines/level2/xgbmv.cpp30
-rw-r--r--test/correctness/routines/level2/xgemv.cc28
-rw-r--r--test/correctness/routines/level2/xgemv.cpp30
-rw-r--r--test/correctness/routines/level2/xger.cc26
-rw-r--r--test/correctness/routines/level2/xger.cpp (renamed from test/correctness/routines/level1/xaxpy.cc)14
-rw-r--r--test/correctness/routines/level2/xgerc.cc26
-rw-r--r--test/correctness/routines/level2/xgerc.cpp27
-rw-r--r--test/correctness/routines/level2/xgeru.cc26
-rw-r--r--test/correctness/routines/level2/xgeru.cpp27
-rw-r--r--test/correctness/routines/level2/xhbmv.cc26
-rw-r--r--test/correctness/routines/level2/xhbmv.cpp27
-rw-r--r--test/correctness/routines/level2/xhemv.cc26
-rw-r--r--test/correctness/routines/level2/xhemv.cpp27
-rw-r--r--test/correctness/routines/level2/xher.cc26
-rw-r--r--test/correctness/routines/level2/xher.cpp27
-rw-r--r--test/correctness/routines/level2/xher2.cc26
-rw-r--r--test/correctness/routines/level2/xher2.cpp27
-rw-r--r--test/correctness/routines/level2/xhpmv.cc26
-rw-r--r--test/correctness/routines/level2/xhpmv.cpp27
-rw-r--r--test/correctness/routines/level2/xhpr.cc26
-rw-r--r--test/correctness/routines/level2/xhpr.cpp27
-rw-r--r--test/correctness/routines/level2/xhpr2.cc26
-rw-r--r--test/correctness/routines/level2/xhpr2.cpp27
-rw-r--r--test/correctness/routines/level2/xsbmv.cc26
-rw-r--r--test/correctness/routines/level2/xsbmv.cpp (renamed from test/correctness/routines/level1/xamax.cc)14
-rw-r--r--test/correctness/routines/level2/xspmv.cc26
-rw-r--r--test/correctness/routines/level2/xspmv.cpp28
-rw-r--r--test/correctness/routines/level2/xspr.cc26
-rw-r--r--test/correctness/routines/level2/xspr.cpp (renamed from test/correctness/routines/level1/xcopy.cc)14
-rw-r--r--test/correctness/routines/level2/xspr2.cc26
-rw-r--r--test/correctness/routines/level2/xspr2.cpp28
-rw-r--r--test/correctness/routines/level2/xsymv.cc26
-rw-r--r--test/correctness/routines/level2/xsymv.cpp28
-rw-r--r--test/correctness/routines/level2/xsyr.cc26
-rw-r--r--test/correctness/routines/level2/xsyr.cpp28
-rw-r--r--test/correctness/routines/level2/xsyr2.cc26
-rw-r--r--test/correctness/routines/level2/xsyr2.cpp28
-rw-r--r--test/correctness/routines/level2/xtbmv.cc28
-rw-r--r--test/correctness/routines/level2/xtbmv.cpp30
-rw-r--r--test/correctness/routines/level2/xtbsv.cc28
-rw-r--r--test/correctness/routines/level2/xtbsv.cpp29
-rw-r--r--test/correctness/routines/level2/xtpmv.cc28
-rw-r--r--test/correctness/routines/level2/xtpmv.cpp30
-rw-r--r--test/correctness/routines/level2/xtpsv.cc28
-rw-r--r--test/correctness/routines/level2/xtpsv.cpp29
-rw-r--r--test/correctness/routines/level2/xtrmv.cc28
-rw-r--r--test/correctness/routines/level2/xtrmv.cpp30
-rw-r--r--test/correctness/routines/level2/xtrsv.cc28
-rw-r--r--test/correctness/routines/level2/xtrsv.cpp29
-rw-r--r--test/correctness/routines/level3/xgemm.cc28
-rw-r--r--test/correctness/routines/level3/xgemm.cpp30
-rw-r--r--test/correctness/routines/level3/xhemm.cc26
-rw-r--r--test/correctness/routines/level3/xhemm.cpp27
-rw-r--r--test/correctness/routines/level3/xher2k.cpp27
-rw-r--r--test/correctness/routines/level3/xherk.cc26
-rw-r--r--test/correctness/routines/level3/xherk.cpp27
-rw-r--r--test/correctness/routines/level3/xsymm.cc28
-rw-r--r--test/correctness/routines/level3/xsymm.cpp30
-rw-r--r--test/correctness/routines/level3/xsyr2k.cc28
-rw-r--r--test/correctness/routines/level3/xsyr2k.cpp30
-rw-r--r--test/correctness/routines/level3/xsyrk.cc28
-rw-r--r--test/correctness/routines/level3/xsyrk.cpp30
-rw-r--r--test/correctness/routines/level3/xtrmm.cc28
-rw-r--r--test/correctness/routines/level3/xtrmm.cpp30
-rw-r--r--test/correctness/routines/level3/xtrsm.cc28
-rw-r--r--test/correctness/routines/level3/xtrsm.cpp30
-rw-r--r--test/correctness/routines/levelx/xomatcopy.cpp (renamed from test/correctness/routines/level3/xher2k.cc)14
-rw-r--r--test/correctness/testblas.cpp (renamed from test/correctness/testblas.cc)84
-rw-r--r--test/correctness/testblas.hpp (renamed from test/correctness/testblas.h)23
-rw-r--r--test/correctness/tester.cpp (renamed from test/correctness/tester.cc)115
-rw-r--r--test/correctness/tester.hpp (renamed from test/correctness/tester.h)11
92 files changed, 1371 insertions, 1169 deletions
diff --git a/test/correctness/routines/level1/xamax.cpp b/test/correctness/routines/level1/xamax.cpp
new file mode 100644
index 00000000..607637e8
--- /dev/null
+++ b/test/correctness/routines/level1/xamax.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xamax.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXamax<float>, float, float>(argc, argv, false, "iSAMAX");
+ errors += clblast::RunTests<clblast::TestXamax<double>, double, double>(argc, argv, true, "iDAMAX");
+ errors += clblast::RunTests<clblast::TestXamax<float2>, float2, float2>(argc, argv, true, "iCAMAX");
+ errors += clblast::RunTests<clblast::TestXamax<double2>, double2, double2>(argc, argv, true, "iZAMAX");
+ errors += clblast::RunTests<clblast::TestXamax<half>, half, half>(argc, argv, true, "iHAMAX");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level1/xasum.cpp b/test/correctness/routines/level1/xasum.cpp
new file mode 100644
index 00000000..e22e42a6
--- /dev/null
+++ b/test/correctness/routines/level1/xasum.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xasum.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXasum<float>, float, float>(argc, argv, false, "SASUM");
+ errors += clblast::RunTests<clblast::TestXasum<double>, double, double>(argc, argv, true, "DASUM");
+ errors += clblast::RunTests<clblast::TestXasum<float2>, float2, float2>(argc, argv, true, "ScASUM");
+ errors += clblast::RunTests<clblast::TestXasum<double2>, double2, double2>(argc, argv, true, "DzASUM");
+ errors += clblast::RunTests<clblast::TestXasum<half>, half, half>(argc, argv, true, "HASUM");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level1/xaxpy.cpp b/test/correctness/routines/level1/xaxpy.cpp
new file mode 100644
index 00000000..064172fa
--- /dev/null
+++ b/test/correctness/routines/level1/xaxpy.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xaxpy.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXaxpy<float>, float, float>(argc, argv, false, "SAXPY");
+ errors += clblast::RunTests<clblast::TestXaxpy<double>, double, double>(argc, argv, true, "DAXPY");
+ errors += clblast::RunTests<clblast::TestXaxpy<float2>, float2, float2>(argc, argv, true, "CAXPY");
+ errors += clblast::RunTests<clblast::TestXaxpy<double2>, double2, double2>(argc, argv, true, "ZAXPY");
+ errors += clblast::RunTests<clblast::TestXaxpy<half>, half, half>(argc, argv, true, "HAXPY");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level1/xcopy.cpp b/test/correctness/routines/level1/xcopy.cpp
new file mode 100644
index 00000000..e6f2581b
--- /dev/null
+++ b/test/correctness/routines/level1/xcopy.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xcopy.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXcopy<float>, float, float>(argc, argv, false, "SCOPY");
+ errors += clblast::RunTests<clblast::TestXcopy<double>, double, double>(argc, argv, true, "DCOPY");
+ errors += clblast::RunTests<clblast::TestXcopy<float2>, float2, float2>(argc, argv, true, "CCOPY");
+ errors += clblast::RunTests<clblast::TestXcopy<double2>, double2, double2>(argc, argv, true, "ZCOPY");
+ errors += clblast::RunTests<clblast::TestXcopy<half>, half, half>(argc, argv, true, "HCOPY");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level1/xasum.cc b/test/correctness/routines/level1/xdot.cpp
index 5ec20596..080250cb 100644
--- a/test/correctness/routines/level1/xasum.cc
+++ b/test/correctness/routines/level1/xdot.cpp
@@ -9,8 +9,8 @@
//
// =================================================================================================
-#include "correctness/testblas.h"
-#include "routines/level1/xasum.h"
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xdot.hpp"
// Shortcuts to the clblast namespace
using float2 = clblast::float2;
@@ -18,11 +18,11 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXasum<float>, float, float>(argc, argv, false, "SASUM");
- clblast::RunTests<clblast::TestXasum<double>, double, double>(argc, argv, true, "DASUM");
- clblast::RunTests<clblast::TestXasum<float2>, float2, float2>(argc, argv, true, "ScASUM");
- clblast::RunTests<clblast::TestXasum<double2>, double2, double2>(argc, argv, true, "DzASUM");
- return 0;
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXdot<float>, float, float>(argc, argv, false, "SDOT");
+ errors += clblast::RunTests<clblast::TestXdot<double>, double, double>(argc, argv, true, "DDOT");
+ errors += clblast::RunTests<clblast::TestXdot<half>, half, half>(argc, argv, true, "HDOT");
+ if (errors > 0) { return 1; } else { return 0; }
}
// =================================================================================================
diff --git a/test/correctness/routines/level1/xdotc.cpp b/test/correctness/routines/level1/xdotc.cpp
new file mode 100644
index 00000000..2a7bbeca
--- /dev/null
+++ b/test/correctness/routines/level1/xdotc.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xdotc.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXdotc<float2>, float2, float2>(argc, argv, false, "CDOTC");
+ errors += clblast::RunTests<clblast::TestXdotc<double2>, double2, double2>(argc, argv, true, "ZDOTC");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level1/xdotu.cpp b/test/correctness/routines/level1/xdotu.cpp
new file mode 100644
index 00000000..1047d021
--- /dev/null
+++ b/test/correctness/routines/level1/xdotu.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xdotu.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXdotu<float2>, float2, float2>(argc, argv, false, "CDOTU");
+ errors += clblast::RunTests<clblast::TestXdotu<double2>, double2, double2>(argc, argv, true, "ZDOTU");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level1/xnrm2.cc b/test/correctness/routines/level1/xnrm2.cc
deleted file mode 100644
index 97fb0ad6..00000000
--- a/test/correctness/routines/level1/xnrm2.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level1/xnrm2.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXnrm2<float>, float, float>(argc, argv, false, "SNRM2");
- clblast::RunTests<clblast::TestXnrm2<double>, double, double>(argc, argv, true, "DNRM2");
- clblast::RunTests<clblast::TestXnrm2<float2>, float2, float2>(argc, argv, true, "ScNRM2");
- clblast::RunTests<clblast::TestXnrm2<double2>, double2, double2>(argc, argv, true, "DzNRM2");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level1/xnrm2.cpp b/test/correctness/routines/level1/xnrm2.cpp
new file mode 100644
index 00000000..142fa7ba
--- /dev/null
+++ b/test/correctness/routines/level1/xnrm2.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xnrm2.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXnrm2<float>, float, float>(argc, argv, false, "SNRM2");
+ errors += clblast::RunTests<clblast::TestXnrm2<double>, double, double>(argc, argv, true, "DNRM2");
+ errors += clblast::RunTests<clblast::TestXnrm2<float2>, float2, float2>(argc, argv, true, "ScNRM2");
+ errors += clblast::RunTests<clblast::TestXnrm2<double2>, double2, double2>(argc, argv, true, "DzNRM2");
+ errors += clblast::RunTests<clblast::TestXnrm2<half>, half, half>(argc, argv, true, "HNRM2");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level1/xdotc.cc b/test/correctness/routines/level1/xrot.cpp
index 76aaa0ec..5af358eb 100644
--- a/test/correctness/routines/level1/xdotc.cc
+++ b/test/correctness/routines/level1/xrot.cpp
@@ -9,8 +9,8 @@
//
// =================================================================================================
-#include "correctness/testblas.h"
-#include "routines/level1/xdotc.h"
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xrot.hpp"
// Shortcuts to the clblast namespace
using float2 = clblast::float2;
@@ -18,9 +18,10 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXdotc<float2>, float2, float2>(argc, argv, false, "CDOTC");
- clblast::RunTests<clblast::TestXdotc<double2>, double2, double2>(argc, argv, true, "ZDOTC");
- return 0;
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXrot<float>, float, float>(argc, argv, false, "SROT");
+ errors += clblast::RunTests<clblast::TestXrot<double>, double, double>(argc, argv, true, "DROT");
+ if (errors > 0) { return 1; } else { return 0; }
}
// =================================================================================================
diff --git a/test/correctness/routines/level1/xrotg.cc b/test/correctness/routines/level1/xrotg.cc
deleted file mode 100644
index dd068992..00000000
--- a/test/correctness/routines/level1/xrotg.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level1/xrotg.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXrotg<float>, float, float>(argc, argv, false, "SROTG");
- clblast::RunTests<clblast::TestXrotg<double>, double, double>(argc, argv, true, "DROTG");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level1/xdot.cc b/test/correctness/routines/level1/xrotg.cpp
index 5ea105e0..ad23a554 100644
--- a/test/correctness/routines/level1/xdot.cc
+++ b/test/correctness/routines/level1/xrotg.cpp
@@ -9,8 +9,8 @@
//
// =================================================================================================
-#include "correctness/testblas.h"
-#include "routines/level1/xdot.h"
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xrotg.hpp"
// Shortcuts to the clblast namespace
using float2 = clblast::float2;
@@ -18,9 +18,10 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXdot<float>, float, float>(argc, argv, false, "SDOT");
- clblast::RunTests<clblast::TestXdot<double>, double, double>(argc, argv, true, "DDOT");
- return 0;
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXrotg<float>, float, float>(argc, argv, false, "SROTG");
+ errors += clblast::RunTests<clblast::TestXrotg<double>, double, double>(argc, argv, true, "DROTG");
+ if (errors > 0) { return 1; } else { return 0; }
}
// =================================================================================================
diff --git a/test/correctness/routines/level1/xrotm.cc b/test/correctness/routines/level1/xrotm.cc
deleted file mode 100644
index 869056ef..00000000
--- a/test/correctness/routines/level1/xrotm.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level1/xrotm.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXrotm<float>, float, float>(argc, argv, false, "SROTM");
- clblast::RunTests<clblast::TestXrotm<double>, double, double>(argc, argv, true, "DROTM");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level1/xdotu.cc b/test/correctness/routines/level1/xrotm.cpp
index aecde4f5..4f7e8f15 100644
--- a/test/correctness/routines/level1/xdotu.cc
+++ b/test/correctness/routines/level1/xrotm.cpp
@@ -9,8 +9,8 @@
//
// =================================================================================================
-#include "correctness/testblas.h"
-#include "routines/level1/xdotu.h"
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xrotm.hpp"
// Shortcuts to the clblast namespace
using float2 = clblast::float2;
@@ -18,9 +18,10 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXdotu<float2>, float2, float2>(argc, argv, false, "CDOTU");
- clblast::RunTests<clblast::TestXdotu<double2>, double2, double2>(argc, argv, true, "ZDOTU");
- return 0;
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXrotm<float>, float, float>(argc, argv, false, "SROTM");
+ errors += clblast::RunTests<clblast::TestXrotm<double>, double, double>(argc, argv, true, "DROTM");
+ if (errors > 0) { return 1; } else { return 0; }
}
// =================================================================================================
diff --git a/test/correctness/routines/level1/xrotmg.cc b/test/correctness/routines/level1/xrotmg.cc
deleted file mode 100644
index 29f8b0e1..00000000
--- a/test/correctness/routines/level1/xrotmg.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level1/xrotmg.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXrotmg<float>, float, float>(argc, argv, false, "SROTMG");
- clblast::RunTests<clblast::TestXrotmg<double>, double, double>(argc, argv, true, "DROTMG");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level1/xrot.cc b/test/correctness/routines/level1/xrotmg.cpp
index 4020ff13..ca89bc12 100644
--- a/test/correctness/routines/level1/xrot.cc
+++ b/test/correctness/routines/level1/xrotmg.cpp
@@ -9,8 +9,8 @@
//
// =================================================================================================
-#include "correctness/testblas.h"
-#include "routines/level1/xrot.h"
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xrotmg.hpp"
// Shortcuts to the clblast namespace
using float2 = clblast::float2;
@@ -18,9 +18,10 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXrot<float>, float, float>(argc, argv, false, "SROT");
- clblast::RunTests<clblast::TestXrot<double>, double, double>(argc, argv, true, "DROT");
- return 0;
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXrotmg<float>, float, float>(argc, argv, false, "SROTMG");
+ errors += clblast::RunTests<clblast::TestXrotmg<double>, double, double>(argc, argv, true, "DROTMG");
+ if (errors > 0) { return 1; } else { return 0; }
}
// =================================================================================================
diff --git a/test/correctness/routines/level1/xscal.cc b/test/correctness/routines/level1/xscal.cc
deleted file mode 100644
index 4d138fad..00000000
--- a/test/correctness/routines/level1/xscal.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level1/xscal.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXscal<float>, float, float>(argc, argv, false, "SSCAL");
- clblast::RunTests<clblast::TestXscal<double>, double, double>(argc, argv, true, "DSCAL");
- clblast::RunTests<clblast::TestXscal<float2>, float2, float2>(argc, argv, true, "CSCAL");
- clblast::RunTests<clblast::TestXscal<double2>, double2, double2>(argc, argv, true, "ZSCAL");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level1/xscal.cpp b/test/correctness/routines/level1/xscal.cpp
new file mode 100644
index 00000000..939524be
--- /dev/null
+++ b/test/correctness/routines/level1/xscal.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xscal.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXscal<float>, float, float>(argc, argv, false, "SSCAL");
+ errors += clblast::RunTests<clblast::TestXscal<double>, double, double>(argc, argv, true, "DSCAL");
+ errors += clblast::RunTests<clblast::TestXscal<float2>, float2, float2>(argc, argv, true, "CSCAL");
+ errors += clblast::RunTests<clblast::TestXscal<double2>, double2, double2>(argc, argv, true, "ZSCAL");
+ errors += clblast::RunTests<clblast::TestXscal<half>, half, half>(argc, argv, true, "HSCAL");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level1/xswap.cc b/test/correctness/routines/level1/xswap.cc
deleted file mode 100644
index 38f110f7..00000000
--- a/test/correctness/routines/level1/xswap.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level1/xswap.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXswap<float>, float, float>(argc, argv, false, "SSWAP");
- clblast::RunTests<clblast::TestXswap<double>, double, double>(argc, argv, true, "DSWAP");
- clblast::RunTests<clblast::TestXswap<float2>, float2, float2>(argc, argv, true, "CSWAP");
- clblast::RunTests<clblast::TestXswap<double2>, double2, double2>(argc, argv, true, "ZSWAP");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level1/xswap.cpp b/test/correctness/routines/level1/xswap.cpp
new file mode 100644
index 00000000..446f3d65
--- /dev/null
+++ b/test/correctness/routines/level1/xswap.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level1/xswap.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXswap<float>, float, float>(argc, argv, false, "SSWAP");
+ errors += clblast::RunTests<clblast::TestXswap<double>, double, double>(argc, argv, true, "DSWAP");
+ errors += clblast::RunTests<clblast::TestXswap<float2>, float2, float2>(argc, argv, true, "CSWAP");
+ errors += clblast::RunTests<clblast::TestXswap<double2>, double2, double2>(argc, argv, true, "ZSWAP");
+ errors += clblast::RunTests<clblast::TestXswap<half>, half, half>(argc, argv, true, "HSWAP");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xgbmv.cc b/test/correctness/routines/level2/xgbmv.cc
deleted file mode 100644
index b28c5978..00000000
--- a/test/correctness/routines/level2/xgbmv.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xgbmv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXgbmv<float>, float, float>(argc, argv, false, "SGBMV");
- clblast::RunTests<clblast::TestXgbmv<double>, double, double>(argc, argv, true, "DGBMV");
- clblast::RunTests<clblast::TestXgbmv<float2>, float2, float2>(argc, argv, true, "CGBMV");
- clblast::RunTests<clblast::TestXgbmv<double2>, double2, double2>(argc, argv, true, "ZGBMV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xgbmv.cpp b/test/correctness/routines/level2/xgbmv.cpp
new file mode 100644
index 00000000..8c49bc65
--- /dev/null
+++ b/test/correctness/routines/level2/xgbmv.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xgbmv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXgbmv<float>, float, float>(argc, argv, false, "SGBMV");
+ errors += clblast::RunTests<clblast::TestXgbmv<double>, double, double>(argc, argv, true, "DGBMV");
+ errors += clblast::RunTests<clblast::TestXgbmv<float2>, float2, float2>(argc, argv, true, "CGBMV");
+ errors += clblast::RunTests<clblast::TestXgbmv<double2>, double2, double2>(argc, argv, true, "ZGBMV");
+ errors += clblast::RunTests<clblast::TestXgbmv<half>, half, half>(argc, argv, true, "HGBMV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xgemv.cc b/test/correctness/routines/level2/xgemv.cc
deleted file mode 100644
index 14eb74d1..00000000
--- a/test/correctness/routines/level2/xgemv.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xgemv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXgemv<float>, float, float>(argc, argv, false, "SGEMV");
- clblast::RunTests<clblast::TestXgemv<double>, double, double>(argc, argv, true, "DGEMV");
- clblast::RunTests<clblast::TestXgemv<float2>, float2, float2>(argc, argv, true, "CGEMV");
- clblast::RunTests<clblast::TestXgemv<double2>, double2, double2>(argc, argv, true, "ZGEMV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xgemv.cpp b/test/correctness/routines/level2/xgemv.cpp
new file mode 100644
index 00000000..902ae777
--- /dev/null
+++ b/test/correctness/routines/level2/xgemv.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xgemv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXgemv<float>, float, float>(argc, argv, false, "SGEMV");
+ errors += clblast::RunTests<clblast::TestXgemv<double>, double, double>(argc, argv, true, "DGEMV");
+ errors += clblast::RunTests<clblast::TestXgemv<float2>, float2, float2>(argc, argv, true, "CGEMV");
+ errors += clblast::RunTests<clblast::TestXgemv<double2>, double2, double2>(argc, argv, true, "ZGEMV");
+ errors += clblast::RunTests<clblast::TestXgemv<half>, half, half>(argc, argv, true, "HGEMV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xger.cc b/test/correctness/routines/level2/xger.cc
deleted file mode 100644
index c37a5c41..00000000
--- a/test/correctness/routines/level2/xger.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xger.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXger<float>, float, float>(argc, argv, false, "SGER");
- clblast::RunTests<clblast::TestXger<double>, double, double>(argc, argv, true, "DGER");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level1/xaxpy.cc b/test/correctness/routines/level2/xger.cpp
index 746e0001..ce61bbcb 100644
--- a/test/correctness/routines/level1/xaxpy.cc
+++ b/test/correctness/routines/level2/xger.cpp
@@ -9,8 +9,8 @@
//
// =================================================================================================
-#include "correctness/testblas.h"
-#include "routines/level1/xaxpy.h"
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xger.hpp"
// Shortcuts to the clblast namespace
using float2 = clblast::float2;
@@ -18,11 +18,11 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXaxpy<float>, float, float>(argc, argv, false, "SAXPY");
- clblast::RunTests<clblast::TestXaxpy<double>, double, double>(argc, argv, true, "DAXPY");
- clblast::RunTests<clblast::TestXaxpy<float2>, float2, float2>(argc, argv, true, "CAXPY");
- clblast::RunTests<clblast::TestXaxpy<double2>, double2, double2>(argc, argv, true, "ZAXPY");
- return 0;
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXger<float>, float, float>(argc, argv, false, "SGER");
+ errors += clblast::RunTests<clblast::TestXger<double>, double, double>(argc, argv, true, "DGER");
+ errors += clblast::RunTests<clblast::TestXger<half>, half, half>(argc, argv, true, "HGER");
+ if (errors > 0) { return 1; } else { return 0; }
}
// =================================================================================================
diff --git a/test/correctness/routines/level2/xgerc.cc b/test/correctness/routines/level2/xgerc.cc
deleted file mode 100644
index 8fd31142..00000000
--- a/test/correctness/routines/level2/xgerc.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xgerc.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXgerc<float2>, float2, float2>(argc, argv, false, "CGERC");
- clblast::RunTests<clblast::TestXgerc<double2>, double2, double2>(argc, argv, true, "ZGERC");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xgerc.cpp b/test/correctness/routines/level2/xgerc.cpp
new file mode 100644
index 00000000..b747f20d
--- /dev/null
+++ b/test/correctness/routines/level2/xgerc.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xgerc.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXgerc<float2>, float2, float2>(argc, argv, false, "CGERC");
+ errors += clblast::RunTests<clblast::TestXgerc<double2>, double2, double2>(argc, argv, true, "ZGERC");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xgeru.cc b/test/correctness/routines/level2/xgeru.cc
deleted file mode 100644
index ee92416b..00000000
--- a/test/correctness/routines/level2/xgeru.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xgeru.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXgeru<float2>, float2, float2>(argc, argv, false, "CGERU");
- clblast::RunTests<clblast::TestXgeru<double2>, double2, double2>(argc, argv, true, "ZGERU");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xgeru.cpp b/test/correctness/routines/level2/xgeru.cpp
new file mode 100644
index 00000000..f80c1e2b
--- /dev/null
+++ b/test/correctness/routines/level2/xgeru.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xgeru.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXgeru<float2>, float2, float2>(argc, argv, false, "CGERU");
+ errors += clblast::RunTests<clblast::TestXgeru<double2>, double2, double2>(argc, argv, true, "ZGERU");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xhbmv.cc b/test/correctness/routines/level2/xhbmv.cc
deleted file mode 100644
index 4cd137a7..00000000
--- a/test/correctness/routines/level2/xhbmv.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xhbmv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXhbmv<float2>, float2, float2>(argc, argv, false, "CHBMV");
- clblast::RunTests<clblast::TestXhbmv<double2>, double2, double2>(argc, argv, true, "ZHBMV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xhbmv.cpp b/test/correctness/routines/level2/xhbmv.cpp
new file mode 100644
index 00000000..a4885c01
--- /dev/null
+++ b/test/correctness/routines/level2/xhbmv.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xhbmv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXhbmv<float2>, float2, float2>(argc, argv, false, "CHBMV");
+ errors += clblast::RunTests<clblast::TestXhbmv<double2>, double2, double2>(argc, argv, true, "ZHBMV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xhemv.cc b/test/correctness/routines/level2/xhemv.cc
deleted file mode 100644
index 20c5370c..00000000
--- a/test/correctness/routines/level2/xhemv.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xhemv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXhemv<float2>, float2, float2>(argc, argv, false, "CHEMV");
- clblast::RunTests<clblast::TestXhemv<double2>, double2, double2>(argc, argv, true, "ZHEMV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xhemv.cpp b/test/correctness/routines/level2/xhemv.cpp
new file mode 100644
index 00000000..4318ffee
--- /dev/null
+++ b/test/correctness/routines/level2/xhemv.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xhemv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXhemv<float2>, float2, float2>(argc, argv, false, "CHEMV");
+ errors += clblast::RunTests<clblast::TestXhemv<double2>, double2, double2>(argc, argv, true, "ZHEMV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xher.cc b/test/correctness/routines/level2/xher.cc
deleted file mode 100644
index 5b9b48be..00000000
--- a/test/correctness/routines/level2/xher.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xher.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXher<float2,float>, float2, float>(argc, argv, false, "CHER");
- clblast::RunTests<clblast::TestXher<double2,double>, double2, double>(argc, argv, true, "ZHER");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xher.cpp b/test/correctness/routines/level2/xher.cpp
new file mode 100644
index 00000000..fe37bd76
--- /dev/null
+++ b/test/correctness/routines/level2/xher.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xher.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXher<float2,float>, float2, float>(argc, argv, false, "CHER");
+ errors += clblast::RunTests<clblast::TestXher<double2,double>, double2, double>(argc, argv, true, "ZHER");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xher2.cc b/test/correctness/routines/level2/xher2.cc
deleted file mode 100644
index 093b3959..00000000
--- a/test/correctness/routines/level2/xher2.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xher2.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXher2<float2>, float2, float2>(argc, argv, false, "CHER2");
- clblast::RunTests<clblast::TestXher2<double2>, double2, double2>(argc, argv, true, "ZHER2");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xher2.cpp b/test/correctness/routines/level2/xher2.cpp
new file mode 100644
index 00000000..0b4af4d0
--- /dev/null
+++ b/test/correctness/routines/level2/xher2.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xher2.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXher2<float2>, float2, float2>(argc, argv, false, "CHER2");
+ errors += clblast::RunTests<clblast::TestXher2<double2>, double2, double2>(argc, argv, true, "ZHER2");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xhpmv.cc b/test/correctness/routines/level2/xhpmv.cc
deleted file mode 100644
index cbf41443..00000000
--- a/test/correctness/routines/level2/xhpmv.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xhpmv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXhpmv<float2>, float2, float2>(argc, argv, false, "CHPMV");
- clblast::RunTests<clblast::TestXhpmv<double2>, double2, double2>(argc, argv, true, "ZHPMV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xhpmv.cpp b/test/correctness/routines/level2/xhpmv.cpp
new file mode 100644
index 00000000..dd77df71
--- /dev/null
+++ b/test/correctness/routines/level2/xhpmv.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xhpmv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXhpmv<float2>, float2, float2>(argc, argv, false, "CHPMV");
+ errors += clblast::RunTests<clblast::TestXhpmv<double2>, double2, double2>(argc, argv, true, "ZHPMV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xhpr.cc b/test/correctness/routines/level2/xhpr.cc
deleted file mode 100644
index a720aaef..00000000
--- a/test/correctness/routines/level2/xhpr.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xhpr.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXhpr<float2,float>, float2, float>(argc, argv, false, "CHPR");
- clblast::RunTests<clblast::TestXhpr<double2,double>, double2, double>(argc, argv, true, "ZHPR");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xhpr.cpp b/test/correctness/routines/level2/xhpr.cpp
new file mode 100644
index 00000000..5a3f615f
--- /dev/null
+++ b/test/correctness/routines/level2/xhpr.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xhpr.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXhpr<float2,float>, float2, float>(argc, argv, false, "CHPR");
+ errors += clblast::RunTests<clblast::TestXhpr<double2,double>, double2, double>(argc, argv, true, "ZHPR");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xhpr2.cc b/test/correctness/routines/level2/xhpr2.cc
deleted file mode 100644
index 0fed97e1..00000000
--- a/test/correctness/routines/level2/xhpr2.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xhpr2.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXhpr2<float2>, float2, float2>(argc, argv, false, "CHPR2");
- clblast::RunTests<clblast::TestXhpr2<double2>, double2, double2>(argc, argv, true, "ZHPR2");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xhpr2.cpp b/test/correctness/routines/level2/xhpr2.cpp
new file mode 100644
index 00000000..8218b444
--- /dev/null
+++ b/test/correctness/routines/level2/xhpr2.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xhpr2.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXhpr2<float2>, float2, float2>(argc, argv, false, "CHPR2");
+ errors += clblast::RunTests<clblast::TestXhpr2<double2>, double2, double2>(argc, argv, true, "ZHPR2");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xsbmv.cc b/test/correctness/routines/level2/xsbmv.cc
deleted file mode 100644
index 212e2c3a..00000000
--- a/test/correctness/routines/level2/xsbmv.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xsbmv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXsbmv<float>, float, float>(argc, argv, false, "SSBMV");
- clblast::RunTests<clblast::TestXsbmv<double>, double, double>(argc, argv, true, "DSBMV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level1/xamax.cc b/test/correctness/routines/level2/xsbmv.cpp
index ade09e7a..7918cb21 100644
--- a/test/correctness/routines/level1/xamax.cc
+++ b/test/correctness/routines/level2/xsbmv.cpp
@@ -9,8 +9,8 @@
//
// =================================================================================================
-#include "correctness/testblas.h"
-#include "routines/level1/xamax.h"
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xsbmv.hpp"
// Shortcuts to the clblast namespace
using float2 = clblast::float2;
@@ -18,11 +18,11 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXamax<float>, float, float>(argc, argv, false, "iSAMAX");
- clblast::RunTests<clblast::TestXamax<double>, double, double>(argc, argv, true, "iDAMAX");
- clblast::RunTests<clblast::TestXamax<float2>, float2, float2>(argc, argv, true, "iCAMAX");
- clblast::RunTests<clblast::TestXamax<double2>, double2, double2>(argc, argv, true, "iZAMAX");
- return 0;
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXsbmv<float>, float, float>(argc, argv, false, "SSBMV");
+ errors += clblast::RunTests<clblast::TestXsbmv<double>, double, double>(argc, argv, true, "DSBMV");
+ errors += clblast::RunTests<clblast::TestXsbmv<half>, half, half>(argc, argv, true, "HSBMV");
+ if (errors > 0) { return 1; } else { return 0; }
}
// =================================================================================================
diff --git a/test/correctness/routines/level2/xspmv.cc b/test/correctness/routines/level2/xspmv.cc
deleted file mode 100644
index dc833024..00000000
--- a/test/correctness/routines/level2/xspmv.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xspmv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXspmv<float>, float, float>(argc, argv, false, "SSPMV");
- clblast::RunTests<clblast::TestXspmv<double>, double, double>(argc, argv, true, "DSPMV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xspmv.cpp b/test/correctness/routines/level2/xspmv.cpp
new file mode 100644
index 00000000..78210660
--- /dev/null
+++ b/test/correctness/routines/level2/xspmv.cpp
@@ -0,0 +1,28 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xspmv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXspmv<float>, float, float>(argc, argv, false, "SSPMV");
+ errors += clblast::RunTests<clblast::TestXspmv<double>, double, double>(argc, argv, true, "DSPMV");
+ errors += clblast::RunTests<clblast::TestXspmv<half>, half, half>(argc, argv, true, "HSPMV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xspr.cc b/test/correctness/routines/level2/xspr.cc
deleted file mode 100644
index a0104dd4..00000000
--- a/test/correctness/routines/level2/xspr.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xspr.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXspr<float>, float, float>(argc, argv, false, "SSPR");
- clblast::RunTests<clblast::TestXspr<double>, double, double>(argc, argv, true, "DSPR");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level1/xcopy.cc b/test/correctness/routines/level2/xspr.cpp
index 3e16ffc6..d05adf34 100644
--- a/test/correctness/routines/level1/xcopy.cc
+++ b/test/correctness/routines/level2/xspr.cpp
@@ -9,8 +9,8 @@
//
// =================================================================================================
-#include "correctness/testblas.h"
-#include "routines/level1/xcopy.h"
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xspr.hpp"
// Shortcuts to the clblast namespace
using float2 = clblast::float2;
@@ -18,11 +18,11 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXcopy<float>, float, float>(argc, argv, false, "SCOPY");
- clblast::RunTests<clblast::TestXcopy<double>, double, double>(argc, argv, true, "DCOPY");
- clblast::RunTests<clblast::TestXcopy<float2>, float2, float2>(argc, argv, true, "CCOPY");
- clblast::RunTests<clblast::TestXcopy<double2>, double2, double2>(argc, argv, true, "ZCOPY");
- return 0;
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXspr<float>, float, float>(argc, argv, false, "SSPR");
+ errors += clblast::RunTests<clblast::TestXspr<double>, double, double>(argc, argv, true, "DSPR");
+ errors += clblast::RunTests<clblast::TestXspr<half>, half, half>(argc, argv, true, "HSPR");
+ if (errors > 0) { return 1; } else { return 0; }
}
// =================================================================================================
diff --git a/test/correctness/routines/level2/xspr2.cc b/test/correctness/routines/level2/xspr2.cc
deleted file mode 100644
index 5fe5827f..00000000
--- a/test/correctness/routines/level2/xspr2.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xspr2.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXspr2<float>, float, float>(argc, argv, false, "SSPR2");
- clblast::RunTests<clblast::TestXspr2<double>, double, double>(argc, argv, true, "DSPR2");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xspr2.cpp b/test/correctness/routines/level2/xspr2.cpp
new file mode 100644
index 00000000..caa46a09
--- /dev/null
+++ b/test/correctness/routines/level2/xspr2.cpp
@@ -0,0 +1,28 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xspr2.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXspr2<float>, float, float>(argc, argv, false, "SSPR2");
+ errors += clblast::RunTests<clblast::TestXspr2<double>, double, double>(argc, argv, true, "DSPR2");
+ errors += clblast::RunTests<clblast::TestXspr2<half>, half, half>(argc, argv, true, "HSPR2");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xsymv.cc b/test/correctness/routines/level2/xsymv.cc
deleted file mode 100644
index 6224739f..00000000
--- a/test/correctness/routines/level2/xsymv.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xsymv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXsymv<float>, float, float>(argc, argv, false, "SSYMV");
- clblast::RunTests<clblast::TestXsymv<double>, double, double>(argc, argv, true, "DSYMV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xsymv.cpp b/test/correctness/routines/level2/xsymv.cpp
new file mode 100644
index 00000000..978a5f8a
--- /dev/null
+++ b/test/correctness/routines/level2/xsymv.cpp
@@ -0,0 +1,28 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xsymv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXsymv<float>, float, float>(argc, argv, false, "SSYMV");
+ errors += clblast::RunTests<clblast::TestXsymv<double>, double, double>(argc, argv, true, "DSYMV");
+ errors += clblast::RunTests<clblast::TestXsymv<half>, half, half>(argc, argv, true, "HSYMV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xsyr.cc b/test/correctness/routines/level2/xsyr.cc
deleted file mode 100644
index a47b918f..00000000
--- a/test/correctness/routines/level2/xsyr.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xsyr.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXsyr<float>, float, float>(argc, argv, false, "SSYR");
- clblast::RunTests<clblast::TestXsyr<double>, double, double>(argc, argv, true, "DSYR");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xsyr.cpp b/test/correctness/routines/level2/xsyr.cpp
new file mode 100644
index 00000000..244dbfb4
--- /dev/null
+++ b/test/correctness/routines/level2/xsyr.cpp
@@ -0,0 +1,28 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xsyr.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXsyr<float>, float, float>(argc, argv, false, "SSYR");
+ errors += clblast::RunTests<clblast::TestXsyr<double>, double, double>(argc, argv, true, "DSYR");
+ errors += clblast::RunTests<clblast::TestXsyr<half>, half, half>(argc, argv, true, "HSYR");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xsyr2.cc b/test/correctness/routines/level2/xsyr2.cc
deleted file mode 100644
index 1743632c..00000000
--- a/test/correctness/routines/level2/xsyr2.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xsyr2.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXsyr2<float>, float, float>(argc, argv, false, "SSYR2");
- clblast::RunTests<clblast::TestXsyr2<double>, double, double>(argc, argv, true, "DSYR2");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xsyr2.cpp b/test/correctness/routines/level2/xsyr2.cpp
new file mode 100644
index 00000000..422e67ad
--- /dev/null
+++ b/test/correctness/routines/level2/xsyr2.cpp
@@ -0,0 +1,28 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xsyr2.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXsyr2<float>, float, float>(argc, argv, false, "SSYR2");
+ errors += clblast::RunTests<clblast::TestXsyr2<double>, double, double>(argc, argv, true, "DSYR2");
+ errors += clblast::RunTests<clblast::TestXsyr2<half>, half, half>(argc, argv, true, "HSYR2");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xtbmv.cc b/test/correctness/routines/level2/xtbmv.cc
deleted file mode 100644
index d3bbbade..00000000
--- a/test/correctness/routines/level2/xtbmv.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xtbmv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXtbmv<float>, float, float>(argc, argv, false, "STBMV");
- clblast::RunTests<clblast::TestXtbmv<double>, double, double>(argc, argv, true, "DTBMV");
- clblast::RunTests<clblast::TestXtbmv<float2>, float2, float2>(argc, argv, true, "CTBMV");
- clblast::RunTests<clblast::TestXtbmv<double2>, double2, double2>(argc, argv, true, "ZTBMV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xtbmv.cpp b/test/correctness/routines/level2/xtbmv.cpp
new file mode 100644
index 00000000..491708ec
--- /dev/null
+++ b/test/correctness/routines/level2/xtbmv.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xtbmv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXtbmv<float>, float, float>(argc, argv, false, "STBMV");
+ errors += clblast::RunTests<clblast::TestXtbmv<double>, double, double>(argc, argv, true, "DTBMV");
+ errors += clblast::RunTests<clblast::TestXtbmv<float2>, float2, float2>(argc, argv, true, "CTBMV");
+ errors += clblast::RunTests<clblast::TestXtbmv<double2>, double2, double2>(argc, argv, true, "ZTBMV");
+ errors += clblast::RunTests<clblast::TestXtbmv<half>, half, half>(argc, argv, true, "HTBMV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xtbsv.cc b/test/correctness/routines/level2/xtbsv.cc
deleted file mode 100644
index c8a8a583..00000000
--- a/test/correctness/routines/level2/xtbsv.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xtbsv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXtbsv<float>, float, float>(argc, argv, false, "STBSV");
- clblast::RunTests<clblast::TestXtbsv<double>, double, double>(argc, argv, true, "DTBSV");
- clblast::RunTests<clblast::TestXtbsv<float2>, float2, float2>(argc, argv, true, "CTBSV");
- clblast::RunTests<clblast::TestXtbsv<double2>, double2, double2>(argc, argv, true, "ZTBSV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xtbsv.cpp b/test/correctness/routines/level2/xtbsv.cpp
new file mode 100644
index 00000000..12b5dca5
--- /dev/null
+++ b/test/correctness/routines/level2/xtbsv.cpp
@@ -0,0 +1,29 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xtbsv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXtbsv<float>, float, float>(argc, argv, false, "STBSV");
+ errors += clblast::RunTests<clblast::TestXtbsv<double>, double, double>(argc, argv, true, "DTBSV");
+ errors += clblast::RunTests<clblast::TestXtbsv<float2>, float2, float2>(argc, argv, true, "CTBSV");
+ errors += clblast::RunTests<clblast::TestXtbsv<double2>, double2, double2>(argc, argv, true, "ZTBSV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xtpmv.cc b/test/correctness/routines/level2/xtpmv.cc
deleted file mode 100644
index 95489a65..00000000
--- a/test/correctness/routines/level2/xtpmv.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xtpmv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXtpmv<float>, float, float>(argc, argv, false, "STPMV");
- clblast::RunTests<clblast::TestXtpmv<double>, double, double>(argc, argv, true, "DTPMV");
- clblast::RunTests<clblast::TestXtpmv<float2>, float2, float2>(argc, argv, true, "CTPMV");
- clblast::RunTests<clblast::TestXtpmv<double2>, double2, double2>(argc, argv, true, "ZTPMV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xtpmv.cpp b/test/correctness/routines/level2/xtpmv.cpp
new file mode 100644
index 00000000..b89f0adc
--- /dev/null
+++ b/test/correctness/routines/level2/xtpmv.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xtpmv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXtpmv<float>, float, float>(argc, argv, false, "STPMV");
+ errors += clblast::RunTests<clblast::TestXtpmv<double>, double, double>(argc, argv, true, "DTPMV");
+ errors += clblast::RunTests<clblast::TestXtpmv<float2>, float2, float2>(argc, argv, true, "CTPMV");
+ errors += clblast::RunTests<clblast::TestXtpmv<double2>, double2, double2>(argc, argv, true, "ZTPMV");
+ errors += clblast::RunTests<clblast::TestXtpmv<half>, half, half>(argc, argv, true, "HTPMV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xtpsv.cc b/test/correctness/routines/level2/xtpsv.cc
deleted file mode 100644
index 97d27271..00000000
--- a/test/correctness/routines/level2/xtpsv.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xtpsv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXtpsv<float>, float, float>(argc, argv, false, "STPSV");
- clblast::RunTests<clblast::TestXtpsv<double>, double, double>(argc, argv, true, "DTPSV");
- clblast::RunTests<clblast::TestXtpsv<float2>, float2, float2>(argc, argv, true, "CTPSV");
- clblast::RunTests<clblast::TestXtpsv<double2>, double2, double2>(argc, argv, true, "ZTPSV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xtpsv.cpp b/test/correctness/routines/level2/xtpsv.cpp
new file mode 100644
index 00000000..6e6e7c85
--- /dev/null
+++ b/test/correctness/routines/level2/xtpsv.cpp
@@ -0,0 +1,29 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xtpsv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXtpsv<float>, float, float>(argc, argv, false, "STPSV");
+ errors += clblast::RunTests<clblast::TestXtpsv<double>, double, double>(argc, argv, true, "DTPSV");
+ errors += clblast::RunTests<clblast::TestXtpsv<float2>, float2, float2>(argc, argv, true, "CTPSV");
+ errors += clblast::RunTests<clblast::TestXtpsv<double2>, double2, double2>(argc, argv, true, "ZTPSV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xtrmv.cc b/test/correctness/routines/level2/xtrmv.cc
deleted file mode 100644
index ca50af88..00000000
--- a/test/correctness/routines/level2/xtrmv.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xtrmv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXtrmv<float>, float, float>(argc, argv, false, "STRMV");
- clblast::RunTests<clblast::TestXtrmv<double>, double, double>(argc, argv, true, "DTRMV");
- clblast::RunTests<clblast::TestXtrmv<float2>, float2, float2>(argc, argv, true, "CTRMV");
- clblast::RunTests<clblast::TestXtrmv<double2>, double2, double2>(argc, argv, true, "ZTRMV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xtrmv.cpp b/test/correctness/routines/level2/xtrmv.cpp
new file mode 100644
index 00000000..819f5cad
--- /dev/null
+++ b/test/correctness/routines/level2/xtrmv.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xtrmv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXtrmv<float>, float, float>(argc, argv, false, "STRMV");
+ errors += clblast::RunTests<clblast::TestXtrmv<double>, double, double>(argc, argv, true, "DTRMV");
+ errors += clblast::RunTests<clblast::TestXtrmv<float2>, float2, float2>(argc, argv, true, "CTRMV");
+ errors += clblast::RunTests<clblast::TestXtrmv<double2>, double2, double2>(argc, argv, true, "ZTRMV");
+ errors += clblast::RunTests<clblast::TestXtrmv<half>, half, half>(argc, argv, true, "HTRMV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level2/xtrsv.cc b/test/correctness/routines/level2/xtrsv.cc
deleted file mode 100644
index bfca0f20..00000000
--- a/test/correctness/routines/level2/xtrsv.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level2/xtrsv.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXtrsv<float>, float, float>(argc, argv, false, "STRSV");
- clblast::RunTests<clblast::TestXtrsv<double>, double, double>(argc, argv, true, "DTRSV");
- clblast::RunTests<clblast::TestXtrsv<float2>, float2, float2>(argc, argv, true, "CTRSV");
- clblast::RunTests<clblast::TestXtrsv<double2>, double2, double2>(argc, argv, true, "ZTRSV");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level2/xtrsv.cpp b/test/correctness/routines/level2/xtrsv.cpp
new file mode 100644
index 00000000..78e33807
--- /dev/null
+++ b/test/correctness/routines/level2/xtrsv.cpp
@@ -0,0 +1,29 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level2/xtrsv.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXtrsv<float>, float, float>(argc, argv, false, "STRSV");
+ errors += clblast::RunTests<clblast::TestXtrsv<double>, double, double>(argc, argv, true, "DTRSV");
+ errors += clblast::RunTests<clblast::TestXtrsv<float2>, float2, float2>(argc, argv, true, "CTRSV");
+ errors += clblast::RunTests<clblast::TestXtrsv<double2>, double2, double2>(argc, argv, true, "ZTRSV");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level3/xgemm.cc b/test/correctness/routines/level3/xgemm.cc
deleted file mode 100644
index 632724ed..00000000
--- a/test/correctness/routines/level3/xgemm.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level3/xgemm.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXgemm<float>, float, float>(argc, argv, false, "SGEMM");
- clblast::RunTests<clblast::TestXgemm<double>, double, double>(argc, argv, true, "DGEMM");
- clblast::RunTests<clblast::TestXgemm<float2>, float2, float2>(argc, argv, true, "CGEMM");
- clblast::RunTests<clblast::TestXgemm<double2>, double2, double2>(argc, argv, true, "ZGEMM");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level3/xgemm.cpp b/test/correctness/routines/level3/xgemm.cpp
new file mode 100644
index 00000000..54d41719
--- /dev/null
+++ b/test/correctness/routines/level3/xgemm.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level3/xgemm.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXgemm<float>, float, float>(argc, argv, false, "SGEMM");
+ errors += clblast::RunTests<clblast::TestXgemm<double>, double, double>(argc, argv, true, "DGEMM");
+ errors += clblast::RunTests<clblast::TestXgemm<float2>, float2, float2>(argc, argv, true, "CGEMM");
+ errors += clblast::RunTests<clblast::TestXgemm<double2>, double2, double2>(argc, argv, true, "ZGEMM");
+ errors += clblast::RunTests<clblast::TestXgemm<half>, half, half>(argc, argv, true, "HGEMM");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level3/xhemm.cc b/test/correctness/routines/level3/xhemm.cc
deleted file mode 100644
index 74e22080..00000000
--- a/test/correctness/routines/level3/xhemm.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level3/xhemm.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXhemm<float2>, float2, float2>(argc, argv, false, "CHEMM");
- clblast::RunTests<clblast::TestXhemm<double2>, double2, double2>(argc, argv, true, "ZHEMM");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level3/xhemm.cpp b/test/correctness/routines/level3/xhemm.cpp
new file mode 100644
index 00000000..76c970a7
--- /dev/null
+++ b/test/correctness/routines/level3/xhemm.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level3/xhemm.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXhemm<float2>, float2, float2>(argc, argv, false, "CHEMM");
+ errors += clblast::RunTests<clblast::TestXhemm<double2>, double2, double2>(argc, argv, true, "ZHEMM");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level3/xher2k.cpp b/test/correctness/routines/level3/xher2k.cpp
new file mode 100644
index 00000000..c653265e
--- /dev/null
+++ b/test/correctness/routines/level3/xher2k.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level3/xher2k.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXher2k<float2,float>, float2, float>(argc, argv, false, "CHER2K");
+ errors += clblast::RunTests<clblast::TestXher2k<double2,double>, double2, double>(argc, argv, true, "ZHER2K");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level3/xherk.cc b/test/correctness/routines/level3/xherk.cc
deleted file mode 100644
index 32a39bfc..00000000
--- a/test/correctness/routines/level3/xherk.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level3/xherk.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXherk<float2,float>, float2, float>(argc, argv, false, "CHERK");
- clblast::RunTests<clblast::TestXherk<double2,double>, double2, double>(argc, argv, true, "ZHERK");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level3/xherk.cpp b/test/correctness/routines/level3/xherk.cpp
new file mode 100644
index 00000000..09ea9e4d
--- /dev/null
+++ b/test/correctness/routines/level3/xherk.cpp
@@ -0,0 +1,27 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level3/xherk.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXherk<float2,float>, float2, float>(argc, argv, false, "CHERK");
+ errors += clblast::RunTests<clblast::TestXherk<double2,double>, double2, double>(argc, argv, true, "ZHERK");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level3/xsymm.cc b/test/correctness/routines/level3/xsymm.cc
deleted file mode 100644
index 046fca16..00000000
--- a/test/correctness/routines/level3/xsymm.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level3/xsymm.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXsymm<float>, float, float>(argc, argv, false, "SSYMM");
- clblast::RunTests<clblast::TestXsymm<double>, double, double>(argc, argv, true, "DSYMM");
- clblast::RunTests<clblast::TestXsymm<float2>, float2, float2>(argc, argv, true, "CSYMM");
- clblast::RunTests<clblast::TestXsymm<double2>, double2, double2>(argc, argv, true, "ZSYMM");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level3/xsymm.cpp b/test/correctness/routines/level3/xsymm.cpp
new file mode 100644
index 00000000..3cb3515a
--- /dev/null
+++ b/test/correctness/routines/level3/xsymm.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level3/xsymm.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXsymm<float>, float, float>(argc, argv, false, "SSYMM");
+ errors += clblast::RunTests<clblast::TestXsymm<double>, double, double>(argc, argv, true, "DSYMM");
+ errors += clblast::RunTests<clblast::TestXsymm<float2>, float2, float2>(argc, argv, true, "CSYMM");
+ errors += clblast::RunTests<clblast::TestXsymm<double2>, double2, double2>(argc, argv, true, "ZSYMM");
+ errors += clblast::RunTests<clblast::TestXsymm<half>, half, half>(argc, argv, true, "HSYMM");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level3/xsyr2k.cc b/test/correctness/routines/level3/xsyr2k.cc
deleted file mode 100644
index db2b83d9..00000000
--- a/test/correctness/routines/level3/xsyr2k.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level3/xsyr2k.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXsyr2k<float>, float, float>(argc, argv, false, "SSYR2K");
- clblast::RunTests<clblast::TestXsyr2k<double>, double, double>(argc, argv, true, "DSYR2K");
- clblast::RunTests<clblast::TestXsyr2k<float2>, float2, float2>(argc, argv, true, "CSYR2K");
- clblast::RunTests<clblast::TestXsyr2k<double2>, double2, double2>(argc, argv, true, "ZSYR2K");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level3/xsyr2k.cpp b/test/correctness/routines/level3/xsyr2k.cpp
new file mode 100644
index 00000000..617af04d
--- /dev/null
+++ b/test/correctness/routines/level3/xsyr2k.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level3/xsyr2k.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXsyr2k<float>, float, float>(argc, argv, false, "SSYR2K");
+ errors += clblast::RunTests<clblast::TestXsyr2k<double>, double, double>(argc, argv, true, "DSYR2K");
+ errors += clblast::RunTests<clblast::TestXsyr2k<float2>, float2, float2>(argc, argv, true, "CSYR2K");
+ errors += clblast::RunTests<clblast::TestXsyr2k<double2>, double2, double2>(argc, argv, true, "ZSYR2K");
+ errors += clblast::RunTests<clblast::TestXsyr2k<half>, half, half>(argc, argv, true, "HSYR2K");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level3/xsyrk.cc b/test/correctness/routines/level3/xsyrk.cc
deleted file mode 100644
index 3dad3535..00000000
--- a/test/correctness/routines/level3/xsyrk.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level3/xsyrk.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXsyrk<float>, float, float>(argc, argv, false, "SSYRK");
- clblast::RunTests<clblast::TestXsyrk<double>, double, double>(argc, argv, true, "DSYRK");
- clblast::RunTests<clblast::TestXsyrk<float2>, float2, float2>(argc, argv, true, "CSYRK");
- clblast::RunTests<clblast::TestXsyrk<double2>, double2, double2>(argc, argv, true, "ZSYRK");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level3/xsyrk.cpp b/test/correctness/routines/level3/xsyrk.cpp
new file mode 100644
index 00000000..2014b8d0
--- /dev/null
+++ b/test/correctness/routines/level3/xsyrk.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level3/xsyrk.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXsyrk<float>, float, float>(argc, argv, false, "SSYRK");
+ errors += clblast::RunTests<clblast::TestXsyrk<double>, double, double>(argc, argv, true, "DSYRK");
+ errors += clblast::RunTests<clblast::TestXsyrk<float2>, float2, float2>(argc, argv, true, "CSYRK");
+ errors += clblast::RunTests<clblast::TestXsyrk<double2>, double2, double2>(argc, argv, true, "ZSYRK");
+ errors += clblast::RunTests<clblast::TestXsyrk<half>, half, half>(argc, argv, true, "HSYRK");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level3/xtrmm.cc b/test/correctness/routines/level3/xtrmm.cc
deleted file mode 100644
index 2d843e3e..00000000
--- a/test/correctness/routines/level3/xtrmm.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level3/xtrmm.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXtrmm<float>, float, float>(argc, argv, false, "STRMM");
- clblast::RunTests<clblast::TestXtrmm<double>, double, double>(argc, argv, true, "DTRMM");
- clblast::RunTests<clblast::TestXtrmm<float2>, float2, float2>(argc, argv, true, "CTRMM");
- clblast::RunTests<clblast::TestXtrmm<double2>, double2, double2>(argc, argv, true, "ZTRMM");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level3/xtrmm.cpp b/test/correctness/routines/level3/xtrmm.cpp
new file mode 100644
index 00000000..32640d52
--- /dev/null
+++ b/test/correctness/routines/level3/xtrmm.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level3/xtrmm.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXtrmm<float>, float, float>(argc, argv, false, "STRMM");
+ errors += clblast::RunTests<clblast::TestXtrmm<double>, double, double>(argc, argv, true, "DTRMM");
+ errors += clblast::RunTests<clblast::TestXtrmm<float2>, float2, float2>(argc, argv, true, "CTRMM");
+ errors += clblast::RunTests<clblast::TestXtrmm<double2>, double2, double2>(argc, argv, true, "ZTRMM");
+ errors += clblast::RunTests<clblast::TestXtrmm<half>, half, half>(argc, argv, true, "HTRMM");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level3/xtrsm.cc b/test/correctness/routines/level3/xtrsm.cc
deleted file mode 100644
index b5f5045e..00000000
--- a/test/correctness/routines/level3/xtrsm.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-
-// =================================================================================================
-// 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>
-//
-// =================================================================================================
-
-#include "correctness/testblas.h"
-#include "routines/level3/xtrsm.h"
-
-// Shortcuts to the clblast namespace
-using float2 = clblast::float2;
-using double2 = clblast::double2;
-
-// Main function (not within the clblast namespace)
-int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXtrsm<float>, float, float>(argc, argv, false, "STRSM");
- clblast::RunTests<clblast::TestXtrsm<double>, double, double>(argc, argv, true, "DTRSM");
- clblast::RunTests<clblast::TestXtrsm<float2>, float2, float2>(argc, argv, true, "CTRSM");
- clblast::RunTests<clblast::TestXtrsm<double2>, double2, double2>(argc, argv, true, "ZTRSM");
- return 0;
-}
-
-// =================================================================================================
diff --git a/test/correctness/routines/level3/xtrsm.cpp b/test/correctness/routines/level3/xtrsm.cpp
new file mode 100644
index 00000000..6119bd17
--- /dev/null
+++ b/test/correctness/routines/level3/xtrsm.cpp
@@ -0,0 +1,30 @@
+
+// =================================================================================================
+// 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>
+//
+// =================================================================================================
+
+#include "test/correctness/testblas.hpp"
+#include "test/routines/level3/xtrsm.hpp"
+
+// Shortcuts to the clblast namespace
+using float2 = clblast::float2;
+using double2 = clblast::double2;
+
+// Main function (not within the clblast namespace)
+int main(int argc, char *argv[]) {
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXtrsm<float>, float, float>(argc, argv, false, "STRSM");
+ errors += clblast::RunTests<clblast::TestXtrsm<double>, double, double>(argc, argv, true, "DTRSM");
+ errors += clblast::RunTests<clblast::TestXtrsm<float2>, float2, float2>(argc, argv, true, "CTRSM");
+ errors += clblast::RunTests<clblast::TestXtrsm<double2>, double2, double2>(argc, argv, true, "ZTRSM");
+ errors += clblast::RunTests<clblast::TestXtrsm<half>, half, half>(argc, argv, true, "HTRSM");
+ if (errors > 0) { return 1; } else { return 0; }
+}
+
+// =================================================================================================
diff --git a/test/correctness/routines/level3/xher2k.cc b/test/correctness/routines/levelx/xomatcopy.cpp
index 6377572a..e034bc18 100644
--- a/test/correctness/routines/level3/xher2k.cc
+++ b/test/correctness/routines/levelx/xomatcopy.cpp
@@ -9,8 +9,8 @@
//
// =================================================================================================
-#include "correctness/testblas.h"
-#include "routines/level3/xher2k.h"
+#include "test/correctness/testblas.hpp"
+#include "test/routines/levelx/xomatcopy.hpp"
// Shortcuts to the clblast namespace
using float2 = clblast::float2;
@@ -18,9 +18,13 @@ using double2 = clblast::double2;
// Main function (not within the clblast namespace)
int main(int argc, char *argv[]) {
- clblast::RunTests<clblast::TestXher2k<float2,float>, float2, float>(argc, argv, false, "CHER2K");
- clblast::RunTests<clblast::TestXher2k<double2,double>, double2, double>(argc, argv, true, "ZHER2K");
- return 0;
+ auto errors = size_t{0};
+ errors += clblast::RunTests<clblast::TestXomatcopy<float>, float, float>(argc, argv, false, "SOMATCOPY");
+ errors += clblast::RunTests<clblast::TestXomatcopy<double>, double, double>(argc, argv, true, "DOMATCOPY");
+ errors += clblast::RunTests<clblast::TestXomatcopy<float2>, float2, float2>(argc, argv, true, "COMATCOPY");
+ errors += clblast::RunTests<clblast::TestXomatcopy<double2>, double2, double2>(argc, argv, true, "ZOMATCOPY");
+ errors += clblast::RunTests<clblast::TestXomatcopy<half>, half, half>(argc, argv, true, "HOMATCOPY");
+ if (errors > 0) { return 1; } else { return 0; }
}
// =================================================================================================
diff --git a/test/correctness/testblas.cc b/test/correctness/testblas.cpp
index e70c0361..2e751255 100644
--- a/test/correctness/testblas.cc
+++ b/test/correctness/testblas.cpp
@@ -14,12 +14,13 @@
#include <algorithm>
#include <iostream>
-#include "correctness/testblas.h"
+#include "test/correctness/testblas.hpp"
namespace clblast {
// =================================================================================================
// The transpose-options to test with (data-type dependent)
+template <> const std::vector<Transpose> TestBlas<half,half>::kTransposes = {Transpose::kNo, Transpose::kYes};
template <> const std::vector<Transpose> TestBlas<float,float>::kTransposes = {Transpose::kNo, Transpose::kYes};
template <> const std::vector<Transpose> TestBlas<double,double>::kTransposes = {Transpose::kNo, Transpose::kYes};
template <> const std::vector<Transpose> TestBlas<float2,float2>::kTransposes = {Transpose::kNo, Transpose::kYes, Transpose::kConjugate};
@@ -50,12 +51,12 @@ TestBlas<T,U>::TestBlas(int argc, char *argv[], const bool silent,
else { throw std::runtime_error("Invalid configuration: no reference to test against"); }
// Computes the maximum sizes. This allows for a single set of input/output buffers.
- auto max_vec = *std::max_element(kVectorDims.begin(), kVectorDims.end());
- auto max_inc = *std::max_element(kIncrements.begin(), kIncrements.end());
- auto max_mat = *std::max_element(kMatrixDims.begin(), kMatrixDims.end());
- auto max_ld = *std::max_element(kMatrixDims.begin(), kMatrixDims.end());
- auto max_matvec = *std::max_element(kMatrixVectorDims.begin(), kMatrixVectorDims.end());
- auto max_offset = *std::max_element(kOffsets.begin(), kOffsets.end());
+ const auto max_vec = *std::max_element(kVectorDims.begin(), kVectorDims.end());
+ const auto max_inc = *std::max_element(kIncrements.begin(), kIncrements.end());
+ const auto max_mat = *std::max_element(kMatrixDims.begin(), kMatrixDims.end());
+ const auto max_ld = *std::max_element(kMatrixDims.begin(), kMatrixDims.end());
+ const auto max_matvec = *std::max_element(kMatrixVectorDims.begin(), kMatrixVectorDims.end());
+ const auto max_offset = *std::max_element(kOffsets.begin(), kOffsets.end());
// Creates test input data
x_source_.resize(std::max(max_vec, max_matvec)*max_inc + max_offset);
@@ -83,9 +84,15 @@ void TestBlas<T,U>::TestRegular(std::vector<Arguments<U>> &test_vector, const st
TestStart("regular behaviour", name);
// Iterates over all the to-be-tested combinations of arguments
- for (auto &args: test_vector) {
+ for (const auto &args: test_vector) {
- // Runs the CLBlast code
+ // Prints the current test configuration
+ if (verbose_) {
+ fprintf(stdout, " Testing: %s", GetOptionsString(args).c_str());
+ std::cout << std::flush;
+ }
+
+ // Set-up for the CLBlast run
auto x_vec2 = Buffer<T>(context_, args.x_size);
auto y_vec2 = Buffer<T>(context_, args.y_size);
auto a_mat2 = Buffer<T>(context_, args.a_size);
@@ -101,15 +108,22 @@ void TestBlas<T,U>::TestRegular(std::vector<Arguments<U>> &test_vector, const st
ap_mat2.Write(queue_, args.ap_size, ap_source_);
scalar2.Write(queue_, args.scalar_size, scalar_source_);
auto buffers2 = Buffers<T>{x_vec2, y_vec2, a_mat2, b_mat2, c_mat2, ap_mat2, scalar2};
- auto status2 = run_routine_(args, buffers2, queue_);
+
+ // Runs CLBlast
+ if (verbose_) {
+ fprintf(stdout, "[CLBlast]");
+ std::cout << std::flush;
+ }
+ const auto status2 = run_routine_(args, buffers2, queue_);
// Don't continue with CBLAS if there are incorrect parameters
if (compare_cblas_ && status2 != StatusCode::kSuccess) {
+ if (verbose_) { fprintf(stdout, " -> "); std::cout << std::flush; }
TestErrorCodes(status2, status2, args);
continue;
}
- // Runs the reference BLAS code
+ // Set-up for the reference run
auto x_vec1 = Buffer<T>(context_, args.x_size);
auto y_vec1 = Buffer<T>(context_, args.y_size);
auto a_mat1 = Buffer<T>(context_, args.a_size);
@@ -125,9 +139,17 @@ void TestBlas<T,U>::TestRegular(std::vector<Arguments<U>> &test_vector, const st
ap_mat1.Write(queue_, args.ap_size, ap_source_);
scalar1.Write(queue_, args.scalar_size, scalar_source_);
auto buffers1 = Buffers<T>{x_vec1, y_vec1, a_mat1, b_mat1, c_mat1, ap_mat1, scalar1};
- auto status1 = run_reference_(args, buffers1, queue_);
+
+ // Runs the reference code
+ if (verbose_) {
+ if (compare_clblas_) { fprintf(stdout, " [clBLAS]"); }
+ else if (compare_cblas_) { fprintf(stdout, " [CPU BLAS]"); }
+ std::cout << std::flush;
+ }
+ const auto status1 = run_reference_(args, buffers1, queue_);
// Tests for equality of the two status codes
+ if (verbose_) { fprintf(stdout, " -> "); std::cout << std::flush; }
if (status1 != StatusCode::kSuccess || status2 != StatusCode::kSuccess) {
TestErrorCodes(status1, status2, args);
continue;
@@ -147,10 +169,8 @@ void TestBlas<T,U>::TestRegular(std::vector<Arguments<U>> &test_vector, const st
if (verbose_) {
if (get_id2_(args) == 1) { fprintf(stdout, "\n Error at index %zu: ", id1); }
else { fprintf(stdout, "\n Error at %zu,%zu: ", id1, id2); }
- std::cout << result1[index];
- fprintf(stdout, " (reference) versus ");
- std::cout << result2[index];
- fprintf(stdout, " (CLBlast)");
+ fprintf(stdout, " %s (reference) versus ", ToString(result1[index]).c_str());
+ fprintf(stdout, " %s (CLBlast)", ToString(result2[index]).c_str());
}
}
}
@@ -170,11 +190,18 @@ void TestBlas<T,U>::TestRegular(std::vector<Arguments<U>> &test_vector, const st
template <typename T, typename U>
void TestBlas<T,U>::TestInvalid(std::vector<Arguments<U>> &test_vector, const std::string &name) {
if (!PrecisionSupported<T>(device_)) { return; }
- if (!compare_clblas_) { return; }
+ if (!compare_clblas_) { return; } // not supported for CPU BLAS routines
+ if (std::is_same<T, half>::value) { return; } // not supported for half-precision
TestStart("invalid buffer sizes", name);
// Iterates over all the to-be-tested combinations of arguments
- for (auto &args: test_vector) {
+ for (const auto &args: test_vector) {
+
+ // Prints the current test configuration
+ if (verbose_) {
+ fprintf(stdout, " Testing: %s", GetSizesString(args).c_str());
+ std::cout << std::flush;
+ }
// Creates the OpenCL buffers. Note: we are not using the C++ version since we explicitly
// want to be able to create invalid buffers (no error checking here).
@@ -206,14 +233,26 @@ void TestBlas<T,U>::TestInvalid(std::vector<Arguments<U>> &test_vector, const st
auto c_mat2 = Buffer<T>(c2);
auto ap_mat2 = Buffer<T>(ap2);
auto scalar2 = Buffer<T>(d2);
-
- // Runs the two routines
auto buffers1 = Buffers<T>{x_vec1, y_vec1, a_mat1, b_mat1, c_mat1, ap_mat1, scalar1};
auto buffers2 = Buffers<T>{x_vec2, y_vec2, a_mat2, b_mat2, c_mat2, ap_mat2, scalar2};
- auto status1 = run_reference_(args, buffers1, queue_);
- auto status2 = run_routine_(args, buffers2, queue_);
+
+ // Runs CLBlast
+ if (verbose_) {
+ fprintf(stdout, "[CLBlast]");
+ std::cout << std::flush;
+ }
+ const auto status2 = run_routine_(args, buffers2, queue_);
+
+ // Runs the reference code
+ if (verbose_) {
+ if (compare_clblas_) { fprintf(stdout, " [clBLAS]"); }
+ else if (compare_cblas_) { fprintf(stdout, " [CPU BLAS]"); }
+ std::cout << std::flush;
+ }
+ const auto status1 = run_reference_(args, buffers1, queue_);
// Tests for equality of the two status codes
+ if (verbose_) { fprintf(stdout, " -> "); std::cout << std::flush; }
TestErrorCodes(status1, status2, args);
}
TestEnd();
@@ -222,6 +261,7 @@ void TestBlas<T,U>::TestInvalid(std::vector<Arguments<U>> &test_vector, const st
// =================================================================================================
// Compiles the templated class
+template class TestBlas<half, half>;
template class TestBlas<float, float>;
template class TestBlas<double, double>;
template class TestBlas<float2, float2>;
diff --git a/test/correctness/testblas.h b/test/correctness/testblas.hpp
index 4ffc1558..d01cd06c 100644
--- a/test/correctness/testblas.h
+++ b/test/correctness/testblas.hpp
@@ -21,7 +21,7 @@
#include <string>
#include <algorithm>
-#include "correctness/tester.h"
+#include "test/correctness/tester.hpp"
namespace clblast {
// =================================================================================================
@@ -46,6 +46,8 @@ class TestBlas: public Tester<T,U> {
using Tester<T,U>::TestErrorCount;
using Tester<T,U>::TestErrorCodes;
using Tester<T,U>::GetOffsets;
+ using Tester<T,U>::GetOptionsString;
+ using Tester<T,U>::GetSizesString;
// Test settings for the regular test. Append to these lists in case more tests are required.
const std::vector<size_t> kVectorDims = { 7, 93, 4096 };
@@ -113,7 +115,7 @@ class TestBlas: public Tester<T,U> {
// The interface to the correctness tester. This is a separate function in the header such that it
// is automatically compiled for each routine, templated by the parameter "C".
template <typename C, typename T, typename U>
-void RunTests(int argc, char *argv[], const bool silent, const std::string &name) {
+size_t RunTests(int argc, char *argv[], const bool silent, const std::string &name) {
// Sets the reference to test against
#if defined(CLBLAST_REF_CLBLAS) && defined(CLBLAST_REF_CBLAS)
@@ -127,6 +129,13 @@ void RunTests(int argc, char *argv[], const bool silent, const std::string &name
const auto reference_routine2 = C::RunReference2; // CBLAS
#endif
+ // Non-BLAS routines cannot be fully tested
+ if (!silent && C::BLASLevel() == 4) {
+ fprintf(stdout, "\n* NOTE: This non-BLAS routine is tested against a custom implementation,\n");
+ fprintf(stdout, " not against clBLAS or a CPU BLAS library. Thus, the arguments '-clblas'\n");
+ fprintf(stdout, " and '-cblas' have no effect.\n");
+ }
+
// Creates a tester
auto options = C::GetOptions();
TestBlas<T,U> tester{argc, argv, silent, name, options,
@@ -174,8 +183,9 @@ void RunTests(int argc, char *argv[], const bool silent, const std::string &name
auto ap_sizes = std::vector<size_t>{args.ap_size};
// Sets the dimensions of the matrices or vectors depending on the BLAS level
- auto dimensions = (C::BLASLevel() == 3) ? tester.kMatrixDims :
- (C::BLASLevel() == 2) ? tester.kMatrixVectorDims :
+ auto dimensions = (C::BLASLevel() == 4) ? tester.kMatrixDims : // non-BLAS extra routines
+ (C::BLASLevel() == 3) ? tester.kMatrixDims : // level 3
+ (C::BLASLevel() == 2) ? tester.kMatrixVectorDims : // level 2
tester.kVectorDims; // else: level 1
// For the options relevant to this routine, sets the vectors to proper values
@@ -316,7 +326,9 @@ void RunTests(int argc, char *argv[], const bool silent, const std::string &name
// Runs the tests
tester.TestRegular(regular_test_vector, case_name);
#ifdef CLBLAST_REF_CLBLAS
- tester.TestInvalid(invalid_test_vector, case_name);
+ if (C::BLASLevel() != 4) {
+ tester.TestInvalid(invalid_test_vector, case_name);
+ }
#endif
}
}
@@ -324,6 +336,7 @@ void RunTests(int argc, char *argv[], const bool silent, const std::string &name
}
}
}
+ return tester.NumFailedTests();
}
// =================================================================================================
diff --git a/test/correctness/tester.cc b/test/correctness/tester.cpp
index 85ae7091..92e2c1b8 100644
--- a/test/correctness/tester.cc
+++ b/test/correctness/tester.cpp
@@ -11,13 +11,13 @@
//
// =================================================================================================
-#include "correctness/tester.h"
-
#include <string>
#include <vector>
#include <iostream>
#include <cmath>
+#include "test/correctness/tester.hpp"
+
namespace clblast {
// =================================================================================================
@@ -45,8 +45,8 @@ Tester<T,U>::Tester(int argc, char *argv[], const bool silent,
// Determines which reference to test against
#if defined(CLBLAST_REF_CLBLAS) && defined(CLBLAST_REF_CBLAS)
- compare_clblas_ = GetArgument(argc, argv, help_, kArgCompareclblas, 1);
- compare_cblas_ = GetArgument(argc, argv, help_, kArgComparecblas, 0);
+ compare_clblas_ = GetArgument(argc, argv, help_, kArgCompareclblas, 0);
+ compare_cblas_ = GetArgument(argc, argv, help_, kArgComparecblas, 1);
#elif CLBLAST_REF_CLBLAS
compare_clblas_ = GetArgument(argc, argv, help_, kArgCompareclblas, 1);
compare_cblas_ = 0;
@@ -137,7 +137,7 @@ void Tester<T,U>::TestStart(const std::string &test_name, const std::string &tes
fprintf(stdout, "* Testing %s'%s'%s for %s'%s'%s:\n",
kPrintMessage.c_str(), test_name.c_str(), kPrintEnd.c_str(),
kPrintMessage.c_str(), test_configuration.c_str(), kPrintEnd.c_str());
- fprintf(stdout, " ");
+ if (!verbose_) { fprintf(stdout, " "); }
// Empties the error log and the error/pass counters
error_log_.clear();
@@ -151,7 +151,7 @@ void Tester<T,U>::TestStart(const std::string &test_name, const std::string &tes
// summary of the number of sub-tests passed/failed.
template <typename T, typename U>
void Tester<T,U>::TestEnd() {
- fprintf(stdout, "\n");
+ if (!verbose_) { fprintf(stdout, "\n"); }
tests_passed_ += num_passed_;
tests_skipped_ += num_skipped_;
tests_failed_ += num_failed_;
@@ -250,6 +250,53 @@ const std::vector<size_t> Tester<T,U>::GetOffsets() const {
else { return {0}; }
}
+// Retrieves the options as a string for a specific test
+template <typename T, typename U>
+std::string Tester<T,U>::GetOptionsString(const Arguments<U> &args) {
+ auto result = std::string("");
+ const auto equals = std::string("=");
+ for (auto &o: options_) {
+ if (o == kArgM) { result += kArgM + equals + ToString(args.m) + " "; }
+ if (o == kArgN) { result += kArgN + equals + ToString(args.n) + " "; }
+ if (o == kArgK) { result += kArgK + equals + ToString(args.k) + " "; }
+ if (o == kArgKU) { result += kArgKU + equals + ToString(args.ku) + " "; }
+ if (o == kArgKL) { result += kArgKL + equals + ToString(args.kl) + " "; }
+ if (o == kArgXInc) { result += kArgXInc + equals + ToString(args.x_inc) + " "; }
+ if (o == kArgYInc) { result += kArgYInc + equals + ToString(args.y_inc) + " "; }
+ if (o == kArgXOffset) { result += kArgXOffset + equals + ToString(args.x_offset) + " "; }
+ if (o == kArgYOffset) { result += kArgYOffset + equals + ToString(args.y_offset) + " "; }
+ if (o == kArgALeadDim) { result += kArgALeadDim + equals + ToString(args.a_ld) + " "; }
+ if (o == kArgBLeadDim) { result += kArgBLeadDim + equals + ToString(args.b_ld) + " "; }
+ if (o == kArgCLeadDim) { result += kArgCLeadDim + equals + ToString(args.c_ld) + " "; }
+ if (o == kArgAOffset) { result += kArgAOffset + equals + ToString(args.a_offset) + " "; }
+ if (o == kArgBOffset) { result += kArgBOffset + equals + ToString(args.b_offset) + " "; }
+ if (o == kArgCOffset) { result += kArgCOffset + equals + ToString(args.c_offset) + " "; }
+ if (o == kArgAPOffset) { result += kArgAPOffset + equals + ToString(args.ap_offset) + " "; }
+ if (o == kArgDotOffset){ result += kArgDotOffset + equals + ToString(args.dot_offset) + " "; }
+ }
+ return result;
+}
+
+// As above, but now only prints information relevant to invalid buffer sizes
+template <typename T, typename U>
+std::string Tester<T,U>::GetSizesString(const Arguments<U> &args) {
+ auto result = std::string("");
+ const auto equals = std::string("=");
+ for (auto &o: options_) {
+ if (o == kArgM) { result += kArgM + equals + ToString(args.m) + " "; }
+ if (o == kArgN) { result += kArgN + equals + ToString(args.n) + " "; }
+ if (o == kArgK) { result += kArgK + equals + ToString(args.k) + " "; }
+ if (o == kArgXOffset) { result += "xsize" + equals + ToString(args.x_size) + " "; }
+ if (o == kArgYOffset) { result += "ysize" + equals + ToString(args.y_size) + " "; }
+ if (o == kArgAOffset) { result += "asize" + equals + ToString(args.a_size) + " "; }
+ if (o == kArgBOffset) { result += "bsize" + equals + ToString(args.b_size) + " "; }
+ if (o == kArgCOffset) { result += "csize" + equals + ToString(args.c_size) + " "; }
+ if (o == kArgAPOffset) { result += "apsize" + equals + ToString(args.ap_size) + " "; }
+ if (o == kArgDotOffset){ result += "scalarsize" + equals + ToString(args.scalar_size) + " "; }
+ }
+ return result;
+}
+
// =================================================================================================
// A test can either pass, be skipped, or fail
@@ -273,13 +320,19 @@ void Tester<T,U>::ReportError(const ErrorLogEntry &error_log_entry) {
// line by printing newlines once every so many calls.
template <typename T, typename U>
void Tester<T,U>::PrintTestResult(const std::string &message) {
- if (print_count_ == kResultsPerLine) {
- print_count_ = 0;
- fprintf(stdout, "\n ");
+ if (verbose_) {
+ fprintf(stdout, "%s\n", message.c_str());
+ }
+ else
+ {
+ if (print_count_ == kResultsPerLine) {
+ print_count_ = 0;
+ fprintf(stdout, "\n ");
+ }
+ fprintf(stdout, "%s", message.c_str());
+ print_count_++;
}
- fprintf(stdout, "%s", message.c_str());
std::cout << std::flush;
- print_count_++;
}
// Prints details of errors occurred in a given error log
@@ -292,32 +345,7 @@ void Tester<T,U>::PrintErrorLog(const std::vector<ErrorLogEntry> &error_log) {
else {
fprintf(stdout, " Status code %d (expected %d): ", entry.status_found, entry.status_expect);
}
- for (auto &o: options_) {
- if (o == kArgM) { fprintf(stdout, "%s=%zu ", kArgM, entry.args.m); }
- if (o == kArgN) { fprintf(stdout, "%s=%zu ", kArgN, entry.args.n); }
- if (o == kArgK) { fprintf(stdout, "%s=%zu ", kArgK, entry.args.k); }
- if (o == kArgKU) { fprintf(stdout, "%s=%zu ", kArgKU, entry.args.ku); }
- if (o == kArgKL) { fprintf(stdout, "%s=%zu ", kArgKL, entry.args.kl); }
- if (o == kArgLayout) { fprintf(stdout, "%s=%d ", kArgLayout, entry.args.layout);}
- if (o == kArgATransp) { fprintf(stdout, "%s=%d ", kArgATransp, entry.args.a_transpose);}
- if (o == kArgBTransp) { fprintf(stdout, "%s=%d ", kArgBTransp, entry.args.b_transpose);}
- if (o == kArgSide) { fprintf(stdout, "%s=%d ", kArgSide, entry.args.side);}
- if (o == kArgTriangle) { fprintf(stdout, "%s=%d ", kArgTriangle, entry.args.triangle);}
- if (o == kArgDiagonal) { fprintf(stdout, "%s=%d ", kArgDiagonal, entry.args.diagonal);}
- if (o == kArgXInc) { fprintf(stdout, "%s=%zu ", kArgXInc, entry.args.x_inc);}
- if (o == kArgYInc) { fprintf(stdout, "%s=%zu ", kArgYInc, entry.args.y_inc);}
- if (o == kArgXOffset) { fprintf(stdout, "%s=%zu ", kArgXOffset, entry.args.x_offset);}
- if (o == kArgYOffset) { fprintf(stdout, "%s=%zu ", kArgYOffset, entry.args.y_offset);}
- if (o == kArgALeadDim) { fprintf(stdout, "%s=%zu ", kArgALeadDim, entry.args.a_ld);}
- if (o == kArgBLeadDim) { fprintf(stdout, "%s=%zu ", kArgBLeadDim, entry.args.b_ld);}
- if (o == kArgCLeadDim) { fprintf(stdout, "%s=%zu ", kArgCLeadDim, entry.args.c_ld);}
- if (o == kArgAOffset) { fprintf(stdout, "%s=%zu ", kArgAOffset, entry.args.a_offset);}
- if (o == kArgBOffset) { fprintf(stdout, "%s=%zu ", kArgBOffset, entry.args.b_offset);}
- if (o == kArgCOffset) { fprintf(stdout, "%s=%zu ", kArgCOffset, entry.args.c_offset);}
- if (o == kArgAPOffset) { fprintf(stdout, "%s=%zu ", kArgAPOffset, entry.args.ap_offset);}
- if (o == kArgDotOffset){ fprintf(stdout, "%s=%zu ", kArgDotOffset, entry.args.dot_offset);}
- }
- fprintf(stdout, "\n");
+ fprintf(stdout, "%s\n", GetOptionsString(entry.args).c_str());
}
}
@@ -351,11 +379,11 @@ bool TestSimilarity(const T val1, const T val2) {
}
}
-// Compiles the default case for non-complex data-types
+// Compiles the default case for standard data-types
template bool TestSimilarity<float>(const float, const float);
template bool TestSimilarity<double>(const double, const double);
-// Specialisations for complex data-types
+// Specialisations for non-standard data-types
template <>
bool TestSimilarity(const float2 val1, const float2 val2) {
auto real = TestSimilarity(val1.real(), val2.real());
@@ -368,6 +396,10 @@ bool TestSimilarity(const double2 val1, const double2 val2) {
auto imag = TestSimilarity(val1.imag(), val2.imag());
return (real && imag);
}
+template <>
+bool TestSimilarity(const half val1, const half val2) {
+ return TestSimilarity(HalfToFloat(val1), HalfToFloat(val2));
+}
// =================================================================================================
@@ -389,10 +421,15 @@ template <> const std::vector<double2> GetExampleScalars(const bool full_test) {
if (full_test) { return {{0.0, 0.0}, {1.0, 1.3}, {2.42, 3.14}}; }
else { return {{2.42, 3.14}}; }
}
+template <> const std::vector<half> GetExampleScalars(const bool full_test) {
+ if (full_test) { return {FloatToHalf(0.0f), FloatToHalf(1.0f), FloatToHalf(3.14f)}; }
+ else { return {FloatToHalf(3.14f)}; }
+}
// =================================================================================================
// Compiles the templated class
+template class Tester<half, half>;
template class Tester<float, float>;
template class Tester<double, double>;
template class Tester<float2, float2>;
diff --git a/test/correctness/tester.h b/test/correctness/tester.hpp
index 46d88caf..422da9ed 100644
--- a/test/correctness/tester.h
+++ b/test/correctness/tester.hpp
@@ -28,7 +28,7 @@
#endif
#include "clblast.h"
-#include "internal/utilities.h"
+#include "utilities.hpp"
namespace clblast {
// =================================================================================================
@@ -58,7 +58,7 @@ class Tester {
const std::string kErrorStatus{kPrintError + "/" + kPrintEnd};
const std::string kSkippedCompilation{kPrintWarning + "\\" + kPrintEnd};
const std::string kUnsupportedPrecision{kPrintWarning + "o" + kPrintEnd};
- const std::string kUnsupportedReference{kPrintWarning + "." + kPrintEnd};
+ const std::string kUnsupportedReference{kPrintWarning + "-" + kPrintEnd};
// This structure combines the above log-entry with a status code an error percentage
struct ErrorLogEntry {
@@ -83,6 +83,9 @@ class Tester {
void TestErrorCodes(const StatusCode clblas_status, const StatusCode clblast_status,
const Arguments<U> &args);
+ // Returns the number of failed tests
+ size_t NumFailedTests() const { return tests_failed_; }
+
protected:
// The help-message
@@ -103,6 +106,10 @@ class Tester {
// Retrieves the offset values to test with
const std::vector<size_t> GetOffsets() const;
+ // Retrieves the list of options as a string
+ std::string GetOptionsString(const Arguments<U> &args); // for regular tests
+ std::string GetSizesString(const Arguments<U> &args); // for invalid buffer sizes
+
// Testing against reference implementations
int compare_cblas_;
int compare_clblas_;