charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Jonah Miller <jonah.maxwell.miller AT gmail.com>
- To: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
- Subject: [charm] messages, pup, and C++ templates
- Date: Thu, 25 Jun 2015 10:07:28 -0400
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
Hello everyone,
I would like to template a new message type by a variable type so that I can treat it as a generic variable container. However, I'm having a bit of trouble. The following code is in my module file:
template<typename value_t> message ValueMsg;
and the commensurate implementation is:
template<typename value_t>
class ValueMsg : public CMessage_ValueMsg<value_t> {
public:
value_t value;
ValueMsg() { }
ValueMsg(value_t v) {
value = v;
}
};
In the linking stage of compilation, I get a bunch of errors of the following type:
In function `CMessage_ValueMsg<int>::operator delete(void*)':
/home/jmiller/programming/charmploration/fibonacci-futures/fib.decl.h:105: undefined reference to `CMessage_ValueMsg<int>::dealloc(void*)'
/home/jmiller/programming/charmploration/fibonacci-futures/fib.cpp:53: undefined reference to `CMessage_ValueMsg<int>::operator new(unsigned long, int)'
Is there something I'm doing wrong? Or is templating messages simply not possible?
Alternatively, is it possible to use the PUP framework to define the serialization for a message, if I want to, for example use futures?
Thanks in advance for your help!
Best,
Jonah Miller
- [charm] messages, pup, and C++ templates, Jonah Miller, 06/25/2015
- Re: [charm] messages, pup, and C++ templates, Jozsef Bakosi, 06/25/2015
- Re: [charm] messages, pup, and C++ templates, Jonah Miller, 06/25/2015
- Re: [charm] messages, pup, and C++ templates, Jozsef Bakosi, 06/25/2015
Archive powered by MHonArc 2.6.16.