projects
/
satune.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
47e8248
)
revert Hamed's changes to encoding graph
author
bdemsky
<bdemsky@uci.edu>
Fri, 17 Aug 2018 21:42:44 +0000
(14:42 -0700)
committer
bdemsky
<bdemsky@uci.edu>
Fri, 17 Aug 2018 21:42:44 +0000
(14:42 -0700)
src/ASTAnalyses/Encoding/encodinggraph.cc
patch
|
blob
|
history
diff --git
a/src/ASTAnalyses/Encoding/encodinggraph.cc
b/src/ASTAnalyses/Encoding/encodinggraph.cc
index 6bd28e2075348cc0e1768eec4166039507185529..ebb8a96a5009dc28fc78ca386d21aaf4ea18b3ef 100644
(file)
--- a/
src/ASTAnalyses/Encoding/encodinggraph.cc
+++ b/
src/ASTAnalyses/Encoding/encodinggraph.cc
@@
-78,8
+78,7
@@
void EncodingGraph::encode() {
} else if (encodetype == BINARYINDEX) {
EncodingSubGraph *subgraph = graphMap.get(n);
DEBUG("graphMap.get(subgraph=%p, n=%p)\n", subgraph, n);
} else if (encodetype == BINARYINDEX) {
EncodingSubGraph *subgraph = graphMap.get(n);
DEBUG("graphMap.get(subgraph=%p, n=%p)\n", subgraph, n);
- if (subgraph == NULL){
- encoding->encodingArrayInitialization();
+ if (subgraph == NULL) {
continue;
}
uint encodingSize = subgraph->getEncodingMaxVal(n) + 1;
continue;
}
uint encodingSize = subgraph->getEncodingMaxVal(n) + 1;
@@
-168,9
+167,9
@@
void EncodingGraph::mergeNodes(EncodingNode *first, EncodingNode *second) {
delete graph2;
} else {
ASSERT(graph1 != NULL && graph2 == NULL);
delete graph2;
} else {
ASSERT(graph1 != NULL && graph2 == NULL);
- graph1->addNode(
first
);
+ graph1->addNode(
second
);
DEBUG("graphMap.put(first=%p, graph1=%p)\n", first, graph1);
DEBUG("graphMap.put(first=%p, graph1=%p)\n", first, graph1);
- graphMap.put(
first
, graph1);
+ graphMap.put(
second
, graph1);
}
}
}
}
@@
-292,7
+291,7
@@
void EncodingGraph::decideEdges() {
(newSize - rightSize) * rightGraph->numElements;
}
double conversionfactor = 0.5;
(newSize - rightSize) * rightGraph->numElements;
}
double conversionfactor = 0.5;
- if (
leftGraph != rightGraph &&
(totalCost * conversionfactor) < eeValue) {
+ if ((totalCost * conversionfactor) < eeValue) {
//add the edge
mergeNodes(left, right);
}
//add the edge
mergeNodes(left, right);
}