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

[MISC] Layout object structure of user bins. #191

Open
smehringer opened this issue Jan 18, 2024 · 0 comments
Open

[MISC] Layout object structure of user bins. #191

smehringer opened this issue Jan 18, 2024 · 0 comments

Comments

@smehringer
Copy link
Member

smehringer commented Jan 18, 2024

Currently, we are indirectly requiring that the user bin ids are sequentially.
That means, if there are 5 user bins, we assume that the ids are ids = [0,1,2,3,4].

(Side question: is that fine? We think yes)

Current layout structure of layout::layout::user_bin is

    struct user_bin
    {
        std::vector<size_t> previous_TB_indices{}; // previous technical bin indices which refer to merged bin indices.
        size_t storage_TB_id{};                    // id of the technical bin that the user bin is actuallly stored in
        size_t number_of_technical_bins{};         // 1 == single bin, >1 == split_bin
        size_t idx{};                              // The index of the user bin corresponding to the order in data
    };

storing its own index.

But if we know that user bins ids are contiguous and sequential we could indirectly store the index of the user bin as its position.

E.g. user_bin.idx = position i of user bin in layout::user_bins[i]

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

No branches or pull requests

1 participant