Skip to content

Commit

Permalink
PERF: fix speed regression
Browse files Browse the repository at this point in the history
Do AdvanceOneStep() single-threadedly, since it is faster most of the
times.
  • Loading branch information
mstaring committed May 30, 2018
1 parent ee63725 commit eab944a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ ::AdvanceOneStep( void )
ParametersType & newPosition = this->m_ScaledCurrentPosition;

/** Advance one step. */
#ifndef ELASTIX_USE_OPENMP // If no OpenMP detected then use single-threaded code
#if 1 // force single-threaded since it is fastest most of the times
//#ifndef ELASTIX_USE_OPENMP // If no OpenMP detected then use single-threaded code
/** Get a reference to the current position. */
const ParametersType & currentPosition = this->GetScaledCurrentPosition();

Expand Down

0 comments on commit eab944a

Please sign in to comment.