Skip to content

Commit fe4ad1a

Browse files
committed
Remove the last few bool -> uint32_t conversions from L0 device info.
1 parent 719bb9c commit fe4ad1a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/adapters/level_zero/device.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
256256
// > The application must only use the module for the device, or its
257257
// > sub-devices, which was provided during creation.
258258
case UR_DEVICE_INFO_BUILD_ON_SUBDEVICE:
259-
return ReturnValue(uint32_t{0});
259+
return ReturnValue(ur_bool_t{0});
260260
case UR_DEVICE_INFO_COMPILER_AVAILABLE:
261261
return ReturnValue(static_cast<ur_bool_t>(true));
262262
case UR_DEVICE_INFO_LINKER_AVAILABLE:
@@ -326,10 +326,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
326326
return ReturnValue(Device->ZeDeviceImageProperties->maxImageDims1D > 0);
327327
case UR_DEVICE_INFO_HOST_UNIFIED_MEMORY:
328328
return ReturnValue(
329-
static_cast<uint32_t>((Device->ZeDeviceProperties->flags &
330-
ZE_DEVICE_PROPERTY_FLAG_INTEGRATED) != 0));
329+
static_cast<ur_bool_t>((Device->ZeDeviceProperties->flags &
330+
ZE_DEVICE_PROPERTY_FLAG_INTEGRATED) != 0));
331331
case UR_DEVICE_INFO_AVAILABLE:
332-
return ReturnValue(static_cast<uint32_t>(ZeDevice ? true : false));
332+
return ReturnValue(static_cast<ur_bool_t>(ZeDevice ? true : false));
333333
case UR_DEVICE_INFO_VENDOR:
334334
// TODO: Level-Zero does not return vendor's name at the moment
335335
// only the ID.
@@ -448,8 +448,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
448448
case UR_DEVICE_INFO_ENDIAN_LITTLE:
449449
return ReturnValue(static_cast<ur_bool_t>(true));
450450
case UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT:
451-
return ReturnValue(static_cast<uint32_t>(Device->ZeDeviceProperties->flags &
452-
ZE_DEVICE_PROPERTY_FLAG_ECC));
451+
return ReturnValue(static_cast<ur_bool_t>(
452+
Device->ZeDeviceProperties->flags & ZE_DEVICE_PROPERTY_FLAG_ECC));
453453
case UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION:
454454
return ReturnValue(
455455
static_cast<size_t>(Device->ZeDeviceProperties->timerResolution));

0 commit comments

Comments
 (0)