cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Peterp
Journeyman III

Operator : ?

Hi,

 

i've the following kernel, i call it with a 5x5 inputstream, but in the resultstream every value is zero? What is wrong with this kernel i want the first  row to be set to 6.0

 

kernel void twopi(double input<>, out double out_result<>

{

int index = instance().y;

out_result = ((index==0)?6.0:1.0);

}

0 Likes
3 Replies
gaurav_garg
Adept I

Is output stream also of the same size?

0 Likes

There seems to be some problem with ?: operator. Using if-else works fine.

0 Likes

Hi,

yes if works. But i'm using ? : in many other kernels isn't there a bugfix?

0 Likes