Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
youben11 committed May 8, 2024
1 parent c2ec1a4 commit 0ea44f2
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ uint64_t sim_mul_lwe_u64(uint64_t lhs, uint64_t rhs, char *loc,
printf(msg_f, loc);
else if (lhs_signed != 0 && rhs_signed < INT64_MIN / lhs_signed)
printf(msg_f, loc);
} else if (rhs != 0 && (lhs > UINT63_MAX / rhs || result > UINT63_MAX)) {
} else if (rhs != 0 && lhs > UINT63_MAX / rhs) {
printf(msg_f, loc);
}
return result;
Expand Down Expand Up @@ -271,7 +271,7 @@ void sim_encode_expand_lut_for_boostrap(
assert((mega_case_size % 2) == 0);

// compute overflow bit
bool *overflow_info = (bool *)malloc(sizeof(bool) * output_lut_size);
std::vector<bool> overflow_info(output_lut_size, false);
uint64_t upper_bound = uint64_t(1)
<< (out_MESSAGE_BITS + (is_signed ? 1 : 0));
for (size_t i = 0; i < input_lut_size; i++) {
Expand Down Expand Up @@ -343,8 +343,6 @@ void sim_encode_expand_lut_for_boostrap(
}
}

free(overflow_info);

return;
}

Expand Down

0 comments on commit 0ea44f2

Please sign in to comment.