static equivalent in opencl Kernel?

As we cant use static keyword in the kernel, how can we define the same definition of a variable,
so that it retains its old value.

Use an OpenCL Buffer object. It will retain value between kernel invocations and can be accessed with a pointer.