Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ahash = { version = "0.8.12", optional = true }
hashbrown = { version = "0.15", optional = true }
parking_lot = { version = "0.12", optional = true }
regex = { version = "1.12.3", optional = true }
vec64 = { version = "0.5.1" }
vec64 = { version = "0.5.2" }
log = { version = "0.4.29", optional = true }

[dev-dependencies]
Expand Down
5 changes: 3 additions & 2 deletions src/structs/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ impl Matrix {
pub fn new(n_rows: usize, n_cols: usize, name: Option<impl Into<String>>) -> Self {
let stride = aligned_stride(n_rows);
let len = stride * n_cols;
let mut vec = Vec64::with_capacity(len);
vec.resize(len, 0.0);
// SAFETY: Zero bits are a valid `f64`, and the allocator's zeroed path hands
// back untouched zero pages
let vec = unsafe { Vec64::zeroed(len) };
let data = Arc::new(Buffer::from_vec64(vec));
Matrix {
n_rows,
Expand Down
Loading