Traits cleaning, CBT example & bug fixes (#72)

* Some cleaning, CBT example, fix mod switch and add LUT correctness test to BR test

* finished trait cleaning

* removed trait aliastoutside of backend
This commit is contained in:
Jean-Philippe Bossuat
2025-08-16 18:23:22 +02:00
committed by GitHub
parent c7219c35e9
commit 3a828740cc
99 changed files with 3267 additions and 1220 deletions

View File

@@ -12,10 +12,7 @@ rand = {workspace = true}
rand_distr = {workspace = true}
rand_core = {workspace = true}
sampling = { path = "../sampling" }
utils = { path = "../utils" }
paste = "1.0.15"
byteorder = {workspace = true}
zstd = {workspace = true}
[build-dependencies]
cmake = "0.1.54"

View File

@@ -26,7 +26,7 @@ pub trait VmpPrepareTmpBytes {
fn vmp_prepare_tmp_bytes(&self, n: usize, rows: usize, cols_in: usize, cols_out: usize, size: usize) -> usize;
}
pub trait VmpPMatPrepare<B: Backend> {
pub trait VmpPrepare<B: Backend> {
fn vmp_prepare<R, A>(&self, res: &mut R, a: &A, scratch: &mut Scratch<B>)
where
R: VmpPMatToMut<B>,

View File

@@ -1,7 +1,7 @@
use crate::hal::{
api::{
VmpApply, VmpApplyAdd, VmpApplyAddTmpBytes, VmpApplyTmpBytes, VmpPMatAlloc, VmpPMatAllocBytes, VmpPMatFromBytes,
VmpPMatPrepare, VmpPrepareTmpBytes,
VmpPrepare, VmpPrepareTmpBytes,
},
layouts::{Backend, MatZnxToRef, Module, Scratch, VecZnxDftToMut, VecZnxDftToRef, VmpPMatOwned, VmpPMatToMut, VmpPMatToRef},
oep::{
@@ -54,7 +54,7 @@ where
}
}
impl<B> VmpPMatPrepare<B> for Module<B>
impl<B> VmpPrepare<B> for Module<B>
where
B: Backend + VmpPMatPrepareImpl<B>,
{