let rasterize functions work with any primitive type