maybe
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
//
|
//
|
||||||
// Created by Brady Bodily on 3/28/20.
|
// Created by Brady Bodily on 3/28/20.
|
||||||
//
|
//
|
||||||
#include <filesystem>
|
#include <experimental/filesystem>
|
||||||
#include "ReadFromFile.h"
|
#include "ReadFromFile.h"
|
||||||
|
|
||||||
std::vector<City> ReadFromFile::ReadFile(const std::string& fileName)
|
std::vector<City> ReadFromFile::ReadFile(const std::string& fileName)
|
||||||
{
|
{
|
||||||
std::vector<City> cities;
|
std::vector<City> cities;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -29,12 +29,12 @@ int main(int argc, char* argv[])
|
|||||||
matrix[i].resize(citiesSize);
|
matrix[i].resize(citiesSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MPI_Bcast(&matrix[0][0], citiesSize*citiesSize, MPI_FLOAT, 0, MPI_COMM_WORLD);
|
MPI_Bcast(&matrix[0][0], citiesSize*citiesSize, MPI_DOUBLE, 0, MPI_COMM_WORLD);
|
||||||
|
|
||||||
if(!rank){
|
if(rank){
|
||||||
for(int i = 0; i < citiesSize; i++){
|
for(int i = 0; i < citiesSize; i++){
|
||||||
for(int j = 0; j < citiesSize; j++) {
|
for(int j = 0; j < citiesSize; j++) {
|
||||||
std::cout<<"Process " << rank << " has value " << matrix[i][j];
|
std::cout<<"Process " << rank << " has value " << matrix[i][j] << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user