File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1048,6 +1048,10 @@ static inline unsigned int get_device_id(const sycl::device &dev);
10481048// Util function to get the number of available devices
10491049static inline unsigned int device_count();
10501050
1051+ // Util function to check whether a device supports some kinds of sycl::aspect.
1052+ static inline void
1053+ has_capability_or_fail(const sycl::device &dev,
1054+ const std::initializer_list<sycl::aspect> &props);
10511055} // syclcompat
10521056```
10531057
Original file line number Diff line number Diff line change @@ -959,4 +959,10 @@ static inline unsigned int get_device_id(const sycl::device &dev) {
959959static inline unsigned int device_count() {
960960 return detail::dev_mgr::instance().device_count();
961961}
962+
963+ static inline void
964+ has_capability_or_fail(const sycl::device &dev,
965+ const std::initializer_list<sycl::aspect> &props) {
966+ get_device(get_device_id(dev)).has_capability_or_fail(props);
967+ }
962968} // namespace syclcompat
You can’t perform that action at this time.
0 commit comments