Skip to content

Commit 371e53f

Browse files
authored
Merge pull request #545 from fxreichl/master
Fix a bug that can arise when reducing circuit depth.
2 parents 89bef47 + ebd3e31 commit 371e53f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/opt/eslim/delayEngine.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,8 @@ namespace eSLIM {
121121
}
122122

123123
std::vector<bool> DelayEngine::reduceDelay(unsigned int max_size, unsigned int initial_delay) {
124-
assert (delay_selectors.find(initial_delay) != delay_selectors.end());
125124
std::vector<bool> last_model;
126-
for( auto it = delay_selectors.find(initial_delay); it != delay_selectors.end(); ++it ) {
125+
for( auto it = delay_selectors.lower_bound(initial_delay); it != delay_selectors.end(); ++it ) {
127126
int d = it->first;
128127
double timeout = getDynamicTimeout(max_size);
129128
int status = existsReplacement(max_size, d, timeout);

0 commit comments

Comments
 (0)