multiply method

void multiply (Float32x4List out, int outOffset, Float32x4List A, int aOffset, Float32x4List B, 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 Float32x4 a0 = A[aOffset++];
  final Float32x4 a1 = A[aOffset++];
  final Float32x4 a2 = A[aOffset++];
  final Float32x4 a3 = A[aOffset++];
  final Float32x4 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 Float32x4 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 Float32x4 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 Float32x4 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;
}