]> pd.if.org Git - liblfds/blob - liblfds/liblfds7.1.0/test_and_benchmark/libbenchmark/src/libbenchmark_topology/libbenchmark_topology_compare.c
Initial import (all versions, including the new 7.1.0)
[liblfds] / liblfds / liblfds7.1.0 / test_and_benchmark / libbenchmark / src / libbenchmark_topology / libbenchmark_topology_compare.c
1 /***** includes *****/
2 #include "libbenchmark_topology_internal.h"
3
4
5
6
7
8 /****************************************************************************/
9 int libbenchmark_topology_compare_lp_printing_offsets_function( void const *new_key, void const *existing_key )
10 {
11   int
12     cr;
13
14   struct libbenchmark_topology_lp_printing_offset
15     *tlpo_one,
16     *tlpo_two;
17
18   LFDS710_PAL_ASSERT( new_key != NULL );
19   LFDS710_PAL_ASSERT( existing_key != NULL );
20
21   tlpo_one = (struct libbenchmark_topology_lp_printing_offset *) new_key;
22   tlpo_two = (struct libbenchmark_topology_lp_printing_offset *) existing_key;
23
24   cr = libbenchmark_topology_node_compare_nodes_function( &tlpo_one->tns, &tlpo_two->tns );
25
26   return cr;
27 }
28
29
30
31
32
33 /****************************************************************************/
34 int libbenchmark_topology_compare_node_against_lp_printing_offset_function( void const *new_key, void const *existing_key )
35 {
36   int
37     cr;
38
39   struct libbenchmark_topology_node_state
40     *tns;
41
42   struct libbenchmark_topology_lp_printing_offset
43     *tlpo;
44
45   LFDS710_PAL_ASSERT( new_key != NULL );
46   LFDS710_PAL_ASSERT( existing_key != NULL );
47
48   tns = (struct libbenchmark_topology_node_state *) new_key;
49   tlpo = (struct libbenchmark_topology_lp_printing_offset *) existing_key;
50
51   cr = libbenchmark_topology_node_compare_nodes_function( tns, &tlpo->tns );
52
53   return cr;
54 }
55