Skip to main content

GpuArrayView

Struct GpuArrayView 

Source
pub struct GpuArrayView<'a, A>
where A: ArrayCompute,
{ /* private fields */ }

Implementations§

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn get_heap(&self) -> Vec<f32>

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn ref_array(&self) -> &A

Source

pub fn pointer(&self) -> (u32, u32)

Source

pub fn shape(&self) -> &Vec<u32>

Source

pub fn offset(&self) -> u32

Source

pub fn stride(&self) -> &Vec<u32>

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn abs(&self) -> Result<GpuArray, ArrOgpuErr>

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn dot<'b, B>(&'b self, arr: &'b B) -> Result<GpuArray, ArrOgpuErr>

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn add<B>(&self, arr: &B) -> Result<GpuArray, ArrOgpuErr>
where B: AbleElementWise,

Source

pub fn sub<B>(&self, arr: &B) -> Result<GpuArray, ArrOgpuErr>
where B: AbleElementWise,

Source

pub fn mul<B>(&self, arr: &B) -> Result<GpuArray, ArrOgpuErr>
where B: AbleElementWise,

Source

pub fn div<B>(&self, arr: &B) -> Result<GpuArray, ArrOgpuErr>
where B: AbleElementWise,

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn matmul<B>(&self, arr: &B) -> Result<GpuArray, ArrOgpuErr>
where B: ArrayCompute,

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn powf<P>(&self, power: &P) -> Result<GpuArray, ArrOgpuErr>
where P: PowTrait + PowFloat,

Source

pub fn powi<P>(&self, power: &P) -> Result<GpuArray, ArrOgpuErr>
where P: PowTrait + PowInt,

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn sin(&self) -> Result<GpuArray, ArrOgpuErr>

Source

pub fn cos(&self) -> Result<GpuArray, ArrOgpuErr>

Source

pub fn tan(&self) -> Result<GpuArray, ArrOgpuErr>

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn sum(&self) -> Result<GpuArray, ArrOgpuErr>

Source

pub fn sum_axis(&self, axis: &[u32]) -> Result<GpuArray, ArrOgpuErr>

Source

pub fn sum_axis_keep_dim(&self, axis: &[u32]) -> Result<GpuArray, ArrOgpuErr>

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn broadcast( &self, broadcast: &[u32], ) -> Result<GpuArrayView<'_, GpuArrayView<'_, A>>, ArrOgpuErr>

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn index( &self, index: &[i32], ) -> Result<GpuArrayView<'_, GpuArrayView<'_, A>>, ArrOgpuErr>

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn permute( &self, permute: &[u32], ) -> Result<GpuArrayView<'_, GpuArrayView<'_, A>>, ArrOgpuErr>

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn slicing( &self, slice: &[SliceRangeNegativeAble], ) -> Result<GpuArrayView<'_, GpuArrayView<'_, A>>, ArrOgpuErr>

Source§

impl<'a, A> GpuArrayView<'a, A>
where A: ArrayCompute,

Source

pub fn to_shape( &self, shape: &[u32], ) -> Result<GpuArrayView<'_, GpuArrayView<'_, A>>, ArrOgpuErr>

Trait Implementations§

Source§

impl<'a, A> ArrayCompute for GpuArrayView<'a, A>
where A: ArrayCompute,

Source§

impl<'a, A> CheckArrayType<'a> for GpuArrayView<'a, A>
where A: ArrayCompute,

Source§

fn check(&'a self) -> ArrayType<'a>

Source§

fn get(&'a self) -> &'a dyn ArrayCompute

Source§

impl<'a, A> PowTrait for GpuArrayView<'a, A>
where A: ArrayCompute,

Source§

fn get(&self) -> Result<Power, &'static str>

Source§

impl<'a, A> PowFloat for GpuArrayView<'a, A>
where A: ArrayCompute,

Source§

impl<'a, A> ViewArray for GpuArrayView<'a, A>
where A: ArrayCompute,

Auto Trait Implementations§

§

impl<'a, A> Freeze for GpuArrayView<'a, A>

§

impl<'a, A> !RefUnwindSafe for GpuArrayView<'a, A>

§

impl<'a, A> Send for GpuArrayView<'a, A>
where A: Sync,

§

impl<'a, A> Sync for GpuArrayView<'a, A>
where A: Sync,

§

impl<'a, A> Unpin for GpuArrayView<'a, A>

§

impl<'a, A> !UnwindSafe for GpuArrayView<'a, A>

Blanket Implementations§

Source§

impl<'a, A> AbleElementWise for A
where A: ArrayCompute,

Source§

fn get_eble_element_wise(&self) -> ElementWiseOption<'_>

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,