Moving dim calculation into the stack layout. am: 1bcf3c4742
am: 951e2e4fe3

* commit '951e2e4fe3b8bae1ecaba0f7706ef1eb202ab3a1':
  Moving dim calculation into the stack layout.