pub struct GroupedGemmJob { /* private fields */ }Expand description
One column-major matrix multiply in a shared-buffer grouped GEMM.
The three offsets address element positions in the caller-owned flat
buffers. The left block has shape rows x contracted, the right block has
shape contracted x cols, and the output block has shape rows x cols.
Jobs may share either input block, but output spans must be disjoint because
the operation has no reduction mode.
§Examples
use tensor4all_tensorbackend::GroupedGemmJob;
let job = GroupedGemmJob::new(8, 4, 0, 2, 3, 5);
assert_eq!(job.out_offset(), 8);
assert_eq!(job.lhs_offset(), 4);
assert_eq!(job.rhs_offset(), 0);
assert_eq!((job.rows(), job.contracted(), job.cols()), (2, 3, 5));Implementations§
Source§impl GroupedGemmJob
impl GroupedGemmJob
Sourcepub fn new(
out_offset: usize,
lhs_offset: usize,
rhs_offset: usize,
rows: usize,
contracted: usize,
cols: usize,
) -> Self
pub fn new( out_offset: usize, lhs_offset: usize, rhs_offset: usize, rows: usize, contracted: usize, cols: usize, ) -> Self
Construct a column-major grouped-GEMM job.
Sourcepub fn out_offset(&self) -> usize
pub fn out_offset(&self) -> usize
Return the output element offset.
Sourcepub fn lhs_offset(&self) -> usize
pub fn lhs_offset(&self) -> usize
Return the left-input element offset.
Sourcepub fn rhs_offset(&self) -> usize
pub fn rhs_offset(&self) -> usize
Return the right-input element offset.
Sourcepub fn contracted(&self) -> usize
pub fn contracted(&self) -> usize
Return the contracted dimension.
Trait Implementations§
Source§impl Clone for GroupedGemmJob
impl Clone for GroupedGemmJob
Source§fn clone(&self) -> GroupedGemmJob
fn clone(&self) -> GroupedGemmJob
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GroupedGemmJob
Source§impl Debug for GroupedGemmJob
impl Debug for GroupedGemmJob
impl Eq for GroupedGemmJob
Source§impl Hash for GroupedGemmJob
impl Hash for GroupedGemmJob
Source§impl PartialEq for GroupedGemmJob
impl PartialEq for GroupedGemmJob
Source§fn eq(&self, other: &GroupedGemmJob) -> bool
fn eq(&self, other: &GroupedGemmJob) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GroupedGemmJob
Auto Trait Implementations§
impl Freeze for GroupedGemmJob
impl RefUnwindSafe for GroupedGemmJob
impl Send for GroupedGemmJob
impl Sync for GroupedGemmJob
impl Unpin for GroupedGemmJob
impl UnsafeUnpin for GroupedGemmJob
impl UnwindSafe for GroupedGemmJob
Blanket Implementations§
impl<T> Boilerplate for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
impl<T, U> Imply<T> for U
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