diff --git a/poulpy-backend/examples/rlwe_encrypt.rs b/poulpy-backend/examples/rlwe_encrypt.rs index a300150..0ec846d 100644 --- a/poulpy-backend/examples/rlwe_encrypt.rs +++ b/poulpy-backend/examples/rlwe_encrypt.rs @@ -4,9 +4,9 @@ use poulpy_hal::{ api::{ ModuleNew, ScratchOwnedAlloc, ScratchOwnedBorrow, SvpApplyInplace, SvpPPolAlloc, SvpPrepare, VecZnxAddNormal, VecZnxBigAddSmallInplace, VecZnxBigAlloc, VecZnxBigNormalize, VecZnxBigNormalizeTmpBytes, VecZnxBigSubSmallBInplace, - VecZnxDftAlloc, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigTmpA, VecZnxFillUniform, VecZnxNormalizeInplace, ZnxInfos, + VecZnxDftAlloc, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigTmpA, VecZnxFillUniform, VecZnxNormalizeInplace, }, - layouts::{Module, ScalarZnx, ScratchOwned, SvpPPol, VecZnx, VecZnxBig, VecZnxDft}, + layouts::{Module, ScalarZnx, ScratchOwned, SvpPPol, VecZnx, VecZnxBig, VecZnxDft, ZnxInfos}, source::Source, }; diff --git a/poulpy-backend/src/cpu_spqlios/fft64/svp_ppol.rs b/poulpy-backend/src/cpu_spqlios/fft64/svp_ppol.rs index 6a82dc6..88b1a5b 100644 --- a/poulpy-backend/src/cpu_spqlios/fft64/svp_ppol.rs +++ b/poulpy-backend/src/cpu_spqlios/fft64/svp_ppol.rs @@ -1,8 +1,7 @@ use poulpy_hal::{ - api::{ZnxInfos, ZnxView, ZnxViewMut}, layouts::{ Backend, Module, ScalarZnxToRef, SvpPPol, SvpPPolOwned, SvpPPolToMut, SvpPPolToRef, VecZnxDft, VecZnxDftToMut, - VecZnxDftToRef, + VecZnxDftToRef, ZnxInfos, ZnxView, ZnxViewMut, }, oep::{SvpApplyImpl, SvpApplyInplaceImpl, SvpPPolAllocBytesImpl, SvpPPolAllocImpl, SvpPPolFromBytesImpl, SvpPrepareImpl}, }; diff --git a/poulpy-backend/src/cpu_spqlios/fft64/vec_znx.rs b/poulpy-backend/src/cpu_spqlios/fft64/vec_znx.rs index 00143c0..2aa8f39 100644 --- a/poulpy-backend/src/cpu_spqlios/fft64/vec_znx.rs +++ b/poulpy-backend/src/cpu_spqlios/fft64/vec_znx.rs @@ -4,9 +4,12 @@ use rand_distr::Normal; use poulpy_hal::{ api::{ TakeSlice, TakeVecZnx, VecZnxAddDistF64, VecZnxCopy, VecZnxFillDistF64, VecZnxNormalizeTmpBytes, VecZnxRotate, - VecZnxRotateInplace, VecZnxSwithcDegree, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero, + VecZnxRotateInplace, VecZnxSwithcDegree, + }, + layouts::{ + Backend, Module, ScalarZnx, ScalarZnxToRef, Scratch, VecZnx, VecZnxToMut, VecZnxToRef, ZnxInfos, ZnxSliceSize, ZnxView, + ZnxViewMut, ZnxZero, }, - layouts::{Backend, Module, ScalarZnx, ScalarZnxToRef, Scratch, VecZnx, VecZnxToMut, VecZnxToRef}, oep::{ TakeSliceImpl, TakeVecZnxImpl, VecZnxAddDistF64Impl, VecZnxAddImpl, VecZnxAddInplaceImpl, VecZnxAddNormalImpl, VecZnxAddScalarInplaceImpl, VecZnxAutomorphismImpl, VecZnxAutomorphismInplaceImpl, VecZnxCopyImpl, VecZnxFillDistF64Impl, diff --git a/poulpy-backend/src/cpu_spqlios/fft64/vec_znx_big.rs b/poulpy-backend/src/cpu_spqlios/fft64/vec_znx_big.rs index 10496f4..5338e8d 100644 --- a/poulpy-backend/src/cpu_spqlios/fft64/vec_znx_big.rs +++ b/poulpy-backend/src/cpu_spqlios/fft64/vec_znx_big.rs @@ -2,12 +2,10 @@ use rand_distr::{Distribution, Normal}; use crate::cpu_spqlios::{FFT64, ffi::vec_znx}; use poulpy_hal::{ - api::{ - TakeSlice, VecZnxBigAddDistF64, VecZnxBigFillDistF64, VecZnxBigNormalizeTmpBytes, ZnxInfos, ZnxSliceSize, ZnxView, - ZnxViewMut, - }, + api::{TakeSlice, VecZnxBigAddDistF64, VecZnxBigFillDistF64, VecZnxBigNormalizeTmpBytes}, layouts::{ Backend, Module, Scratch, VecZnx, VecZnxBig, VecZnxBigOwned, VecZnxBigToMut, VecZnxBigToRef, VecZnxToMut, VecZnxToRef, + ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut, }, oep::{ TakeSliceImpl, VecZnxBigAddDistF64Impl, VecZnxBigAddImpl, VecZnxBigAddInplaceImpl, VecZnxBigAddNormalImpl, diff --git a/poulpy-backend/src/cpu_spqlios/fft64/vec_znx_dft.rs b/poulpy-backend/src/cpu_spqlios/fft64/vec_znx_dft.rs index a2487bd..f3e5391 100644 --- a/poulpy-backend/src/cpu_spqlios/fft64/vec_znx_dft.rs +++ b/poulpy-backend/src/cpu_spqlios/fft64/vec_znx_dft.rs @@ -1,8 +1,8 @@ use poulpy_hal::{ - api::{TakeSlice, VecZnxDftToVecZnxBigTmpBytes, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero}, + api::{TakeSlice, VecZnxDftToVecZnxBigTmpBytes}, layouts::{ Backend, Data, Module, Scratch, VecZnx, VecZnxBig, VecZnxBigToMut, VecZnxDft, VecZnxDftOwned, VecZnxDftToMut, - VecZnxDftToRef, VecZnxToRef, + VecZnxDftToRef, VecZnxToRef, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero, }, oep::{ VecZnxDftAddImpl, VecZnxDftAddInplaceImpl, VecZnxDftAllocBytesImpl, VecZnxDftAllocImpl, VecZnxDftCopyImpl, diff --git a/poulpy-backend/src/cpu_spqlios/fft64/vmp_pmat.rs b/poulpy-backend/src/cpu_spqlios/fft64/vmp_pmat.rs index b5770f0..11551f8 100644 --- a/poulpy-backend/src/cpu_spqlios/fft64/vmp_pmat.rs +++ b/poulpy-backend/src/cpu_spqlios/fft64/vmp_pmat.rs @@ -1,8 +1,8 @@ use poulpy_hal::{ - api::{TakeSlice, VmpApplyTmpBytes, VmpPrepareTmpBytes, ZnxInfos, ZnxView, ZnxViewMut}, + api::{TakeSlice, VmpApplyTmpBytes, VmpPrepareTmpBytes}, layouts::{ Backend, MatZnx, MatZnxToRef, Module, Scratch, VecZnxDft, VecZnxDftToMut, VecZnxDftToRef, VmpPMat, VmpPMatOwned, - VmpPMatToMut, VmpPMatToRef, + VmpPMatToMut, VmpPMatToRef, ZnxInfos, ZnxView, ZnxViewMut, }, oep::{ VmpApplyAddImpl, VmpApplyAddTmpBytesImpl, VmpApplyImpl, VmpApplyTmpBytesImpl, VmpPMatAllocBytesImpl, VmpPMatAllocImpl, diff --git a/poulpy-backend/src/cpu_spqlios/fft64/zn.rs b/poulpy-backend/src/cpu_spqlios/fft64/zn.rs index 3e2726f..80a2f03 100644 --- a/poulpy-backend/src/cpu_spqlios/fft64/zn.rs +++ b/poulpy-backend/src/cpu_spqlios/fft64/zn.rs @@ -1,6 +1,6 @@ use poulpy_hal::{ - api::{TakeSlice, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut}, - layouts::{Scratch, Zn, ZnToMut}, + api::TakeSlice, + layouts::{Scratch, Zn, ZnToMut, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut}, oep::{ TakeSliceImpl, ZnAddDistF64Impl, ZnAddNormalImpl, ZnFillDistF64Impl, ZnFillNormalImpl, ZnFillUniformImpl, ZnNormalizeInplaceImpl, diff --git a/poulpy-core/src/automorphism/gglwe_atk.rs b/poulpy-core/src/automorphism/gglwe_atk.rs index bddfade..8995659 100644 --- a/poulpy-core/src/automorphism/gglwe_atk.rs +++ b/poulpy-core/src/automorphism/gglwe_atk.rs @@ -2,9 +2,9 @@ use poulpy_hal::{ api::{ ScratchAvailable, TakeVecZnxDft, VecZnxAutomorphism, VecZnxAutomorphismInplace, VecZnxBigAddSmallInplace, VecZnxBigNormalize, VecZnxBigNormalizeTmpBytes, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, - VmpApply, VmpApplyAdd, VmpApplyTmpBytes, ZnxZero, + VmpApply, VmpApplyAdd, VmpApplyTmpBytes, }, - layouts::{Backend, DataMut, DataRef, Module, Scratch}, + layouts::{Backend, DataMut, DataRef, Module, Scratch, ZnxZero}, }; use crate::layouts::{GGLWEAutomorphismKey, GLWECiphertext, Infos, prepared::GGLWEAutomorphismKeyPrepared}; diff --git a/poulpy-core/src/conversion/glwe_to_lwe.rs b/poulpy-core/src/conversion/glwe_to_lwe.rs index 2b01e74..de74d14 100644 --- a/poulpy-core/src/conversion/glwe_to_lwe.rs +++ b/poulpy-core/src/conversion/glwe_to_lwe.rs @@ -1,10 +1,9 @@ use poulpy_hal::{ api::{ ScratchAvailable, TakeVecZnxDft, VecZnxBigAddSmallInplace, VecZnxBigNormalize, VecZnxBigNormalizeTmpBytes, - VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VmpApply, VmpApplyAdd, VmpApplyTmpBytes, ZnxView, - ZnxViewMut, ZnxZero, + VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VmpApply, VmpApplyAdd, VmpApplyTmpBytes, }, - layouts::{Backend, DataMut, DataRef, Module, Scratch}, + layouts::{Backend, DataMut, DataRef, Module, Scratch, ZnxView, ZnxViewMut, ZnxZero}, }; use crate::{ diff --git a/poulpy-core/src/conversion/lwe_to_glwe.rs b/poulpy-core/src/conversion/lwe_to_glwe.rs index 43d0de2..07d44b6 100644 --- a/poulpy-core/src/conversion/lwe_to_glwe.rs +++ b/poulpy-core/src/conversion/lwe_to_glwe.rs @@ -1,10 +1,9 @@ use poulpy_hal::{ api::{ ScratchAvailable, TakeVecZnxDft, VecZnxBigAddSmallInplace, VecZnxBigNormalize, VecZnxBigNormalizeTmpBytes, - VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VmpApply, VmpApplyAdd, VmpApplyTmpBytes, ZnxView, - ZnxViewMut, ZnxZero, + VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VmpApply, VmpApplyAdd, VmpApplyTmpBytes, }, - layouts::{Backend, DataMut, DataRef, Module, Scratch}, + layouts::{Backend, DataMut, DataRef, Module, Scratch, ZnxView, ZnxViewMut, ZnxZero}, }; use crate::{ diff --git a/poulpy-core/src/decryption/glwe_ct.rs b/poulpy-core/src/decryption/glwe_ct.rs index d590585..4018604 100644 --- a/poulpy-core/src/decryption/glwe_ct.rs +++ b/poulpy-core/src/decryption/glwe_ct.rs @@ -1,9 +1,9 @@ use poulpy_hal::{ api::{ - DataViewMut, SvpApplyInplace, TakeVecZnxBig, TakeVecZnxDft, VecZnxBigAddInplace, VecZnxBigAddSmallInplace, - VecZnxBigNormalize, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxNormalizeTmpBytes, + SvpApplyInplace, TakeVecZnxBig, TakeVecZnxDft, VecZnxBigAddInplace, VecZnxBigAddSmallInplace, VecZnxBigNormalize, + VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxNormalizeTmpBytes, }, - layouts::{Backend, DataMut, DataRef, Module, Scratch}, + layouts::{Backend, DataMut, DataRef, DataViewMut, Module, Scratch}, }; use crate::layouts::{GLWECiphertext, GLWEPlaintext, Infos, prepared::GLWESecretPrepared}; diff --git a/poulpy-core/src/decryption/lwe_ct.rs b/poulpy-core/src/decryption/lwe_ct.rs index bd29947..7b7f1b7 100644 --- a/poulpy-core/src/decryption/lwe_ct.rs +++ b/poulpy-core/src/decryption/lwe_ct.rs @@ -1,6 +1,6 @@ use poulpy_hal::{ - api::{ScratchOwnedAlloc, ScratchOwnedBorrow, ZnNormalizeInplace, ZnxView, ZnxViewMut}, - layouts::{Backend, DataMut, DataRef, Module, ScratchOwned}, + api::{ScratchOwnedAlloc, ScratchOwnedBorrow, ZnNormalizeInplace}, + layouts::{Backend, DataMut, DataRef, Module, ScratchOwned, ZnxView, ZnxViewMut}, oep::{ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl}, }; diff --git a/poulpy-core/src/encryption/compressed/gglwe_ct.rs b/poulpy-core/src/encryption/compressed/gglwe_ct.rs index a672ca5..d51191b 100644 --- a/poulpy-core/src/encryption/compressed/gglwe_ct.rs +++ b/poulpy-core/src/encryption/compressed/gglwe_ct.rs @@ -2,9 +2,9 @@ use poulpy_hal::{ api::{ ScratchAvailable, SvpApplyInplace, TakeVecZnx, TakeVecZnxDft, VecZnxAddInplace, VecZnxAddNormal, VecZnxAddScalarInplace, VecZnxBigNormalize, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, - VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, ZnxZero, + VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, }, - layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, Scratch}, + layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, Scratch, ZnxZero}, source::Source, }; @@ -52,7 +52,7 @@ impl GGLWECiphertextCompressed { { #[cfg(debug_assertions)] { - use poulpy_hal::api::ZnxInfos; + use poulpy_hal::layouts::ZnxInfos; assert_eq!( self.rank_in(), diff --git a/poulpy-core/src/encryption/compressed/ggsw_ct.rs b/poulpy-core/src/encryption/compressed/ggsw_ct.rs index 85605fe..27d2447 100644 --- a/poulpy-core/src/encryption/compressed/ggsw_ct.rs +++ b/poulpy-core/src/encryption/compressed/ggsw_ct.rs @@ -2,9 +2,9 @@ use poulpy_hal::{ api::{ ScratchAvailable, SvpApplyInplace, TakeVecZnx, TakeVecZnxDft, VecZnxAddInplace, VecZnxAddNormal, VecZnxAddScalarInplace, VecZnxBigNormalize, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, - VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, ZnxZero, + VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, }, - layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, Scratch}, + layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, Scratch, ZnxZero}, source::Source, }; @@ -52,7 +52,7 @@ impl GGSWCiphertextCompressed { { #[cfg(debug_assertions)] { - use poulpy_hal::api::ZnxInfos; + use poulpy_hal::layouts::ZnxInfos; assert_eq!(self.rank(), sk.rank()); assert_eq!(self.n(), sk.n()); diff --git a/poulpy-core/src/encryption/gglwe_ct.rs b/poulpy-core/src/encryption/gglwe_ct.rs index 0450ac3..cc5a59c 100644 --- a/poulpy-core/src/encryption/gglwe_ct.rs +++ b/poulpy-core/src/encryption/gglwe_ct.rs @@ -2,9 +2,9 @@ use poulpy_hal::{ api::{ ScratchAvailable, SvpApplyInplace, TakeVecZnx, TakeVecZnxDft, VecZnxAddInplace, VecZnxAddNormal, VecZnxAddScalarInplace, VecZnxBigNormalize, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, - VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, ZnxZero, + VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, }, - layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, Scratch}, + layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, Scratch, ZnxZero}, source::Source, }; @@ -56,7 +56,7 @@ impl GGLWECiphertext { { #[cfg(debug_assertions)] { - use poulpy_hal::api::ZnxInfos; + use poulpy_hal::layouts::ZnxInfos; assert_eq!( self.rank_in(), diff --git a/poulpy-core/src/encryption/ggsw_ct.rs b/poulpy-core/src/encryption/ggsw_ct.rs index 26dd683..71d5685 100644 --- a/poulpy-core/src/encryption/ggsw_ct.rs +++ b/poulpy-core/src/encryption/ggsw_ct.rs @@ -2,9 +2,9 @@ use poulpy_hal::{ api::{ ScratchAvailable, SvpApplyInplace, TakeVecZnx, TakeVecZnxDft, VecZnxAddInplace, VecZnxAddNormal, VecZnxAddScalarInplace, VecZnxBigNormalize, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, - VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, ZnxZero, + VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, }, - layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, Scratch, VecZnx}, + layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, Scratch, VecZnx, ZnxZero}, source::Source, }; @@ -55,7 +55,7 @@ impl GGSWCiphertext { { #[cfg(debug_assertions)] { - use poulpy_hal::api::ZnxInfos; + use poulpy_hal::layouts::ZnxInfos; assert_eq!(self.rank(), sk.rank()); assert_eq!(self.n(), sk.n()); diff --git a/poulpy-core/src/encryption/glwe_ct.rs b/poulpy-core/src/encryption/glwe_ct.rs index d4bb05f..93f5c40 100644 --- a/poulpy-core/src/encryption/glwe_ct.rs +++ b/poulpy-core/src/encryption/glwe_ct.rs @@ -3,9 +3,9 @@ use poulpy_hal::{ ScratchAvailable, SvpApply, SvpApplyInplace, SvpPPolAllocBytes, SvpPrepare, TakeScalarZnx, TakeSvpPPol, TakeVecZnx, TakeVecZnxDft, VecZnxAddInplace, VecZnxAddNormal, VecZnxBigAddNormal, VecZnxBigAddSmallInplace, VecZnxBigAllocBytes, VecZnxBigNormalize, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, - VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, ZnxInfos, ZnxZero, + VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, }, - layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, Scratch, VecZnx, VecZnxBig}, + layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, Scratch, VecZnx, VecZnxBig, ZnxInfos, ZnxZero}, source::Source, }; @@ -327,8 +327,6 @@ pub(crate) fn glwe_encrypt_sk_internal, other: &GGLWECiphertextCompressed) { #[cfg(debug_assertions)] { - use poulpy_hal::api::ZnxInfos; + use poulpy_hal::layouts::ZnxInfos; assert_eq!( self.n(), diff --git a/poulpy-core/src/layouts/compressed/gglwe_ksk.rs b/poulpy-core/src/layouts/compressed/gglwe_ksk.rs index 821f2b5..ab62073 100644 --- a/poulpy-core/src/layouts/compressed/gglwe_ksk.rs +++ b/poulpy-core/src/layouts/compressed/gglwe_ksk.rs @@ -1,6 +1,6 @@ use poulpy_hal::{ - api::{FillUniform, Reset, VecZnxCopy, VecZnxFillUniform}, - layouts::{Backend, Data, DataMut, DataRef, MatZnx, Module, ReaderFrom, WriterTo}, + api::{VecZnxCopy, VecZnxFillUniform}, + layouts::{Backend, Data, DataMut, DataRef, FillUniform, MatZnx, Module, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/compressed/gglwe_tsk.rs b/poulpy-core/src/layouts/compressed/gglwe_tsk.rs index cb50a2f..3eaee4f 100644 --- a/poulpy-core/src/layouts/compressed/gglwe_tsk.rs +++ b/poulpy-core/src/layouts/compressed/gglwe_tsk.rs @@ -1,6 +1,6 @@ use poulpy_hal::{ - api::{FillUniform, Reset, VecZnxCopy, VecZnxFillUniform}, - layouts::{Backend, Data, DataMut, DataRef, MatZnx, Module, ReaderFrom, WriterTo}, + api::{VecZnxCopy, VecZnxFillUniform}, + layouts::{Backend, Data, DataMut, DataRef, FillUniform, MatZnx, Module, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/compressed/ggsw_ct.rs b/poulpy-core/src/layouts/compressed/ggsw_ct.rs index 42a6bd9..446439d 100644 --- a/poulpy-core/src/layouts/compressed/ggsw_ct.rs +++ b/poulpy-core/src/layouts/compressed/ggsw_ct.rs @@ -1,6 +1,6 @@ use poulpy_hal::{ - api::{FillUniform, Reset, VecZnxCopy, VecZnxFillUniform}, - layouts::{Backend, Data, DataMut, DataRef, MatZnx, Module, ReaderFrom, WriterTo}, + api::{VecZnxCopy, VecZnxFillUniform}, + layouts::{Backend, Data, DataMut, DataRef, FillUniform, MatZnx, Module, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/compressed/glwe_ct.rs b/poulpy-core/src/layouts/compressed/glwe_ct.rs index bd1f8a5..5c0f9f8 100644 --- a/poulpy-core/src/layouts/compressed/glwe_ct.rs +++ b/poulpy-core/src/layouts/compressed/glwe_ct.rs @@ -1,6 +1,6 @@ use poulpy_hal::{ - api::{FillUniform, Reset, VecZnxCopy, VecZnxFillUniform}, - layouts::{Backend, Data, DataMut, DataRef, Module, ReaderFrom, VecZnx, WriterTo}, + api::{VecZnxCopy, VecZnxFillUniform}, + layouts::{Backend, Data, DataMut, DataRef, FillUniform, Module, ReaderFrom, Reset, VecZnx, WriterTo}, source::Source, }; @@ -118,7 +118,7 @@ where fn decompress(&mut self, module: &Module, other: &GLWECiphertextCompressed) { #[cfg(debug_assertions)] { - use poulpy_hal::api::ZnxInfos; + use poulpy_hal::layouts::ZnxInfos; assert_eq!( self.n(), diff --git a/poulpy-core/src/layouts/compressed/glwe_to_lwe_ksk.rs b/poulpy-core/src/layouts/compressed/glwe_to_lwe_ksk.rs index 9c412f4..3da0a5e 100644 --- a/poulpy-core/src/layouts/compressed/glwe_to_lwe_ksk.rs +++ b/poulpy-core/src/layouts/compressed/glwe_to_lwe_ksk.rs @@ -1,13 +1,12 @@ use std::fmt; use poulpy_hal::{ - api::{FillUniform, Reset}, api::{ SvpApplyInplace, SvpPPolAlloc, SvpPPolAllocBytes, SvpPrepare, VecZnxAddInplace, VecZnxAddNormal, VecZnxBigNormalize, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, }, - layouts::{Backend, Data, DataMut, DataRef, MatZnx, Module, ReaderFrom, WriterTo}, + layouts::{Backend, Data, DataMut, DataRef, FillUniform, MatZnx, Module, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/compressed/lwe_ct.rs b/poulpy-core/src/layouts/compressed/lwe_ct.rs index 19e2b80..d58a24d 100644 --- a/poulpy-core/src/layouts/compressed/lwe_ct.rs +++ b/poulpy-core/src/layouts/compressed/lwe_ct.rs @@ -1,8 +1,10 @@ use std::fmt; use poulpy_hal::{ - api::{FillUniform, Reset, ZnFillUniform, ZnxInfos, ZnxView, ZnxViewMut}, - layouts::{Backend, Data, DataMut, DataRef, Module, ReaderFrom, VecZnx, WriterTo}, + api::ZnFillUniform, + layouts::{ + Backend, Data, DataMut, DataRef, FillUniform, Module, ReaderFrom, Reset, VecZnx, WriterTo, ZnxInfos, ZnxView, ZnxViewMut, + }, source::Source, }; diff --git a/poulpy-core/src/layouts/compressed/lwe_ksk.rs b/poulpy-core/src/layouts/compressed/lwe_ksk.rs index 450d57a..15cc944 100644 --- a/poulpy-core/src/layouts/compressed/lwe_ksk.rs +++ b/poulpy-core/src/layouts/compressed/lwe_ksk.rs @@ -1,10 +1,10 @@ use poulpy_hal::{ api::{ - FillUniform, Reset, SvpApplyInplace, SvpPPolAlloc, SvpPPolAllocBytes, SvpPrepare, VecZnxAddInplace, VecZnxAddNormal, - VecZnxBigNormalize, VecZnxCopy, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, - VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, + SvpApplyInplace, SvpPPolAlloc, SvpPPolAllocBytes, SvpPrepare, VecZnxAddInplace, VecZnxAddNormal, VecZnxBigNormalize, + VecZnxCopy, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, VecZnxNormalize, + VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, }, - layouts::{Backend, Data, DataMut, DataRef, MatZnx, Module, ReaderFrom, WriterTo}, + layouts::{Backend, Data, DataMut, DataRef, FillUniform, MatZnx, Module, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/compressed/lwe_to_glwe_ksk.rs b/poulpy-core/src/layouts/compressed/lwe_to_glwe_ksk.rs index 0a9e2f9..92b8a05 100644 --- a/poulpy-core/src/layouts/compressed/lwe_to_glwe_ksk.rs +++ b/poulpy-core/src/layouts/compressed/lwe_to_glwe_ksk.rs @@ -1,11 +1,10 @@ use poulpy_hal::{ - api::{FillUniform, Reset}, api::{ SvpApplyInplace, SvpPPolAlloc, SvpPPolAllocBytes, SvpPrepare, VecZnxAddInplace, VecZnxAddNormal, VecZnxBigNormalize, VecZnxCopy, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, }, - layouts::{Backend, Data, DataMut, DataRef, MatZnx, Module, ReaderFrom, WriterTo}, + layouts::{Backend, Data, DataMut, DataRef, FillUniform, MatZnx, Module, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/gglwe_atk.rs b/poulpy-core/src/layouts/gglwe_atk.rs index 841c963..2318307 100644 --- a/poulpy-core/src/layouts/gglwe_atk.rs +++ b/poulpy-core/src/layouts/gglwe_atk.rs @@ -1,6 +1,5 @@ use poulpy_hal::{ - api::{FillUniform, Reset}, - layouts::{Data, DataMut, DataRef, MatZnx, ReaderFrom, WriterTo}, + layouts::{Data, DataMut, DataRef, FillUniform, MatZnx, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/gglwe_ct.rs b/poulpy-core/src/layouts/gglwe_ct.rs index f365847..e1e8c53 100644 --- a/poulpy-core/src/layouts/gglwe_ct.rs +++ b/poulpy-core/src/layouts/gglwe_ct.rs @@ -1,6 +1,5 @@ use poulpy_hal::{ - api::{FillUniform, Reset}, - layouts::{Data, DataMut, DataRef, MatZnx, ReaderFrom, WriterTo}, + layouts::{Data, DataMut, DataRef, FillUniform, MatZnx, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/gglwe_ksk.rs b/poulpy-core/src/layouts/gglwe_ksk.rs index 2e2b9fc..611be36 100644 --- a/poulpy-core/src/layouts/gglwe_ksk.rs +++ b/poulpy-core/src/layouts/gglwe_ksk.rs @@ -1,6 +1,5 @@ use poulpy_hal::{ - api::{FillUniform, Reset}, - layouts::{Data, DataMut, DataRef, MatZnx, ReaderFrom, WriterTo}, + layouts::{Data, DataMut, DataRef, FillUniform, MatZnx, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/gglwe_tsk.rs b/poulpy-core/src/layouts/gglwe_tsk.rs index 30a1bce..f3173b3 100644 --- a/poulpy-core/src/layouts/gglwe_tsk.rs +++ b/poulpy-core/src/layouts/gglwe_tsk.rs @@ -1,6 +1,5 @@ use poulpy_hal::{ - api::{FillUniform, Reset}, - layouts::{Data, DataMut, DataRef, MatZnx, ReaderFrom, WriterTo}, + layouts::{Data, DataMut, DataRef, FillUniform, MatZnx, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/ggsw_ct.rs b/poulpy-core/src/layouts/ggsw_ct.rs index 6a7c04d..db85e8d 100644 --- a/poulpy-core/src/layouts/ggsw_ct.rs +++ b/poulpy-core/src/layouts/ggsw_ct.rs @@ -1,6 +1,5 @@ use poulpy_hal::{ - api::{FillUniform, Reset}, - layouts::{Data, DataMut, DataRef, MatZnx, ReaderFrom, WriterTo}, + layouts::{Data, DataMut, DataRef, FillUniform, MatZnx, ReaderFrom, Reset, WriterTo}, source::Source, }; use std::fmt; diff --git a/poulpy-core/src/layouts/glwe_ct.rs b/poulpy-core/src/layouts/glwe_ct.rs index 525a742..ff78f32 100644 --- a/poulpy-core/src/layouts/glwe_ct.rs +++ b/poulpy-core/src/layouts/glwe_ct.rs @@ -1,6 +1,5 @@ use poulpy_hal::{ - api::{FillUniform, Reset}, - layouts::{Data, DataMut, DataRef, ReaderFrom, ToOwnedDeep, VecZnx, VecZnxToMut, VecZnxToRef, WriterTo}, + layouts::{Data, DataMut, DataRef, FillUniform, ReaderFrom, Reset, ToOwnedDeep, VecZnx, VecZnxToMut, VecZnxToRef, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/glwe_sk.rs b/poulpy-core/src/layouts/glwe_sk.rs index 917eaa0..8f8b10f 100644 --- a/poulpy-core/src/layouts/glwe_sk.rs +++ b/poulpy-core/src/layouts/glwe_sk.rs @@ -1,6 +1,5 @@ use poulpy_hal::{ - api::{ZnxInfos, ZnxZero}, - layouts::{Data, DataMut, DataRef, ReaderFrom, ScalarZnx, WriterTo}, + layouts::{Data, DataMut, DataRef, ReaderFrom, ScalarZnx, WriterTo, ZnxInfos, ZnxZero}, source::Source, }; diff --git a/poulpy-core/src/layouts/glwe_to_lwe_ksk.rs b/poulpy-core/src/layouts/glwe_to_lwe_ksk.rs index e1172db..9622336 100644 --- a/poulpy-core/src/layouts/glwe_to_lwe_ksk.rs +++ b/poulpy-core/src/layouts/glwe_to_lwe_ksk.rs @@ -1,6 +1,5 @@ use poulpy_hal::{ - api::{FillUniform, Reset}, - layouts::{Data, DataMut, DataRef, MatZnx, ReaderFrom, WriterTo}, + layouts::{Data, DataMut, DataRef, FillUniform, MatZnx, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/infos.rs b/poulpy-core/src/layouts/infos.rs index 15c8eef..5473b81 100644 --- a/poulpy-core/src/layouts/infos.rs +++ b/poulpy-core/src/layouts/infos.rs @@ -1,4 +1,4 @@ -use poulpy_hal::api::ZnxInfos; +use poulpy_hal::layouts::ZnxInfos; pub trait Infos { type Inner: ZnxInfos; diff --git a/poulpy-core/src/layouts/lwe_ct.rs b/poulpy-core/src/layouts/lwe_ct.rs index 4496c54..7ceeed6 100644 --- a/poulpy-core/src/layouts/lwe_ct.rs +++ b/poulpy-core/src/layouts/lwe_ct.rs @@ -1,8 +1,7 @@ use std::fmt; use poulpy_hal::{ - api::{FillUniform, Reset, ZnxInfos}, - layouts::{Data, DataMut, DataRef, ReaderFrom, WriterTo, Zn, ZnToMut, ZnToRef}, + layouts::{Data, DataMut, DataRef, FillUniform, ReaderFrom, Reset, WriterTo, Zn, ZnToMut, ZnToRef, ZnxInfos}, source::Source, }; diff --git a/poulpy-core/src/layouts/lwe_ksk.rs b/poulpy-core/src/layouts/lwe_ksk.rs index 96b2309..08852ca 100644 --- a/poulpy-core/src/layouts/lwe_ksk.rs +++ b/poulpy-core/src/layouts/lwe_ksk.rs @@ -1,8 +1,7 @@ use std::fmt; use poulpy_hal::{ - api::{FillUniform, Reset}, - layouts::{Data, DataMut, DataRef, MatZnx, ReaderFrom, WriterTo}, + layouts::{Data, DataMut, DataRef, FillUniform, MatZnx, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/lwe_sk.rs b/poulpy-core/src/layouts/lwe_sk.rs index 5e0faeb..4502a22 100644 --- a/poulpy-core/src/layouts/lwe_sk.rs +++ b/poulpy-core/src/layouts/lwe_sk.rs @@ -1,6 +1,5 @@ use poulpy_hal::{ - api::{ZnxInfos, ZnxView, ZnxZero}, - layouts::{Data, DataMut, DataRef, ScalarZnx}, + layouts::{Data, DataMut, DataRef, ScalarZnx, ZnxInfos, ZnxView, ZnxZero}, source::Source, }; diff --git a/poulpy-core/src/layouts/lwe_to_glwe_ksk.rs b/poulpy-core/src/layouts/lwe_to_glwe_ksk.rs index 2ca80a3..769193a 100644 --- a/poulpy-core/src/layouts/lwe_to_glwe_ksk.rs +++ b/poulpy-core/src/layouts/lwe_to_glwe_ksk.rs @@ -1,8 +1,7 @@ use std::fmt; use poulpy_hal::{ - api::{FillUniform, Reset}, - layouts::{Data, DataMut, DataRef, MatZnx, ReaderFrom, WriterTo}, + layouts::{Data, DataMut, DataRef, FillUniform, MatZnx, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-core/src/layouts/prepared/glwe_sk.rs b/poulpy-core/src/layouts/prepared/glwe_sk.rs index 595b155..c6d96a7 100644 --- a/poulpy-core/src/layouts/prepared/glwe_sk.rs +++ b/poulpy-core/src/layouts/prepared/glwe_sk.rs @@ -1,6 +1,6 @@ use poulpy_hal::{ - api::{SvpPPolAlloc, SvpPPolAllocBytes, SvpPrepare, ZnxInfos}, - layouts::{Backend, Data, DataMut, DataRef, Module, SvpPPol}, + api::{SvpPPolAlloc, SvpPPolAllocBytes, SvpPrepare}, + layouts::{Backend, Data, DataMut, DataRef, Module, SvpPPol, ZnxInfos}, }; use crate::{ diff --git a/poulpy-core/src/noise/gglwe_ct.rs b/poulpy-core/src/noise/gglwe_ct.rs index 829b497..7587ac7 100644 --- a/poulpy-core/src/noise/gglwe_ct.rs +++ b/poulpy-core/src/noise/gglwe_ct.rs @@ -2,9 +2,9 @@ use poulpy_hal::{ api::{ ScratchOwnedAlloc, ScratchOwnedBorrow, SvpApplyInplace, VecZnxBigAddInplace, VecZnxBigAddSmallInplace, VecZnxBigAllocBytes, VecZnxBigNormalize, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, - VecZnxNormalizeTmpBytes, VecZnxSubScalarInplace, ZnxZero, + VecZnxNormalizeTmpBytes, VecZnxSubScalarInplace, }, - layouts::{Backend, DataRef, Module, ScalarZnx, ScratchOwned}, + layouts::{Backend, DataRef, Module, ScalarZnx, ScratchOwned, ZnxZero}, oep::{ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl, TakeVecZnxBigImpl, TakeVecZnxDftImpl}, }; diff --git a/poulpy-core/src/noise/ggsw_ct.rs b/poulpy-core/src/noise/ggsw_ct.rs index d1237ce..1bd30f0 100644 --- a/poulpy-core/src/noise/ggsw_ct.rs +++ b/poulpy-core/src/noise/ggsw_ct.rs @@ -3,9 +3,9 @@ use poulpy_hal::{ ScratchOwnedAlloc, ScratchOwnedBorrow, SvpApplyInplace, VecZnxAddScalarInplace, VecZnxBigAddInplace, VecZnxBigAddSmallInplace, VecZnxBigAlloc, VecZnxBigAllocBytes, VecZnxBigNormalize, VecZnxBigNormalizeTmpBytes, VecZnxDftAlloc, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxDftToVecZnxBigTmpA, - VecZnxNormalizeTmpBytes, VecZnxSubABInplace, ZnxZero, + VecZnxNormalizeTmpBytes, VecZnxSubABInplace, }, - layouts::{Backend, DataRef, Module, ScalarZnx, ScratchOwned, VecZnxBig, VecZnxDft}, + layouts::{Backend, DataRef, Module, ScalarZnx, ScratchOwned, VecZnxBig, VecZnxDft, ZnxZero}, oep::{ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl, TakeVecZnxBigImpl, TakeVecZnxDftImpl}, }; diff --git a/poulpy-core/src/operations/glwe.rs b/poulpy-core/src/operations/glwe.rs index 3b45636..f6081c1 100644 --- a/poulpy-core/src/operations/glwe.rs +++ b/poulpy-core/src/operations/glwe.rs @@ -2,9 +2,9 @@ use poulpy_hal::{ api::{ VecZnxAdd, VecZnxAddInplace, VecZnxCopy, VecZnxMulXpMinusOne, VecZnxMulXpMinusOneInplace, VecZnxNegateInplace, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxRotate, VecZnxRotateInplace, VecZnxRshInplace, VecZnxSub, - VecZnxSubABInplace, VecZnxSubBAInplace, ZnxZero, + VecZnxSubABInplace, VecZnxSubBAInplace, }, - layouts::{Backend, DataMut, Module, Scratch, VecZnx}, + layouts::{Backend, DataMut, Module, Scratch, VecZnx, ZnxZero}, }; use crate::layouts::{GLWECiphertext, GLWECiphertextToMut, GLWECiphertextToRef, GLWEPlaintext, Infos, SetMetaData}; diff --git a/poulpy-core/src/tests/generics/conversion.rs b/poulpy-core/src/tests/generics/conversion.rs index 9f0aedc..5f82e4f 100644 --- a/poulpy-core/src/tests/generics/conversion.rs +++ b/poulpy-core/src/tests/generics/conversion.rs @@ -5,9 +5,9 @@ use poulpy_hal::{ VecZnxBigAllocBytes, VecZnxBigNormalize, VecZnxBigNormalizeTmpBytes, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, VecZnxSwithcDegree, VmpApply, VmpApplyAdd, VmpApplyTmpBytes, VmpPMatAlloc, VmpPrepare, - ZnAddNormal, ZnFillUniform, ZnNormalizeInplace, ZnxView, + ZnAddNormal, ZnFillUniform, ZnNormalizeInplace, }, - layouts::{Backend, Module, ScratchOwned}, + layouts::{Backend, Module, ScratchOwned, ZnxView}, oep::{ ScratchAvailableImpl, ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl, TakeScalarZnxImpl, TakeSvpPPolImpl, TakeVecZnxBigImpl, TakeVecZnxDftImpl, TakeVecZnxImpl, diff --git a/poulpy-core/src/tests/generics/external_product/gglwe_ksk.rs b/poulpy-core/src/tests/generics/external_product/gglwe_ksk.rs index 565df12..ab3263d 100644 --- a/poulpy-core/src/tests/generics/external_product/gglwe_ksk.rs +++ b/poulpy-core/src/tests/generics/external_product/gglwe_ksk.rs @@ -5,9 +5,8 @@ use poulpy_hal::{ VecZnxBigNormalize, VecZnxCopy, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxRotateInplace, VecZnxSub, VecZnxSubABInplace, VecZnxSubScalarInplace, VecZnxSwithcDegree, VmpApply, VmpApplyAdd, VmpApplyTmpBytes, VmpPMatAlloc, VmpPrepare, - ZnxViewMut, }, - layouts::{Backend, Module, ScalarZnx, ScalarZnxToMut, ScratchOwned}, + layouts::{Backend, Module, ScalarZnx, ScalarZnxToMut, ScratchOwned, ZnxViewMut}, oep::{ ScratchAvailableImpl, ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl, TakeScalarZnxImpl, TakeSvpPPolImpl, TakeVecZnxBigImpl, TakeVecZnxDftImpl, TakeVecZnxImpl, VecZnxBigAllocBytesImpl, VecZnxDftAllocBytesImpl, diff --git a/poulpy-core/src/tests/generics/external_product/ggsw_ct.rs b/poulpy-core/src/tests/generics/external_product/ggsw_ct.rs index 04e99a4..207ff32 100644 --- a/poulpy-core/src/tests/generics/external_product/ggsw_ct.rs +++ b/poulpy-core/src/tests/generics/external_product/ggsw_ct.rs @@ -5,9 +5,9 @@ use poulpy_hal::{ VecZnxBigAllocBytes, VecZnxBigNormalize, VecZnxBigNormalizeTmpBytes, VecZnxCopy, VecZnxDftAlloc, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxDftToVecZnxBigTmpA, VecZnxFillUniform, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxRotateInplace, VecZnxSub, VecZnxSubABInplace, VmpApply, - VmpApplyAdd, VmpApplyTmpBytes, VmpPMatAlloc, VmpPrepare, ZnxViewMut, + VmpApplyAdd, VmpApplyTmpBytes, VmpPMatAlloc, VmpPrepare, }, - layouts::{Backend, Module, ScalarZnx, ScalarZnxToMut, ScratchOwned}, + layouts::{Backend, Module, ScalarZnx, ScalarZnxToMut, ScratchOwned, ZnxViewMut}, oep::{ ScratchAvailableImpl, ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl, TakeScalarZnxImpl, TakeSvpPPolImpl, TakeVecZnxBigImpl, TakeVecZnxDftImpl, TakeVecZnxImpl, VecZnxBigAllocBytesImpl, VecZnxDftAllocBytesImpl, diff --git a/poulpy-core/src/tests/generics/external_product/glwe_ct.rs b/poulpy-core/src/tests/generics/external_product/glwe_ct.rs index 25d7d5c..32d70c1 100644 --- a/poulpy-core/src/tests/generics/external_product/glwe_ct.rs +++ b/poulpy-core/src/tests/generics/external_product/glwe_ct.rs @@ -4,9 +4,9 @@ use poulpy_hal::{ VecZnxAddNormal, VecZnxAddScalarInplace, VecZnxBigAddInplace, VecZnxBigAddSmallInplace, VecZnxBigAllocBytes, VecZnxBigNormalize, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxRotateInplace, VecZnxSub, VecZnxSubABInplace, - VmpApply, VmpApplyAdd, VmpApplyTmpBytes, VmpPMatAlloc, VmpPrepare, ZnxViewMut, + VmpApply, VmpApplyAdd, VmpApplyTmpBytes, VmpPMatAlloc, VmpPrepare, }, - layouts::{Backend, Module, ScalarZnx, ScratchOwned}, + layouts::{Backend, Module, ScalarZnx, ScratchOwned, ZnxViewMut}, oep::{ ScratchAvailableImpl, ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl, TakeScalarZnxImpl, TakeSvpPPolImpl, TakeVecZnxBigImpl, TakeVecZnxDftImpl, TakeVecZnxImpl, diff --git a/poulpy-core/src/tests/generics/keyswitch/lwe_ct.rs b/poulpy-core/src/tests/generics/keyswitch/lwe_ct.rs index a5f05d6..6cde7a7 100644 --- a/poulpy-core/src/tests/generics/keyswitch/lwe_ct.rs +++ b/poulpy-core/src/tests/generics/keyswitch/lwe_ct.rs @@ -5,9 +5,9 @@ use poulpy_hal::{ VecZnxBigAllocBytes, VecZnxBigNormalize, VecZnxBigNormalizeTmpBytes, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, VecZnxSwithcDegree, VmpApply, VmpApplyAdd, VmpApplyTmpBytes, VmpPMatAlloc, VmpPrepare, - ZnAddNormal, ZnFillUniform, ZnNormalizeInplace, ZnxView, + ZnAddNormal, ZnFillUniform, ZnNormalizeInplace, }, - layouts::{Backend, Module, ScratchOwned}, + layouts::{Backend, Module, ScratchOwned, ZnxView}, oep::{ ScratchAvailableImpl, ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl, TakeScalarZnxImpl, TakeSvpPPolImpl, TakeVecZnxBigImpl, TakeVecZnxDftImpl, TakeVecZnxImpl, diff --git a/poulpy-core/src/tests/generics/trace.rs b/poulpy-core/src/tests/generics/trace.rs index a4fced0..c27b798 100644 --- a/poulpy-core/src/tests/generics/trace.rs +++ b/poulpy-core/src/tests/generics/trace.rs @@ -8,9 +8,9 @@ use poulpy_hal::{ VecZnxBigSubSmallBInplace, VecZnxCopy, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxRotateInplace, VecZnxRshInplace, VecZnxSub, VecZnxSubABInplace, VecZnxSwithcDegree, VmpApply, VmpApplyAdd, VmpApplyTmpBytes, - VmpPMatAlloc, VmpPrepare, ZnxView, ZnxViewMut, + VmpPMatAlloc, VmpPrepare, }, - layouts::{Backend, Module, ScratchOwned}, + layouts::{Backend, Module, ScratchOwned, ZnxView, ZnxViewMut}, oep::{ ScratchAvailableImpl, ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl, TakeScalarZnxImpl, TakeSvpPPolImpl, TakeVecZnxBigImpl, TakeVecZnxDftImpl, TakeVecZnxImpl, diff --git a/poulpy-hal/src/api/mod.rs b/poulpy-hal/src/api/mod.rs index 6e631bd..dac0def 100644 --- a/poulpy-hal/src/api/mod.rs +++ b/poulpy-hal/src/api/mod.rs @@ -6,7 +6,6 @@ mod vec_znx_big; mod vec_znx_dft; mod vmp_pmat; mod zn; -mod znx_base; pub use module::*; pub use scratch::*; @@ -16,4 +15,3 @@ pub use vec_znx_big::*; pub use vec_znx_dft::*; pub use vmp_pmat::*; pub use zn::*; -pub use znx_base::*; diff --git a/poulpy-hal/src/layouts/encoding.rs b/poulpy-hal/src/layouts/encoding.rs index cde5e8a..b79002c 100644 --- a/poulpy-hal/src/layouts/encoding.rs +++ b/poulpy-hal/src/layouts/encoding.rs @@ -1,9 +1,8 @@ use itertools::izip; use rug::{Assign, Float}; -use crate::{ - api::{ZnxInfos, ZnxView, ZnxViewMut, ZnxZero}, - layouts::{DataMut, DataRef, VecZnx, VecZnxToMut, VecZnxToRef, Zn, ZnToMut, ZnToRef}, +use crate::layouts::{ + DataMut, DataRef, VecZnx, VecZnxToMut, VecZnxToRef, Zn, ZnToMut, ZnToRef, ZnxInfos, ZnxView, ZnxViewMut, ZnxZero, }; impl VecZnx { diff --git a/poulpy-hal/src/layouts/mat_znx.rs b/poulpy-hal/src/layouts/mat_znx.rs index db2400b..c0ec62c 100644 --- a/poulpy-hal/src/layouts/mat_znx.rs +++ b/poulpy-hal/src/layouts/mat_znx.rs @@ -1,7 +1,9 @@ use crate::{ alloc_aligned, - api::{DataView, DataViewMut, FillUniform, Reset, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero}, - layouts::{Data, DataMut, DataRef, ReaderFrom, ToOwnedDeep, VecZnx, WriterTo}, + layouts::{ + Data, DataMut, DataRef, DataView, DataViewMut, FillUniform, ReaderFrom, Reset, ToOwnedDeep, VecZnx, WriterTo, ZnxInfos, + ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero, + }, source::Source, }; use std::fmt; diff --git a/poulpy-hal/src/layouts/mod.rs b/poulpy-hal/src/layouts/mod.rs index ced5a3e..33a2c1f 100644 --- a/poulpy-hal/src/layouts/mod.rs +++ b/poulpy-hal/src/layouts/mod.rs @@ -11,6 +11,7 @@ mod vec_znx_big; mod vec_znx_dft; mod vmp_pmat; mod zn; +mod znx_base; pub use mat_znx::*; pub use module::*; @@ -23,6 +24,7 @@ pub use vec_znx_big::*; pub use vec_znx_dft::*; pub use vmp_pmat::*; pub use zn::*; +pub use znx_base::*; pub trait Data = PartialEq + Eq + Sized; pub trait DataRef = Data + AsRef<[u8]>; diff --git a/poulpy-hal/src/layouts/scalar_znx.rs b/poulpy-hal/src/layouts/scalar_znx.rs index 679acb3..4e83688 100644 --- a/poulpy-hal/src/layouts/scalar_znx.rs +++ b/poulpy-hal/src/layouts/scalar_znx.rs @@ -4,8 +4,10 @@ use rand_distr::{Distribution, weighted::WeightedIndex}; use crate::{ alloc_aligned, - api::{DataView, DataViewMut, FillUniform, Reset, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero}, - layouts::{Data, DataMut, DataRef, ReaderFrom, ToOwnedDeep, VecZnx, WriterTo}, + layouts::{ + Data, DataMut, DataRef, DataView, DataViewMut, FillUniform, ReaderFrom, Reset, ToOwnedDeep, VecZnx, WriterTo, ZnxInfos, + ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero, + }, source::Source, }; diff --git a/poulpy-hal/src/layouts/stats.rs b/poulpy-hal/src/layouts/stats.rs index 5930c57..3b573f9 100644 --- a/poulpy-hal/src/layouts/stats.rs +++ b/poulpy-hal/src/layouts/stats.rs @@ -4,10 +4,7 @@ use rug::{ ops::{AddAssignRound, DivAssignRound, SubAssignRound}, }; -use crate::{ - api::ZnxInfos, - layouts::{DataRef, VecZnx}, -}; +use crate::layouts::{DataRef, VecZnx, ZnxInfos}; impl VecZnx { pub fn std(&self, basek: usize, col: usize) -> f64 { diff --git a/poulpy-hal/src/layouts/svp_ppol.rs b/poulpy-hal/src/layouts/svp_ppol.rs index 7565ae8..80b0e52 100644 --- a/poulpy-hal/src/layouts/svp_ppol.rs +++ b/poulpy-hal/src/layouts/svp_ppol.rs @@ -2,8 +2,7 @@ use std::marker::PhantomData; use crate::{ alloc_aligned, - api::{DataView, DataViewMut, ZnxInfos, ZnxSliceSize, ZnxView}, - layouts::{Backend, Data, DataMut, DataRef, ReaderFrom, WriterTo}, + layouts::{Backend, Data, DataMut, DataRef, DataView, DataViewMut, ReaderFrom, WriterTo, ZnxInfos, ZnxSliceSize, ZnxView}, oep::SvpPPolAllocBytesImpl, }; diff --git a/poulpy-hal/src/layouts/vec_znx.rs b/poulpy-hal/src/layouts/vec_znx.rs index 1bd9129..6564e35 100644 --- a/poulpy-hal/src/layouts/vec_znx.rs +++ b/poulpy-hal/src/layouts/vec_znx.rs @@ -2,8 +2,10 @@ use std::fmt; use crate::{ alloc_aligned, - api::{DataView, DataViewMut, FillUniform, Reset, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero}, - layouts::{Data, DataMut, DataRef, ReaderFrom, ToOwnedDeep, WriterTo}, + layouts::{ + Data, DataMut, DataRef, DataView, DataViewMut, FillUniform, ReaderFrom, Reset, ToOwnedDeep, WriterTo, ZnxInfos, + ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero, + }, source::Source, }; diff --git a/poulpy-hal/src/layouts/vec_znx_big.rs b/poulpy-hal/src/layouts/vec_znx_big.rs index 1a4e063..df4a507 100644 --- a/poulpy-hal/src/layouts/vec_znx_big.rs +++ b/poulpy-hal/src/layouts/vec_znx_big.rs @@ -5,8 +5,7 @@ use std::fmt; use crate::{ alloc_aligned, - api::{DataView, DataViewMut, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero}, - layouts::{Backend, Data, DataMut, DataRef}, + layouts::{Backend, Data, DataMut, DataRef, DataView, DataViewMut, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero}, oep::VecZnxBigAllocBytesImpl, }; diff --git a/poulpy-hal/src/layouts/vec_znx_dft.rs b/poulpy-hal/src/layouts/vec_znx_dft.rs index bc9ce34..dbf87a3 100644 --- a/poulpy-hal/src/layouts/vec_znx_dft.rs +++ b/poulpy-hal/src/layouts/vec_znx_dft.rs @@ -4,8 +4,9 @@ use rand_distr::num_traits::Zero; use crate::{ alloc_aligned, - api::{DataView, DataViewMut, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero}, - layouts::{Backend, Data, DataMut, DataRef, VecZnxBig}, + layouts::{ + Backend, Data, DataMut, DataRef, DataView, DataViewMut, VecZnxBig, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero, + }, oep::VecZnxBigAllocBytesImpl, }; #[derive(PartialEq, Eq)] diff --git a/poulpy-hal/src/layouts/vmp_pmat.rs b/poulpy-hal/src/layouts/vmp_pmat.rs index 2cfd0e2..cadbc58 100644 --- a/poulpy-hal/src/layouts/vmp_pmat.rs +++ b/poulpy-hal/src/layouts/vmp_pmat.rs @@ -2,8 +2,7 @@ use std::marker::PhantomData; use crate::{ alloc_aligned, - api::{DataView, DataViewMut, ZnxInfos, ZnxView}, - layouts::{Backend, Data, DataMut, DataRef}, + layouts::{Backend, Data, DataMut, DataRef, DataView, DataViewMut, ZnxInfos, ZnxView}, oep::VmpPMatAllocBytesImpl, }; diff --git a/poulpy-hal/src/layouts/zn.rs b/poulpy-hal/src/layouts/zn.rs index 33ef6ea..68b0b0f 100644 --- a/poulpy-hal/src/layouts/zn.rs +++ b/poulpy-hal/src/layouts/zn.rs @@ -2,8 +2,10 @@ use std::fmt; use crate::{ alloc_aligned, - api::{DataView, DataViewMut, FillUniform, Reset, ZnxInfos, ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero}, - layouts::{Data, DataMut, DataRef, ReaderFrom, ToOwnedDeep, WriterTo}, + layouts::{ + Data, DataMut, DataRef, DataView, DataViewMut, FillUniform, ReaderFrom, Reset, ToOwnedDeep, WriterTo, ZnxInfos, + ZnxSliceSize, ZnxView, ZnxViewMut, ZnxZero, + }, source::Source, }; diff --git a/poulpy-hal/src/api/znx_base.rs b/poulpy-hal/src/layouts/znx_base.rs similarity index 100% rename from poulpy-hal/src/api/znx_base.rs rename to poulpy-hal/src/layouts/znx_base.rs diff --git a/poulpy-hal/src/oep/scratch.rs b/poulpy-hal/src/oep/scratch.rs index da8d28e..9a06b4e 100644 --- a/poulpy-hal/src/oep/scratch.rs +++ b/poulpy-hal/src/oep/scratch.rs @@ -1,6 +1,5 @@ -use crate::{ - api::ZnxInfos, - layouts::{Backend, DataRef, MatZnx, ScalarZnx, Scratch, ScratchOwned, SvpPPol, VecZnx, VecZnxBig, VecZnxDft, VmpPMat}, +use crate::layouts::{ + Backend, DataRef, MatZnx, ScalarZnx, Scratch, ScratchOwned, SvpPPol, VecZnx, VecZnxBig, VecZnxDft, VmpPMat, ZnxInfos, }; /// # THIS TRAIT IS AN OPEN EXTENSION POINT (unsafe) diff --git a/poulpy-hal/src/tests/serialization.rs b/poulpy-hal/src/tests/serialization.rs index ba54677..17300bb 100644 --- a/poulpy-hal/src/tests/serialization.rs +++ b/poulpy-hal/src/tests/serialization.rs @@ -1,8 +1,7 @@ use std::fmt::Debug; use crate::{ - api::{FillUniform, Reset}, - layouts::{ReaderFrom, WriterTo}, + layouts::{FillUniform, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-hal/src/tests/vec_znx/encoding.rs b/poulpy-hal/src/tests/vec_znx/encoding.rs index eac449c..90f8c62 100644 --- a/poulpy-hal/src/tests/vec_znx/encoding.rs +++ b/poulpy-hal/src/tests/vec_znx/encoding.rs @@ -1,6 +1,5 @@ use crate::{ - api::{ZnxInfos, ZnxViewMut}, - layouts::VecZnx, + layouts::{VecZnx, ZnxInfos, ZnxViewMut}, source::Source, }; diff --git a/poulpy-hal/src/tests/vec_znx/generics.rs b/poulpy-hal/src/tests/vec_znx/generics.rs index 498abfe..3b31c84 100644 --- a/poulpy-hal/src/tests/vec_znx/generics.rs +++ b/poulpy-hal/src/tests/vec_znx/generics.rs @@ -1,6 +1,6 @@ use crate::{ - api::{VecZnxAddNormal, VecZnxFillUniform, ZnxView}, - layouts::{Backend, Module, VecZnx}, + api::{VecZnxAddNormal, VecZnxFillUniform}, + layouts::{Backend, Module, VecZnx, ZnxView}, source::Source, }; diff --git a/poulpy-hal/src/tests/vmp_pmat/vmp_apply.rs b/poulpy-hal/src/tests/vmp_pmat/vmp_apply.rs index 6b77654..7590882 100644 --- a/poulpy-hal/src/tests/vmp_pmat/vmp_apply.rs +++ b/poulpy-hal/src/tests/vmp_pmat/vmp_apply.rs @@ -2,9 +2,8 @@ use crate::{ api::{ ModuleNew, ScratchOwnedAlloc, ScratchOwnedBorrow, VecZnxBigAlloc, VecZnxBigNormalize, VecZnxBigNormalizeTmpBytes, VecZnxDftAlloc, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigTmpA, VmpApply, VmpApplyTmpBytes, VmpPMatAlloc, VmpPrepare, - ZnxInfos, ZnxViewMut, }, - layouts::{MatZnx, Module, ScratchOwned, VecZnx, VecZnxBig, VecZnxDft, VmpPMat}, + layouts::{MatZnx, Module, ScratchOwned, VecZnx, VecZnxBig, VecZnxDft, VmpPMat, ZnxInfos, ZnxViewMut}, oep::{ ModuleNewImpl, ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl, VecZnxBigAllocImpl, VecZnxBigNormalizeImpl, VecZnxBigNormalizeTmpBytesImpl, VecZnxDftAllocImpl, VecZnxDftFromVecZnxImpl, VecZnxDftToVecZnxBigTmpAImpl, VmpApplyImpl, diff --git a/poulpy-schemes/examples/circuit_bootstrapping.rs b/poulpy-schemes/examples/circuit_bootstrapping.rs index 40ca143..24e323b 100644 --- a/poulpy-schemes/examples/circuit_bootstrapping.rs +++ b/poulpy-schemes/examples/circuit_bootstrapping.rs @@ -8,8 +8,8 @@ use poulpy_core::{ use std::time::Instant; use poulpy_hal::{ - api::{ModuleNew, ScratchOwnedAlloc, ScratchOwnedBorrow, ZnNormalizeInplace, ZnxView, ZnxViewMut}, - layouts::{Module, ScalarZnx, ScratchOwned}, + api::{ModuleNew, ScratchOwnedAlloc, ScratchOwnedBorrow, ZnNormalizeInplace}, + layouts::{Module, ScalarZnx, ScratchOwned, ZnxView, ZnxViewMut}, source::Source, }; diff --git a/poulpy-schemes/src/tfhe/blind_rotation/cggi_algo.rs b/poulpy-schemes/src/tfhe/blind_rotation/cggi_algo.rs index 7c13387..a8b42de 100644 --- a/poulpy-schemes/src/tfhe/blind_rotation/cggi_algo.rs +++ b/poulpy-schemes/src/tfhe/blind_rotation/cggi_algo.rs @@ -6,9 +6,9 @@ use poulpy_hal::{ VecZnxBigNormalizeTmpBytes, VecZnxCopy, VecZnxDftAdd, VecZnxDftAddInplace, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftSubABInplace, VecZnxDftToVecZnxBig, VecZnxDftToVecZnxBigConsume, VecZnxDftToVecZnxBigTmpBytes, VecZnxDftZero, VecZnxMulXpMinusOneInplace, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxRotate, - VecZnxSubABInplace, VmpApply, VmpApplyAdd, VmpApplyTmpBytes, ZnxView, ZnxZero, + VecZnxSubABInplace, VmpApply, VmpApplyAdd, VmpApplyTmpBytes, }, - layouts::{Backend, DataMut, DataRef, Module, Scratch, SvpPPol, VecZnx}, + layouts::{Backend, DataMut, DataRef, Module, Scratch, SvpPPol, VecZnx, ZnxView, ZnxZero}, }; use poulpy_core::{ diff --git a/poulpy-schemes/src/tfhe/blind_rotation/cggi_key.rs b/poulpy-schemes/src/tfhe/blind_rotation/cggi_key.rs index a262fd4..4cc63fb 100644 --- a/poulpy-schemes/src/tfhe/blind_rotation/cggi_key.rs +++ b/poulpy-schemes/src/tfhe/blind_rotation/cggi_key.rs @@ -3,9 +3,9 @@ use poulpy_hal::{ ScratchAvailable, SvpApplyInplace, TakeVecZnx, TakeVecZnxDft, VecZnxAddInplace, VecZnxAddNormal, VecZnxAddScalarInplace, VecZnxBigNormalize, VecZnxDftAllocBytes, VecZnxDftFromVecZnx, VecZnxDftToVecZnxBigConsume, VecZnxFillUniform, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxSub, VecZnxSubABInplace, VmpPMatAlloc, - VmpPrepare, ZnxView, ZnxViewMut, + VmpPrepare, }, - layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, ScalarZnxToRef, Scratch}, + layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, ScalarZnxToRef, Scratch, ZnxView, ZnxViewMut}, source::Source, }; diff --git a/poulpy-schemes/src/tfhe/blind_rotation/key.rs b/poulpy-schemes/src/tfhe/blind_rotation/key.rs index 6adab0d..3a28ec0 100644 --- a/poulpy-schemes/src/tfhe/blind_rotation/key.rs +++ b/poulpy-schemes/src/tfhe/blind_rotation/key.rs @@ -1,6 +1,5 @@ use poulpy_hal::{ - api::{FillUniform, Reset}, - layouts::{Backend, Data, DataMut, DataRef, Module, ReaderFrom, Scratch, WriterTo}, + layouts::{Backend, Data, DataMut, DataRef, FillUniform, Module, ReaderFrom, Reset, Scratch, WriterTo}, source::Source, }; diff --git a/poulpy-schemes/src/tfhe/blind_rotation/key_compressed.rs b/poulpy-schemes/src/tfhe/blind_rotation/key_compressed.rs index 41a6f1e..14837e3 100644 --- a/poulpy-schemes/src/tfhe/blind_rotation/key_compressed.rs +++ b/poulpy-schemes/src/tfhe/blind_rotation/key_compressed.rs @@ -1,6 +1,5 @@ use poulpy_hal::{ - api::{FillUniform, Reset}, - layouts::{Data, DataMut, DataRef, ReaderFrom, WriterTo}, + layouts::{Data, DataMut, DataRef, FillUniform, ReaderFrom, Reset, WriterTo}, source::Source, }; diff --git a/poulpy-schemes/src/tfhe/blind_rotation/lut.rs b/poulpy-schemes/src/tfhe/blind_rotation/lut.rs index cab01b4..eab41ea 100644 --- a/poulpy-schemes/src/tfhe/blind_rotation/lut.rs +++ b/poulpy-schemes/src/tfhe/blind_rotation/lut.rs @@ -1,9 +1,9 @@ use poulpy_hal::{ api::{ ScratchOwnedAlloc, ScratchOwnedBorrow, VecZnxCopy, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxRotateInplace, - VecZnxSwithcDegree, ZnxInfos, ZnxViewMut, + VecZnxSwithcDegree, }, - layouts::{Backend, Module, ScratchOwned, VecZnx}, + layouts::{Backend, Module, ScratchOwned, VecZnx, ZnxInfos, ZnxViewMut}, oep::{ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl}, }; diff --git a/poulpy-schemes/src/tfhe/blind_rotation/tests/generic_blind_rotation.rs b/poulpy-schemes/src/tfhe/blind_rotation/tests/generic_blind_rotation.rs index a8649a0..963441a 100644 --- a/poulpy-schemes/src/tfhe/blind_rotation/tests/generic_blind_rotation.rs +++ b/poulpy-schemes/src/tfhe/blind_rotation/tests/generic_blind_rotation.rs @@ -7,9 +7,9 @@ use poulpy_hal::{ VecZnxDftToVecZnxBigTmpBytes, VecZnxDftZero, VecZnxFillUniform, VecZnxMulXpMinusOneInplace, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxRotate, VecZnxRotateInplace, VecZnxSub, VecZnxSubABInplace, VecZnxSwithcDegree, VmpApply, VmpApplyAdd, VmpApplyTmpBytes, VmpPMatAlloc, VmpPrepare, ZnAddNormal, ZnFillUniform, - ZnNormalizeInplace, ZnxView, + ZnNormalizeInplace, }, - layouts::{Backend, Module, ScratchOwned}, + layouts::{Backend, Module, ScratchOwned, ZnxView}, oep::{ ScratchAvailableImpl, ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl, TakeVecZnxBigImpl, TakeVecZnxDftImpl, TakeVecZnxDftSliceImpl, TakeVecZnxImpl, TakeVecZnxSliceImpl, VecZnxBigAllocBytesImpl, VecZnxDftAllocBytesImpl, diff --git a/poulpy-schemes/src/tfhe/blind_rotation/utils.rs b/poulpy-schemes/src/tfhe/blind_rotation/utils.rs index 993f665..f26a4bd 100644 --- a/poulpy-schemes/src/tfhe/blind_rotation/utils.rs +++ b/poulpy-schemes/src/tfhe/blind_rotation/utils.rs @@ -1,6 +1,6 @@ use poulpy_hal::{ - api::{SvpPrepare, ZnxInfos, ZnxViewMut}, - layouts::{Backend, DataMut, Module, ScalarZnx, SvpPPol}, + api::SvpPrepare, + layouts::{Backend, DataMut, Module, ScalarZnx, SvpPPol, ZnxInfos, ZnxViewMut}, }; pub(crate) fn set_xai_plus_y( diff --git a/poulpy-schemes/src/tfhe/circuit_bootstrapping/tests/circuit_bootstrapping.rs b/poulpy-schemes/src/tfhe/circuit_bootstrapping/tests/circuit_bootstrapping.rs index 834d9a3..805d3f6 100644 --- a/poulpy-schemes/src/tfhe/circuit_bootstrapping/tests/circuit_bootstrapping.rs +++ b/poulpy-schemes/src/tfhe/circuit_bootstrapping/tests/circuit_bootstrapping.rs @@ -10,9 +10,9 @@ use poulpy_hal::{ VecZnxDftToVecZnxBigTmpA, VecZnxFillUniform, VecZnxNegateInplace, VecZnxNormalize, VecZnxNormalizeInplace, VecZnxNormalizeTmpBytes, VecZnxRotate, VecZnxRotateInplace, VecZnxRshInplace, VecZnxSub, VecZnxSubABInplace, VecZnxSwithcDegree, VmpApply, VmpApplyAdd, VmpApplyTmpBytes, VmpPMatAlloc, VmpPrepare, ZnAddNormal, ZnFillUniform, - ZnNormalizeInplace, ZnxView, ZnxViewMut, + ZnNormalizeInplace, }, - layouts::{Backend, Module, ScalarZnx, ScratchOwned}, + layouts::{Backend, Module, ScalarZnx, ScratchOwned, ZnxView, ZnxViewMut}, oep::{ ScratchAvailableImpl, ScratchOwnedAllocImpl, ScratchOwnedBorrowImpl, TakeMatZnxImpl, TakeScalarZnxImpl, TakeSvpPPolImpl, TakeVecZnxBigImpl, TakeVecZnxDftImpl, TakeVecZnxDftSliceImpl, TakeVecZnxImpl, TakeVecZnxSliceImpl,