summaryrefslogtreecommitdiff
path: root/klm
diff options
context:
space:
mode:
authorChris Dyer <cdyer@Chriss-MacBook-Air.local>2013-01-19 19:09:48 -0500
committerChris Dyer <cdyer@Chriss-MacBook-Air.local>2013-01-19 19:09:48 -0500
commit9e36263f64d6f5150f1b552dd77bde971d605376 (patch)
tree496e24de9cec6193aed1c54a312e2693fd9e1901 /klm
parent0b9031042500d45a098762f0a930bd6a66a58fac (diff)
updated version of boost.m4 and automatically build kenneth's LM builder
Diffstat (limited to 'klm')
-rw-r--r--klm/lm/builder/Makefile.am28
-rw-r--r--klm/util/Makefile.am2
-rw-r--r--klm/util/double-conversion/Makefile.am2
-rw-r--r--klm/util/stream/Makefile.am20
-rw-r--r--klm/util/stream/sort.hh3
5 files changed, 52 insertions, 3 deletions
diff --git a/klm/lm/builder/Makefile.am b/klm/lm/builder/Makefile.am
new file mode 100644
index 00000000..00444256
--- /dev/null
+++ b/klm/lm/builder/Makefile.am
@@ -0,0 +1,28 @@
+bin_PROGRAMS = builder
+
+builder_SOURCES = \
+ main.cc \
+ adjust_counts.cc \
+ adjust_counts.hh \
+ corpus_count.cc \
+ corpus_count.hh \
+ discount.hh \
+ header_info.hh \
+ initial_probabilities.cc \
+ initial_probabilities.hh \
+ interpolate.cc \
+ interpolate.hh \
+ joint_order.hh \
+ multi_stream.hh \
+ ngram.hh \
+ ngram_stream.hh \
+ pipeline.cc \
+ pipeline.hh \
+ print.cc \
+ print.hh \
+ sort.hh
+
+builder_LDADD = ../libklm.a ../../util/double-conversion/libklm_util_double.a ../../util/stream/libklm_util_stream.a ../../util/libklm_util.a $(BOOST_TIMER_LIBS) $(BOOST_CHRONO_LIBS) $(BOOST_THREAD_LIBS)
+
+AM_CPPFLAGS = -W -Wall -I$(top_srcdir)/klm
+
diff --git a/klm/util/Makefile.am b/klm/util/Makefile.am
index 294ebc0a..248cc844 100644
--- a/klm/util/Makefile.am
+++ b/klm/util/Makefile.am
@@ -54,4 +54,4 @@ libklm_util_a_SOURCES = \
string_piece.cc \
usage.cc
-AM_CPPFLAGS = -W -Wall -Wno-sign-compare -I$(top_srcdir)/klm -I$(top_srcdir)/klm/util/double-conversion
+AM_CPPFLAGS = -W -Wall -I$(top_srcdir)/klm -I$(top_srcdir)/klm/util/double-conversion
diff --git a/klm/util/double-conversion/Makefile.am b/klm/util/double-conversion/Makefile.am
index eb6616f7..dfcfb009 100644
--- a/klm/util/double-conversion/Makefile.am
+++ b/klm/util/double-conversion/Makefile.am
@@ -20,4 +20,4 @@ libklm_util_double_a_SOURCES = \
fixed-dtoa.cc \
strtod.cc
-AM_CPPFLAGS = -W -Wall -Wno-sign-compare -I$(top_srcdir)/klm -I$(top_srcdir)/klm/util/double-conversion
+AM_CPPFLAGS = -W -Wall -I$(top_srcdir)/klm -I$(top_srcdir)/klm/util/double-conversion
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);