kokkos-execution
0.0.1
Toggle main menu visibility
Loading...
Searching...
No Matches
object.hpp
Go to the documentation of this file.
1
// NOLINTBEGIN
2
/*
3
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4
* Copyright (c) 2025 Robert Leahy. All rights reserved.
5
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
*
7
* Licensed under the Apache License, Version 2.0 with LLVM Exceptions (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
10
*
11
* https://llvm.org/LICENSE.txt
12
*
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
18
*/
19
20
#pragma once
21
22
#include <concepts>
23
#include <functional>
24
#include <type_traits>
25
26
#include "
enter_scope_sender.hpp
"
27
28
namespace
experimental::execution
{
29
30
template
<
typename
Object>
31
concept
object
= std::constructible_from<std::remove_cvref_t<Object>, Object>
32
&& std::move_constructible<std::remove_cvref_t<Object>>
33
&& std::is_object_v<typename std::remove_cvref_t<Object>::type> &&
requires
(Object o) {
34
{
35
std::invoke((Object&&) o, (
typename
std::remove_cvref_t<Object>::type*)
nullptr
)
36
} ->
enter_scope_sender
;
37
};
38
39
template
<
typename
Object,
typename
Env>
40
concept
object_in
=
object<Object>
&&
requires
(Object o) {
41
{ std::invoke((Object&&) o, (
typename
std::remove_cvref_t<Object>::type*)
nullptr
) } ->
enter_scope_sender_in<Env>
;
42
};
43
44
template
<
object
Object>
45
using
type_of_object_t
= std::remove_cvref_t<Object>::type;
46
47
template
<
object
Object>
48
using
enter_scope_sender_of_object_t
= std::invoke_result_t<Object, type_of_object_t<Object>*>;
49
50
}
// namespace experimental::execution
51
52
// NOLINTEND
experimental::execution::enter_scope_sender_in
Definition
enter_scope_sender.hpp:73
experimental::execution::enter_scope_sender
Definition
enter_scope_sender.hpp:32
experimental::execution::object_in
Definition
object.hpp:40
experimental::execution::object
Definition
object.hpp:31
enter_scope_sender.hpp
experimental::execution
Definition
elide.hpp:28
experimental::execution::enter_scope_sender_of_object_t
std::invoke_result_t< Object, type_of_object_t< Object > * > enter_scope_sender_of_object_t
Definition
object.hpp:48
experimental::execution::type_of_object_t
std::remove_cvref_t< Object >::type type_of_object_t
Definition
object.hpp:45
kokkos-execution
stdexec
P3955
object.hpp
Generated on
for kokkos-execution by
1.18.0