operator + method

FLeftMatrix operator +(
  1. FLeftMatrix right
)

Implementation

FLeftMatrix operator +(FLeftMatrix right) {
  assert(right.nRows == this.nRows);
  assert(right.nColumns == this.nColumns);
  FLeftMatrix result = FLeftMatrix.zero(this.nColumns, this.nRows);
  for (int r = 0; r < this.nRows; ++r) {
    Float32x4List resultRow = result.rowsData[r].buffer.asFloat32x4List();
    Float32x4List leftRow = this.rowsData[r].buffer.asFloat32x4List();
    Float32x4List rightRow = right.rowsData[r].buffer.asFloat32x4List();
    for (int i = 0; i < resultRow.length; ++i) {
      resultRow[i] = leftRow[i] + rightRow[i];
    }
  }
  return result;
}