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

Add action to update data owned by the partitioned_vector component #1974

Merged
merged 4 commits into from Feb 2, 2016

Conversation

atrantan
Copy link

@atrantan atrantan commented Feb 1, 2016

The action is needed to perform a classic "put" operation from remote locality.

///
/// \return This returns the data of the partition_vector
///
auto set_data_sync(typename server_type::data_type && other) const
Copy link
Contributor

Choose a reason for hiding this comment

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

Do all our compilers support auto return type deduction?

Copy link
Author

Choose a reason for hiding this comment

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

Problem fixed in 0dff2a2

{
partition_vector_ = other;
}

Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest to change this to:

void set_data(data_type && data) 
{
    partition_vector_ = std::move(data);
}

to avoid extra copies of the whole partition.

Copy link
Author

Choose a reason for hiding this comment

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

Fix done in ee1f0ba

void set_data(data_type && other)
{
partition_vector_ = other;
}
Copy link
Member

Choose a reason for hiding this comment

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

This will still copy the data (needlessly)

@hkaiser
Copy link
Member

hkaiser commented Feb 2, 2016

LGTM, thanks!

hkaiser added a commit that referenced this pull request Feb 2, 2016
Add action to update data owned by the partitioned_vector component
@hkaiser hkaiser merged commit e55b06a into STEllAR-GROUP:master Feb 2, 2016
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.

None yet

3 participants