-
Notifications
You must be signed in to change notification settings - Fork 11
Proposed HDF5 input format and draft implementation #224
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
Open
The9Cat
wants to merge
47
commits into
main
Choose a base branch
from
InitFromHDF5
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
9dfd831
Version bump for devel
95becff
Added a development code-timing helper
435565d
Added bods2hdf5
1710889
Change the executable and source file name to hdf5bods
bea3f85
Added some OpenMP parallelism for a bit more throughput
89dcf59
Read exp-style hdf5 input files in Component
264da15
Give the user a hint if no conversion mode is specified
eac7302
Potential fix for pull request finding
The9Cat 67ffcd7
Potential fix for pull request finding
The9Cat 8d3dc08
Potential fix for pull request finding
The9Cat 8205360
Potential fix for pull request finding
The9Cat a4442dd
Potential fix for pull request finding
The9Cat ac77cb6
Potential fix for pull request finding
The9Cat d19a40a
Potential fix for pull request finding
The9Cat c54dda6
Potential fix for pull request finding
The9Cat 608b35d
Potential fix for pull request finding
The9Cat 17f9eac
Potential fix for pull request finding
The9Cat e5e338a
Potential fix for pull request finding
The9Cat f5a1536
Potential fix for pull request finding
The9Cat 0382300
Potential fix for pull request finding
The9Cat 6fec121
Potential fix for pull request finding
The9Cat 702a031
Updates for automatic datatype detection
9b98b99
Potential fix for pull request finding
The9Cat 00fd85f
Potential fix for pull request finding
The9Cat 2fd10ed
Potential fix for pull request finding
The9Cat 42e4f25
Remove unused mismatch flag in hdf5bods verification
Copilot 0930ad6
Potential fix for pull request finding
The9Cat 35a1abd
Verify aux fields in hdf5bods roundtrip check
Copilot 2f3d782
Use integer-safe aux-int diff in verify mode
Copilot a486ae0
White-space changes only for readability
b8e26d4
Potential fix for pull request finding
The9Cat e6db8e3
Potential fix for pull request finding
The9Cat 2700ef8
Fix m-field comment to mass
Copilot 35b3785
Added compression filter selection for testing
ab9ca77
Merge branch 'InitFromHDF5' of github.com:EXP-code/EXP into InitFromHDF5
06a3a5a
Add optional HDF5 particle index support
Copilot fac2cbe
Minor change to option documentation only
b59afd6
Potential fix for pull request finding
The9Cat 50b3076
Potential fix for pull request finding
The9Cat aa11000
Potential fix for pull request finding
The9Cat 3823cff
Added some Doxygen documentation to the Component header [no ci]
c1d573d
Merge branch 'InitFromHDF5' of github.com:EXP-code/EXP into InitFromHDF5
1f9b797
Looks like garbled merged; fix propsed
3a090f4
Move precision detection into the dataset reader function
72c66c3
Potential fix for pull request finding
The9Cat 4df6f29
Potential fix for pull request finding
The9Cat f18ed1f
docs: update Component.H to reflect per-dataset independent precision…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| #pragma once | ||
|
|
||
| #include <chrono> | ||
| #include <iostream> | ||
| #include <string> | ||
|
|
||
| class ScopeTimer { | ||
| public: | ||
| using Clock = std::chrono::steady_clock; | ||
|
|
||
| // Define units for output | ||
| enum class Unit { | ||
| Seconds, | ||
| Milliseconds, | ||
| Microseconds, | ||
| Nanoseconds | ||
| }; | ||
|
|
||
| // Default to Seconds if the user doesn't choose | ||
| explicit ScopeTimer(std::string task_name, Unit output_unit = Unit::Seconds) | ||
| : name(std::move(task_name)), unit(output_unit), start_time(Clock::now()) {} | ||
|
|
||
| // Output on deletion of the object | ||
| ~ScopeTimer() | ||
| { | ||
| const auto end_time = Clock::now(); | ||
| const auto delta = end_time - start_time; | ||
|
|
||
| // Convert natively using std::chrono based on user choice | ||
| switch (unit) { | ||
| case Unit::Seconds: { | ||
| std::chrono::duration<double> elapsed = delta; | ||
| std::cout << "[" << name << "] completed in " << elapsed.count() << " s\n"; | ||
| break; | ||
| } | ||
| case Unit::Milliseconds: { | ||
| std::chrono::duration<double, std::milli> elapsed = delta; | ||
| std::cout << "[" << name << "] completed in " << elapsed.count() << " ms\n"; | ||
| break; | ||
| } | ||
| case Unit::Microseconds: { | ||
| std::chrono::duration<double, std::micro> elapsed = delta; | ||
| std::cout << "[" << name << "] completed in " << elapsed.count() << " µs\n"; | ||
| break; | ||
| } | ||
| case Unit::Nanoseconds: { | ||
| std::chrono::duration<double, std::nano> elapsed = delta; | ||
| std::cout << "[" << name << "] completed in " << elapsed.count() << " ns\n"; | ||
| break; | ||
| } | ||
| default: | ||
| std::cerr << "Unknown time unit for ScopeTimer\n"; | ||
| break; | ||
| } | ||
| } | ||
|
|
||
| ScopeTimer(const ScopeTimer&) = delete; | ||
| ScopeTimer& operator=(const ScopeTimer&) = delete; | ||
|
|
||
| private: | ||
| std::string name; | ||
| Unit unit; | ||
| std::chrono::time_point<Clock> start_time; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.