From 8459cd1098a4c57f89e4bf0030b9fc49ceba25a8 Mon Sep 17 00:00:00 2001 From: shengweigit <190777298@qq.com> Date: Tue, 16 Apr 2024 14:14:24 +0800 Subject: [PATCH] replace mp_digit with uint64_t --- .../algorithms/paillier_dl/cgbn_wrapper/cgbn_wrapper.cu.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/heu/library/algorithms/paillier_dl/cgbn_wrapper/cgbn_wrapper.cu.cc b/heu/library/algorithms/paillier_dl/cgbn_wrapper/cgbn_wrapper.cu.cc index 85866f1c..9c72fb19 100644 --- a/heu/library/algorithms/paillier_dl/cgbn_wrapper/cgbn_wrapper.cu.cc +++ b/heu/library/algorithms/paillier_dl/cgbn_wrapper/cgbn_wrapper.cu.cc @@ -73,9 +73,9 @@ static void store2host(MPInt *z, dev_mem_t *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); } @@ -738,4 +738,4 @@ void CGBNWrapper::StoreToHost(SecretKey *sk) { store2host(&sk->hq_, sk->dev_hq_); } -} // namespace heu::lib::algorithms::paillier_dl \ No newline at end of file +} // namespace heu::lib::algorithms::paillier_dl