     cudaMemcpy( finished_device, finished, sizeof(int), cudaMemcpyHostToDevice);
     region_grow_kernel<<<dimGrid, dimBlock>>>(data_device, region_device, finished_device);
     cudaMemcpy( finished, finished_device, sizeof(int), cudaMemcpyDeviceToHost);
-    printf("Finished: %i\n", finished[0]);
-
   }
   cudaMemcpy( region, region_device, DATA_DIM*DATA_DIM*DATA_DIM*sizeof(unsigned char), cudaMemcpyDeviceToHost);
   return region;

}


int main(int argc, char** argv){

  print_properties();

  unsigned char* data = create_data();

  //printf("Data created");

  unsigned char* region = grow_region_gpu(data);

  //printf("Region grown");

  unsigned char* image = raycast_gpu(data, region);
  //unsigned char* image = raycast_serial(data, region);

  write_bmp(image, IMAGE_DIM, IMAGE_DIM);
}

#include <stdlib.h>
#include <cuda.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>

#include "bmp.h"

