Commit 0b5b71a5 authored by Matthieu Dorier's avatar Matthieu Dorier

added engine::wrap

parent acd0c541
......@@ -372,6 +372,19 @@ public:
bulk expose(const std::vector<std::pair<void*,size_t>>& segments, bulk_mode flag);
* @brief Creates a bulk object from an hg_bulk_t handle. The user
* is still responsible for calling margo_bulk_free or HG_Bulk_free
* on the original handle (this function will increment the hg_bulk_t's
* internal reference counter).
* @param blk Bulk handle.
* @param is_local Whether the bulk handle refers to memory that is local.
* @return a bulk object representing the memory exposed for RDMA.
bulk wrap(hg_bulk_t blk, bool is_local);
template<typename F>
[[deprecated("Use push_finalize_callback")]] void on_finalize(F&& f) {
......@@ -53,6 +53,12 @@ bulk engine::expose(const std::vector<std::pair<void*,size_t>>& segments, bulk_m
return bulk(*this, handle, true);
bulk engine::wrap(hg_bulk_t blk, bool is_local) {
hg_return_t hret = margo_bulk_ref_incr(blk);
MARGO_ASSERT(hret, margo_bulk_ref_incr);
return bulk(*this, blk, is_local);
void engine::shutdown_remote_engine(const endpoint& ep) const {
int ret = margo_shutdown_remote_instance(m_mid, ep.m_addr);
hg_return_t r = ret == 0 ? HG_SUCCESS : HG_OTHER_ERROR;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment