| 43 | #define TIMSORT_STACK_SIZE 128 |
| 44 | |
| 45 | static npy_intp |
| 46 | compute_min_run(npy_intp num) |
| 47 | { |
| 48 | npy_intp r = 0; |
| 49 | |
| 50 | while (64 < num) { |
| 51 | r |= num & 1; |
| 52 | num >>= 1; |
| 53 | } |
| 54 | |
| 55 | return num + r; |
| 56 | } |
| 57 | |
| 58 | typedef struct { |
| 59 | npy_intp s; /* start pointer */ |