Rewrite gather using meta_kernel