addInPlace method

void addInPlace(
  1. ComplexArraySimd other
)

Adds another array element-wise to this array, in-place (SIMD accelerated).

Throws ArgumentError if arrays have different lengths.

Implementation

void addInPlace(ComplexArraySimd other) {
  if (length != other.length) {
    throw ArgumentError('Arrays must have the same length');
  }
  for (int i = 0; i < length; i++) {
    _data[i] = _data[i] + other._data[i];
  }
}