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
diff options
context:
space:
mode:
authorpjwilliams <pjwilliams@1f5c12ca-751b-0410-a591-d2e778427230>2011-02-28 14:41:08 +0300
committerpjwilliams <pjwilliams@1f5c12ca-751b-0410-a591-d2e778427230>2011-02-28 14:41:08 +0300
commit75709a6c878e7545e1b30636dec71bb9c648f8a3 (patch)
tree4b17fbdc501ef0b7a8354e45b09763dc4cc026bb /moses-chart-cmd/src
parenta5a860ad1fc4c77f229b307fc4b728ca77ddbf26 (diff)
Memory efficiency: make the reserveSize argument non-optional in
Moses::Phrase's constructor. The default used to be ARRAY_SIZE_INCR = 10, which will be excessive in many cases. Where the default was used, I've set the exact size where that was obvious and explicitly used ARRAY_SIZE_INCR otherwise. If you know the code involved, it's probably worth reviewing. git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3908 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'moses-chart-cmd/src')
-rw-r--r--moses-chart-cmd/src/IOWrapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/moses-chart-cmd/src/IOWrapper.cpp b/moses-chart-cmd/src/IOWrapper.cpp
index 443bc8bb4..d8cb918dd 100644
--- a/moses-chart-cmd/src/IOWrapper.cpp
+++ b/moses-chart-cmd/src/IOWrapper.cpp
@@ -269,7 +269,7 @@ void IOWrapper::OutputBestHypo(const MosesChart::Hypothesis *hypo, long translat
if (StaticData::Instance().IsPathRecoveryEnabled()) {
out << "||| ";
}
- Phrase outPhrase(Output);
+ Phrase outPhrase(Output, ARRAY_SIZE_INCR);
hypo->CreateOutputPhrase(outPhrase);
// delete 1st & last