Overview:
This week, we have provided three files which you will need,
batcher.c,
batcher.h, and
Sort.c.
You are asked to accomplish three different tasks:
TaskA: use random floats and count comparisons used
TaskB: print out sequence of exchanges and parallel stages
TaskC: implement a block sort
Each task is to be acomplished purely by modifying Sort.c. You are
not allowed to modify either batcher.c or batcher.h. Please
do not submit batcher.c or batcher.h -- we will use the
originals.
For each of the three tasks, you are to submit a separate version of
Sort.c, modified accordingly. Of course, to submit these, you must
give each version a different name (may we suggest SortA.c, SortB.c
and SortC.c for the three different tasks?). For this week's
readme file, please provide a single file, which includes a
separate section for each of the three tasks, containing any required
information.
Below we summarize exactly what is required for each task. This week,
the checklist will not contain a "progress steps" list, as the steps for
progress are clearly written in the original assignment.
Want to see one example of a blocksort in action? click here.
Requirements:
Possible Progress Steps:
These are purely suggestions for how you might make progress. You do
not have to follow these steps.
TaskA: self-explanatory
TaskB: before you worry about parallel stages, you can first try
to output the sequence of compexch calls made, to compare with the
lists given for N=2,4,8 in the assignment. However this is NOT the
output which we ask for in the readme, only a step for your progress.
TaskC: you better be familiar with Chapter 11 of the text!
cos226 Home Page
rs@cs.princeton.edu
Last modified: February 14, 2001