add shared memory support 2D