Automatic Transformation And Optimization of Applications On Gpus And Gpu Clusters