Porblem with kerenl output

Hi,

I have array C1[16]and in the kernel I try to copy the element of the C1 into the local memory C, and the I copy one element of local memory to the output buffer

NDRange globalNDRange(16);  

      NDRange localNDRange(8);

and the kernel code is:

int ar2 = get_global_id(0);			

 	__local float C[BLOCK_SIZE]; // BLOCK_SIZE is 16

	

//copy c array..............

	if(ar2 <12 )

	 {

	 C[ar2]	  = C1[ar2];

	 }	  

	barrier(CLK_LOCAL_MEM_FENCE);

	O[ar2]= C[2];// where C[2] = 1

and the output is:

idx = value(C[2]=1)

0 = 1

1 = 1

2 = 1

3 = 1

4 = 1

5 = 1

6 = 1

7 = 1

8 = 0

9 = 0

10 = 0

11 = 0

12 = 0

13 = 0

14 = 0

15 = 0

my question is, why the output from 7-15 is ‘0’, it should be ‘1’ since C[2] is ‘1’.