cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Bdot
Adept III

convert_* not working for vectors?

Hi,

the following excerpt of CL code:

  float4 qf;
  uint4  tmp=input_val;
  qf= convert_float(tmp);

fails to compile with the following error:

...\Temp\OCL9B29.tmp.cl(2289): error: bad argument
          type to opencl convert_* function: expected src and dst have the
          same number of elements
    qf= convert_float(tmp);
                      ^

qf and tmp both are vectors of size 4, or am I missing something? If it is a compiler error, then it would be nice to have that fixed in one of the next releases ...

 

Thanks,

Bdot

0 Likes
2 Replies

please use convert_float4 and not convert_float
0 Likes

Oh, of course! Thank you!

0 Likes