BACK

Translating linear algebra operations to FLAME calls

Operations that can act on vectors or matrices

These operations were originally supported by the Level-1 Basic Linear Algebra Subprograms (vector-vector operations) but have been extended by the FLAME APIs to also take matrix inputs. Note: items in red may or may not appear in the formula that you are trying to implement


Copy

copy y := x FLA_Copy( x, y );
y := (xT)T FLA_Copy_x( FLA_TRANSPOSE, xt, y ); Note: here (xT) is meant to indicate that x is originally stored as a row-vector so that it needs to be transposed to copy it to y .
Typically, this means that x appears as a variable with a t at the end: xt.
(yT)T := x FLA_Copy_x( FLA_TRANSPOSE, x, yt ); Note: here (yT) is meant to indicate that y is originally stored as a row-vector so that x needs to be transposed to copy it to y .
Typically, this means that y appears as a variable with a t at the end: yt.
B := A FLA_Copy( A, B );
B := AT FLA_Copy_x( FLA_TRANSPOSE, A, B );
BT := A FLA_Copy_x( FLA_TRANSPOSE, A, B );


Scale

scale x := α x
Pick α : xT := α xT
A := α A


Axpy

The name of this operation comes from the fact that it (originally) implemented y := α x + y where the name indicates the operation
alpha times x plus y

axpy y := α x + y
Pick α: y := α (xT)T + y Note: here (xT) is meant to indicate that x is originally stored as a row-vector so that it needs to be transposed to add it to y .
Typically, this means that x appears as a variable with a t at the end: xt.
(yT)T := α x + (yT)T Note: here (yT) is meant to indicate that y is originally stored as a row-vector so that x needs to be transposed to add it to y .
Typically, this means that y appears as a variable with a t at the end: yt.
B := α A + B
B := α AT + B
BT := α A + B