Implement the backend trait for the cpu backend. (#143)

This commit is contained in:
Laurent Mazare
2023-07-12 09:54:33 +01:00
committed by GitHub
parent a76ec797da
commit bcf96e3cf3
4 changed files with 90 additions and 55 deletions

View File

@ -9,6 +9,7 @@ pub(crate) trait BackendStorage: Sized {
fn device(&self) -> &Self::Device;
// Maybe this should return a Cow instead so that no copy is done on the cpu case.
fn to_cpu_storage(&self) -> Result<CpuStorage>;
fn affine(&self, _: &Layout, _: f64, _: f64) -> Result<Self>;