#ifndef HPC_ULMBLAS_SWAP_H #define HPC_ULMBLAS_SWAP_H 1 #include <utility> namespace hpc { namespace ulmblas { template <typename Index, typename TX, typename TY> void swap(Index n, TX *x, Index incX, TY *y, Index incY) { for (Index i=0; i<n; ++i) { std::swap(x[i*incX], y[i*incY]); } } } } // namespace ulmblas, hpc #endif // HPC_ULMBLAS_SWAP_H |