accumulateAdditive method

dynamic accumulateAdditive(
  1. int weight
)

Implementation

accumulateAdditive(int weight) {
  var buffer = this.buffer, stride = valueSize, offset = stride * _addIndex;

  if (cumulativeWeightAdditive == 0) {
    // add = identity

    _setIdentity();
  }

  // add := add + incoming * weight

  _mixBufferRegionAdditive(buffer, offset, 0, weight, stride);
  cumulativeWeightAdditive += weight;
}