Implement sqr() and exp() for GPUDevice.