Implement DotProduct on GPU.