#include #include #include #include #include void PrintSurfaceMatrix(double** M, int D); double WallTime(void); int main(int argc, char* argv[]){ using namespace std; // Read Input Parameters if(argc < 4) { cerr << "\nToo many input paramters.. should be four\n"; exit(2); } int Dimension = atoi(argv[1]); int Iterations = atoi(argv[2]); int RowPeek = atoi(argv[3]); int ColPeek = atoi(argv[4]); cout <<"\nInputs = " << Dimension << " "< Dimension) || (ColPeek > Dimension)){ cerr << "Cannot Peek a matrix element outside of the surface"; cerr << "Arguments 3 and 4 must be smaller than " << Dimension; exit(3); } // Initialize Matrix double **SurfaceMatrix; SurfaceMatrix = (double**)malloc(sizeof(double*)*(Dimension+2)); for(int i=0;i