From 93049316b48a5c2e856e4087ff71241c94544d28 Mon Sep 17 00:00:00 2001 From: "graehl@gmail.com" Date: Wed, 4 Aug 2010 06:45:36 +0000 Subject: alloca note git-svn-id: https://ws10smt.googlecode.com/svn/trunk@476 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/ff_lm_fsa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'decoder/ff_lm_fsa.h') 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 { } //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)); -- cgit v1.2.3