On Mittwoch, 31. August 2016 17:35:18 CEST Tim Biedert wrote: > Hi, > > on each locality I have several components, which directly interact > (e.g. one "big" component has data which is read by lots of other > components). > > These components will never be migrated, so the pinning is alright. > > Declaring and defining actions for all interaction methods (e.g. > getters) seemed like a lot of messy/unnecessary code.
If you are not using them to get addressed over its client/id_type, does it make sense to have them be components in the first place? > > But maybe a related question at this point: Would there be a > performance penalty when using synchronous action invocations on the > same locality instead of direct member method invocation? Yes, there are some overheads related to synchronous action invocation. Calling a member function directly will always be faster. > > > I was also wondering if it would be possible to further simplify action > declaration and definition? I'm imagining something like this in the > component's class declaration: /HPX_ACTION void foo();/ But that's > just an idea. Or maybe a Java-like annotation. I assume this would > require some kind of preprocessor which would be part of HPX. Right. We currently do not require any special compiler or extensions or preprocessing and would like to keep it that way. Having a compiler automatically generating the action code would certainly be nice though ;) > > > Best, > > Tim > > On 08/31/2016 02:05 PM, Hartmut Kaiser wrote: > >> given a server component's id_type, is it possible to retrieve the raw > >> address (pointer) of the instance (on the same locality of course) ? > > > > Why do you think you need this? > > > > While retrieving the (shared_)pointer to the component implementation is possible: > > std::shared_ptr<Component> p = hpx::get_ptr<Component>(id); > > > > it pins the object, i.e. the object can't be migrated anymore. Note also, > > that get_ptr<>() will fail if the object referred to with 'id' is not on > > the locality where the code is executed. The other caveat is that > > get_ptr() might impose some overhead. > > > > Regards Hartmut > > --------------- > > http://boost-spirit.com > > http://stellar.cct.lsu.edu > > > > > > _______________________________________________ > > hpx-users mailing list > > [email protected] > > https://mail.cct.lsu.edu/mailman/listinfo/hpx-users _______________________________________________ hpx-users mailing list [email protected] https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
