ALP User Documentation 0.7.alpha
Algebraic Programming User Documentation
|
A collection of functions that allow GraphBLAS semirings to work on one or more two-dimensional sparse containers (i.e, sparse matrices). More...
Functions | |
template<Descriptor descr = descriptors::no_operation, typename OutputType , typename InputType1 , typename InputType2 , typename CIT , typename RIT , typename NIT , class Semiring , Backend backend> | |
RC | mxm (Matrix< OutputType, backend, CIT, RIT, NIT > &C, const Matrix< InputType1, backend, CIT, RIT, NIT > &A, const Matrix< InputType2, backend, CIT, RIT, NIT > &B, const Semiring &ring=Semiring(), const Phase &phase=EXECUTE) |
Unmasked and in-place sparse matrix–sparse matrix multiplication (SpMSpM), \( C += A+B \). | |
template<Descriptor descr = descriptors::no_operation, typename OutputType , typename InputType1 , typename InputType2 , typename InputType3 , typename RIT , typename CIT , typename NIT , Backend backend, typename Coords > | |
RC | zip (Matrix< OutputType, backend, RIT, CIT, NIT > &A, const Vector< InputType1, backend, Coords > &x, const Vector< InputType2, backend, Coords > &y, const Vector< InputType3, backend, Coords > &z, const Phase &phase=EXECUTE) |
The grb::zip merges three vectors into a matrix. | |
template<Descriptor descr = descriptors::no_operation, typename InputType1 , typename InputType2 , typename InputType3 , typename RIT , typename CIT , typename NIT , Backend backend, typename Coords > | |
RC | zip (Matrix< void, backend, RIT, CIT, NIT > &A, const Vector< InputType1, backend, Coords > &x, const Vector< InputType2, backend, Coords > &y, const Phase &phase=EXECUTE) |
Merges two vectors into a void matrix. | |
A collection of functions that allow GraphBLAS semirings to work on one or more two-dimensional sparse containers (i.e, sparse matrices).
RC mxm | ( | Matrix< OutputType, backend, CIT, RIT, NIT > & | C, |
const Matrix< InputType1, backend, CIT, RIT, NIT > & | A, | ||
const Matrix< InputType2, backend, CIT, RIT, NIT > & | B, | ||
const Semiring & | ring = Semiring() , |
||
const Phase & | phase = EXECUTE |
||
) |
Unmasked and in-place sparse matrix–sparse matrix multiplication (SpMSpM), \( C += A+B \).
descr | The descriptors under which to perform the computation. Optional; default is grb::descriptors::no_operation. |
OutputType | The type of elements in the output matrix. |
InputType1 | The type of elements in the left-hand side input matrix. |
InputType2 | The type of elements in the right-hand side input matrix. |
Semiring | The semiring under which to perform the multiplication. |
[in,out] | C | The matrix into which the multiplication \( AB \) is accumulated. |
[in] | A | The left-hand side input matrix \( A \). |
[in] | B | The left-hand side input matrix \( B \). |
[in] | ring | The semiring under which the computation should proceed. |
[in] | phase | The grb::Phase the primitive should be executed with. This argument is optional; its default is grb::EXECUTE. |
RC zip | ( | Matrix< OutputType, backend, RIT, CIT, NIT > & | A, |
const Vector< InputType1, backend, Coords > & | x, | ||
const Vector< InputType2, backend, Coords > & | y, | ||
const Vector< InputType3, backend, Coords > & | z, | ||
const Phase & | phase = EXECUTE |
||
) |
The grb::zip merges three vectors into a matrix.
Interprets three input vectors x, y, and z as a series of row coordinates, column coordinates, and nonzeroes, respectively. The thus-defined nonzeroes of a matrix are then stored in a given output matrix A.
The vectors x, y, and z must have equal length, as well as the same number of nonzeroes. If the vectors are sparse, all vectors must have the same sparsity structure.
void
element types.If this function does not return grb::SUCCESS, the output \ a A will have no contents on function exit.
The matrix A must have been pre-allocated to store the nonzero pattern that the three given vectors x, y, and z encode, or otherwise this function returns grb::ILLEGAL.
[out] | A | The output matrix. |
[in] | x | A vector of row indices. |
[in] | y | A vector of column indices. |
[in] | z | A vector of nonzero values. |
[in] | phase | The grb::Phase in which the primitive is to proceed. Optional; the default is grb::EXECUTE. |
RC zip | ( | Matrix< void, backend, RIT, CIT, NIT > & | A, |
const Vector< InputType1, backend, Coords > & | x, | ||
const Vector< InputType2, backend, Coords > & | y, | ||
const Phase & | phase = EXECUTE |
||
) |
Merges two vectors into a void
matrix.
This is a specialisation of grb::zip for pattern matrices. The two input vectors x and y represent coordinates of nonzeroes to be stored in A.