maximum shared memory size

Dear All;

my GPU(GT 740m) shared memory is with maximum size of 48k
what is the maximum size for shared memory for square matrix of floats??

A float is 4 bytes.

Therefore we require x^2 to be less than (48k/4).

So a float matrix of dimensions 110x110 should fit in a 48kb shared memory array. (110x110x4 = 48400 bytes, 48kbytes = 49152 bytes)

Note that making allocation/usage decisions like this will generally limit your occupancy to one threadblock per SM.

thanks
can you explain more on this:

Note that making allocation/usage decisions like this will generally limit your occupancy to one threadblock per SM.

my gpu have 2 SMs

Shared memory is allocated per threadblock.

If a single threadblock requires approximately 48kb of shared memory, that will prevent other threadblocks from executing on that SM, until the existing threadblock is completed/retired.