pub struct GpuArray { /* private fields */ }Implementations§
Source§impl GpuArray
impl GpuArray
pub fn module(&self) -> &Arc<ArrOgpuModule>
pub fn pointer(&self) -> (u32, u32)
pub fn len(&self) -> usize
pub fn shape(&self) -> &Vec<u32>
pub fn stride(&self) -> &Vec<u32>
pub fn dim(&self) -> usize
pub fn pointer_to_arr(&self) -> [u32; 2]
pub fn metadata_compound(&self) -> Option<&MetadataCompound>
Source§impl GpuArray
impl GpuArray
pub fn view(&self) -> Result<GpuArrayView<'_, GpuArray>, ArrOgpuErr>
Source§impl GpuArray
impl GpuArray
pub fn dot<'a, A>(&'a self, arr: &'a A) -> Result<GpuArray, ArrOgpuErr>where
A: ArrayCompute + CheckArrayType<'a>,
Source§impl GpuArray
impl GpuArray
pub fn add<A>(&self, arr: &A) -> Result<GpuArray, ArrOgpuErr>where
A: AbleElementWise,
pub fn sub<A>(&self, arr: &A) -> Result<GpuArray, ArrOgpuErr>where
A: AbleElementWise,
pub fn mul<A>(&self, arr: &A) -> Result<GpuArray, ArrOgpuErr>where
A: AbleElementWise,
pub fn div<A>(&self, arr: &A) -> Result<GpuArray, ArrOgpuErr>where
A: AbleElementWise,
Source§impl GpuArray
impl GpuArray
pub fn matmul<A>(&self, arr: &A) -> Result<GpuArray, ArrOgpuErr>where
A: ArrayCompute,
Source§impl GpuArray
impl GpuArray
pub fn sin(&self) -> Result<GpuArray, ArrOgpuErr>
pub fn cos(&self) -> Result<GpuArray, ArrOgpuErr>
pub fn tan(&self) -> Result<GpuArray, ArrOgpuErr>
Source§impl GpuArray
impl GpuArray
pub fn sum(&self) -> Result<GpuArray, ArrOgpuErr>
pub fn sum_axis(&self, axis: &[u32]) -> Result<GpuArray, ArrOgpuErr>
pub fn sum_axis_keep_dim(&self, axis: &[u32]) -> Result<GpuArray, ArrOgpuErr>
Source§impl GpuArray
impl GpuArray
pub fn broadcast( &self, broadcast: &[u32], ) -> Result<GpuArrayView<'_, GpuArray>, ArrOgpuErr>
Source§impl GpuArray
impl GpuArray
pub fn index( &self, index: &[i32], ) -> Result<GpuArrayView<'_, GpuArray>, ArrOgpuErr>
Source§impl GpuArray
impl GpuArray
pub fn permute( &self, permute: &[u32], ) -> Result<GpuArrayView<'_, GpuArray>, ArrOgpuErr>
Source§impl GpuArray
impl GpuArray
pub fn slicing( &self, slice: &[SliceRangeNegativeAble], ) -> Result<GpuArrayView<'_, GpuArray>, ArrOgpuErr>
Source§impl GpuArray
impl GpuArray
pub fn to_shape( &self, shape: &[u32], ) -> Result<GpuArrayView<'_, GpuArray>, ArrOgpuErr>
Trait Implementations§
Source§impl ArrayCompute for GpuArray
impl ArrayCompute for GpuArray
fn module(&self) -> &Arc<ArrOgpuModule>
fn pointer_to_arr(&self) -> [u32; 2]
fn dim(&self) -> usize
fn stride(&self) -> &Vec<u32>
fn shape(&self) -> &Vec<u32>
fn pointer(&self) -> (u32, u32)
fn offset(&self) -> u32
fn len(&self) -> u32
fn is_contiguous(&self) -> bool
fn metadata_compound(&self) -> Option<&MetadataCompound>
fn check_contiguous_or_view<'a>(&'a self) -> ArrayType<'a>
Source§impl<'a> CheckArrayType<'a> for GpuArray
impl<'a> CheckArrayType<'a> for GpuArray
impl ContiguousArray for GpuArray
impl PowFloat for GpuArray
Auto Trait Implementations§
impl Freeze for GpuArray
impl !RefUnwindSafe for GpuArray
impl !Send for GpuArray
impl !Sync for GpuArray
impl Unpin for GpuArray
impl !UnwindSafe for GpuArray
Blanket Implementations§
Source§impl<'a, A> AbleElementWise for Awhere
A: ArrayCompute,
impl<'a, A> AbleElementWise for Awhere
A: ArrayCompute,
fn get_eble_element_wise(&self) -> ElementWiseOption<'_>
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