summaryrefslogtreecommitdiff
path: root/test/correctness/testblas.cc
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-04-27 14:38:30 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-04-27 14:38:30 +0200
commit226e834d0a6569f8142ab0cde14e6e273486a277 (patch)
tree58a94fe874a928d66b8972724c531d802991cf11 /test/correctness/testblas.cc
parent3555cd043654ec24ff325bd6205281af790e50d2 (diff)
Added a '-verbose' option to the test binaries to report errors in more detail if needed
Diffstat (limited to 'test/correctness/testblas.cc')
-rw-r--r--test/correctness/testblas.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/correctness/testblas.cc b/test/correctness/testblas.cc
index cc9a5adb..a5ccefe0 100644
--- a/test/correctness/testblas.cc
+++ b/test/correctness/testblas.cc
@@ -12,6 +12,7 @@
// =================================================================================================
#include <algorithm>
+#include <iostream>
#include "correctness/testblas.h"
@@ -141,9 +142,17 @@ void TestBlas<T,U>::TestRegular(std::vector<Arguments<U>> &test_vector, const st
auto index = get_index_(args, id1, id2);
if (!TestSimilarity(result1[index], result2[index])) {
errors++;
+ if (verbose_) {
+ fprintf(stdout, "\n Incorrect value found: ");
+ std::cout << result1[index];
+ fprintf(stdout, " (reference) versus ");
+ std::cout << result2[index];
+ fprintf(stdout, " (CLBlast)");
+ }
}
}
}
+ if (verbose_ && errors > 0) { fprintf(stdout, "\n "); }
// Tests the error count (should be zero)
TestErrorCount(errors, get_id1_(args)*get_id2_(args), args);