diff options
author | Chris Dyer <cdyer@Chriss-MacBook-Air.local> | 2013-01-19 19:09:48 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@Chriss-MacBook-Air.local> | 2013-01-19 19:09:48 -0500 |
commit | 8b9aae7cff1efd1be195cdd000b21546bd5fca04 (patch) | |
tree | d4dee7260f63b0c4d33c939c00dd197778965322 /klm/util/stream | |
parent | d884099e0db8b4510847ec106b59ef7dca3c245b (diff) |
updated version of boost.m4 and automatically build kenneth's LM builder
Diffstat (limited to 'klm/util/stream')
-rw-r--r-- | klm/util/stream/Makefile.am | 20 | ||||
-rw-r--r-- | klm/util/stream/sort.hh | 3 |
2 files changed, 22 insertions, 1 deletions
diff --git a/klm/util/stream/Makefile.am b/klm/util/stream/Makefile.am new file mode 100644 index 00000000..f18cbedb --- /dev/null +++ b/klm/util/stream/Makefile.am @@ -0,0 +1,20 @@ +noinst_LIBRARIES = libklm_util_stream.a + +libklm_util_stream_a_SOURCES = \ + block.hh \ + chain.cc \ + chain.hh \ + config.hh \ + io.cc \ + io.hh \ + line_input.cc \ + line_input.hh \ + multi_progress.cc \ + multi_progress.hh \ + sort.hh \ + stream.hh \ + timer.hh + +AM_CPPFLAGS = -W -Wall -I$(top_srcdir)/klm + +#-I$(top_srcdir)/klm/util/double-conversion diff --git a/klm/util/stream/sort.hh b/klm/util/stream/sort.hh index be6c11ea..df57fa41 100644 --- a/klm/util/stream/sort.hh +++ b/klm/util/stream/sort.hh @@ -259,7 +259,8 @@ template <class Compare, class Combine> class MergingReader { while (in_offsets_->RemainingBlocks()) { // Use bigger buffers if there's less remaining. - uint64_t per_buffer = std::max(buffer_size_, total_memory_ / in_offsets_->RemainingBlocks()); + uint64_t per_buffer = std::max(static_cast<uint64_t>(buffer_size_), + static_cast<uint64_t>(total_memory_ / in_offsets_->RemainingBlocks())); per_buffer -= per_buffer % entry_size; assert(per_buffer); |