VecI32.generate constructor
Implementation
factory VecI32.generate(int length, int Function(int i) generator) {
final pp = calloc<cvg.VecI32>()..ref.length = length;
pp.ref.ptr = calloc<ffi.Int32>(length);
for (var i = 0; i < length; i++) {
final v = generator(i);
pp.ref.ptr[i] = v;
}
return VecI32.fromPointer(pp);
}