Generalizing the algorithm
Reversing a sequence
p = &a[0]; q = &a[n];
while (p != q) {
swap(*p, *q);
++p;
if (p != q)
--q;
}
What dependencies have we removed?
Previous slide
Next slide
Back to first slide
View graphic version