On Wed, 4 Jul 2018, Renato Poli wrote:

I am trying to implement this one: comm().allgather(vector<MyClass>).

The compiler fails.
It says MyClass is not a StandardType.
I tried with a tuple<>, without success.

There actually is a StandardType<tuple<Foo...>> specialization, but
it's untested and it's only useable if all the Foo types also have
StandardType specializations.

Any suggestion?
Should I specialize a Packing<MyClass *> or so?

Is your class a tuple of built-in constant-size types (or of other
tuples of built-in types, and so on)?  If so then please you can help
us debug whatever's going wrong with StandardType<tuple>?

If not, then is your class of constant size?  If so then you can
specialize StandardType<MyClass>; see the StandardType<pair> case in
standard_type.h for the best example of what to do.  There are more
examples in parallel_algebra.h that might also be helpful.

If you have a variable size class... then we're in uncharted
territory:

I can see that for vector<string>, everything works fine.

That's a special hand-coded case, I'm afraid.  We haven't currently
got any allgather_packed_range suitable for arbitrary size
(de)serializable types.
---
Roy

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to