Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2016-04-12Merge ../mosesdecoder into perf_moses2Hieu Hoang
2016-04-10compile error on old linux machines (Redhat 6.2)Hieu Hoang
2016-01-25Merge ../mosesdecoder into perf_moses2Hieu Hoang
2016-01-22Flush before seekKenneth Heafield
2016-01-13Merge ../mosesdecoder into perf_moses2Hieu Hoang
2016-01-13Undo damage to JamfileKenneth Heafield
2016-01-13KenLM e06ec4dc59f765482d7545b3cb797b8fc128ab9fKenneth Heafield
2015-12-22fix tokenizationHieu Hoang
2015-10-29roll back util/pool.hh. Not using it anymoreHieu Hoang
2015-10-25init moses2Hieu Hoang
2015-10-24init moses2Hieu Hoang
2015-10-23allocate size of class temlate fnHieu Hoang
2015-10-23init moses2Hieu Hoang
2015-10-16unit test error. Change in StringStream constructorHieu Hoang
2015-10-16make util::StringStream more like std::stringstreamHieu Hoang
2015-10-16make util::StringStream more like std::stringstreamHieu Hoang
2015-10-16use util::StringStreamHieu Hoang
2015-10-02Change integer handling to coercion by defaultKenneth Heafield
2015-10-02KenLM 31a3b75bc87f0b3160f15adfc54d2fde529f341a trying to fix some ↵Kenneth Heafield
stringstream stuff
2015-10-01comparison error for pointers on OSX clangHieu Hoang
eg. check boost::lexical_cast<std::string>(value) == result has failed [0x0 != 0] Added operator<<(long value) for FakeOStream. Compile error on clang
2015-09-30Missing ifdef / Matt PostKenneth Heafield
2015-09-29KenLM a590a3a4dadf516a1cff28c8f1c06aa89766f519 including StringStreamKenneth Heafield
TODO: kill istream
2015-09-14Merge branch 'master' of http://github.com/moses-smt/mosesdecoderUlrich Germann
2015-09-10Update kenlmKenneth Heafield
2015-09-04Missing #include.Ulrich Germann
2015-08-27KenLM 2a3e8fae3633c890cb3b342d461f9130c8e343fa excluding unfinished ↵Kenneth Heafield
interpolation directory
2015-07-02Reformatting for readability.Ulrich Germann
2015-06-12On MinGW use Windows _chsize_t, not ftruncate.Jeroen Vermeulen
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-11Require __SSE2__ for i386 to use SSE2Kenneth Heafield
2015-05-21util/probing_hash_table_benchmark_main.cc wouldn't compile with boost v.1.46.1.Ulrich Germann
2015-05-20Fix some new compile problems.Jeroen Vermeulen
* file_piece.cc used isnan() instead of std::isnan(). * Fdstream.h used close() but Windows doesn't have unistd.h. Fixed Fdstream.h by using util::scoped_fd. Thanks Ken.
2015-05-19KenLM 7408730be415db9b650560a8b2bd3e4e3af49ec9.Kenneth Heafield
unistd.hh is dead.
2015-04-30Remove trailing whitespace in C++ files.Jeroen Vermeulen
2015-04-26boost/thread/lock_guard.hpp not found with Boost v1.46.Ulrich Germann
2015-04-23Add cross-platform randomizer module.Jeroen Vermeulen
The code uses two mechanisms for generating random numbers: srand()/rand(), which is not thread-safe, and srandom()/random(), which is POSIX-specific. Here I add a util/random.cc module that centralizes these calls, and unifies some common usage patterns. If the implementation is not good enough, we can now change it in a single place. To keep things simple, this uses the portable srand()/rand() but protects them with a lock to avoid concurrency problems. The hard part was to keep the regression tests passing: they rely on fixed sequences of random numbers, so a small code change could break them very thoroughly. Util::rand(), for wide types like size_t, calls std::rand() not once but twice. This behaviour was generalized into utils::wide_rand() and friends.
2015-04-22Thread-safe, platform-agnostic randomizer.Jeroen Vermeulen
Some places in mert use srandom()/random(), but these are POSIX-specific. The standard alternative, srand()/rand(), is not thread-safe. This module wraps srand()/rand() in mutexes (very short-lived, so should not cost much) so that it relies on just Boost and the C standard library, not on a Unix-like environment. This may reduce the width of the random numbers on some platforms: it goes from "long int" to just "int". If that is a problem, we may have to use Boost's randomizer utilities, or eventually, the C++ ones.
2015-04-22Support tokenize(const std::string &) as well.Jeroen Vermeulen
Convenience wrapper: the actual function takes a const char[], but many of the call sites want to pass a string and have to call its c_str() first.
2015-04-22Add new files.Jeroen Vermeulen
Oops. Forgot these in my previous commit. Sorry!
2015-04-17Cross-platform tempfile implementation.Jeroen Vermeulen
This makes temp_file and temp_dir work both on POSIX-like platforms and on Windows. It also fixes a bug where the temporary files/directories were created in the current working directory, instead of in the system's standard location for temporary files. Unfortunately the Windows and POSIX code diverge quite a bit on that point.
2015-04-17New helper classes: temp_dir & temp_file.Jeroen Vermeulen
I'm adding these because boost::filesystem::unique_path introduces encoding issues: on Windows the path is in wchar_t, breaking use of those strings in various places! Encoding the strings is just too much work. It's still possible that the current temp_file implementation won't build on Windows (it uses POSIX mkstemp() and close()) but that can be fixed underneath the API.
2015-04-17Use cross-platform mmap() wrapper in CompactPT.Jeroen Vermeulen
The MmapAllocator header made use of sys/mman.h and mmap(), which are Unix-specific. But util has a wrapper which also works on Windows. This also fixes the error handling: when mmap() failed, the old code would return an invalid (but non-NULL!) pointer — leading to a crash. The wrapper will throw an exception with a helpful error message.
2015-04-10Portability and include fixes.Jeroen Vermeulen
Add <cstdlib> include for srand()/rand(), and <unistd.h> for open() etc. Include <unistd.h> on Windows if using MinGW. Disable MeteorScorer on Windows, since it doesn't have fork() and pipe().
2015-03-28Modernize "C" includes in util.Jeroen Vermeulen
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-25KenLM 240ea65a021574261a38d45eb68143f26ad177e5Kenneth Heafield
2015-01-22KenLM a6d57501dcac95a31719a8628f6cbd288f6741e2 including Marcin's fixed pruningKenneth Heafield
2014-11-20Merge branch 'master' of https://github.com/moses-smt/mosesdecoderUlrich Germann
Conflicts: moses-cmd/simulate-pe.cc
2014-10-08KenLM 370f97fa549f02e162a3a0f17bf3ad6cce2c3813Kenneth Heafield
2014-09-10Fixed issues with ambiguity in typedef of uint64_t (conflict between boost ↵Ulrich Germann
typedef and stdint typedef).
2014-07-22Fix fd leak noticed by Barry HaddowKenneth Heafield
2014-07-19D'ph forgot to copy utilKenneth Heafield