PandA-2024.02
|
#include <stdio.h>
Go to the source code of this file.
Data Structures | |
struct | thread_data |
Macros | |
#define | DECIMAL_PLACES 28 |
#define | int2fixed(num) ((num) << DECIMAL_PLACES) |
#define | fixedmul(a, b) ((((long long)a) * ((long long)b)) >> DECIMAL_PLACES) |
#define | fixed2int(num) ((num) >> DECIMAL_PLACES) |
#define | HEIGHT 128 |
#define | WIDTH 128 |
#define | MAX_ITER 50 |
#define | NUM_ACCEL 4 |
#define | OPS_PER_ACCEL HEIGHT/NUM_ACCEL |
#define | OMP_ACCEL 4 |
Functions | |
void | print_image (int width, int height, int max, unsigned char img[width][height]) |
int | mandelbrot (int startidx) |
int | main () |
Variables | |
volatile unsigned char | img [WIDTH][HEIGHT] |
#define DECIMAL_PLACES 28 |
Definition at line 24 of file mandelbrot.c.
#define fixed2int | ( | num | ) | ((num) >> DECIMAL_PLACES) |
Definition at line 27 of file mandelbrot.c.
#define fixedmul | ( | a, | |
b | |||
) | ((((long long)a) * ((long long)b)) >> DECIMAL_PLACES) |
Definition at line 26 of file mandelbrot.c.
Referenced by mandelbrot().
#define HEIGHT 128 |
Definition at line 29 of file mandelbrot.c.
Referenced by main(), and mandelbrot().
#define int2fixed | ( | num | ) | ((num) << DECIMAL_PLACES) |
Definition at line 25 of file mandelbrot.c.
Referenced by mandelbrot().
#define MAX_ITER 50 |
Definition at line 33 of file mandelbrot.c.
Referenced by mandelbrot().
#define NUM_ACCEL 4 |
Definition at line 34 of file mandelbrot.c.
Referenced by main().
#define OMP_ACCEL 4 |
Definition at line 36 of file mandelbrot.c.
Definition at line 35 of file mandelbrot.c.
Referenced by main(), and mandelbrot().
#define WIDTH 128 |
Definition at line 30 of file mandelbrot.c.
Referenced by main(), and mandelbrot().
int main | ( | void | ) |
Definition at line 89 of file mandelbrot.c.
References HEIGHT, img, mandelbrot(), NUM_ACCEL, OPS_PER_ACCEL, print_image(), and WIDTH.
int mandelbrot | ( | int | startidx | ) |
Definition at line 47 of file mandelbrot.c.
References fixedmul, HEIGHT, img, int2fixed, MAX_ITER, OPS_PER_ACCEL, thread_data::startidx, WIDTH, and x.
|
inline |
Definition at line 7 of file mandelbrot.c.
References img.
Referenced by main().
Definition at line 45 of file mandelbrot.c.