From 94ddd5cc751a73e9d0a2381cf5628d5e3f3047f3 Mon Sep 17 00:00:00 2001 From: WickedJack99 Date: Sun, 15 Jun 2025 15:44:36 +0200 Subject: [PATCH] added some new errors, removed some --- lab11/game_of_life/patterns.cpp | 4 ++-- lab11/game_of_life/super_grid.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lab11/game_of_life/patterns.cpp b/lab11/game_of_life/patterns.cpp index 406106a..9a0f87f 100644 --- a/lab11/game_of_life/patterns.cpp +++ b/lab11/game_of_life/patterns.cpp @@ -1,7 +1,7 @@ #include "patterns.h" Pattern::Pattern(int rows, int cols, MPIGridSize mpiProcs) - : mpiProcs_(mpiProcs), grid_(SuperGrid::zeros(rows / np0(), cols / np1())) { + : mpiProcs_(mpiProcs), grid_(SuperGrid::zeros(rows / np0(), cols / np1(), nullptr)) { if (rows <= 0 || cols <= 0) { throw std::invalid_argument("Rows and columns must be positive"); } @@ -19,7 +19,7 @@ Pattern::Pattern(int rows, int cols, MPIGridSize mpiProcs) std::array periods = {1, 1}; MPI_Cart_create(MPI_COMM_WORLD, 2, mpiProcs.data(), periods.data(), true, &comm_); - grid_.set_communicator(comm_); + grid_.set_communicator(&comm_); } int Pattern::np0() const { return mpiProcs_[0]; } diff --git a/lab11/game_of_life/super_grid.h b/lab11/game_of_life/super_grid.h index 5bb861a..769613a 100644 --- a/lab11/game_of_life/super_grid.h +++ b/lab11/game_of_life/super_grid.h @@ -2,6 +2,7 @@ #define SUPER_GRID_H #include "matrix.h" +#include class SuperGrid { public: