summaryrefslogtreecommitdiff
path: root/test/routines
diff options
context:
space:
mode:
authorCNugteren <web@cedricnugteren.nl>2015-07-27 07:18:06 +0200
committerCNugteren <web@cedricnugteren.nl>2015-07-27 07:18:06 +0200
commitf7199b831f847340f0921ef2140a4e64809db037 (patch)
treed725b7e63b0662598ad4be0a4c2457820ded8ed4 /test/routines
parentb10f4a633c4ffb3bb04d35503396ff94528df4d0 (diff)
Now using the new Claduc C++11 OpenCL header
Diffstat (limited to 'test/routines')
-rw-r--r--test/routines/level1/xaxpy.h11
-rw-r--r--test/routines/level2/xgemv.h11
-rw-r--r--test/routines/level3/xgemm.h11
-rw-r--r--test/routines/level3/xhemm.h11
-rw-r--r--test/routines/level3/xher2k.h11
-rw-r--r--test/routines/level3/xherk.h11
-rw-r--r--test/routines/level3/xsymm.h11
-rw-r--r--test/routines/level3/xsyr2k.h11
-rw-r--r--test/routines/level3/xsyrk.h11
-rw-r--r--test/routines/level3/xtrmm.h11
10 files changed, 40 insertions, 70 deletions
diff --git a/test/routines/level1/xaxpy.h b/test/routines/level1/xaxpy.h
index 6ce5d7e2..866fb620 100644
--- a/test/routines/level1/xaxpy.h
+++ b/test/routines/level1/xaxpy.h
@@ -57,8 +57,7 @@ class TestXaxpy {
static size_t DefaultLDC(const Arguments<T> &) { return 1; } // N/A for this routine
// Describes how to run the CLBlast routine
- static StatusCode RunRoutine(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = Axpy(args.n, args.alpha,
@@ -70,8 +69,7 @@ class TestXaxpy {
}
// Describes how to run the clBLAS routine (for correctness/performance comparison)
- static StatusCode RunReference(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = clblasXaxpy(args.n, args.alpha,
@@ -83,10 +81,9 @@ class TestXaxpy {
}
// Describes how to download the results of the computation (more importantly: which buffer)
- static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers &buffers,
- CommandQueue &queue) {
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
std::vector<T> result(args.y_size, static_cast<T>(0));
- buffers.y_vec.ReadBuffer(queue, args.y_size*sizeof(T), result);
+ buffers.y_vec.Read(queue, args.y_size, result);
return result;
}
diff --git a/test/routines/level2/xgemv.h b/test/routines/level2/xgemv.h
index 73f7d76e..056dec30 100644
--- a/test/routines/level2/xgemv.h
+++ b/test/routines/level2/xgemv.h
@@ -68,8 +68,7 @@ class TestXgemv {
static size_t DefaultLDC(const Arguments<T> &) { return 1; } // N/A for this routine
// Describes how to run the CLBlast routine
- static StatusCode RunRoutine(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = Gemv(args.layout, args.a_transpose,
@@ -83,8 +82,7 @@ class TestXgemv {
}
// Describes how to run the clBLAS routine (for correctness/performance comparison)
- static StatusCode RunReference(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = clblasXgemv(static_cast<clblasOrder>(args.layout),
@@ -99,10 +97,9 @@ class TestXgemv {
}
// Describes how to download the results of the computation (more importantly: which buffer)
- static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers &buffers,
- CommandQueue &queue) {
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
std::vector<T> result(args.y_size, static_cast<T>(0));
- buffers.y_vec.ReadBuffer(queue, args.y_size*sizeof(T), result);
+ buffers.y_vec.Read(queue, args.y_size, result);
return result;
}
diff --git a/test/routines/level3/xgemm.h b/test/routines/level3/xgemm.h
index 86a304d1..f06719d6 100644
--- a/test/routines/level3/xgemm.h
+++ b/test/routines/level3/xgemm.h
@@ -70,8 +70,7 @@ class TestXgemm {
static size_t DefaultLDC(const Arguments<T> &args) { return args.n; }
// Describes how to run the CLBlast routine
- static StatusCode RunRoutine(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = Gemm(args.layout, args.a_transpose, args.b_transpose,
@@ -85,8 +84,7 @@ class TestXgemm {
}
// Describes how to run the clBLAS routine (for correctness/performance comparison)
- static StatusCode RunReference(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = clblasXgemm(static_cast<clblasOrder>(args.layout),
@@ -102,10 +100,9 @@ class TestXgemm {
}
// Describes how to download the results of the computation (more importantly: which buffer)
- static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers &buffers,
- CommandQueue &queue) {
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
std::vector<T> result(args.c_size, static_cast<T>(0));
- buffers.c_mat.ReadBuffer(queue, args.c_size*sizeof(T), result);
+ buffers.c_mat.Read(queue, args.c_size, result);
return result;
}
diff --git a/test/routines/level3/xhemm.h b/test/routines/level3/xhemm.h
index 75878b06..0c3b9c31 100644
--- a/test/routines/level3/xhemm.h
+++ b/test/routines/level3/xhemm.h
@@ -70,8 +70,7 @@ class TestXhemm {
static size_t DefaultLDC(const Arguments<T> &args) { return args.n; }
// Describes how to run the CLBlast routine
- static StatusCode RunRoutine(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = Hemm(args.layout, args.side, args.triangle,
@@ -85,8 +84,7 @@ class TestXhemm {
}
// Describes how to run the clBLAS routine (for correctness/performance comparison)
- static StatusCode RunReference(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = clblasXhemm(static_cast<clblasOrder>(args.layout),
@@ -102,10 +100,9 @@ class TestXhemm {
}
// Describes how to download the results of the computation (more importantly: which buffer)
- static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers &buffers,
- CommandQueue &queue) {
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
std::vector<T> result(args.c_size, static_cast<T>(0));
- buffers.c_mat.ReadBuffer(queue, args.c_size*sizeof(T), result);
+ buffers.c_mat.Read(queue, args.c_size, result);
return result;
}
diff --git a/test/routines/level3/xher2k.h b/test/routines/level3/xher2k.h
index f13e8a62..b20ec973 100644
--- a/test/routines/level3/xher2k.h
+++ b/test/routines/level3/xher2k.h
@@ -68,8 +68,7 @@ class TestXher2k {
static size_t DefaultLDC(const Arguments<U> &args) { return args.n; }
// Describes how to run the CLBlast routine
- static StatusCode RunRoutine(const Arguments<U> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunRoutine(const Arguments<U> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto alpha2 = T{args.alpha, args.alpha};
@@ -84,8 +83,7 @@ class TestXher2k {
}
// Describes how to run the clBLAS routine (for correctness/performance comparison)
- static StatusCode RunReference(const Arguments<U> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunReference(const Arguments<U> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto alpha2 = T{args.alpha, args.alpha};
@@ -102,10 +100,9 @@ class TestXher2k {
}
// Describes how to download the results of the computation (more importantly: which buffer)
- static std::vector<T> DownloadResult(const Arguments<U> &args, Buffers &buffers,
- CommandQueue &queue) {
+ static std::vector<T> DownloadResult(const Arguments<U> &args, Buffers<T> &buffers, Queue &queue) {
std::vector<T> result(args.c_size, static_cast<T>(0));
- buffers.c_mat.ReadBuffer(queue, args.c_size*sizeof(T), result);
+ buffers.c_mat.Read(queue, args.c_size, result);
return result;
}
diff --git a/test/routines/level3/xherk.h b/test/routines/level3/xherk.h
index 780b9b52..20c2b4b8 100644
--- a/test/routines/level3/xherk.h
+++ b/test/routines/level3/xherk.h
@@ -61,8 +61,7 @@ class TestXherk {
static size_t DefaultLDC(const Arguments<U> &args) { return args.n; }
// Describes how to run the CLBlast routine
- static StatusCode RunRoutine(const Arguments<U> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunRoutine(const Arguments<U> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = Herk(args.layout, args.triangle, args.a_transpose,
@@ -75,8 +74,7 @@ class TestXherk {
}
// Describes how to run the clBLAS routine (for correctness/performance comparison)
- static StatusCode RunReference(const Arguments<U> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunReference(const Arguments<U> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = clblasXherk(static_cast<clblasOrder>(args.layout),
@@ -91,10 +89,9 @@ class TestXherk {
}
// Describes how to download the results of the computation (more importantly: which buffer)
- static std::vector<T> DownloadResult(const Arguments<U> &args, Buffers &buffers,
- CommandQueue &queue) {
+ static std::vector<T> DownloadResult(const Arguments<U> &args, Buffers<T> &buffers, Queue &queue) {
std::vector<T> result(args.c_size, static_cast<T>(0));
- buffers.c_mat.ReadBuffer(queue, args.c_size*sizeof(T), result);
+ buffers.c_mat.Read(queue, args.c_size, result);
return result;
}
diff --git a/test/routines/level3/xsymm.h b/test/routines/level3/xsymm.h
index 10476349..5b5ad351 100644
--- a/test/routines/level3/xsymm.h
+++ b/test/routines/level3/xsymm.h
@@ -70,8 +70,7 @@ class TestXsymm {
static size_t DefaultLDC(const Arguments<T> &args) { return args.n; }
// Describes how to run the CLBlast routine
- static StatusCode RunRoutine(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = Symm(args.layout, args.side, args.triangle,
@@ -85,8 +84,7 @@ class TestXsymm {
}
// Describes how to run the clBLAS routine (for correctness/performance comparison)
- static StatusCode RunReference(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = clblasXsymm(static_cast<clblasOrder>(args.layout),
@@ -102,10 +100,9 @@ class TestXsymm {
}
// Describes how to download the results of the computation (more importantly: which buffer)
- static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers &buffers,
- CommandQueue &queue) {
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
std::vector<T> result(args.c_size, static_cast<T>(0));
- buffers.c_mat.ReadBuffer(queue, args.c_size*sizeof(T), result);
+ buffers.c_mat.Read(queue, args.c_size, result);
return result;
}
diff --git a/test/routines/level3/xsyr2k.h b/test/routines/level3/xsyr2k.h
index f3b1b542..21fcee2a 100644
--- a/test/routines/level3/xsyr2k.h
+++ b/test/routines/level3/xsyr2k.h
@@ -68,8 +68,7 @@ class TestXsyr2k {
static size_t DefaultLDC(const Arguments<T> &args) { return args.n; }
// Describes how to run the CLBlast routine
- static StatusCode RunRoutine(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = Syr2k(args.layout, args.triangle, args.a_transpose,
@@ -83,8 +82,7 @@ class TestXsyr2k {
}
// Describes how to run the clBLAS routine (for correctness/performance comparison)
- static StatusCode RunReference(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = clblasXsyr2k(static_cast<clblasOrder>(args.layout),
@@ -100,10 +98,9 @@ class TestXsyr2k {
}
// Describes how to download the results of the computation (more importantly: which buffer)
- static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers &buffers,
- CommandQueue &queue) {
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
std::vector<T> result(args.c_size, static_cast<T>(0));
- buffers.c_mat.ReadBuffer(queue, args.c_size*sizeof(T), result);
+ buffers.c_mat.Read(queue, args.c_size, result);
return result;
}
diff --git a/test/routines/level3/xsyrk.h b/test/routines/level3/xsyrk.h
index 2ec9fb65..c92693c2 100644
--- a/test/routines/level3/xsyrk.h
+++ b/test/routines/level3/xsyrk.h
@@ -61,8 +61,7 @@ class TestXsyrk {
static size_t DefaultLDC(const Arguments<T> &args) { return args.n; }
// Describes how to run the CLBlast routine
- static StatusCode RunRoutine(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = Syrk(args.layout, args.triangle, args.a_transpose,
@@ -75,8 +74,7 @@ class TestXsyrk {
}
// Describes how to run the clBLAS routine (for correctness/performance comparison)
- static StatusCode RunReference(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = clblasXsyrk(static_cast<clblasOrder>(args.layout),
@@ -91,10 +89,9 @@ class TestXsyrk {
}
// Describes how to download the results of the computation (more importantly: which buffer)
- static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers &buffers,
- CommandQueue &queue) {
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
std::vector<T> result(args.c_size, static_cast<T>(0));
- buffers.c_mat.ReadBuffer(queue, args.c_size*sizeof(T), result);
+ buffers.c_mat.Read(queue, args.c_size, result);
return result;
}
diff --git a/test/routines/level3/xtrmm.h b/test/routines/level3/xtrmm.h
index 7b7e7af1..d5a52903 100644
--- a/test/routines/level3/xtrmm.h
+++ b/test/routines/level3/xtrmm.h
@@ -61,8 +61,7 @@ class TestXtrmm {
static size_t DefaultLDC(const Arguments<T> &) { return 1; } // N/A for this routine
// Describes how to run the CLBlast routine
- static StatusCode RunRoutine(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunRoutine(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = Trmm(args.layout, args.side, args.triangle, args.a_transpose, args.diagonal,
@@ -75,8 +74,7 @@ class TestXtrmm {
}
// Describes how to run the clBLAS routine (for correctness/performance comparison)
- static StatusCode RunReference(const Arguments<T> &args, const Buffers &buffers,
- CommandQueue &queue) {
+ static StatusCode RunReference(const Arguments<T> &args, const Buffers<T> &buffers, Queue &queue) {
auto queue_plain = queue();
auto event = cl_event{};
auto status = clblasXtrmm(static_cast<clblasOrder>(args.layout),
@@ -93,10 +91,9 @@ class TestXtrmm {
}
// Describes how to download the results of the computation (more importantly: which buffer)
- static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers &buffers,
- CommandQueue &queue) {
+ static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
std::vector<T> result(args.b_size, static_cast<T>(0));
- buffers.b_mat.ReadBuffer(queue, args.b_size*sizeof(T), result);
+ buffers.b_mat.Read(queue, args.b_size, result);
return result;
}