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

constness in offload/offload.hpp #12

Open
marehr opened this issue May 24, 2018 · 1 comment
Open

constness in offload/offload.hpp #12

marehr opened this issue May 24, 2018 · 1 comment

Comments

@marehr
Copy link
Contributor

marehr commented May 24, 2018

There are a couple of functions that take ham::offload::buffer_ptr as reference.

Could those invocation also be const &?

template<typename T>
future<void> put(T* local_source, buffer_ptr<T>& remote_dest, size_t n)
{
net::communicator& comm = runtime::instance().communicator();
#ifdef HAM_COMM_ONE_SIDED
// TODO(improvement): create a data transfer thread for one-sided

@noma
Copy link
Owner

noma commented Jul 3, 2018

Should be possible, only the operator[] is non-const, but I think it could be const too, as it only allows changing the state of the pointee, not the pointer itself... always confusing with smart pointers. ;-)

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

2 participants