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

Function NewIterator

niterator/premul/iterator.go:18–29  ·  view source on GitHub ↗
(ap *shape.AP)

Source from the content-addressed store, hash-verified

16}
17
18func NewIterator(ap *shape.AP) *Iterator {
19 premul := make([]int, len(ap.Shape))
20 for i := range ap.Shape {
21 premul[i] = (ap.Shape[i] - 1) * ap.Stride[i]
22 }
23
24 return &Iterator{
25 AP: ap,
26 Premul: premul,
27 Track: make([]int, len(ap.Shape)),
28 }
29}
30
31func (it *Iterator) IsDone() bool {
32 return it.Done

Callers 2

TestPremulFunction · 0.92
BenchmarkPremulFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestPremulFunction · 0.74
BenchmarkPremulFunction · 0.74