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

Function NewIterator

niterator/onearrpremul/iterator.go:24–36  ·  view source on GitHub ↗
(ap *shape.AP)

Source from the content-addressed store, hash-verified

22}
23
24func NewIterator(ap *shape.AP) *Iterator {
25 track := make([]Index, len(ap.Shape))
26 for i := range ap.Shape {
27 track[i].Shape = uint32(ap.Shape[i])
28 track[i].Stride = uint32(ap.Stride[i])
29 track[i].Premul = uint32((ap.Shape[i] - 1) * ap.Stride[i])
30 }
31
32 return &Iterator{
33 AP: ap,
34 Track: track,
35 }
36}
37
38func (it *Iterator) IsDone() bool {
39 return it.Done

Callers 2

TestOnearrPremulFunction · 0.92
BenchmarkOnearrPremulFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestOnearrPremulFunction · 0.74
BenchmarkOnearrPremulFunction · 0.74