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

Implement native support for unified containers #447

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

1uc
Copy link
Contributor

@1uc 1uc commented May 10, 2023

Unified HDF5 morphology containers internally concatenate the datasets across all morphologies.

@1uc 1uc force-pushed the 1uc/unified-container branch 7 times, most recently from 035e95d to 4dc2b67 Compare May 11, 2023 05:49
Copy link
Contributor

@mgeplf mgeplf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the right direction to me


namespace detail {

// Note, that `hsize_t` might be `uint64_t` which could with `uint64_t` or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sigh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should learn to write :)

src/readers/morphologyHDF5.cpp Outdated Show resolved Hide resolved
/**
* Provides the API for reading datasets from HDF5 files.
*
* The CRTP requirements are that `Derived` has a method
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to CRTP vs virtual, and rely on devirtualization? Is this a hot dispatch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can't use virtual function calls, because of the T& out. This is usually std::vector<T>& out but the inner type differs. I don't think this goes away even if we were to switch to T read(...) const. Therefore, the only way I know to avoid a bit of code duplication is to use CRTP.

src/readers/morphologyHDF5.h Show resolved Hide resolved
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.

2 participants