rexiaoyu

Can I get the thread number in the kernel?

Discussion created by rexiaoyu on Aug 4, 2009
Latest reply on Aug 7, 2009 by gaurav.garg

 

After the .br file was complied by brcc, I find the code below in the generated .hlsl file

 

struct csThreadInfo 

    int tid : SV_RelThreadId; 

    int atid : SV_AbsThreadId; 

    int gid : SV_ThreadGroupId; 

}

[NumThreads(64)]

void 

main (csThreadInfo __threadInfo)

{

int4 __indexof_c;

int4 __indexofoutput;

__indexofoutput = __getOutputIndex(__threadInfo.atid, __outputStreamShape, __outputBufferShape);

__indexof_c = __indexofoutput;

locate(

__indexof_c );

}

 

Can I get the tid, atid, gid information in the kernel, written in Brook+?



Outcomes