Skip to content

Commit

Permalink
fix get_info
Browse files Browse the repository at this point in the history
Signed-off-by: Byoungro So <byoungro.so@intel.com>
  • Loading branch information
bso-intel committed Feb 10, 2024
1 parent 6f36028 commit f4655aa
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions sycl/include/sycl/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,15 @@ class __SYCL_EXPORT device : public detail::OwnerLessBase<device> {
typename detail::is_device_info_desc<Param>::return_type get_info() const {
// For C++11_ABI compatibility, we handle these string Param types
// separately.
if constexpr (std::is_same_v<Param, info::device::name> ||
std::is_same_v<Param, info::device::vendor> ||
std::is_same_v<Param, info::device::driver_version> ||
std::is_same_v<Param, info::device::version> ||
std::is_same_v<Param, info::device::profile> ||
std::is_same_v<Param, info::device::opencl_c_version> ||
std::is_same_v<Param, info::device::ext_intel_pci_address>) {
if constexpr (std::is_same_v<std::string,
typename detail::is_device_info_desc<
Param>::return_type>) {
detail::string_view PropertyName(typeid(Param).name());
detail::string Info = get_device_info(PropertyName);
return Info.c_str();
} else if constexpr (std::is_same_v<Param, info::device::extensions>) {
} else if constexpr (std::is_same_v<std::vector<std::string>,
typename detail::is_device_info_desc<
Param>::return_type>) {
// return value is std::vector<std::string>
detail::string_view PropertyName(typeid(Param).name());
std::vector<detail::string> Info = get_device_info_vector(PropertyName);
Expand Down

0 comments on commit f4655aa

Please sign in to comment.