Skip to content

Commit

Permalink
Changing all versions of DGEMM to set shortcut variable explicitly to…
Browse files Browse the repository at this point in the history
… zero if no shortcut specified.
  • Loading branch information
rfvander committed Dec 18, 2015
1 parent 1f5a9f6 commit 4279bc1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion AMPI/DGEMM/dgemm.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ int main(int argc, char *argv[])
if (order < 0) {
shortcut = 1;
order = -order;
}
} else shortcut = 0;
if (order < Num_procs) {
printf("ERROR: matrix order too small: %d\n", order);
error = 1;
Expand Down
2 changes: 1 addition & 1 deletion FG_MPI/DGEMM/dgemm.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ int main(int argc, char *argv[])
if (order < 0) {
shortcut = 1;
order = -order;
}
} else shortcut = 0;
if (order < Num_procs) {
printf("ERROR: matrix order too small: %d\n", order);
error = 1;
Expand Down
2 changes: 1 addition & 1 deletion MPI1/DGEMM/dgemm.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ int main(int argc, char *argv[])
if (order < 0) {
shortcut = 1;
order = -order;
}
} else shortcut = 0;
if (order < Num_procs) {
printf("ERROR: matrix order too small: %d\n", order);
error = 1;
Expand Down
4 changes: 2 additions & 2 deletions OPENMP/DGEMM/dgemm.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ main(int argc, char **argv){
double *A, *B, *C; /* input (A,B) and output (C) matrices */
long order; /* number of rows and columns of matrices */
int block; /* tile size of matrices */
int shortcut; /* true if only doing initialization */
int shortcut; /* true if only doing initialization */

printf("Parallel Research Kernels version %s\n", PRKVERSION);
printf("OpenMP Dense matrix-matrix multiplication\n");
Expand Down Expand Up @@ -139,7 +139,7 @@ main(int argc, char **argv){
if (order < 0) {
shortcut = 1;
order = -order;
}
} else shortcut = 0;
if (order < 1) {
printf("ERROR: Matrix order must be positive: %ld\n", order);
exit(EXIT_FAILURE);
Expand Down

0 comments on commit 4279bc1

Please sign in to comment.