Struct solana_perf::cuda_runtime::PinnedVec
source · pub struct PinnedVec<T: Default + Clone + Sized> { /* private fields */ }
Implementations§
source§impl<T: Clone + Default + Sized> PinnedVec<T>
impl<T: Clone + Default + Sized> PinnedVec<T>
pub fn reserve(&mut self, size: usize)
pub fn reserve_and_pin(&mut self, size: usize)
pub fn set_pinnable(&mut self)
pub fn copy_from_slice(&mut self, data: &[T])where T: Copy,
pub fn from_vec(source: Vec<T>) -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn as_ptr(&self) -> *const T
pub fn as_mut_ptr(&mut self) -> *mut T
pub fn push(&mut self, x: T)
pub fn truncate(&mut self, size: usize)
pub fn resize(&mut self, size: usize, elem: T)
pub fn append(&mut self, other: &mut Vec<T>)
pub fn append_pinned(&mut self, other: &mut Self)
sourcepub unsafe fn set_len(&mut self, size: usize)
pub unsafe fn set_len(&mut self, size: usize)
Forces the length of the vector to new_len
.
This is a low-level operation that maintains none of the normal
invariants of the type. Normally changing the length of a vector
is done using one of the safe operations instead, such as
truncate
, resize
, extend
, or clear
.
Safety
new_len
must be less than or equal tocapacity()
.- The elements at
old_len..new_len
must be initialized.
pub fn shuffle<R: Rng>(&mut self, rng: &mut R)
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for PinnedVec<T>where T: RefUnwindSafe,
impl<T> Send for PinnedVec<T>where T: Send,
impl<T> Sync for PinnedVec<T>where T: Send + Sync,
impl<T> Unpin for PinnedVec<T>where T: Unpin,
impl<T> UnwindSafe for PinnedVec<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<'data, I> IntoParallelRefIterator<'data> for Iwhere
I: 'data + ?Sized,
&'data I: IntoParallelIterator,
impl<'data, I> IntoParallelRefIterator<'data> for Iwhere I: 'data + ?Sized, &'data I: IntoParallelIterator,
§type Iter = <&'data I as IntoParallelIterator>::Iter
type Iter = <&'data I as IntoParallelIterator>::Iter
The type of the parallel iterator that will be returned.
§type Item = <&'data I as IntoParallelIterator>::Item
type Item = <&'data I as IntoParallelIterator>::Item
The type of item that the parallel iterator will produce.
This will typically be an
&'data T
reference type.source§impl<'data, I> IntoParallelRefMutIterator<'data> for Iwhere
I: 'data + ?Sized,
&'data mut I: IntoParallelIterator,
impl<'data, I> IntoParallelRefMutIterator<'data> for Iwhere I: 'data + ?Sized, &'data mut I: IntoParallelIterator,
§type Iter = <&'data mut I as IntoParallelIterator>::Iter
type Iter = <&'data mut I as IntoParallelIterator>::Iter
The type of iterator that will be created.
§type Item = <&'data mut I as IntoParallelIterator>::Item
type Item = <&'data mut I as IntoParallelIterator>::Item
The type of item that will be produced; this is typically an
&'data mut T
reference.source§fn par_iter_mut(
&'data mut self
) -> <I as IntoParallelRefMutIterator<'data>>::Iter
fn par_iter_mut( &'data mut self ) -> <I as IntoParallelRefMutIterator<'data>>::Iter
Creates the parallel iterator from
self
. Read more