Home
last modified time | relevance | path

Searched refs:mid (Results 1 – 25 of 356) sorted by relevance

12345678910>>...15

/external/python/cpython2/Lib/
Dbisect.py17 mid = (lo+hi)//2
18 if x < a[mid]: hi = mid
19 else: lo = mid+1
40 mid = (lo+hi)//2
41 if x < a[mid]: hi = mid
42 else: lo = mid+1
61 mid = (lo+hi)//2
62 if a[mid] < x: lo = mid+1
63 else: hi = mid
83 mid = (lo+hi)//2
[all …]
/external/compiler-rt/test/asan/TestCases/
Dcontiguous_container.cc14 char *mid = beg + capacity; in TestContainer() local
20 old_mid = mid; in TestContainer()
21 mid = beg + size; in TestContainer()
22 __sanitizer_annotate_contiguous_container(beg, end, old_mid, mid); in TestContainer()
28 assert(__sanitizer_verify_contiguous_container(beg, mid, end)); in TestContainer()
30 __sanitizer_contiguous_container_find_bad_address(beg, mid, end)); in TestContainer()
31 if (mid != beg) { in TestContainer()
32 assert(!__sanitizer_verify_contiguous_container(beg, mid - 1, end)); in TestContainer()
33 assert(mid - 1 == __sanitizer_contiguous_container_find_bad_address( in TestContainer()
34 beg, mid - 1, end)); in TestContainer()
[all …]
/external/libxml2/
Dchvalid.c169 int low, high, mid; in xmlCharInRange() local
181 mid = (low + high) / 2; in xmlCharInRange()
182 if ((unsigned short) val < sptr[mid].low) { in xmlCharInRange()
183 high = mid - 1; in xmlCharInRange()
185 if ((unsigned short) val > sptr[mid].high) { in xmlCharInRange()
186 low = mid + 1; in xmlCharInRange()
200 mid = (low + high) / 2; in xmlCharInRange()
201 if (val < lptr[mid].low) { in xmlCharInRange()
202 high = mid - 1; in xmlCharInRange()
204 if (val > lptr[mid].high) { in xmlCharInRange()
[all …]
/external/autotest/client/cros/audio/
Daudio_analysis.py154 def mid_is_peak(array, mid, left, right): argument
171 value_mid = array[mid]
176 for index in xrange(left, mid):
182 if mid == right:
187 for index in xrange(right, mid, -1):
201 mid = 0
203 while mid < length:
204 left = max(0, mid - half_window_size)
205 right = min(length - 1, mid + half_window_size)
208 if array[mid] == 0:
[all …]
/external/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Sources/
DBrowserDialog.cpp263 INT_PTR mid; in OnServiceAdd() local
272 mid = 0; in OnServiceAdd()
277 mid = ( lo + hi ) / 2; in OnServiceAdd()
278 result = entry->name.CompareNoCase( mBrowserEntries[ mid ].name ); in OnServiceAdd()
285 hi = mid - 1; in OnServiceAdd()
289 lo = mid + 1; in OnServiceAdd()
294 mBrowserEntries[ mid ].ip = entry->ip; in OnServiceAdd()
295 mBrowserEntries[ mid ].text = entry->text; in OnServiceAdd()
301 mid += 1; in OnServiceAdd()
303 mBrowserEntries.InsertAt( mid, *entry ); in OnServiceAdd()
[all …]
/external/lzma/CPP/Common/
DMyVector.h249 unsigned mid = (left + right) / 2; in FindInSorted() local
250 const T midVal = (*this)[mid]; in FindInSorted()
252 return mid; in FindInSorted()
254 right = mid; in FindInSorted()
256 left = mid + 1; in FindInSorted()
265 unsigned mid = (left + right) / 2; in FindInSorted2() local
266 const T& midVal = (*this)[mid]; in FindInSorted2()
269 return mid; in FindInSorted2()
271 right = mid; in FindInSorted2()
273 left = mid + 1; in FindInSorted2()
[all …]
/external/skia/src/views/unix/
Dkeysym2ucs.c822 int mid; in keysym2ucs() local
835 mid = (min + max) / 2; in keysym2ucs()
836 if (keysymtab[mid].keysym < keysym) in keysym2ucs()
837 min = mid + 1; in keysym2ucs()
838 else if (keysymtab[mid].keysym > keysym) in keysym2ucs()
839 max = mid - 1; in keysym2ucs()
842 return keysymtab[mid].ucs; in keysym2ucs()
/external/sl4a/ScriptingLayerForAndroid/src/de/mud/terminal/
DPrecomposer.java1032 int mid; in precompose() local
1038 mid = (min + max) / 2; in precompose()
1039 that = precompositions[mid][1] << UNICODE_SHIFT | precompositions[mid][2]; in precompose()
1041 min = mid + 1; in precompose()
1043 max = mid - 1; in precompose()
1045 return precompositions[mid][0]; in precompose()
/external/libopus/silk/
Dstereo_LR_to_MS.c58 opus_int16 *mid = &x1[ -2 ]; in silk_stereo_LR_to_MS() local
66 mid[ n ] = (opus_int16)silk_RSHIFT_ROUND( sum, 1 ); in silk_stereo_LR_to_MS()
71 silk_memcpy( mid, state->sMid, 2 * sizeof( opus_int16 ) ); in silk_stereo_LR_to_MS()
73 silk_memcpy( state->sMid, &mid[ frame_length ], 2 * sizeof( opus_int16 ) ); in silk_stereo_LR_to_MS()
80 …sum = silk_RSHIFT_ROUND( silk_ADD_LSHIFT( mid[ n ] + (opus_int32)mid[ n + 2 ], mid[ n + 1 ], 1 ), … in silk_stereo_LR_to_MS()
82 HP_mid[ n ] = mid[ n + 1 ] - sum; in silk_stereo_LR_to_MS()
210 …sum = silk_LSHIFT( silk_ADD_LSHIFT( mid[ n ] + (opus_int32)mid[ n + 2 ], mid[ n + 1 ], 1 ), 9 ); … in silk_stereo_LR_to_MS()
212 … sum = silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)mid[ n + 1 ], 11 ), pred1_Q13 ); /* Q8 */ in silk_stereo_LR_to_MS()
220 …sum = silk_LSHIFT( silk_ADD_LSHIFT( mid[ n ] + (opus_int32)mid[ n + 2 ], mid[ n + 1 ], 1 ), 9 ); … in silk_stereo_LR_to_MS()
222 … sum = silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)mid[ n + 1 ], 11 ), pred1_Q13 ); /* Q8 */ in silk_stereo_LR_to_MS()
/external/e2fsprogs/resize/
Dextent.c145 __s64 low, high, mid; in ext2fs_extent_translate() local
158 mid = (low+high)/2; in ext2fs_extent_translate()
161 mid = low; in ext2fs_extent_translate()
179 mid = low + ((__u64) (range * (high-low))); in ext2fs_extent_translate()
182 if ((old_loc >= extent->list[mid].old_loc) && in ext2fs_extent_translate()
183 (old_loc < extent->list[mid].old_loc + extent->list[mid].size)) in ext2fs_extent_translate()
184 return (extent->list[mid].new_loc + in ext2fs_extent_translate()
185 (old_loc - extent->list[mid].old_loc)); in ext2fs_extent_translate()
186 if (old_loc < extent->list[mid].old_loc) in ext2fs_extent_translate()
187 high = mid-1; in ext2fs_extent_translate()
[all …]
/external/androidplot/AndroidPlot-Core/src/main/java/com/androidplot/xy/
DBezierLineAndPointRenderer.java36 PointF mid = new PointF(); in appendToPath() local
37 mid.set((lastPoint.x + thisPoint.x) / 2, (lastPoint.y + thisPoint.y) / 2); in appendToPath()
38 path.quadTo((lastPoint.x + mid.x) / 2, lastPoint.y, mid.x, mid.y); in appendToPath()
40 path.quadTo((mid.x + thisPoint.x) / 2, lastPoint.y, thisPoint.x, thisPoint.y); in appendToPath()
/external/lzma/CPP/7zip/Archive/Common/
DMultiStream.cpp17 unsigned left = 0, mid = _streamIndex, right = Streams.Size(); in Read() local
20 CSubStreamInfo &m = Streams[mid]; in Read()
22 right = mid; in Read()
24 left = mid + 1; in Read()
27 _streamIndex = mid; in Read()
30 mid = (left + right) / 2; in Read()
32 _streamIndex = mid; in Read()
/external/e2fsprogs/e2fsck/
Ddx_dirinfo.c87 int low, high, mid; in e2fsck_get_dx_dir_info() local
99 mid = (low+high)/2; in e2fsck_get_dx_dir_info()
100 if (mid == low || mid == high) in e2fsck_get_dx_dir_info()
102 if (ino == ctx->dx_dir_info[mid].ino) in e2fsck_get_dx_dir_info()
103 return &ctx->dx_dir_info[mid]; in e2fsck_get_dx_dir_info()
104 if (ino < ctx->dx_dir_info[mid].ino) in e2fsck_get_dx_dir_info()
105 high = mid; in e2fsck_get_dx_dir_info()
107 low = mid; in e2fsck_get_dx_dir_info()
/external/lzma/CPP/7zip/UI/FileManager/
DSysIconUtils.cpp124 unsigned mid = (left + right) / 2; in FindInSorted_Attrib() local
125 DWORD midAttrib = vect[mid].Attrib; in FindInSorted_Attrib()
127 return mid; in FindInSorted_Attrib()
129 right = mid; in FindInSorted_Attrib()
131 left = mid + 1; in FindInSorted_Attrib()
142 unsigned mid = (left + right) / 2; in FindInSorted_Ext() local
143 int compare = MyStringCompareNoCase(ext, vect[mid].Ext); in FindInSorted_Ext()
145 return mid; in FindInSorted_Ext()
147 right = mid; in FindInSorted_Ext()
149 left = mid + 1; in FindInSorted_Ext()
/external/skia/tests/
DGeometryTest.cpp119 SkVector mid = SkEvalQuadTangentAt(&pts[index * 3], .5f); in test_quad_tangents() local
122 REPORTER_ASSERT(reporter, mid.fX && mid.fY); in test_quad_tangents()
124 REPORTER_ASSERT(reporter, SkScalarNearlyZero(start.cross(mid))); in test_quad_tangents()
125 REPORTER_ASSERT(reporter, SkScalarNearlyZero(mid.cross(end))); in test_quad_tangents()
139 SkVector mid = conic.evalTangentAt(.5f); in test_conic_tangents() local
142 REPORTER_ASSERT(reporter, mid.fX && mid.fY); in test_conic_tangents()
144 REPORTER_ASSERT(reporter, SkScalarNearlyZero(start.cross(mid))); in test_conic_tangents()
145 REPORTER_ASSERT(reporter, SkScalarNearlyZero(mid.cross(end))); in test_conic_tangents()
197 SkVector start, mid, end; in test_cubic_tangents() local
199 SkEvalCubicAt(&pts[index * 4], .5f, nullptr, &mid, nullptr); in test_cubic_tangents()
[all …]
/external/lzma/CPP/7zip/Common/
DUniqBlocks.cpp14 unsigned mid = (left + right) / 2; in AddUniq() local
15 unsigned index = Sorted[mid]; in AddUniq()
19 right = mid; in AddUniq()
21 left = mid + 1; in AddUniq()
30 right = mid; in AddUniq()
32 left = mid + 1; in AddUniq()
/external/skia/src/utils/
DSkParseColor.cpp406 int mid = (hi + lo) >> 1; in FindNamedColor() local
407 while ((int) gColorNames[mid] >= 0) in FindNamedColor()
408 --mid; in FindNamedColor()
410 while (gColorNames[mid] == *sixMatchPtr) { in FindNamedColor()
411 ++mid; in FindNamedColor()
413 *color = gColorNames[mid] | 0xFF000000; in FindNamedColor()
419 int midMask = gColorNames[mid] & ~0x80000000; in FindNamedColor()
421 lo = mid + 2; // skip color in FindNamedColor()
424 } else if (hi == mid) in FindNamedColor()
427 hi = mid; in FindNamedColor()
/external/python/cpython2/Modules/
D_bisectmodule.c12 Py_ssize_t mid, res; in internal_bisect_right() local
27 mid = ((size_t)lo + hi) / 2; in internal_bisect_right()
28 litem = PySequence_GetItem(list, mid); in internal_bisect_right()
36 hi = mid; in internal_bisect_right()
38 lo = mid + 1; in internal_bisect_right()
118 Py_ssize_t mid, res; in internal_bisect_left() local
133 mid = ((size_t)lo + hi) / 2; in internal_bisect_left()
134 litem = PySequence_GetItem(list, mid); in internal_bisect_left()
142 lo = mid + 1; in internal_bisect_left()
144 hi = mid; in internal_bisect_left()
/external/pdfium/third_party/freetype/src/psnames/
Dpsmodule.c401 PS_UniMap *min, *max, *mid, *result = NULL; in ps_unicodes_char_index() local
414 mid = min + ( ( max - min ) >> 1 ); in ps_unicodes_char_index()
416 if ( mid->unicode == unicode ) in ps_unicodes_char_index()
418 result = mid; in ps_unicodes_char_index()
422 base_glyph = BASE_GLYPH( mid->unicode ); in ps_unicodes_char_index()
425 result = mid; /* remember match but continue search for base glyph */ in ps_unicodes_char_index()
431 min = mid + 1; in ps_unicodes_char_index()
433 max = mid - 1; in ps_unicodes_char_index()
454 FT_UInt mid; in ps_unicodes_char_next() local
461 mid = min + ( ( max - min ) >> 1 ); in ps_unicodes_char_next()
[all …]
/external/freetype/src/psnames/
Dpsmodule.c404 PS_UniMap *min, *max, *mid, *result = NULL; in ps_unicodes_char_index() local
417 mid = min + ( ( max - min ) >> 1 ); in ps_unicodes_char_index()
419 if ( mid->unicode == unicode ) in ps_unicodes_char_index()
421 result = mid; in ps_unicodes_char_index()
425 base_glyph = BASE_GLYPH( mid->unicode ); in ps_unicodes_char_index()
428 result = mid; /* remember match but continue search for base glyph */ in ps_unicodes_char_index()
434 min = mid + 1; in ps_unicodes_char_index()
436 max = mid - 1; in ps_unicodes_char_index()
457 FT_UInt mid; in ps_unicodes_char_next() local
464 mid = min + ( ( max - min ) >> 1 ); in ps_unicodes_char_next()
[all …]
/external/libvterm/src/
Dunicode.c134 int mid; in bisearch() local
139 mid = (min + max) / 2; in bisearch()
140 if (ucs > table[mid].last) in bisearch()
141 min = mid + 1; in bisearch()
142 else if (ucs < table[mid].first) in bisearch()
143 max = mid - 1; in bisearch()
/external/libchrome/base/metrics/
Dsample_vector.cc111 size_t mid; in GetBucketIndex() local
114 mid = under + (over - under)/2; in GetBucketIndex()
115 if (mid == under) in GetBucketIndex()
117 if (bucket_ranges_->range(mid) <= value) in GetBucketIndex()
118 under = mid; in GetBucketIndex()
120 over = mid; in GetBucketIndex()
123 DCHECK_LE(bucket_ranges_->range(mid), value); in GetBucketIndex()
124 CHECK_GT(bucket_ranges_->range(mid + 1), value); in GetBucketIndex()
125 return mid; in GetBucketIndex()
/external/skia/src/core/
DSkStrokerPriv.cpp141 SkVector mid; in MiterJoiner() local
167 mid = (before + after) * radius; in MiterJoiner()
187 mid.set(after.fY - before.fY, before.fX - after.fX); in MiterJoiner()
189 mid.negate(); in MiterJoiner()
192 mid.set(before.fX + after.fX, before.fY + after.fY); in MiterJoiner()
195 mid.setLength(radius / sinHalfAngle); in MiterJoiner()
198 outer->setLastPt(pivot.fX + mid.fX, pivot.fY + mid.fY); in MiterJoiner()
200 outer->lineTo(pivot.fX + mid.fX, pivot.fY + mid.fY); in MiterJoiner()
/external/e2fsprogs/lib/ext2fs/
Dbadblocks.c165 int low, high, mid; in ext2fs_u32_list_find() local
181 mid = ((unsigned)low + (unsigned)high)/2; in ext2fs_u32_list_find()
182 if (mid == low || mid == high) in ext2fs_u32_list_find()
184 if (blk == bb->list[mid]) in ext2fs_u32_list_find()
185 return mid; in ext2fs_u32_list_find()
186 if (blk < bb->list[mid]) in ext2fs_u32_list_find()
187 high = mid; in ext2fs_u32_list_find()
189 low = mid; in ext2fs_u32_list_find()
/external/syslinux/core/fs/xfs/
Dxfs_dir2.c357 int mid = 0; in xfs_dir2_leaf_find_entry() local
392 mid = (low + high) >> 1; in xfs_dir2_leaf_find_entry()
393 if ((hash = be32_to_cpu(lep[mid].hashval)) == hashwant) in xfs_dir2_leaf_find_entry()
396 low = mid + 1; in xfs_dir2_leaf_find_entry()
398 high = mid - 1; in xfs_dir2_leaf_find_entry()
407 while (mid > 0 && be32_to_cpu(lep[mid - 1].hashval) == hashwant) in xfs_dir2_leaf_find_entry()
408 mid--; in xfs_dir2_leaf_find_entry()
410 for (lep = &leaf->ents[mid]; in xfs_dir2_leaf_find_entry()
411 mid < be16_to_cpu(leaf->hdr.count) && in xfs_dir2_leaf_find_entry()
413 lep++, mid++) { in xfs_dir2_leaf_find_entry()
[all …]

12345678910>>...15