2 #include "libbenchmark_benchmarkinstance_internal.h"
8 /****************************************************************************/
9 void libbenchmark_benchmarkinstance_init( struct libbenchmark_benchmarkinstance_state *bs,
10 enum libbenchmark_datastructure_id datastructure_id,
11 enum libbenchmark_benchmark_id benchmark_id,
12 enum libbenchmark_lock_id lock_id,
13 struct libbenchmark_topology_state *ts,
14 void (*init_function)( struct libbenchmark_topology_state *ts,
15 struct lfds710_list_aso_state *logical_processor_set,
16 struct libshared_memory_state *ms,
17 enum libbenchmark_topology_numa_mode numa_node,
18 struct libbenchmark_threadset_state *tsets ),
19 void (*cleanup_function)( struct lfds710_list_aso_state *logical_processor_set,
20 enum libbenchmark_topology_numa_mode numa_node,
21 struct libbenchmark_results_state *rs,
22 struct libbenchmark_threadset_state *tsets ) )
24 LFDS710_PAL_ASSERT( bs != NULL );
25 // TRD : datastructure_id can be any value in its range
26 // TRD : benchmark_id can be any value in its range
27 // TRD : lock_id can be any value in its range
28 LFDS710_PAL_ASSERT( ts != NULL );
29 LFDS710_PAL_ASSERT( init_function != NULL );
30 LFDS710_PAL_ASSERT( cleanup_function != NULL );
32 bs->datastructure_id = datastructure_id;
33 bs->benchmark_id = benchmark_id;
34 bs->lock_id = lock_id;
36 bs->init_function = init_function;
37 bs->cleanup_function = cleanup_function;