Skip to content

Commit 6f4965f

Browse files
[SYCL][NFCI] Remove unnecessary partial specializations (#18115)
`parent_device` declaration isn't used because we have even more specialized `get_device_info_impl<device, info::device::parent_device>`. One can argue that it intends to catch "wrong" uses with incorrect return type, but that kind of handling isn't done to any other device descriptor in the file, don't see any reason to have one here. `device_version` isn't necessary because `std::string` return type partial specialization handles that scenario.
1 parent 08dc97c commit 6f4965f

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

sycl/source/detail/device_info.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,6 @@ template <typename Param> struct get_device_info_impl<std::string, Param> {
227227
}
228228
};
229229

230-
// Specialization for parent device
231-
template <typename ReturnT>
232-
struct get_device_info_impl<ReturnT, info::device::parent_device> {
233-
static ReturnT get(const DeviceImplPtr &Dev);
234-
};
235-
236230
// Specialization for fp_config types, checks the corresponding fp type support
237231
template <typename Param>
238232
struct get_device_info_impl<std::vector<info::fp_config>, Param> {
@@ -251,14 +245,6 @@ struct get_device_info_impl<std::vector<info::fp_config>, Param> {
251245
}
252246
};
253247

254-
// Specialization for device version
255-
template <> struct get_device_info_impl<std::string, info::device::version> {
256-
static std::string get(const DeviceImplPtr &Dev) {
257-
return Dev->get_device_info_string(
258-
UrInfoCode<info::device::version>::value);
259-
}
260-
};
261-
262248
// Specialization for single_fp_config, no type support check required
263249
template <>
264250
struct get_device_info_impl<std::vector<info::fp_config>,

0 commit comments

Comments
 (0)