[cfe-dev] is opencl-style select function supported?

Douglas Gregor dgregor at apple.com
Mon Sep 20 09:44:24 PDT 2010


On Sep 20, 2010, at 8:28 AM, Jochen Wilhelmy wrote:

> 
>> Are you referring to the OpenCL "vec.xyzw" syntax? If so, it's implemented in Clang and is represented by ExtVectorElementExpr.
>>   
> 
> no, i mean something like
> float4 a,b,c,d;
> float4 e = select(a, b, c < d);
> 
> clang does not seem to support
> float4 e = c < d ? a : b;
> for vectors, or is there a flag to switch this on?


I hope someone else will chime in; I'm not well-versed in the handling of vectors within Clang.

	- Doug



More information about the cfe-dev mailing list