Hi,

I've got a component that I would really like to be able to call a local
function
on (when I know I'm on the same locality as the component) and was
wondering if this is possible? Essentially the component manages some local
state about a locality and I want distributed calls to be able to query/add
to it but I'd also like to leak some of the internals to a local thread via
shared_ptrs.

As a example we may have a component that has the following:

// Distributed access needed, works fine
int foo() {
  return 42;
}
HPX_DEFINE_COMPONENT_ACTION(someComponent, foo)

// Local access only, since we can't serialize the type
std::shared_ptr<NonSerializeableType> local() {
  return make_shared<NonSerializableType>();
}
// We can't do this because we can't serialize the NonSerializableType
// HPX_DEFINE_COMPONENT_ACTION(someComponent, local)

Because we only every have the gid when we use hpx::new_ I couldn't find
any way
to get a reference to the actual component to call the function on it (or a
way
to call a local only, non seriaizable, function via a gid).

Let me know if this isn't clear.

Many thanks,
Blair
_______________________________________________
hpx-users mailing list
[email protected]
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users

Reply via email to