Commit 89fad080 authored by Ralf Mueller's avatar Ralf Mueller
Browse files

Parallel history update instead of memcpy

parent 09fc1661
......@@ -229,9 +229,15 @@ void *Consecstat (void *argument)
streamDefRecord(ostreamID, varID, levelID);
streamWriteRecord(ostreamID, periods[varID][levelID].ptr, periods[varID][levelID].nmiss);
}
#if defined (_OPENMP)
#pragma omp parallel for default(shared) schedule(static)
for ( i = 0; i < gridInqSize(vars[varID][levelID].grid); i++ )
hist[varID][levelID].ptr[i] = vars[varID][levelID].ptr[i];
#else
memcpy(hist[varID][levelID].ptr,
vars[varID][levelID].ptr,
gridInqSize(vars[varID][levelID].grid)*sizeof(double));
#endif
break;
default:
printf (SWITCHWARN,func);
......
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