Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Use using Range = std::array<Value, 2>.#319

Merged
1uc merged 4 commits intomasterfrom
1uc/unify-ranges
Nov 30, 2023
Merged

Use using Range = std::array<Value, 2>.#319
1uc merged 4 commits intomasterfrom
1uc/unify-ranges

Conversation

@1uc
Copy link
Collaborator

@1uc 1uc commented Nov 23, 2023

By using an std::array we can removed the differences between RawIndex and Selection::Ranges. It also allows us to read Selection::Ranges from disk directly via the HighFive API.

@1uc 1uc marked this pull request as ready for review November 23, 2023 11:48
@1uc
Copy link
Collaborator Author

1uc commented Nov 23, 2023

This PR contains two variants:

  • The first one allows pybind11 to pick the Python type which changes type(selection.ranges) from List[Tuple] to List[List] .
  • The second one creates the copy manually and creates a List[Tuple] as before.

Note, that the default STL conversion implies a copy. Hence, this is likely the same amount of copies.

@1uc 1uc force-pushed the 1uc/unify-ranges branch 2 times, most recently from 08f43e3 to e682994 Compare November 27, 2023 13:56
matz-e
matz-e previously approved these changes Nov 28, 2023
1uc added 4 commits November 30, 2023 09:25
By using an `std::array` we can removed the differences between
`RawIndex` and `Selection::Ranges`. It also allows us to read
`Selection::Ranges` from disk directly via the HighFive API.
@1uc
Copy link
Collaborator Author

1uc commented Nov 30, 2023

Updates of the BBP stack built on BB5 have been prepared and pass CI:
BlueBrain/spack#2216

We needed to change:

- ranges.emplace_back(i_begin, i_end);
+ ranges.push_back({i_begin, i_end});

@1uc 1uc merged commit 4095ed5 into master Nov 30, 2023
@1uc 1uc deleted the 1uc/unify-ranges branch November 30, 2023 08:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants