mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 21:26:41 +01:00
fixed missing implementations
This commit is contained in:
@@ -5,7 +5,7 @@ use poulpy_hal::{
|
||||
source::Source,
|
||||
};
|
||||
|
||||
use crate::layouts::{Base2K, Dnum, Dsize, GLWE, GLWEInfos, GetRingDegree, LWEInfos, Rank, RingDegree, TorusPrecision};
|
||||
use crate::layouts::{Base2K, Degree, Dnum, Dsize, GLWE, GLWEInfos, GetDegree, LWEInfos, Rank, TorusPrecision};
|
||||
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
|
||||
|
||||
use std::fmt;
|
||||
@@ -37,7 +37,7 @@ pub trait SetGGLWEInfos {
|
||||
|
||||
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
|
||||
pub struct GGLWELayout {
|
||||
pub n: RingDegree,
|
||||
pub n: Degree,
|
||||
pub base2k: Base2K,
|
||||
pub k: TorusPrecision,
|
||||
pub rank_in: Rank,
|
||||
@@ -55,7 +55,7 @@ impl LWEInfos for GGLWELayout {
|
||||
self.k
|
||||
}
|
||||
|
||||
fn n(&self) -> RingDegree {
|
||||
fn n(&self) -> Degree {
|
||||
self.n
|
||||
}
|
||||
}
|
||||
@@ -101,8 +101,8 @@ impl<D: Data> LWEInfos for GGLWE<D> {
|
||||
self.k
|
||||
}
|
||||
|
||||
fn n(&self) -> RingDegree {
|
||||
RingDegree(self.data.n() as u32)
|
||||
fn n(&self) -> Degree {
|
||||
Degree(self.data.n() as u32)
|
||||
}
|
||||
|
||||
fn size(&self) -> usize {
|
||||
@@ -193,7 +193,7 @@ impl<D: DataMut> GGLWE<D> {
|
||||
|
||||
pub trait GGLWEAlloc
|
||||
where
|
||||
Self: GetRingDegree,
|
||||
Self: GetDegree,
|
||||
{
|
||||
fn alloc_gglwe(
|
||||
&self,
|
||||
@@ -293,7 +293,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<B: Backend> GGLWEAlloc for Module<B> where Self: GetRingDegree {}
|
||||
impl<B: Backend> GGLWEAlloc for Module<B> where Self: GetDegree {}
|
||||
|
||||
impl GGLWE<Vec<u8>> {
|
||||
pub fn alloc_from_infos<A, M>(module: &M, infos: &A) -> Self
|
||||
|
||||
Reference in New Issue
Block a user