summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-04-27 11:37:55 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-04-27 11:37:55 +0200
commit3555cd043654ec24ff325bd6205281af790e50d2 (patch)
treec36cfd23550a3eb3b435cca64c29f58f77328173 /test
parentc8e28a33c0b786aa3772b6f6d822245b5f2ad9ea (diff)
All CLBlast enum constants now have the same raw values as in the cblas standard
Diffstat (limited to 'test')
-rw-r--r--test/routines/level2/xgbmv.h4
-rw-r--r--test/routines/level2/xgemv.h4
-rw-r--r--test/routines/level2/xger.h2
-rw-r--r--test/routines/level2/xgerc.h2
-rw-r--r--test/routines/level2/xgeru.h2
-rw-r--r--test/routines/level2/xhbmv.h4
-rw-r--r--test/routines/level2/xhemv.h4
-rw-r--r--test/routines/level2/xher.h4
-rw-r--r--test/routines/level2/xher2.h4
-rw-r--r--test/routines/level2/xhpmv.h4
-rw-r--r--test/routines/level2/xhpr.h4
-rw-r--r--test/routines/level2/xhpr2.h4
-rw-r--r--test/routines/level2/xsbmv.h4
-rw-r--r--test/routines/level2/xspmv.h4
-rw-r--r--test/routines/level2/xspr.h4
-rw-r--r--test/routines/level2/xspr2.h4
-rw-r--r--test/routines/level2/xsymv.h4
-rw-r--r--test/routines/level2/xsyr.h4
-rw-r--r--test/routines/level2/xsyr2.h4
-rw-r--r--test/routines/level2/xtbmv.h8
-rw-r--r--test/routines/level2/xtpmv.h8
-rw-r--r--test/routines/level2/xtrmv.h8
-rw-r--r--test/routines/level3/xgemm.h6
-rw-r--r--test/routines/level3/xhemm.h6
-rw-r--r--test/routines/level3/xher2k.h6
-rw-r--r--test/routines/level3/xherk.h6
-rw-r--r--test/routines/level3/xsymm.h6
-rw-r--r--test/routines/level3/xsyr2k.h6
-rw-r--r--test/routines/level3/xsyrk.h6
-rw-r--r--test/routines/level3/xtrmm.h10
-rw-r--r--test/wrapper_clblas.h7
31 files changed, 80 insertions, 73 deletions
diff --git a/test/routines/level2/xgbmv.h b/test/routines/level2/xgbmv.h
index b875075d..c88cdf2a 100644
--- a/test/routines/level2/xgbmv.h
+++ b/test/routines/level2/xgbmv.h
@@ -99,8 +99,8 @@ class TestXgbmv {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXgbmv(static_cast<clblasOrder>(args.layout),
- static_cast<clblasTranspose>(args.a_transpose),
+ auto status = clblasXgbmv(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.a_transpose),
args.m, args.n, args.kl, args.ku, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.x_vec(), args.x_offset, args.x_inc, args.beta,
diff --git a/test/routines/level2/xgemv.h b/test/routines/level2/xgemv.h
index a70ccd34..cf63d55f 100644
--- a/test/routines/level2/xgemv.h
+++ b/test/routines/level2/xgemv.h
@@ -99,8 +99,8 @@ class TestXgemv {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXgemv(static_cast<clblasOrder>(args.layout),
- static_cast<clblasTranspose>(args.a_transpose),
+ auto status = clblasXgemv(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.a_transpose),
args.m, args.n, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.x_vec(), args.x_offset, args.x_inc, args.beta,
diff --git a/test/routines/level2/xger.h b/test/routines/level2/xger.h
index 32c2a505..ae142e2e 100644
--- a/test/routines/level2/xger.h
+++ b/test/routines/level2/xger.h
@@ -95,7 +95,7 @@ class TestXger {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXger(static_cast<clblasOrder>(args.layout),
+ auto status = clblasXger(convertToCLBLAS(args.layout),
args.m, args.n, args.alpha,
buffers.x_vec(), args.x_offset, args.x_inc,
buffers.y_vec(), args.y_offset, args.y_inc,
diff --git a/test/routines/level2/xgerc.h b/test/routines/level2/xgerc.h
index 4b6954f6..b236aef6 100644
--- a/test/routines/level2/xgerc.h
+++ b/test/routines/level2/xgerc.h
@@ -95,7 +95,7 @@ class TestXgerc {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXgerc(static_cast<clblasOrder>(args.layout),
+ auto status = clblasXgerc(convertToCLBLAS(args.layout),
args.m, args.n, args.alpha,
buffers.x_vec(), args.x_offset, args.x_inc,
buffers.y_vec(), args.y_offset, args.y_inc,
diff --git a/test/routines/level2/xgeru.h b/test/routines/level2/xgeru.h
index 295e69e5..3d3fa439 100644
--- a/test/routines/level2/xgeru.h
+++ b/test/routines/level2/xgeru.h
@@ -95,7 +95,7 @@ class TestXgeru {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXgeru(static_cast<clblasOrder>(args.layout),
+ auto status = clblasXgeru(convertToCLBLAS(args.layout),
args.m, args.n, args.alpha,
buffers.x_vec(), args.x_offset, args.x_inc,
buffers.y_vec(), args.y_offset, args.y_inc,
diff --git a/test/routines/level2/xhbmv.h b/test/routines/level2/xhbmv.h
index e0bdc4da..4098639a 100644
--- a/test/routines/level2/xhbmv.h
+++ b/test/routines/level2/xhbmv.h
@@ -93,8 +93,8 @@ class TestXhbmv {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXhbmv(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXhbmv(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.kl, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.x_vec(), args.x_offset, args.x_inc, args.beta,
diff --git a/test/routines/level2/xhemv.h b/test/routines/level2/xhemv.h
index fa242961..5652872d 100644
--- a/test/routines/level2/xhemv.h
+++ b/test/routines/level2/xhemv.h
@@ -93,8 +93,8 @@ class TestXhemv {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXhemv(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXhemv(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.x_vec(), args.x_offset, args.x_inc, args.beta,
diff --git a/test/routines/level2/xher.h b/test/routines/level2/xher.h
index 7d0e8cc3..3bbf0887 100644
--- a/test/routines/level2/xher.h
+++ b/test/routines/level2/xher.h
@@ -88,8 +88,8 @@ class TestXher {
static StatusCode RunReference1(const Arguments<U> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXher(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXher(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.alpha,
buffers.x_vec(), args.x_offset, args.x_inc,
buffers.a_mat(), args.a_offset, args.a_ld,
diff --git a/test/routines/level2/xher2.h b/test/routines/level2/xher2.h
index 445bba74..dc7fbe73 100644
--- a/test/routines/level2/xher2.h
+++ b/test/routines/level2/xher2.h
@@ -93,8 +93,8 @@ class TestXher2 {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXher2(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXher2(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.alpha,
buffers.x_vec(), args.x_offset, args.x_inc,
buffers.y_vec(), args.y_offset, args.y_inc,
diff --git a/test/routines/level2/xhpmv.h b/test/routines/level2/xhpmv.h
index 406e564f..df5a90ee 100644
--- a/test/routines/level2/xhpmv.h
+++ b/test/routines/level2/xhpmv.h
@@ -93,8 +93,8 @@ class TestXhpmv {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXhpmv(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXhpmv(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.alpha,
buffers.ap_mat(), args.ap_offset,
buffers.x_vec(), args.x_offset, args.x_inc, args.beta,
diff --git a/test/routines/level2/xhpr.h b/test/routines/level2/xhpr.h
index 6f56d3f3..0db11db0 100644
--- a/test/routines/level2/xhpr.h
+++ b/test/routines/level2/xhpr.h
@@ -88,8 +88,8 @@ class TestXhpr {
static StatusCode RunReference1(const Arguments<U> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXhpr(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXhpr(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.alpha,
buffers.x_vec(), args.x_offset, args.x_inc,
buffers.ap_mat(), args.ap_offset,
diff --git a/test/routines/level2/xhpr2.h b/test/routines/level2/xhpr2.h
index 43889cb9..e1e5b4c5 100644
--- a/test/routines/level2/xhpr2.h
+++ b/test/routines/level2/xhpr2.h
@@ -93,8 +93,8 @@ class TestXhpr2 {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXhpr2(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXhpr2(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.alpha,
buffers.x_vec(), args.x_offset, args.x_inc,
buffers.y_vec(), args.y_offset, args.y_inc,
diff --git a/test/routines/level2/xsbmv.h b/test/routines/level2/xsbmv.h
index 9a5c5140..fce88f4c 100644
--- a/test/routines/level2/xsbmv.h
+++ b/test/routines/level2/xsbmv.h
@@ -93,8 +93,8 @@ class TestXsbmv {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXsbmv(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXsbmv(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.kl, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.x_vec(), args.x_offset, args.x_inc, args.beta,
diff --git a/test/routines/level2/xspmv.h b/test/routines/level2/xspmv.h
index 913af0cd..2fdba77a 100644
--- a/test/routines/level2/xspmv.h
+++ b/test/routines/level2/xspmv.h
@@ -93,8 +93,8 @@ class TestXspmv {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXspmv(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXspmv(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.alpha,
buffers.ap_mat(), args.ap_offset,
buffers.x_vec(), args.x_offset, args.x_inc, args.beta,
diff --git a/test/routines/level2/xspr.h b/test/routines/level2/xspr.h
index bab5c541..dcacc5de 100644
--- a/test/routines/level2/xspr.h
+++ b/test/routines/level2/xspr.h
@@ -88,8 +88,8 @@ class TestXspr {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXspr(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXspr(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.alpha,
buffers.x_vec(), args.x_offset, args.x_inc,
buffers.ap_mat(), args.ap_offset,
diff --git a/test/routines/level2/xspr2.h b/test/routines/level2/xspr2.h
index 41a04cc0..69fda2fb 100644
--- a/test/routines/level2/xspr2.h
+++ b/test/routines/level2/xspr2.h
@@ -93,8 +93,8 @@ class TestXspr2 {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXspr2(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXspr2(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.alpha,
buffers.x_vec(), args.x_offset, args.x_inc,
buffers.y_vec(), args.y_offset, args.y_inc,
diff --git a/test/routines/level2/xsymv.h b/test/routines/level2/xsymv.h
index 0576bc1f..16f94d6f 100644
--- a/test/routines/level2/xsymv.h
+++ b/test/routines/level2/xsymv.h
@@ -93,8 +93,8 @@ class TestXsymv {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXsymv(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXsymv(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.x_vec(), args.x_offset, args.x_inc, args.beta,
diff --git a/test/routines/level2/xsyr.h b/test/routines/level2/xsyr.h
index 062eea5a..a66dd271 100644
--- a/test/routines/level2/xsyr.h
+++ b/test/routines/level2/xsyr.h
@@ -88,8 +88,8 @@ class TestXsyr {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXsyr(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXsyr(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.alpha,
buffers.x_vec(), args.x_offset, args.x_inc,
buffers.a_mat(), args.a_offset, args.a_ld,
diff --git a/test/routines/level2/xsyr2.h b/test/routines/level2/xsyr2.h
index 50bc3cea..a36815e5 100644
--- a/test/routines/level2/xsyr2.h
+++ b/test/routines/level2/xsyr2.h
@@ -93,8 +93,8 @@ class TestXsyr2 {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXsyr2(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXsyr2(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
args.n, args.alpha,
buffers.x_vec(), args.x_offset, args.x_inc,
buffers.y_vec(), args.y_offset, args.y_inc,
diff --git a/test/routines/level2/xtbmv.h b/test/routines/level2/xtbmv.h
index 600b4131..1425b60b 100644
--- a/test/routines/level2/xtbmv.h
+++ b/test/routines/level2/xtbmv.h
@@ -87,10 +87,10 @@ class TestXtbmv {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXtbmv<T>(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
- static_cast<clblasTranspose>(args.a_transpose),
- static_cast<clblasDiag>(args.diagonal),
+ auto status = clblasXtbmv<T>(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
+ convertToCLBLAS(args.a_transpose),
+ convertToCLBLAS(args.diagonal),
args.n, args.kl,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.x_vec(), args.x_offset, args.x_inc,
diff --git a/test/routines/level2/xtpmv.h b/test/routines/level2/xtpmv.h
index fc0cf393..a834b437 100644
--- a/test/routines/level2/xtpmv.h
+++ b/test/routines/level2/xtpmv.h
@@ -87,10 +87,10 @@ class TestXtpmv {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXtpmv<T>(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
- static_cast<clblasTranspose>(args.a_transpose),
- static_cast<clblasDiag>(args.diagonal),
+ auto status = clblasXtpmv<T>(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
+ convertToCLBLAS(args.a_transpose),
+ convertToCLBLAS(args.diagonal),
args.n,
buffers.ap_mat(), args.ap_offset,
buffers.x_vec(), args.x_offset, args.x_inc,
diff --git a/test/routines/level2/xtrmv.h b/test/routines/level2/xtrmv.h
index fec72124..cd502d5d 100644
--- a/test/routines/level2/xtrmv.h
+++ b/test/routines/level2/xtrmv.h
@@ -87,10 +87,10 @@ class TestXtrmv {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXtrmv<T>(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
- static_cast<clblasTranspose>(args.a_transpose),
- static_cast<clblasDiag>(args.diagonal),
+ auto status = clblasXtrmv<T>(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
+ convertToCLBLAS(args.a_transpose),
+ convertToCLBLAS(args.diagonal),
args.n,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.x_vec(), args.x_offset, args.x_inc,
diff --git a/test/routines/level3/xgemm.h b/test/routines/level3/xgemm.h
index 49a92936..10fc2803 100644
--- a/test/routines/level3/xgemm.h
+++ b/test/routines/level3/xgemm.h
@@ -101,9 +101,9 @@ class TestXgemm {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXgemm(static_cast<clblasOrder>(args.layout),
- static_cast<clblasTranspose>(args.a_transpose),
- static_cast<clblasTranspose>(args.b_transpose),
+ auto status = clblasXgemm(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.a_transpose),
+ convertToCLBLAS(args.b_transpose),
args.m, args.n, args.k, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.b_mat(), args.b_offset, args.b_ld, args.beta,
diff --git a/test/routines/level3/xhemm.h b/test/routines/level3/xhemm.h
index 40538417..edc71024 100644
--- a/test/routines/level3/xhemm.h
+++ b/test/routines/level3/xhemm.h
@@ -101,9 +101,9 @@ class TestXhemm {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXhemm(static_cast<clblasOrder>(args.layout),
- static_cast<clblasSide>(args.side),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXhemm(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.side),
+ convertToCLBLAS(args.triangle),
args.m, args.n, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.b_mat(), args.b_offset, args.b_ld, args.beta,
diff --git a/test/routines/level3/xher2k.h b/test/routines/level3/xher2k.h
index 1ea2ad36..a78e1293 100644
--- a/test/routines/level3/xher2k.h
+++ b/test/routines/level3/xher2k.h
@@ -101,9 +101,9 @@ class TestXher2k {
auto queue_plain = queue();
auto event = cl_event{};
auto alpha2 = T{args.alpha, args.alpha};
- auto status = clblasXher2k(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
- static_cast<clblasTranspose>(args.a_transpose),
+ auto status = clblasXher2k(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
+ convertToCLBLAS(args.a_transpose),
args.n, args.k, alpha2,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.b_mat(), args.b_offset, args.b_ld, args.beta,
diff --git a/test/routines/level3/xherk.h b/test/routines/level3/xherk.h
index 75a7c405..245293d6 100644
--- a/test/routines/level3/xherk.h
+++ b/test/routines/level3/xherk.h
@@ -91,9 +91,9 @@ class TestXherk {
static StatusCode RunReference1(const Arguments<U> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXherk(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
- static_cast<clblasTranspose>(args.a_transpose),
+ auto status = clblasXherk(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
+ convertToCLBLAS(args.a_transpose),
args.n, args.k, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld, args.beta,
buffers.c_mat(), args.c_offset, args.c_ld,
diff --git a/test/routines/level3/xsymm.h b/test/routines/level3/xsymm.h
index f867c238..e638b735 100644
--- a/test/routines/level3/xsymm.h
+++ b/test/routines/level3/xsymm.h
@@ -101,9 +101,9 @@ class TestXsymm {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXsymm(static_cast<clblasOrder>(args.layout),
- static_cast<clblasSide>(args.side),
- static_cast<clblasUplo>(args.triangle),
+ auto status = clblasXsymm(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.side),
+ convertToCLBLAS(args.triangle),
args.m, args.n, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.b_mat(), args.b_offset, args.b_ld, args.beta,
diff --git a/test/routines/level3/xsyr2k.h b/test/routines/level3/xsyr2k.h
index be4e1851..abac20f4 100644
--- a/test/routines/level3/xsyr2k.h
+++ b/test/routines/level3/xsyr2k.h
@@ -99,9 +99,9 @@ class TestXsyr2k {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXsyr2k(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
- static_cast<clblasTranspose>(args.a_transpose),
+ auto status = clblasXsyr2k(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
+ convertToCLBLAS(args.a_transpose),
args.n, args.k, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.b_mat(), args.b_offset, args.b_ld, args.beta,
diff --git a/test/routines/level3/xsyrk.h b/test/routines/level3/xsyrk.h
index 7675e2aa..8a5fcb5f 100644
--- a/test/routines/level3/xsyrk.h
+++ b/test/routines/level3/xsyrk.h
@@ -91,9 +91,9 @@ class TestXsyrk {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXsyrk(static_cast<clblasOrder>(args.layout),
- static_cast<clblasUplo>(args.triangle),
- static_cast<clblasTranspose>(args.a_transpose),
+ auto status = clblasXsyrk(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.triangle),
+ convertToCLBLAS(args.a_transpose),
args.n, args.k, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld, args.beta,
buffers.c_mat(), args.c_offset, args.c_ld,
diff --git a/test/routines/level3/xtrmm.h b/test/routines/level3/xtrmm.h
index a085cb15..7c9c21bc 100644
--- a/test/routines/level3/xtrmm.h
+++ b/test/routines/level3/xtrmm.h
@@ -91,11 +91,11 @@ class TestXtrmm {
static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
- auto status = clblasXtrmm(static_cast<clblasOrder>(args.layout),
- static_cast<clblasSide>(args.side),
- static_cast<clblasUplo>(args.triangle),
- static_cast<clblasTranspose>(args.a_transpose),
- static_cast<clblasDiag>(args.diagonal),
+ auto status = clblasXtrmm(convertToCLBLAS(args.layout),
+ convertToCLBLAS(args.side),
+ convertToCLBLAS(args.triangle),
+ convertToCLBLAS(args.a_transpose),
+ convertToCLBLAS(args.diagonal),
args.m, args.n, args.alpha,
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.b_mat(), args.b_offset, args.b_ld,
diff --git a/test/wrapper_clblas.h b/test/wrapper_clblas.h
index a44466c6..23c55373 100644
--- a/test/wrapper_clblas.h
+++ b/test/wrapper_clblas.h
@@ -21,6 +21,13 @@
namespace clblast {
+// Conversions from CLBlast types
+clblasOrder convertToCLBLAS(const Layout v) { return (v == Layout::kRowMajor) ? clblasRowMajor : clblasColumnMajor; }
+clblasTranspose convertToCLBLAS(const Transpose v) { return (v == Transpose::kNo) ? clblasNoTrans : (v == Transpose::kYes) ? clblasTrans : clblasConjTrans; }
+clblasUplo convertToCLBLAS(const Triangle v) { return (v == Triangle::kUpper) ? clblasUpper : clblasLower; }
+clblasDiag convertToCLBLAS(const Diagonal v) { return (v == Diagonal::kUnit) ? clblasUnit : clblasNonUnit; }
+clblasSide convertToCLBLAS(const Side v) { return (v == Side::kLeft) ? clblasLeft : clblasRight; }
+
// =================================================================================================
// BLAS level-1 (vector-vector) routines
// =================================================================================================