 	    }
 	    cudaEventElapsedTime(&time, start, stop);
 	    printf ("Time for the kernel: %f ms\n", time);
+        cudaEventElapsedTime(&memcopytime, memcopystart, memcopystop);
+        printf ("Time to copy data to device: %f ms\n", memcopytime);
 		return 0;
 	} else {
 		printf("parameter required\n");

        // Copy results back to host
        cudaMemcpy(hostc, devc, size, cudaMemcpyDeviceToHost);

        // Print results
        for (int i = 0; i < vectorlength; ++i) {
            printf("C[%d] = %d\n", i, hostc[i]);

        }

        // Copy vectors to device
        cudaEventRecord(memcopystart);
        cudaMemcpy(deva, hosta, size, cudaMemcpyHostToDevice);
        cudaMemcpy(devb, hostb, size, cudaMemcpyHostToDevice);
        cudaEventRecord(memcopystop);
        cudaEventSynchronize(memcopystop);

        // Calculate blocksize and threadnumber
        int blocksPerGrid = 1;
