DPC++ Runtime
Runtime libraries for oneAPI DPC++
filter_selector_impl.hpp
Go to the documentation of this file.
1 //==-- filter_selector_impl.hpp - oneapi filter selector impl--*- 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 
13 
14 #include <vector>
15 
17 namespace sycl {
18 
19 // Forward declarations
20 class device;
21 
22 namespace ext {
23 namespace oneapi {
24 namespace detail {
25 
27 
29 public:
30  filter_selector_impl(const std::string &filter);
31  int operator()(const device &dev) const;
32  void reset() const;
33 
34 private:
35  static constexpr int REJECT_DEVICE_SCORE = -1;
36  mutable std::vector<filter> mFilters;
37  default_selector mRanker;
38  mutable int mNumDevicesSeen;
39  int mNumTotalDevices;
40  mutable bool mMatchFound;
41 };
42 } // namespace detail
43 } // namespace oneapi
44 } // namespace ext
45 
46 namespace __SYCL2020_DEPRECATED("use 'ext::oneapi' instead") ONEAPI {
47  using namespace ext::oneapi;
48 }
49 } // namespace sycl
50 } // __SYCL_INLINE_NAMESPACE(cl)
cl::sycl::info::device
device
Definition: info_desc.hpp:53
device_filter.hpp
__SYCL2020_DEPRECATED
#define __SYCL2020_DEPRECATED(message)
Definition: defines_elementary.hpp:56
cl::sycl::detail::device_filter
Definition: device_filter.hpp:22
device_selector.hpp
sycl
Definition: invoke_simd.hpp:68
cl::sycl::default_selector
The default selector chooses the first available SYCL device.
Definition: device_selector.hpp:46
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::instead
std::uint8_t instead
Definition: aliases.hpp:68
cl::sycl::ext::oneapi::detail::filter_selector_impl
Definition: filter_selector_impl.hpp:28
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12