DynamicArray destroy methods
Julian C. Cummings
cummings at linkline.com
Mon Apr 23 18:08:13 UTC 2001
Jim,
I was going to add new destroy() functions
to Particles corresponding to the new
IteratorPairDomain-based functions you
added to DynamicArray. I noticed three minor
glitches in DynamicArray.h that I was going
to fix, if you don't object. One is on
line 486. We don't need to provide the
BackFill() argument here because dynamic
engines already provide a destroy() function
that takes just a Domain argument. (No harm
done here though, and I think this glitch
was here prior to your recent changes.) The
next item is on line 501. You left out the
Pooma:: qualifier on the IteratorPairDomain
type. It should be there for consistency,
although there is probably a "using namespace
Pooma;" statement somewhere that is making
this work as written. The last problem is on
line 542. I think you do have to provide the
BackFill() argument here because MPEngine only
provides three versions of destroy(): domain,
domain and patchID, or domain, patchID and method.
I was trying to check out this third item when
I ran into another problem. Perhaps others can
chime in on this. I modified dynamic_array_test5.cpp
to call destroy() without specifying a method. So
I made calls with arguments (int*,int*) and with
(vector<int>::iterator,vector<int>::iterator,int).
The first call should invoke destroy() with Iter
equal to int* (DynamicArray.h, line 498), but gcc
says the overload is ambiguous with the version on
line 477 also being plausible. I thought matching
one template parameter always beats matching two.
With my second call, I was trying to invoke the
destroy() function on line 538 of DynamicArray.h,
but gcc thinks the version on line 491 is a good
match also. Again I am surprised because PatchID_t
is defined as int, and that exactly matches the
type of my third argument. What's the deal?
Julian C.
More information about the pooma-dev
mailing list