text: #include "gol.h"
  
  int board_width = 1000;
  int board_height = 1000;
  long board_size = board_width * board_height;
  int num_generations = 100;
  long final_size = board_size * num_generations;
  int num_blocks_x; // = ceil(((double)board_width)/block_width);
  int num_blocks_y; // = ceil(((double)board_height)/block_height);
  
  
  int main() {
      fprintf(stderr, "starting main\n");
      num_blocks_x = ceil(((double)board_width)/block_width);
      num_blocks_y = ceil(((double)board_height)/block_height);
      
      fprintf(stderr, "before input\n");
      int *elements = (int *)malloc(board_size * sizeof(int));
      board_t b0 {board_width, board_height, elements};
      int i;
      for (i = 0; i < board_size; i++) {
          std::cin >> b0.elements[i];
      }
  
      // forgive me lord for what I am about to do :-(
      int *output = (int *) malloc(final_size*sizeof(int));
      fprintf(stderr, "starting kernel\n");
      gameOfLifeProto(b0, output, num_generations);
      std::ofstream os("out.dat");
      if (os.is_open()) {
          for (int t = 0; t < num_generations; t++) {
              for (int i = 0; i < board_height; i++) {
                  for (int j = 0; j < board_width; j++) {
                      os << output[board_size * t + board_width * i + j] << ' ';
                  } 
                  os << '\n';   // newline after each row
              }
              os << '\n';   // two newlines after each generation
          }
      }
      free(output);
      free(elements);
  }
  