summaryrefslogtreecommitdiffhomepage
path: root/ir/kaps
diff options
context:
space:
mode:
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>2011-04-11 11:10:51 +0200
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>2011-04-11 11:16:42 +0200
commit394e57f6722f23a9744e9eb307833bc2084aff4a (patch)
tree859a238a1f41d969275aec61fb601b27a1a9eae3 /ir/kaps
parentcd021b5ee1779e72233c4837d4875cf870a594f5 (diff)
Fixed some whitespaces.
Diffstat (limited to 'ir/kaps')
-rw-r--r--ir/kaps/brute_force.c12
-rw-r--r--ir/kaps/heuristical.c6
-rw-r--r--ir/kaps/heuristical_co.c6
-rw-r--r--ir/kaps/heuristical_co_ld.c12
-rw-r--r--ir/kaps/kaps.c4
-rw-r--r--ir/kaps/optimal.c38
6 files changed, 39 insertions, 39 deletions
diff --git a/ir/kaps/brute_force.c b/ir/kaps/brute_force.c
index f32d2ed..a819107 100644
--- a/ir/kaps/brute_force.c
+++ b/ir/kaps/brute_force.c
@@ -32,7 +32,7 @@
#include "bucket.h"
#include "brute_force.h"
#include "optimal.h"
-#if KAPS_DUMP
+#if KAPS_DUMP
#include "html_dumper.h"
#endif
#include "kaps.h"
@@ -152,7 +152,7 @@ static void apply_Brute_Force(pbqp_t *pbqp)
node = get_node_with_max_degree();
assert(pbqp_node_get_degree(node) > 2);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "BF-Reduction of Node n%d", node->index);
@@ -168,7 +168,7 @@ static void apply_Brute_Force(pbqp_t *pbqp)
min_index = get_minimal_alternative(pbqp, node);
node = pbqp->nodes[node->index];
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br><br>\n",
node->index, min_index);
@@ -222,7 +222,7 @@ static void back_propagate_RI(pbqp_t *pbqp, pbqp_node_t *node)
node->solution = pbqp_matrix_get_row_min_index(mat, other->solution, vec);
}
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
@@ -303,7 +303,7 @@ static void back_propagate_RII(pbqp_t *pbqp, pbqp_node_t *node)
node->solution = vector_get_min_index(vec);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
@@ -319,7 +319,7 @@ static void back_propagate_brute_force(pbqp_t *pbqp)
assert(pbqp);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
dump_section(pbqp->dump_file, 2, "Back Propagation");
}
diff --git a/ir/kaps/heuristical.c b/ir/kaps/heuristical.c
index 7c2a294..0e57807 100644
--- a/ir/kaps/heuristical.c
+++ b/ir/kaps/heuristical.c
@@ -33,7 +33,7 @@
#include "bucket.h"
#include "heuristical.h"
#include "optimal.h"
-#if KAPS_DUMP
+#if KAPS_DUMP
#include "html_dumper.h"
#endif
#include "kaps.h"
@@ -57,7 +57,7 @@ static void apply_RN(pbqp_t *pbqp)
node = get_node_with_max_degree();
assert(pbqp_node_get_degree(node) > 2);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RN-Reduction of Node n%d", node->index);
@@ -68,7 +68,7 @@ static void apply_RN(pbqp_t *pbqp)
min_index = get_local_minimal_alternative(pbqp, node);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br><br>\n",
node->index, min_index);
diff --git a/ir/kaps/heuristical_co.c b/ir/kaps/heuristical_co.c
index bbd961b..a61740c 100644
--- a/ir/kaps/heuristical_co.c
+++ b/ir/kaps/heuristical_co.c
@@ -33,7 +33,7 @@
#include "bucket.h"
#include "heuristical_co.h"
#include "optimal.h"
-#if KAPS_DUMP
+#if KAPS_DUMP
#include "html_dumper.h"
#endif
#include "kaps.h"
@@ -82,7 +82,7 @@ static void apply_RN_co(pbqp_t *pbqp)
if (node_is_reduced(node))
return;
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RN-Reduction of Node n%d", node->index);
@@ -93,7 +93,7 @@ static void apply_RN_co(pbqp_t *pbqp)
min_index = get_local_minimal_alternative(pbqp, node);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br><br>\n",
node->index, min_index);
diff --git a/ir/kaps/heuristical_co_ld.c b/ir/kaps/heuristical_co_ld.c
index ff848cb..4bc6b3a 100644
--- a/ir/kaps/heuristical_co_ld.c
+++ b/ir/kaps/heuristical_co_ld.c
@@ -14,7 +14,7 @@
#include "bucket.h"
#include "heuristical_co_ld.h"
#include "optimal.h"
-#if KAPS_DUMP
+#if KAPS_DUMP
#include "html_dumper.h"
#endif
#include "kaps.h"
@@ -49,7 +49,7 @@ static void back_propagate_RI(pbqp_t *pbqp, pbqp_node_t *node)
node->solution = pbqp_matrix_get_row_min_index(mat, other->solution, vec);
}
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
@@ -126,7 +126,7 @@ static void back_propagate_RII(pbqp_t *pbqp, pbqp_node_t *node)
node->solution = vector_get_min_index(vec);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
@@ -162,7 +162,7 @@ static void back_propagate_RN(pbqp_t *pbqp, pbqp_node_t *node)
assert(vector_get_min(vec) != INF_COSTS);
node->solution = vector_get_min_index(vec);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
@@ -178,7 +178,7 @@ static void back_propagate_ld(pbqp_t *pbqp)
assert(pbqp);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
dump_section(pbqp->dump_file, 2, "Back Propagation");
}
@@ -235,7 +235,7 @@ static void apply_RN_co_without_selection(pbqp_t *pbqp)
if (node_is_reduced(node))
return;
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RN-Reduction of Node n%d", node->index);
diff --git a/ir/kaps/kaps.c b/ir/kaps/kaps.c
index 63914d1..7c8d253 100644
--- a/ir/kaps/kaps.c
+++ b/ir/kaps/kaps.c
@@ -79,7 +79,7 @@ pbqp_t *alloc_pbqp(unsigned number_nodes)
pbqp->solution = 0;
pbqp->num_nodes = number_nodes;
-#if KAPS_DUMP
+#if KAPS_DUMP
pbqp->dump_file = NULL;
#endif
pbqp->nodes = OALLOCNZ(&pbqp->obstack, pbqp_node_t*, number_nodes);
@@ -144,7 +144,7 @@ num get_solution(pbqp_t *pbqp)
return pbqp->solution;
}
-#if KAPS_DUMP
+#if KAPS_DUMP
void set_dumpfile(pbqp *pbqp, FILE *f)
{
pbqp->dump_file = f;
diff --git a/ir/kaps/optimal.c b/ir/kaps/optimal.c
index 94ccecc..758de05 100644
--- a/ir/kaps/optimal.c
+++ b/ir/kaps/optimal.c
@@ -31,7 +31,7 @@
#include "error.h"
#include "bucket.h"
-#if KAPS_DUMP
+#if KAPS_DUMP
#include "html_dumper.h"
#endif
#include "kaps.h"
@@ -325,7 +325,7 @@ static void merge_source_into_target(pbqp_t *pbqp, pbqp_edge_t *edge)
pbqp->num_rm++;
#endif
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "Merging n%d into n%d", src_node->index, tgt_node->index);
@@ -488,7 +488,7 @@ static void merge_target_into_source(pbqp_t *pbqp, pbqp_edge_t *edge)
pbqp->num_rm++;
#endif
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "Merging n%d into n%d", tgt_node->index, src_node->index);
@@ -672,7 +672,7 @@ void simplify_edge(pbqp_t *pbqp, pbqp_edge_t *edge)
if (is_deleted(edge))
return;
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "Simplification of Edge n%d-n%d", src_node->index, tgt_node->index);
@@ -690,7 +690,7 @@ void simplify_edge(pbqp_t *pbqp, pbqp_edge_t *edge)
mat = edge->costs;
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("Input:<br>\n", pbqp->dump_file);
dump_simplifyedge(pbqp, edge);
@@ -700,7 +700,7 @@ void simplify_edge(pbqp_t *pbqp, pbqp_edge_t *edge)
normalize_towards_source(edge);
normalize_towards_target(edge);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("<br>\nOutput:<br>\n", pbqp->dump_file);
dump_simplifyedge(pbqp, edge);
@@ -708,7 +708,7 @@ void simplify_edge(pbqp_t *pbqp, pbqp_edge_t *edge)
#endif
if (pbqp_matrix_is_zero(mat, src_vec, tgt_vec)) {
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("edge has been eliminated<br>\n", pbqp->dump_file);
}
@@ -732,7 +732,7 @@ void initial_simplify_edges(pbqp_t *pbqp)
ir_timer_start(t_int_simpl);
#endif
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
pbqp_dump_input(pbqp);
dump_section(pbqp->dump_file, 1, "2. Simplification of Cost Matrices");
@@ -782,13 +782,13 @@ num determine_solution(pbqp_t *pbqp)
ir_timer_reset_and_start(t_det_solution);
#endif
-#if KAPS_DUMP
+#if KAPS_DUMP
FILE *file;
#endif
(void) pbqp;
-#if KAPS_DUMP
+#if KAPS_DUMP
file = pbqp->dump_file;
if (file) {
@@ -811,7 +811,7 @@ num determine_solution(pbqp_t *pbqp)
solution = pbqp_add(solution,
node->costs->entries[node->solution].data);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (file) {
fprintf(file, "node n%d is set to %d<br>\n", node->index, node->solution);
dump_node(file, node);
@@ -819,7 +819,7 @@ num determine_solution(pbqp_t *pbqp)
#endif
}
-#if KAPS_DUMP
+#if KAPS_DUMP
if (file) {
dump_section(file, 2, "Minimum");
#if KAPS_USE_UNSIGNED
@@ -860,7 +860,7 @@ static void back_propagate_RI(pbqp_t *pbqp, pbqp_node_t *node)
node->solution = pbqp_matrix_get_row_min_index(mat, other->solution, vec);
}
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
@@ -935,7 +935,7 @@ static void back_propagate_RII(pbqp_t *pbqp, pbqp_node_t *node)
node->solution = vector_get_min_index(vec);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
@@ -949,7 +949,7 @@ void back_propagate(pbqp_t *pbqp)
unsigned node_index;
unsigned node_len = node_bucket_get_length(reduced_bucket);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
dump_section(pbqp->dump_file, 2, "Back Propagation");
}
@@ -996,7 +996,7 @@ void apply_RI(pbqp_t *pbqp)
other_node = edge->src;
}
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RI-Reduction of Node n%d", node->index);
@@ -1018,7 +1018,7 @@ void apply_RI(pbqp_t *pbqp)
}
disconnect_edge(other_node, edge);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("<br>\nAfter reduction:<br>\n", pbqp->dump_file);
dump_node(pbqp->dump_file, other_node);
@@ -1089,7 +1089,7 @@ void apply_RII(pbqp_t *pbqp)
tgt_is_src = tgt_edge->src == node;
}
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RII-Reduction of Node n%d", node->index);
@@ -1165,7 +1165,7 @@ void apply_RII(pbqp_t *pbqp)
reorder_node_after_edge_deletion(tgt_node);
}
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("<br>\nAfter reduction:<br>\n", pbqp->dump_file);
dump_edge(pbqp->dump_file, edge);