use macro to generate derived reducedim functions