@@ -700,7 +700,9 @@ class SharedMemoryRewriter : public StmtExprMutator {
700700 size_t offset{0 };
701701 size_t size{0 };
702702 const VarNode *var{nullptr };
703- bool operator >(const ActiveInterval &other) const { return end > other.end ; }
703+ bool operator >(const ActiveInterval &other) const {
704+ return end > other.end ;
705+ }
704706 };
705707
706708 static ArenaPlan LinearScanPack (std::vector<Interval> intervals) {
@@ -733,15 +735,15 @@ class SharedMemoryRewriter : public StmtExprMutator {
733735 for (const Interval &interval : intervals) {
734736 retire (interval.start );
735737 size_t offset = 0 ;
736- if (auto slot = freelist. Allocate (interval. size_bytes ,
737- interval.alignment )) {
738+ if (auto slot =
739+ freelist. Allocate (interval. size_bytes , interval.alignment )) {
738740 offset = slot.value ();
739741 } else {
740742 offset = AlignUpSize (arena_top, interval.alignment );
741743 arena_top = offset + interval.size_bytes ;
742744 }
743- active.push (
744- ActiveInterval{interval. end , offset, interval. size_bytes , interval.var });
745+ active.push (ActiveInterval{interval. end , offset, interval. size_bytes ,
746+ interval.var });
745747 offsets[interval.var ] = offset;
746748 }
747749
@@ -1124,8 +1126,8 @@ class SharedMemoryRewriter : public StmtExprMutator {
11241126 Interval interval;
11251127 interval.start = info.start ;
11261128 interval.end = info.end ;
1127- interval.size_bytes =
1128- static_cast < size_t >( std::max<int64_t >(0 , info.const_size_bytes .value ()));
1129+ interval.size_bytes = static_cast < size_t >(
1130+ std::max<int64_t >(0 , info.const_size_bytes .value ()));
11291131 interval.alignment = info.alignment ;
11301132 interval.var = info.var ;
11311133 intervals.push_back (interval);
@@ -1135,7 +1137,8 @@ class SharedMemoryRewriter : public StmtExprMutator {
11351137 size_t arena_size_const = plan.arena_size ;
11361138
11371139 if (verbose_) {
1138- LOG (DEBUG) << " ArenaPlan (constant buffers): arena_size=" << arena_size_const;
1140+ LOG (DEBUG) << " ArenaPlan (constant buffers): arena_size="
1141+ << arena_size_const;
11391142 for (const auto &kv : plan.offsets ) {
11401143 const VarNode *var = kv.first ;
11411144 LOG (DEBUG) << " " << var->name_hint << " -> offset=" << kv.second ;
@@ -1174,9 +1177,9 @@ class SharedMemoryRewriter : public StmtExprMutator {
11741177 total_size = max (total_size, buf_end);
11751178 }
11761179
1177- merged_alloc_size_ =
1178- buf_infos. empty () ? make_const (offset_dtype, 0 )
1179- : AlignPrimExpr (total_size, align_bytes_);
1180+ merged_alloc_size_ = buf_infos. empty ()
1181+ ? make_const (offset_dtype, 0 )
1182+ : AlignPrimExpr (total_size, align_bytes_);
11801183
11811184 bool overlap_detected = false ;
11821185
@@ -1203,8 +1206,7 @@ class SharedMemoryRewriter : public StmtExprMutator {
12031206 auto b_off_imm = buffer_byte_offsets_.at (b.var ).as <IntImmNode>();
12041207 if (!b.const_size_bytes .has_value () || b_off_imm == nullptr )
12051208 continue ;
1206- bool live_overlap =
1207- !(a.end <= b.start || b.end <= a.start );
1209+ bool live_overlap = !(a.end <= b.start || b.end <= a.start );
12081210 if (!live_overlap)
12091211 continue ;
12101212 int64_t b_off = b_off_imm->value ;
@@ -1235,9 +1237,9 @@ class SharedMemoryRewriter : public StmtExprMutator {
12351237 new_total = max (new_total, buf_end);
12361238 new_cursor = buf_end;
12371239 }
1238- merged_alloc_size_ =
1239- buf_infos. empty () ? make_const (offset_dtype, 0 )
1240- : AlignPrimExpr (new_total, align_bytes_);
1240+ merged_alloc_size_ = buf_infos. empty ()
1241+ ? make_const (offset_dtype, 0 )
1242+ : AlignPrimExpr (new_total, align_bytes_);
12411243 }
12421244 }
12431245
0 commit comments