Skip to content

Commit

Permalink
Fixed O3 compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Goetz committed Jun 23, 2017
1 parent 78888c9 commit b76366c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ find_package(Threads REQUIRED)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -instrument ${MPI_CXX_COMPILER}")

set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
set(CMAKE_BUILD_TYPE RELWITHDEBINFO)
set(CMAKE_BUILD_TYPE RELEASE)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")

Expand Down
4 changes: 3 additions & 1 deletion distributed_max_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ class DistributedMaxTree {

// find the mapping rules
for (int i = static_cast<int>(parents->width()), j = 0; i < *len; ++i, ++j) {
auto minmax = std::minmax(MaxTree::canonize(*area, in[i]), MaxTree::canonize(*area, out[j]));
U left_canonized = MaxTree::canonize(*area, in[i]);
U right_canonized = MaxTree::canonize(*area, out[j]);
auto minmax = std::minmax(left_canonized, right_canonized);
if (minmax.first != minmax.second) (*area)[minmax.second] = minmax.first;
}

Expand Down

0 comments on commit b76366c

Please sign in to comment.