From a81425632db81527bcecd2d0fbdb5b09c25141ba Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sun, 1 May 2022 11:43:42 -0700 Subject: modules/*: make use of generic fragmenters Just one case, modules/submit, was using 32x32 tiles and is now using 64x64. I don't expect it to make any difference. While here I fixed up the num_cpus/n_cpus naming inconsistencies, normalizing on n_cpus. --- src/modules/julia/julia.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/modules/julia/julia.c') diff --git a/src/modules/julia/julia.c b/src/modules/julia/julia.c index fc0f092..48f85da 100644 --- a/src/modules/julia/julia.c +++ b/src/modules/julia/julia.c @@ -19,7 +19,6 @@ typedef struct julia_context_t { float creal; float cimag; float threshold; - unsigned n_cpus; } julia_context_t; static uint32_t colors[] = { @@ -66,7 +65,7 @@ static uint32_t colors[] = { }; -static void * julia_create_context(unsigned ticks, unsigned num_cpus, til_setup_t *setup) +static void * julia_create_context(unsigned ticks, unsigned n_cpus, til_setup_t *setup) { return calloc(1, sizeof(julia_context_t)); } @@ -102,21 +101,12 @@ static inline unsigned julia_iter(float real, float imag, float creal, float cim } -static int julia_fragmenter(void *context, unsigned n_cpus, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment) -{ - julia_context_t *ctxt = context; - - return til_fb_fragment_slice_single(fragment, ctxt->n_cpus, number, res_fragment); -} - - /* Prepare a frame for concurrent drawing of fragment using multiple fragments */ static void julia_prepare_frame(void *context, unsigned ticks, unsigned n_cpus, til_fb_fragment_t *fragment, til_fragmenter_t *res_fragmenter) { julia_context_t *ctxt = context; - *res_fragmenter = julia_fragmenter; - ctxt->n_cpus = n_cpus; + *res_fragmenter = til_fragmenter_slice_per_cpu; ctxt->rr += .01; /* Rather than just sweeping creal,cimag from -2.0-+2.0, I try to keep things confined -- cgit v1.2.1