jch

subroutine kernel compile error in brook

Discussion created by jch on Sep 1, 2010
Latest reply on Sep 2, 2010 by jch
brook, IL, CAL compile, assembly

<topic 1>

subroutine kernel error

-----------

kernel void helper(float a, float b, out float c)

{

c=a+b;

}

kernel void sum(float a<>, float b<>, out float c<>

{

helper(a,b,c);

}

----------------------------

error msg : Not support kernel local\parameter data structure type:non-reduce output parameter must be stream type.

how to use sub-soutine?

 

<topic 2>

I tested sha1 function as subroutine.
when I compile IL to ISA, sha1 subroutine is compiled as inline function.
------------------------------------------
mov r301, r1011
mov r302, r1012
call 38    ; sha1 function
mov r1013, r303
mov r1014, r304
....
mov r301, r1011
mov r302, r1012
call 38    ; sha1 function
mov r1013, r303
mov r1014, r304..
....repeat
--------------------------------------------

inlined sha1 code asm (Not calling)

inlined sha1 code asm (Not calling)

--------------------------------------------

IL code use call sha1, but asm code is assembled as inline code.
but i think that large code is slower than short code.
i want that sha1 subroutine is not inline function.
Can i control? is there a option for compile?
or another trick?

Outcomes