fillNHWC4D function
Fills an NHWC 4D tensor cache from a flat Float32List.
Implementation
@pragma('vm:prefer-inline')
void fillNHWC4D(
Float32List flat,
List<List<List<List<double>>>> cache,
int inH,
int inW,
) {
int k = 0;
final List<List<List<double>>> plane = cache[0];
for (int y = 0; y < inH; y++) {
final List<List<double>> row = plane[y];
for (int x = 0; x < inW; x++) {
final List<double> px = row[x];
px[0] = flat[k++];
px[1] = flat[k++];
px[2] = flat[k++];
}
}
}