Stencil generator code for the rle libraries