shape at given dimension, with boundary check
| 374 | |
| 375 | //! shape at given dimension, with boundary check |
| 376 | size_t shape(size_t dim) const { |
| 377 | mgb_assert(dim < m_layout.ndim); |
| 378 | return m_layout.shape[dim]; |
| 379 | } |
| 380 | |
| 381 | //! get ptr at given index |
| 382 | template <typename T, typename Iter> |
no outgoing calls