                               sPencils, mz,
                               lPencils, mz };
 
-  float milliseconds;
-  cudaEvent_t startEvent, stopEvent;
-  checkCuda( cudaEventCreate(&startEvent) );
-  checkCuda( cudaEventCreate(&stopEvent) );
-
-  double error, maxError;
-
-  printf("%c derivatives\n\n", (char)(0x58 + dimension));
-
   float f[mx*my*mz];
   float df[mx*my*mz];
   float sol[mx*my*mz];
   
   initInput(f, dimension);
   initSol(sol, dimension);
-
-  const int nReps = 20;
 
   // device arrays
   int bytes = mx*my*mz * sizeof(float);


  // Execution configurations for small and large pencil tiles

  grid_sp[0]  = dim3(my / sPencils, mz, 1);
  block_sp[0] = dim3(mx, sPencils, 1);

  grid_lp[0]  = dim3(my / lPencils, mz, 1);
  block_lp[0] = dim3(mx, sPencils, 1);

  grid_sp[1]  = dim3(mx / sPencils, mz, 1);
  block_sp[1] = dim3(sPencils, my, 1);

  grid_lp[1]  = dim3(mx / lPencils, mz, 1);
  // we want to use the same number of threads as above,
  // so when we use lPencils instead of sPencils in one
  // dimension, we multiply the other by sPencils/lPencils
  block_lp[1] = dim3(lPencils, my * sPencils / lPencils, 1);

  grid_sp[2]  = dim3(mx / sPencils, my, 1);
  block_sp[2] = dim3(sPencils, mz, 1);

  grid_lp[2]  = dim3(mx / lPencils, my, 1);
  block_lp[2] = dim3(lPencils, mz * sPencils / lPencils, 1);
}

void initInput(float *f, int dim)

const int sPencils = 4;  // small # pencils
const int lPencils = 32; // large # pencils
  
dim3 grid[3][2], block[3][2];

// stencil coefficients
__constant__ float c_ax, c_bx, c_cx, c_dx;
