alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
include
alpaka
onHost
concepts.hpp
Go to the documentation of this file.
1
/* Copyright 2024 René Widera
2
* SPDX-License-Identifier: MPL-2.0
3
*/
4
5
#pragma once
6
7
#include "
alpaka/concepts.hpp
"
8
#include "
alpaka/internal/interface.hpp
"
9
#include "
alpaka/onHost/internal/interface.hpp
"
10
11
#include <concepts>
12
#include <string>
13
14
namespace
alpaka::onHost
15
{
16
namespace
internal::concepts
17
{
18
template
<
typename
T>
19
concept
Device
=
requires
(T device) {
20
{
alpaka::internal::GetName::Op<T>
{}(device) } -> std::convertible_to<std::string>;
21
{
internal::MakeEvent::Op<T>
{}(device) };
22
{
internal::GetNativeHandle::Op<T>
{}(device) };
23
{
internal::GetDeviceProperties::Op<T>
{}(device) };
24
};
25
26
template
<
typename
T>
27
concept
Platform
=
requires
(T platform) {
28
{
alpaka::internal::GetName::Op<T>
{}(platform) };
29
};
30
31
template
<
typename
T>
32
concept
Queue
=
requires
(T device) {
33
{
alpaka::internal::GetName::Op<T>
{}(device) } -> std::convertible_to<std::string>;
34
{
internal::GetNativeHandle::Op<T>
{}(device) };
35
};
36
37
template
<
typename
T>
38
concept
QueueHandle
=
requires
(T t) {
39
typename
T::element_type;
40
requires
Queue<typename T::element_type>
;
41
};
42
43
template
<
typename
T>
44
concept
PlatformHandle
=
requires
(T t) {
45
typename
T::element_type;
46
requires
Platform<typename T::element_type>
;
47
};
48
49
template
<
typename
T>
50
concept
DeviceHandle
=
requires
(T t) {
51
typename
T::element_type;
52
requires
Device<typename T::element_type>
;
53
};
54
}
// namespace internal::concepts
55
56
namespace
concepts
57
{
58
template
<
typename
T>
59
concept
NameHandle
=
requires
(T t) {
60
typename
T::element_type;
61
requires
alpaka::concepts::HasName<typename T::element_type>
;
62
};
63
64
template
<
typename
T>
65
concept
StaticNameHandle
=
requires
(T t) {
66
typename
T::element_type;
67
requires
alpaka::concepts::HasStaticName<typename T::element_type>
;
68
};
69
}
// namespace concepts
70
71
}
// namespace alpaka::onHost
alpaka::concepts::HasName
Definition
hasName.hpp:22
alpaka::concepts::HasStaticName
Definition
hasName.hpp:17
alpaka::onHost::concepts::NameHandle
Definition
concepts.hpp:59
alpaka::onHost::concepts::StaticNameHandle
Definition
concepts.hpp:65
alpaka::onHost::internal::concepts::DeviceHandle
Definition
concepts.hpp:50
alpaka::onHost::internal::concepts::Device
Definition
concepts.hpp:19
alpaka::onHost::internal::concepts::PlatformHandle
Definition
concepts.hpp:44
alpaka::onHost::internal::concepts::Platform
Definition
concepts.hpp:27
alpaka::onHost::internal::concepts::QueueHandle
Definition
concepts.hpp:38
alpaka::onHost::internal::concepts::Queue
Definition
concepts.hpp:32
concepts.hpp
interface.hpp
alpaka::onHost::concepts
Definition
concepts.hpp:57
alpaka::onHost::internal::concepts
Definition
concepts.hpp:17
alpaka::onHost
Functionality which is usable on the host CPU controller thread.
Definition
api.hpp:40
interface.hpp
alpaka::internal::GetName::Op
Definition
interface.hpp:42
alpaka::onHost::internal::GetDeviceProperties::Op
Definition
interface.hpp:418
alpaka::onHost::internal::GetNativeHandle::Op
Definition
interface.hpp:86
alpaka::onHost::internal::MakeEvent::Op
Definition
interface.hpp:115
Generated on
for alpaka by
1.16.1