DPC++ Runtime
Runtime libraries for oneAPI DPC++
filter_selector.hpp
Go to the documentation of this file.
1 //==------ filter_selector.hpp - ONEAPI filter selector -------*- C++ --*---==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #pragma once
10 
12 
13 #include <memory>
14 #include <string>
15 
16 // 4.6.1 Device selection class
17 
19 namespace sycl {
20 
21 // Forward declarations
22 class device;
23 class device_selector;
24 
25 namespace ext {
26 namespace oneapi {
27 namespace detail {
28 class filter_selector_impl;
29 } // namespace detail
30 
31 class __SYCL_EXPORT filter_selector : public device_selector {
32 public:
33  filter_selector(const std::string &filter);
34  int operator()(const device &dev) const override;
35  void reset() const;
36  device select_device() const override;
37 
38 private:
39  std::shared_ptr<detail::filter_selector_impl> impl;
40 };
41 } // namespace oneapi
42 } // namespace ext
43 
44 #ifdef __SYCL_INTERNAL_API
45 namespace __SYCL2020_DEPRECATED("use 'ext::oneapi' instead") ONEAPI {
46  using namespace ext::oneapi;
47  class __SYCL_EXPORT filter_selector : public ext::oneapi::filter_selector {
48  public:
49  filter_selector(const std::string &filter);
50  int operator()(const device &dev) const override;
51  void reset() const;
52  device select_device() const override;
53  };
54 } // namespace ONEAPI
55 #endif // __SYCL_INTERNAL_API
56 } // namespace sycl
57 } // __SYCL_INLINE_NAMESPACE(cl)
cl::sycl::device_selector
The device_selector class provides ability to choose the best SYCL device based on heuristics specifi...
Definition: device_selector.hpp:28
cl::sycl::info::device
device
Definition: info_desc.hpp:53
__SYCL2020_DEPRECATED
#define __SYCL2020_DEPRECATED(message)
Definition: defines_elementary.hpp:56
device_selector.hpp
cl::sycl::ext::oneapi::detail::filter
struct sycl::detail::device_filter filter
Definition: filter_selector_impl.hpp:26
sycl
Definition: invoke_simd.hpp:68
cl::sycl::device
The SYCL device class encapsulates a single SYCL device on which kernels may be executed.
Definition: device.hpp:35
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
cl::sycl::ext::oneapi::filter_selector
Definition: filter_selector.hpp:31
cl::sycl::instead
std::uint8_t instead
Definition: aliases.hpp:68
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12