Hieu Hoang
8cc5712808
abort -> throw
2024-02-22 12:09:02 -08:00
Kenneth Heafield
ea8e19f286
KenLM a590a3a4dadf516a1cff28c8f1c06aa89766f519 including StringStream
...
TODO: kill istream
2015-09-29 16:58:02 +01:00
Kenneth Heafield
09ecd071f9
KenLM 2a3e8fae3633c890cb3b342d461f9130c8e343fa excluding unfinished interpolation directory
2015-08-27 10:55:52 +01:00
Jeroen Vermeulen
924710f53e
On MinGW use Windows _chsize_t, not ftruncate.
...
This works around a problem when building against MinGW and then running
the resulting Windows binary on WINE. (Perverse, I know.) For some
reason the ftruncate() to 0 bytes succeeds, but the subsequent one to a
larger size fails. Even if the size is just 1 byte.
This happened where GenericModel::InitializeFromARPA called
BinaryFormat::SetupJustVocab, which called MapZeroedWrite, which calls
ResizeOrThrow twice; the second one failed.
2015-06-12 15:11:57 +07:00
Jeroen Vermeulen
88e90957a1
Modernize "C" includes in util.
...
This is one of those little chores in managing a long-lived C++
project: standard C headers like stdio.h and math.h now have their own
place in the C++ standard as resp. cstdio, cmath, and so on. In this
branch the #include names are updated for the util/ subdirectory; more
branches to follow.
C++11 adds cstdint, but to support compilation with the previous
standard, that change is left for later.
2015-03-28 19:37:48 +07:00
Kenneth Heafield
36da8d1e0c
KenLM 370f97fa549f02e162a3a0f17bf3ad6cce2c3813
2014-10-08 08:42:53 -04:00
Kenneth Heafield
dd03f9fb69
KenLM 5a7efd8fe1db88ee0a9f7e9479b24ac3ca348221 with Hieu's patch to exception.hh
2014-06-02 10:29:40 -07:00
Kenneth Heafield
14e02978fc
KenLM 5cc905bc2d214efa7de2db56a9a672b749a95591
...
Avoid unspecified behavior of mmap when a file is resized reported by Christian Hardmeier
Fixes for Mavericks and a workaround for Boost's broken semaphore
Clean clang compile (of kenlm)
Merged some of 744376b3fb
but also undid some of it because it was just masking a fundaemntal problem with pread rather than working around windows limitations
2014-01-27 16:51:35 -08:00
jiejiang
744376b3fb
moses windows build, with some TODO list
2013-12-18 20:15:39 +00:00
Kenneth Heafield
794867c555
KenLM 6b4a1c7940a36026de1d96693ccb6ec0f16de8dc
2013-06-24 16:05:47 +01:00
Kenneth Heafield
627f3f908c
OS X returns EINVAL for write > 2^31
2013-03-31 15:58:34 +01:00
Kenneth Heafield
e2fc306231
KenLM 58da33: compiler warnings, correctly handle bare K, kill HAVE_BOOST
2013-01-22 20:23:35 +00:00
Kenneth Heafield
fc5868d0ff
KenLM df5be22 lmplz for estimation
2013-01-18 15:59:51 +00:00
Kenneth Heafield
a7731ce432
KenLM 014bced6
2013-01-17 11:58:58 +00:00
Kenneth Heafield
2e5c1af5da
Also ftruncate64 on android
2013-01-10 13:45:41 +00:00
Kenneth Heafield
f8b2b49afa
Stupid android 64-bit file offsets, static assert sizeof(off_t) == 8
2013-01-10 13:32:17 +00:00
Kenneth Heafield
366ca8afff
Remove if that doesn't do anything, define _FILE_OFFSET_BITS 64
2013-01-07 17:38:04 +00:00
Hieu Hoang
506cb8e9d1
change lseek64() to lseek() and off64_t to off_t. Cygwin doesn't have those functions/types. They should be 64-bit if _FILE_OFFSET_BITS == 64 is set
2013-01-07 14:14:39 +00:00
Kenneth Heafield
ad209c8944
Collapse lseek macro
2013-01-04 22:42:32 +00:00
Hieu Hoang
77a3f32445
mac doesn't have lseek64()
2013-01-04 22:32:48 +00:00
Kenneth Heafield
f9ee7ae4b3
KenLM 0e5d259 including read_compressed fix
2013-01-04 21:02:47 +00:00
Kenneth Heafield
14392acc8f
KenLM 36b746 including -w mmap <unk> offset fix
2012-11-04 15:36:42 -05:00
Kenneth Heafield
4b98b0937c
Add bzip and xz input for FilePiece KenLM 06f78db2
2012-10-30 19:33:22 +00:00
Kenneth Heafield
8a83deeff6
Windows _read and _write int limits / Cong Duy Vu Hoang
2012-10-26 17:11:43 +01:00
Kenneth Heafield
f88df8fdcd
Windows
2012-10-25 13:01:36 +01:00
Kenneth Heafield
0eb98df0fe
Submodules are evil. Undo it.
2012-10-15 13:58:33 +01:00
Kenneth Heafield
4faab6c68f
Extract kenlm into a submodule, referencing lazy
2012-09-24 18:30:51 +01:00
Kenneth Heafield
2842ac71e7
Fix temporary file handling
2012-08-08 10:14:47 -04:00
Kenneth Heafield
cba50df899
Maybe if I make TempMaker provide the file name, people will stop using tmpnam.
2012-08-06 14:35:24 -04:00
Kenneth Heafield
f6b3354f39
unistd.h for gcc 4.7.0
2012-06-28 09:20:34 -04:00
Kenneth Heafield
175b7aaf49
KenLM c1dba12
...
- Reject NaNs
- Fix ChartState hashing (unused in Moses)
- Expose CreateOrThrow
- Minor portability improvement in getopt
2012-03-11 13:47:38 -04:00
Kenneth Heafield
e48de47c23
KenLM 98814b2 including faster malloc-backed building and portability improvements
2012-02-28 13:58:00 -05:00
Kenneth Heafield
974a708ddd
Updated kenlm 96ef3f2c11.
...
Invalidates old gcc and 32-bit formats, replacing these with one consistent format: 64-bit new gcc. Backwards compatible with these files.
2011-11-17 19:12:19 +00:00
Kenneth Heafield
72a4c8a0d3
Move kenlm up one level, simplify compilation
2011-11-17 12:49:55 +00:00