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§
source§impl<'de, T> Deserialize<'de> for PinnedVec<T>where
T: Deserialize<'de> + Default + Default + Clone + Sized,
impl<'de, T> Deserialize<'de> for PinnedVec<T>where T: Deserialize<'de> + Default + Default + Clone + Sized,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, T: Clone + Send + Sync + Default + Sized> IntoParallelIterator for &'a mut PinnedVec<T>
impl<'a, T: Clone + Send + Sync + Default + Sized> IntoParallelIterator for &'a mut PinnedVec<T>
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> AbiEnumVisitor for Twhere
T: Serialize + AbiExample + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + AbiExample + ?Sized,
default fn visit_for_abi( &self, digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + ?Sized,
default fn visit_for_abi( &self, _digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
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
§impl<Ctx, I, R> Cread<Ctx, I> for Rwhere
Ctx: Copy,
R: Index<I> + Index<RangeFrom<I>> + ?Sized,
impl<Ctx, I, R> Cread<Ctx, I> for Rwhere Ctx: Copy, R: Index<I> + Index<RangeFrom<I>> + ?Sized,
§fn cread_with<N>(&self, offset: I, ctx: Ctx) -> Nwhere
N: FromCtx<Ctx, Self::Output>,
fn cread_with<N>(&self, offset: I, ctx: Ctx) -> Nwhere N: FromCtx<Ctx, Self::Output>,
Reads a value from
Self
at offset
with ctx
. Cannot fail.
If the buffer is too small for the value requested, this will panic. Read more§impl<Ctx, I, W> Cwrite<Ctx, I> for Wwhere
Ctx: Copy,
W: Index<I> + IndexMut<RangeFrom<I>> + ?Sized,
impl<Ctx, I, W> Cwrite<Ctx, I> for Wwhere Ctx: Copy, W: Index<I> + IndexMut<RangeFrom<I>> + ?Sized,
§fn cwrite<N>(&mut self, n: N, offset: I)where
N: IntoCtx<Ctx, Self::Output>,
Ctx: Default,
fn cwrite<N>(&mut self, n: N, offset: I)where N: IntoCtx<Ctx, Self::Output>, Ctx: Default,
Writes
n
into Self
at offset
; uses default context.
For the primitive types, this will be the target machine’s endianness. Read more§fn cwrite_with<N>(&mut self, n: N, offset: I, ctx: Ctx)where
N: IntoCtx<Ctx, Self::Output>,
fn cwrite_with<N>(&mut self, n: N, offset: I, ctx: Ctx)where N: IntoCtx<Ctx, Self::Output>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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