![]() |
PandA-2024.02
|
#include <stdio.h>#include <pthread.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 |
| #define | LEGUP 1 |
Functions | |
| void | print_image (int width, int height, int max, unsigned char img[width][height]) |
| void * | mandelbrot (void *threadarg) |
| int | main () |
Variables | |
| volatile unsigned char | img [WIDTH][HEIGHT] |
| #define DECIMAL_PLACES 28 |
Definition at line 25 of file mandelbrot.c.
| #define fixed2int | ( | num | ) | ((num) >> DECIMAL_PLACES) |
Definition at line 28 of file mandelbrot.c.
| #define fixedmul | ( | a, | |
| b | |||
| ) | ((((long long)a) * ((long long)b)) >> DECIMAL_PLACES) |
Definition at line 27 of file mandelbrot.c.
Referenced by mandelbrot().
| #define HEIGHT 128 |
Definition at line 30 of file mandelbrot.c.
Referenced by main(), and mandelbrot().
| #define int2fixed | ( | num | ) | ((num) << DECIMAL_PLACES) |
Definition at line 26 of file mandelbrot.c.
Referenced by mandelbrot().
| #define LEGUP 1 |
Definition at line 39 of file mandelbrot.c.
| #define MAX_ITER 50 |
Definition at line 34 of file mandelbrot.c.
Referenced by mandelbrot().
| #define NUM_ACCEL 4 |
Definition at line 35 of file mandelbrot.c.
Referenced by main().
| #define OMP_ACCEL 4 |
Definition at line 37 of file mandelbrot.c.
Definition at line 36 of file mandelbrot.c.
Referenced by main().
| #define WIDTH 128 |
Definition at line 31 of file mandelbrot.c.
Referenced by main(), and mandelbrot().
| int main | ( | void | ) |
Definition at line 95 of file mandelbrot.c.
References HEIGHT, img, mandelbrot(), thread_data::maxidx, NULL, NUM_ACCEL, OPS_PER_ACCEL, print_image(), thread_data::startidx, test_panda::threads, and WIDTH.

| void* mandelbrot | ( | void * | threadarg | ) |
Definition at line 49 of file mandelbrot.c.
References test_panda::arg, fixedmul, HEIGHT, img, int2fixed, MAX_ITER, thread_data::maxidx, thread_data::startidx, WIDTH, and x.
|
inline |
Definition at line 8 of file mandelbrot.c.
References img.
Definition at line 47 of file mandelbrot.c.
1.8.13