Second method for using shared memory
Provide more flexibiliy on block size choice