This file contains hidden or 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 "stdafx.h" | |
#include <iostream> | |
#include <omp.h> | |
#include <time.h> | |
#include <string> | |
/* | |
2. Napisati sekvencijalni program kojim se generiše skalarni proizvod dva vektora. Napisati | |
OpenMP program kojim se generiše skalarni proizvod dva vektora, podelom iteracija petlje | |
između različitih niti sa i bez korišćenja odredbe redukcije za kombinovanje parcijalnih rezultata | |
u nitima. Uporediti vremena izvršenja u oba slučaja sa sekvencijalnim vremenom izvršenja. |
This file contains hidden or 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 "stdafx.h" | |
#include <iostream> | |
#include <omp.h> | |
#include <time.h> | |
#include <string> | |
/* | |
1. Napisati sekvencijalni program kojim se vrši množenje dve matrice A i B reda N. | |
Korišćenjem OpenMP direktive izvršiti paralelizaciju petlje, tako da se izvrši distribucija | |
iteracija između niti. | |
Podesiti broj niti tako da bude jednak broju jezgara računara. Izmeriti vreme množenja matrica |
This file contains hidden or 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 "stdafx.h"; | |
#include <iostream> | |
#include <mpi.h> | |
#include <ctime> | |
#include <vector> | |
#include <stdio.h> | |
#include <string> | |
/* | |
6. Napisati MPI program kojim se kreira dvodimenzionalna Cartesian struktura sa n vrsta i m | |
kolona. Za svaki skup procesa koji pripadaju istoj koloni strukture kreirati novi komunikator. |
This file contains hidden or 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 "stdafx.h"; | |
#include <iostream> | |
#include <mpi.h> | |
#include <ctime> | |
#include <vector> | |
#include <stdio.h> | |
#include <string> | |
using namespace std; | |
/* | |
5. Napisati MPI program kojim se kreira dvodimenzionalna Cartesian struktura sa n vrsta i n |
This file contains hidden or 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 "stdafx.h"; | |
#include <iostream> | |
#include <mpi.h> | |
#include <ctime> | |
#include <vector> | |
#include <stdio.h> | |
#include <string> | |
/* | |
4. Napisati MPI program kojim se kreira dvodimenzionalna Cartesian struktura sa n vrsta i m | |
kolona. Svaki od nxm procesa izračunava sumu identifikatora njegovog gornjeg i donjeg |
This file contains hidden or 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 "stdafx.h"; | |
#include <iostream> | |
#include <mpi.h> | |
#include <ctime> | |
#include <vector> | |
#include <stdio.h> | |
#include <string> | |
/* | |
3. Napisati MPI program koji kreira komunikator comm1 koji se sastoji od svih procesa sa | |
identifikatorima deljivim sa 3. Master proces (P0) svim procesima ove grupe šalje po jednu |
This file contains hidden or 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 "stdafx.h"; | |
#include <iostream> | |
#include <mpi.h> | |
#include <ctime> | |
#include <vector> | |
#include <stdio.h> | |
#include <string> | |
/* | |
2. Napisati MPI program kojim se kreira dvodimenzionalna Cartesian struktura sa n vrsta i m | |
kolona. U svakom od nxm procesa odštampati identifikatore procesa njegovog levog i desnog |
This file contains hidden or 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 "stdafx.h"; | |
#include <iostream> | |
#include <mpi.h> | |
#include <ctime> | |
#include <vector> | |
#include <stdio.h> | |
#include <string> | |
/* | |
1. Napisati MPI program koji kreira komunikator koji se sastoji od dijagonalnih procesa u | |
kvadratnoj mreži procesa. Iz master procesa novog komunikatora poslati poruku svim ostalim |
This file contains hidden or 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 "stdafx.h"; | |
#include <iostream> | |
#include <mpi.h> | |
#include <ctime> | |
#include <vector> | |
#include <stdio.h> | |
#include <string> | |
/* | |
6. Napisati MPI program koji realizuje množenje matrica A i B reda n, čime se dobija | |
rezultujuća matrica C. Nakon toga, u matrici C pronaći maksimalnu vrednost elemenata |
This file contains hidden or 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 "stdafx.h"; | |
#include <iostream> | |
#include <mpi.h> | |
#include <ctime> | |
#include <vector> | |
#include <stdio.h> | |
#include <string> | |
/* | |
5. Napisati MPI program koji realizuje množenje matrice Amxn i matrice Bnxk, čime se | |
dobija rezultujuća matrica Cmxk. Množenje se obavlja tako što master proces šalje svakom |