-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathtpie_config.h
128 lines (98 loc) · 3.95 KB
/
tpie_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// -*- mode: c++; tab-width: 4; indent-tabs-mode: t; eval: (progn (c-set-style "stroustrup") (c-set-offset 'innamespace 0)); -*-
// vi:set ts=4 sts=4 sw=4 noet :
#ifndef _APP_CONFIG_H
#define _APP_CONFIG_H
// Get the configuration as set up by the TPIE configure script.
#include <tpie/config.h>
#include <tpie/portability.h>
// <><><><><><><><><><><><><><><><><><><><><><> //
// <><><><><><><> Developer use <><><><><><><> //
// <><><><><><><><><><><><><><><><><><><><><><> //
// <><><><><><><><><><><><><><><><><><><><><><> //
// <><><> Choose default BTE COLLECTION <><><> //
// <><><><><><><><><><><><><><><><><><><><><><> //
#if (!defined(BTE_COLLECTION_IMP_MMAP) && !defined(BTE_COLLECTION_IMP_UFS) && !defined(BTE_COLLECTION_IMP_USER_DEFINED))
// Define only one (default is BTE_COLLECTION_IMP_MMAP)
#define BTE_COLLECTION_IMP_MMAP
//#define BTE_COLLECTION_IMP_UFS
//#define BTE_COLLECTION_IMP_USER_DEFINED
#endif
// <><><><><><><><><><><><><><><><><><><><><><> //
// <><><><><><> Choose BTE STREAM <><><><><><> //
// <><><><><><><><><><><><><><><><><><><><><><> //
// Define only one (default is BTE_STREAM_IMP_UFS)
#define BTE_STREAM_IMP_UFS
//#define BTE_STREAM_IMP_MMAP
//#define BTE_STREAM_IMP_STDIO
//#define BTE_STREAM_IMP_USER_DEFINED
// <><><><><><><><><><><><><><><><><><><><><><><><> //
// <> BTE_COLLECTION_MMAP configuration options <> //
// <><><><><><><><><><><><><><><><><><><><><><><><> //
// Define write behavior.
// Allowed values:
// 0 (synchronous writes)
// 1 (asynchronous writes using MS_ASYNC - see msync(2))
// 2 (asynchronous bulk writes) [default]
#ifndef BTE_COLLECTION_MMAP_LAZY_WRITE
#define BTE_COLLECTION_MMAP_LAZY_WRITE 2
#endif
// <><><><><><><><><><><><><><><><><><><><><><><><> //
// <> BTE_COLLECTION_UFS configuration options <> //
// <><><><><><><><><><><><><><><><><><><><><><><><> //
// <><><><><><><><><><><><><><><><><><><><><><><><> //
// <><> BTE_STREAM_MMAP configuration options <><> //
// <><><><><><><><><><><><><><><><><><><><><><><><> //
#ifdef BTE_STREAM_IMP_MMAP
// Define logical blocksize factor (default is 32)
#ifndef BTE_STREAM_MMAP_BLOCK_FACTOR
#ifdef _WIN32
#define BTE_STREAM_MMAP_BLOCK_FACTOR 4
#else
#define BTE_STREAM_MMAP_BLOCK_FACTOR 32
#endif
#endif
// Enable/disable TPIE read ahead; default is enabled (set to 1)
#define BTE_STREAM_MMAP_READ_AHEAD 1
// read ahead method, ignored unless BTE_STREAM_MMAP_READ_AHEAD is set
// to 1; if USE_LIBAIO is enabled, use asynchronous IO read ahead;
// otherwise use use mmap-based read ahead; default is mmap-based read
// ahead (USE_LIBAIO not defined)
//#define USE_LIBAIO
#endif
// <><><><><><><><><><><><><><><><><><><><><><><><> //
// <><> BTE_STREAM_UFS configuration options <><><> //
// <><><><><><><><><><><><><><><><><><><><><><><><> //
#ifdef BTE_STREAM_IMP_UFS
// Define logical blocksize factor (default is 32)
#ifndef STREAM_UFS_BLOCK_FACTOR
#ifdef WIN32
//the block size on windows is larger than on linux,
#define STREAM_UFS_BLOCK_FACTOR 32
#else
#define STREAM_UFS_BLOCK_FACTOR 512
#endif
#endif
// Enable/disable TPIE read ahead; default is disabled (set to 0)
#define BTE_STREAM_UFS_READ_AHEAD 0
// read ahead method, ignored unless BTE_STREAM_UFS_READ_AHEAD is set
// to 1; if USE_LIBAIO is set to 1, use asynchronous IO read ahead;
// otherwise no TPIE read ahead is done; default is disabled (set to 0)
#define USE_LIBAIO 0
#endif
// <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> //
// logging and assertions; //
// this should NOT be modified by user!!! //
// in order to enable/disable library/application logging, //
// run tpie configure script with appropriate options //
// <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> //
// Use logs if requested.
#if TP_LOG_APPS
#define TPL_LOGGING 1
#endif
#include <tpie/tpie_log.h>
// Enable assertions if requested.
#if TP_ASSERT_APPS
#define DEBUG_ASSERTIONS 1
#endif
#include <tpie/tpie_assert.h>
#endif