Skip to content

Commit

Permalink
replace mp_digit with uint64_t
Browse files Browse the repository at this point in the history
  • Loading branch information
shengweigit committed Apr 16, 2024
1 parent 8954536 commit 8459cd1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ static void store2host(MPInt *z, dev_mem_t<BITS> *address) {
CUDA_CHECK(cudaMemcpy(buffer.data(), address->_limbs, z_size, cudaMemcpyDeviceToHost));

int used = 0;
buf_cal_used((mp_digit *)buffer.data(), z_size / sizeof(mp_digit), &used);
buf_cal_used((uint64_t *)buffer.data(), z_size / sizeof(uint64_t), &used);

buffer.resize(used * sizeof(mp_digit));
buffer.resize(used * sizeof(uint64_t));
Endian endian = Endian::little;
(*z).FromMagBytes(buffer, endian);
}
Expand Down Expand Up @@ -738,4 +738,4 @@ void CGBNWrapper::StoreToHost(SecretKey *sk) {
store2host(&sk->hq_, sk->dev_hq_);
}

} // namespace heu::lib::algorithms::paillier_dl
} // namespace heu::lib::algorithms::paillier_dl

0 comments on commit 8459cd1

Please sign in to comment.