• Home
  • Raw
  • Download

Lines Matching refs:weight

44 getWeightTrail(uint32_t weight, int32_t length) {  in getWeightTrail()  argument
45 return (uint32_t)(weight>>(8*(4-length)))&0xff; in getWeightTrail()
49 setWeightTrail(uint32_t weight, int32_t length, uint32_t trail) { in setWeightTrail() argument
51 return (uint32_t)((weight&(0xffffff00<<length))|(trail<<length)); in setWeightTrail()
55 getWeightByte(uint32_t weight, int32_t idx) { in getWeightByte() argument
56 return getWeightTrail(weight, idx); /* same calculation */ in getWeightByte()
60 setWeightByte(uint32_t weight, int32_t idx, uint32_t byte) { in setWeightByte() argument
80 return (uint32_t)((weight&mask)|(byte<<idx)); in setWeightByte()
84 truncateWeight(uint32_t weight, int32_t length) { in truncateWeight() argument
85 return (uint32_t)(weight&(0xffffffff<<(8*(4-length)))); in truncateWeight()
89 incWeightTrail(uint32_t weight, int32_t length) { in incWeightTrail() argument
90 return (uint32_t)(weight+(1UL<<(8*(4-length)))); in incWeightTrail()
94 decWeightTrail(uint32_t weight, int32_t length) { in decWeightTrail() argument
95 return (uint32_t)(weight-(1UL<<(8*(4-length)))); in decWeightTrail()
154 CollationWeights::incWeight(uint32_t weight, int32_t length) const { in incWeight() argument
156 uint32_t byte=getWeightByte(weight, length); in incWeight()
158 return setWeightByte(weight, length, byte+1); in incWeight()
161 weight=setWeightByte(weight, length, minBytes[length]); in incWeight()
169 CollationWeights::incWeightByOffset(uint32_t weight, int32_t length, int32_t offset) const { in incWeightByOffset() argument
171 offset += getWeightByte(weight, length); in incWeightByOffset()
173 return setWeightByte(weight, length, offset); in incWeightByOffset()
177 weight = setWeightByte(weight, length, minBytes[length] + offset % countBytes(length)); in incWeightByOffset()
263 uint32_t weight=lowerLimit; in getWeightRanges() local
265 uint32_t trail=getWeightTrail(weight, length); in getWeightRanges()
267 lower[length].start=incWeightTrail(weight, length); in getWeightRanges()
268 lower[length].end=setWeightTrail(weight, length, maxBytes[length]); in getWeightRanges()
272 weight=truncateWeight(weight, length-1); in getWeightRanges()
274 if(weight<0xff000000) { in getWeightRanges()
275 middle.start=incWeightTrail(weight, middleLength); in getWeightRanges()
282 weight=upperLimit; in getWeightRanges()
284 uint32_t trail=getWeightTrail(weight, length); in getWeightRanges()
286 upper[length].start=setWeightTrail(weight, length, minBytes[length]); in getWeightRanges()
287 upper[length].end=decWeightTrail(weight, length); in getWeightRanges()
291 weight=truncateWeight(weight, length-1); in getWeightRanges()
293 middle.end=decWeightTrail(weight, middleLength); in getWeightRanges()
554 uint32_t weight = range.start; in nextWeight() local
560 range.start = incWeight(weight, range.length); in nextWeight()
564 return weight; in nextWeight()