/external/icu/icu4c/source/common/ |
utrie2.cpp | 18 * This is a common implementation of a Unicode trie. 21 * This is the second common version of a Unicode trie (hence the name UTrie2). 43 get32(const UNewTrie2 *trie, UChar32 c, UBool fromLSCP) { 46 if(c>=trie->highStart && (!U_IS_LEAD(c) || fromLSCP)) { 47 return trie->data[trie->dataLength-UTRIE2_DATA_GRANULARITY]; 54 i2=trie->index1[c>>UTRIE2_SHIFT_1]+ 57 block=trie->index2[i2]; 58 return trie->data[block+(c&UTRIE2_DATA_MASK)]; 62 utrie2_get32(const UTrie2 *trie, UChar32 c) 138 UTrie2 *trie; local 240 UTrie2 *trie; local 438 UTrie2Header trie; local [all...] |
utrie.h | 31 * This is a common implementation of a "folded" trie. 52 * Trie constants, defining shift widths, index array lengths, etc. 117 * Number of bytes for a dummy trie. 118 * A dummy trie is an empty runtime trie, used when a real data trie cannot 138 * @param data data value for a surrogate from the trie, including the folding offset 145 * Run-time Trie structure. 178 /** Internal trie getter from an offset (0 if c16 is a BMP/lead units) and a 16-bit unit */ 179 #define _UTRIE_GET_RAW(trie, data, offset, c16) [all...] |
utrie.cpp | 18 * This is a common implementation of a "folded" trie. 46 /* Building a trie ----------------------------------------------------------*/ 53 UNewTrie *trie; local 63 trie=fillIn; 65 trie=(UNewTrie *)uprv_malloc(sizeof(UNewTrie)); 66 if(trie==NULL) { 70 uprv_memset(trie, 0, sizeof(UNewTrie)); 71 trie->isAllocated= (UBool)(fillIn==NULL); 74 trie->data=aliasData; 75 trie->isDataAllocated=FALSE 117 UNewTrie *trie; local [all...] |
utrie2.h | 36 * This is a common implementation of a Unicode trie. 40 * This is the second common version of a Unicode trie (hence the name UTrie2). 60 * Trie structure. 82 * Open a frozen trie from its serialized from, stored in 32-bit-aligned memory. 84 * The memory must remain valid and unchanged as long as the trie is used. 85 * You must utrie2_close() the trie once you are done using it. 92 * @param pActualLength receives the actual number of bytes at data taken up by the trie data; 95 * @return the unserialized trie 106 * Open a frozen, empty "dummy" trie. 107 * A dummy trie is an empty trie, used when a real data trie canno 637 const UTrie2 *trie; member in class:UTrie2StringIterator [all...] |
utrie2_builder.cpp | 18 * This is a common implementation of a Unicode trie. 21 * This is the second common version of a Unicode trie (hence the name UTrie2). 42 * have been chosen to minimize trie sizes overall. 71 /* Building a trie ----------------------------------------------------------*/ 106 allocIndex2Block(UNewTrie2 *trie); 110 UTrie2 *trie; local 119 trie=(UTrie2 *)uprv_malloc(sizeof(UTrie2)); 122 if(trie==NULL || newTrie==NULL || data==NULL) { 123 uprv_free(trie); 130 uprv_memset(trie, 0, sizeof(UTrie2)) 237 UNewTrie2 *trie; local 279 UTrie2 *trie; local 322 UTrie2 *trie; member in struct:NewTrieAndStatus [all...] |
ubidi_props.c | 39 UTrie2 trie; member in struct:UBiDiProps 76 /* add the start code point of each same-value range of the trie */ 77 utrie2_enum(&bdp->trie, NULL, _enumPropertyStartsRange, sa); 146 uint16_t props=UTRIE2_GET16(&bdp->trie, c); 152 uint16_t props=UTRIE2_GET16(&bdp->trie, c); 190 uint16_t props=UTRIE2_GET16(&bdp->trie, c); 196 uint16_t props=UTRIE2_GET16(&bdp->trie, c); 202 uint16_t props=UTRIE2_GET16(&bdp->trie, c); 208 uint16_t props=UTRIE2_GET16(&bdp->trie, c); 231 uint16_t props=UTRIE2_GET16(&bdp->trie, c) [all...] |
ucol_swp.cpp | 32 * This performs data swapping for a folded trie (see utrie.c for details). 40 UTrieHeader trie; local 59 trie.signature=ds->readUInt32(inTrie->signature); 60 trie.options=ds->readUInt32(inTrie->options); 61 trie.indexLength=udata_readInt32(ds, inTrie->indexLength); 62 trie.dataLength=udata_readInt32(ds, inTrie->dataLength); 64 if( trie.signature!=0x54726965 || 65 (trie.options&UTRIE_OPTIONS_SHIFT_MASK)!=UTRIE_SHIFT || 66 ((trie.options>>UTRIE_OPTIONS_INDEX_SHIFT)&UTRIE_OPTIONS_SHIFT_MASK)!=UTRIE_INDEX_SHIFT || 67 trie.indexLength<UTRIE_BMP_INDEX_LENGTH | [all...] |
/external/icu/icu4c/source/test/intltest/ |
ucharstrietest.cpp | 70 void checkFirst(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength); 71 void checkNext(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength); 72 void checkNextWithState(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength); 73 void checkNextString(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength); 74 void checkIterator(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength); 297 LocalPointer<UCharsTrie> trie(buildTrie(data, UPRV_LENGTHOF(data), USTRINGTRIE_BUILD_FAST)); 298 if(trie.isNull()) { 302 if( (result=trie->nextForCodePoint(0x4dff))!=USTRINGTRIE_NO_VALUE || result!=trie->current() || 303 (result=trie->nextForCodePoint(0x10000))!=USTRINGTRIE_NO_VALUE || result!=trie->current() | [all...] |
bytestrietest.cpp | 64 void checkFirst(BytesTrie &trie, const StringAndValue data[], int32_t dataLength); 65 void checkNext(BytesTrie &trie, const StringAndValue data[], int32_t dataLength); 66 void checkNextWithState(BytesTrie &trie, const StringAndValue data[], int32_t dataLength); 67 void checkNextString(BytesTrie &trie, const StringAndValue data[], int32_t dataLength); 68 void checkIterator(const BytesTrie &trie, const StringAndValue data[], int32_t dataLength); 310 LocalPointer<BytesTrie> trie(buildMonthsTrie(USTRINGTRIE_BUILD_FAST)); 311 if(trie.isNull()) { 315 if(trie->hasUniqueValue(uniqueValue)) { 318 trie->next('j'); 319 trie->next('a') [all...] |
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/util/ |
CharsTrieTest.java | 242 CharsTrie trie=buildTrie(data, data.length, StringTrieBuilder.Option.FAST); local 244 if( (result=trie.nextForCodePoint(0x4dff))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || 245 (result=trie.nextForCodePoint(0x10000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || 246 (result=trie.nextForCodePoint(0x9999))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || 247 (result=trie.nextForCodePoint(0x20000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || 248 (result=trie.nextForCodePoint(0xdfff))!=BytesTrie.Result.NO_VALUE || result!=trie.current() | 323 CharsTrie trie=buildLargeTrie(1111); local 392 CharsTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); local 426 CharsTrie trie=buildMonthsTrie(StringTrieBuilder.Option.SMALL); local 473 CharsTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); local 516 CharsTrie trie=buildMonthsTrie(StringTrieBuilder.Option.SMALL); local 538 CharsTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); local 583 CharsTrie trie=buildTrie(data, data.length, StringTrieBuilder.Option.FAST); local 605 CharsTrie trie=buildTrie(data, data.length, StringTrieBuilder.Option.FAST); local 650 CharsTrie trie=buildTrie(data, dataLength, buildOption); local 679 CharsTrie trie=builder_.build(buildOption); local [all...] |
BytesTrieTest.java | 263 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); local 265 if((uniqueValue=trie.getUniqueValue())!=0) { 268 trie.next('j'); 269 trie.next('a'); 270 trie.next('n'); 272 if((uniqueValue=trie.getUniqueValue())!=((1<<1)|1)) { 275 trie.first('j'); 276 trie.next('u'); 277 if((uniqueValue=trie.getUniqueValue())!=0) { 280 if(trie.next('n')!=BytesTrie.Result.INTERMEDIATE_VALUE || 6!=trie.getValue()) 297 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.SMALL); local 344 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); local 387 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.SMALL); local 409 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); local 454 BytesTrie trie=buildTrie(data, data.length, StringTrieBuilder.Option.FAST); local 476 BytesTrie trie=buildTrie(data, data.length, StringTrieBuilder.Option.FAST); local 523 BytesTrie trie=buildTrie(data, dataLength, buildOption); local 552 BytesTrie trie=builder_.build(buildOption); local [all...] |
TrieTest.java | 19 import android.icu.impl.Trie; 26 * Testing class for Trie. Tests here will be simple, since both CharTrie and 113 implements Trie.DataManipulate 123 public _testEnumValue(Trie data) 134 private void _testTrieIteration(IntTrie trie, CheckRange checkRanges[], 156 int value = trie.getCodePointValue(c); 176 value = trie.getLeadValue(lead); 177 value = trie.getTrailValue(value, trail); 178 if (value != trie.getSurrogateValue(lead, trail) 215 errln("setting values into a trie failed") 236 IntTrie trie = newTrie.serialize(new _testFoldedValue(newTrie), local 481 CharTrie trie; local 506 IntTrie trie; local [all...] |
Trie2Test.java | 52 Trie2Writable trie = new Trie2Writable(0,0); local 54 trie.toTrie2_16().serialize(os); 86 Trie2Writable trie = new Trie2Writable(17,0); local 88 it = trie.iterator(); 104 for (Trie2.Range rr: trie) { 128 Trie2Writable trie = new Trie2Writable(0xbadfeed, 0); local 129 trie.set(0x10123, 42); 139 Iterator<Trie2.Range> it = trie.iterator(vm); 151 Trie2Writable trie = new Trie2Writable(0xdefa17, 0); local 152 trie.set(0x2f810, 10) 178 Trie2Writable trie = new Trie2Writable(0xdefa17, 0); local 202 Trie2Writable trie = new Trie2Writable(101, 0); local 589 Trie2Writable trie = new Trie2Writable(initialValue, errorValue); local [all...] |
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ |
CharsTrieTest.java | 241 CharsTrie trie=buildTrie(data, data.length, StringTrieBuilder.Option.FAST); local 243 if( (result=trie.nextForCodePoint(0x4dff))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || 244 (result=trie.nextForCodePoint(0x10000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || 245 (result=trie.nextForCodePoint(0x9999))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || 246 (result=trie.nextForCodePoint(0x20000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || 247 (result=trie.nextForCodePoint(0xdfff))!=BytesTrie.Result.NO_VALUE || result!=trie.current() | 322 CharsTrie trie=buildLargeTrie(1111); local 391 CharsTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); local 425 CharsTrie trie=buildMonthsTrie(StringTrieBuilder.Option.SMALL); local 472 CharsTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); local 515 CharsTrie trie=buildMonthsTrie(StringTrieBuilder.Option.SMALL); local 537 CharsTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); local 582 CharsTrie trie=buildTrie(data, data.length, StringTrieBuilder.Option.FAST); local 604 CharsTrie trie=buildTrie(data, data.length, StringTrieBuilder.Option.FAST); local 649 CharsTrie trie=buildTrie(data, dataLength, buildOption); local 678 CharsTrie trie=builder_.build(buildOption); local [all...] |
BytesTrieTest.java | 262 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); local 264 if((uniqueValue=trie.getUniqueValue())!=0) { 267 trie.next('j'); 268 trie.next('a'); 269 trie.next('n'); 271 if((uniqueValue=trie.getUniqueValue())!=((1<<1)|1)) { 274 trie.first('j'); 275 trie.next('u'); 276 if((uniqueValue=trie.getUniqueValue())!=0) { 279 if(trie.next('n')!=BytesTrie.Result.INTERMEDIATE_VALUE || 6!=trie.getValue()) 296 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.SMALL); local 343 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); local 386 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.SMALL); local 408 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); local 453 BytesTrie trie=buildTrie(data, data.length, StringTrieBuilder.Option.FAST); local 475 BytesTrie trie=buildTrie(data, data.length, StringTrieBuilder.Option.FAST); local 522 BytesTrie trie=buildTrie(data, dataLength, buildOption); local 551 BytesTrie trie=builder_.build(buildOption); local [all...] |
TrieTest.java | 18 import com.ibm.icu.impl.Trie; 25 * Testing class for Trie. Tests here will be simple, since both CharTrie and 112 implements Trie.DataManipulate 122 public _testEnumValue(Trie data) 133 private void _testTrieIteration(IntTrie trie, CheckRange checkRanges[], 155 int value = trie.getCodePointValue(c); 175 value = trie.getLeadValue(lead); 176 value = trie.getTrailValue(value, trail); 177 if (value != trie.getSurrogateValue(lead, trail) 214 errln("setting values into a trie failed") 235 IntTrie trie = newTrie.serialize(new _testFoldedValue(newTrie), local 480 CharTrie trie; local 505 IntTrie trie; local [all...] |
Trie2Test.java | 51 Trie2Writable trie = new Trie2Writable(0,0); local 53 trie.toTrie2_16().serialize(os); 85 Trie2Writable trie = new Trie2Writable(17,0); local 87 it = trie.iterator(); 103 for (Trie2.Range rr: trie) { 127 Trie2Writable trie = new Trie2Writable(0xbadfeed, 0); local 128 trie.set(0x10123, 42); 138 Iterator<Trie2.Range> it = trie.iterator(vm); 150 Trie2Writable trie = new Trie2Writable(0xdefa17, 0); local 151 trie.set(0x2f810, 10) 177 Trie2Writable trie = new Trie2Writable(0xdefa17, 0); local 201 Trie2Writable trie = new Trie2Writable(101, 0); local 588 Trie2Writable trie = new Trie2Writable(initialValue, errorValue); local [all...] |
/external/icu/icu4c/source/test/perf/unisetperf/draft/ |
trieset.cpp | 20 * Modifies the trie index to make the BMP linear, and uses the original set 27 #define UTRIE_GET8_LATIN1(trie) ((const uint8_t *)(trie)->data32+UTRIE_DATA_BLOCK_LENGTH) 29 #define UTRIE_GET8_FROM_LEAD(trie, c16) \ 30 ((const uint8_t *)(trie)->data32)[ \ 31 ((int32_t)((trie)->index[(c16)>>UTRIE_SHIFT])<<UTRIE_INDEX_SHIFT)+ \ 67 // Preflight the trie length. 81 utrie_unserialize(&trie, trieData, length, &errorCode); // TODO: Implement for 8-bit UTrie! 86 uprv_memcpy((uint16_t *)trie.index+(0xd800>>UTRIE_SHIFT), 87 trie.index+UTRIE_BMP_INDEX_LENGTH 113 UTrie trie; member in class:TrieSet [all...] |
/external/icu/icu4c/source/test/cintltst/ |
trie2test.c | 98 const UTrie2 *trie, 105 utrie2_enum(trie, testEnumValue, testEnumRange, &checkRanges); 111 const UTrie2 *trie, UTrie2ValueBits valueBits, 118 UBool isFrozen=utrie2_isFrozen(trie); 119 const char *const typeName= isFrozen ? "frozen trie" : "newTrie"; 133 value2=UTRIE2_GET16_FROM_U16_SINGLE_LEAD(trie, start); 135 value2=UTRIE2_GET32_FROM_U16_SINGLE_LEAD(trie, start); 144 value2=UTRIE2_GET16_FROM_SUPP(trie, start); 146 value2=UTRIE2_GET32_FROM_SUPP(trie, start); 154 value2=UTRIE2_GET16(trie, start) 800 UTrie2 *trie; local 860 UTrie2 *trie=makeTrieWithRanges(testName, withClone, local 1060 UTrie2 *trie=makeTrieWithRanges(testName, FALSE, local 1108 UTrie2 *trie; local 1157 UTrie2 *trie; local 1210 UTrie2 *trie; local [all...] |
trietest.c | 56 _testFoldedValue32(UNewTrie *trie, UChar32 start, int32_t offset) { 65 value=utrie_get32(trie, start, &inBlockZero); 87 _testFoldedValue16(UNewTrie *trie, UChar32 start, int32_t offset) { 96 value=utrie_get32(trie, start, &inBlockZero); 142 const UTrie *trie, 171 if(trie->data32!=NULL) { 172 UTRIE_NEXT32(trie, p, limit, c, c2, value); 174 UTRIE_NEXT16(trie, p, limit, c, c2, value); 192 if(trie->data32==NULL) { 193 value=UTRIE_GET16_FROM_LEAD(trie, c) 263 UTrie trie={ 0 }; local 457 UTrie trie={ 0 }; local 825 UTrie trie; local [all...] |
/external/icu/android_icu4j/src/main/java/android/icu/impl/ |
UBiDiProps.java | 63 // read the trie 64 trie=Trie2_16.createFromSerialized(bytes); 66 int trieLength=trie.getSerializedLength(); 68 throw new IOException(DATA_FILE_NAME+": not enough bytes for the trie"); 70 // skip padding after trie bytes 106 /* add the start code point of each same-value range of the trie */ 107 Iterator<Trie2.Range> trieIterator=trie.iterator(); 175 return getClassFromProps(trie.get(c)); 179 return getFlagFromProps(trie.get(c), IS_MIRRORED_SHIFT); 212 int props=trie.get(c) 263 private Trie2_16 trie; field in class:UBiDiProps [all...] |
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/ |
UBiDiProps.java | 59 // read the trie 60 trie=Trie2_16.createFromSerialized(bytes); 62 int trieLength=trie.getSerializedLength(); 64 throw new IOException(DATA_FILE_NAME+": not enough bytes for the trie"); 66 // skip padding after trie bytes 102 /* add the start code point of each same-value range of the trie */ 103 Iterator<Trie2.Range> trieIterator=trie.iterator(); 171 return getClassFromProps(trie.get(c)); 175 return getFlagFromProps(trie.get(c), IS_MIRRORED_SHIFT); 208 int props=trie.get(c) 259 private Trie2_16 trie; field in class:UBiDiProps [all...] |
/frameworks/native/cmds/installd/ |
matchgen.py | 63 trie = collections.defaultdict(lambda: collections.defaultdict(lambda: collections.defaultdict(lambda: collections.defaultdict(lambda: collections.defaultdict(lambda: collections.defaultdict(lambda: "")))))) variable 68 target = trie 88 dump(trie, 0)
|
/tools/tradefederation/core/src/com/android/tradefed/command/ |
Console.java | 254 * @param trie The {@link RegexTrie} to add the commands to 261 protected void setCustomCommands(RegexTrie<Runnable> trie, List<String> genericHelp, 269 * @param trie The {@link RegexTrie} to add the commands to 276 void generateHelpListings(RegexTrie<Runnable> trie, List<String> genericHelp, 286 trie.put(genericHelpRunnable, HELP_PATTERN); 295 trie.put(new Runnable() { 307 trie.put(new Runnable() { 315 trie.put(new ArgRunnable<CaptureList>() { 328 trie.put(new ArgRunnable<CaptureList>() { 406 * @param trie The {@link RegexTrie} to add the commands t [all...] |
/external/icu/icu4c/source/test/perf/dicttrieperf/ |
dicttrieperf.cpp | 266 BytesTrie trie(nameTrieBytes); 267 if(USTRINGTRIE_HAS_VALUE(trie.next(s, -1))) { 268 return trie.getValue(); 343 // Note: CompactTrieDictionary::matches() is part of its trie implementation, 346 // check the trie state each time and load/store state in the object. 349 ucharsTrieMatches(UCharsTrie &trie, 361 UStringTrieResult result=trie.first(c); 390 result=trie.next(c); 409 : DictLookup(perfTest), trie(NULL) { 424 trie=builder->build(USTRINGTRIE_BUILD_SMALL, errorCode) 434 UCharsTrie *trie; member in class:UCharsTrieDictLookup 543 BytesTrie *trie; member in class:BytesTrieDictLookup [all...] |