Skip to content

Commit

Permalink
Update #includes in exec/ and stdexec/ based on clangd symbol uses (N…
Browse files Browse the repository at this point in the history
…VIDIA#1226)

* Update #includes based on clangd symbol uses

* Remove #include <coroutine> from files other than coroutine.hpp
  • Loading branch information
laramiel authored Jan 30, 2024
1 parent 6a6b7ae commit baeb83e
Show file tree
Hide file tree
Showing 34 changed files with 105 additions and 31 deletions.
2 changes: 2 additions & 0 deletions include/exec/__detail/__atomic_intrusive_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#include "../../stdexec/__detail/__intrusive_queue.hpp"

#include <atomic>

namespace exec {
template <auto _NextPtr>
class __atomic_intrusive_queue;
Expand Down
6 changes: 4 additions & 2 deletions include/exec/__detail/__basic_sequence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
*/
#pragma once

#include "../sequence_senders.hpp"

#include "../../stdexec/__detail/__config.hpp"
#include "../../stdexec/__detail/__meta.hpp"
#include "../../stdexec/__detail/__basic_sender.hpp"

#include "../sequence_senders.hpp"

namespace exec {
//////////////////////////////////////////////////////////////////////////////////////////////////
// __seqexpr
Expand Down
4 changes: 2 additions & 2 deletions include/exec/__detail/__bit_cast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
#pragma once

#include "../../stdexec/__detail/__config.hpp"

#if __has_include(<bit>)
#include <bit>
#if __cpp_lib_bit_cast >= 201806L
Expand All @@ -26,8 +28,6 @@
#include <cstring>
#include <type_traits>

#include "../../stdexec/__detail/__config.hpp"

namespace exec {

template <class _Ty>
Expand Down
1 change: 1 addition & 0 deletions include/exec/__detail/__bwos_lifo_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <atomic>
#include <bit>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <new>
Expand Down
2 changes: 2 additions & 0 deletions include/exec/__detail/__manual_lifetime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
#pragma once

#include <cstddef>
#include <memory>
#include <type_traits>

namespace exec {
Expand Down
1 change: 1 addition & 0 deletions include/exec/__detail/__sender_facade.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#pragma once

#include "../../stdexec/execution.hpp"
#include "../../stdexec/concepts.hpp"

STDEXEC_PRAGMA_PUSH()
STDEXEC_PRAGMA_IGNORE_EDG(1302)
Expand Down
4 changes: 4 additions & 0 deletions include/exec/any_sender_of.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
*/
#pragma once

#include "../stdexec/concepts.hpp"
#include "../stdexec/execution.hpp"
#include "../stdexec/functional.hpp"

#include "./sequence_senders.hpp"

#include <cstddef>
#include <utility>

namespace exec {
namespace __any {
Expand Down
3 changes: 3 additions & 0 deletions include/exec/async_scope.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
#pragma once

#include "../stdexec/execution.hpp"
#include "../stdexec/stop_token.hpp"
#include "../stdexec/__detail/__intrusive_queue.hpp"
#include "env.hpp"

#include <mutex>

namespace exec {
/////////////////////////////////////////////////////////////////////////////
// async_scope
Expand Down
1 change: 1 addition & 0 deletions include/exec/finally.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#pragma once

#include "../stdexec/execution.hpp"
#include "../stdexec/concepts.hpp"

#include "__detail/__manual_lifetime.hpp"

Expand Down
1 change: 1 addition & 0 deletions include/exec/linux/memory_mapped_region.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
#pragma once

#include <cstddef>
#include <cstdint>

namespace exec {
Expand Down
4 changes: 3 additions & 1 deletion include/exec/materialize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
*/
#pragma once

#include <stdexec/execution.hpp>
#include "../stdexec/execution.hpp"
#include "../stdexec/concepts.hpp"


namespace exec {
namespace __materialize {
Expand Down
7 changes: 4 additions & 3 deletions include/exec/on_coro_disposition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@

// The original idea is taken from libunifex and adapted to stdexec.

#include <exception>
#include <type_traits>

#include "../stdexec/execution.hpp"
#include "../stdexec/coroutine.hpp"
#include "task.hpp"
#include "inline_scheduler.hpp"
#include "any_sender_of.hpp"

#include <exception>
#include <type_traits>

namespace exec {
namespace __on_coro_disp {
using namespace stdexec;
Expand Down
1 change: 1 addition & 0 deletions include/exec/repeat_n.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <atomic>
#include <concepts>
#include <cstddef>

namespace exec {
namespace __repeat_n {
Expand Down
3 changes: 3 additions & 0 deletions include/exec/sequence/any_sequence_of.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
*/
#pragma once

#include "../../stdexec/concepts.hpp"
#include "../../stdexec/execution.hpp"
#include "../sequence_senders.hpp"
#include "../any_sender_of.hpp"

namespace exec {
Expand Down
2 changes: 2 additions & 0 deletions include/exec/sequence/empty_sequence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
#pragma once

#include "../../stdexec/concepts.hpp"
#include "../../stdexec/execution.hpp"
#include "../sequence_senders.hpp"

namespace exec {
Expand Down
4 changes: 4 additions & 0 deletions include/exec/sequence/ignore_all_values.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@
*/
#pragma once

#include "../../stdexec/concepts.hpp"
#include "../../stdexec/execution.hpp"
#include "../sequence_senders.hpp"

#include <atomic>

namespace exec {
template <class _Variant, class _Type, class... _Args>
concept __variant_emplaceable = requires(_Variant& __v, _Args&&... __args) {
Expand Down
4 changes: 4 additions & 0 deletions include/exec/sequence/iterate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@

#if STDEXEC_HAS_STD_RANGES()

#include "../../stdexec/concepts.hpp"
#include "../../stdexec/execution.hpp"
#include "../sequence_senders.hpp"
#include "../__detail/__basic_sequence.hpp"

#include "../env.hpp"
#include "../trampoline_scheduler.hpp"

#include <exception>
#include <ranges>


namespace exec {
namespace __iterate {
using namespace stdexec;
Expand Down
2 changes: 2 additions & 0 deletions include/exec/sequence/transform_each.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
#pragma once

#include "../../stdexec/concepts.hpp"
#include "../../stdexec/execution.hpp"
#include "../sequence_senders.hpp"

#include "../__detail/__basic_sequence.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/exec/static_thread_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <algorithm>
#include <atomic>
#include <condition_variable>
#include <cstdint>
#include <exception>
#include <mutex>
#include <span>
Expand Down
1 change: 1 addition & 0 deletions include/exec/timed_scheduler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#pragma once

#include "../stdexec/execution.hpp"
#include "../stdexec/functional.hpp"

namespace exec {
namespace __now {
Expand Down
1 change: 1 addition & 0 deletions include/exec/trampoline_scheduler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#pragma once

#include "../stdexec/execution.hpp"
#include "../stdexec/stop_token.hpp"

#include <cstddef>
#include <type_traits>
Expand Down
6 changes: 5 additions & 1 deletion include/exec/when_any.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
*/
#pragma once

#include <stdexec/execution.hpp>
#include "../stdexec/execution.hpp"
#include "../stdexec/stop_token.hpp"

#include <type_traits>
#include <exception>

namespace exec {
namespace __when_any {
Expand Down
3 changes: 3 additions & 0 deletions include/stdexec/__detail/__basic_sender.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "__execution_fwd.hpp"

#include "__config.hpp"
#include "__env.hpp"
#include "__meta.hpp"
#include "__tuple.hpp"
Expand All @@ -25,6 +26,8 @@
#include "../concepts.hpp"

#include <utility> // for tuple_size/tuple_element
#include <cstddef>
#include <type_traits>

namespace stdexec {
/////////////////////////////////////////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions include/stdexec/__detail/__domain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "__execution_fwd.hpp"

#include "__config.hpp"
#include "__basic_sender.hpp"
#include "__env.hpp"
#include "__meta.hpp"
Expand Down
8 changes: 6 additions & 2 deletions include/stdexec/__detail/__env.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@
*/
#pragma once

#include <concepts>

#include "__execution_fwd.hpp"

#include "__config.hpp"
#include "__meta.hpp"
#include "__concepts.hpp"

#include "../functional.hpp"
#include "../stop_token.hpp"

#include <concepts>
#include <type_traits>
#include <exception>

STDEXEC_PRAGMA_PUSH()
STDEXEC_PRAGMA_IGNORE_EDG(probable_guiding_friend)
STDEXEC_PRAGMA_IGNORE_EDG(type_qualifiers_ignored_on_reference)
Expand Down
2 changes: 2 additions & 0 deletions include/stdexec/__detail/__intrusive_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include <atomic>
#include <memory>
#include <new>
#include <cstddef>
#include <type_traits>

#if STDEXEC_TSAN()
#include <sanitizer/tsan_interface.h>
Expand Down
5 changes: 3 additions & 2 deletions include/stdexec/__detail/__intrusive_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
*/
#pragma once

#include "__config.hpp"

#include <cstddef>
#include <cassert>
#include <tuple>
#include <utility>

#include "__config.hpp"

namespace stdexec {
namespace __queue {
template <auto _Next>
Expand Down
1 change: 1 addition & 0 deletions include/stdexec/__detail/__scope.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
#pragma once

#include "__config.hpp"
#include "__meta.hpp"

namespace stdexec {
Expand Down
3 changes: 3 additions & 0 deletions include/stdexec/__detail/__tuple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
#pragma once

#include "__config.hpp"
#include "__type_traits.hpp"
#include "__meta.hpp"

#include <cstddef>

namespace stdexec {
namespace __tup {
template <class _Ty, std::size_t _Idx>
Expand Down
7 changes: 5 additions & 2 deletions include/stdexec/concepts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
#error This library requires support for C++20 concepts
#endif

#include "__detail/__config.hpp"
#include "__detail/__meta.hpp"
#include "__detail/__concepts.hpp"
#include "__detail/__type_traits.hpp"

#include <version>

// Perhaps the stdlib lacks support for concepts though:
Expand All @@ -34,8 +39,6 @@
#include <type_traits>
#endif

#include "__detail/__meta.hpp"
#include "__detail/__concepts.hpp"

namespace stdexec::__std_concepts {
// Make sure we're using a same_as concept that doesn't instantiate std::is_same
Expand Down
3 changes: 3 additions & 0 deletions include/stdexec/coroutine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

#include "concepts.hpp"

#include "__detail/__config.hpp"
#include "__detail/__concepts.hpp"

#include <version>
#if __cpp_impl_coroutine >= 201902 && __cpp_lib_coroutine >= 201902
#include <coroutine>
Expand Down
Loading

0 comments on commit baeb83e

Please sign in to comment.