riza.guntur

Conditional reduction on vector, How to?[SOLVED]

Discussion created by riza.guntur on Aug 20, 2009
Latest reply on Aug 21, 2009 by riza.guntur
The cause is wrong stream size than expected

I want to do conditional reduction on vector like the following but I get incorrect result, is there any other way to do it?

reduce void cond_vec_red(float4 a, reduce float4 b){

if(a.x < b.x)

b.x = a.x

if(a.y< b.y)

b.y = a.y

if(a.y< b.y)

b.y = a.y

if(a.y< b.y)

b.y = a.y

if(a.y < b.y)

b.y = a.y

}

Outcomes