summaryrefslogtreecommitdiff
path: root/test/correctness/tester.cc
diff options
context:
space:
mode:
authorcnugteren <web@cedricnugteren.nl>2016-04-03 16:08:48 -0700
committercnugteren <web@cedricnugteren.nl>2016-04-03 16:08:48 -0700
commit2981ca4d3caf5b1fcc346bc6df65f2ee6ccac141 (patch)
tree6ec690bcb9fd616af93821445887cf8c73cd4a2e /test/correctness/tester.cc
parent8217b017028412594f663a66187f99c3ee0878c9 (diff)
parentc4ab9bda6321aab66e05fd3d00e7b58443c640ef (diff)
Merge branch 'cpu_blas' into development
Diffstat (limited to 'test/correctness/tester.cc')
-rw-r--r--test/correctness/tester.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/correctness/tester.cc b/test/correctness/tester.cc
index 8169f700..872a131a 100644
--- a/test/correctness/tester.cc
+++ b/test/correctness/tester.cc
@@ -69,10 +69,12 @@ Tester<T,U>::Tester(int argc, char *argv[], const bool silent,
kUnsupportedPrecision.c_str());
// Initializes clBLAS
- auto status = clblasSetup();
- if (status != CL_SUCCESS) {
- throw std::runtime_error("clBLAS setup error: "+ToString(static_cast<int>(status)));
- }
+ #ifdef CLBLAST_REF_CLBLAS
+ auto status = clblasSetup();
+ if (status != CL_SUCCESS) {
+ throw std::runtime_error("clBLAS setup error: "+ToString(static_cast<int>(status)));
+ }
+ #endif
}
// Destructor prints the summary of the test cases and cleans-up the clBLAS library
@@ -87,7 +89,11 @@ Tester<T,U>::~Tester() {
fprintf(stdout, " %zu test(s) failed%s\n", tests_failed_, kPrintEnd.c_str());
}
fprintf(stdout, "\n");
- clblasTeardown();
+
+ // Cleans-up clBLAS
+ #ifdef CLBLAST_REF_CLBLAS
+ clblasTeardown();
+ #endif
}
// =================================================================================================