summaryrefslogtreecommitdiffhomepage
path: root/ir/kaps
diff options
context:
space:
mode:
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>2016-05-12 15:40:50 +0200
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>2016-05-12 15:40:50 +0200
commita8583be0d6ec050ff34853f4a0268894fac2b8a7 (patch)
tree64ab53eb666d541fcec7cd43ed1ba1c478b03f66 /ir/kaps
parent52e16f28f53699f859eb2f8bdad65cd8caa07985 (diff)
Fix indentation
Diffstat (limited to 'ir/kaps')
-rw-r--r--ir/kaps/brute_force.c8
-rw-r--r--ir/kaps/bucket.c4
-rw-r--r--ir/kaps/heuristical.c8
-rw-r--r--ir/kaps/heuristical_co.c8
-rw-r--r--ir/kaps/heuristical_co_ld.c8
-rw-r--r--ir/kaps/html_dumper.c6
-rw-r--r--ir/kaps/matrix.c11
-rw-r--r--ir/kaps/optimal.c6
8 files changed, 28 insertions, 31 deletions
diff --git a/ir/kaps/brute_force.c b/ir/kaps/brute_force.c
index 863d022..a976fc5 100644
--- a/ir/kaps/brute_force.c
+++ b/ir/kaps/brute_force.c
@@ -316,12 +316,12 @@ void solve_pbqp_brute_force(pbqp_t *pbqp)
fh = fopen("solutions.pb", "a");
#if KAPS_USE_UNSIGNED
fprintf(fh, ": %u RE:%u R0:%u R1:%u R2:%u RM:%u RN/BF:%u\n", pbqp->solution,
- pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
- pbqp->num_rm, pbqp->num_rn);
+ pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
+ pbqp->num_rm, pbqp->num_rn);
#else
fprintf(fh, ": %lld RE:%u R0:%u R1:%u R2:%u RM:%u RN/BF:%u\n", pbqp->solution,
- pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
- pbqp->num_rm, pbqp->num_bf);
+ pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
+ pbqp->num_rm, pbqp->num_bf);
#endif
fclose(fh);
#endif
diff --git a/ir/kaps/bucket.c b/ir/kaps/bucket.c
index 17e8478..55a5293 100644
--- a/ir/kaps/bucket.c
+++ b/ir/kaps/bucket.c
@@ -19,7 +19,7 @@
int edge_bucket_contains(pbqp_edge_bucket_t bucket, pbqp_edge_t *edge)
{
return edge->bucket_index < edge_bucket_get_length(bucket)
- && bucket[edge->bucket_index] == edge;
+ && bucket[edge->bucket_index] == edge;
}
void edge_bucket_free(pbqp_edge_bucket_t *bucket)
@@ -66,7 +66,7 @@ void node_bucket_shrink(pbqp_node_bucket_t *bucket, unsigned len)
int node_bucket_contains(pbqp_node_bucket_t bucket, pbqp_node_t *node)
{
return node->bucket_index < node_bucket_get_length(bucket)
- && bucket[node->bucket_index] == node;
+ && bucket[node->bucket_index] == node;
}
void node_bucket_copy(pbqp_node_bucket_t *dst, pbqp_node_bucket_t src)
diff --git a/ir/kaps/heuristical.c b/ir/kaps/heuristical.c
index 79d975c..dda0fee 100644
--- a/ir/kaps/heuristical.c
+++ b/ir/kaps/heuristical.c
@@ -108,12 +108,12 @@ void solve_pbqp_heuristical(pbqp_t *pbqp)
fh = fopen("solutions.pb", "a");
#if KAPS_USE_UNSIGNED
fprintf(fh, ": %u RE:%u R0:%u R1:%u R2:%u RM:%u RN/BF:%u\n", pbqp->solution,
- pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
- pbqp->num_rm, pbqp->num_rn);
+ pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
+ pbqp->num_rm, pbqp->num_rn);
#else
fprintf(fh, ": %lld RE:%u R0:%u R1:%u R2:%u RM:%u RN/BF:%u\n", pbqp->solution,
- pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
- pbqp->num_rm, pbqp->num_rn);
+ pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
+ pbqp->num_rm, pbqp->num_rn);
#endif
fclose(fh);
#endif
diff --git a/ir/kaps/heuristical_co.c b/ir/kaps/heuristical_co.c
index 021984a..0de7538 100644
--- a/ir/kaps/heuristical_co.c
+++ b/ir/kaps/heuristical_co.c
@@ -189,12 +189,12 @@ void solve_pbqp_heuristical_co(pbqp_t *pbqp, plist_t *rpeo)
fh = fopen("solutions.pb", "a");
#if KAPS_USE_UNSIGNED
fprintf(fh, ": %u RE:%u R0:%u R1:%u R2:%u RM:%u RN/BF:%u\n", pbqp->solution,
- pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
- pbqp->num_rm, pbqp->num_rn);
+ pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
+ pbqp->num_rm, pbqp->num_rn);
#else
fprintf(fh, ": %lld RE:%u R0:%u R1:%u R2:%u RM:%u RN/BF:%u\n", pbqp->solution,
- pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
- pbqp->num_rm, pbqp->num_rn);
+ pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
+ pbqp->num_rm, pbqp->num_rn);
#endif
fclose(fh);
#endif
diff --git a/ir/kaps/heuristical_co_ld.c b/ir/kaps/heuristical_co_ld.c
index b4ca351..66b7eff 100644
--- a/ir/kaps/heuristical_co_ld.c
+++ b/ir/kaps/heuristical_co_ld.c
@@ -337,12 +337,12 @@ void solve_pbqp_heuristical_co_ld(pbqp_t *pbqp, plist_t *rpeo)
fh = fopen("solutions.pb", "a");
#if KAPS_USE_UNSIGNED
fprintf(fh, ": %u RE:%u R0:%u R1:%u R2:%u RM:%u RN/BF:%u\n", pbqp->solution,
- pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
- pbqp->num_rm, pbqp->num_rn);
+ pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
+ pbqp->num_rm, pbqp->num_rn);
#else
fprintf(fh, ": %lld RE:%u R0:%u R1:%u R2:%u RM:%u RN/BF:%u\n", pbqp->solution,
- pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
- pbqp->num_rm, pbqp->num_rn);
+ pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2,
+ pbqp->num_rm, pbqp->num_rn);
#endif
fclose(fh);
#endif
diff --git a/ir/kaps/html_dumper.c b/ir/kaps/html_dumper.c
index c052418..3ea0310 100644
--- a/ir/kaps/html_dumper.c
+++ b/ir/kaps/html_dumper.c
@@ -47,7 +47,7 @@ static void dump_vector(FILE *f, vector_t *vec)
for (unsigned index = 0; index < len; ++index) {
#if KAPS_ENABLE_VECTOR_NAMES
fprintf(f, "<span title=\"%s\">%s</span> ",
- vec->entries[index].name, cost2a(vec->entries[index].data));
+ vec->entries[index].name, cost2a(vec->entries[index].data));
#else
fprintf(f, "%s ", cost2a(vec->entries[index].data));
#endif
@@ -82,7 +82,7 @@ void pbqp_dump_edge(FILE *file, pbqp_edge_t *edge)
{
fputs("<tex>\n", file);
fprintf(file, "\t\\overline\n{C}_{%u,%u}=\n",
- edge->src->index, edge->tgt->index);
+ edge->src->index, edge->tgt->index);
dump_matrix(file, edge->costs);
fputs("</tex><br>", file);
}
@@ -170,7 +170,7 @@ void pbqp_dump_graph(pbqp_t *pbqp)
if (src_index < tgt_index) {
fprintf(pbqp->dump_file, "\t n%u -- n%u;\n", src_index,
- tgt_index);
+ tgt_index);
}
}
}
diff --git a/ir/kaps/matrix.c b/ir/kaps/matrix.c
index 884c2aa..37ed345 100644
--- a/ir/kaps/matrix.c
+++ b/ir/kaps/matrix.c
@@ -171,8 +171,8 @@ void pbqp_matrix_sub_col_value(pbqp_matrix_t *matrix, unsigned col_index,
continue;
}
/* inf - x = inf if x < inf */
- if (matrix->entries[row_index * col_len + col_index] == INF_COSTS && value
- != INF_COSTS)
+ if (matrix->entries[row_index * col_len + col_index] == INF_COSTS
+ && value != INF_COSTS)
continue;
matrix->entries[row_index * col_len + col_index] -= value;
}
@@ -235,8 +235,8 @@ void pbqp_matrix_sub_row_value(pbqp_matrix_t *matrix, unsigned row_index,
continue;
}
/* inf - x = inf if x < inf */
- if (matrix->entries[row_index * col_len + col_index] == INF_COSTS && value
- != INF_COSTS)
+ if (matrix->entries[row_index * col_len + col_index] == INF_COSTS
+ && value != INF_COSTS)
continue;
matrix->entries[row_index * col_len + col_index] -= value;
}
@@ -278,8 +278,7 @@ void pbqp_matrix_add_to_all_cols(pbqp_matrix_t *mat, vector_t *vec)
num value = vec->entries[row_index].data;
for (unsigned col_index = 0; col_index < col_len; ++col_index) {
- mat->entries[row_index * col_len + col_index] = pbqp_add(
- mat->entries[row_index * col_len + col_index], value);
+ mat->entries[row_index * col_len + col_index] = pbqp_add(mat->entries[row_index * col_len + col_index], value);
}
}
}
diff --git a/ir/kaps/optimal.c b/ir/kaps/optimal.c
index 915ccee..858fa91 100644
--- a/ir/kaps/optimal.c
+++ b/ir/kaps/optimal.c
@@ -138,8 +138,7 @@ static void normalize_towards_source(pbqp_edge_t *edge)
}
pbqp_matrix_sub_row_value(mat, src_index, tgt_vec, min);
- src_vec->entries[src_index].data = pbqp_add(
- src_vec->entries[src_index].data, min);
+ src_vec->entries[src_index].data = pbqp_add(src_vec->entries[src_index].data, min);
if (min == INF_COSTS) {
new_infinity = 1;
@@ -185,8 +184,7 @@ static void normalize_towards_target(pbqp_edge_t *edge)
}
pbqp_matrix_sub_col_value(mat, tgt_index, src_vec, min);
- tgt_vec->entries[tgt_index].data = pbqp_add(
- tgt_vec->entries[tgt_index].data, min);
+ tgt_vec->entries[tgt_index].data = pbqp_add(tgt_vec->entries[tgt_index].data, min);
if (min == INF_COSTS) {
new_infinity = 1;