Remove Sort_merge It isn't called from Lucy anymore.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/2415bafb Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/2415bafb Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/2415bafb Branch: refs/heads/master Commit: 2415bafb96e30d9aac1828894a0ca25e8742dac6 Parents: fbd7385 Author: Nick Wellnhofer <[email protected]> Authored: Sun May 15 12:13:24 2016 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Sun May 15 17:57:34 2016 +0200 ---------------------------------------------------------------------- runtime/core/Clownfish/Util/SortUtils.c | 24 ------------------------ runtime/core/Clownfish/Util/SortUtils.cfh | 18 ------------------ 2 files changed, 42 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/2415bafb/runtime/core/Clownfish/Util/SortUtils.c ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/Util/SortUtils.c b/runtime/core/Clownfish/Util/SortUtils.c index 1fe8b29..f718c43 100644 --- a/runtime/core/Clownfish/Util/SortUtils.c +++ b/runtime/core/Clownfish/Util/SortUtils.c @@ -61,30 +61,6 @@ Sort_mergesort(void *elems, void *scratch, size_t num_elems, size_t width, } } -void -Sort_merge(void *left_ptr, size_t left_size, - void *right_ptr, size_t right_size, - void *dest, size_t width, CFISH_Sort_Compare_t compare, - void *context) { - switch (width) { - case 0: - THROW(ERR, "Parameter 'width' cannot be 0"); - break; - case 4: - SI_merge(left_ptr, left_size, right_ptr, right_size, - dest, 4, compare, context); - break; - case 8: - SI_merge(left_ptr, left_size, right_ptr, right_size, - dest, 8, compare, context); - break; - default: - SI_merge(left_ptr, left_size, right_ptr, right_size, - dest, width, compare, context); - break; - } -} - #define WIDTH 4 static void S_msort4(void *velems, void *vscratch, size_t left, size_t right, http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/2415bafb/runtime/core/Clownfish/Util/SortUtils.cfh ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/Util/SortUtils.cfh b/runtime/core/Clownfish/Util/SortUtils.cfh index de9b03b..f3322e6 100644 --- a/runtime/core/Clownfish/Util/SortUtils.cfh +++ b/runtime/core/Clownfish/Util/SortUtils.cfh @@ -37,24 +37,6 @@ inert class Clownfish::Util::SortUtils nickname Sort { inert void mergesort(void *elems, void *scratch, size_t num_elems, size_t width, CFISH_Sort_Compare_t compare, void *context); - - /** Merge two source arrays together using the classic mergesort merge - * algorithm, storing the result in `dest`. - * - * Most merge functions operate on a single contiguous array and copy the - * merged results results back into the source array before returning. - * These two differ in that it is possible to operate on two discontiguous - * source arrays. Copying the results back into the source array is the - * responsibility of the caller. - * - * Lucy's external sort takes advantage of this when it is reading - * back pre-sorted runs from disk and merging the streams into a - * consolidated buffer. - */ - inert void - merge(void *left_ptr, size_t left_num_elems, - void *right_ptr, size_t right_num_elems, - void *dest, size_t width, CFISH_Sort_Compare_t compare, void *context); }
