I made a program that calculate the height of a crossing section between two line
After that I want to get the smallest height along with its clusterID (reduction, comparing x then if true copying xyzw to output)
Then I want to get the biggest height on smallest I've found before (reduction, comparing x then if true copying xyzw to output)
Then if the clusterID is in the same class as expected value, then I increase the number of correct items
After experimenting with same test case, I get different results. I don't do any randomization here.
I do a lot of copy operations. What I expect from copying is to get exact same value (compared to int to float conversion) to make another comparison, mostly equivalency. Funny thing is, equivalency comparison seems to take biggest hit, not just float, int too. BUT I found CPU backend produce consistent result.