Skip to content

Commit

Permalink
Fixed warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbuchfink committed Oct 4, 2021
1 parent 338d69a commit 0c64589
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/data/frequent_seeds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Frequent_seeds frequent_seeds;

static void compute_sd(atomic<unsigned> *seedp, DoubleArray<SeedLoc> *query_seed_hits, DoubleArray<SeedLoc> *ref_seed_hits, vector<Sd> *ref_out, vector<Sd> *query_out)
{
unsigned p;
int p;
while ((p = (*seedp)++) < current_range.end()) {
Sd ref_sd, query_sd;
for (auto it = JoinIterator<SeedLoc>(query_seed_hits[p].begin(), ref_seed_hits[p].begin()); it; ++it) {
Expand Down
18 changes: 9 additions & 9 deletions src/data/seed_histogram.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ struct SeedPartitionRange
begin_ (0),
end_ (0)
{ }
SeedPartitionRange(unsigned begin, unsigned end):
SeedPartitionRange(int begin, int end):
begin_ (begin),
end_ (end)
{ }
bool contains(unsigned i) const
bool contains(int i) const
{ return i >= begin_ && i < end_; }
unsigned begin() const
int begin() const
{ return begin_; }
unsigned end() const
int end() const
{ return end_; }
bool lower(unsigned i) const
bool lower(int i) const
{ return i < begin_; }
bool lower_or_equal(unsigned i) const
bool lower_or_equal(int i) const
{ return i < end_; }
unsigned size() const
int size() const
{
return end_ - begin_;
}
Expand All @@ -58,7 +58,7 @@ struct SeedPartitionRange
return SeedPartitionRange(0, Const::seedp);
}
private:
unsigned begin_, end_;
int begin_, end_;
};

extern SeedPartitionRange current_range;
Expand All @@ -74,7 +74,7 @@ inline size_t partition_size(const ShapeHistogram &hst, size_t p)
inline size_t hst_size(const ShapeHistogram &hst, const SeedPartitionRange &range)
{
size_t s = 0;
for(unsigned i=range.begin();i<range.end();++i)
for(int i=range.begin();i<range.end();++i)
s += partition_size(hst, i);
return s;
}
Expand Down
4 changes: 2 additions & 2 deletions src/search/stage0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static void seed_join_worker(
DoubleArray<SeedLoc> *query_seed_hits,
DoubleArray<SeedLoc> *ref_seeds_hits)
{
unsigned p;
int p;
const unsigned bits = query_seeds->key_bits;
if (bits != ref_seeds->key_bits)
throw std::runtime_error("Joining seed arrays with different key lengths.");
Expand All @@ -78,7 +78,7 @@ static void search_worker(atomic<unsigned> *seedp, const SeedPartitionRange *see
#else
unique_ptr<Search::WorkSet> work_set(new Search::WorkSet{ *context, *cfg, shape, {}, writer.get(), {}, {}, {} });
#endif
unsigned p;
int p;
while ((p = (*seedp)++) < seedp_range->end())
for (auto it = JoinIterator<SeedLoc>(query_seed_hits[p].begin(), ref_seed_hits[p].begin()); it; ++it)
Search::stage1(it.r->begin(), it.r->size(), it.s->begin(), it.s->size(), *work_set);
Expand Down

0 comments on commit 0c64589

Please sign in to comment.