Skip to content

initial optimizations to ewald code#24

Open
riyasharr wants to merge 7 commits intoflatironinstitute:ewaldfrom
riyasharr:ewald
Open

initial optimizations to ewald code#24
riyasharr wants to merge 7 commits intoflatironinstitute:ewaldfrom
riyasharr:ewald

Conversation

@riyasharr
Copy link
Collaborator

Copy link
Member

@blackwer blackwer left a comment

Choose a reason for hiding this comment

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

Looks pretty good. I haven't run it but it all seems reasonable


Real *pot_part = &(pot_sorted[0]) + Short.box_begin[box];
const int *box_corner = &Short.box_corners[box * n_dim];
std::vector<Real> offset(n_dim, 0.0);
Copy link
Member

Choose a reason for hiding this comment

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

eventually we just template on n_dim, so std::array<Real, n_dim> will be good as it's guaranteed to be a stack allocation (WAY cheaper than std::vector which will default to heap without a custom allocator). I'd just constexpr n_dim = 3 now if it's not already a template argument.

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