Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add memory mapping #39

Merged
merged 9 commits into from
Jan 12, 2023
Merged

Add memory mapping #39

merged 9 commits into from
Jan 12, 2023

Conversation

SebastianM-C
Copy link
Owner

@SebastianM-C SebastianM-C commented Sep 30, 2022

This adds MmapedVariable and MmapedParticleMesh, which memory map the underlying SDF blocks.

MmapedVariable is used for PlainVariableBlockHeader & PointVariableBlockHeader and will provide a reshaped array matching the block size.

MmapedParticleMesh is used for PointMeshBlockHeader and it also needs the user to supply the axis, as the blocks contain the data for all axes.

Since PlainMeshBlockHeader is the mesh given by the "grid" block (the grid for fields), there's no need to mmap it, we can just represtent it with a range.

This PR also introduces a breaking change in the represontation of blocks, we now use dictionaries with strings instead of symbols, as there was no advantage of using symbols and we were always converting stings to symbols.

@codecov
Copy link

codecov bot commented Sep 30, 2022

Codecov Report

Merging #39 (b7814f0) into master (4cbe9ed) will decrease coverage by 9.57%.
The diff coverage is 38.77%.

❗ Current head b7814f0 differs from pull request most recent head f85622d. Consider uploading reports for the commit f85622d to get more accurate results

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
- Coverage   92.10%   82.53%   -9.58%     
==========================================
  Files           8        9       +1     
  Lines         266      292      +26     
==========================================
- Hits          245      241       -4     
- Misses         21       51      +30     
Impacted Files Coverage Δ
src/mmap.jl 0.00% <0.00%> (ø)
src/SDFReader.jl 85.29% <100.00%> (+0.44%) ⬆️
src/read_chunk.jl 100.00% <100.00%> (ø)
src/utils.jl 75.00% <100.00%> (+2.27%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@SebastianM-C SebastianM-C merged commit 2d520ae into master Jan 12, 2023
@SebastianM-C SebastianM-C deleted the smc/mmap branch January 12, 2023 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant