charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Christian Perez <christian.perez AT inria.fr>
- To: Aaron Becker <abecker3 AT illinois.edu>
- Cc: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>, Gengbin Zheng <zhenggb AT gmail.com>
- Subject: Re: [charm] Pb with inheritance
- Date: Tue, 01 Jun 2010 13:49:15 +0200
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
- Organization: INRIA/LIP
In the ci file, A inherits from I1 and I2.
So, I guess I should be able to invoke foo1 or foo2 on
CProxy_A.
It is basically the same example as in
http://charm.cs.uiuc.edu/manuals/html/charm++/4_1.html
but with multiple inheritance.
Christian
On 06/01/2010 01:45 PM, Aaron Becker wrote:
Notice that in your example code you are invoking foo1 and foo2 on an
object of type CProxy_A, not type A. You can't invoke non-entry
methods of an object through its proxy, except by calling ckLocal if
it's a local chare. Otherwise you could call non-entry methods on
remote objects, which will never work. The name resolution for
CProxy_A finds the entry methods in the base classes because CProxy_A
has no foo1 and foo2 methods of its own.
Aaron
On Tue, Jun 1, 2010 at 3:54 AM, Christian Perez
<christian.perez AT inria.fr>
wrote:
Hello,
please consider the attached example, where a chare A inherits from 2 others
chare I1& I2:
chare I1
{
entry void foo1();
};
chare I2
{
entry void foo2();
};
chare A : I1, I2
{
entry A();
};
When invoking foo2 on A, either foo2 of the class I2 is called (not A::foo2
!) if methods foo1& foo2 are not virtual
or foo1 on A (vtable issue?) is invoked if they are virtual. Though class
inheritance is not virtual, can it be the same issue?
Any help is welcome.
Christian
_______________________________________________
charm mailing list
charm AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/charm
- [charm] Pb with inheritance, Christian Perez, 06/01/2010
- Re: [charm] Pb with inheritance, Aaron Becker, 06/01/2010
- Re: [charm] Pb with inheritance, Christian Perez, 06/01/2010
- Re: [charm] Pb with inheritance, Filippo Gioachin, 06/03/2010
- Re: [charm] Pb with inheritance, Christian Perez, 06/01/2010
- Re: [charm] Pb with inheritance, Aaron Becker, 06/01/2010
Archive powered by MHonArc 2.6.16.