Draft GPU linesearch - needs improving
First draft of GPU linesearch