diff options
author | Patrick Simianer <p@simianer.de> | 2013-01-21 12:29:43 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2013-01-21 12:29:43 +0100 |
commit | 50f22047eb1b7f2d60e85cdcf0fcd86342e50523 (patch) | |
tree | 730dabaf2fa57b1e4536d40f036b46795d37f289 /klm/util/stream/config.hh | |
parent | 8b399cb09513cd79ed4182be9f75882c1e1b336a (diff) | |
parent | 608886384da40aedfabd629c882b8ea9b3f6348e (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'klm/util/stream/config.hh')
-rw-r--r-- | klm/util/stream/config.hh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/klm/util/stream/config.hh b/klm/util/stream/config.hh new file mode 100644 index 00000000..1eeb3a8a --- /dev/null +++ b/klm/util/stream/config.hh @@ -0,0 +1,32 @@ +#ifndef UTIL_STREAM_CONFIG__ +#define UTIL_STREAM_CONFIG__ + +#include <cstddef> +#include <string> + +namespace util { namespace stream { + +struct ChainConfig { + ChainConfig() {} + + ChainConfig(std::size_t in_entry_size, std::size_t in_block_count, std::size_t in_total_memory) + : entry_size(in_entry_size), block_count(in_block_count), total_memory(in_total_memory) {} + + std::size_t entry_size; + std::size_t block_count; + // Chain's constructor will make this a multiple of entry_size. + std::size_t total_memory; +}; + +struct SortConfig { + std::string temp_prefix; + + // Size of each input/output buffer. + std::size_t buffer_size; + + // Total memory to use when running alone. + std::size_t total_memory; +}; + +}} // namespaces +#endif // UTIL_STREAM_CONFIG__ |