diff options
Diffstat (limited to 'lm/virtual_interface.hh')
-rw-r--r-- | lm/virtual_interface.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lm/virtual_interface.hh b/lm/virtual_interface.hh index 6a5a0196f..17f064b2c 100644 --- a/lm/virtual_interface.hh +++ b/lm/virtual_interface.hh @@ -6,6 +6,7 @@ #include "util/string_piece.hh" #include <string> +#include <string.h> namespace lm { namespace base { @@ -119,7 +120,9 @@ class Model { size_t StateSize() const { return state_size_; } const void *BeginSentenceMemory() const { return begin_sentence_memory_; } + void BeginSentenceWrite(void *to) const { memcpy(to, begin_sentence_memory_, StateSize()); } const void *NullContextMemory() const { return null_context_memory_; } + void NullContextWrite(void *to) const { memcpy(to, null_context_memory_, StateSize()); } // Requires in_state != out_state virtual float Score(const void *in_state, const WordIndex new_word, void *out_state) const = 0; |