cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

mux85
Journeyman III

select function problem

Hi, I'm using the select function in a kernel different times with different parameters types. when i use it with all bool parameters it works corrctly, in another case i use it with uchar3 for the first 2 parameters and bool as 3rd parameter i get the following error from SKA:

can't find an instance for opencl builtin function.

why is that so? what's wrong in the way i use select?

thanks

0 Likes
4 Replies
genaganna
Journeyman III

Originally posted by: mux85 Hi, I'm using the select function in a kernel different times with different parameters types. when i use it with all bool parameters it works corrctly, in another case i use it with uchar3 for the first 2 parameters and bool as 3rd parameter i get the following error from SKA:

 

can't find an instance for opencl builtin function.

 

why is that so? what's wrong in the way i use select?

 

thanks

 

Which SDK you are using.   Please past your code here so that we can verify at my end also.

0 Likes

I'm using sdk 2.2. here is a very simple kernel to demonstrate the problem.

 

kernel void Kernel( ) { bool cond = true; uchar3 result = select((uchar3)(0), (uchar3)(255), cond); }

0 Likes

Originally posted by: mux85 I'm using sdk 2.2. here is a very simple kernel to demonstrate the problem.

 

 



condition must be 3-component vector as you are using 3-component vector for first 2 parameters.

0 Likes

thanks, i missed this.

EDIT: but there is no bool3, so what do i use?

0 Likes