coaster_blas/
binary.rs

1//! Provides the IBlasBinary binary trait for Coaster's Framework implementation.
2
3use super::operation::*;
4
5/// Describes the operation binding for a Blas Binary implementation.
6pub trait IBlasBinary<F> {
7    /// Describes the Asum Operation.
8    type Asum: IOperationAsum<F>;
9    /// Describes the Axpy Operation.
10    type Axpy: IOperationAxpy<F>;
11    /// Describes the Copy Operation.
12    type Copy: IOperationCopy<F>;
13    /// Describes the Dot Operation.
14    type Dot: IOperationDot<F>;
15    /// Describes the Nrm2 Operation.
16    type Nrm2: IOperationNrm2<F>;
17    /// Describes the Scale Operation.
18    type Scale: IOperationScale<F>;
19    /// Describes the Swap Operation.
20    type Swap: IOperationSwap<F>;
21
22    /// Returns an initialized Asum operation.
23    fn asum(&self) -> Self::Asum;
24    /// Returns an initialized Axpy operation.
25    fn axpy(&self) -> Self::Axpy;
26    /// Returns an initialized Copy operation.
27    fn copy(&self) -> Self::Copy;
28    /// Returns an initialized Dot operation.
29    fn dot(&self) -> Self::Dot;
30    /// Returns an initialized Nrm2 operation.
31    fn nrm2(&self) -> Self::Nrm2;
32    /// Returns an initialized Scale operation.
33    fn scale(&self) -> Self::Scale;
34    /// Returns an initialized Swap operation.
35    fn swap(&self) -> Self::Swap;
36}