Factor out unnecessary conditionals between vector unit and scalar unit global memory