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
let i = 0 | |
let baz = i == 0 ? true : false |
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 <stdio.h> | |
#include <mpi.h> | |
#define W MPI_COMM_WORLD | |
#define n 4 | |
void printArray(int size, int array[size], int rank) { | |
for (int i = 0; i < size; i++) { | |
if (rank == -1) printf("%02d ", array[i]); | |
else printf("{%d}%02d ", rank, array[i]); | |
} |
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 <mpi.h> | |
#include <stdio.h> | |
#define W MPI_COMM_WORLD | |
#define n 99999 | |
void printArray(int size, double array[size], int rank) { | |
for (int i = 0; i < size; i++) { | |
if (rank == -1) printf("%4.4f ", array[i]); | |
else printf("{%d}%4.4f ", rank, array[i]); | |
} |
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 <mpi.h> | |
#include <stdio.h> | |
#define W MPI_COMM_WORLD | |
#define n 99999 | |
void printArray(int size, double array[size], int rank) { | |
for (int i = 0; i < size; i++) { | |
if (rank == -1) printf("%4.4f ", array[i]); | |
else printf("{%d}%4.4f ", rank, array[i]); | |
} |
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 <stdio.h> | |
#include <mpi.h> | |
#define W MPI_COMM_WORLD | |
#define MPI_SI MPI_STATUS_IGNORE | |
#define n 6 | |
void printArray(int size, int array[size], int rank) { | |
for (int i = 0; i < size; i++) { | |
if (rank == -1) printf("%4d ", array[i]); | |
else printf("{%d}%4d ", rank, array[i]); |
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 <mpi.h> | |
#include <stdio.h> | |
#define W MPI_COMM_WORLD | |
void printArray(int n, int array[n], int rank) { | |
for (int i = 0; i < n; i++) { | |
if (rank == -1) printf("%4d ", array[i]); | |
else printf("{%d}%4d ", rank, array[i]); | |
} | |
printf("\n"); |
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
// 24. 9. 2016 (4) | |
#include <stdio.h> | |
#include <mpi.h> | |
#define W MPI_COMM_WORLD | |
int q(int i, int j, int m) { | |
return i * m + j; | |
} |
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
// 24. 9. 2016 (3) | |
#include <stdio.h> | |
#include <mpi.h> | |
#define W MPI_COMM_WORLD | |
int main(int argc, char** argv) { | |
MPI_Init(&argc, &argv); | |
int m = 3; |