Maximum element amount in shared memory

hi all,

i’ve tested the maximum element amount in shared memory is 4000, independ on the data type (float ,int or unsigned int.).
It seems that, the data in shared memory are all in 32-bit.

if the maximum update throughput over it, the compiler gives a fatal error LNK1181:“.\x64\Debug\cudaTest.cu.obj” can not…

Did anyone also test it? is my conjecture right?

No need for conjecture, just read Appendix G of the current programming guide. The limit is 16kb of shared memory per multiprocessor on all architectures except Fermi, where it is 48kb per multiprocessor.

thx! i mean here the quantity of data on shared memory.

It was a conjecture, if, for example I define all data as unsigned int, maybe I can get more data in shared memory (for float–>max 4,000 data, for int -->max 16,000 data). but it seems, it takes also for unsigned int 4 byte in memory…

Um, you do realize that float, int and unsigned int are all 32 bit on pretty much every architecture these days?