MCPcopy Create free account
hub / github.com/brimdata/super / arithAddIntViewView

Function arithAddIntViewView

runtime/vam/expr/arithfuncs.go:139–152  ·  view source on GitHub ↗
(lhs, rhs vector.Any)

Source from the content-addressed store, hash-verified

137}
138
139func arithAddIntViewView(lhs, rhs vector.Any) vector.Any {
140 ld := lhs.(*vector.View)
141 l := ld.Any.(*vector.Int)
142 lx := ld.Index
143 rd := rhs.(*vector.View)
144 r := rd.Any.(*vector.Int)
145 rx := rd.Index
146 n := lhs.Len()
147 out := vector.NewIntEmpty(lhs.Type(), n)
148 for k := range n {
149 out.Append(l.Value(uint32(lx[k])) + r.Value(uint32(rx[k])))
150 }
151 return out
152}
153
154func arithAddIntViewConst(lhs, rhs vector.Any) vector.Any {
155 ld := lhs.(*vector.View)

Callers

nothing calls this directly

Calls 5

NewIntEmptyFunction · 0.92
LenMethod · 0.65
TypeMethod · 0.65
AppendMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected