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

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


#if 0
	//Warmpup
	contractDataDataScalarKokkos<Kokkos::OpenMP, omp_input_view_t, omp_output_view_t, omp_input_host_t, omp_output_host_t>
		(omp_hostOut, omp_hostLeft, omp_hostRight, omp_kokkosOut,
		 omp_kokkosLeft,omp_kokkosRight); 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::OpenMP, omp_input_view_t, omp_output_view_t, omp_input_host_t, omp_output_host_t>
			(omp_hostOut, omp_hostLeft, omp_hostRight, omp_kokkosOut, omp_kokkosLeft,
			 omp_kokkosRight);
	}

	clock_gettime(CLOCK_MONOTONIC, &toc);
	const double elapsedTime_kokkos = getElapsedTime(tic, toc);

	// Copy out from kokkos output view (NOT timing this)
	for (int cl = 0; cl < c; ++cl) {
		for (int lbf = 0; lbf < l; ++lbf) {
			for (int rbf = 0; rbf < r; ++rbf) {
				out1_c_l_r(cl, lbf, rbf) = omp_hostOut(cl, lbf, rbf);
			}
		}
	}
#endif

	return 0;
}

	Kokkos::deep_copy(outHost, outDevice);
}

int main(int argc, char* argv[]) {

	int c=1000000, p=24;
  int numRepeats = 10;
	
	FieldContainer<double> inl_c_p(c, p);
	FieldContainer<double> inr_c_p(c, p);
	FieldContainer<double> out1_c(c);
