From 9736cd0b67615586b643c1184da0f585ae5f1144 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Mon, 17 Nov 2025 08:21:08 -0800 Subject: [PATCH] switch the return type for is_extension_available to bool (#2581) from a review comment: https://github.com/KhronosGroup/OpenCL-CTS/pull/2579#pullrequestreview-3463737641 We should use `bool` as the return type for `is_extension_available`, not `int`. --- test_common/harness/deviceInfo.cpp | 2 +- test_common/harness/deviceInfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test_common/harness/deviceInfo.cpp b/test_common/harness/deviceInfo.cpp index 5b1e7e03..e06d32aa 100644 --- a/test_common/harness/deviceInfo.cpp +++ b/test_common/harness/deviceInfo.cpp @@ -50,7 +50,7 @@ std::string get_device_info_string(cl_device_id device, } /* Determines if an extension is supported by a device. */ -int is_extension_available(cl_device_id device, const char *extensionName) +bool is_extension_available(cl_device_id device, const char *extensionName) { std::string extString = get_device_extensions_string(device); std::istringstream ss(extString); diff --git a/test_common/harness/deviceInfo.h b/test_common/harness/deviceInfo.h index c3c8a512..30711b18 100644 --- a/test_common/harness/deviceInfo.h +++ b/test_common/harness/deviceInfo.h @@ -26,7 +26,7 @@ std::string get_device_info_string(cl_device_id device, cl_device_info param_name); /* Determines if an extension is supported by a device. */ -int is_extension_available(cl_device_id device, const char *extensionName); +bool is_extension_available(cl_device_id device, const char *extensionName); /* Returns the version of the extension the device supports or throws an * exception if the extension is not supported by the device. */