MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / __pyx_bisect_code_objects

Function __pyx_bisect_code_objects

eval/CIPO_evaluation/pycocotools/_mask.c:13460–13480  ·  view source on GitHub ↗

CodeObjectCache */

Source from the content-addressed store, hash-verified

13458
13459/* CodeObjectCache */
13460 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
13461 int start = 0, mid = 0, end = count - 1;
13462 if (end >= 0 && code_line > entries[end].code_line) {
13463 return count;
13464 }
13465 while (start < end) {
13466 mid = start + (end - start) / 2;
13467 if (code_line < entries[mid].code_line) {
13468 end = mid;
13469 } else if (code_line > entries[mid].code_line) {
13470 start = mid + 1;
13471 } else {
13472 return mid;
13473 }
13474 }
13475 if (code_line <= entries[mid].code_line) {
13476 return mid;
13477 } else {
13478 return mid + 1;
13479 }
13480}
13481static PyCodeObject *__pyx_find_code_object(int code_line) {
13482 PyCodeObject* code_object;
13483 int pos;

Callers 2

__pyx_find_code_objectFunction · 0.85
__pyx_insert_code_objectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected