STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tuning.h
Go to the documentation of this file.
1 /***************************************************************************
2  * include/stxxl/bits/containers/hash_map/tuning.h
3  *
4  * Part of the STXXL. See http://stxxl.sourceforge.net
5  *
6  * Copyright (C) 2007 Markus Westphal <[email protected]>
7  *
8  * Distributed under the Boost Software License, Version 1.0.
9  * (See accompanying file LICENSE_1_0.txt or copy at
10  * http://www.boost.org/LICENSE_1_0.txt)
11  **************************************************************************/
12 
13 #ifndef STXXL_CONTAINERS_HASH_MAP_TUNING_HEADER
14 #define STXXL_CONTAINERS_HASH_MAP_TUNING_HEADER
15 #define _STXXL_TUNING_H_
16 
17 #include <stxxl/mng>
18 #include <stxxl/bits/singleton.h>
19 
21 
22 namespace hash_map {
23 
24 //! Tuning parameters for external memory hash map.
25 class tuning : public singleton<tuning>
26 {
27  friend class singleton<tuning>;
28 
29 public:
30  //! see buffered_reader
32  //! see buffered_reader
34  //! see block_cache and hash_map
36 
37 private:
38  /*! set reasonable default values for tuning params */
40  : prefetch_page_size(config::get_instance()->disks_number() * 2),
41  prefetch_pages(2),
42  blockcache_size(config::get_instance()->disks_number() * 12)
43  { }
44 };
45 
46 } // namespace hash_map
47 
49 
50 #endif // !STXXL_CONTAINERS_HASH_MAP_TUNING_HEADER
size_t prefetch_pages
see buffered_reader
Definition: tuning.h:33
tuning()
set reasonable default values for tuning params
Definition: tuning.h:39
Tuning parameters for external memory hash map.
Definition: tuning.h:25
size_t blockcache_size
see block_cache and hash_map
Definition: tuning.h:35
#define STXXL_BEGIN_NAMESPACE
Definition: namespace.h:16
Access point to disks properties. Since 1.4.0: no config files are read automatically! ...
Definition: config.h:112
size_t prefetch_page_size
see buffered_reader
Definition: tuning.h:31
#define STXXL_END_NAMESPACE
Definition: namespace.h:17