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

Refactor shared memory layout to expose Block as interface #4955

Merged
merged 1 commit into from
Mar 14, 2018

Conversation

TheMarex
Copy link
Member

@TheMarex TheMarex commented Mar 13, 2018

Issue

This PR was a first step towards #4952 that makes the interface of DataLayout cleaner.

Tasklist

  • review
  • adjust for comments

Copy link
Contributor

@oxidase oxidase left a comment

Choose a reason for hiding this comment

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

LGTM!


inline uint64_t GetBlockSize(BlockID bid) const { return num_entries[bid] * entry_size[bid]; }
inline uint64_t GetBlockSize(BlockID bid) const { return blocks[bid].byte_size; }

inline uint64_t GetSizeOfLayout() const
{
uint64_t result = 0;
for (auto i = 0; i < NUM_BLOCKS; i++)
{
BOOST_ASSERT(entry_align[i] > 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

s/entry_align[i]/blocks[i].entry_align/

@TheMarex TheMarex merged commit b80764b into master Mar 14, 2018
@TheMarex TheMarex deleted the refactor/block branch March 14, 2018 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants