Skip to content
Snippets Groups Projects

HerculesRefInto trait

Merged rarbore2 requested to merge ref-into into main
2 files
+ 19
7
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 16
0
@@ -811,3 +811,19 @@ where
@@ -811,3 +811,19 @@ where
self.as_cuda_ref()
self.as_cuda_ref()
}
}
}
}
 
 
pub trait HerculesRefInto<'a> {
 
fn to(&'a self) -> HerculesCPURef<'a>;
 
}
 
 
impl<'a, T> HerculesRefInto<'a> for &'a [T] {
 
fn to(&'a self) -> HerculesCPURef<'a> {
 
HerculesCPURef::from_slice(self)
 
}
 
}
 
 
impl<'a, T> HerculesRefInto<'a> for Box<[T]> {
 
fn to(&'a self) -> HerculesCPURef<'a> {
 
HerculesCPURef::from_slice(self)
 
}
 
}
Loading