comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: Help with a Remote Type / Iterator
Date: Mon, 01 Dec 2003 00:31:29 -0500
Date: 2003-12-01T00:31:29-05:00	[thread overview]
Message-ID: <LqCdnbdsi6KuT1eiRVn-sQ@comcast.com> (raw)
In-Reply-To: <BSyyb.60537$t01.50475@twister.socal.rr.com>

Michael Lamarre wrote:

> I have a record type I've defined in package A. In package A.CHILD, I 
> want to define a type that is a collection of these records. For 
> stylistic reasons, we'd rather declare all of the types in the spec and 
> not have any incomplete type declarations in the spec. Both A and 
> A.CHILD are REMOTE_TYPES (RT) packages.
> 
> What we need is some kind of iterator for the collection type declared 
> in A.CHILD. We've tried a passive iterator, but some of the stuff we 
> need to do while iterating just won't work given that the passive 
> iterator needs to take an access-to-subprogram parameter, which, in a RT 
> package must be a remote subprogram. We need the flexibility of an 
> active iterator.

This is not necessarily a solution, just trying to understand what you 
are doing....

Do you really require that your iterator run on processor A, accessing 
objects from processor B?  If so it can be done.  But as you sort of 
point out, the problem is that you are trying to cram everything into 
one package.

If you really need the data transfered from processor to processor, you 
will need to provide 'Read and 'Write.  These can be defined in terms of 
the subcomponents for the actual type, see the Rationale, I think for 
details.

But I really suspect that you are confusing (in the other meaning of 
confusing--mixing them together) two different things, a type which is a 
remote type, and a local iterator over collections of objects of the 
type.  If the collections are distributed, you have a big design job 
just defining what iteration means.  (Do you want to iterate over a 
snapshot of the container state, iterate over all the objects in a 
particular partition, then do the next partition, iterate over all 
partitions in parallel, or is there other implicit order of iteration, etc.)

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




  reply	other threads:[~2003-12-01  5:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-01  3:48 Help with a Remote Type / Iterator Michael Lamarre
2003-12-01  5:31 ` Robert I. Eachus [this message]
2003-12-01 13:37   ` Michael Lamarre
2003-12-02 23:17     ` Robert I. Eachus
2003-12-03  4:46       ` Michael Lamarre
2003-12-01 23:00 ` Nick Roberts
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox