aboutsummaryrefslogtreecommitdiffstats
path: root/test/c/mandelbrot.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/c/mandelbrot.c')
-rw-r--r--test/c/mandelbrot.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/c/mandelbrot.c b/test/c/mandelbrot.c
index 032e7d75..d2afcad1 100644
--- a/test/c/mandelbrot.c
+++ b/test/c/mandelbrot.c
@@ -22,7 +22,7 @@ int main (int argc, char **argv)
double Zr, Zi, Cr, Ci, Tr, Ti;
if (argc < 2) {
- w = h = 1000;
+ w = h = 50;
} else {
w = h = atoi(argv[1]);
}
@@ -51,14 +51,22 @@ int main (int argc, char **argv)
if(bit_num == 8)
{
+ printf("%c", byte_acc);
putc(byte_acc,stdout);
+#ifdef __K1C__ // stdout isn't flushed enough when --syscall=libstd_scalls.so is passed to the simulator k1-cluster
+ fflush(stdout);
+#endif
byte_acc = 0;
bit_num = 0;
}
else if(x == w-1)
{
byte_acc <<= (8-w%8);
+ printf("%c", byte_acc);
putc(byte_acc,stdout);
+#ifdef __K1C__ // stdout isn't flushed enough when --syscall=libstd_scalls.so is passed to the simulator k1-cluster
+ fflush(stdout);
+#endif
byte_acc = 0;
bit_num = 0;
}