keyswitch tests

This commit is contained in:
Pro7ech
2025-10-20 15:32:52 +02:00
parent 0c894c19db
commit 252eda36fe
60 changed files with 918 additions and 945 deletions

View File

@@ -1,4 +1,4 @@
use std::{fmt::Display, marker::PhantomData, ptr::NonNull};
use std::{fmt::{Debug, Display}, marker::PhantomData, ptr::NonNull};
use rand_distr::num_traits::Zero;
@@ -9,8 +9,8 @@ use crate::{
#[allow(clippy::missing_safety_doc)]
pub trait Backend: Sized {
type ScalarBig: Copy + Zero + Display;
type ScalarPrep: Copy + Zero + Display;
type ScalarBig: Copy + Zero + Display + Debug;
type ScalarPrep: Copy + Zero + Display + Debug;
type Handle: 'static;
fn layout_prep_word_count() -> usize;
fn layout_big_word_count() -> usize;

View File

@@ -1,3 +1,5 @@
use std::fmt::{Debug, Display};
use crate::{
layouts::{Backend, Data, DataMut, DataRef},
source::Source,
@@ -48,7 +50,7 @@ pub trait DataViewMut: DataView {
}
pub trait ZnxView: ZnxInfos + DataView<D: DataRef> {
type Scalar: Copy + Zero;
type Scalar: Copy + Zero + Display + Debug;
/// Returns a non-mutable pointer to the underlying coefficients array.
fn as_ptr(&self) -> *const Self::Scalar {