[Portability] quantize_block C->C++, use std::thread everywhere #1024
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.
Code change broken out from PR #949 to keep this change separate from the portability/pipelines in that PR.
Since pthread is not available on all platforms, we use C++ standard threads instead. Since we are using this anyway, we can as well swich all uses to standard C++.
The
quantize_block
function was written in C, using unsafe ptrs (probably to support being used with pthread). This PR changes this to more canonical C++.Note: This is not sufficient to make the code compile on macOS, the code changes in #949 are still needed for that