Skip to main content

GpuArray

Struct GpuArray 

Source
pub struct GpuArray { /* private fields */ }

Implementations§

Source§

impl GpuArray

Source

pub fn module(&self) -> &Arc<ArrOgpuModule>

Source

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

Source

pub fn len(&self) -> usize

Source

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

Source

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

Source

pub fn dim(&self) -> usize

Source

pub fn pointer_to_arr(&self) -> [u32; 2]

Source

pub fn metadata_compound(&self) -> Option<&MetadataCompound>

Source§

impl GpuArray

Source

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

Source§

impl GpuArray

Source

pub fn free(self)

Source§

impl GpuArray

Source§

impl GpuArray

Source

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

Source§

impl GpuArray

Source

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

Source§

impl GpuArray

Source

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

Source

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

Source

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

Source

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

Source§

impl GpuArray

Source§

impl GpuArray

Source

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

Source§

impl GpuArray

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 GpuArray

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 GpuArray

Source§

impl GpuArray

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 GpuArray

Source

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

Source§

impl GpuArray

Source

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

Source§

impl GpuArray

Source

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

Source§

impl GpuArray

Source§

impl GpuArray

Source

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

Trait Implementations§

Source§

impl ArrayCompute for GpuArray

Source§

fn module(&self) -> &Arc<ArrOgpuModule>

Source§

fn pointer_to_arr(&self) -> [u32; 2]

Source§

fn dim(&self) -> usize

Source§

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

Source§

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

Source§

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

Source§

fn offset(&self) -> u32

Source§

fn len(&self) -> u32

Source§

fn is_contiguous(&self) -> bool

Source§

fn metadata_compound(&self) -> Option<&MetadataCompound>

Source§

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

Source§

impl<'a> CheckArrayType<'a> for GpuArray

Source§

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

Source§

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

Source§

impl Display for GpuArray

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PowTrait for GpuArray

Source§

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

Source§

impl ContiguousArray for GpuArray

Source§

impl PowFloat for GpuArray

Auto Trait Implementations§

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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