Skip to content
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

parallel small->stat transform #312

Merged
merged 2 commits into from
Apr 28, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion metagraph/src/common/vectors/wavelet_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "common/serialization.hpp"
#include "common/utils/template_utils.hpp"
#include "common/threads/threading.hpp"

typedef wavelet_tree::TAlphabet TAlphabet;

Expand Down Expand Up @@ -392,7 +393,10 @@ bool wavelet_tree_sdsl<t_wt_sdsl>::load(std::istream &in) {
template <class t_wt_sdsl>
sdsl::int_vector<> wavelet_tree_sdsl<t_wt_sdsl>::to_vector() const {
sdsl::int_vector<> vector(wwt_.size(), 0, logsigma_);
std::copy(wwt_.begin(), wwt_.end(), vector.begin());
#pragma omp parallel for num_threads(get_num_threads()) schedule(static, 1024)
karasikov marked this conversation as resolved.
Show resolved Hide resolved
for (uint64_t i = 0; i < wwt_.size(); ++i) {
vector[i] = wwt_[i];
}
return vector;
}

Expand Down