MCPcopy Create free account
hub / github.com/apache/arrow / InitializeLargeTable

Function InitializeLargeTable

cpp/src/arrow/util/utf8.cc:71–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69const uint8_t utf8_byte_size_table[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4};
70
71static void InitializeLargeTable() {
72 for (uint32_t state = 0; state < 9; ++state) {
73 for (uint32_t byte = 0; byte < 256; ++byte) {
74 uint32_t byte_class = utf8_small_table[byte];
75 uint8_t next_state = utf8_small_table[256 + state * 12 + byte_class] / 12;
76 DCHECK_LT(next_state, 9);
77 utf8_large_table[state * 256 + byte] = static_cast<uint16_t>(next_state * 256);
78 }
79 }
80}
81
82ARROW_EXPORT void CheckUTF8Initialized() {
83 DCHECK_EQ(utf8_large_table[0], 0)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected