Home
last modified time | relevance | path

Searched refs:encodedEntry (Results 1 – 2 of 2) sorted by relevance

/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/content/
Dprobability_entry.h101 uint64_t encodedEntry = static_cast<uint8_t>(mFlags); in encode() local
103 encodedEntry = (encodedEntry << (Ver4DictConstants::TIME_STAMP_FIELD_SIZE * CHAR_BIT)) in encode()
105 encodedEntry = (encodedEntry << (Ver4DictConstants::WORD_LEVEL_FIELD_SIZE * CHAR_BIT)) in encode()
107 encodedEntry = (encodedEntry << (Ver4DictConstants::WORD_COUNT_FIELD_SIZE * CHAR_BIT)) in encode()
110 encodedEntry = (encodedEntry << (Ver4DictConstants::PROBABILITY_SIZE * CHAR_BIT)) in encode()
113 return encodedEntry; in encode()
116 static ProbabilityEntry decode(const uint64_t encodedEntry, const bool hasHistoricalInfo) { in decode() argument
118 const int flags = readFromEncodedEntry(encodedEntry, in decode()
123 const int timestamp = readFromEncodedEntry(encodedEntry, in decode()
127 const int level = readFromEncodedEntry(encodedEntry, in decode()
[all …]
/packages/inputmethods/LatinIME/native/jni/tests/dictionary/structure/v4/content/
Dprobability_entry_test.cpp31 const uint64_t encodedEntry = entry.encode(false /* hasHistoricalInfo */); in TEST() local
33 ProbabilityEntry::decode(encodedEntry, false /* hasHistoricalInfo */); in TEST()
34 EXPECT_EQ(0xFF0Aull, encodedEntry); in TEST()
47 const uint64_t encodedEntry = entry.encode(true /* hasHistoricalInfo */); in TEST() local
48 EXPECT_EQ(0xF03FFFFFFFABCDull, encodedEntry); in TEST()
50 ProbabilityEntry::decode(encodedEntry, true /* hasHistoricalInfo */); in TEST()