I work under Windows XP sp3 and 7 pro under my OpenCL app with VS2005 and VS 2008. In both cases i ve received error when i try to address to .x .y .z components of cl_float4 or cl_float3 types on host side like
cl_float4 VS;
VS.x=1.0f; //error C2039: ‘x’ : is not a member of ‘cl_float4’
or VS.s1=1.0f;
I think problem is in cl_platform.h
typedef union
{
cl_float CL_ALIGNED(16) s[4];
#if defined( GNUC) && ! defined( STRICT_ANSI )
extension struct{ cl_float x, y, z, w; };
extension struct{ cl_float s0, s1, s2, s3; };
extension struct{ cl_float2 lo, hi; };
#endif
#if defined( CL_FLOAT2)
__cl_float2 v2[2];
#endif
#if defined( CL_FLOAT4)
__cl_float4 v4;
#endif
}cl_float4;