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

Function algorithm_for_each

algorithm/algorithm.c:586–595  ·  view source on GitHub ↗

* @brief Applies a function to each element in an array. * * @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 op Function to apply to each element. */

Source from the content-addressed store, hash-verified

584 }
585 ++f;
586 }
587 l = f;
588 }
589 }
590 size_t pos = f - 1;
591 if (pos) {
592 alg_swap_bytes(a, a + pos * sz, sz);
593 }
594 return pos;
595}
596
597/* Swaps a[i] and a[j] when they differ (pattern breaking). */
598ALG_INLINE void pdq_swap_idx(char *a, size_t i, size_t j, size_t sz) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected