|template<typename Assignable1 , typename Assignable2 >|
|__host__ __device__ void||thrust::swap (Assignable1 &a, Assignable2 &b)|
swap assigns the contents of
b and the contents of
a. This is used as a primitive operation by many other algorithms.
|a||The first value of interest. After completion, the value of b will be returned here.|
|b||The second value of interest. After completion, the value of a will be returned here.|
|Assignable||is a model of Assignable.|
The following code snippet demonstrates how to use
swap to swap the contents of two variables.