Removed generic data type in PrepareScratchSpace trait

This commit is contained in:
Jean-Philippe Bossuat
2025-10-09 17:18:15 +02:00
parent 312ecc7f2f
commit 8d3fed3ae7
10 changed files with 22 additions and 22 deletions

View File

@@ -110,12 +110,12 @@ impl<B: Backend> GGLWEAutomorphismKeyPrepared<Vec<u8>, B> {
} }
} }
impl<DR: DataRef, B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for GGLWEAutomorphismKeyPrepared<DR, B> impl<B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for GGLWEAutomorphismKeyPrepared<Vec<u8>, B>
where where
GGLWESwitchingKeyPrepared<DR, B>: PrepareScratchSpace<B, A>, GGLWESwitchingKeyPrepared<Vec<u8>, B>: PrepareScratchSpace<B, A>,
{ {
fn prepare_scratch_space(module: &Module<B>, infos: &A) -> usize { fn prepare_scratch_space(module: &Module<B>, infos: &A) -> usize {
GGLWESwitchingKeyPrepared::<DR, B>::prepare_scratch_space(module, infos) GGLWESwitchingKeyPrepared::prepare_scratch_space(module, infos)
} }
} }

View File

@@ -260,7 +260,7 @@ impl<B: Backend> GGLWECiphertextPrepared<Vec<u8>, B> {
} }
} }
impl<DR: DataRef, B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for GGLWECiphertextPrepared<DR, B> impl<B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for GGLWECiphertextPrepared<Vec<u8>, B>
where where
Module<B>: VmpPrepareTmpBytes, Module<B>: VmpPrepareTmpBytes,
{ {

View File

@@ -115,12 +115,12 @@ impl<B: Backend> GGLWESwitchingKeyPrepared<Vec<u8>, B> {
} }
} }
impl<DR: DataRef, B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for GGLWESwitchingKeyPrepared<DR, B> impl<B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for GGLWESwitchingKeyPrepared<Vec<u8>, B>
where where
GGLWECiphertextPrepared<DR, B>: PrepareScratchSpace<B, A>, GGLWECiphertextPrepared<Vec<u8>, B>: PrepareScratchSpace<B, A>,
{ {
fn prepare_scratch_space(module: &Module<B>, infos: &A) -> usize { fn prepare_scratch_space(module: &Module<B>, infos: &A) -> usize {
GGLWECiphertextPrepared::<DR, B>::prepare_scratch_space(module, infos) GGLWECiphertextPrepared::prepare_scratch_space(module, infos)
} }
} }

View File

@@ -151,12 +151,12 @@ impl<D: DataRef, B: Backend> GGLWETensorKeyPrepared<D, B> {
} }
} }
impl<DR: DataRef, B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for GGLWETensorKeyPrepared<DR, B> impl<B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for GGLWETensorKeyPrepared<Vec<u8>, B>
where where
GGLWESwitchingKeyPrepared<DR, B>: PrepareScratchSpace<B, A>, GGLWESwitchingKeyPrepared<Vec<u8>, B>: PrepareScratchSpace<B, A>,
{ {
fn prepare_scratch_space(module: &Module<B>, infos: &A) -> usize { fn prepare_scratch_space(module: &Module<B>, infos: &A) -> usize {
GGLWESwitchingKeyPrepared::<DR, B>::prepare_scratch_space(module, infos) GGLWESwitchingKeyPrepared::prepare_scratch_space(module, infos)
} }
} }

View File

