#include #include #include int escapes(double cr, double ci, int it) { double zr = 0; double zi = 0; double zrtmp; int i; for(i=0; i 4) { return 1; } } return 0; } void mandel(double xmin, double xmax, int xstep, double ymin, double ymax, int ystep, int iters) { int yc; // array of string to store result char *m = (char *) malloc(ystep * (xstep + 1) * sizeof(char)); #pragma omp parallel for for(yc=0; yc## // mandelbrot.h void mandel(double xmin, double xmax, int xstep, double ymin, double ymax, int ystep, int iters); #### use warnings; use Mandelbrot; Mandelbrot::mandel(-2.0, 1.0, 256, -1.0, 1.0, 256, 100000); #### LIBS => ['-lgomp'], # e.g., '-lm' CCFLAGS => '-fopenmp', #### export OMP_NUM_THREADS=2