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
7#include "alpaka/acc/Tag.hpp"
11
12#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_CPU)
13
14# include <sycl/sycl.hpp>
15
16namespace alpaka
17{
18 namespace detail
19 {
20 template<>
21 struct SYCLDeviceSelector<TagCpuSycl>
22 {
23 auto operator()(sycl::device const& dev) const -> int
24 {
25 return dev.is_cpu() ? 1 : -1;
26 }
27 };
28 } // namespace detail
29
30 //! The SYCL device manager.
31 using PlatformCpuSycl = PlatformGenericSycl<TagCpuSycl>;
32} // namespace alpaka
33
34#endif
The alpaka accelerator library.