shared for CL and CU

global and shared working for both. register working only for CL.