summaryrefslogtreecommitdiff
path: root/src/utilities/utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utilities/utilities.cpp')
-rw-r--r--src/utilities/utilities.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utilities/utilities.cpp b/src/utilities/utilities.cpp
index a0e89c98..29161e74 100644
--- a/src/utilities/utilities.cpp
+++ b/src/utilities/utilities.cpp
@@ -498,6 +498,19 @@ std::string GetDeviceName(const Device& device) {
// =================================================================================================
+void SetOpenCLKernelStandard(const Device &device, std::vector<std::string> &options) {
+ // Inclusion of one of the following extensions needs OpenCL 1.2 kernels
+ if (device.HasExtension(kKhronosIntelSubgroups)) {
+ options.push_back("-cl-std=CL1.2");
+ }
+ // Otherwise we fall-back to the default CLBlast OpenCL 1.1
+ else {
+ options.push_back("-cl-std=CL1.1");
+ }
+}
+
+// =================================================================================================
+
// Solve Bezout's identity
// a * p + b * q = r = GCD(a, b)
void EuclidGCD(int a, int b, int &p, int &q, int &r) {