implemented solve_gpu