Hi,
I’m having a compiling issue.
cl_float2 p;
p.x = 1.0;
p.y = 1.0;
reports the error:
‘x’ is not a member of cl_float2
‘y’ is not a member of cl_float2
The same happens with cl_float4, but
p.s[0]=1.0; and p.s[1]=1.0; works fine.
Looking at cl_platform.h:
typedef union
{
cl_float CL_ALIGNED(8) s[2];
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
__extension__ struct{ cl_float x, y; };
__extension__ struct{ cl_float s0, s1; };
__extension__ struct{ cl_float lo, hi; };
#endif
#if defined( __CL_FLOAT2__)
__cl_float2 v2;
#endif
}cl_float2;
the extensions are not defined. I mean, GNUC and STRICT_ANSI are not defined so it just define s[2]. Anyone knows how to solve it?
I’m working on windows 7 x64, visual studio 2008, NVIDIA CUDA SDK 3.2. The projects is compiled and linked in win32 not x64.
Any help will be apreciated. Thanks