pub struct OperationDescriptor { /* private fields */ }Expand description
A buffer-independent operation. Input order is the order passed to its constructor.
Implementations§
Source§impl OperationDescriptor
impl OperationDescriptor
Sourcepub fn contraction(
a: OperandDescriptor,
b: OperandDescriptor,
c: Option<OperandDescriptor>,
output: TensorDescriptor,
modes: &[Mode],
compute: ComputeType,
) -> Result<Self>
pub fn contraction( a: OperandDescriptor, b: OperandDescriptor, c: Option<OperandDescriptor>, output: TensorDescriptor, modes: &[Mode], compute: ComputeType, ) -> Result<Self>
D = alpha * sum(op(A) * op(B)) + beta * op(C). C, if supplied, follows A and B in the execution input list.
Sourcepub fn sum_product(
inputs: Vec<OperandDescriptor>,
c: Option<OperandDescriptor>,
output: TensorDescriptor,
modes: &[Mode],
compute: ComputeType,
) -> Result<Self>
pub fn sum_product( inputs: Vec<OperandDescriptor>, c: Option<OperandDescriptor>, output: TensorDescriptor, modes: &[Mode], compute: ComputeType, ) -> Result<Self>
General multi-operand sum of products. Modes absent from D are summed.
Sourcepub fn reduction(
a: OperandDescriptor,
c: Option<OperandDescriptor>,
output: TensorDescriptor,
modes: &[Mode],
reduction: ReductionOp,
compute: ComputeType,
) -> Result<Self>
pub fn reduction( a: OperandDescriptor, c: Option<OperandDescriptor>, output: TensorDescriptor, modes: &[Mode], reduction: ReductionOp, compute: ComputeType, ) -> Result<Self>
D = alpha * reduce(op(A)) + beta * op(C).
Sourcepub fn permutation(
a: OperandDescriptor,
output: TensorDescriptor,
modes: &[Mode],
compute: ComputeType,
) -> Result<Self>
pub fn permutation( a: OperandDescriptor, output: TensorDescriptor, modes: &[Mode], compute: ComputeType, ) -> Result<Self>
D = alpha * op(A), with a physical copy into the specified output layout.
Sourcepub fn elementwise_binary(
a: OperandDescriptor,
b: OperandDescriptor,
output: TensorDescriptor,
modes: &[Mode],
combine: BinaryOp,
compute: ComputeType,
) -> Result<Self>
pub fn elementwise_binary( a: OperandDescriptor, b: OperandDescriptor, output: TensorDescriptor, modes: &[Mode], combine: BinaryOp, compute: ComputeType, ) -> Result<Self>
D = combine(alpha * op(A), beta * op(B)).
Sourcepub fn elementwise_trinary(
inputs: [OperandDescriptor; 3],
output: TensorDescriptor,
modes: &[Mode],
combine_ab: BinaryOp,
combine_abc: BinaryOp,
compute: ComputeType,
) -> Result<Self>
pub fn elementwise_trinary( inputs: [OperandDescriptor; 3], output: TensorDescriptor, modes: &[Mode], combine_ab: BinaryOp, combine_abc: BinaryOp, compute: ComputeType, ) -> Result<Self>
D = combine_abc(combine_ab(alpha * op(A), beta * op(B)), gamma * op(C)).
pub fn inputs(&self) -> &[OperandDescriptor]
pub fn output(&self) -> &TensorDescriptor
pub fn output_modes(&self) -> &[Mode] ⓘ
pub fn compute_type(&self) -> ComputeType
pub fn scalar_count(&self) -> usize
Trait Implementations§
Source§impl Clone for OperationDescriptor
impl Clone for OperationDescriptor
Source§impl Debug for OperationDescriptor
impl Debug for OperationDescriptor
impl Eq for OperationDescriptor
Source§impl PartialEq for OperationDescriptor
impl PartialEq for OperationDescriptor
impl StructuralPartialEq for OperationDescriptor
Auto Trait Implementations§
impl Freeze for OperationDescriptor
impl RefUnwindSafe for OperationDescriptor
impl Send for OperationDescriptor
impl Sync for OperationDescriptor
impl Unpin for OperationDescriptor
impl UnsafeUnpin for OperationDescriptor
impl UnwindSafe for OperationDescriptor
Blanket Implementations§
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<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.