(&self, try_contiguous: bool, mut f: F)
| 278 | } |
| 279 | |
| 280 | pub fn for_each_segment<F>(&self, try_contiguous: bool, mut f: F) |
| 281 | where |
| 282 | F: FnMut(Range<isize>), |
| 283 | { |
| 284 | if self.ndim() == 0 { |
| 285 | f(0..self.itemsize as isize); |
| 286 | return; |
| 287 | } |
| 288 | if try_contiguous && self.is_last_dim_contiguous() { |
| 289 | self._for_each_segment::<_, true>(0, 0, &mut f); |
| 290 | } else { |
| 291 | self._for_each_segment::<_, false>(0, 0, &mut f); |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | fn _for_each_segment<F, const CONTIGUOUS: bool>(&self, mut index: isize, dim: usize, f: &mut F) |
| 296 | where |
no test coverage detected