Skip to content

Commit

Permalink
Add OMP static scheduling throughout, don't depend on heuristics
Browse files Browse the repository at this point in the history
  • Loading branch information
christiealappatt committed Jul 29, 2020
1 parent b437351 commit 14cbb92
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/daxpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ double daxpy(
#pragma omp parallel
{
LIKWID_MARKER_START("DAXPY");
#pragma omp for
#pragma omp for schedule(static)
for (int i=0; i<N; i++) {
a[i] = a[i] + scalar * b[i];
}
Expand Down
2 changes: 1 addition & 1 deletion src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ double init(
#pragma omp parallel
{
LIKWID_MARKER_START("INIT");
#pragma omp for
#pragma omp for schedule(static)
for (int i=0; i<N; i++) {
a[i] = scalar;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ int main (int argc, char** argv)
#endif

S = getTimeStamp();
#pragma omp parallel for
#pragma omp parallel for schedule(static)
for (int i=0; i<N; i++) {
a[i] = 2.0;
b[i] = 2.0;
Expand Down
2 changes: 1 addition & 1 deletion src/sdaxpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ double sdaxpy(
#pragma omp parallel
{
LIKWID_MARKER_START("SDAXPY");
#pragma omp for
#pragma omp for schedule(static)
for (int i=0; i<N; i++) {
a[i] = a[i] + b[i] * c[i];
}
Expand Down
2 changes: 1 addition & 1 deletion src/striad.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ double striad(
#pragma omp parallel
{
LIKWID_MARKER_START("STRIAD");
#pragma omp for
#pragma omp for schedule(static)
for (int i=0; i<N; i++) {
a[i] = b[i] + d[i] * c[i];
}
Expand Down
2 changes: 1 addition & 1 deletion src/sum.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ double sum(
#pragma omp parallel
{
LIKWID_MARKER_START("SUM");
#pragma omp for reduction(+:sum)
#pragma omp for reduction(+:sum) schedule(static)
for (int i=0; i<N; i++) {
sum += a[i];
}
Expand Down
2 changes: 1 addition & 1 deletion src/triad.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ double triad(
#pragma omp parallel
{
LIKWID_MARKER_START("TRIAD");
#pragma omp for
#pragma omp for schedule(static)
for (int i=0; i<N; i++) {
a[i] = b[i] + scalar * c[i];
}
Expand Down
2 changes: 1 addition & 1 deletion src/update.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ double update(
#pragma omp parallel
{
LIKWID_MARKER_START("UPDATE");
#pragma omp for
#pragma omp for schedule(static)
for (int i=0; i<N; i++) {
a[i] = a[i] * scalar;
}
Expand Down

0 comments on commit 14cbb92

Please sign in to comment.