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

Function arithAddIntViewFlat

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

Source from the content-addressed store, hash-verified

109}
110
111func arithAddIntViewFlat(lhs, rhs vector.Any) vector.Any {
112 ld := lhs.(*vector.View)
113 l := ld.Any.(*vector.Int)
114 lx := ld.Index
115 r := rhs.(*vector.Int)
116 n := lhs.Len()
117 out := vector.NewIntEmpty(lhs.Type(), n)
118 for k := range n {
119 out.Append(l.Value(uint32(lx[k])) + r.Value(k))
120 }
121 return out
122}
123
124func arithAddIntViewDict(lhs, rhs vector.Any) vector.Any {
125 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