(ap *shape.AP)
| 18 | } |
| 19 | |
| 20 | func NewIterator(ap *shape.AP) *Iterator { |
| 21 | xshape := make([]uint32, len(ap.Shape)) |
| 22 | xstride := make([]uint32, len(ap.Stride)) |
| 23 | |
| 24 | for i, v := range ap.Shape { |
| 25 | xshape[i] = uint32(v) |
| 26 | } |
| 27 | for i, v := range ap.Stride { |
| 28 | xstride[i] = uint32(v) |
| 29 | } |
| 30 | |
| 31 | return &Iterator{ |
| 32 | AP: ap, |
| 33 | UShape: xshape, |
| 34 | UStride: xstride, |
| 35 | UTrack: make([]uint32, len(ap.Shape)), |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | func (it *Iterator) IsDone() bool { |
| 40 | return it.Done |
no outgoing calls