From 696f28e5296c3b39eac56eed4d20560bf06cba38 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Mon, 2 Oct 2023 22:34:26 -0700 Subject: til: introduce til_value_to_pos() helper This copies from checkers_value_to_pos() turning it into a libtil helper. It's a common operation in setup_funcs to map a setting value to a numeric position in the list of values. --- src/til.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/til.h') diff --git a/src/til.h b/src/til.h index 9fb8b5b..9049a0b 100644 --- a/src/til.h +++ b/src/til.h @@ -58,5 +58,6 @@ int til_fragmenter_noop_per_cpu(til_module_context_t *context, const til_fb_frag int til_fragmenter_slice_per_cpu(til_module_context_t *context, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment); int til_fragmenter_slice_per_cpu_x16(til_module_context_t *context, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment); int til_fragmenter_tile64(til_module_context_t *context, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment); +int til_value_to_pos(const char **options, const char *value, unsigned *res_pos); #endif -- cgit v1.2.1