This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void GameOfLife::split() | |
{ | |
// Strategy: | |
n_x_nodes_ = n_nodes_; | |
n_y_nodes_ = 1; | |
int workload_per_node = 0; | |
int zero_node_workload = 0; | |
if (n_nodes_ > 1) { | |
workload_per_node = int(field_->size_x() / n_nodes_) * (n_nodes_ / (n_nodes_ - 1)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
void printArray(const int* const b, const unsigned size) | |
{ | |
for (unsigned i = 0; i < size; i++) | |
cout<< b[i] << ' '; | |
cout << endl; | |
} |