         args[i].current_chunk_id = &current_chunk_id;
         args[i].host_dataset = dataset;
         args[i].host_outputs = host_outputs;
+        args[i].gridSize = gridSize;
+        args[i].blockSize = blockSize;
 
         int rc = pthread_create(&threads[i], NULL, thread, (void *)&args[i]);
         assert(rc == 0);


    printf("The first few entries look like %f %f %f.\n", dataset[0], dataset[1], dataset[2]);

    // make space for output results
    output_t *outputs = (output_t *)calloc(NUM_CHUNKS, sizeof(output_t));

    struct timeval start_time, end_time;
    double elapsed_time;
// #if 0 // DISABLED to make my life easier
    printf("Processing chunks sequentially\n");

    double *device_chunk;
    output_t *device_output;
    // TODO check errors
    checkCudaErrors(cudaMalloc(&device_chunk, CHUNK_BYTES));
    checkCudaErrors(cudaMalloc(&device_output, OUTPUT_BYTES));

    gettimeofday(&start_time, 0);


    double *host_dataset; // full dataset stored on host
    output_t *host_outputs; // outputs stored on host
    int *current_chunk_id; // pointer to shared chunk_id counter

    // CUDA launch params
    int gridSize;
    int blockSize;
} thread_args_t;

#define NUM_CHUNKS 40000
