]> pd.if.org Git - liblfds/blob - liblfds/liblfds7.1.0/test_and_benchmark/libbenchmark/inc/libbenchmark/libbenchmark_benchmarkinstance.h
Initial import (all versions, including the new 7.1.0)
[liblfds] / liblfds / liblfds7.1.0 / test_and_benchmark / libbenchmark / inc / libbenchmark / libbenchmark_benchmarkinstance.h
1 /***** enums *****/
2
3 /***** structs *****/
4 struct libbenchmark_benchmarkinstance_state
5 {
6   enum flag
7     numa_awareness_flag;
8
9   enum libbenchmark_datastructure_id
10     datastructure_id;
11
12   enum libbenchmark_benchmark_id
13     benchmark_id;
14
15   enum libbenchmark_lock_id
16     lock_id;
17
18   struct libbenchmark_threadset_state
19     tsets;
20
21   struct libbenchmark_topology_state
22     *ts;
23
24   struct lfds710_list_asu_element
25     lasue;
26
27   void
28     (*init_function)( struct libbenchmark_topology_state *ts,
29                       struct lfds710_list_aso_state *logical_processor_set,
30                       struct libshared_memory_state *ms,
31                       enum libbenchmark_topology_numa_mode numa_node,
32                       struct libbenchmark_threadset_state *tsets ),
33     (*cleanup_function)( struct lfds710_list_aso_state *logical_processor_set,
34                          enum libbenchmark_topology_numa_mode numa_node,
35                          struct libbenchmark_results_state *rs,
36                          struct libbenchmark_threadset_state *tsets );
37 };
38
39 /***** public prototypes *****/
40 void libbenchmark_benchmarkinstance_init( struct libbenchmark_benchmarkinstance_state *bs,
41                                           enum libbenchmark_datastructure_id datastructure_id,
42                                           enum libbenchmark_benchmark_id benchmark_id,
43                                           enum libbenchmark_lock_id lock_id,
44                                           struct libbenchmark_topology_state *ts,
45                                           void (*init_function)( struct libbenchmark_topology_state *ts,
46                                                                  struct lfds710_list_aso_state *logical_processor_set,
47                                                                  struct libshared_memory_state *ms,
48                                                                  enum libbenchmark_topology_numa_mode numa_node,
49                                                                  struct libbenchmark_threadset_state *tsets ),
50                                           void (*cleanup_function)( struct lfds710_list_aso_state *logical_processor_set,
51                                                                     enum libbenchmark_topology_numa_mode numa_node,
52                                                                     struct libbenchmark_results_state *rs,
53                                                                     struct libbenchmark_threadset_state *tsets ) );
54
55 void libbenchmark_benchmarkinstance_cleanup( struct libbenchmark_benchmarkinstance_state *bs );
56
57 void libbenchmark_benchmarkinstance_run( struct libbenchmark_benchmarkinstance_state *bs,
58                                          struct lfds710_list_aso_state *lpset,
59                                          enum libbenchmark_topology_numa_mode numa_mode,
60                                          struct libshared_memory_state *ms,
61                                          struct libbenchmark_results_state *rs );
62