mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 05:06:44 +01:00
Update to custom fheuint prepare
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use poulpy_hal::{
|
||||
api::{VmpPMatAlloc, VmpPMatBytesOf, VmpPrepare, VmpPrepareTmpBytes},
|
||||
api::{VmpPMatAlloc, VmpPMatBytesOf, VmpPrepare, VmpPrepareTmpBytes, VmpZero},
|
||||
layouts::{Backend, Data, DataMut, DataRef, Module, Scratch, VmpPMat, VmpPMatToMut, VmpPMatToRef, ZnxInfos},
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@ impl<D: Data, B: Backend> GGSWInfos for GGSWPrepared<D, B> {
|
||||
|
||||
pub trait GGSWPreparedFactory<B: Backend>
|
||||
where
|
||||
Self: GetDegree + VmpPMatAlloc<B> + VmpPMatBytesOf + VmpPrepareTmpBytes + VmpPrepare<B>,
|
||||
Self: GetDegree + VmpPMatAlloc<B> + VmpPMatBytesOf + VmpPrepareTmpBytes + VmpPrepare<B> + VmpZero<B>,
|
||||
{
|
||||
fn alloc_ggsw_prepared(
|
||||
&self,
|
||||
@@ -163,7 +163,7 @@ where
|
||||
}
|
||||
|
||||
impl<B: Backend> GGSWPreparedFactory<B> for Module<B> where
|
||||
Self: GetDegree + VmpPMatAlloc<B> + VmpPMatBytesOf + VmpPrepareTmpBytes + VmpPrepare<B>
|
||||
Self: GetDegree + VmpPMatAlloc<B> + VmpPMatBytesOf + VmpPrepareTmpBytes + VmpPrepare<B> + VmpZero<B>
|
||||
{
|
||||
}
|
||||
|
||||
@@ -223,6 +223,13 @@ impl<D: DataMut, B: Backend> GGSWPrepared<D, B> {
|
||||
{
|
||||
module.ggsw_prepare(self, other, scratch);
|
||||
}
|
||||
|
||||
pub fn zero<M>(&mut self, module: &M)
|
||||
where
|
||||
M: GGSWPreparedFactory<B>,
|
||||
{
|
||||
module.vmp_zero(&mut self.data);
|
||||
}
|
||||
}
|
||||
|
||||
pub trait GGSWPreparedToMut<B: Backend> {
|
||||
|
||||
@@ -155,11 +155,7 @@ where
|
||||
)
|
||||
}
|
||||
|
||||
fn take_ggsw_slice<A>(
|
||||
&mut self,
|
||||
size: usize,
|
||||
infos: &A,
|
||||
) -> (Vec<GGSW<&mut [u8]>>, &mut Self)
|
||||
fn take_ggsw_slice<A>(&mut self, size: usize, infos: &A) -> (Vec<GGSW<&mut [u8]>>, &mut Self)
|
||||
where
|
||||
A: GGSWInfos,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user