multiply method Null safety

void multiply(
  1. Float32x4List out,
  2. int outOffset,
  3. Float32x4List A,
  4. int aOffset,
  5. Float32x4List B,
  6. int bOffset
)

out = A * B; Starting at outOffset, aOffset, and bOffset.

Implementation

static void multiply(Float32x4List out, int outOffset, Float32x4List A,
    int aOffset, Float32x4List B, int bOffset) {
  final a0 = A[aOffset++];
  final a1 = A[aOffset++];
  final a2 = A[aOffset++];
  final a3 = A[aOffset++];
  final b0 = B[bOffset++];
  out[outOffset++] = b0.shuffle(Float32x4.xxxx) * a0 +
      b0.shuffle(Float32x4.yyyy) * a1 +
      b0.shuffle(Float32x4.zzzz) * a2 +
      b0.shuffle(Float32x4.wwww) * a3;
  final b1 = B[bOffset++];
  out[outOffset++] = b1.shuffle(Float32x4.xxxx) * a0 +
      b1.shuffle(Float32x4.yyyy) * a1 +
      b1.shuffle(Float32x4.zzzz) * a2 +
      b1.shuffle(Float32x4.wwww) * a3;
  final b2 = B[bOffset++];
  out[outOffset++] = b2.shuffle(Float32x4.xxxx) * a0 +
      b2.shuffle(Float32x4.yyyy) * a1 +
      b2.shuffle(Float32x4.zzzz) * a2 +
      b2.shuffle(Float32x4.wwww) * a3;
  final b3 = B[bOffset++];
  out[outOffset++] = b3.shuffle(Float32x4.xxxx) * a0 +
      b3.shuffle(Float32x4.yyyy) * a1 +
      b3.shuffle(Float32x4.zzzz) * a2 +
      b3.shuffle(Float32x4.wwww) * a3;
}