purify
C++ Purify implementation with native circuit and BPP support
Loading...
Searching...
No Matches
purify::ExperimentalBulletproofBackendCache Class Reference

Caller-owned cache for reusable legacy Bulletproof backend resources keyed by gate count. More...

#include <bulletproof.hpp>

Data Structures

struct  Impl
 

Public Member Functions

 ExperimentalBulletproofBackendCache ()
 
 ExperimentalBulletproofBackendCache (const ExperimentalBulletproofBackendCache &)=delete
 
ExperimentalBulletproofBackendCacheoperator= (const ExperimentalBulletproofBackendCache &)=delete
 
 ExperimentalBulletproofBackendCache (ExperimentalBulletproofBackendCache &&other) noexcept
 
ExperimentalBulletproofBackendCacheoperator= (ExperimentalBulletproofBackendCache &&other) noexcept
 
 ~ExperimentalBulletproofBackendCache ()
 
void clear ()
 
std::size_t size () const noexcept
 
Result< ExperimentalBulletproofBackendCacheclone_for_thread (std::size_t n_gates) const
 Clones one warmed backend-resource entry for independent use on another thread.
 
purify_bulletproof_backend_resourcesget_or_create (std::size_t n_gates, purify_secp_context *secp_context)
 Returns cached backend resources for this gate count, creating them on first use.
 

Detailed Description

Definition at line 312 of file bulletproof.hpp.

Constructor & Destructor Documentation

◆ ExperimentalBulletproofBackendCache() [1/3]

purify::ExperimentalBulletproofBackendCache::ExperimentalBulletproofBackendCache ( )

Definition at line 40 of file bulletproof.cpp.

◆ ExperimentalBulletproofBackendCache() [2/3]

purify::ExperimentalBulletproofBackendCache::ExperimentalBulletproofBackendCache ( const ExperimentalBulletproofBackendCache )
delete

◆ ExperimentalBulletproofBackendCache() [3/3]

purify::ExperimentalBulletproofBackendCache::ExperimentalBulletproofBackendCache ( ExperimentalBulletproofBackendCache &&  other)
defaultnoexcept

◆ ~ExperimentalBulletproofBackendCache()

purify::ExperimentalBulletproofBackendCache::~ExperimentalBulletproofBackendCache ( )
default

Member Function Documentation

◆ clear()

void purify::ExperimentalBulletproofBackendCache::clear ( )

Definition at line 50 of file bulletproof.cpp.

◆ clone_for_thread()

Result< ExperimentalBulletproofBackendCache > purify::ExperimentalBulletproofBackendCache::clone_for_thread ( std::size_t  n_gates) const

If an entry for n_gates exists, the returned cache receives its own scratch space and generator set for that one line. If the entry is absent, the returned cache is empty and can rebuild the line lazily on first use.

Returns
A thread-local one-line clone, or a backend/internal error if duplication fails.

Definition at line 60 of file bulletproof.cpp.

References purify::BackendRejectedInput, purify_bulletproof_backend_resources_clone(), and purify::unexpected_error().

◆ get_or_create()

purify_bulletproof_backend_resources * purify::ExperimentalBulletproofBackendCache::get_or_create ( std::size_t  n_gates,
purify_secp_context secp_context 
)

Definition at line 83 of file bulletproof.cpp.

References purify_bulletproof_backend_resources_create().

◆ operator=() [1/2]

ExperimentalBulletproofBackendCache & purify::ExperimentalBulletproofBackendCache::operator= ( const ExperimentalBulletproofBackendCache )
delete

◆ operator=() [2/2]

ExperimentalBulletproofBackendCache & purify::ExperimentalBulletproofBackendCache::operator= ( ExperimentalBulletproofBackendCache &&  other)
defaultnoexcept

◆ size()

std::size_t purify::ExperimentalBulletproofBackendCache::size ( ) const
noexcept

Definition at line 56 of file bulletproof.cpp.


The documentation for this class was generated from the following files: