permutohedral code