use `@ngenerate` macro for mapreducedim!