Blender V4.3
BLI_sort.h File Reference
#include <stdlib.h>

Go to the source code of this file.

Typedefs

typedef int(* BLI_sort_cmp_t) (const void *a, const void *b, void *ctx)

Functions

void BLI_qsort_r (void *a, size_t n, size_t es, BLI_sort_cmp_t cmp, void *thunk)

Typedef Documentation

◆ BLI_sort_cmp_t

typedef int(* BLI_sort_cmp_t) (const void *a, const void *b, void *ctx)

Quick sort (re-entrant).

Definition at line 18 of file BLI_sort.h.

Function Documentation

◆ BLI_qsort_r()

void BLI_qsort_r ( void * a,
size_t n,
size_t es,
BLI_sort_cmp_t cmp,
void * thunk )

Quick sort re-entrant.

Definition at line 76 of file sort.c.

References BLI_qsort_r(), CMP, med3(), min, swap, SWAPINIT, and vecswap.

Referenced by BLI_qsort_r(), BM_mesh_intersect_edges(), bpy_bmelemseq_sort(), and psys_thread_context_init_distribute().