5.5 KiB
[linalg.algs.blas2.symv]
29 Numerics library [numerics]
29.9 Basic linear algebra algorithms [linalg]
29.9.14 BLAS 2 algorithms [linalg.algs.blas2]
29.9.14.2 Symmetric matrix-vector product [linalg.algs.blas2.symv]
[Note 1:
These functions correspond to the BLAS functionsxSYMV and xSPMV[bib].
â end note]
The following elements apply to all functions in [linalg.algs.blas2.symv].
Mandates:
If InMat has layout_blas_packed layout, then the layout's Triangle template argument has the same type as the function's Triangle template argument;
compatible-static-extents<decltype(A), decltype(A)>(0, 1) is true;
possibly-multipliable<decltype(A), decltype(x), decltype(y)>() is true; and
possibly-addable<decltype(x), decltype(y), decltype(z)>() is true for those overloads that take a z parameter.
Preconditions:
A.extent(0) equals A.extent(1),
multipliable(A,x,y) is true, and
addable(x,y,z) is true for those overloads that take a z parameter.
Complexity: O(x.extent(0)ÃA.extent(1)).
template<[in-matrix](linalg.helpers.concepts#concept:in-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InMat, class Triangle, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec, [out-vector](linalg.helpers.concepts#concept:out-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") OutVec> void symmetric_matrix_vector_product(InMat A, Triangle t, InVec x, OutVec y); template<class ExecutionPolicy, [in-matrix](linalg.helpers.concepts#concept:in-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InMat, class Triangle, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec, [out-vector](linalg.helpers.concepts#concept:out-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") OutVec> void symmetric_matrix_vector_product(ExecutionPolicy&& exec, InMat A, Triangle t, InVec x, OutVec y);
These functions perform an overwriting symmetric matrix-vector product, taking into account the Triangle parameter that applies to the symmetric matrix A ([linalg.general]).
Effects: Computes y=Ax.
template<[in-matrix](linalg.helpers.concepts#concept:in-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InMat, class Triangle, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec1, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec2, [out-vector](linalg.helpers.concepts#concept:out-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") OutVec> void symmetric_matrix_vector_product(InMat A, Triangle t, InVec1 x, InVec2 y, OutVec z); template<class ExecutionPolicy, [in-matrix](linalg.helpers.concepts#concept:in-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InMat, class Triangle, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec1, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec2, [out-vector](linalg.helpers.concepts#concept:out-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") OutVec> void symmetric_matrix_vector_product(ExecutionPolicy&& exec, InMat A, Triangle t, InVec1 x, InVec2 y, OutVec z);
These functions perform an updating symmetric matrix-vector product, taking into account the Triangle parameter that applies to the symmetric matrix A ([linalg.general]).
Effects: Computes z=y+Ax.
Remarks: z may alias y.