use crate::hal::{ api::{MatZnxAlloc, MatZnxAllocBytes, MatZnxFromBytes}, layouts::{Backend, MatZnxOwned, Module}, oep::{MatZnxAllocBytesImpl, MatZnxAllocImpl, MatZnxFromBytesImpl}, }; impl MatZnxAlloc for Module where B: Backend + MatZnxAllocImpl, { fn mat_znx_alloc(&self, rows: usize, cols_in: usize, cols_out: usize, size: usize) -> MatZnxOwned { B::mat_znx_alloc_impl(self, rows, cols_in, cols_out, size) } } impl MatZnxAllocBytes for Module where B: Backend + MatZnxAllocBytesImpl, { fn mat_znx_alloc_bytes(&self, rows: usize, cols_in: usize, cols_out: usize, size: usize) -> usize { B::mat_znx_alloc_bytes_impl(self, rows, cols_in, cols_out, size) } } impl MatZnxFromBytes for Module where B: Backend + MatZnxFromBytesImpl, { fn mat_znx_from_bytes(&self, rows: usize, cols_in: usize, cols_out: usize, size: usize, bytes: Vec) -> MatZnxOwned { B::mat_znx_from_bytes_impl(self, rows, cols_in, cols_out, size, bytes) } }