Skip to content

BLAS 1::swap

Luc Berger edited this page Apr 23, 2024 · 1 revision

KokkosBlas::swap()

Header File: KokkosBlas1_swap.hpp

Usage: KokkosBlas::swap(space, x, y); KokkosBlas::swap(x, y);

Swaps the entries of vectors x and y.

Interface

template <class execution_space, class XVector, class YVector>
void swap(execution_space const& space, XVector const& x, YVector const& y)

template <class XVector, class YVector>
void swap(XVector const& x, YVector const& y)

Template parameters:

  • execution_space: the backend that will be used to run this kernel
  • XVector: Type of the first vector x; a rank-1 Kokkos::View.
  • YVector: Type of the second vector y; a rank-1 Kokkos::View.

Parameters:

  • space: the execution space instance passed to the Kokkos execution policy to run the kernel on
  • x: [in/out] rank-1 View.
  • y: [in/out] rank-1 View.

Example

Clone this wiki locally