-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Use std::unique_ptr for objects in LdaEngine #4547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e889483 to
d5ede82
Compare
2a8b141 to
fae0d3c
Compare
Codecov Report
@@ Coverage Diff @@
## master #4547 +/- ##
==========================================
- Coverage 75.13% 75.12% -0.02%
==========================================
Files 908 908
Lines 160238 160238
Branches 17256 17256
==========================================
- Hits 120401 120379 -22
- Misses 35016 35043 +27
+ Partials 4821 4816 -5
|
fae0d3c to
6454558
Compare
| data_block_.reset(nullptr); | ||
| atomic_stats_.reset(nullptr); | ||
| model_block_.reset(nullptr); | ||
| samplerQueue_.reset(nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 These calls to reset are likely not required, but by including them it ensures the objects are destroyed in the same order the old code destroyed them.
| model_block_.reset(new LDAModelBlock()); | ||
| data_block_.reset(new LDADataBlock(num_threads_)); | ||
| process_barrier_.reset(new SimpleBarrier(num_threads_)); | ||
| samplerQueue_.reset(new CBlockedIntQueue()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Using reset instead of std::make_shared because some of the builds only have C++ 11 (the latter is C++ 14).
Builds on #4546