I want to know how to use the ternary operator for vector in openCL. I think it should be ‘select’, in the specification:
say, I have a float4 for each work-item(thread)
// I want to do this for every component, i.e. y, z, w
I think writing it like this will slow down the program. I tried to use ‘select’, to just use one line, but don’t know how… Could anyone give me an example?
Thank you very much.