Skip to content

Commit e5dbe49

Browse files
committed
clang-format tweaks
1 parent 423cfae commit e5dbe49

29 files changed

+12
-50
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ RemoveBracesLLVM: false
117117
ReflowComments: false
118118
RequiresClausePosition: OwnLine
119119
IndentRequiresClause: true
120-
SeparateDefinitionBlocks: Always
120+
SeparateDefinitionBlocks: Leave
121121
ShortNamespaceLines: 0
122122
SortIncludes: Never
123123
SortUsingDeclarations: false

examples/nvexec/maxwell/common.cuh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ struct grid_t {
134134
constexpr float C0 = 299792458.0f; // Speed of light [metres per second]
135135

136136
STDEXEC_ATTRIBUTE(host, device)
137-
138137
inline auto
139138
is_circle_part(float x, float y, float object_x, float object_y, float object_size) -> bool {
140139
const float os2 = object_size * object_size;
@@ -194,25 +193,21 @@ inline auto grid_initializer(float dt, fields_accessor accessor) -> grid_initial
194193
}
195194

196195
STDEXEC_ATTRIBUTE(host, device)
197-
198196
inline auto right_nid(std::size_t cell_id, std::size_t col, std::size_t N) -> std::size_t {
199197
return col == N - 1 ? cell_id - (N - 1) : cell_id + 1;
200198
}
201199

202200
STDEXEC_ATTRIBUTE(host, device)
203-
204201
inline auto left_nid(std::size_t cell_id, std::size_t col, std::size_t N) -> std::size_t {
205202
return col == 0 ? cell_id + N - 1 : cell_id - 1;
206203
}
207204

208205
STDEXEC_ATTRIBUTE(host, device)
209-
210206
inline auto bottom_nid(std::size_t cell_id, std::size_t row, std::size_t N) -> std::size_t {
211207
return row == 0 ? cell_id + N * (N - 1) : cell_id - N;
212208
}
213209

214210
STDEXEC_ATTRIBUTE(host, device)
215-
216211
inline auto top_nid(std::size_t cell_id, std::size_t row, std::size_t N) -> std::size_t {
217212
return row == N - 1 ? cell_id - N * (N - 1) : cell_id + N;
218213
}
@@ -247,13 +242,11 @@ struct e_field_calculator_t {
247242
std::size_t source_position;
248243

249244
STDEXEC_ATTRIBUTE(nodiscard, host, device)
250-
251245
auto gaussian_pulse(float t, float t_0, float tau) const -> float {
252246
return static_cast<float>(exp(-(((t - t_0) / tau) * (t - t_0) / tau)));
253247
}
254248

255249
STDEXEC_ATTRIBUTE(nodiscard, host, device)
256-
257250
auto calculate_source(float t, float frequency) const -> float {
258251
const float tau = 0.5f / frequency;
259252
const float t_0 = 6.0f * tau;

examples/nvexec/maxwell/snr.cuh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ namespace nvexec::_strm::repeat_n {
167167
void start() & noexcept {
168168
if (this->stream_provider_.status_ != cudaSuccess) {
169169
// Couldn't allocate memory for operation state, complete with error
170-
this->propagate_completion_signal(
171-
ex::set_error, std::move(this->stream_provider_.status_));
170+
this->propagate_completion_signal(ex::set_error, std::move(this->stream_provider_.status_));
172171
} else {
173172
if (n_) {
174173
ex::start(*pred_op_state_);
@@ -181,8 +180,7 @@ namespace nvexec::_strm::repeat_n {
181180
operation_state_t(PredSender&& pred_sender, Closure closure, Receiver&& rcvr, std::size_t n)
182181
: operation_state_base_t<ReceiverId>(
183182
static_cast<Receiver&&>(rcvr),
184-
ex::get_completion_scheduler<ex::set_value_t>(ex::get_env(pred_sender))
185-
.context_state_)
183+
ex::get_completion_scheduler<ex::set_value_t>(ex::get_env(pred_sender)).context_state_)
186184
, pred_sender_{static_cast<PredSender&&>(pred_sender)}
187185
, closure_(closure)
188186
, n_(n) {

include/exec/fork_join.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ namespace exec {
7171
template <class Domain>
7272
struct _env_t {
7373
STDEXEC_ATTRIBUTE(always_inline, host, device)
74-
7574
static constexpr auto query(stdexec::get_domain_t) noexcept -> Domain {
7675
return {};
7776
}
@@ -144,7 +143,6 @@ namespace exec {
144143
using _cache_sndr_t = fork_join_t::_cache_sndr_t<_variant_t<_child_completions_t>, _domain_t>;
145144

146145
STDEXEC_ATTRIBUTE(host, device)
147-
148146
explicit _opstate_t(Sndr&& sndr, Closures&& closures, Rcvr rcvr) noexcept
149147
: _rcvr_(static_cast<Rcvr&&>(rcvr))
150148
, _fork_opstate_(
@@ -206,7 +204,6 @@ namespace exec {
206204
}
207205

208206
STDEXEC_ATTRIBUTE(nodiscard, host, device)
209-
210207
constexpr auto get_env() const noexcept -> stdexec::__fwd_env_t<stdexec::env_of_t<Rcvr>> {
211208
return stdexec::__env::__fwd_fn{}(stdexec::get_env(_rcvr_));
212209
}
@@ -294,7 +291,6 @@ namespace exec {
294291
}
295292

296293
STDEXEC_ATTRIBUTE(host, device)
297-
298294
constexpr auto get_env() const noexcept -> stdexec::__fwd_env_t<stdexec::env_of_t<Sndr>> {
299295
return stdexec::__env::__fwd_fn{}(stdexec::get_env(sndr_));
300296
}

include/exec/inline_scheduler.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020
namespace exec {
2121
// A simple scheduler that executes its continuation inline, on the
2222
// thread of the caller of start().
23-
using inline_scheduler [[deprecated("Use stdexec::inline_scheduler instead")]] = stdexec::inline_scheduler;
23+
using inline_scheduler
24+
[[deprecated("Use stdexec::inline_scheduler instead")]] = stdexec::inline_scheduler;
2425
} // namespace exec

include/exec/into_tuple.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ namespace exec {
103103
}
104104

105105
STDEXEC_ATTRIBUTE(always_inline)
106-
107106
constexpr auto operator()() const noexcept -> __binder_back<into_tuple_t> {
108107
return {{}, {}, {}};
109108
}

include/exec/materialize.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ namespace exec {
121121
}
122122

123123
STDEXEC_ATTRIBUTE(always_inline)
124-
125124
auto operator()() const noexcept -> __binder_back<__materialize_t> {
126125
return {{}, {}, {}};
127126
}
@@ -230,7 +229,6 @@ namespace exec {
230229
}
231230

232231
STDEXEC_ATTRIBUTE(always_inline)
233-
234232
auto operator()() const noexcept -> __binder_back<__dematerialize_t> {
235233
return {{}, {}, {}};
236234
}

include/exec/repeat_effect_until.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ namespace exec {
7878
using __child_t = __decay_t<__data_of<_Sender>>;
7979
using __receiver_t = stdexec::__t<__receiver<__id<_Sender>, __id<_Receiver>>>;
8080
using __child_on_sched_sender_t =
81-
__result_of<exec::sequence, schedule_result_t<trampoline_scheduler&>, __child_t &>;
81+
__result_of<exec::sequence, schedule_result_t<trampoline_scheduler &>, __child_t &>;
8282
using __child_op_t = stdexec::connect_result_t<__child_on_sched_sender_t, __receiver_t>;
8383

8484
__child_t __child_;
@@ -203,7 +203,6 @@ namespace exec {
203203
}
204204

205205
STDEXEC_ATTRIBUTE(always_inline)
206-
207206
constexpr auto operator()() const -> __binder_back<repeat_effect_until_t> {
208207
return {{}, {}, {}};
209208
}
@@ -234,7 +233,6 @@ namespace exec {
234233
}
235234

236235
STDEXEC_ATTRIBUTE(always_inline)
237-
238236
constexpr auto operator()() const -> __binder_back<repeat_effect_t> {
239237
return {{}, {}, {}};
240238
}

include/exec/repeat_n.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ namespace exec {
104104
using __child_t = decltype(__child_count_pair_t::__child_);
105105
using __receiver_t = stdexec::__t<__receiver<__id<_Sender>, __id<_Receiver>>>;
106106
using __child_on_sched_sender_t =
107-
__result_of<exec::sequence, schedule_result_t<trampoline_scheduler&>, __child_t &>;
107+
__result_of<exec::sequence, schedule_result_t<trampoline_scheduler &>, __child_t &>;
108108
using __child_op_t = stdexec::connect_result_t<__child_on_sched_sender_t, __receiver_t>;
109109

110110
__child_count_pair<__child_t> __pair_;
@@ -230,7 +230,6 @@ namespace exec {
230230
}
231231

232232
STDEXEC_ATTRIBUTE(always_inline)
233-
234233
constexpr auto
235234
operator()(std::size_t __count) const -> __binder_back<repeat_n_t, std::size_t> {
236235
return {{__count}, {}, {}};

include/exec/sequence/ignore_all_values.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ namespace exec {
294294
}
295295

296296
STDEXEC_ATTRIBUTE(always_inline)
297-
298297
constexpr auto operator()() const noexcept -> __binder_back<ignore_all_values_t> {
299298
return {{}, {}, {}};
300299
}

0 commit comments

Comments
 (0)