     for (int i = 0; i < nStreams; i++) {
       checkCudaErrors( cudaStreamCreate(&stream[i]) );
     }
+
+    cudaEventRecord(start);  // TODO?: force this to happen before any other stream starts
 
     // do {copy to device, launch kernel, copy to host} for each stream:
     for (int i = 0; i < nStreams; i++) {

////////////////////////////////// Includes: ///////////////////////////////////

#include <stdio.h>

// CUDA stuff:
#include "cuda_runtime.h"

  if ( argc != 4 ) {
    printf("Usage: %s <input image> <output image> <mode>\n", argv[0]);
    printf("       mode 0 = CPU, single thread\n");
    printf("       mode 1 = CPU, 4 threads (not implemented)\n");
    printf("       mode 2 = GPU, global memory, 1d grid\n");
    printf("       mode 3 = GPU, global memory, 2d grid\n");
    printf("       mode 4 = GPU, shared memory, 2d grid\n");
