 		ecuda::vector<int> deviceVector1( 100, 3 );
 		ecuda::vector<int> deviceVector2( 100, 5 );
 		ecuda::vector<int> deviceDummyVector( 100 );
-		kernel_testSwapAndClear<<<1,1>>>( deviceVector1, deviceVector2, deviceDummyVector );
-		CUDA_CHECK_ERRORS();
-		CUDA_CALL( cudaDeviceSynchronize() );
-		std::vector<int> hostVector1; deviceVector1 >> hostVector1;
-		std::vector<int> hostVector2; deviceVector2 >> hostVector2;
-		bool passed = true;
-		for( std::vector<int>::size_type i = 0; i < hostVector1.size(); ++i ) if( hostVector1[i] != 5 ) passed = false;
-		for( std::vector<int>::size_type i = 0; i < hostVector2.size(); ++i ) if( hostVector2[i] != 3 ) passed = false;
+		ecuda::array<int,2> deviceArray( 0 );
+		kernel_testSwapAndClear<<<1,1>>>( deviceVector1, deviceVector2, deviceDummyVector, deviceArray );
+		CUDA_CHECK_ERRORS();
+		CUDA_CALL( cudaDeviceSynchronize() );
+		//std::vector<int> hostVector1; deviceVector1 >> hostVector1;
+		//std::vector<int> hostVector2; deviceVector2 >> hostVector2;
+		std::vector<int> hostArray;
+		deviceArray >> hostArray;
+		//bool passed = true;
+		const bool passed = hostArray.size() == 2 and hostArray.front() == 1 and hostArray.back() == 1;
+		//for( std::vector<int>::size_type i = 0; i < hostVector1.size(); ++i ) if( hostVector1[i] != 5 ) passed = false;
+		//for( std::vector<int>::size_type i = 0; i < hostVector2.size(); ++i ) if( hostVector2[i] != 3 ) passed = false;
 		testResults.push_back( passed ? 1 : 0 );
 	}
 

void kernel_testSwapAndClear(
	ecuda::vector<T> vector1,
	ecuda::vector<T> vector2,
	ecuda::vector<T> dummyVector
)
{
	dummyVector.clear();
	if( dummyVector.empty() ) vector1.swap( vector2 );
}

template<typename T> __global__

#include <iostream>
#include <string>
#include <cstdio>
#include "../include/ecuda/array.hpp"
#include "../include/ecuda/vector.hpp"

template<typename T> __global__
