Skip to content
Snippets Groups Projects
Commit 61cd2f07 authored by Steffen Christgau's avatar Steffen Christgau Committed by Matthias Rüster
Browse files

Fix bug in OpenMP parallelization.

m is declared outside the parallelized for-loops which makes it shared
by default according the OpenMP standard as well as by the
"default(shared)" statement.  This implies a race condition and the
actual value of m is undefined with in the loops.  The patch fixes this
issue.

Note that the compiler might not allocate storage for m on the stack and
use register instead, so the race condition may not manifest in wrong
output when optimization is enabled, but the error is present anyway.
parent 6a68474f
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment