 		
 		float preVals[PREFETCH_SIZE]={0.0};
 		int preColls[PREFETCH_SIZE]={-1};
-		float dotI[PREFETCH_SIZE]={0,0};
-		float dotJ[PREFETCH_SIZE]={0,0};
+		//warning cuda doesn't initialize whole array with 0, 
+		float dotI[PREFETCH_SIZE]={0};
+		float dotJ[PREFETCH_SIZE]={0};
 
 		int maxEl = rowLength[rowIdx];
 		unsigned int j=0;
-		
+		//important!, explicit initialization with zeros
 		for( j=0; j<PREFETCH_SIZE;j++)			
 		{
 			dotI[j]=0.0f;

	__shared__ float shJSelfDot;
	__shared__ int shYI;
	__shared__ int shYJ;
	__shared__ int shRows;
	__shared__ int shClsSum;
	
	if(threadIdx.x==0)
	{
		shRows = num_rows;
		shClsSum= cls_count[0]+cls_count[1];
		shYI = y[idxI];
		shYJ = y[idxJ];

		
		int rIdx = th_cls_offset+th_cls*cls_count[0];
		//rbf
		results[rIdx]=y[rIdx]*shYI*expf(-GAMMA*(selfDot[rowIdx]+shISelfDot-2*dotI[0]));
		results[rIdx+shClsSum]=y[rIdx]*shYJ*expf(-GAMMA*(selfDot[rowIdx]+shJSelfDot-2*dotJ[0]));
	}
}






