Skip to Content.
Sympa Menu

charm - Re: [charm] message of class instance that has variable size

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] message of class instance that has variable size


Chronological Thread 
  • From: Nicolas Bock <nicolasbock AT gmail.com>
  • To: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
  • Subject: Re: [charm] message of class instance that has variable size
  • Date: Wed, 13 Nov 2013 15:16:23 -0700
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Please disregard, I already asked that question :)

On Wed, Nov 13, 2013 at 2:50 PM, Nicolas Bock
<nicolasbock AT gmail.com>
wrote:
> Hi,
>
> suppose I have class
>
> class Foo {
> private:
> int N;
> double *A;
> public:
> Foo(int N) { this->N = N; A = new double[N]; }
> };
>
> and I would like to communicate an instance of Foo via a message. How
> would I declare the message type? The message would basically look
> like this:
>
> class FooMsg : public CMessage_FooMsg {
> Foo foo;
> };
>
> But since sizeof(foo) is only known at run-time, this probably won't work.
>
> Thanks,
>
> nick




Archive powered by MHonArc 2.6.16.

Top of Page