Pippenger multiexp

Based on sarang's python code
This commit is contained in:
moneromooo-monero 2018-05-28 00:27:54 +01:00
parent 1ed0ed4de4
commit 263431c486
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
5 changed files with 284 additions and 4 deletions

View file

@ -39,9 +39,10 @@ enum test_multiexp_algorithm
multiexp_bos_coster,
multiexp_straus,
multiexp_straus_cached,
multiexp_pippenger,
};
template<test_multiexp_algorithm algorithm, size_t npoints>
template<test_multiexp_algorithm algorithm, size_t npoints, size_t c=0>
class test_multiexp
{
public:
@ -74,6 +75,8 @@ public:
return res == straus(data);
case multiexp_straus_cached:
return res == straus(data, cache);
case multiexp_pippenger:
return res == pippenger(data, c);
default:
return false;
}