* @brief Transforms each element in an array and stores the result in another array. * * @param base Pointer to the start of the input array. * @param num Number of elements in the array. * @param size Size of each element in bytes. * @param result Pointer to the output array where the results will be stored. * @param op Transformation function to apply to each element. */
| 960 | /* [cut1, n1) and [n1, n1 + cut2) swap places */ |
| 961 | alg_rotate_bytes(a + cut1 * sz, (n1 - cut1) * sz, cut2 * sz); |
| 962 | size_t mid = cut1 + cut2; |
| 963 | /* the smaller half recursively, the larger one in this loop */ |
| 964 | if (cut1 + cut2 < (n1 - cut1) + (n2 - cut2)) { |
| 965 | alg_merge_no_buffer(a, cut1, cut2, sz, comp); |
| 966 | a += mid * sz; |
| 967 | n1 -= cut1; |
| 968 | n2 -= cut2; |
| 969 | } |
| 970 | else { |
| 971 | alg_merge_no_buffer(a + mid * sz, n1 - cut1, n2 - cut2, sz, comp); |
| 972 | n1 = cut1; |
| 973 | n2 = cut2; |
| 974 | } |
| 975 | } |
| 976 | } |
| 977 |
nothing calls this directly
no outgoing calls
no test coverage detected