Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/doxygen-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ jobs:
branch: gh-pages
folder: docs/html
config_file: docs/Doxyfile
doxygen_version: 1.15.0
1 change: 1 addition & 0 deletions docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ Requirements for <code>_Scheduler_</code>:

- <code>std::equality_comparable&lt;_Scheduler_&gt;</code>
- <code>std::copy_constructible&lt;_Scheduler_&gt;</code>
- <code>std::execution::get_forward_progress_guarantee(<i>scheduler</i>) -&gt; std::execution::forward_progress_guarantee</code>
</details>
<details>
<summary><code>sender&lt;<i>Sender</i>&gt;</code></summary>
Expand Down
4 changes: 2 additions & 2 deletions include/beman/execution/detail/call_with_default.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// include/beman/execution/detail/call_with_default.hpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_CALL_WITH_DEFAULT
#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_CALL_WITH_DEFAULT
#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_CALL_WITH_DEFAULT
#define INCLUDED_BEMAN_EXECUTION_DETAIL_CALL_WITH_DEFAULT

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
Expand Down
4 changes: 2 additions & 2 deletions include/beman/execution/detail/data_type.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// include/beman/execution/detail/data_type.hpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_DATA_TYPE
#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_DATA_TYPE
#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_DATA_TYPE
#define INCLUDED_BEMAN_EXECUTION_DETAIL_DATA_TYPE

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
Expand Down
4 changes: 2 additions & 2 deletions include/beman/execution/detail/dependent_sender_error.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// include/beman/execution/detail/dependent_sender_error.hpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_DEPENDENT_SENDER_ERROR
#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_DEPENDENT_SENDER_ERROR
#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_DEPENDENT_SENDER_ERROR
#define INCLUDED_BEMAN_EXECUTION_DETAIL_DEPENDENT_SENDER_ERROR

// ----------------------------------------------------------------------------

Expand Down
6 changes: 5 additions & 1 deletion include/beman/execution/detail/get_allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import beman.execution.detail.simple_allocator;

// ----------------------------------------------------------------------------

