-
Notifications
You must be signed in to change notification settings - Fork 2
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
[FEATURE] Unitialised resize for deserialisation #160
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #160 +/- ##
=======================================
Coverage 99.94% 99.94%
=======================================
Files 44 44
Lines 1687 1702 +15
=======================================
+ Hits 1686 1701 +15
Misses 1 1
☔ View full report in Codecov by Sentry. |
67f26f7
to
10ad88d
Compare
|
||
resize_for_overwrite(vector_size); | ||
|
||
if constexpr (cereal_text_archive<archive_t>) |
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.
do we ever use a text archive? I thought we cerealize in binary format?
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.
No, but our cereal tests check for every archive, also text archives. In practice, I hope that a bitvector will never be serialised as json/XML :D
auto gen = [&dist, &engine]() | ||
{ | ||
return dist(engine); | ||
}; | ||
seqan::hibf::bit_vector vec(size_in_bits); | ||
std::ranges::generate(vec, gen); |
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.
auto gen = [&dist, &engine]() | |
{ | |
return dist(engine); | |
}; | |
seqan::hibf::bit_vector vec(size_in_bits); | |
std::ranges::generate(vec, gen); | |
seqan::hibf::bit_vector vec(size_in_bits); | |
std::ranges::generate(vec, dist(engine)); |
does this not accept a temporary?
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.
Not like this, dist(engine)
returns a single integer, but generate wants a callable which it then calls multiple times
I ran some benchmarks with raptor.
uninit
= with PRinit
= without PRIndex size: 135.5 GiB (left) and 363.2 GiB (right)