ext/nmatrix/math/swap.h in nmatrix-0.1.0.rc3 vs ext/nmatrix/math/swap.h in nmatrix-0.1.0.rc4

- old
+ new

@@ -28,31 +28,10 @@ #ifndef SWAP_H #define SWAP_H namespace nm { namespace math { -/* -template <typename DType> -inline void swap(int n, DType *dx, int incx, DType *dy, int incy) { - - if (n <= 0) return; - - // For negative increments, start at the end of the array. - int ix = incx < 0 ? (-n+1)*incx : 0, - iy = incy < 0 ? (-n+1)*incy : 0; - - if (incx < 0) ix = (-n + 1) * incx; - if (incy < 0) iy = (-n + 1) * incy; - - for (size_t i = 0; i < n; ++i, ix += incx, iy += incy) { - DType dtemp = dx[ix]; - dx[ix] = dy[iy]; - dy[iy] = dtemp; - } - return; -} /* dswap */ - // This is the old BLAS version of this function. ATLAS has an optimized version, but // it's going to be tough to translate. template <typename DType> static void swap(const int N, DType* X, const int incX, DType* Y, const int incY) { if (N > 0) { @@ -68,6 +47,6 @@ } } }} // end nm::math -#endif \ No newline at end of file +#endif