Added gather/gather_if APIs