Made groupsPerBlock depend on shared memory.