Skip to Content.
Sympa Menu

charm - Re: [charm] PUP and enum types

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] PUP and enum types


Chronological Thread 
  • From: "White, Samuel T" <white67 AT illinois.edu>
  • To: Jonah Miller <jonah.maxwell.miller AT gmail.com>, "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
  • Subject: Re: [charm] PUP and enum types
  • Date: Wed, 8 Jul 2015 15:59:11 +0000
  • Accept-language: en-US
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Hi Jonah,

The most portable way to PUP an enumerated type is to use the pup_bytes()
interface, as in:

void pup(PUP::er &p) {
pup_bytes(&p, (void *)&enum_var, sizeof(enum_type));
}

-Sam
________________________________________
From:
charm-bounces AT cs.uiuc.edu

[charm-bounces AT cs.uiuc.edu]
on behalf of Jonah Miller
[jonah.maxwell.miller AT gmail.com]
Sent: Saturday, July 04, 2015 4:58 PM
To:
charm AT cs.uiuc.edu
Subject: [charm] PUP and enum types

Hi Everyone,

I have a quick question about the PUP framework. What is the proper way
to pack or unpack enumerations? Under the hood, enumerations are
integers, so it seems like they should be pup-able. But I wondered if
there was a straightforward or "correct" way to do it.

Thanks in advance for your help.

Best,
Jonah Miller
_______________________________________________
charm mailing list
charm AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/charm





Archive powered by MHonArc 2.6.16.

Top of Page