 		CUDA_CHECK_ERRORS();
 		CUDA_CALL( cudaDeviceSynchronize() );
 
-		std::vector<int> hostResults;
+		std::vector<int> hostResults( deviceResults.size() );
 		deviceResults >> hostResults;
 		bool passed = true;
 		for( std::vector<bool>::size_type i = 0; i < hostResults.size(); ++i ) if( hostResults[i] != 1 ) passed = false;

		ecuda::vector<int> deviceVector1( 100, 3 );
		ecuda::vector<int> deviceVector2( 100, 5 );
		deviceVector1.swap( deviceVector2 );
		std::vector<int> hostVector1; deviceVector1 >> hostVector1;
		std::vector<int> hostVector2; deviceVector2 >> hostVector2;
		bool passed = true;
		if( hostVector1.size() != 100 ) passed = false;
		if( hostVector2.size() != 100 ) passed = false;

		CUDA_CALL( cudaDeviceSynchronize() );
		//std::vector<int> hostVector1; deviceVector1 >> hostVector1;
		//std::vector<int> hostVector2; deviceVector2 >> hostVector2;
		std::vector<int> hostArray( deviceArray.size() );
		deviceArray >> hostArray;
		//bool passed = true;
		const bool passed = hostArray.size() == 2 and hostArray.front() == 1 and hostArray.back() == 1;
