Skip to content

Commit 46f8c63

Browse files
authored
Merge pull request #1483 from NVIDIA/include-hygene
obey clang-tidy, reformat with clang-format-21
2 parents e8a6a7b + 0f79587 commit 46f8c63

97 files changed

Lines changed: 272 additions & 192 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/benchmark/static_thread_pool_old.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <exception>
2727
#include <mutex>
2828
#include <thread>
29-
#include <type_traits>
3029
#include <vector>
3130

3231
namespace exec_old {
@@ -410,7 +409,8 @@ namespace exec_old {
410409
this->__execute = [](task_base* t, const std::uint32_t /* tid */) noexcept {
411410
auto& op = *static_cast<operation*>(t);
412411
auto stoken = stdexec::get_stop_token(stdexec::get_env(op.receiver_));
413-
if constexpr (stdexec::unstoppable_token<decltype(stoken)>) {
412+
if constexpr (
413+
stdexec::unstoppable_token<decltype(stoken)>) { // NOLINT(bugprone-branch-clone)
414414
stdexec::set_value(static_cast<Receiver&&>(op.receiver_));
415415
} else if (stoken.stop_requested()) {
416416
stdexec::set_stopped(static_cast<Receiver&&>(op.receiver_));

examples/nvexec/maxwell/snr.cuh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,9 @@ namespace repeat_n_detail {
356356
template <stdexec::__decays_to<repeat_n_sender_t> Self, stdexec::receiver Receiver>
357357
requires(stdexec::sender_to<Sender, Receiver>)
358358
&& (nvexec::STDEXEC_STREAM_DETAIL_NS::receiver_with_stream_env<Receiver>)
359-
friend auto tag_invoke(stdexec::connect_t, Self&& self, Receiver r)
360-
-> nvexec::STDEXEC_STREAM_DETAIL_NS::repeat_n::
361-
operation_state_t<SenderId, Closure, stdexec::__id<Receiver>> {
359+
friend auto
360+
tag_invoke(stdexec::connect_t, Self&& self, Receiver r) -> nvexec::STDEXEC_STREAM_DETAIL_NS::
361+
repeat_n::operation_state_t<SenderId, Closure, stdexec::__id<Receiver>> {
362362
return nvexec::STDEXEC_STREAM_DETAIL_NS::repeat_n::
363363
operation_state_t<SenderId, Closure, stdexec::__id<Receiver>>(
364364
static_cast<Sender&&>(self.sender_), self.closure_, static_cast<Receiver&&>(r), self.n_);

include/exec/any_sender_of.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,9 @@ namespace exec {
437437
(*__other.__vtable_)(__copy_construct, this, __other);
438438
}
439439

440-
auto operator=(const __t& __other) -> __t& requires(_Copyable) {
440+
auto operator=(const __t& __other) -> __t&
441+
requires(_Copyable)
442+
{
441443
if (&__other != this) {
442444
__t tmp(__other);
443445
*this = std::move(tmp);

include/exec/libdispatch_queue.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020

2121
// TODO: This is needed for libdispatch to compile with GCC. Need to look for
2222
// workaround.
23-
#ifndef __has_feature
24-
# define __has_feature(x) false
25-
#endif
26-
#ifndef __has_extension
27-
# define __has_extension(x) false
28-
#endif
29-
30-
#include "stdexec/execution.hpp"
31-
#include <dispatch/dispatch.h>
23+
# ifndef __has_feature
24+
# define __has_feature(x) false
25+
# endif
26+
# ifndef __has_extension
27+
# define __has_extension(x) false
28+
# endif
29+
30+
# include "stdexec/execution.hpp"
31+
# include <dispatch/dispatch.h>
3232

3333
namespace exec {
3434
struct libdispatch_queue;

include/exec/linux/io_uring_context.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ namespace exec {
653653
__io_task<_Op> && //
654654
requires(_Op& __op) {
655655
{
656-
static_cast<_Op&&>(__op).receiver()
656+
static_cast<_Op &&>(__op).receiver()
657657
} noexcept
658658
-> stdexec::receiver_of<stdexec::completion_signatures<stdexec::set_stopped_t()>>;
659659
};

include/exec/sequence/ignore_all_values.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
namespace exec {
2626
template <class _Variant, class _Type, class... _Args>
2727
concept __variant_emplaceable = requires(_Variant& __v, _Args&&... __args) {
28-
__v.template emplace<_Type>(static_cast<_Args&&>(__args)...);
28+
__v.template emplace<_Type>(static_cast<_Args &&>(__args)...);
2929
};
3030

3131
template <class _Variant, class _Type, class... _Args>
3232
concept __nothrow_variant_emplaceable = requires(_Variant& __v, _Args&&... __args) {
33-
{ __v.template emplace<_Type>(static_cast<_Args&&>(__args)...) } noexcept;
33+
{ __v.template emplace<_Type>(static_cast<_Args &&>(__args)...) } noexcept;
3434
};
3535

3636
namespace __ignore_all_values {

include/exec/sequence_senders.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ namespace exec {
202202

203203
template <class _Sender, class... _Env>
204204
concept has_sequence_item_types = requires(_Sender&& __sndr, _Env&&... __env) {
205-
get_item_types(static_cast<_Sender&&>(__sndr), static_cast<_Env&&>(__env)...);
205+
get_item_types(static_cast<_Sender &&>(__sndr), static_cast<_Env &&>(__env)...);
206206
};
207207

208208
template <class _Sender, class... _Env>
@@ -413,7 +413,7 @@ namespace exec {
413413
concept sequence_sender_to =
414414
sequence_receiver_from<_Receiver, _Sender> && //
415415
requires(_Sender&& __sndr, _Receiver&& __rcvr) {
416-
subscribe(static_cast<_Sender&&>(__sndr), static_cast<_Receiver&&>(__rcvr));
416+
subscribe(static_cast<_Sender &&>(__sndr), static_cast<_Receiver &&>(__rcvr));
417417
};
418418

419419
template <class _Receiver>

include/exec/timed_scheduler.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace exec {
5454
concept __timed_scheduler = //
5555
stdexec::scheduler<_TimedScheduler> && //
5656
requires(_TimedScheduler&& __sched) { //
57-
now(static_cast<_TimedScheduler&&>(__sched));
57+
now(static_cast<_TimedScheduler &&>(__sched));
5858
};
5959

6060
template <__timed_scheduler _TimedScheduler>
@@ -180,13 +180,13 @@ namespace exec {
180180
template <class _Scheduler>
181181
concept __has_schedule_after = //
182182
requires(_Scheduler&& __sched, const duration_of_t<_Scheduler>& __duration) {
183-
{ schedule_after(static_cast<_Scheduler&&>(__sched), __duration) } -> stdexec::sender;
183+
{ schedule_after(static_cast<_Scheduler &&>(__sched), __duration) } -> stdexec::sender;
184184
};
185185

186186
template <class _Scheduler>
187187
concept __has_schedule_at = //
188188
requires(_Scheduler&& __sched, const time_point_of_t<_Scheduler>& __time_point) {
189-
{ schedule_at(static_cast<_Scheduler&&>(__sched), __time_point) } -> stdexec::sender;
189+
{ schedule_at(static_cast<_Scheduler &&>(__sched), __time_point) } -> stdexec::sender;
190190
};
191191

192192
template <class _Scheduler, class _Clock = std::chrono::system_clock>

include/nvexec/detail/config.cuh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
*/
1616
#pragma once
1717

18-
#include "../../stdexec/__detail/__config.hpp"
18+
// IWYU pragma: always_keep
19+
20+
#include "../../stdexec/__detail/__config.hpp" // IWYU pragma: export
1921

2022
#if !defined(_NVHPC_CUDA) && !defined(__CUDACC__)
2123
# error The NVIDIA schedulers and utilities require CUDA support

include/nvexec/detail/cuda_atomic.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "cuda_fwd.cuh"
1919

20-
#include <cuda/atomic>
20+
#include <cuda/atomic> // IWYU pragma: export
2121

2222
#if STDEXEC_LIBCUDACXX_NEEDS_ATOMIC_WORAROUND()
2323
_LIBCUDACXX_BEGIN_NAMESPACE_STD

0 commit comments

Comments
 (0)