| 259 | } |
| 260 | |
| 261 | iterator end() const override |
| 262 | { |
| 263 | if constexpr (impl::has_data_member_function_v<I> && !impl::is_scalar_v<I> && |
| 264 | !impl::has_is_none_member_variable_v<I>) { |
| 265 | auto sh = shape(); |
| 266 | auto subvolume = std::accumulate(sh.begin() + 1, sh.end(), 1L, std::multiplies<int64_t>()) * |
| 267 | nd::dtype_bytes(impl_.dtype()); |
| 268 | auto d = std::span<const uint8_t>(impl_.data().data() + impl_.data().size(), subvolume); |
| 269 | return iterator(data_iterator(impl_.owner(), d, icm::shape(sh.begin() + 1, sh.end()), impl_.dtype())); |
| 270 | } else if constexpr (impl::has_end_member_function_v<I>) { |
| 271 | return iterator(impl_.end()); |
| 272 | } else { |
| 273 | throw invalid_operation("end() method is not implemented for this array."); |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | array get(int64_t index) const override; |
| 278 |
nothing calls this directly
no test coverage detected