Hi there, I try to get this old zig code to work:
https://gist.github.com/svaniksharma/9ad2fa148254ac74b02940326090b18d
it contains the following for reserving memory for a matrix:
var matrix: [][]f64 = undefined;
matrix = try allocator.alloc([]f64, N);
for (matrix) |*row| {
row.* = try allocator.alloc(f64, N);
std.mem.set(f64, row.*, 0);
}
Now the std.mem.set is deprecated and one should use std.mem.zeroes. Sadly I have no idea how to do that.
I tried std.mem.zeroes(f64) as well as row.* = std.mem.zeroes([]f64) but I think I don't understand the syntax.
Help appreciated!