pub struct GpuTensorOps { /* private fields */ }Expand description
GPU tensor operations
Implementations§
Source§impl GpuTensorOps
impl GpuTensorOps
Sourcepub fn new(context: Arc<GpuContext>) -> Self
pub fn new(context: Arc<GpuContext>) -> Self
Create new GPU tensor operations
Sourcepub fn matmul(
&self,
a: &Array2<Float>,
b: &Array2<Float>,
) -> Result<Array2<Float>>
pub fn matmul( &self, a: &Array2<Float>, b: &Array2<Float>, ) -> Result<Array2<Float>>
Matrix multiplication on GPU
Sourcepub fn elementwise_add(
&self,
a: &Array2<Float>,
b: &Array2<Float>,
) -> Result<Array2<Float>>
pub fn elementwise_add( &self, a: &Array2<Float>, b: &Array2<Float>, ) -> Result<Array2<Float>>
Element-wise operations on GPU
Auto Trait Implementations§
impl Freeze for GpuTensorOps
impl RefUnwindSafe for GpuTensorOps
impl Send for GpuTensorOps
impl Sync for GpuTensorOps
impl Unpin for GpuTensorOps
impl UnwindSafe for GpuTensorOps
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