mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
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`.
This commit is contained in:
@@ -50,7 +50,7 @@ std::string get_device_info_string(cl_device_id device,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Determines if an extension is supported by a 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::string extString = get_device_extensions_string(device);
|
||||||
std::istringstream ss(extString);
|
std::istringstream ss(extString);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ std::string get_device_info_string(cl_device_id device,
|
|||||||
cl_device_info param_name);
|
cl_device_info param_name);
|
||||||
|
|
||||||
/* Determines if an extension is supported by a 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);
|
||||||
|
|
||||||
/* Returns the version of the extension the device supports or throws an
|
/* Returns the version of the extension the device supports or throws an
|
||||||
* exception if the extension is not supported by the device. */
|
* exception if the extension is not supported by the device. */
|
||||||
|
|||||||
Reference in New Issue
Block a user