Optimising data-parallel programs for SIMD architectures via program transformation