headmyshoulder / odeint-v2

odeint - solving ordinary differential equations in c++ v2
http://headmyshoulder.github.com/odeint-v2/
Other
337 stars 102 forks source link

Make OpenMP range algebra buildable with MSVC #233

Open MadCatX opened 5 years ago

MadCatX commented 5 years ago

Current implementation of openmp_range_algebra uses unsigned type (size_t) as index in for loops that are parallelized by OpenMP. This is not supported by MSVC. Additionally, as MSVC is still stuck with OpenMP 2.0 support, the OpenMP reduction syntax used by norm_inf also does not compile. The following patch fixes the issue; at least for MSVC 14.