| 585 | |
| 586 | template <class T> |
| 587 | FixedArray<int> |
| 588 | FixedVArray<T>::SizeHelper::getitem_slice (PyObject* index) const |
| 589 | { |
| 590 | size_t start = 0; |
| 591 | size_t end = 0; |
| 592 | size_t sliceLength = 0; |
| 593 | Py_ssize_t step; |
| 594 | extract_slice_indices (index, start, end, step, sliceLength, _a._length); |
| 595 | |
| 596 | FixedArray<int> f(sliceLength); |
| 597 | |
| 598 | if (_a._indices) |
| 599 | { |
| 600 | for (size_t i = 0; i < sliceLength; ++i) |
| 601 | { |
| 602 | f.direct_index(i) = _a._ptr[_a.raw_ptr_index(start + i*step)*_a._stride].size(); |
| 603 | } |
| 604 | } |
| 605 | else |
| 606 | { |
| 607 | for (size_t i = 0; i < sliceLength; ++i) |
| 608 | { |
| 609 | f.direct_index(i) = _a._ptr[(start + i*step)*_a._stride].size(); |
| 610 | } |
| 611 | } |
| 612 | |
| 613 | return f; |
| 614 | } |
| 615 | |
| 616 | template <class T> |
| 617 | FixedArray<int> |
nothing calls this directly
no test coverage detected