use crate::{ hal::{ layouts::{Backend, MatZnxOwned, Module}, oep::{MatZnxAllocBytesImpl, MatZnxAllocImpl, MatZnxFromBytesImpl}, }, implementation::cpu_spqlios::CPUAVX, }; unsafe impl MatZnxAllocImpl for B where B: CPUAVX, { fn mat_znx_alloc_impl(module: &Module, rows: usize, cols_in: usize, cols_out: usize, size: usize) -> MatZnxOwned { MatZnxOwned::alloc(module.n(), rows, cols_in, cols_out, size) } } unsafe impl MatZnxAllocBytesImpl for B where B: CPUAVX, { fn mat_znx_alloc_bytes_impl(module: &Module, rows: usize, cols_in: usize, cols_out: usize, size: usize) -> usize { MatZnxOwned::bytes_of(module.n(), rows, cols_in, cols_out, size) } } unsafe impl MatZnxFromBytesImpl for B where B: CPUAVX, { fn mat_znx_from_bytes_impl( module: &Module, rows: usize, cols_in: usize, cols_out: usize, size: usize, bytes: Vec, ) -> MatZnxOwned { MatZnxOwned::from_bytes(module.n(), rows, cols_in, cols_out, size, bytes) } }