Struct rust_cuda::utils::shared::ThreadBlockSharedSlice
source · pub struct ThreadBlockSharedSlice<T: 'static + TypeGraphLayout> { /* private fields */ }
Implementations§
pub fn new_uninit_with_len(len: usize) -> Self
Available on crate feature
host
only.pub fn with_len(self, len: usize) -> Self
Available on crate feature
host
only.pub fn with_len_mut(&mut self, len: usize) -> &mut Self
Available on crate feature
host
only.pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn layout(&self) -> Layout
pub const fn as_mut_ptr(&self) -> *mut T
Available on crate feature
device
only.pub const fn as_mut_slice_ptr(&self) -> *mut [T]
Available on crate feature
device
only.sourcepub unsafe fn index_mut_unchecked<I: SliceIndex<[T]>>(
&self,
index: I,
) -> *mut <I as SliceIndex<[T]>>::Output
Available on crate feature device
only.
pub unsafe fn index_mut_unchecked<I: SliceIndex<[T]>>( &self, index: I, ) -> *mut <I as SliceIndex<[T]>>::Output
device
only.§Safety
The provided index
must not be out of bounds.
Trait Implementations§
§type AsyncHostType<'stream, 'b> = &'b mut ThreadBlockSharedSlice<T>
where
Self: 'b
type AsyncHostType<'stream, 'b> = &'b mut ThreadBlockSharedSlice<T> where Self: 'b
Available on crate feature
host
only.§type DeviceType<'b> = &'b mut ThreadBlockSharedSlice<T>
where
Self: 'b
type DeviceType<'b> = &'b mut ThreadBlockSharedSlice<T> where Self: 'b
Available on crate feature
device
only.§type SyncHostType = &'a mut ThreadBlockSharedSlice<T>
type SyncHostType = &'a mut ThreadBlockSharedSlice<T>
Available on crate feature
host
only.source§fn with_new_async<'stream, 'b, O, E: From<CudaError>>(
param: Self::SyncHostType,
_stream: Stream<'stream>,
inner: impl FnOnce(Self::AsyncHostType<'stream, 'b>) -> Result<O, E>,
) -> Result<O, E>where
Self: 'b,
fn with_new_async<'stream, 'b, O, E: From<CudaError>>(
param: Self::SyncHostType,
_stream: Stream<'stream>,
inner: impl FnOnce(Self::AsyncHostType<'stream, 'b>) -> Result<O, E>,
) -> Result<O, E>where
Self: 'b,
Available on crate feature
host
only.Auto Trait Implementations§
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
source§impl<T> ExtractDiscriminant for T
impl<T> ExtractDiscriminant for T
§type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
The type of the discriminant, which must satisfy the trait bounds
required by
core::mem::Discriminant
. Read more