Re: Help with a Remote Type / Iterator

From: Robert I. Eachus (rieachus_at_comcast.net)
Date: 12/01/03

  • Next message: Petter Fryklund: "Re: Visibility problems with package instantiations....."
    Date: Mon, 01 Dec 2003 00:31:29 -0500
    
    

    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.
    

  • Next message: Petter Fryklund: "Re: Visibility problems with package instantiations....."

    Relevant Pages

    • Re: Need help with Vector parameter when invoking C dll from C#
      ... I have the structure CUserContextData declare correctly in C# already. ... What you could do is implement a function in a C++ wrapper that takes an array of type CUserContextData and convert this into a vector of type CUserContextData, then you need to declare a vector iterator for this vector and pass the iterator to the EncodeAsnUser function. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: CL and iterators - a newbie question
      ... If you compile your code with (DECLARE (OPTIMIZE SPEED)), ... returned from a non-local function, ... Moving from non-descriptor to descriptor requires ... If you create iterator and iterate in the same function, ...
      (comp.lang.lisp)
    • CL and iterators - a newbie question
      ... (declare (type (simple-array double-float) ... (declare (type fixnum next-position) ... I tried to profile it a bit using the following code: ... so it seems the iterator conses 16 bytes per call (2 double ...
      (comp.lang.lisp)
    • Re: trying to declare an iterator for a std::vector of template pointers
      ... > int main ... > Can anyone tell me if/how to declare an iterator to a vector of template ...
      (comp.lang.cpp)
    • Re: vector sort: sort() vs stable_sort()
      ... > b>a, this violates Strict Less Ordering, but I can not think of another ... all Type1 elements will be placed before all Type2 elements. ... partition returns an iterator that points to the end of the range containing ...
      (comp.lang.cpp)