diff --git a/README b/README index 4fe9fe4..e5b9843 100644 --- a/README +++ b/README @@ -13,8 +13,8 @@ Windows users can download and run a pre-compiled Windows binary After decompressing, you can simply execute either one of the two .bat files. The 'autopilot' one zooms in a specific location, while the other -one allows you to zoom interactively using your mouse (left-click zooms in, -right-click zooms out). +one allows you to zoom interactively using your mouse (left-click/hold zooms in, +right-click/hold zooms out). For those of you that want to build from source code, there are cross-compilation instructions later in this document. @@ -36,11 +36,11 @@ Usage You can then try these: $ src/mandelSSE - (Runs in autopilot in a 1024x768 window) + (Runs in autopilot mode, in a 1024x768 window) $ src/mandelSSE -m 1280 720 (Runs in mouse-driven mode, in a 1280x720 window) - (left-click zooms-in, right-click zooms out) + (left-click/hold zooms-in, right-click/hold zooms out) Option `-h` gives you additional information about how to control the Mandelbrot zoomer: diff --git a/README.md b/README.md index 4fe9fe4..e5b9843 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ Windows users can download and run a pre-compiled Windows binary After decompressing, you can simply execute either one of the two .bat files. The 'autopilot' one zooms in a specific location, while the other -one allows you to zoom interactively using your mouse (left-click zooms in, -right-click zooms out). +one allows you to zoom interactively using your mouse (left-click/hold zooms in, +right-click/hold zooms out). For those of you that want to build from source code, there are cross-compilation instructions later in this document. @@ -36,11 +36,11 @@ Usage You can then try these: $ src/mandelSSE - (Runs in autopilot in a 1024x768 window) + (Runs in autopilot mode, in a 1024x768 window) $ src/mandelSSE -m 1280 720 (Runs in mouse-driven mode, in a 1280x720 window) - (left-click zooms-in, right-click zooms out) + (left-click/hold zooms-in, right-click/hold zooms out) Option `-h` gives you additional information about how to control the Mandelbrot zoomer: diff --git a/src/mandel.cc b/src/mandel.cc index d3cf5e3..349b218 100644 --- a/src/mandel.cc +++ b/src/mandel.cc @@ -26,15 +26,21 @@ void usage(char *argv[]) { - printf("Usage: %s [-a|-m] [-h] [-b] [-v|-s|-d] [-i iter] [-p pct] [-f rate] [WIDTH HEIGHT]\n", argv[0]); + printf("Usage: %s [-a|-m] [-h] [-b] " +#ifdef __x86_64__ + "[-v|-s|-d] " +#endif + "[-i iter] [-p pct] [-f rate] [WIDTH HEIGHT]\n", argv[0]); puts("Where:"); puts("\t-h\tShow this help message"); puts("\t-m\tRun in mouse-driven mode"); puts("\t-a\tRun in autopilot mode (default)"); puts("\t-b\tRun in benchmark mode (implies autopilot)"); +#ifdef __x86_64__ puts("\t-v\tForce use of AVX"); puts("\t-s\tForce use of SSE"); puts("\t-d\tForce use of non-AVX, non-SSE code"); +#endif puts("\t-i iter\tThe maximum number of iterations of the Mandelbrot loop (default: 2048)"); puts("\t-p pct\tThe percentage of pixels computed per frame (default: 0.75)"); puts("\t \t(the rest are copied from the previous frame)"); @@ -48,7 +54,9 @@ int main(int argc, char *argv[]) { int opt, fps = 60; bool autoPilot = true, benchmark = false; +#ifdef __x86_64__ bool forceAVX = false, forceSSE = false, forceDefault = false; +#endif double percent = 0.75; iterations = 2048; @@ -68,6 +76,7 @@ int main(int argc, char *argv[]) autoPilot = true; benchmark = true; break; +#ifdef __x86_64__ case 'v': forceAVX = true; break; @@ -77,6 +86,7 @@ int main(int argc, char *argv[]) case 'd': forceDefault = true; break; +#endif case 'i': if (1 != sscanf(optarg, "%d", &iterations)) panic("[x] Invalid number of iterations: '%s'", optarg); @@ -159,7 +169,7 @@ int main(int argc, char *argv[]) printf("[-] Iterations: %d\n", iterations); #else CoreLoopDouble = CoreLoopDoubleDefault; - printf("[-] Mode: %s\n", "non-AVX"); + printf("[-] Mode: %s\n", "non-AVX/non-SSE"); #endif const char *windowTitle; diff --git a/src/xaos.cc b/src/xaos.cc index 927831c..ab9c842 100644 --- a/src/xaos.cc +++ b/src/xaos.cc @@ -314,7 +314,7 @@ double autopilot(double percent, bool benchmark) if (benchmark) break; } - printf("[-] Rendered %d frames.\n", frames); + printf("[-] Rendered : %d frames\n", frames); return ((double)frames)*1000.0/ticks; } @@ -384,7 +384,7 @@ double mousedriven(double percent) } } // Inform point reached, for potential autopilot target - printf("[-] Rendered %d frames.\n", frames); + printf("[-] Rendered : %d frames\n", frames); return ((double)frames)*1000.0/ticks; }