if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "BF-Reduction of Node n%d", node->index);
- dump_section(pbqp->dump_file, 2, txt);
+ pbqp_dump_section(pbqp->dump_file, 2, txt);
pbqp_dump_graph(pbqp);
}
#endif
#if KAPS_DUMP
if (pbqp->dump_file) {
- dump_section(pbqp->dump_file, 2, "Back Propagation");
+ pbqp_dump_section(pbqp->dump_file, 2, "Back Propagation");
}
#endif
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RN-Reduction of Node n%d", node->index);
- dump_section(pbqp->dump_file, 2, txt);
+ pbqp_dump_section(pbqp->dump_file, 2, txt);
pbqp_dump_graph(pbqp);
}
#endif
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RN-Reduction of Node n%d", node->index);
- dump_section(pbqp->dump_file, 2, txt);
+ pbqp_dump_section(pbqp->dump_file, 2, txt);
pbqp_dump_graph(pbqp);
}
#endif
#if KAPS_DUMP
if (pbqp->dump_file) {
- dump_section(pbqp->dump_file, 2, "Back Propagation");
+ pbqp_dump_section(pbqp->dump_file, 2, "Back Propagation");
}
#endif
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RN-Reduction of Node n%d", node->index);
- dump_section(pbqp->dump_file, 2, txt);
+ pbqp_dump_section(pbqp->dump_file, 2, txt);
pbqp_dump_graph(pbqp);
}
#endif
fprintf(f, "\t\\end{pmatrix}\n");
}
-void dump_edge(FILE *file, pbqp_edge_t *edge)
+void pbqp_dump_edge(FILE *file, pbqp_edge_t *edge)
{
fputs("<tex>\n", file);
fprintf(file, "\t\\overline\n{C}_{%u,%u}=\n",
pbqp_edge_t *edge = src_node->edges[edge_index];
unsigned tgt_index = edge->tgt->index;
if (src_index < tgt_index) {
- dump_edge(pbqp->dump_file, edge);
+ pbqp_dump_edge(pbqp->dump_file, edge);
}
}
}
fputs("</p>", pbqp->dump_file);
}
-void dump_node(FILE *file, pbqp_node_t *node)
+void pbqp_dump_node(FILE *file, pbqp_node_t *node)
{
if (node) {
fprintf(file, "\tc<sub>%u</sub> = ", node->index);
/* dump node costs */
fputs("<p>", pbqp->dump_file);
for (index = 0; index < pbqp->num_nodes; ++index) {
- dump_node(pbqp->dump_file, get_node(pbqp, index));
+ pbqp_dump_node(pbqp->dump_file, get_node(pbqp, index));
}
fputs("</p>", pbqp->dump_file);
}
-void dump_section(FILE *f, int level, const char *txt)
+void pbqp_dump_section(FILE *f, int level, const char *txt)
{
fprintf(f, "<h%d>%s</h%d>\n", level, txt, level);
}
void pbqp_dump_input(pbqp_t *pbqp)
{
- dump_section(pbqp->dump_file, 1, "1. PBQP Problem");
- dump_section(pbqp->dump_file, 2, "1.1 Topology");
+ pbqp_dump_section(pbqp->dump_file, 1, "1. PBQP Problem");
+ pbqp_dump_section(pbqp->dump_file, 2, "1.1 Topology");
pbqp_dump_graph(pbqp);
- dump_section(pbqp->dump_file, 2, "1.2 Cost Vectors");
+ pbqp_dump_section(pbqp->dump_file, 2, "1.2 Cost Vectors");
dump_node_costs(pbqp);
- dump_section(pbqp->dump_file, 2, "1.3 Cost Matrices");
+ pbqp_dump_section(pbqp->dump_file, 2, "1.3 Cost Matrices");
dump_edge_costs(pbqp);
}
-void dump_simplifyedge(pbqp_t *pbqp, pbqp_edge_t *edge)
+void pbqp_dump_simplifyedge(pbqp_t *pbqp, pbqp_edge_t *edge)
{
- dump_node(pbqp->dump_file, edge->src);
- dump_edge(pbqp->dump_file, edge);
- dump_node(pbqp->dump_file, edge->tgt);
+ pbqp_dump_node(pbqp->dump_file, edge->src);
+ pbqp_dump_edge(pbqp->dump_file, edge);
+ pbqp_dump_node(pbqp->dump_file, edge->tgt);
}
void pbqp_dump_graph(pbqp_t *pbqp);
-void dump_simplifyedge(pbqp_t *pbqp, pbqp_edge_t *edge);
+void pbqp_dump_simplifyedge(pbqp_t *pbqp, pbqp_edge_t *edge);
-void dump_section(FILE *f, int level, const char *txt);
+void pbqp_dump_section(FILE *f, int level, const char *txt);
-void dump_node(FILE *file, pbqp_node_t *node);
-void dump_edge(FILE *file, pbqp_edge_t *edge);
+void pbqp_dump_node(FILE *file, pbqp_node_t *node);
+void pbqp_dump_edge(FILE *file, pbqp_edge_t *edge);
#endif /* KAPS_HTML_DUMPER_H */
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "Merging n%d into n%d", src_node->index, tgt_node->index);
- dump_section(pbqp->dump_file, 3, txt);
+ pbqp_dump_section(pbqp->dump_file, 3, txt);
}
#endif
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "Merging n%d into n%d", tgt_node->index, src_node->index);
- dump_section(pbqp->dump_file, 3, txt);
+ pbqp_dump_section(pbqp->dump_file, 3, txt);
}
#endif
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "Simplification of Edge n%d-n%d", src_node->index, tgt_node->index);
- dump_section(pbqp->dump_file, 3, txt);
+ pbqp_dump_section(pbqp->dump_file, 3, txt);
}
#endif
#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("Input:<br>\n", pbqp->dump_file);
- dump_simplifyedge(pbqp, edge);
+ pbqp_dump_simplifyedge(pbqp, edge);
}
#endif
#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("<br>\nOutput:<br>\n", pbqp->dump_file);
- dump_simplifyedge(pbqp, edge);
+ pbqp_dump_simplifyedge(pbqp, edge);
}
#endif
#if KAPS_DUMP
if (pbqp->dump_file) {
pbqp_dump_input(pbqp);
- dump_section(pbqp->dump_file, 1, "2. Simplification of Cost Matrices");
+ pbqp_dump_section(pbqp->dump_file, 1, "2. Simplification of Cost Matrices");
}
#endif
file = pbqp->dump_file;
if (file) {
- dump_section(file, 1, "4. Determine Solution/Minimum");
- dump_section(file, 2, "4.1. Trivial Solution");
+ pbqp_dump_section(file, 1, "4. Determine Solution/Minimum");
+ pbqp_dump_section(file, 2, "4.1. Trivial Solution");
}
#endif
#if KAPS_DUMP
if (file) {
fprintf(file, "node n%d is set to %d<br>\n", node->index, node->solution);
- dump_node(file, node);
+ pbqp_dump_node(file, node);
}
#endif
}
#if KAPS_DUMP
if (file) {
- dump_section(file, 2, "Minimum");
+ pbqp_dump_section(file, 2, "Minimum");
#if KAPS_USE_UNSIGNED
fprintf(file, "Minimum is equal to %u.", solution);
#else
#if KAPS_DUMP
if (pbqp->dump_file) {
- dump_section(pbqp->dump_file, 2, "Back Propagation");
+ pbqp_dump_section(pbqp->dump_file, 2, "Back Propagation");
}
#endif
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RI-Reduction of Node n%d", node->index);
- dump_section(pbqp->dump_file, 2, txt);
+ pbqp_dump_section(pbqp->dump_file, 2, txt);
pbqp_dump_graph(pbqp);
fputs("<br>\nBefore reduction:<br>\n", pbqp->dump_file);
- dump_node(pbqp->dump_file, node);
- dump_node(pbqp->dump_file, other_node);
- dump_edge(pbqp->dump_file, edge);
+ pbqp_dump_node(pbqp->dump_file, node);
+ pbqp_dump_node(pbqp->dump_file, other_node);
+ pbqp_dump_edge(pbqp->dump_file, edge);
}
#endif
#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("<br>\nAfter reduction:<br>\n", pbqp->dump_file);
- dump_node(pbqp->dump_file, other_node);
+ pbqp_dump_node(pbqp->dump_file, other_node);
}
#endif
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RII-Reduction of Node n%d", node->index);
- dump_section(pbqp->dump_file, 2, txt);
+ pbqp_dump_section(pbqp->dump_file, 2, txt);
pbqp_dump_graph(pbqp);
fputs("<br>\nBefore reduction:<br>\n", pbqp->dump_file);
- dump_node(pbqp->dump_file, src_node);
- dump_edge(pbqp->dump_file, src_edge);
- dump_node(pbqp->dump_file, node);
- dump_edge(pbqp->dump_file, tgt_edge);
- dump_node(pbqp->dump_file, tgt_node);
+ pbqp_dump_node(pbqp->dump_file, src_node);
+ pbqp_dump_edge(pbqp->dump_file, src_edge);
+ pbqp_dump_node(pbqp->dump_file, node);
+ pbqp_dump_edge(pbqp->dump_file, tgt_edge);
+ pbqp_dump_node(pbqp->dump_file, tgt_node);
}
#endif
#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("<br>\nAfter reduction:<br>\n", pbqp->dump_file);
- dump_edge(pbqp->dump_file, edge);
+ pbqp_dump_edge(pbqp->dump_file, edge);
}
#endif