Home | History | Annotate | Download | only in i18n

Lines Matching refs:minLength

365 CollationWeights::allocWeightsInShortRanges(int32_t n, int32_t minLength) {
366 // See if the first few minLength and minLength+1 ranges have enough weights.
367 for(int32_t i = 0; i < rangeCount && ranges[i].length <= (minLength + 1); ++i) {
369 // Use the first few minLength and minLength+1 ranges.
370 if(ranges[i].length > minLength) {
371 // Reduce the number of weights from the last minLength+1 range
372 // which might sort before some minLength ranges,
373 // so that we use all weights in the minLength ranges.
396 CollationWeights::allocWeightsInMinLengthRanges(int32_t n, int32_t minLength) {
397 // See if the minLength ranges have enough weights
403 ranges[minLengthRangeCount].length == minLength;
408 int32_t nextCountBytes = countBytes(minLength + 1);
411 // Use the minLength ranges. Merge them, and then split again as necessary.
419 // Calculate how to split the range between minLength (count1) and minLength+1 (count2).
427 int32_t count1 = count - count2; // number of minLength weights
446 printf("split the range number %ld (out of %ld minLength ranges) by %ld:%ld\n",
451 ranges[0].end = incWeightByOffset(start, minLength, count1 - 1);
454 ranges[1].start = incWeight(ranges[0].end, minLength);
456 ranges[1].length = minLength; // +1 when lengthened
485 int32_t minLength=ranges[0].length;
487 if(allocWeightsInShortRanges(n, minLength)) { break; }
489 if(minLength == 4) {
497 if(allocWeightsInMinLengthRanges(n, minLength)) { break; }
499 /* no good match, lengthen all minLength ranges and iterate */
501 printf("lengthen the short ranges from %ld bytes to %ld and iterate\n", minLength, minLength+1);
503 for(int32_t i=0; ranges[i].length==minLength; ++i) {