Skip to content

Commit e287e30

Browse files
committed
[vpr][place] assert if dist is less than zero
1 parent ce9c606 commit e287e30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vpr/src/place/compressed_grid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct t_compressed_block_grid {
142142
// Find the nearest compressed location.
143143
int dist_prev = loc - *(itr - 1);
144144
int dist_next = *itr - loc;
145-
VTR_ASSERT_DEBUG(dist_prev > 0 && dist_next > 0);
145+
VTR_ASSERT_DEBUG(dist_prev >= 0 && dist_next >= 0);
146146
return (dist_prev <= dist_next) ? (std::distance(compressed_grid_dim.begin(), itr - 1)) :
147147
(std::distance(compressed_grid_dim.begin(), itr));
148148
}

0 commit comments

Comments
 (0)