7 #define DECIMAL_PLACES 28 8 #define int2fixed(num) ((num) << DECIMAL_PLACES) 9 #define fixedmul(a, b) ((((long long)a) * ((long long)b)) >> DECIMAL_PLACES) 10 #define fixed2int(num) ((num) >> DECIMAL_PLACES) 24 #pragma omp parallel for reduction(+:count) 25 for (
int j = 0; j <
HEIGHT; j++) {
26 for (
int i = 0; i <
WIDTH; i++) {
28 int x_0 =
int2fixed(-2) + ((((3 << 20) * i/WIDTH) ) << 8);
29 int y_0 =
int2fixed(-1) + ((((2 << 20) * j/HEIGHT) ) << 8);
34 unsigned char fiter = 0;
36 for (
int iter = 0; iter <
MAX_ITER; iter++) {
46 unsigned char colour = (fiter >=
MAX_ITER) ? 0 : 1;
volatile unsigned char img[WIDTH][HEIGHT]
x
Return the smallest n such that 2^n >= _x.