threadIDX question

sometime I see code like this

test<<<1, 5,0,*str>>>(A, B, C); *str define as cudaStream_t *str

any idea what is this suppose doing.

It is launching that test kernel into a cuda stream pointed to by the str pointer.

You can read about cuda streams in the programming guide:

“cudaMemcpy on stream-A” and “kernel execution on stream-B” can be overlapped (when A != B).

this image is a screen-shot of Nsight’s timeline.
green/purple represents cudaMemcpy, and red kernels.

overlapped obviously :)

k thx I’m new at this, btw where do I open nsight timeline? I only saw the profile option

You will see ‘NSIGHT’ at menu-bar on Visual Studio IDE.

sorry I have no idea on Linux