@@ -155,7 +155,7 @@ std::vector<uint32_t> NTT::conv(const std::vector<uint32_t> &a, const std::vecto
155155}
156156
157157std::vector<uint32_t > NTT::conv_and_reduce (const std::vector<uint32_t > &a, const std::vector<uint32_t > &b, uint32_t r, uint32_t s) {
158- auto call_ntt = [ this ]( const std::vector< uint32_t > &x, bool inverse){ return ntt (x, inverse); } ;
158+ auto call_ntt = auto call_ntt = std::bind (&Ntt::ntt, this , std::placeholders::_1, std::placeholders::_2); ;
159159 std::future<std::vector<uint32_t >> ntt_a = std::async (std::launch::async, call_ntt, a, false );
160160 std::future<std::vector<uint32_t >> ntt_b = std::async (std::launch::async, call_ntt, b, false );
161161 auto finish_and_reduce = [this ](const std::vector<uint32_t > &x, const std::vector<uint32_t > &y, uint32_t r, uint32_t s){
@@ -174,10 +174,10 @@ std::vector<uint32_t> NTT::conv_and_reduce(const std::vector<uint32_t> &a, const
174174}
175175
176176std::pair<std::vector<uint32_t >, std::vector<uint32_t >> NTT::raz_iteration (const std::vector<uint32_t > &product, const std::vector<uint32_t > &delta, uint32_t r, uint32_t s) {
177- auto call_ntt = [ this ]( const std::vector< uint32_t > &x, bool inverse, bool plusone = false ){ return ntt (x, inverse, plusone); } ;
178- std::future<std::vector<uint32_t >> ntt_delta = std::async (std::launch::async, call_ntt, delta, false );
177+ auto call_ntt = std::bind (&Ntt::ntt, this , std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); ;
178+ std::future<std::vector<uint32_t >> ntt_delta = std::async (std::launch::async, call_ntt, delta, false , false );
179179 std::future<std::vector<uint32_t >> ntt_delta_p1 = std::async (std::launch::async, call_ntt, delta, false , true );
180- std::future<std::vector<uint32_t >> ntt_product = std::async (std::launch::async, call_ntt, product, false );
180+ std::future<std::vector<uint32_t >> ntt_product = std::async (std::launch::async, call_ntt, product, false , false );
181181
182182
183183 auto finish_and_reduce = [this ](const std::vector<uint32_t > &x, const std::vector<uint32_t > &y, uint32_t r, uint32_t s){
0 commit comments