Khronos public bugtracker – Bug 412
typedef cl_float4 cl_float3; in cl_platform.h
Last modified: 2011-01-17 13:14:39 PST
I've found follow text in cl_platform.h OpenCL 1.1 header file.
typedef cl_float4 cl_float3;
IHMO this can leads to uncaught errors in case
and some difficulties in case of function overloading.
The f.w = 1.0f doesn't bother me. float3 is for most intents and purposes float4, and a way to access the .w storage component is legitimately useful to avoid floating point stalls due to arithmetic done by the host vector unit on uninitialized data in the fourth element.
However, the declarations of float3 and float4 should be different enough that function overloading works properly. A host side dot(float3, float3) should do different things than a host side dot( float4, float4).