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

5.5 KiB
Raw Blame History

[linalg.algs.blas2.hemv]

29 Numerics library [numerics]

29.9 Basic linear algebra algorithms [linalg]

29.9.14 BLAS 2 algorithms [linalg.algs.blas2]

29.9.14.3 Hermitian matrix-vector product [linalg.algs.blas2.hemv]

1

#

[Note 1:

These functions correspond to the BLAS functionsxHEMV and xHPMV[bib].

— end note]

2

#

The following elements apply to all functions in [linalg.algs.blas2.hemv].

3

#

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.

4

#

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.

5

#

Complexity: O(x.extent(0)×A.extent(1)).

🔗

template<[in-matrix](linalg.helpers.concepts#concept:in-matrix "29.9.7.5Argument concepts[linalg.helpers.concepts]") InMat, class Triangle, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") InVec, [out-vector](linalg.helpers.concepts#concept:out-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") OutVec> void hermitian_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.5Argument concepts[linalg.helpers.concepts]") InMat, class Triangle, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") InVec, [out-vector](linalg.helpers.concepts#concept:out-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") OutVec> void hermitian_matrix_vector_product(ExecutionPolicy&& exec, InMat A, Triangle t, InVec x, OutVec y);

6

#

These functions perform an overwriting Hermitian matrix-vector product, taking into account the Triangle parameter that applies to the Hermitian matrix A ([linalg.general]).

7

#

Effects: Computes y=Ax.

🔗

template<[in-matrix](linalg.helpers.concepts#concept:in-matrix "29.9.7.5Argument concepts[linalg.helpers.concepts]") InMat, class Triangle, [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, [out-vector](linalg.helpers.concepts#concept:out-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") OutVec> void hermitian_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.5Argument concepts[linalg.helpers.concepts]") InMat, class Triangle, [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, [out-vector](linalg.helpers.concepts#concept:out-vector "29.9.7.5Argument concepts[linalg.helpers.concepts]") OutVec> void hermitian_matrix_vector_product(ExecutionPolicy&& exec, InMat A, Triangle t, InVec1 x, InVec2 y, OutVec z);

8

#

These functions perform an updating Hermitian matrix-vector product, taking into account the Triangle parameter that applies to the Hermitian matrix A ([linalg.general]).

9

#

Effects: Computes z=y+Ax.

10

#

Remarks: z may alias y.