Skip to main content

GemmDescriptor

Struct GemmDescriptor 

Source
pub struct GemmDescriptor<'a, T> {
    pub m: usize,
    pub n: usize,
    pub k: usize,
    pub alpha: T,
    pub a: &'a [T],
    pub b: &'a [T],
    pub beta: T,
    pub c: &'a mut [T],
    pub trans_a: bool,
    pub trans_b: bool,
    pub order: MemoryOrder,
    pub policy: ExecPolicy,
}
Expand description

GEMM operation descriptor

Data layout (A, B, C slices) is specified by the order field.

Fields§

§m: usize

Rows of op(A) and of C.

§n: usize

Columns of op(B) and of C.

§k: usize

Contracted dimension: columns of op(A) and rows of op(B).

§alpha: T

Scalar applied to the op(A) * op(B) product.

§a: &'a [T]

Operand A (m×k, or k×m when trans_a).

§b: &'a [T]

Operand B (k×n, or n×k when trans_b).

§beta: T

Scalar applied to the existing C before accumulation.

§c: &'a mut [T]

Operand / output C (m×n), overwritten with the result.

§trans_a: bool

Whether A is transposed, i.e. op(A) = Aᵀ.

§trans_b: bool

Whether B is transposed, i.e. op(B) = Bᵀ.

§order: MemoryOrder

Memory layout of the A / B / C slices.

§policy: ExecPolicy

Per-call execution policy.

Auto Trait Implementations§

§

impl<'a, T> !UnwindSafe for GemmDescriptor<'a, T>

§

impl<'a, T> Freeze for GemmDescriptor<'a, T>
where T: Freeze,

§

impl<'a, T> RefUnwindSafe for GemmDescriptor<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> Send for GemmDescriptor<'a, T>
where T: Send + Sync,

§

impl<'a, T> Sync for GemmDescriptor<'a, T>
where T: Sync,

§

impl<'a, T> Unpin for GemmDescriptor<'a, T>
where T: Unpin,

§

impl<'a, T> UnsafeUnpin for GemmDescriptor<'a, T>
where T: UnsafeUnpin,

Blanket Implementations§

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> 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.