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