c2g,stress: use sampler and iterator instead of temporary linear buffers

For low radiuses, this makes the op slower - but for larger radiuses it makes
it faster since the temporary memory requirements does not scale with the
radius.