nativeAudioPointwise function
bool
nativeAudioPointwise(
- Float32List x,
- Float32List w,
- Float32List bias,
- Float32List y, {
- required int channels,
- 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;
}