Roll/unroll ordering, weight by layer function