Struct cubecl_core::frontend::ArrayHandleRef
source · pub struct ArrayHandleRef<'a, R: Runtime> {
pub handle: &'a Handle<R::Server>,
/* private fields */
}
Expand description
Tensor representation with a reference to the server handle.
Fields§
§handle: &'a Handle<R::Server>
Implementations§
source§impl<'a, R: Runtime> ArrayHandleRef<'a, R>
impl<'a, R: Runtime> ArrayHandleRef<'a, R>
sourcepub unsafe fn from_raw_parts(
handle: &'a Handle<R::Server>,
length: usize,
) -> Self
pub unsafe fn from_raw_parts( handle: &'a Handle<R::Server>, length: usize, ) -> Self
Create a new array handle reference.
§Safety
Specifying the wrong lenght may lead to out-of-bounds reads and writes.
sourcepub fn as_tensor(&self) -> TensorHandleRef<'_, R>
pub fn as_tensor(&self) -> TensorHandleRef<'_, R>
Return the handle as a tensor instead of an array.
Auto Trait Implementations§
impl<'a, R> Freeze for ArrayHandleRef<'a, R>
impl<'a, R> RefUnwindSafe for ArrayHandleRef<'a, R>where
<<<R as Runtime>::Server as ComputeServer>::MemoryManagement as MemoryManagement<<<R as Runtime>::Server as ComputeServer>::Storage>>::Handle: RefUnwindSafe,
impl<'a, R> Send for ArrayHandleRef<'a, R>
impl<'a, R> Sync for ArrayHandleRef<'a, R>
impl<'a, R> Unpin for ArrayHandleRef<'a, R>
impl<'a, R> UnwindSafe for ArrayHandleRef<'a, R>where
<<<R as Runtime>::Server as ComputeServer>::MemoryManagement as MemoryManagement<<<R as Runtime>::Server as ComputeServer>::Storage>>::Handle: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more