Need Help Yellow Highlighted Section 3 Stopping Iteration Change 2 Generations Parallel Co Q37061600

I need help with the yellow highlighted in section 3, stoppingiteration after there is no change in 2 generations.

Parallel Implementation of Game of Life Using C and OpenMP A two-dimensional binary cellular automaton consists of a two-dime

//Parallel Code

#include <stdio.h>
#include <string.h>
#include <omp.h>
#include <stdlib.h>
#include <assert.h>
#define MAX_N 2000

int board[2][(MAX_N + 2) * (MAX_N + 2)];
int nex = 0;
int n;

int liveCells(int ind)
{
   return (board[nex][ind – n – 3]
   + board[nex][ind – n – 2]
   + board[nex][ind – n – 1]
   + board[nex][ind – 1]
   + board[nex][ind + 1]
   + board[nex][ind + n + 1]
   + board[nex][ind + n + 2]
  

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.