replace the keyword

what should write at device in opencl code

Nothing. Since OpenCL has separate sources for the host and device parts, there is no need to qualify device functions.