TPIE

v1.1rc1-6-g0c97303
sort_parameters.h
1 // -*- mode: c++; tab-width: 4; indent-tabs-mode: t; eval: (progn (c-set-style "stroustrup") (c-set-offset 'innamespace 0)); -*-
2 // vi:set ts=4 sts=4 sw=4 noet :
3 // Copyright 2012, The TPIE development team
4 //
5 // This file is part of TPIE.
6 //
7 // TPIE is free software: you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License as published by the
9 // Free Software Foundation, either version 3 of the License, or (at your
10 // option) any later version.
11 //
12 // TPIE is distributed in the hope that it will be useful, but WITHOUT ANY
13 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 // License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with TPIE. If not, see <http://www.gnu.org/licenses/>
19 
20 #ifndef __TPIE_PIPELINING_SORT_PARAMETERS_H__
21 #define __TPIE_PIPELINING_SORT_PARAMETERS_H__
22 
23 namespace tpie {
24 
27  memory_size_type memoryPhase1;
29  memory_size_type memoryPhase2;
31  memory_size_type memoryPhase3;
36  stream_size_type runLength;
40  stream_size_type internalReportThreshold;
42  memory_size_type fanout;
44  memory_size_type finalFanout;
45 
46  void dump(std::ostream & out) const {
47  out << "Merge sort parameters\n"
48  << "Phase 1 memory: " << memoryPhase1 << '\n'
49  << "Run length: " << runLength << '\n'
50  << "Phase 2 memory: " << memoryPhase2 << '\n'
51  << "Fanout: " << fanout << '\n'
52  << "Phase 3 memory: " << memoryPhase3 << '\n'
53  << "Final merge level fanout: " << finalFanout << '\n'
54  << "Internal report threshold: " << internalReportThreshold << '\n';
55  }
56 };
57 
58 } // namespace tpie
59 
60 #endif // __TPIE_PIPELINING_SORT_PARAMETERS_H__
stream_size_type internalReportThreshold
Maximum item count for internal reporting, subject to memory restrictions in all phases.
memory_size_type memoryPhase3
Memory available during output phase.
memory_size_type finalFanout
Fanout of merge tree during phase 4.
memory_size_type memoryPhase2
Memory available while merging runs.
stream_size_type runLength
Run length, subject to memory restrictions during phase 2.
memory_size_type fanout
Fanout of merge tree during phase 3.
memory_size_type memoryPhase1
Memory available while forming sorted runs.