MCPcopy Create free account
hub / github.com/microsoft/SandDance / eval

Function eval

docs/app/js/sanddance-app.js:141429–141447  ·  view source on GitHub ↗
(_, pulse)

Source from the content-addressed store, hash-verified

141427 return output;
141428 },
141429 eval (_, pulse) {
141430 const output = pulse.materialize().fork(), m = this._dims.length;
141431 let mask = 0;
141432 if (pulse.rem.length) {
141433 this.remove(_, pulse, output);
141434 mask |= (1 << m) - 1;
141435 }
141436 if (_.modified("query") && !_.modified("fields")) mask |= this.update(_, pulse, output);
141437 if (pulse.add.length) {
141438 this.insert(_, pulse, output);
141439 mask |= (1 << m) - 1;
141440 }
141441 if (pulse.mod.length) {
141442 this.modify(pulse, output);
141443 mask |= (1 << m) - 1;
141444 }
141445 this.value.mask = mask;
141446 return output;
141447 },
141448 insert (_, pulse, output) {
141449 const tuples = pulse.add, bits = this.value, dims = this._dims, indices = this._indices, fields = _.fields, adds = {}, out = output.add, n = bits.size() + tuples.length, m = dims.length;
141450 let k = bits.size(), j, key, add; // resize bitmaps and add tuples as needed

Callers 1

ensure_pythonFunction · 0.50

Calls 2

removeMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected