Does the shape skip over elements?
| 218 | |
| 219 | // Does the shape skip over elements? |
| 220 | bool skips() const |
| 221 | { |
| 222 | assert(m_lens.size() == m_strides.size()); |
| 223 | if(elements() == 1) |
| 224 | return false; |
| 225 | return std::none_of(m_strides.begin(), m_strides.end(), [](auto x) { return x == 1; }); |
| 226 | } |
| 227 | |
| 228 | std::shared_ptr<shape_impl> copy() const { return std::make_shared<shape_impl>(*this); } |
| 229 | }; |