@@ -258,7 +258,7 @@ impl<D: DataRef, B: Backend> GGSWCiphertextPrepared<D, B> {
} }
} }
impl<DR: DataRef, B: Backend, A: GGSWInfos> PrepareScratchSpace<B, A> for GGSWCiphertextPrepared<DR, B> impl<B: Backend, A: GGSWInfos> PrepareScratchSpace<B, A> for GGSWCiphertextPrepared<Vec<u8>, B>
where where
Module<B>: VmpPrepareTmpBytes, Module<B>: VmpPrepareTmpBytes,
{ {

View File

@@ -180,7 +180,7 @@ where
} }
} }
impl<DR: DataRef, B: Backend, A: GLWEInfos> PrepareScratchSpace<B, A> for GLWEPublicKeyPrepared<DR, B> { impl<B: Backend, A: GLWEInfos> PrepareScratchSpace<B, A> for GLWEPublicKeyPrepared<Vec<u8>, B> {
fn prepare_scratch_space(_module: &Module<B>, _infos: &A) -> usize { fn prepare_scratch_space(_module: &Module<B>, _infos: &A) -> usize {
0 0
} }

View File

@@ -85,7 +85,7 @@ impl<D: Data, B: Backend> GLWESecretPrepared<D, B> {
} }
} }
impl<DR: DataRef, B: Backend, A: GLWEInfos> PrepareScratchSpace<B, A> for GLWESecretPrepared<DR, B> { impl<B: Backend, A: GLWEInfos> PrepareScratchSpace<B, A> for GLWESecretPrepared<Vec<u8>, B> {
fn prepare_scratch_space(_module: &Module<B>, _infos: &A) -> usize { fn prepare_scratch_space(_module: &Module<B>, _infos: &A) -> usize {
0 0
} }

View File

@@ -113,12 +113,12 @@ impl<B: Backend> GLWEToLWESwitchingKeyPrepared<Vec<u8>, B> {
} }
} }
impl<DR: DataRef, B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for GLWEToLWESwitchingKeyPrepared<DR, B> impl<B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for GLWEToLWESwitchingKeyPrepared<Vec<u8>, B>
where where
GGLWESwitchingKeyPrepared<DR, B>: PrepareScratchSpace<B, A>, GGLWESwitchingKeyPrepared<Vec<u8>, B>: PrepareScratchSpace<B, A>,
{ {
fn prepare_scratch_space(module: &Module<B>, infos: &A) -> usize { fn prepare_scratch_space(module: &Module<B>, infos: &A) -> usize {
GGLWESwitchingKeyPrepared::<DR, B>::prepare_scratch_space(module, infos) GGLWESwitchingKeyPrepared::prepare_scratch_space(module, infos)
} }
} }

View File

@@ -122,12 +122,12 @@ impl<B: Backend> LWESwitchingKeyPrepared<Vec<u8>, B> {
} }
} }
impl<DR: DataRef, B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for LWESwitchingKeyPrepared<DR, B> impl<B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for LWESwitchingKeyPrepared<Vec<u8>, B>
where where
GGLWESwitchingKeyPrepared<DR, B>: PrepareScratchSpace<B, A>, GGLWESwitchingKeyPrepared<Vec<u8>, B>: PrepareScratchSpace<B, A>,
{ {
fn prepare_scratch_space(module: &Module<B>, infos: &A) -> usize { fn prepare_scratch_space(module: &Module<B>, infos: &A) -> usize {
GGLWESwitchingKeyPrepared::<DR, B>::prepare_scratch_space(module, infos) GGLWESwitchingKeyPrepared::prepare_scratch_space(module, infos)
} }
} }

View File

@@ -114,12 +114,12 @@ impl<B: Backend> LWEToGLWESwitchingKeyPrepared<Vec<u8>, B> {
} }
} }
impl<DR: DataRef, B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for LWEToGLWESwitchingKeyPrepared<DR, B> impl<B: Backend, A: GGLWEInfos> PrepareScratchSpace<B, A> for LWEToGLWESwitchingKeyPrepared<Vec<u8>, B>
where where
GGLWESwitchingKeyPrepared<DR, B>: PrepareScratchSpace<B, A>, GGLWESwitchingKeyPrepared<Vec<u8>, B>: PrepareScratchSpace<B, A>,
{ {
fn prepare_scratch_space(module: &Module<B>, infos: &A) -> usize { fn prepare_scratch_space(module: &Module<B>, infos: &A) -> usize {
GGLWESwitchingKeyPrepared::<DR, B>::prepare_scratch_space(module, infos) GGLWESwitchingKeyPrepared::prepare_scratch_space(module, infos)
} }
} }