 
 	std::cout << "trying cuda major" << std::endl;
 	//Now try the cuda version, start with warmup
-	cudaDocontractFieldFieldScalar(cudaOut,cudaLeft,cudaRight, c, l, r, p);
-
-	clock_gettime(CLOCK_MONOTONIC, &tic);
+	cudaDocontractFieldFieldScalar(cudaOut,cudaLeft,cudaRight, c, l, r, p, &tic, &toc);
+	double elapsedTime_cuda = 0;
+	
 	for(int i = 0; i < 5; ++i){
-		cudaDocontractFieldFieldScalar(cudaOut,cudaLeft,cudaRight, c, l, r, p);
-	}
-
-	clock_gettime(CLOCK_MONOTONIC, &toc);
-	const double elapsedTime_cuda = getElapsedTime(tic, toc);
+		cudaDocontractFieldFieldScalar(cudaOut,cudaLeft,cudaRight, c, l, r, p, &tic, &toc);
+		elapsedTime_cuda += getElapsedTime(tic,toc);
+	}
 
 	for (int cl = 0; cl < c; ++cl) {
 		for(int lbf = 0; lbf < l; ++lbf) {


		double temp = 0;
		for (int qp = 0; qp < numPoints; qp++) {
			temp += d_left[myMatrix*numPoints*numLeftFields + qp*numLeftFields + matrixRow] *
							d_right[myMatrix*numPoints*numRightFields + qp*numRightFields + matrixCol];
		}
		d_out[myID]= temp;

		int numCells,
		int numLeftFields,
		int numRightFields,
		int numPoints,
		timespec * tic,
		timespec * toc) {

	double * d_right;
	double * d_left;
