The hourglass permutation implementation