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/snow/snow.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/modules/snow') diff --git a/src/modules/snow/snow.c b/src/modules/snow/snow.c index 685d1bc..dc49a1a 100644 --- a/src/modules/snow/snow.c +++ b/src/modules/snow/snow.c @@ -15,7 +15,7 @@ typedef union snow_seed_t { } snow_seed_t; typedef struct snow_context_t { - unsigned n_cpus; + unsigned unused; snow_seed_t seeds[]; } snow_context_t; @@ -31,8 +31,6 @@ static void * snow_create_context(unsigned ticks, unsigned n_cpus, til_setup_t * for (unsigned i = 0; i < n_cpus; i++) ctxt->seeds[i].seed = rand(); - ctxt->n_cpus = n_cpus; - return ctxt; } @@ -43,17 +41,9 @@ static void snow_destroy_context(void *context) } -static int snow_fragmenter(void *context, unsigned n_cpus, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment) -{ - snow_context_t *ctxt = context; - - return til_fb_fragment_slice_single(fragment, ctxt->n_cpus, number, res_fragment); -} - - static void snow_prepare_frame(void *context, unsigned ticks, unsigned n_cpus, til_fb_fragment_t *fragment, til_fragmenter_t *res_fragmenter) { - *res_fragmenter = snow_fragmenter; + *res_fragmenter = til_fragmenter_slice_per_cpu; } -- cgit v1.2.1