summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/cache.c1
-rw-r--r--samples/dgemv.c1
-rw-r--r--samples/dtrsm.cpp5
-rw-r--r--samples/haxpy.c1
-rw-r--r--samples/samax.c4
-rw-r--r--samples/sasum.c1
-rw-r--r--samples/sgemm.c1
-rw-r--r--samples/sgemm.cpp5
-rw-r--r--samples/sgemm_batched.cpp5
-rw-r--r--samples/tuning_api.cpp7
10 files changed, 20 insertions, 11 deletions
diff --git a/samples/cache.c b/samples/cache.c
index 980c7cf3..2a48c321 100644
--- a/samples/cache.c
+++ b/samples/cache.c
@@ -20,6 +20,7 @@
#include <string.h>
#include <time.h>
+#define CL_TARGET_OPENCL_VERSION 120
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS // to disable deprecation warnings
// Includes the CLBlast library (C interface)
diff --git a/samples/dgemv.c b/samples/dgemv.c
index 975cb7ac..b579b25a 100644
--- a/samples/dgemv.c
+++ b/samples/dgemv.c
@@ -19,6 +19,7 @@
#include <stdio.h>
#include <string.h>
+#define CL_TARGET_OPENCL_VERSION 120
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS // to disable deprecation warnings
// Includes the CLBlast library (C interface)
diff --git a/samples/dtrsm.cpp b/samples/dtrsm.cpp
index c558d1f5..e207e5d3 100644
--- a/samples/dtrsm.cpp
+++ b/samples/dtrsm.cpp
@@ -24,8 +24,9 @@
// Includes the C++ OpenCL API. If not yet available, it can be found here:
// https://raw.githubusercontent.com/KhronosGroup/OpenCL-CLHPP/main/include/CL/opencl.hpp
-#define CL_HPP_TARGET_OPENCL_VERSION 210
-#define CL_TARGET_OPENCL_VERSION 210
+#define CL_HPP_TARGET_OPENCL_VERSION 120
+#define CL_HPP_MINIMUM_OPENCL_VERSION 120
+#define CL_TARGET_OPENCL_VERSION 120
#include "opencl.hpp"
// Includes the CLBlast library
diff --git a/samples/haxpy.c b/samples/haxpy.c
index 4f2bb400..ad3eabae 100644
--- a/samples/haxpy.c
+++ b/samples/haxpy.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <string.h>
+#define CL_TARGET_OPENCL_VERSION 120
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS // to disable deprecation warnings
// Includes the CLBlast library (C interface)
diff --git a/samples/samax.c b/samples/samax.c
index 36e78846..27a8f133 100644
--- a/samples/samax.c
+++ b/samples/samax.c
@@ -19,7 +19,7 @@
#include <stdio.h>
#include <string.h>
-#define CL_TARGET_OPENCL_VERSION 110
+#define CL_TARGET_OPENCL_VERSION 120
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS // to disable deprecation warnings
// Includes the CLBlast library (C interface)
@@ -84,7 +84,7 @@ int main(void) {
clEnqueueReadBuffer(queue, device_output, CL_TRUE, 0, 1*sizeof(unsigned int), host_output, 0, NULL, NULL);
// Example completed. See "clblast_c.h" for status codes (0 -> success).
- printf("Completed iSAMAX with status %d: array of %d values with staircases from 0..9 repeated, max at index %zu with value %.0lf\n",
+ printf("Completed iSAMAX with status %d: array of %zu values with staircases from 0..9 repeated, max at index %u with value %.0lf\n",
status, n, host_output[0], host_input[host_output[0]]);
// Clean-up
diff --git a/samples/sasum.c b/samples/sasum.c
index 78377336..36efef4c 100644
--- a/samples/sasum.c
+++ b/samples/sasum.c
@@ -19,6 +19,7 @@
#include <stdio.h>
#include <string.h>
+#define CL_TARGET_OPENCL_VERSION 120
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS // to disable deprecation warnings
// Includes the CLBlast library (C interface)
diff --git a/samples/sgemm.c b/samples/sgemm.c
index 92f3057d..df105f17 100644
--- a/samples/sgemm.c
+++ b/samples/sgemm.c
@@ -19,6 +19,7 @@
#include <stdio.h>
#include <string.h>
+#define CL_TARGET_OPENCL_VERSION 120
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS // to disable deprecation warnings
// Includes the CLBlast library (C interface)
diff --git a/samples/sgemm.cpp b/samples/sgemm.cpp
index 534ffa78..f2acfff6 100644
--- a/samples/sgemm.cpp
+++ b/samples/sgemm.cpp
@@ -25,8 +25,9 @@
// Includes the C++ OpenCL API. If not yet available, it can be found here:
// https://raw.githubusercontent.com/KhronosGroup/OpenCL-CLHPP/main/include/CL/opencl.hpp
-#define CL_HPP_TARGET_OPENCL_VERSION 210
-#define CL_TARGET_OPENCL_VERSION 210
+#define CL_HPP_TARGET_OPENCL_VERSION 120
+#define CL_HPP_MINIMUM_OPENCL_VERSION 120
+#define CL_TARGET_OPENCL_VERSION 120
#include "opencl.hpp"
// Includes the CLBlast library
diff --git a/samples/sgemm_batched.cpp b/samples/sgemm_batched.cpp
index a839d305..d17d31c3 100644
--- a/samples/sgemm_batched.cpp
+++ b/samples/sgemm_batched.cpp
@@ -25,8 +25,9 @@
// Includes the C++ OpenCL API. If not yet available, it can be found here:
// https://raw.githubusercontent.com/KhronosGroup/OpenCL-CLHPP/main/include/CL/opencl.hpp
-#define CL_HPP_TARGET_OPENCL_VERSION 210
-#define CL_TARGET_OPENCL_VERSION 210
+#define CL_HPP_TARGET_OPENCL_VERSION 120
+#define CL_HPP_MINIMUM_OPENCL_VERSION 120
+#define CL_TARGET_OPENCL_VERSION 120
#include "opencl.hpp"
// Includes the CLBlast library
diff --git a/samples/tuning_api.cpp b/samples/tuning_api.cpp
index 7d7294ad..a9968101 100644
--- a/samples/tuning_api.cpp
+++ b/samples/tuning_api.cpp
@@ -21,8 +21,9 @@
// Includes the C++ OpenCL API. If not yet available, it can be found here:
// https://raw.githubusercontent.com/KhronosGroup/OpenCL-CLHPP/main/include/CL/opencl.hpp
-#define CL_HPP_TARGET_OPENCL_VERSION 210
-#define CL_TARGET_OPENCL_VERSION 210
+#define CL_HPP_TARGET_OPENCL_VERSION 120
+#define CL_HPP_MINIMUM_OPENCL_VERSION 120
+#define CL_TARGET_OPENCL_VERSION 120
#include "opencl.hpp"
// Includes the CLBlast library
@@ -66,7 +67,7 @@ int main() {
// Tuning completed. See "clblast.h" for status codes (0 -> success).
printf("Completed TuneCopy with status %d (0 == OK), found parameters:\n", static_cast<int>(status));
- for (const auto parameter: parameters) {
+ for (const auto &parameter: parameters) {
printf("> %s = %zu\n", parameter.first.c_str(), parameter.second);
}