nativeAudioPointwise function

bool nativeAudioPointwise(
  1. Float32List x,
  2. Float32List w,
  3. Float32List bias,
  4. Float32List y, {
  5. required int channels,
  6. required int positions,
})

Channel-major 1x1 convolution. Returns false without Accelerate.

Implementation

bool nativeAudioPointwise(
  Float32List x,
  Float32List w,
  Float32List bias,
  Float32List y, {
  required int channels,
  required int positions,
}) {
  if (channels <= 0 ||
      positions <= 0 ||
      x.length != channels * positions ||
      y.length != x.length ||
      w.length != channels * channels ||
      bias.length != channels) {
    throw ArgumentError('audio pointwise convolution: bad shapes');
  }
  return _audioPointwise(
        x.address,
        w.address,
        bias.address,
        y.address,
        channels,
        positions,
      ) ==
      1;
}