GPU Algorithms for Large-Scale Optimization