pub struct AllocationDescriptor<'a> {
pub kind: AllocationKind,
pub shape: &'a [usize],
pub elem_size: usize,
}Expand description
Descriptor for a new tensor allocation
Fields§
§kind: AllocationKindLayout for the tensor
shape: &'a [usize]Shape of the tensor
elem_size: usizeSize of each element in the tensor (used for conversion of shape to bytes)
Implementations§
Source§impl<'a> AllocationDescriptor<'a>
impl<'a> AllocationDescriptor<'a>
Sourcepub fn new(kind: AllocationKind, shape: &'a [usize], elem_size: usize) -> Self
pub fn new(kind: AllocationKind, shape: &'a [usize], elem_size: usize) -> Self
Constructs a new AllocationDescriptor.
Trait Implementations§
Source§impl<'a> Clone for AllocationDescriptor<'a>
impl<'a> Clone for AllocationDescriptor<'a>
Source§fn clone(&self) -> AllocationDescriptor<'a>
fn clone(&self) -> AllocationDescriptor<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for AllocationDescriptor<'a>
impl<'a> Debug for AllocationDescriptor<'a>
impl<'a> Copy for AllocationDescriptor<'a>
Auto Trait Implementations§
impl<'a> Freeze for AllocationDescriptor<'a>
impl<'a> RefUnwindSafe for AllocationDescriptor<'a>
impl<'a> Send for AllocationDescriptor<'a>
impl<'a> Sync for AllocationDescriptor<'a>
impl<'a> Unpin for AllocationDescriptor<'a>
impl<'a> UnwindSafe for AllocationDescriptor<'a>
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