Skip to content

Commit 5e66ecc

Browse files
committed
Simplify device info helpers
1 parent 32957aa commit 5e66ecc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sycl/source/detail/device_impl.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -801,17 +801,15 @@ ext::oneapi::experimental::architecture device_impl::getDeviceArch() const {
801801
}
802802

803803
bool device_impl::isFp16Supported() const {
804-
auto Fp16Config = get_info<info::device::half_fp_config>();
805804
// If we don't get anything back from this we can assume the device doesn't
806805
// support fp16.
807-
return Fp16Config.empty() ? false : true;
806+
return !get_info<info::device::half_fp_config>().empty();
808807
}
809808

810809
bool device_impl::isFp64Supported() const {
811-
auto Fp64Config = get_info<info::device::double_fp_config>();
812810
// If we don't get anything back from this we can assume the device doesn't
813811
// support fp64.
814-
return Fp64Config.empty() ? false : true;
812+
return !get_info<info::device::double_fp_config>().empty();
815813
}
816814

817815
// On the first call this function queries for device timestamp

0 commit comments

Comments
 (0)