BlueBrain / libsonata

A python and C++ interface to the SONATA format
https://libsonata.readthedocs.io/en/stable/
GNU Lesser General Public License v3.0
11 stars 12 forks source link

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

Closed 1uc closed 9 months ago

1uc commented 9 months ago

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 commented 9 months ago

This PR contains two variants:

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

1uc commented 9 months ago

Updates of the BBP stack built on BB5 have been prepared and pass CI: https://github.com/BlueBrain/spack/pull/2216

We needed to change:

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