MCPcopy Create free account
hub / github.com/KaisenAmin/c_std / algorithm_none_of

Function algorithm_none_of

algorithm/algorithm.c:722–735  ·  view source on GitHub ↗

* @brief Checks if none of the elements in a range satisfy a predicate. * * This function returns `true` if the predicate `pred` returns `false` for all elements in the range * `[base, base + num * size)`. Otherwise, it returns `false`. * * @param base Pointer to the start of the array. * @param num Number of elements in the array. * @param size Size of each element in bytes. * @param pred

Source from the content-addressed store, hash-verified

720 alg_copy_elem(out, s, sz);
721 out += sz;
722 r += take_r ? sz : 0;
723 l += take_r ? 0 : sz;
724 }
725 }
726 if (l != le) {
727 memcpy(out, l, (size_t)(le - l));
728 out += le - l;
729 }
730 if (r != re) {
731 memcpy(out, r, (size_t)(re - r));
732 }
733}
734
735/* Stable merge of two sorted runs of the SAME length n, a and b (= a + n),
736 * into out: the "parity merge" (Scandum's quadsort). The front picks the
737 * smallest remaining element and the back the largest, n steps each; ties
738 * go to `a` at the front and to `b` at the back, which keeps the merge

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected