[PATCH] Allow casts of mixed-size same-arity vectors

Stephen Canon scanon at apple.com
Thu Sep 12 14:48:01 PDT 2013


On Sep 12, 2013, at 2:46 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> ----- Original Message -----
>> On Sep 12, 2013, at 2:14 PM, Hal Finkel <hfinkel at anl.gov> wrote:
>> 
>>> I've been thinking about constructing a patch to implement
>>> __builtin_vectorconvert(type, value), do you think that is a
>>> reasonable approach?
>> 
>> It would be nice if what you come up with is capable of being
>> extended to include rounding and saturation, like the OpenCL
>> convert_* ops.  Obviously that blows up the space enormously, so I
>> wouldn’t expect anyone to do them all at once.
> 
> Do you have a recommended design? I could do something like this:
>  __builtin_vectorconvert(type, value, rnd = 0, sat = 0)
> where the last two parameters are integers with default values specifying the rounding mode and a saturation parameter.

I am very much the wrong person to ask, but that seems reasonable to me.

– Steve



More information about the cfe-commits mailing list