Discussion created by Meteorhead on Aug 19, 2011
Latest reply on Aug 20, 2011 by Meteorhead
worked before, now it doesn't

Somebody tell me why are the following lines returning a compiler error!

The ^ mark is pointing at the T symbol, but nonetheless, nothing in the expression should be entity of float, everything is cast to float4.

This code worked before, but now it doesn't with SDK 2.5 and Catalyst 11.8 under Win7 64-bit.


void calculateTS(uint chainlength, uint vectors_per_thread, __global int4* height, __global uint4* share, __global int4* output_T, __global float4* output_S) { uint my_share; int4 x; int4 T = (int4)0; float4 S = (float4)0; float4 one_per_m_T; ... ... // T has now been calculated one_per_m_T = ( (float4)(T) / ( (float4)(32.0f * (float4)vectors_per_thread) ) ); ... ... } ERROR IS: OpenCL Compile Error: clBuildProgram failed (CL_BUILD_PROGRAM_FAILURE). Line 321: error: a value of type "int4" cannot be used to initialize an entity of type "float" one_per_m_T = (float4)(T) / ( 32.0f * (float4)vectors_per_thread); ^