2.1 KiB
[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.5 Argument concepts [linalg.helpers.concepts]") InOutObj1, [inout-object](linalg.helpers.concepts#concept:inout-object "29.9.7.5 Argument 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.5 Argument concepts [linalg.helpers.concepts]") InOutObj1, [inout-object](linalg.helpers.concepts#concept:inout-object "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InOutObj2> void swap_elements(ExecutionPolicy&& exec, InOutObj1 x, InOutObj2 y);
[Note 1:
These functions correspond to the BLAS function xSWAP[bib].
â end note]
Constraints: x.rank() equals y.rank().
Mandates: For all r in the range [0, x.rank()),compatible-static-extents<InOutObj1, InOutObj2>(r, r) is true.
Preconditions: x.extents() equals y.extents().
Effects: Swaps all corresponding elements of x and y.