MCPcopy Create free account
hub / github.com/egonelbre/exp / NewIterator

Function NewIterator

niterator/instruct/iterator.go:20–37  ·  view source on GitHub ↗
(ap *shape.AP)

Source from the content-addressed store, hash-verified

18}
19
20func 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
39func (it *Iterator) IsDone() bool {
40 return it.Done

Callers 2

TestInstructFunction · 0.92
BenchmarkInstructFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestInstructFunction · 0.74
BenchmarkInstructFunction · 0.74