Re-implementation of FindPhysicalIndex that uses trivial linear-search instead of the more efficient implementation.
| 33 | // Re-implementation of FindPhysicalIndex that uses trivial linear-search |
| 34 | // instead of the more efficient implementation. |
| 35 | int64_t FindPhysicalIndexTestImpl(const RunEndCType* run_ends, int64_t run_ends_size, |
| 36 | int64_t i, int64_t absolute_offset = 0) { |
| 37 | for (int64_t j = 0; j < run_ends_size; j++) { |
| 38 | if (absolute_offset + i < run_ends[j]) { |
| 39 | return j; |
| 40 | } |
| 41 | } |
| 42 | return run_ends_size; |
| 43 | } |
| 44 | }; |
| 45 | TYPED_TEST_SUITE_P(ReeUtilTest); |
| 46 |