Use thrust::swap for vtkm::Swap in CUDA device code.

This commit is contained in:
Allison Vacanti 2018-06-11 12:27:54 -04:00
parent 7158d56cdc
commit cc631650c5

@ -23,7 +23,11 @@
#include <vtkm/internal/ExportMacros.h>
#ifdef __CUDACC__
#include <thrust/swap.h>
#else
#include <algorithm>
#endif
namespace vtkm
{
@ -33,9 +37,8 @@ namespace vtkm
template <typename T>
VTKM_EXEC_CONT void Swap(T& a, T& b)
{
T tmp = a;
a = b;
b = tmp;
using namespace thrust;
swap(a, b);
}
#else
template <typename T>