alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
PlatformCpuSycl.hpp
Go to the documentation of this file.
1/* Copyright 2024 Jan Stephan, Luca Ferragina, Andrea Bocci, Aurora Perego
2 * SPDX-License-Identifier: MPL-2.0
3 */
4
5#pragma once
6
10
11#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_CPU)
12
13# include <sycl/sycl.hpp>
14
15namespace alpaka
16{
17 namespace detail
18 {
19 template<>
20 struct SYCLDeviceSelector<TagCpuSycl>
21 {
22 auto operator()(sycl::device const& dev) const -> int
23 {
24 return dev.is_cpu() ? 1 : -1;
25 }
26 };
27 } // namespace detail
28
29 //! The SYCL device manager.
30 using PlatformCpuSycl = PlatformGenericSycl<TagCpuSycl>;
31} // namespace alpaka
32
33#endif
The alpaka accelerator library.