Skip to content

Commit

Permalink
fix cu
Browse files Browse the repository at this point in the history
  • Loading branch information
enricozb committed Jun 3, 2024
1 parent d84ef0e commit 5def50a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/hvm.cu
Original file line number Diff line number Diff line change
Expand Up @@ -2481,9 +2481,9 @@ __device__ void pretty_print_port(Net* net, Port port) {
case CON: {
Pair node = node_load(net, get_val(port));
printf("(");
pretty_print_port(net, book, get_fst(node));
pretty_print_port(net, get_fst(node));
printf(" ");
pretty_print_port(net, book, get_snd(node));
pretty_print_port(net, get_snd(node));
printf(")");
return;
}
Expand All @@ -2498,7 +2498,7 @@ __device__ void pretty_print_port(Net* net, Port port) {
case VAR: {
Port val = vars_load(net, get_val(port));
if (val != NONE) {
pretty_print_port(net, book, val);
pretty_print_port(net, val);
} else {
printf("x%x", get_val(port));
}
Expand All @@ -2511,33 +2511,33 @@ __device__ void pretty_print_port(Net* net, Port port) {
case DUP: {
Pair node = node_load(net, get_val(port));
printf("{");
pretty_print_port(net, book, get_fst(node));
pretty_print_port(net, get_fst(node));
printf(" ");
pretty_print_port(net, book, get_snd(node));
pretty_print_port(net, get_snd(node));
printf("}");
return;
}
case OPR: {
Pair node = node_load(net, get_val(port));
printf("$(");
pretty_print_port(net, book, get_fst(node));
pretty_print_port(net, get_fst(node));
printf(" ");
pretty_print_port(net, book, get_snd(node));
pretty_print_port(net, get_snd(node));
printf(")");
return;
}
case SWI: {
Pair node = node_load(net, get_val(port));
printf("?(");
pretty_print_port(net, book, get_fst(node));
pretty_print_port(net, get_fst(node));
printf(" ");
pretty_print_port(net, book, get_snd(node));
pretty_print_port(net, get_snd(node));
printf(")");
return;
}
case REF: {
u32 fid = get_val(port) & 0xFFFFFFF;
Def* def = &book->defs_buf[fid];
Def* def = &Book.defs_buf[fid];
printf("@%s", def->name);
return;
}
Expand Down

0 comments on commit 5def50a

Please sign in to comment.