pub struct MockGPUArray<T: Clone + 'static> { /* private fields */ }
Expand description
A mock GPU array implementation.
Implementations§
Trait Implementations§
Source§impl<T: Clone + Send + Sync + 'static> ArrayProtocol for MockGPUArray<T>
impl<T: Clone + Send + Sync + 'static> ArrayProtocol for MockGPUArray<T>
Source§fn array_function(
&self,
func: &ArrayFunction,
_types: &[TypeId],
_args: &[Box<dyn Any>],
_kwargs: &HashMap<String, Box<dyn Any>>,
) -> Result<Box<dyn Any>, NotImplemented>
fn array_function( &self, func: &ArrayFunction, _types: &[TypeId], _args: &[Box<dyn Any>], _kwargs: &HashMap<String, Box<dyn Any>>, ) -> Result<Box<dyn Any>, NotImplemented>
Implementation of the array protocol. Read more
Source§fn shape(&self) -> &[usize]
fn shape(&self) -> &[usize]
Get the shape of the array (default implementation returns empty slice)
Source§fn box_clone(&self) -> Box<dyn ArrayProtocol>
fn box_clone(&self) -> Box<dyn ArrayProtocol>
Clone this array protocol object.
Source§impl<T: Clone + Clone + 'static> Clone for MockGPUArray<T>
impl<T: Clone + Clone + 'static> Clone for MockGPUArray<T>
Source§fn clone(&self) -> MockGPUArray<T>
fn clone(&self) -> MockGPUArray<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Clone + Send + Sync + 'static> GPUArray for MockGPUArray<T>
impl<T: Clone + Send + Sync + 'static> GPUArray for MockGPUArray<T>
Source§fn to_cpu(&self) -> CoreResult<Box<dyn ArrayProtocol>>
fn to_cpu(&self) -> CoreResult<Box<dyn ArrayProtocol>>
Move the array from GPU to CPU.
Auto Trait Implementations§
impl<T> Freeze for MockGPUArray<T>
impl<T> RefUnwindSafe for MockGPUArray<T>where
T: RefUnwindSafe,
impl<T> Send for MockGPUArray<T>where
T: Send,
impl<T> Sync for MockGPUArray<T>where
T: Sync,
impl<T> Unpin for MockGPUArray<T>where
T: Unpin,
impl<T> UnwindSafe for MockGPUArray<T>where
T: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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