Dpipe and minor C API fix#229
Merged
Merged
Conversation
added 3 commits
November 13, 2020 01:21
Dlib usually compiles as a library. So there is some checks for ODR and that version used is the same across compilation units. Unfortunately, there is a bug where ODR is checked regardless of check configs. Fixed.
DlibQueueWrapper, unlike every other wrappers, allows only swap semantics, that is no `enqueue(T const &)`, only `enqueue(T &)` or `enqueue(T &&)`. And that means we can't send enqueue counter_t aka std::uint64_t to in queue. Not sure if this is fixed as intended, but it compiles and gives meaningful results.
Owner
|
All good fixes, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
First, in C API for non-win platform some macro was not defined
Second, benchmark didn't compile for two very different reasons.
First reason: some missed symbols, mostly because dlib is a compiled library with extensive checks for versioning and ODR across multiple compilation units. Luckily, that's fixed with its config and one minor bugfix.
Second, the most important: dpipe has no API for copy to queue, only exchange. And that means, you can't exchange counter_t values with int values. And you can't replace all
ints withcounter_tforieither, because exchange will replace it's value. So, fast way is to copy to some temp and then enqueue it. But that means double copy for every other queues, not good. And special benchmark for that is not good either. So, I changed benchmarks templates to send item_t (int in our case) and createditem_t item =1outside of loops to enqueue that.At least now MSVC compiled it without complains.