alpaka
Abstraction Library for Parallel Kernel Acceleration
PlatformCpuSycl.hpp
Go to the documentation of this file.
1
/* Copyright 2023 Jan Stephan, Luca Ferragina, Andrea Bocci
2
* SPDX-License-Identifier: MPL-2.0
3
*/
4
5
#pragma once
6
7
#include "
alpaka/dev/DevGenericSycl.hpp
"
8
#include "
alpaka/dev/Traits.hpp
"
9
#include "
alpaka/platform/PlatformGenericSycl.hpp
"
10
11
#include <string>
12
13
#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_CPU)
14
15
# include <sycl/sycl.hpp>
16
17
namespace
alpaka
18
{
19
namespace
detail
20
{
21
struct
SyclCpuSelector
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<detail::SyclCpuSelector>;
32
}
// namespace alpaka
33
34
namespace
alpaka::trait
35
{
36
//! The SYCL device manager device type trait specialization.
37
template
<>
38
struct
DevType<PlatformCpuSycl>
39
{
40
using
type = DevGenericSycl<PlatformCpuSycl>;
// = DevCpuSycl
41
};
42
}
// namespace alpaka::trait
43
44
#endif
DevGenericSycl.hpp
PlatformGenericSycl.hpp
Traits.hpp
alpaka::trait
The accelerator traits.
Definition:
AccCpuOmp2Blocks.hpp:111
alpaka
The alpaka accelerator library.
Definition:
AccCpuOmp2Blocks.hpp:48
include
alpaka
platform
PlatformCpuSycl.hpp
Generated on Wed Apr 17 2024 12:07:10 for alpaka by
1.9.1