Implement element_at() and row() to access the __shared__ array
no need to pad the __shared__ array