Skip to content

Commit

Permalink
fix warning in bucketing
Browse files Browse the repository at this point in the history
  • Loading branch information
patflick committed Mar 25, 2016
1 parent f967540 commit 9403ce4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions gtest/mxx_gtest_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ int main(int argc, char* argv[]) {
::testing::InitGoogleTest(&argc, argv);

mxx::env e(argc, argv);
mxx::env::set_exception_on_error();
mxx::comm c = mxx::comm();
//MPI_Init(&argc, &argv);

Expand Down
4 changes: 2 additions & 2 deletions include/mxx/algos.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ std::vector<size_t> bucketing(std::vector<T>& input, Func key_func, size_t num_b

// [1st pass]: counting the number of elements per bucket
for (auto it = input.begin(); it != input.end(); ++it) {
MXX_ASSERT(0 <= key_func(*it) && key_func(*it) < num_buckets);
MXX_ASSERT(0 <= key_func(*it) && (size_t)key_func(*it) < num_buckets);
bucket_counts[key_func(*it)]++;
}

Expand Down Expand Up @@ -278,7 +278,7 @@ std::vector<size_t> bucketing_inplace(std::vector<T>& input, Func key_func, size

// [1st pass]: counting the number of elements per bucket
for (auto it = input.begin(); it != input.end(); ++it) {
MXX_ASSERT(0 <= key_func(*it) && key_func(*it) < num_buckets);
MXX_ASSERT(0 <= key_func(*it) && (size_t)key_func(*it) < num_buckets);
bucket_counts[key_func(*it)]++;
}
// get exclusive prefix sum
Expand Down

0 comments on commit 9403ce4

Please sign in to comment.