-
Notifications
You must be signed in to change notification settings - Fork 17
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
query k-mer coordinates #337
Conversation
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.
Looks good so far. I'll propose a list of TODOs
- A few integration tests to make sure serializing/loading works
- Unit tests
- Make get_row_tuples in TupleCSCMatrix more cache efficient
- Implement TupleCSRMatrix (optional?)
// TODO: reshape? | ||
for (size_t i = 0; i < rows.size(); ++i) { | ||
row_tuples[i].reserve(column_ranks[i].size()); | ||
for (auto [j, r] : column_ranks[i]) { | ||
assert(r >= 1 && "matches can't have zero-rank"); | ||
size_t begin = delimiters_[j].select1(r) + 1 - r; | ||
size_t end = delimiters_[j].select1(r + 1) - r; | ||
Tuple tuple; | ||
tuple.reserve(end - begin); | ||
for (size_t t = begin; t < end; ++t) { | ||
tuple.push_back(column_values_[j][t]); | ||
} | ||
row_tuples[i].emplace_back(j, std::move(tuple)); | ||
} |
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.
I agree, I think it might be more cache efficient to first aggregate a list of all accessed column IDs, then iterate through each column once to populate this vector.
No description provided.