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

2.1 KiB
Raw Blame History

[linalg.algs.blas1.swap]

29 Numerics library [numerics]

29.9 Basic linear algebra algorithms [linalg]

29.9.13 BLAS 1 algorithms [linalg.algs.blas1]

29.9.13.3 Swap matrix or vector elements [linalg.algs.blas1.swap]

🔗

template<[inout-object](linalg.helpers.concepts#concept:inout-object "29.9.7.5Argument concepts[linalg.helpers.concepts]") InOutObj1, [inout-object](linalg.helpers.concepts#concept:inout-object "29.9.7.5Argument concepts[linalg.helpers.concepts]") InOutObj2> void swap_elements(InOutObj1 x, InOutObj2 y); template<class ExecutionPolicy, [inout-object](linalg.helpers.concepts#concept:inout-object "29.9.7.5Argument concepts[linalg.helpers.concepts]") InOutObj1, [inout-object](linalg.helpers.concepts#concept:inout-object "29.9.7.5Argument concepts[linalg.helpers.concepts]") InOutObj2> void swap_elements(ExecutionPolicy&& exec, InOutObj1 x, InOutObj2 y);

1

#

[Note 1:

These functions correspond to the BLAS function xSWAP[bib].

— end note]

2

#

Constraints: x.rank() equals y.rank().

3

#

Mandates: For all r in the range [0, x.rank()),compatible-static-extents<InOutObj1, InOutObj2>(r, r) is true.

4

#

Preconditions: x.extents() equals y.extents().

5

#

Effects: Swaps all corresponding elements of x and y.