mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
conversions tests
This commit is contained in:
@@ -4,7 +4,7 @@ use poulpy_hal::{
|
||||
};
|
||||
|
||||
use crate::layouts::{
|
||||
Base2K, Degree, Dnum, Dsize, GGLWE, GGLWEInfos, GGLWEToMut, GGLWEToRef, GLWEInfos, GLWESwitchingKey,
|
||||
Base2K, Degree, Dnum, Dsize, GGLWE, GGLWEInfos, GGLWEToMut, GGLWEToRef, GLWEInfos, GLWESwitchingKey, GLWESwitchingKeyDegrees,
|
||||
GLWESwitchingKeyDegreesMut, LWEInfos, Rank, TorusPrecision,
|
||||
};
|
||||
|
||||
@@ -217,3 +217,13 @@ impl<D: DataMut> GLWESwitchingKeyDegreesMut for GLWEToLWESwitchingKey<D> {
|
||||
&mut self.0.output_degree
|
||||
}
|
||||
}
|
||||
|
||||
impl<D: DataRef> GLWESwitchingKeyDegrees for GLWEToLWESwitchingKey<D> {
|
||||
fn input_degree(&self) -> &Degree {
|
||||
&self.0.input_degree
|
||||
}
|
||||
|
||||
fn output_degree(&self) -> &Degree {
|
||||
&self.0.output_degree
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ use poulpy_hal::{
|
||||
};
|
||||
|
||||
use crate::layouts::{
|
||||
Base2K, Degree, Dnum, Dsize, GGLWE, GGLWEInfos, GGLWEToMut, GGLWEToRef, GLWEInfos, GLWESwitchingKey,
|
||||
Base2K, Degree, Dnum, Dsize, GGLWE, GGLWEInfos, GGLWEToMut, GGLWEToRef, GLWEInfos, GLWESwitchingKey, GLWESwitchingKeyDegrees,
|
||||
GLWESwitchingKeyDegreesMut, LWEInfos, Rank, TorusPrecision,
|
||||
};
|
||||
|
||||
@@ -217,3 +217,13 @@ impl<D: DataMut> GLWESwitchingKeyDegreesMut for LWEToGLWESwitchingKey<D> {
|
||||
&mut self.0.output_degree
|
||||
}
|
||||
}
|
||||
|
||||
impl<D: DataRef> GLWESwitchingKeyDegrees for LWEToGLWESwitchingKey<D> {
|
||||
fn input_degree(&self) -> &Degree {
|
||||
&self.0.input_degree
|
||||
}
|
||||
|
||||
fn output_degree(&self) -> &Degree {
|
||||
&self.0.output_degree
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,3 +206,13 @@ impl<D: DataMut, B: Backend> GLWESwitchingKeyDegreesMut for GLWEToLWESwitchingKe
|
||||
&mut self.0.output_degree
|
||||
}
|
||||
}
|
||||
|
||||
impl<D: DataRef, B: Backend> GLWESwitchingKeyDegrees for GLWEToLWESwitchingKeyPrepared<D, B> {
|
||||
fn input_degree(&self) -> &Degree {
|
||||
&self.0.input_degree
|
||||
}
|
||||
|
||||
fn output_degree(&self) -> &Degree {
|
||||
&self.0.output_degree
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user