cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

jean-claude
Journeyman III

instance operator (versus indexof)

Hi,

I'd like to use instance() versus indexof() but apparently neither StreamKernelAnalyzer nor Brook compiler recognize the token!?

0 Likes
4 Replies
gaurav_garg
Adept I

That's strange. Make sure you are using 1.3 Brook+ SDK. Try compiling samples under samples/CPP.

0 Likes

Well, this is a short test case :

kernel void k_test(out float4 bb<>, float4 aa<> ) {
    int4 i2d = instance(bb);
    bb=aa;
}

and the associated compiler error (coming from StreamKernelAnalyzer)

Line (9) : Error (parse error) before 'Identifier'
    int4 i2d = instance(bb);                         ^
1 errors found.
***Unable to parse Line

0 Likes

instance() doesn't take any input parameter. Hope it solves the problem.

0 Likes

done, thanks!

0 Likes