namespace beman::execution {
namespace beman::execution::detail {
struct get_allocator_t {
template <typename Object>
requires(not requires(Object&& object, const get_allocator_t& tag) { ::std::as_const(object).query(tag); })
Expand Down Expand Up @@ -58,6 +58,10 @@ struct get_allocator_t {
constexpr auto query(const ::beman::execution::forwarding_query_t&) const noexcept -> bool { return true; }
};

} // namespace beman::execution::detail

namespace beman::execution {
using get_allocator_t = ::beman::execution::detail::get_allocator_t;
inline constexpr get_allocator_t get_allocator{};
} // namespace beman::execution

Expand Down
4 changes: 2 additions & 2 deletions include/beman/execution/detail/get_completion_domain.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// include/beman/execution/detail/get_completion_domain.hpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_GET_COMPLETION_DOMAIN
#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_GET_COMPLETION_DOMAIN
#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_GET_COMPLETION_DOMAIN
#define INCLUDED_BEMAN_EXECUTION_DETAIL_GET_COMPLETION_DOMAIN

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
Expand Down
103 changes: 103 additions & 0 deletions include/beman/execution/detail/get_scheduler_allocator.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// include/beman/execution/detail/get_scheduler_allocator.hpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_GET_SCHEDULER_ALLOCATOR
#define INCLUDED_BEMAN_EXECUTION_DETAIL_GET_SCHEDULER_ALLOCATOR

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <type_traits>
#include <utility>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution.detail.forwarding_query;
import beman.execution.detail.get_allocator;
import beman.execution.detail.simple_allocator;
#else
#include <beman/execution/detail/forwarding_query.hpp>
#include <beman/execution/detail/get_allocator.hpp>
#include <beman/execution/detail/simple_allocator.hpp>
#endif

// ----------------------------------------------------------------------------

namespace beman::execution::detail {
struct get_scheduler_allocator_t {
template <typename Object>
requires(
requires(const ::std::remove_cvref_t<Object>& object, const get_scheduler_allocator_t& tag) {
object.query(tag);
} &&
!requires(const ::std::remove_cvref_t<Object>& object, const get_scheduler_allocator_t& tag) {
{ object.query(tag) } noexcept;
})
auto operator()(Object&& object) const noexcept
-> void = BEMAN_EXECUTION_DELETE("object.query(get_scheduler_allocator) needs to be noexcept when present");
template <typename Object>
requires(
requires(const ::std::remove_cvref_t<Object>& object, const get_scheduler_allocator_t& tag) {
{ object.query(tag) } noexcept;
} &&
!requires(const ::std::remove_cvref_t<Object>& object, const get_scheduler_allocator_t& tag) {
{ object.query(tag) } -> ::beman::execution::detail::simple_allocator<>;
})
auto operator()(Object&& object) const noexcept -> void = BEMAN_EXECUTION_DELETE(
"object.query(get_scheduler_allocator) needs to return a simple_allocator<> when present");
template <typename Object>
requires(requires(const ::std::remove_cvref_t<Object>& object, const get_scheduler_allocator_t& tag) {
{ object.query(tag) } noexcept -> ::beman::execution::detail::simple_allocator<>;
})
auto operator()(Object&& object) const noexcept -> decltype(auto) {
return ::std::as_const(object).query(*this);
}
template <typename Object>
requires((not requires(const ::std::remove_cvref_t<Object>& object, const get_scheduler_allocator_t& tag) {
object.query(tag);
}) &&
(requires(const ::std::remove_cvref_t<Object>& object,
const ::beman::execution::get_allocator_t& tag) { object.query(tag); }) &&
(!requires(const ::std::remove_cvref_t<Object>& object,
const ::beman::execution::get_allocator_t& tag) {
{ object.query(tag) } noexcept;
}))
auto operator()(Object&& object) const noexcept
-> void = BEMAN_EXECUTION_DELETE("object.query(get_allocator) needs to be noexcept");
template <typename Object>
requires((not requires(const ::std::remove_cvref_t<Object>& object, const get_scheduler_allocator_t& tag) {
object.query(tag);
}) &&
(requires(const ::std::remove_cvref_t<Object>& object,
const ::beman::execution::get_allocator_t& tag) {
{ object.query(tag) } noexcept;
}) &&
(!requires(const ::std::remove_cvref_t<Object>& object,
const ::beman::execution::get_allocator_t& tag) {
{ object.query(tag) } noexcept -> ::beman::execution::detail::simple_allocator<>;
}))
auto operator()(Object&& object) const noexcept -> void =
BEMAN_EXECUTION_DELETE("object.query(get_allocator) needs to return a simple_allocator<> when present");
template <typename Object>
requires((not requires(const ::std::remove_cvref_t<Object>& object, const get_scheduler_allocator_t& tag) {
object.query(tag);
}) && (requires(const ::std::remove_cvref_t<Object>& object,
const ::beman::execution::get_allocator_t& tag) {
{ object.query(tag) } noexcept -> ::beman::execution::detail::simple_allocator<>;
}))
auto operator()(Object&& object) const noexcept -> decltype(auto) {
return ::std::as_const(object).query(::beman::execution::get_allocator);
}

constexpr auto query(const ::beman::execution::forwarding_query_t&) const noexcept -> bool { return true; }
};
} // namespace beman::execution::detail

namespace beman::execution {
using get_scheduler_allocator_t = ::beman::execution::detail::get_scheduler_allocator_t;
inline constexpr get_scheduler_allocator_t get_scheduler_allocator{};
} // namespace beman::execution

// ----------------------------------------------------------------------------

#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_GET_SCHEDULER_ALLOCATOR
6 changes: 3 additions & 3 deletions include/beman/execution/detail/hide_completion_queries.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// include/beman/execution/detail/hide_completion_queries.hpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_HIDE_COMPLETION_QUERIES
#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_HIDE_COMPLETION_QUERIES
#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_HIDE_COMPLETION_QUERIES
#define INCLUDED_BEMAN_EXECUTION_DETAIL_HIDE_COMPLETION_QUERIES

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
Expand Down Expand Up @@ -50,4 +50,4 @@ struct hide_completion_queries {

// ----------------------------------------------------------------------------

#endif // INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_HIDE_COMPLETION_QUERIES
#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_HIDE_COMPLETION_QUERIES
6 changes: 3 additions & 3 deletions include/beman/execution/detail/hide_sched.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// include/beman/execution/detail/hide_sched.hpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_HIDE_SCHED
#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_HIDE_SCHED
#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_HIDE_SCHED
#define INCLUDED_BEMAN_EXECUTION_DETAIL_HIDE_SCHED

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
Expand Down Expand Up @@ -48,4 +48,4 @@ auto hide_sched(const Q& q) noexcept {

// ----------------------------------------------------------------------------

#endif // INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_HIDE_SCHED
#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_HIDE_SCHED
4 changes: 2 additions & 2 deletions include/beman/execution/detail/indeterminate_domain.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// include/beman/execution/detail/indeterminate_domain.hpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_INDETERMINATE_DOMAIN
#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_INDETERMINATE_DOMAIN
#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_INDETERMINATE_DOMAIN
#define INCLUDED_BEMAN_EXECUTION_DETAIL_INDETERMINATE_DOMAIN

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
Expand Down
4 changes: 2 additions & 2 deletions include/beman/execution/detail/inlinable_receiver.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// include/beman/execution/detail/inlinable_receiver.hpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_INLINABLE_RECEIVER
#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_INLINABLE_RECEIVER
#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_INLINABLE_RECEIVER
#define INCLUDED_BEMAN_EXECUTION_DETAIL_INLINABLE_RECEIVER

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
Expand Down
4 changes: 2 additions & 2 deletions include/beman/execution/detail/is_constant.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// include/beman/execution/detail/is_constant.hpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_IS_CONSTANT
#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_IS_CONSTANT
#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_IS_CONSTANT
#define INCLUDED_BEMAN_EXECUTION_DETAIL_IS_CONSTANT

// ----------------------------------------------------------------------------

Expand Down
6 changes: 3 additions & 3 deletions include/beman/execution/detail/new_object.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// include/beman/execution/detail/new_object.hpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_NEW_OBJECT
#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_NEW_OBJECT
#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_NEW_OBJECT
#define INCLUDED_BEMAN_EXECUTION_DETAIL_NEW_OBJECT

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
Expand Down Expand Up @@ -43,4 +43,4 @@ auto delete_object(const Allocator& allocator, T* ptr) noexcept -> void {

// ----------------------------------------------------------------------------

#endif // INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_NEW_OBJECT
#endif // INCLUDED_BEMAN_EXECUTION_DETAIL_NEW_OBJECT
4 changes: 2 additions & 2 deletions include/beman/execution/detail/store_receiver.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// include/beman/execution/detail/store_receiver.hpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_STORE_RECEIVER
#define INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_STORE_RECEIVER
#ifndef INCLUDED_BEMAN_EXECUTION_DETAIL_STORE_RECEIVER
#define INCLUDED_BEMAN_EXECUTION_DETAIL_STORE_RECEIVER

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
Expand Down
Loading