aboutsummaryrefslogtreecommitdiff
path: root/fractal-gen.h
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2016-10-26 15:56:46 +1300
committerDavid Phillips <david@sighup.nz>2016-10-26 15:56:46 +1300
commit22ccf34f4960b355d55e2aad14008a4c50e65197 (patch)
tree89e56d93126db82712a981e450d5c0bc27389015 /fractal-gen.h
parentf0778d25e747092d59fa6b7d3a1e15bfc795fcd3 (diff)
parent14f76b353d681eb92fa0cd113c2e9c666aaea951 (diff)
downloadfractal-gen-22ccf34f4960b355d55e2aad14008a4c50e65197.tar.xz
Merge branch 'multicore-eff'
Diffstat (limited to 'fractal-gen.h')
-rw-r--r--fractal-gen.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/fractal-gen.h b/fractal-gen.h
index 210d50f..8dcd167 100644
--- a/fractal-gen.h
+++ b/fractal-gen.h
@@ -28,16 +28,21 @@
#include <stdbool.h>
#include <pthread.h>
+typedef void* (*generator_func)(void *);
+
struct frame {
double x;
double y;
double scale;
};
-typedef struct {
+typedef struct data_section_s {
volatile unsigned long idx;
+ generator_func generator;
struct frame parent_frame;
unsigned long core;
+ struct timespec time_start;
+ struct timespec time_end;
unsigned long width;
unsigned long datasize;
char* data;
@@ -53,7 +58,6 @@ double power;
double thread_mult; /* number to multiply available cores by to get thread count */
char *argv0;
-typedef void* (*generator_func)(void *);
void defaultsd(double*, double);
int parse_args(int argc, char **argv);