pub struct CudaMemoryPoolPtr<T> { /* private fields */ }Expand description
Cuda memory object allocated from the memory pool
Implementations§
Source§impl<T> CudaMemoryPoolPtr<T>
impl<T> CudaMemoryPoolPtr<T>
Sourcepub fn new(
size: usize,
memory_pool: &Arc<Mutex<MemoryPool>>,
) -> Result<CudaMemoryPoolPtr<T>, CudaError>
pub fn new( size: usize, memory_pool: &Arc<Mutex<MemoryPool>>, ) -> Result<CudaMemoryPoolPtr<T>, CudaError>
Source§impl<T> CudaMemoryPoolPtr<T>
impl<T> CudaMemoryPoolPtr<T>
Sourcepub fn with_initializer<I: FnMut() -> T>(
size: usize,
memory_pool: &Arc<Mutex<MemoryPool>>,
initializer: I,
) -> Result<CudaMemoryPoolPtr<T>, CudaError>
pub fn with_initializer<I: FnMut() -> T>( size: usize, memory_pool: &Arc<Mutex<MemoryPool>>, initializer: I, ) -> Result<CudaMemoryPoolPtr<T>, CudaError>
Trait Implementations§
Source§impl<T> AsMutPtr<T> for CudaMemoryPoolPtr<T>
impl<T> AsMutPtr<T> for CudaMemoryPoolPtr<T>
fn as_mut_ptr(&mut self) -> *mut T
Source§impl<T> AsMutVoidPtr for CudaMemoryPoolPtr<T>
impl<T> AsMutVoidPtr for CudaMemoryPoolPtr<T>
fn as_mut_void_ptr(&mut self) -> *mut c_void
Source§impl<T> AsVoidPtr for CudaMemoryPoolPtr<T>
impl<T> AsVoidPtr for CudaMemoryPoolPtr<T>
fn as_void_ptr(&self) -> *const c_void
Source§impl<T> Debug for CudaMemoryPoolPtr<T>
impl<T> Debug for CudaMemoryPoolPtr<T>
Source§impl<T> Drop for CudaMemoryPoolPtr<T>
impl<T> Drop for CudaMemoryPoolPtr<T>
Source§impl<'a, T, const N: usize> From<&'a CudaTensor1dPtr<T, N>> for &'a CudaMemoryPoolPtr<T>
impl<'a, T, const N: usize> From<&'a CudaTensor1dPtr<T, N>> for &'a CudaMemoryPoolPtr<T>
Source§fn from(value: &'a CudaTensor1dPtr<T, N>) -> Self
fn from(value: &'a CudaTensor1dPtr<T, N>) -> Self
Converts to this type from the input type.
Source§impl<'a, T, const N1: usize, const N2: usize> From<&'a CudaTensor2dPtr<T, N1, N2>> for &'a CudaMemoryPoolPtr<T>
impl<'a, T, const N1: usize, const N2: usize> From<&'a CudaTensor2dPtr<T, N1, N2>> for &'a CudaMemoryPoolPtr<T>
Source§fn from(value: &'a CudaTensor2dPtr<T, N1, N2>) -> Self
fn from(value: &'a CudaTensor2dPtr<T, N1, N2>) -> Self
Converts to this type from the input type.
Source§impl<'a, T, const N1: usize, const N2: usize, const N3: usize> From<&'a CudaTensor3dPtr<T, N1, N2, N3>> for &'a CudaMemoryPoolPtr<T>
impl<'a, T, const N1: usize, const N2: usize, const N3: usize> From<&'a CudaTensor3dPtr<T, N1, N2, N3>> for &'a CudaMemoryPoolPtr<T>
Source§fn from(value: &'a CudaTensor3dPtr<T, N1, N2, N3>) -> Self
fn from(value: &'a CudaTensor3dPtr<T, N1, N2, N3>) -> Self
Converts to this type from the input type.
Source§impl<'a, T, const N1: usize, const N2: usize, const N3: usize, const N4: usize> From<&'a CudaTensor4dPtr<T, N1, N2, N3, N4>> for &'a CudaMemoryPoolPtr<T>
impl<'a, T, const N1: usize, const N2: usize, const N3: usize, const N4: usize> From<&'a CudaTensor4dPtr<T, N1, N2, N3, N4>> for &'a CudaMemoryPoolPtr<T>
Source§fn from(value: &'a CudaTensor4dPtr<T, N1, N2, N3, N4>) -> Self
fn from(value: &'a CudaTensor4dPtr<T, N1, N2, N3, N4>) -> Self
Converts to this type from the input type.
Source§impl<'a, T, const N: usize> From<&'a mut CudaTensor1dPtr<T, N>> for &'a mut CudaMemoryPoolPtr<T>
impl<'a, T, const N: usize> From<&'a mut CudaTensor1dPtr<T, N>> for &'a mut CudaMemoryPoolPtr<T>
Source§fn from(value: &'a mut CudaTensor1dPtr<T, N>) -> Self
fn from(value: &'a mut CudaTensor1dPtr<T, N>) -> Self
Converts to this type from the input type.
Source§impl<'a, T, const N1: usize, const N2: usize> From<&'a mut CudaTensor2dPtr<T, N1, N2>> for &'a mut CudaMemoryPoolPtr<T>
impl<'a, T, const N1: usize, const N2: usize> From<&'a mut CudaTensor2dPtr<T, N1, N2>> for &'a mut CudaMemoryPoolPtr<T>
Source§fn from(value: &'a mut CudaTensor2dPtr<T, N1, N2>) -> Self
fn from(value: &'a mut CudaTensor2dPtr<T, N1, N2>) -> Self
Converts to this type from the input type.
Source§impl<'a, T, const N1: usize, const N2: usize, const N3: usize> From<&'a mut CudaTensor3dPtr<T, N1, N2, N3>> for &'a mut CudaMemoryPoolPtr<T>
impl<'a, T, const N1: usize, const N2: usize, const N3: usize> From<&'a mut CudaTensor3dPtr<T, N1, N2, N3>> for &'a mut CudaMemoryPoolPtr<T>
Source§fn from(value: &'a mut CudaTensor3dPtr<T, N1, N2, N3>) -> Self
fn from(value: &'a mut CudaTensor3dPtr<T, N1, N2, N3>) -> Self
Converts to this type from the input type.
Source§impl<'a, T, const N1: usize, const N2: usize, const N3: usize, const N4: usize> From<&'a mut CudaTensor4dPtr<T, N1, N2, N3, N4>> for &'a mut CudaMemoryPoolPtr<T>
impl<'a, T, const N1: usize, const N2: usize, const N3: usize, const N4: usize> From<&'a mut CudaTensor4dPtr<T, N1, N2, N3, N4>> for &'a mut CudaMemoryPoolPtr<T>
Source§fn from(value: &'a mut CudaTensor4dPtr<T, N1, N2, N3, N4>) -> Self
fn from(value: &'a mut CudaTensor4dPtr<T, N1, N2, N3, N4>) -> Self
Converts to this type from the input type.
Source§impl<U, T> From<CudaVecConverter<U, T>> for CudaMemoryPoolPtr<U>
impl<U, T> From<CudaVecConverter<U, T>> for CudaMemoryPoolPtr<U>
Source§fn from(value: CudaVecConverter<U, T>) -> Self
fn from(value: CudaVecConverter<U, T>) -> Self
Converts to this type from the input type.
Source§impl<CP> MemoryMoveTo<<CP as PointerElement>::Element, CudaMemoryPoolPtr<<CP as PointerElement>::Element>> for CPwhere
CP: AsCudaPtrRef + PointerElement,
<CP as AsCudaPtrRef>::Pointer: MemoryMoveTo<<CP as PointerElement>::Element, CudaMemoryPoolPtr<<CP as PointerElement>::Element>>,
impl<CP> MemoryMoveTo<<CP as PointerElement>::Element, CudaMemoryPoolPtr<<CP as PointerElement>::Element>> for CPwhere
CP: AsCudaPtrRef + PointerElement,
<CP as AsCudaPtrRef>::Pointer: MemoryMoveTo<<CP as PointerElement>::Element, CudaMemoryPoolPtr<<CP as PointerElement>::Element>>,
Source§impl<T: Default + Debug> MemoryMoveTo<T, CudaHostPtr<T>> for CudaMemoryPoolPtr<T>
impl<T: Default + Debug> MemoryMoveTo<T, CudaHostPtr<T>> for CudaMemoryPoolPtr<T>
Source§impl<T: Default + Debug> MemoryMoveTo<T, CudaMemoryPoolPtr<T>> for CudaHostPtr<T>
impl<T: Default + Debug> MemoryMoveTo<T, CudaMemoryPoolPtr<T>> for CudaHostPtr<T>
Source§impl<T: Default + Debug> MemoryMoveTo<T, CudaMemoryPoolPtr<T>> for CudaMemoryPoolPtr<T>
impl<T: Default + Debug> MemoryMoveTo<T, CudaMemoryPoolPtr<T>> for CudaMemoryPoolPtr<T>
Source§impl<T: Default + Debug> MemoryMoveTo<T, CudaMemoryPoolPtr<T>> for CudaPtr<T>
impl<T: Default + Debug> MemoryMoveTo<T, CudaMemoryPoolPtr<T>> for CudaPtr<T>
Source§impl<T: Default + Debug> MemoryMoveTo<T, CudaPtr<T>> for CudaMemoryPoolPtr<T>
impl<T: Default + Debug> MemoryMoveTo<T, CudaPtr<T>> for CudaMemoryPoolPtr<T>
Source§impl<CP> MemoryMoveToAsync<<CP as PointerElement>::Element, CudaMemoryPoolPtr<<CP as PointerElement>::Element>> for CPwhere
CP: AsCudaPtrRef + PointerElement,
<CP as AsCudaPtrRef>::Pointer: MemoryMoveToAsync<<CP as PointerElement>::Element, CudaMemoryPoolPtr<<CP as PointerElement>::Element>>,
impl<CP> MemoryMoveToAsync<<CP as PointerElement>::Element, CudaMemoryPoolPtr<<CP as PointerElement>::Element>> for CPwhere
CP: AsCudaPtrRef + PointerElement,
<CP as AsCudaPtrRef>::Pointer: MemoryMoveToAsync<<CP as PointerElement>::Element, CudaMemoryPoolPtr<<CP as PointerElement>::Element>>,
Source§fn memcpy_to_async(
&self,
dst: &mut CudaMemoryPoolPtr<<CP as PointerElement>::Element>,
len: usize,
stream: cudaStream_t,
) -> Result<usize, Error>
fn memcpy_to_async( &self, dst: &mut CudaMemoryPoolPtr<<CP as PointerElement>::Element>, len: usize, stream: cudaStream_t, ) -> Result<usize, Error>
Memory Copy To Read more
Source§impl<T: Default + Debug> MemoryMoveToAsync<T, CudaMemoryPoolPtr<T>> for CudaHostPtr<T>
impl<T: Default + Debug> MemoryMoveToAsync<T, CudaMemoryPoolPtr<T>> for CudaHostPtr<T>
Source§fn memcpy_to_async(
&self,
dst: &mut CudaMemoryPoolPtr<T>,
len: usize,
stream: cudaStream_t,
) -> Result<usize, Error>
fn memcpy_to_async( &self, dst: &mut CudaMemoryPoolPtr<T>, len: usize, stream: cudaStream_t, ) -> Result<usize, Error>
Memory Copy To Read more
Source§impl<T: Default + Debug> PointerElement for CudaMemoryPoolPtr<T>
impl<T: Default + Debug> PointerElement for CudaMemoryPoolPtr<T>
Source§impl<T: Default + Debug> ReadMemory<T> for CudaMemoryPoolPtr<T>
impl<T: Default + Debug> ReadMemory<T> for CudaMemoryPoolPtr<T>
Source§impl<T: Default + Debug> WriteMemory<T> for CudaMemoryPoolPtr<T>
impl<T: Default + Debug> WriteMemory<T> for CudaMemoryPoolPtr<T>
Auto Trait Implementations§
impl<T> Freeze for CudaMemoryPoolPtr<T>
impl<T> RefUnwindSafe for CudaMemoryPoolPtr<T>where
T: RefUnwindSafe,
impl<T> !Send for CudaMemoryPoolPtr<T>
impl<T> !Sync for CudaMemoryPoolPtr<T>
impl<T> Unpin for CudaMemoryPoolPtr<T>
impl<T> UnwindSafe for CudaMemoryPoolPtr<T>where
T: 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more