MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / round_up

Method round_up

smt/expr.cpp:1145–1148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1143}
1144
1145expr expr::round_up(const expr &power_of_two) const {
1146 expr minus_1 = power_of_two - mkUInt(1, power_of_two);
1147 return (*this + minus_1) & ~minus_1;
1148}
1149
1150expr expr::round_up_bits(const expr &nbits) const {
1151 return round_up(mkUInt(1, *this) << nbits.zextOrTrunc(bits()));

Callers 2

allocMethod · 0.80
isDereferenceableMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected