summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-04 06:45:36 +0000
committergraehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-04 06:45:36 +0000
commita4615c8a584a3606483fe02cc3b7f3f18b80a967 (patch)
treed3e45b2bb7ab0af277980156737a3052c84be3b0
parent65dbbd02d56abc2e16004dfeb6510f97039ef3b1 (diff)
alloca note
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@476 ec762483-ff6d-05da-a07a-a48fb63a330f
-rwxr-xr-xdecoder/ff_lm_fsa.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/ff_lm_fsa.h b/decoder/ff_lm_fsa.h
index df11ab18..b95fde02 100755
--- a/decoder/ff_lm_fsa.h
+++ b/decoder/ff_lm_fsa.h
@@ -53,7 +53,7 @@ struct LanguageModelFsa : public FsaFeatureFunctionBase<LanguageModelFsa> {
}
//variable length array is in C99, msvc++, if it doesn't support it, #ifdef it or use a stackalloc call (forget the name)
if (ctxlen_) {
- WordID ctx[ngram_order_];
+ WordID ctx[ngram_order_]; //alloca if you don't have C99
state_copy(ctx,old_st);
ctx[ctxlen_]=TD::none; // make this part of state? wastes space but saves copies.
Featval p=floored(pimpl_->WordProb(w,ctx));