shared memory declaration

Anybody know the differences between “shared float shared;” and " extern shared float shared;"

shared float shared means your kernel uses a fixed (at compile time) amount of shared memory.

You use the extern format when you want your kernel to use a dynmic amount of shared memory. You

need to pass how much shared memory the kernel uses when you invoke the kernel, like this:

myKernel<<< blocks, threads, SIZE >>>( … )

eyal

i get it , thanks a lot~~~