summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-10-22 16:14:56 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-10-22 16:14:56 +0200
commita670c4c4bfa9557d2ae059c31aa773cf0f02ec12 (patch)
treed1f3e45501afa1818d824aa24b87148448575108 /samples
parent4a5516aa784d2f0352daf8579c377130a914b067 (diff)
All enums in the C API are now prefixed with CLBlast to avoid potential name clashes with other projects
Diffstat (limited to 'samples')
-rw-r--r--samples/cache.c10
-rw-r--r--samples/dgemv.c18
-rw-r--r--samples/haxpy.c10
-rw-r--r--samples/sasum.c10
-rw-r--r--samples/sgemm.c19
5 files changed, 34 insertions, 33 deletions
diff --git a/samples/cache.c b/samples/cache.c
index abc8ad4b..40f2163f 100644
--- a/samples/cache.c
+++ b/samples/cache.c
@@ -106,13 +106,13 @@ void run_example_routine(const cl_device_id device) {
clock_t start = clock();
// Calls an example routine
- StatusCode status = CLBlastSasum(n,
- device_output, 0,
- device_input, 0, 1,
- &queue, &event);
+ CLBlastStatusCode status = CLBlastSasum(n,
+ device_output, 0,
+ device_input, 0, 1,
+ &queue, &event);
// Wait for completion
- if (status == kSuccess) {
+ if (status == CLBlastSuccess) {
clWaitForEvents(1, &event);
clReleaseEvent(event);
}
diff --git a/samples/dgemv.c b/samples/dgemv.c
index a15d649a..dc2fe7db 100644
--- a/samples/dgemv.c
+++ b/samples/dgemv.c
@@ -74,17 +74,17 @@ int main(void) {
clEnqueueWriteBuffer(queue, device_y, CL_TRUE, 0, m*sizeof(double), host_y, 0, NULL, NULL);
// Call the DGEMV routine.
- StatusCode status = CLBlastDgemv(kRowMajor, kNo,
- m, n,
- alpha,
- device_a, 0, a_ld,
- device_x, 0, 1,
- beta,
- device_y, 0, 1,
- &queue, &event);
+ CLBlastStatusCode status = CLBlastDgemv(CLBlastLayoutRowMajor, CLBlastTransposeNo,
+ m, n,
+ alpha,
+ device_a, 0, a_ld,
+ device_x, 0, 1,
+ beta,
+ device_y, 0, 1,
+ &queue, &event);
// Wait for completion
- if (status == kSuccess) {
+ if (status == CLBlastSuccess) {
clWaitForEvents(1, &event);
clReleaseEvent(event);
}
diff --git a/samples/haxpy.c b/samples/haxpy.c
index 5bab3d42..8e0833f8 100644
--- a/samples/haxpy.c
+++ b/samples/haxpy.c
@@ -71,13 +71,13 @@ int main(void) {
clEnqueueWriteBuffer(queue, device_b, CL_TRUE, 0, n*sizeof(cl_half), host_b, 0, NULL, NULL);
// Call the HAXPY routine.
- StatusCode status = CLBlastHaxpy(n, alpha,
- device_a, 0, 1,
- device_b, 0, 1,
- &queue, &event);
+ CLBlastStatusCode status = CLBlastHaxpy(n, alpha,
+ device_a, 0, 1,
+ device_b, 0, 1,
+ &queue, &event);
// Wait for completion
- if (status == kSuccess) {
+ if (status == CLBlastSuccess) {
clWaitForEvents(1, &event);
clReleaseEvent(event);
}
diff --git a/samples/sasum.c b/samples/sasum.c
index 02f924b0..c285dd14 100644
--- a/samples/sasum.c
+++ b/samples/sasum.c
@@ -67,13 +67,13 @@ int main(void) {
clEnqueueWriteBuffer(queue, device_output, CL_TRUE, 0, 1*sizeof(float), host_output, 0, NULL, NULL);
// Call the SASUM routine.
- StatusCode status = CLBlastSasum(n,
- device_output, 0,
- device_input, 0, 1,
- &queue, &event);
+ CLBlastStatusCode status = CLBlastSasum(n,
+ device_output, 0,
+ device_input, 0, 1,
+ &queue, &event);
// Wait for completion
- if (status == kSuccess) {
+ if (status == CLBlastSuccess) {
clWaitForEvents(1, &event);
clReleaseEvent(event);
}
diff --git a/samples/sgemm.c b/samples/sgemm.c
index 583fc261..132dad81 100644
--- a/samples/sgemm.c
+++ b/samples/sgemm.c
@@ -77,17 +77,18 @@ int main(void) {
clEnqueueWriteBuffer(queue, device_c, CL_TRUE, 0, m*n*sizeof(float), host_c, 0, NULL, NULL);
// Call the SGEMM routine.
- StatusCode status = CLBlastSgemm(kRowMajor, kNo, kNo,
- m, n, k,
- alpha,
- device_a, 0, a_ld,
- device_b, 0, b_ld,
- beta,
- device_c, 0, c_ld,
- &queue, &event);
+ CLBlastStatusCode status = CLBlastSgemm(CLBlastLayoutRowMajor,
+ CLBlastTransposeNo, CLBlastTransposeNo,
+ m, n, k,
+ alpha,
+ device_a, 0, a_ld,
+ device_b, 0, b_ld,
+ beta,
+ device_c, 0, c_ld,
+ &queue, &event);
// Wait for completion
- if (status == kSuccess) {
+ if (status == CLBlastSuccess) {
clWaitForEvents(1, &event);
clReleaseEvent(event);
}