Skip to content

Commit 14bd1b6

Browse files
committed
fix style to satisfy clang-format 18.1.3
1 parent 4f9b927 commit 14bd1b6

30 files changed

+657
-639
lines changed

legacy/core/src/compiler/codegen/codegen_c.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,9 +1219,8 @@ void c_generator_pass_t::operator()(func_t f) {
12191219
c_generator_pass_t::c_generator_pass_t(std::ostream &source,
12201220
const context_ptr &ctx, bool gen_wrapper,
12211221
c_generator_optional_out_t *optional_out)
1222-
: source_(source), context_(ctx),
1223-
gen_wrapper_(gen_wrapper), pre_passes_{get_default_precodegen_passes(
1224-
ctx, gen_wrapper)},
1222+
: source_(source), context_(ctx), gen_wrapper_(gen_wrapper),
1223+
pre_passes_{get_default_precodegen_passes(ctx, gen_wrapper)},
12251224
optional_out_(optional_out) {
12261225
prepare_include(&source_);
12271226
if (optional_out_) {

legacy/core/src/compiler/codegen/llvm/intrinsic_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Value *codegen_llvm_vis_t::make_int_min_max(const intrin_call_c &v, bool ismin,
7474
Value *codegen_llvm_vis_t::make_int_min_max(Value *v1, Value *v2, bool ismin,
7575
type_category cate) {
7676
// fix-me: use smax/smin for newer LLVM
77-
llvm::Value *(llvm::IRBuilder<>::*ptr)(llvm::Value * LHS, llvm::Value * RHS,
77+
llvm::Value *(llvm::IRBuilder<>::*ptr)(llvm::Value *LHS, llvm::Value *RHS,
7878
const llvm::Twine &Name);
7979
if (ismin) {
8080
if (cate == CATE_INT) {

legacy/core/src/compiler/ir/graph/anchor_loop_generator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class anchor_loop_generator_t : public body_generator_base_t {
5454
const std::shared_ptr<fusion_anchor_t> &parent_fanchor) const;
5555

5656
void schedule_loops(context_ptr ctx, const void *config, stmt body,
57-
std::vector<for_loop> &fors) const override{};
57+
std::vector<for_loop> &fors) const override {};
5858
float get_gflop() const override { return 0; }
5959
};
6060

legacy/core/src/compiler/ir/graph/graph_map.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ namespace impl {
2626
namespace graph {
2727
namespace gc {
2828

29-
template <typename T> struct is_vector { static constexpr bool value = false; };
29+
template <typename T> struct is_vector {
30+
static constexpr bool value = false;
31+
};
3032

3133
template <typename T, typename Alloc> struct is_vector<std::vector<T, Alloc>> {
3234
static constexpr bool value = true;

legacy/core/src/compiler/ir/graph/graph_op.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class graph_op_t : public sc_op {
4848
void query_format(
4949
context_ptr ctx,
5050
std::vector<std::vector<format_stride_pair>> &supported_ins,
51-
std::vector<std::vector<format_stride_pair>> &supported_outs) override{};
51+
std::vector<std::vector<format_stride_pair>> &supported_outs) override {};
5252

5353
// the param graph is created by upper function and passed to this function.
5454
// It should be an empty graph and already synced with external graph.

legacy/core/src/compiler/ir/graph/mixed_partition.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,8 +1849,8 @@ static bool try_merge_mixed_parti_parallel(mixed_parti_t *A, mixed_parti_t *B) {
18491849

18501850
auto append_parti = (dep == parti_dep::l_dep_r) ? A : B,
18511851
target_parti = (dep == parti_dep::l_dep_r) ? B : A;
1852-
SC_MODULE_INFO << "Start try_merge_mixed_parti_parallel: "
1853-
<< "Target: " << target_parti->func_->name_
1852+
SC_MODULE_INFO << "Start try_merge_mixed_parti_parallel: " << "Target: "
1853+
<< target_parti->func_->name_
18541854
<< ", Append: " << append_parti->func_->name_;
18551855

18561856
auto outer_loops_target = target_parti->get_outer_loops(),
@@ -4028,7 +4028,7 @@ static void
40284028
crossover_dispatcher(const std::vector<mixed_parti_t::ptr> &parti_vec,
40294029
parti_merge_kind merge_kind) {
40304030
// select merger by merge kind
4031-
bool (*merger)(mixed_parti_t * A, mixed_parti_t * B);
4031+
bool (*merger)(mixed_parti_t *A, mixed_parti_t *B);
40324032
switch (merge_kind) {
40334033
case parti_merge_kind::vertical: {
40344034
merger = try_merge_mixed_parti_vertically;

legacy/core/src/compiler/ir/intrinsics.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct intrinsic_handler_t {
3838
};
3939

4040
struct x86_intrinsic_handler_t : public intrinsic_handler_t {
41-
virtual void on_initialize(intrin_call_node &node){};
41+
virtual void on_initialize(intrin_call_node &node) {};
4242
virtual void on_initialize(low_level_intrin_node &node) = 0;
4343
x86_intrinsic_handler_t(const std::string &name);
4444
virtual ~x86_intrinsic_handler_t() = default;

legacy/core/src/compiler/ir/transform/dynamic_parallel_transform.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ struct parallel_for_scope_t {
123123
bool is_start, uint64_t tid_step,
124124
const std::vector<expr_c> *parent_iters,
125125
const expr_c &cur_iter)
126-
: loop_{loop},
127-
nested_level_{nested_level}, is_start_{is_start}, tid_step_{tid_step} {
126+
: loop_{loop}, nested_level_{nested_level}, is_start_{is_start},
127+
tid_step_{tid_step} {
128128
if (parent_iters) {
129129
iters_ = *parent_iters;
130130
if (cur_iter.defined()) {

legacy/core/src/ops/fusible/transpose.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -348,23 +348,25 @@ bool can_be_fast_transpose(
348348

349349
#define TRANS2D_ASSIGN(dst, src) \
350350
cur_list.emplace_back( \
351-
builder::make_assign_unattached(rows[((dst)-1)], rows[((src)-1)]));
351+
builder::make_assign_unattached(rows[((dst) - 1)], rows[((src) - 1)]));
352352
// unpack and interleave
353353
#define TRANS2D_UNPACK_ASSIGN(option, dst, src1, src2, elem_bits) \
354354
cur_list.emplace_back(builder::make_assign_unattached( \
355-
rows[((dst)-1)], builder::make_unpack_##option( \
356-
rows[((src1)-1)], rows[((src2)-1)], elem_bits)));
355+
rows[((dst) - 1)], \
356+
builder::make_unpack_##option(rows[((src1) - 1)], rows[((src2) - 1)], \
357+
elem_bits)));
357358
#define TRANS2D_SHUFFLE_PERMUTE_ASSIGN_F32(command, dst, src1, src2, imm, \
358359
elem_bits) \
359360
cur_list.emplace_back(builder::make_assign_unattached( \
360-
rows[((dst)-1)], \
361-
builder::make_##command(rows[((src1)-1)], rows[((src2)-1)], imm, \
361+
rows[((dst) - 1)], \
362+
builder::make_##command(rows[((src1) - 1)], rows[((src2) - 1)], imm, \
362363
elem_bits)));
363364

364365
#define PERMUTEX_ASSIGN_F32(dst, src1, src2, imm, mask) \
365366
cur_list.emplace_back(builder::make_assign_unattached( \
366-
rows[((dst)-1)], \
367-
builder::make_permute(rows[((src1)-1)], rows[((src2)-1)], imm, mask)));
367+
rows[((dst) - 1)], \
368+
builder::make_permute(rows[((src1) - 1)], rows[((src2) - 1)], imm, \
369+
mask)));
368370

369371
#define TRANS2D_REG_CALCULATION_F32(type_bits) \
370372
TRANS2D_UNPACK_ASSIGN(low, 9, 1, 2, 32) \

legacy/core/src/ops/fusible/unary_elemwise.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,15 @@ expr tanh_op_t::compute_element(expr in) {
282282
#define DECL_VEC_CONSTANT(name, dtype, value) \
283283
expr name = make_expr<constant_node>(value, sc_data_type_t::dtype(lanes));
284284

285-
// clang-format off
285+
// clang-format off
286286
// NOLINTNEXTLINE
287287
#define DECL_VEC_VAR(name, dtype) auto name = builder::make_var( \
288288
sc_data_type_t::dtype(lanes), #name + fusion_create_var_idx()); \
289289
builder::get_current_builder()->push_var_tensor_def(name);
290290
// clang-format on
291291
#define DECL_CONSTANT(name, dtype, value) \
292292
expr name = make_expr<constant_node>(value, datatypes::dtype);
293-
// clang-format off
293+
// clang-format off
294294
// NOLINTNEXTLINE
295295
#define DECL_VAR(name, dtype) auto name = builder::make_var( \
296296
datatypes::dtype, #name + fusion_create_var_idx()); \

0 commit comments

Comments
 (0)