pub trait LweBootstrapKeyConversionEngine<InputKey, OutputKey>: AbstractEngine where
InputKey: LweBootstrapKeyEntity,
OutputKey: LweBootstrapKeyEntity<InputKeyDistribution = InputKey::InputKeyDistribution, OutputKeyDistribution = InputKey::OutputKeyDistribution>, {
fn convert_lwe_bootstrap_key(
&mut self,
input: &InputKey
) -> Result<OutputKey, LweBootstrapKeyConversionError<Self::EngineError>>;
unsafe fn convert_lwe_bootstrap_key_unchecked(
&mut self,
input: &InputKey
) -> OutputKey;
}
Expand description
A trait for engines converting LWE bootstrap keys.
Semantics
This pure operation generates a LWE bootstrap key containing the
conversion of the input
bootstrap key to a type with a different representation (for instance
from cpu to gpu memory).
Formal Definition
Required methods
fn convert_lwe_bootstrap_key(
&mut self,
input: &InputKey
) -> Result<OutputKey, LweBootstrapKeyConversionError<Self::EngineError>>
fn convert_lwe_bootstrap_key(
&mut self,
input: &InputKey
) -> Result<OutputKey, LweBootstrapKeyConversionError<Self::EngineError>>
Converts an LWE bootstrap key.
unsafe fn convert_lwe_bootstrap_key_unchecked(
&mut self,
input: &InputKey
) -> OutputKey
unsafe fn convert_lwe_bootstrap_key_unchecked(
&mut self,
input: &InputKey
) -> OutputKey
Unsafely converts an LWE bootstrap key.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweBootstrapKeyConversionError
. For safety concerns specific to an engine, refer to
the implementer safety section.
Implementors
Description:
Implementation of LweBootstrapKeyConversionEngine
for CoreEngine
that operates on
32 bits integers. It converts a bootstrap key from the standard to the Fourier domain.
Description:
Implementation of LweBootstrapKeyConversionEngine
for CoreEngine
that operates on
64 bits integers. It converts a bootstrap key from the standard to the Fourier domain.