[PATCH] Allow casts of mixed-size same-arity vectors
Hal Finkel
hfinkel at anl.gov
Wed Sep 11 15:34:41 PDT 2013
----- Original Message -----
> On Sep 11, 2013, at 3:29 PM, Hal Finkel < hfinkel at anl.gov > wrote:
>
>
>
>
>
> ----- Original Message -----
>
>
> ----- Original Message -----
>
>
> Hal —
>
> Am I understanding this correctly:
>
> vector4float x;
> vector4int16 y = (vector4int16)x; // this is a conversion
> vector4int32 z = (vector4int32)x; // this is a bitcast
>
> This seems confusing in the extreme.
>
> On the other hand, I don't really like the implied int-to-float
> bitcast semantics. Maybe it would be better to just add a warning
> for this case. What do you think?
>
> bitcast semantics for vector casts are an essential tool for SIMD
> programming. Essentially all warnings generated would be false
> positives.
Do you specifically mean in OpenCL, or generally? (I've worked on SIMD special function implementations, so I understand the utility).
-Hal
>
>
> – Steve
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the cfe-commits
mailing list