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.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/c/mandelbrot.c b/test/c/mandelbrot.c
index 032e7d75..d862b1a3 100644
--- a/test/c/mandelbrot.c
+++ b/test/c/mandelbrot.c
@@ -17,12 +17,20 @@ int main (int argc, char **argv)
{
int w, h, bit_num = 0;
char byte_acc = 0;
+#ifdef __KVX__
+ int i, iter = 30;
+#else
int i, iter = 50;
+#endif
double x, y, limit = 2.0;
double Zr, Zi, Cr, Ci, Tr, Ti;
if (argc < 2) {
+#ifdef __KVX__
+ w = h = 40;
+#else
w = h = 1000;
+#endif
} else {
w = h = atoi(argv[1]);
}
@@ -52,6 +60,9 @@ int main (int argc, char **argv)
if(bit_num == 8)
{
putc(byte_acc,stdout);
+#ifdef __KVX__ // 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;
}
@@ -59,6 +70,9 @@ int main (int argc, char **argv)
{
byte_acc <<= (8-w%8);
putc(byte_acc,stdout);
+#ifdef __KVX__ // 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;
}