pub struct HpuDevice { /* private fields */ }
Implementations§
Source§impl HpuDevice
Provide constructor
Use a toml configuration file to properly construct HpuDevice
This configuration file contain xclbin/kernel information and associated register map
definition
impl HpuDevice
Provide constructor Use a toml configuration file to properly construct HpuDevice This configuration file contain xclbin/kernel information and associated register map definition
Source§impl HpuDevice
Global Key setup
impl HpuDevice
Global Key setup
Sourcepub fn init<F>(
&self,
bsk: HpuLweBootstrapKeyOwned<u64>,
ksk: HpuLweKeyswitchKeyOwned<u64>,
gen_lut: F,
)
pub fn init<F>( &self, bsk: HpuLweBootstrapKeyOwned<u64>, ksk: HpuLweKeyswitchKeyOwned<u64>, gen_lut: F, )
Convert keys (i.e. Ksk/Bsk) is the correct format Upload them in on-board memory and configure associated register entries Also use the given server key to generate required set of GlweLut Upload them in on-board memory and configure associated register entries
Sourcepub fn mem_sanitizer(&self)
pub fn mem_sanitizer(&self)
Enforce a cleaan state of the HPU before workload execution Currently only enforce proper state of the Ciphertext pool i.e. No already allocated Ciphertext and no fragmentation
Source§impl HpuDevice
Bootstrapping Key handling
Only here to expose function to the user. Associated logic is handled by the backend
impl HpuDevice
Bootstrapping Key handling Only here to expose function to the user. Associated logic is handled by the backend
pub fn bsk_unset(&self)
pub fn bsk_set(&self, bsk: HpuLweBootstrapKeyOwned<u64>)
pub fn bsk_is_set(&self) -> bool
Source§impl HpuDevice
KeyswitchKey handling
Only here to expose function to the user. Associated logic is handled by the backend
impl HpuDevice
KeyswitchKey handling Only here to expose function to the user. Associated logic is handled by the backend
pub fn ksk_unset(&self)
pub fn ksk_set(&self, ksk: HpuLweKeyswitchKeyOwned<u64>)
pub fn ksk_is_set(&self) -> bool
Source§impl HpuDevice
GlweLut/ Fw handling
Only here to expose function to the user. Associated logic is handled by the backend
impl HpuDevice
GlweLut/ Fw handling Only here to expose function to the user. Associated logic is handled by the backend
pub fn fw_init(&self)
pub fn trace_init(&self)
Source§impl HpuDevice
Allocate new Hpu variable to hold ciphertext
Only here to expose function to the user. Associated logic is handled by the backend
impl HpuDevice
Allocate new Hpu variable to hold ciphertext Only here to expose function to the user. Associated logic is handled by the backend
Sourcepub fn new_var_from(
&self,
ct: Vec<HpuLweCiphertextOwned<u64>>,
mode: VarMode,
) -> HpuVarWrapped
pub fn new_var_from( &self, ct: Vec<HpuLweCiphertextOwned<u64>>, mode: VarMode, ) -> HpuVarWrapped
Construct an Hpu variable from a vector of HpuLweCiphertext
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HpuDevice
impl !RefUnwindSafe for HpuDevice
impl Send for HpuDevice
impl Sync for HpuDevice
impl Unpin for HpuDevice
impl !UnwindSafe for HpuDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more