Skip to content

Commit

Permalink
Fixed compiler warnings and added gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
z.shmaria committed May 24, 2021
1 parent 140a78d commit cc749d5
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/build*
/cmake-build*
venv
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class Coloring_Dense_Sparse {

#pragma omp for schedule(dynamic,8)
for (NodeId v = 0; v < n; v++) {
NodeId lastU = 0;
[[maybe_unused]] NodeId lastU = 0;

if(g.out_degree(v)>=friendNumber) {
auto N = g.out_neigh(v);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ class Fast_RoaringSubGraph
int neighCount = subg.cardinality();
this->mapping.reserve(neighCount);
int counter = 0;
for (auto const w : cand)
for (NodeId const w : cand)
{
this->mapping.insert({w, counter});
this->vertices[counter] = graph.out_neigh(w).intersect(subg);
this->backReferences[counter] = {this->vertices[counter].intersect_count(cand), w};
counter++;
}
for (auto const w : fini)
for (NodeId const w : fini)
{
this->mapping.insert({w, counter});
this->vertices[counter] = graph.out_neigh(w).intersect(cand);
Expand All @@ -49,14 +49,14 @@ class Fast_RoaringSubGraph
int neighCount = subg.cardinality();
this->mapping.reserve(neighCount);
int counter = 0;
for (auto const w : cand)
for (NodeId const w : cand)
{
this->mapping.insert({w, counter});
this->vertices[counter] = graph.neigh(w).intersect(subg);
this->backReferences[counter] = {this->vertices[counter].intersect_count(cand), w};
counter++;
}
for (auto const w : fini)
for (NodeId const w : fini)
{
this->mapping.insert({w, counter});
this->vertices[counter] = graph.neigh(w).intersect(cand);
Expand Down
3 changes: 3 additions & 0 deletions gms/common/papi/papiw.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "./papiw_util.h"

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
/**
* Papi Wrapper Highlevel Module
*
Expand Down Expand Up @@ -126,6 +128,7 @@ namespace PAPIW
#endif
}
} // namespace PAPIW
#pragma GCC diagnostic pop

#ifdef NOPAPIW
/* Provide PAPI Counter Macros, s.t. a program with deactivated PAPIW compiles nevertheless */
Expand Down
5 changes: 4 additions & 1 deletion gms/third_party/gapbs/builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,9 @@ VarintWordBasedGraph csrToVarintWordBased(const CSRGraphBase<NodeId_, DestID_, i
return VarintWordBasedGraph(num_nodes, num_edges, directed, new_offsets_out, new_offsets_in, new_adj_data_out, new_adj_data_in);
}

//Ignore Compiler-Warning of 3rd party Code (GMS team)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpessimizing-move"
template <class CGraph>
auto csrToCGraphGeneric(const CSRGraphBase<NodeId_, DestID_, invert> &csr_graph) {
if constexpr (std::is_same_v<CGraph, CSRGraph>) {
Expand All @@ -780,7 +783,7 @@ VarintWordBasedGraph csrToVarintWordBased(const CSRGraphBase<NodeId_, DestID_, i
static_assert(GMS::always_false<CGraph>, "class not supported");
}
}

#pragma GCC diagnostic pop

struct Tree {
Tree* left = 0; // left subtree
Expand Down
4 changes: 4 additions & 0 deletions gms/third_party/robin_hood.h
Original file line number Diff line number Diff line change
Expand Up @@ -1244,11 +1244,15 @@ class Table
return *this;
}

//Ignore Compiler-Warning of 3rd party Code (GMS team)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpessimizing-move"
Iter operator++(int) noexcept {
Iter tmp = *this;
++(*this);
return std::move(tmp);
}
#pragma GCC diagnostic pop

reference operator*() const {
return **mKeyVals;
Expand Down
4 changes: 4 additions & 0 deletions testing/cgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ CGraph load_CGraph(int)

// TODO refactoring
if constexpr (std::is_same_v<CGraph, CSRGraph>) {
//Ignore Compiler-Warning
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpessimizing-move"
return std::move(g);
#pragma GCC diagnostic pop
} else {
return builder.csrToCGraphGeneric<CGraph>(g);
}
Expand Down

0 comments on commit cc749d5

Please sign in to comment.