 		d_right, d_out, numCells,numPoints);
 
 	cudaMemcpy(h_out, d_out, sizeof(double) * numCells, cudaMemcpyDeviceToHost);
+
+  cudaFree(d_right);
+  cudaFree(d_left);
+  cudaFree(d_out);
 
 }
 

	clock_gettime(CLOCK_MONOTONIC, &tic);

	//repeat the calculation 5 times so we can average out some randomness
	for(int i = 0; i < 5; ++i){
		contractDataDataScalarKokkos<Kokkos::Cuda, cuda_input_view_t,
			cuda_output_view_t, cuda_input_host_t, cuda_output_host_t>
				(cuda_hostOut, cuda_hostLeft, cuda_hostRight, cuda_kokkosOut,

	std::cout << "cuda unrolled speedup of " << elapsedTime_serial/elapsedTime_cudaUnrolled << std::endl;


	return 0;
}
