Updating the CPU folding algorithm for the new memory layout of
nrSamplesPerBin.