Skip to content

Commit 1cecbab

Browse files
Fix formatting to be compliant with clang-format-18
1 parent 0c27255 commit 1cecbab

8 files changed

+28
-28
lines changed

libs/libvtrutil/src/tl_optional.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ struct optional_copy_assign_base<T, false> : optional_move_base<T> {
516516
// to make do with a non-trivial move assignment operator even if T is trivially
517517
// move assignable
518518
#ifndef TL_OPTIONAL_GCC49
519-
template<class T, bool = std::is_trivially_destructible<T>::value&& std::is_trivially_move_constructible<T>::value&& std::is_trivially_move_assignable<T>::value>
519+
template<class T, bool = std::is_trivially_destructible<T>::value && std::is_trivially_move_constructible<T>::value && std::is_trivially_move_assignable<T>::value>
520520
struct optional_move_assign_base : optional_copy_assign_base<T> {
521521
using optional_copy_assign_base<T>::optional_copy_assign_base;
522522
};
@@ -539,7 +539,7 @@ struct optional_move_assign_base<T, false> : optional_copy_assign_base<T> {
539539

540540
optional_move_assign_base&
541541
operator=(optional_move_assign_base&& rhs) noexcept(
542-
std::is_nothrow_move_constructible<T>::value&& std::is_nothrow_move_assignable<T>::value) {
542+
std::is_nothrow_move_constructible<T>::value && std::is_nothrow_move_assignable<T>::value) {
543543
this->assign(std::move(rhs));
544544
return *this;
545545
}
@@ -1243,7 +1243,7 @@ class optional : private detail::optional_move_assign_base<T>,
12431243
/// If one has a value, it is moved to the other and the movee is left
12441244
/// valueless.
12451245
void
1246-
swap(optional& rhs) noexcept(std::is_nothrow_move_constructible<T>::value&& detail::is_nothrow_swappable<T>::value) {
1246+
swap(optional& rhs) noexcept(std::is_nothrow_move_constructible<T>::value && detail::is_nothrow_swappable<T>::value) {
12471247
using std::swap;
12481248
if (has_value()) {
12491249
if (rhs.has_value()) {

libs/libvtrutil/src/vtr_memory.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void free_chunk_memory(t_chunk* chunk_info) {
164164
while (curr_ptr != nullptr) {
165165
/* Must cast pointers to type char*, since the're of type void*, which delete can't
166166
* be called on.*/
167-
delete[]((char*)curr_ptr->data_vptr); /* Free memory "chunk". */
167+
delete[] ((char*)curr_ptr->data_vptr); /* Free memory "chunk". */
168168
prev_ptr = curr_ptr;
169169
curr_ptr = curr_ptr->next;
170170
delete (t_linked_vptr*)prev_ptr; /* Free memory used to track "chunk". */

libs/libvtrutil/src/vtr_prefix_sum.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ class PrefixSum1D {
9595
*/
9696
PrefixSum1D(std::vector<T> vals, T zero = T())
9797
: PrefixSum1D(
98-
vals.size(),
99-
[&](size_t x) noexcept {
100-
return vals[x];
101-
},
102-
zero) {}
98+
vals.size(),
99+
[&](size_t x) noexcept {
100+
return vals[x];
101+
},
102+
zero) {}
103103

104104
/**
105105
* @brief Get the sum of all values in the original array of values between
@@ -227,12 +227,12 @@ class PrefixSum2D {
227227
*/
228228
PrefixSum2D(const vtr::NdMatrix<T, 2>& vals, T zero = T())
229229
: PrefixSum2D(
230-
vals.dim_size(0),
231-
vals.dim_size(1),
232-
[&](size_t x, size_t y) {
233-
return vals[x][y];
234-
},
235-
zero) {}
230+
vals.dim_size(0),
231+
vals.dim_size(1),
232+
[&](size_t x, size_t y) {
233+
return vals[x][y];
234+
},
235+
zero) {}
236236

237237
/**
238238
* @brief Get the sum of all values in the original grid of values between

vpr/src/draw/draw_rr_edges.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void draw_chanx_to_chanx_edge(RRNodeId from_node, RRNodeId to_node, short switch
181181
+ draw_coords->get_tile_width();
182182
x2 = to_chan.left();
183183

184-
} /* The following then is executed when from_xlow == to_xlow */
184+
} /* The following then is executed when from_xlow == to_xlow */
185185
else if (to_xhigh > from_xhigh) { /* Draw from right edge of one to other */
186186
x1 = from_chan.right();
187187
x2 = draw_coords->tile_x[from_xhigh + 1];

vpr/src/pack/pb_type_graph.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ static bool realloc_and_load_pb_graph_pin_ptrs_at_var(const int line_num,
14971497

14981498
if (prev_num_pins > 0) {
14991499
std::vector<t_pb_graph_pin*> temp(*pb_graph_pins, *pb_graph_pins + prev_num_pins);
1500-
delete[] * pb_graph_pins;
1500+
delete[] *pb_graph_pins;
15011501
*pb_graph_pins = new t_pb_graph_pin*[*num_pins];
15021502
for (i = 0; i < prev_num_pins; i++)
15031503
(*pb_graph_pins)[i] = temp[i];

vpr/src/place/place_macro.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,10 @@ int PlaceMacros::find_all_the_macro_(const ClusteredNetlist& clb_nlist,
294294
num_macro++;
295295

296296
} // Do nothing if the from_pins does not have same possible direct connection.
297-
} // Finish going through all the pins for from_pins.
298-
} // Do nothing if the to_pins does not have same possible direct connection.
299-
} // Finish going through all the pins for to_pins.
300-
} // Finish going through all blocks.
297+
} // Finish going through all the pins for from_pins.
298+
} // Do nothing if the to_pins does not have same possible direct connection.
299+
} // Finish going through all the pins for to_pins.
300+
} // Finish going through all blocks.
301301

302302
// Now, all the data is readily stored in the temporary data structures.
303303
return num_macro;
@@ -523,10 +523,10 @@ static void mark_direct_of_ports(int idirect,
523523
port_pin_to_block_pin);
524524
}
525525
} // Do nothing if port_name does not match
526-
} // Finish going through all the ports
527-
} // Finish going through all the subtiles
528-
} // Do nothing if pb_type_name does not match
529-
} // Finish going through all the blocks
526+
} // Finish going through all the ports
527+
} // Finish going through all the subtiles
528+
} // Do nothing if pb_type_name does not match
529+
} // Finish going through all the blocks
530530
}
531531

532532
static void mark_direct_of_pins(int start_pin_index,

vpr/src/place/verify_placement.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static unsigned check_macro_placement_consistency(const BlkLocRegistry& blk_loc_
204204
num_errors++;
205205
}
206206
} // Finish going through all the members
207-
} // Finish going through all the macros
207+
} // Finish going through all the macros
208208

209209
return num_errors;
210210
}

vpr/src/route/rr_graph_area.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ void count_bidir_routing_transistors(int num_switch, int wire_to_ipin_switch, fl
282282
break;
283283

284284
} /* End switch on from_rr_type */
285-
} /* End for all nodes */
285+
} /* End for all nodes */
286286

287287
delete[] cblock_counted;
288288
delete[] shared_buffer_trans;
@@ -478,7 +478,7 @@ void count_unidir_routing_transistors(std::vector<t_segment_inf>& /*segment_inf*
478478
break;
479479

480480
} /* End switch on from_rr_type */
481-
} /* End for all nodes */
481+
} /* End for all nodes */
482482

483483
/* Now add in the input connection block transistors. */
484484

0 commit comments

Comments
 (0)