From 91f2bd5dd05e5e0ce3730274934dea52d795a661 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 15 Sep 2010 22:52:36 -0400 Subject: [PATCH] Cleaned up src/sorting/. --- content/sorting_algorithms/index.shtml | 16 +- src/average/Makefile | 2 +- src/average/average.c | 2 +- src/sorting/Makefile | 35 + src/sorting/README | 41 + src/sorting/bubble.c | 80 +- src/sorting/data.py | 11 + src/sorting/main.c | 104 + src/sorting/main.h | 2 + src/sorting/multi_lists | 4867 ------------------------ src/sorting/quicksort.c | 126 +- 11 files changed, 237 insertions(+), 5049 deletions(-) create mode 100644 src/sorting/Makefile create mode 100644 src/sorting/README create mode 100755 src/sorting/data.py create mode 100644 src/sorting/main.c create mode 100644 src/sorting/main.h delete mode 100644 src/sorting/multi_lists diff --git a/content/sorting_algorithms/index.shtml b/content/sorting_algorithms/index.shtml index f3b8a9d..e639763 100644 --- a/content/sorting_algorithms/index.shtml +++ b/content/sorting_algorithms/index.shtml @@ -41,9 +41,9 @@ data points.

use bubble sorting in production code.

Nevertheless, here is a simple implementation of the bubble sort -algorithm. The code bubble.c generates a -list of random numbers which are then ordered. The bubble sort -algorithm is certainly the easiest to implement and therefore the +algorithm. The code bubble.c +generates a list of random numbers which are then ordered. The bubble +sort algorithm is certainly the easiest to implement and therefore the easiest to parallelize.

Parallel Bubble Sort

@@ -82,11 +82,12 @@ random to totally ordered.

sorted. -

quicksort.c implements this -algorithm.

+

quicksort.c implements +this algorithm.

The merge component of this parallel implementation is the hardest -to code. The data set multi_lists, which +to code. The data +set multi_lists, which contains three short lists, can be used to practice with.

Parallel Quicksort Algorithm

@@ -102,6 +103,9 @@ worker nodes.

References

+The examples from this section are bundled in +sorting.tar.gz. +