Commit 14cbb929 authored by christiealappatt's avatar christiealappatt
Browse files

Add OMP static scheduling throughout, don't depend on heuristics

parent b4373516
......@@ -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];
}
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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];
}
......
......@@ -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];
}
......
......@@ -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];
}
......
......@@ -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];
}
......
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment