]> pd.if.org Git - liblfds/blob - liblfds/liblfds7.1.0/test_and_benchmark/benchmark/src/internal.h
Initial import (all versions, including the new 7.1.0)
[liblfds] / liblfds / liblfds7.1.0 / test_and_benchmark / benchmark / src / internal.h
1 /***** includes *****/
2 #include "porting_abstraction_layer.h"
3 #include "porting_abstraction_layer_operating_system.h"
4 #include <assert.h>
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include "../../../liblfds710/inc/liblfds710.h"
8 #include "../../libbenchmark/inc/libbenchmark.h"
9 #include "util_cmdline.h"
10
11 /***** defines *****/
12 #define and &&
13 #define or  ||
14
15 #define BITS_PER_BYTE 8
16
17 #define NO_FLAGS 0x0
18
19 #define BENCHMARK_VERSION_STRING   "7.1.0"
20 #define BENCHMARK_VERSION_INTEGER  710
21
22 #if( defined KERNEL_MODE )
23   #define MODE_TYPE_STRING "kernel-mode"
24 #endif
25
26 #if( !defined KERNEL_MODE )
27   #define MODE_TYPE_STRING "user-mode"
28 #endif
29
30 #if( defined NDEBUG && !defined COVERAGE && !defined TSAN && !defined PROF )
31   #define BUILD_TYPE_STRING "release"
32 #endif
33
34 #if( !defined NDEBUG && !defined COVERAGE && !defined TSAN && !defined PROF )
35   #define BUILD_TYPE_STRING "debug"
36 #endif
37
38 #if( !defined NDEBUG && defined COVERAGE && !defined TSAN && !defined PROF )
39   #define BUILD_TYPE_STRING "coverage"
40 #endif
41
42 #if( !defined NDEBUG && !defined COVERAGE && defined TSAN && !defined PROF )
43   #define BUILD_TYPE_STRING "threadsanitizer"
44 #endif
45
46 #if( !defined NDEBUG && !defined COVERAGE && !defined TSAN && defined PROF )
47   #define BUILD_TYPE_STRING "profiling"
48 #endif
49
50 #define ONE_KILOBYTES_IN_BYTES                 1024
51 #define ONE_MEGABYTE_IN_BYTES                  (ONE_KILOBYTES_IN_BYTES * 1024)
52 #define BENCHMARK_DEFAULT_MEMORY_IN_MEGABYTES  64
53
54 /***** enums *****/
55
56 /***** structs *****/
57
58 /***** externs *****/
59
60 /***** prototypes *****/
61 int main( int argc, char **argv );
62 void internal_show_version( void );
63 void callback_stdout( char *string );
64
65 void *benchmark_pal_numa_malloc( lfds710_pal_uint_t numa_node_id, lfds710_pal_uint_t size_in_bytes );
66 void benchmark_pal_numa_free( void *memory, lfds710_pal_uint_t size_in_bytes );
67