[pooma-dev] Testing Pooma Code Using Explicit Instantiations?
James Crotinger
JimC at proximation.com
Mon May 7 15:42:49 UTC 2001
There are definitely parts of r2 that were designed in such a way that
explicit instantiation will not work - they rely on the fact that some
functionality only make sense with certain types of engines, etc. For
instance, MultiPatchEngine handles dynamic events, but the code that deals
with these events only makes sense for patch engines that handle dynamic
events. The event code is used for non-dynamic engines as well (for things
like repartitioning a shared layout). The handling of dynamic events is
delegated to a separate function dynamicHandler(...,WrappedInt<true>). This
is called as
dynamicHandler(...,WrappedInt<PatchEngine_t::dynamic>);
in the event handler, and the dynamicHandler(...,WrappedInt<false>) is just
an empty stub. Since only the "false" version of this function is compiled
for non-dynamic patch engines, this works. Explicit instantiation would
attempt to compile both versions, and that would not work. The alternatives
were to either make all engines support the dynamic interface, which would
be a mess (and only makes sense in 1D), or to have a separate
DynamicMultiPatch engine, which would mostly be a straight copy of
MultiPatchEngine.
Also, there are more than a few template member functions in r2, so explicit
instantiation of classes is not enough to ensure that everything compiles.
(Furthermore, many of these are inline due to problems with certain
compilers/debuggers - it would be very nice to move these as many of them
certainly don't need to be inline, but I think CW 6.0 still has trouble
debugging template member functions that are defined outside of the class
body [at least the beta did].)
Jim
> -----Original Message-----
> From: Dave Nystrom [mailto:wdn at lanl.gov]
> Sent: Saturday, May 05, 2001 11:47 AM
> To: Jeffrey Oldham
> Cc: pooma-dev at pooma.codesourcery.com; Dave Nystrom
> Subject: RE: [pooma-dev] Testing Pooma Code Using Explicit
> Instantiations?
>
>
> Hi Jeff,
>
> Don't know how you got Nyholm but my last name is Nystrom.
> I'm not sure
> whether Pooma 2 has a goal of being able to instantiate all
> the members of a
> class. Perhaps Scott or Jim could comment on that>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/pooma-dev/attachments/20010507/9f5815b5/attachment.html>
More information about the pooma-dev
mailing list