Stxxl
1.3.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
containers
app_config.h
1
//
2
// File: app_config.h
3
// Authors: Darren Erik Vengroff
4
// Octavian Procopiuc <
[email protected]
>
5
//
6
// Created: 10/6/94
7
//
8
// $Id: app_config.h,v 1.36 2004/08/17 16:49:16 jan Exp $
9
//
10
#ifndef _APP_CONFIG_H
11
#define _APP_CONFIG_H
12
13
// Get the configuration as set up by the TPIE configure script.
14
#include <config.h>
15
16
// <><><><><><><><><><><><><><><><><><><><><><> //
17
// <><><><><><><> Developer use <><><><><><><> //
18
// <><><><><><><><><><><><><><><><><><><><><><> //
19
20
#define USE_LIBAIO 0
21
22
// Set up some defaults for the test applications
23
24
#include <portability.h>
25
#include <sys/types.h>
// for size_t
26
#include <stdlib.h>
// for random()
27
28
#define DEFAULT_TEST_SIZE (20000000)
29
#define DEFAULT_RANDOM_SEED 17
30
#define DEFAULT_TEST_MM_SIZE (1024 * 1024 * 32)
31
32
extern
bool
verbose;
33
extern
TPIE_OS_SIZE_T test_mm_size;
34
extern
TPIE_OS_OFFSET test_size;
35
extern
int
random_seed;
36
37
38
// <><><><><><><><><><><><><><><><><><><><><><> //
39
// <><><> Choose default BTE COLLECTION <><><> //
40
// <><><><><><><><><><><><><><><><><><><><><><> //
41
42
#if (!defined (BTE_COLLECTION_IMP_MMAP) && !defined (BTE_COLLECTION_IMP_UFS) && !defined (BTE_COLLECTION_IMP_USER_DEFINED))
43
// Define only one (default is BTE_COLLECTION_IMP_MMAP)
44
#define BTE_COLLECTION_IMP_MMAP
45
//#define BTE_COLLECTION_IMP_UFS
46
//#define BTE_COLLECTION_IMP_USER_DEFINED
47
#endif
48
49
// <><><><><><><><><><><><><><><><><><><><><><> //
50
// <><><><><><> Choose BTE STREAM <><><><><><> //
51
// <><><><><><><><><><><><><><><><><><><><><><> //
52
53
// Define only one (default is BTE_STREAM_IMP_UFS)
54
#define BTE_STREAM_IMP_UFS
55
//#define BTE_STREAM_IMP_MMAP
56
//#define BTE_STREAM_IMP_STDIO
57
//#define BTE_STREAM_IMP_USER_DEFINED
58
59
60
// <><><><><><><><><><><><><><><><><><><><><><><><> //
61
// <> BTE_COLLECTION_MMAP configuration options <> //
62
// <><><><><><><><><><><><><><><><><><><><><><><><> //
63
64
// Define write behavior.
65
// Allowed values:
66
// 0 (synchronous writes)
67
// 1 (asynchronous writes using MS_ASYNC - see msync(2))
68
// 2 (asynchronous bulk writes) [default]
69
#ifndef BTE_COLLECTION_MMAP_LAZY_WRITE
70
#define BTE_COLLECTION_MMAP_LAZY_WRITE 2
71
#endif
72
73
// <><><><><><><><><><><><><><><><><><><><><><><><> //
74
// <> BTE_COLLECTION_UFS configuration options <> //
75
// <><><><><><><><><><><><><><><><><><><><><><><><> //
76
77
78
// <><><><><><><><><><><><><><><><><><><><><><><><> //
79
// <><> BTE_STREAM_MMAP configuration options <><> //
80
// <><><><><><><><><><><><><><><><><><><><><><><><> //
81
82
#ifdef BTE_STREAM_IMP_MMAP
83
// Define logical blocksize factor (default is 32)
84
#ifndef BTE_STREAM_MMAP_BLOCK_FACTOR
85
#ifdef _WIN32
86
#define BTE_STREAM_MMAP_BLOCK_FACTOR 4
87
#else
88
#define BTE_STREAM_MMAP_BLOCK_FACTOR 512
89
#endif
90
#endif
91
92
// Enable/disable TPIE read ahead; default is enabled (set to 1)
93
//#define BTE_STREAM_MMAP_READ_AHEAD 1
94
95
// read ahead method, ignored unless BTE_STREAM_MMAP_READ_AHEAD is set
96
// to 1; if USE_LIBAIO is enabled, use asynchronous IO read ahead;
97
// otherwise use use mmap-based read ahead; default is mmap-based read
98
// ahead (USE_LIBAIO not defined)
99
100
//#define USE_LIBAIO
101
#endif
102
103
104
// <><><><><><><><><><><><><><><><><><><><><><><><> //
105
// <><> BTE_STREAM_UFS configuration options <><><> //
106
// <><><><><><><><><><><><><><><><><><><><><><><><> //
107
108
#ifdef BTE_STREAM_IMP_UFS
109
// Define logical blocksize factor (default is 32)
110
#ifndef BTE_STREAM_UFS_BLOCK_FACTOR
111
#ifdef _WIN32
112
#define BTE_STREAM_UFS_BLOCK_FACTOR 4
113
#else
114
#define BTE_STREAM_UFS_BLOCK_FACTOR 512
115
#endif
116
#endif
117
118
// Enable/disable TPIE read ahead; default is disabled (set to 0)
119
#define BTE_STREAM_UFS_READ_AHEAD 0
120
// read ahead method, ignored unless BTE_STREAM_UFS_READ_AHEAD is set
121
// to 1; if USE_LIBAIO is set to 1, use asynchronous IO read ahead;
122
// otherwise no TPIE read ahead is done; default is disabled (set to 0)
123
#define USE_LIBAIO 0
124
#endif
125
126
127
// <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> //
128
// logging and assertions; //
129
// this should NOT be modified by user!!! //
130
// in order to enable/disable library/application logging, //
131
// run tpie configure script with appropriate options //
132
// <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> //
133
134
// Use logs if requested.
135
#if TP_LOG_APPS
136
#define TPL_LOGGING 1
137
#endif
138
139
#include <tpie_log.h>
140
141
// Enable assertions if requested.
142
#if TP_ASSERT_APPS
143
#define DEBUG_ASSERTIONS 1
144
#endif
145
146
#include <tpie_assert.h>
147
148
#endif
Generated by
1.8.5