Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove any reference to mergesort.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 14 Nov 2013 21:57:09 +0000 (22:57 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 14 Nov 2013 21:57:09 +0000 (22:57 +0100)
* it was in fact never used (see commit 7f6d42b)
* it's not standard
* according to http://www.freebsd.org/cgi/man.cgi?query=mergesort&sektion=3,
  - it may fail
  - it's generally slower than qsort
  - it has requirements on its parameter "size"
  - it requires additional memory

buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/src/internal_config.h.in
src/xbt/dynar.c
tools/spell/sg_stopwords.txt

index 54b63ae..78c06fa 100644 (file)
@@ -148,7 +148,6 @@ CHECK_FUNCTION_EXISTS(asprintf HAVE_ASPRINTF)
 CHECK_FUNCTION_EXISTS(vasprintf HAVE_VASPRINTF)
 CHECK_FUNCTION_EXISTS(makecontext HAVE_MAKECONTEXT)
 CHECK_FUNCTION_EXISTS(mmap HAVE_MMAP)
 CHECK_FUNCTION_EXISTS(vasprintf HAVE_VASPRINTF)
 CHECK_FUNCTION_EXISTS(makecontext HAVE_MAKECONTEXT)
 CHECK_FUNCTION_EXISTS(mmap HAVE_MMAP)
-CHECK_FUNCTION_EXISTS(mergesort HAVE_MERGESORT)
 
 #Check if __thread is defined
 execute_process(
 
 #Check if __thread is defined
 execute_process(
index 3e988d1..8400694 100644 (file)
@@ -58,9 +58,6 @@
 #cmakedefine MMALLOC_WANT_OVERRIDE_LEGACY @MMALLOC_WANT_OVERRIDE_LEGACY@
 #cmakedefine HAVE_MC @HAVE_MC@
 
 #cmakedefine MMALLOC_WANT_OVERRIDE_LEGACY @MMALLOC_WANT_OVERRIDE_LEGACY@
 #cmakedefine HAVE_MC @HAVE_MC@
 
-/* Set to true if have the mergesort function */
-#cmakedefine HAVE_MERGESORT @HAVE_MERGESORT@
-
 /* If have linux_futex.h */
 #cmakedefine HAVE_FUTEX_H @HAVE_FUTEX_H@
 
 /* If have linux_futex.h */
 #cmakedefine HAVE_FUTEX_H @HAVE_FUTEX_H@
 
index 26a8171..247a834 100644 (file)
@@ -6,7 +6,6 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "internal_config.h"
 #include "xbt/misc.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "xbt/misc.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
@@ -639,11 +638,7 @@ XBT_INLINE void xbt_dynar_cursor_rm(xbt_dynar_t dynar,
 XBT_INLINE void xbt_dynar_sort(xbt_dynar_t dynar,
                                int_f_cpvoid_cpvoid_t compar_fn)
 {
 XBT_INLINE void xbt_dynar_sort(xbt_dynar_t dynar,
                                int_f_cpvoid_cpvoid_t compar_fn)
 {
-#ifdef HAVE_MERGESORT
-  mergesort(dynar->data, dynar->used, dynar->elmsize, compar_fn);
-#else
   qsort(dynar->data, dynar->used, dynar->elmsize, compar_fn);
   qsort(dynar->data, dynar->used, dynar->elmsize, compar_fn);
-#endif
 }
 
 /** @brief Sorts a dynar according to their color assuming elements can have only three colors.
 }
 
 /** @brief Sorts a dynar according to their color assuming elements can have only three colors.
index bbb97a5..2c7cf96 100644 (file)
@@ -2558,8 +2558,6 @@ memset
 Memset
 memuse
 ment
 Memset
 memuse
 ment
-mergesort
-MERGESORT
 merr
 messageSize
 messageSizes
 merr
 messageSize
 messageSizes