|
purify
C++ Purify implementation with native circuit and BPP support
|
Caller-owned cache for reusable experimental circuit reduction and BPPP backend data. More...
#include <bppp.hpp>
Data Structures | |
| struct | Impl |
Public Member Functions | |
| ExperimentalCircuitCache () | |
| ExperimentalCircuitCache (const ExperimentalCircuitCache &)=delete | |
| ExperimentalCircuitCache & | operator= (const ExperimentalCircuitCache &)=delete |
| ExperimentalCircuitCache (ExperimentalCircuitCache &&other) noexcept | |
| ExperimentalCircuitCache & | operator= (ExperimentalCircuitCache &&other) noexcept |
| ~ExperimentalCircuitCache () | |
| void | clear () |
| std::size_t | size () const noexcept |
| Result< ExperimentalCircuitCacheLine > | clone_line_for_thread (std::span< const PointBytes > generators) const |
| Clones one warmed backend-resource line for thread-local use. | |
| std::shared_ptr< const void > | find_public_data (const std::array< unsigned char, 32 > &key) const |
| Looks up opaque cached reduction data by digest key. | |
| void | insert_public_data (std::array< unsigned char, 32 > key, std::shared_ptr< const void > value) |
| Stores opaque cached reduction data by digest key. | |
| purify_bppp_backend_resources * | get_or_create_backend_resources (std::span< const PointBytes > generators, purify_secp_context *secp_context) |
| Returns cached backend resources for this generator set, creating them on first use. | |
Public Member Functions inherited from purify::bppp::ExperimentalCircuitBackend | |
| ExperimentalCircuitBackend (const ExperimentalCircuitBackend &)=delete | |
| ExperimentalCircuitBackend & | operator= (const ExperimentalCircuitBackend &)=delete |
| ExperimentalCircuitBackend (ExperimentalCircuitBackend &&) noexcept=default | |
| ExperimentalCircuitBackend & | operator= (ExperimentalCircuitBackend &&) noexcept=default |
| virtual | ~ExperimentalCircuitBackend () |
Additional Inherited Members | |
Protected Member Functions inherited from purify::bppp::ExperimentalCircuitBackend | |
| ExperimentalCircuitBackend ()=default | |
| purify::bppp::ExperimentalCircuitCache::ExperimentalCircuitCache | ( | ) |
|
delete |
|
defaultnoexcept |
|
default |
| Result< ExperimentalCircuitCacheLine > purify::bppp::ExperimentalCircuitCache::clone_line_for_thread | ( | std::span< const PointBytes > | generators | ) | const |
If a warmed backend entry matching generators exists, it is deep-cloned so the returned line has its own scratch space and mutable generator scratch buffers for that one entry. No public reduction data is copied into the clone. If no warmed entry matches, the returned line is empty.
Definition at line 182 of file bppp.cpp.
References purify::BackendRejectedInput, purify::bppp::generator_backend_cache_key(), generators, purify_bppp_backend_resources_clone(), and purify::unexpected_error().
| std::shared_ptr< const void > purify::bppp::ExperimentalCircuitCache::find_public_data | ( | const std::array< unsigned char, 32 > & | key | ) | const |
| purify_bppp_backend_resources * purify::bppp::ExperimentalCircuitCache::get_or_create_backend_resources | ( | std::span< const PointBytes > | generators, |
| purify_secp_context * | secp_context | ||
| ) |
Definition at line 220 of file bppp.cpp.
References generators.
| void purify::bppp::ExperimentalCircuitCache::insert_public_data | ( | std::array< unsigned char, 32 > | key, |
| std::shared_ptr< const void > | value | ||
| ) |
|
delete |
|
defaultnoexcept |
|
noexcept |