shared memory usage

I’m trying to figure out what exacly shared memory usage means.
For exaples:

1> ptxas info : Compiling entry function ‘_Z16scan_test_kernelIiL10scan_types0ELi256ELi0EEvi’
1> ptxas info : Used 8 registers, 3092+1044 bytes smem, 12 bytes cmem[1]

I know exacly what usage of registers and contant memory is.
However I’m a little bit confused by the usage of shared memory.

What is means 3092+1044 bytes of shared memory?
Do I use 3092 bytes or the sum of both?
I tried to increase amount of shared memory used by 4 bytes. Both numbers were increased to 3096+1048.
I tried to decrease the amount of shread memory used by 4 bytes. Both numbers were decreased to 3088+1040
I’m a little bit confused. Can someone clarify it?

I’m confused too. but I know the result. The shared memory used in your code is (3092+1044) bytes.

It is just 3092 bytes. The second number is something internal to the ptx assembler and can be safely ignored. You can easily confirm this for yourself by allocating close to 16kb of share memory to a kernel, and you will see that the sum of the two numbers will be well over the 16kb of shared memory available on all current hardware.