Skip to content

Commit

Permalink
Merge branch 'master' into merge-sews
Browse files Browse the repository at this point in the history
  • Loading branch information
imrn99 committed Dec 12, 2024
2 parents f0c9741 + 2b7e7fc commit 5f6835d
Show file tree
Hide file tree
Showing 28 changed files with 838 additions and 1,520 deletions.
2 changes: 1 addition & 1 deletion benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ honeycomb.workspace = true
rayon.workspace = true

[dev-dependencies]
honeycomb-core = { workspace = true, features = ["utils"] }
honeycomb-core.workspace = true
criterion = { workspace = true, features = ["html_reports"] }
iai-callgrind.workspace = true
rand = { workspace = true, features = ["small_rng"] }
Expand Down
8 changes: 1 addition & 7 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ publish = false
autoexamples = false

[dev-dependencies]
honeycomb-core = { workspace = true, features = ["utils", "io"] }
honeycomb-core = { workspace = true }
honeycomb-render = { workspace = true }
honeycomb-kernels = { workspace = true }
rand = { workspace = true, features = ["small_rng"] }
Expand All @@ -33,12 +33,6 @@ path = "examples/io/read.rs"
name = "io_write"
path = "examples/io/write.rs"

# memory usage

[[example]]
name = "memory_usage"
path = "examples/memory_usage/compute.rs"

# parallelization

[[example]]
Expand Down
27 changes: 0 additions & 27 deletions examples/examples/memory_usage/compute.rs

This file was deleted.

259 changes: 0 additions & 259 deletions examples/examples/memory_usage/plot.py

This file was deleted.

6 changes: 2 additions & 4 deletions honeycomb-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ keywords.workspace = true
authors.workspace = true
publish = true

[features]
io = ["dep:vtkio"]
utils = []
# [features]

# deps

Expand All @@ -25,7 +23,7 @@ loom.workspace= true
num-traits.workspace = true
stm.workspace = true
thiserror.workspace = true
vtkio = { workspace = true, optional = true }
vtkio.workspace = true

[build-dependencies]
rustversion.workspace = true
21 changes: 0 additions & 21 deletions honeycomb-core/src/attributes/collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,24 +204,3 @@ impl<A: AttributeBind + AttributeUpdate> AttributeStorage<A> for AttrSparseVec<A
self.remove_core(trans, &id)
}
}

#[cfg(feature = "utils")]
impl<T: AttributeBind + AttributeUpdate> AttrSparseVec<T> {
/// Return the amount of space allocated for the storage.
#[must_use = "returned value is not used, consider removing this method call"]
pub fn allocated_size(&self) -> usize {
self.data.capacity() * std::mem::size_of::<Option<T>>()
}

/// Return the total amount of space used by the storage.
#[must_use = "returned value is not used, consider removing this method call"]
pub fn effective_size(&self) -> usize {
self.data.len() * std::mem::size_of::<Option<T>>()
}

/// Return the amount of space used by valid entries of the storage.
#[must_use = "returned value is not used, consider removing this method call"]
pub fn used_size(&self) -> usize {
self.n_attributes() * size_of::<TVar<Option<T>>>()
}
}
Loading

0 comments on commit 5f6835d

Please sign in to comment.