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

Function algorithm_all_of

algorithm/algorithm.c:664–677  ·  view source on GitHub ↗

* @brief Checks if all elements in a range satisfy a predicate. * * This function returns `true` if the predicate `pred` returns `true` 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 Predicat

Source from the content-addressed store, hash-verified

662 }
663 }
664 else if (done && pdq_partial_insertion(a, ln, sz, comp, tmp)
665 && pdq_partial_insertion(a + (pos + 1) * sz, rn, sz, comp, tmp)) {
666 return;
667 }
668
669 self(a, ln, sz, comp, tmp, bad, leftmost);
670 a += (pos + 1) * sz;
671 n = rn;
672 leftmost = 0;
673 }
674}
675
676static void pdq_loop_4(char *a, size_t n, size_t sz, AlgorithmCompareFunc comp, char *tmp, int bad, int leftmost) {
677 (void)sz;
678 pdq_loop_impl(a, n, 4, comp, tmp, bad, leftmost, pdq_loop_4);
679}
680

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected