[cfe-dev] casting vector types

Jochen Wilhelmy j.wilhelmy at arcor.de
Sat Oct 9 15:37:49 PDT 2010


Hi!

If I have float a; short b; then a = (float)b; works.
If I have float3 a; short3 b; then for a = (float3)b; I get the 
following error:

error: C-style cast from vector 'short3' to vector 'float3' of different 
size

Is this a bug or correct and if it is correct how do I cast from short3 
to float3?

-Jochen




More information about the cfe-dev mailing list