 		std::cout << "TIME (raw):  " << std::fixed << (stop-start) << std::endl;
 		std::cout << "TIME (raw): " << std::fixed << ((timeEnd.tv_sec-timeStart.tv_sec)+(timeEnd.tv_nsec-timeStart.tv_nsec)/1e9) << std::endl;
 		std::vector< coord_t<double> > results( N*N );
-		CUDA_CALL( cudaMemcpy( &results.front(), rawData, N*N*sizeof(coord_t<double>), cudaMemcpyDeviceToHost ) );
+		CUDA_CALL( cudaMemcpy2D( &results.front(), N*sizeof(coord_t<double>), rawData, pitch, N*sizeof(coord_t<double>), N, cudaMemcpyDeviceToHost ) );
 		std::cout << "[0,0]=" << std::fixed << results[0].x << "," << results[0].y << std::endl;
 		std::cout << "[" << (N-1) << "," << (N-1) << "]=" << std::fixed << results.back().x << "," << results.back().y << std::endl;
 	}

	deviceMatrix << hostMatrix;

	coord_t<double>* rawData = NULL;
	CUDA_CALL( cudaMalloc( reinterpret_cast<void**>(&rawData), N*N*sizeof(coord_t<double>) ) );
	CUDA_CALL( cudaMemcpy( reinterpret_cast<void*>(rawData), reinterpret_cast<const void*>(hostMatrix.data()), N*N*sizeof(coord_t<double>), cudaMemcpyHostToDevice ) );

	dim3 grid( (N+THREADS-1)/THREADS ), threads( THREADS );


		clock_gettime( CLOCK_REALTIME, &timeStart );
		ecuda::event start, stop;
		start.record();
		manipulateMatrix<double><<<grid,threads>>>( rawData, N, N, pitch );
		CUDA_CALL( cudaDeviceSynchronize() );
		CUDA_CHECK_ERRORS();
		stop.record();
