diff options
author | koe <ukoe@protonmail.com> | 2022-12-14 10:50:36 -0600 |
---|---|---|
committer | koe <ukoe@protonmail.com> | 2022-12-16 11:48:57 -0600 |
commit | b986421b4fb7e3a90f00a832b3a72600935388f0 (patch) | |
tree | 6cfcf7b62ad1d01ada4d54e461265a29808b002f /src/ringct/multiexp.h | |
parent | Merge pull request #8635 (diff) | |
download | monero-b986421b4fb7e3a90f00a832b3a72600935388f0.tar.xz |
adjust multiexp pippenger_cached_data for better reusability
Diffstat (limited to 'src/ringct/multiexp.h')
-rw-r--r-- | src/ringct/multiexp.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ringct/multiexp.h b/src/ringct/multiexp.h index 788516c0b..d9a240637 100644 --- a/src/ringct/multiexp.h +++ b/src/ringct/multiexp.h @@ -35,10 +35,16 @@ #define MULTIEXP_H #include <vector> +extern "C" +{ +#include "crypto/crypto-ops.h" +} #include "crypto/crypto.h" #include "rctTypes.h" #include "misc_log_ex.h" +#include <boost/align/aligned_allocator.hpp> + namespace rct { @@ -55,17 +61,19 @@ struct MultiexpData { }; struct straus_cached_data; -struct pippenger_cached_data; +using pippenger_cached_data = std::vector<ge_cached, boost::alignment::aligned_allocator<ge_cached, 4096>>; rct::key bos_coster_heap_conv(std::vector<MultiexpData> data); rct::key bos_coster_heap_conv_robust(std::vector<MultiexpData> data); std::shared_ptr<straus_cached_data> straus_init_cache(const std::vector<MultiexpData> &data, size_t N =0); size_t straus_get_cache_size(const std::shared_ptr<straus_cached_data> &cache); +ge_p3 straus_p3(const std::vector<MultiexpData> &data, const std::shared_ptr<straus_cached_data> &cache = NULL, size_t STEP = 0); rct::key straus(const std::vector<MultiexpData> &data, const std::shared_ptr<straus_cached_data> &cache = NULL, size_t STEP = 0); std::shared_ptr<pippenger_cached_data> pippenger_init_cache(const std::vector<MultiexpData> &data, size_t start_offset = 0, size_t N =0); size_t pippenger_get_cache_size(const std::shared_ptr<pippenger_cached_data> &cache); size_t get_pippenger_c(size_t N); -rct::key pippenger(const std::vector<MultiexpData> &data, const std::shared_ptr<pippenger_cached_data> &cache = NULL, size_t cache_size = 0, size_t c = 0); +ge_p3 pippenger_p3(const std::vector<MultiexpData> &data, const std::shared_ptr<pippenger_cached_data> &cache = NULL, size_t cache_size = 0, size_t c = 0); +rct::key pippenger(const std::vector<MultiexpData> &data, const std::shared_ptr<pippenger_cached_data> &cache = NULL, const size_t cache_size = 0, const size_t c = 0); } |