freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [pooma-dev] DynamicArray destroy methods


From: Julian C. Cummings
Subject: RE: [pooma-dev] DynamicArray destroy methods
Date: Mon, 23 Apr 2001 11:18:54 -0700

One way out of the function overloading 
quandary I noted below would be to call
out versions of destroy() for each of the
two existing destroy methods, BackFill
and ShiftUp, rather than use a template
parameter.  We are unlikely to add more 
of these, and if we do, they have to be 
added to the list in DynamicEvents anyway.
Should we take this approach?

Julian C.


> -----Original Message-----
> From: Julian C. Cummings [mailto:address@hidden
> Sent: Monday, April 23, 2001 11:08 AM
> To: James Crotinger
> Cc: Pooma Developers
> Subject: [pooma-dev] DynamicArray destroy methods
> 
> 
> 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.
> 
> 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]