Skip to Content.
Sympa Menu

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

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[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: [charm] message of class instance that has variable size
  • Date: Wed, 13 Nov 2013 14:50:09 -0700
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

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