code wiki / (root) / nx_mergesort.nx

nx_mergesort.nx

buildroot/runtime/nx_mergesort.nx

2781 B87 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_mergesort.nx -- von-Neumann merge sort (top-down, stable). genealogy_id: von_neumann_1945_edvac lineage_id: stable_comparison_sort references: von Neumann 'First Draft of a Report on the EDVAC', 1945. Knuth TAoCP Vol 3 5.2.4. license: public_domain complexity: O(n log n) time worst-case, O(n) extra space.

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_tier.nx nx_mergesort.nx nx_mergesort_test.nx nx_triangulation_sort_string_graph

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_mergesort_test.nxnx_triangulation_sort_string_graph.nx

structs

none

consts

none

functions

25func nx_mergesort_merge(arr: *nx_int, lo: nx_idx, mid: nx_idx, hi: nx_idx,
called by 1: nx_mergesort_recur
69func nx_mergesort_recur(arr: *nx_int, lo: nx_idx, hi: nx_idx, aux: *nx_int) -> nx_int
80func nx_mergesort(arr: *nx_int, n: nx_idx) -> nx_int
called by 2: mainmain calls 2: sys_mmapnx_mergesort_recur