| 243 | dict dict_value(int64_t index) const override; |
| 244 | |
| 245 | iterator begin() const override |
| 246 | { |
| 247 | if constexpr (impl::has_data_member_function_v<I> && !impl::is_scalar_v<I> && |
| 248 | !impl::has_is_none_member_variable_v<I>) { |
| 249 | auto sh = shape(); |
| 250 | auto subvolume = std::accumulate(sh.begin() + 1, sh.end(), 1L, std::multiplies<int64_t>()) * |
| 251 | nd::dtype_bytes(impl_.dtype()); |
| 252 | auto d = std::span<const uint8_t>(impl_.data().data(), subvolume); |
| 253 | return iterator(data_iterator(impl_.owner(), d, icm::shape(sh.begin() + 1, sh.end()), impl_.dtype())); |
| 254 | } else if constexpr (impl::has_begin_member_function_v<I>) { |
| 255 | return iterator(impl_.begin()); |
| 256 | } else { |
| 257 | throw invalid_operation("begin() method is not implemented for this array."); |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | iterator end() const override |
| 262 | { |
nothing calls this directly
no test coverage detected