Avoid std::random_shuffle()
#1269
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This removes all usage of
std::random_shuffle(), which was deprecated in C++14 and removed in C++17 (which is the version we should be using). Even when not deprecated, the implementations inlibc++(Clang) andlibstdc++(GCC) differed, so we were getting inconsistent results between platforms. We now get consistent PointDistribution results on all platforms (matching the previous results on GCC/Linux).@ivanimanishi, the potentially contentious thing here is that I've just ripped out PerlinNoise and Turbulence. I'm not aware of any usage outside IE, and there have been superior alternatives in
liboslnoise(a C++ library that comes with OpenShadingLanguage) for some time now anyway. My understanding is that they are used in a few rigging nodes at IE, and one Nuke node. Since they're header-only and haven't changed in years, I'm hoping it's feasible for you to copy them into those projects directly (or adoptliboslnoiseinstead).