Index problem

There is a command for have the same CUDA code on OpenCL:
int tx=threadIdx.x;??
and
int bx=blockIdx.x;??
i know function:get_global_id(0); ==blockIdx.x * blockDim.x + threadIdx.x;
Any solution? :?

ok i find soltuion:-)