Can I use both extern _shared_ a[] and _share_ b? shared memory

Can I use both dyn and stat shared memory in 1 kernel, e.g.,
both extern shared a and share b in a kernel?
I should merely try it, although I haven’t the real card. no reply, thanks.

yes, i can. but a little slower than using extern only.

so i packed the shared int var into the extern shared int a.

If you don’t have the real card, how did you try it, and how do you know it is slower? It shouldn’t really be any slower beyond the cost of any extra instructions you use to access more variables.

Are you just running in emulation? Emulation performance is not an indication of device performance.


Thanks very much! I’ve just got the card (using VNC remotely) and pasted the 2nd post. :) the slower i mentioned was just 1ms or so out of 40ms, and the timing was fluctuating now and then, so I agree with you that they are the same if no extra acess instructions.