I have tried to change the reduction kernel sample to work with float4 numbers. It turns out that the kernel produces some minor errors when adding numbers. The reference CPU reduction is different from OpenCL reduction. It differs by 0.01% but if I have like a million values then the error is pretty huge.

Can someone confirm this, or am I doing something wrong.

With float works but with float4 it doesn't;

Tried the CPU context and GPU.

I have Radeon 4870, Windows 7 64bit.

Actually, if the length of input data is somewhat large, it also fails for simple float. I have just changed the kernels and everything in Reduction.cpp from uint4 to float and sometimes I get good results and sometimes bad.

Does anyone know where is the problem?