Files
cppdraft_translate/cppdraft/linalg/algs/blas2/rank1.md
2025-10-25 03:02:53 +03:00

4.3 KiB
Raw Blame History

[linalg.algs.blas2.rank1]

29 Numerics library [numerics]

29.9 Basic linear algebra algorithms [linalg]

29.9.14 BLAS 2 algorithms [linalg.algs.blas2]

29.9.14.6 Rank-1 (outer product) update of a matrix [linalg.algs.blas2.rank1]

🔗

template<[in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") InVec1, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") InVec2, [inout-matrix](linalg.helpers.concepts#concept:inout-matrix "29.9.7.5Argument concepts[linalg.helpers.concepts]") InOutMat> void matrix_rank_1_update(InVec1 x, InVec2 y, InOutMat A); template<class ExecutionPolicy, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") InVec1, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") InVec2, [inout-matrix](linalg.helpers.concepts#concept:inout-matrix "29.9.7.5Argument concepts[linalg.helpers.concepts]") InOutMat> void matrix_rank_1_update(ExecutionPolicy&& exec, InVec1 x, InVec2 y, InOutMat A);

1

#

These functions perform a nonsymmetric nonconjugated rank-1 update.

[Note 1:

These functions correspond to the BLAS functionsxGER (for real element types) andxGERU (for complex element types)[bib].

— end note]

2

#

Mandates: possibly-multipliable<InOutMat, InVec2, InVec1>() is true.

3

#

Preconditions: multipliable(A, y, x) is true.

4

#

Effects: Computes a matrix A′ such that A′=A+xyT, and assigns each element of A′ to the corresponding element of A.

5

#

Complexity: O(x.extent(0)×y.extent(0)).

🔗

template<[in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") InVec1, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") InVec2, [inout-matrix](linalg.helpers.concepts#concept:inout-matrix "29.9.7.5Argument concepts[linalg.helpers.concepts]") InOutMat> void matrix_rank_1_update_c(InVec1 x, InVec2 y, InOutMat A); template<class ExecutionPolicy, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") InVec1, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") InVec2, [inout-matrix](linalg.helpers.concepts#concept:inout-matrix "29.9.7.5Argument concepts[linalg.helpers.concepts]") InOutMat> void matrix_rank_1_update_c(ExecutionPolicy&& exec, InVec1 x, InVec2 y, InOutMat A);

6

#

These functions perform a nonsymmetric conjugated rank-1 update.

[Note 2:

These functions correspond to the BLAS functionsxGER (for real element types) andxGERC (for complex element types)[bib].

— end note]

7

#

Effects:

For the overloads without an ExecutionPolicy argument, equivalent to:matrix_rank_1_update(x, conjugated(y), A);

otherwise, equivalent to:matrix_rank_1_update(std::forward(exec), x, conjugated(y), A);