comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Converting access values
Date: Thu, 6 Jan 2005 14:40:56 -0600
Date: 2005-01-06T14:40:56-06:00	[thread overview]
Message-ID: <9rydnQ_4ZrxqPEDcRVn-hQ@megapath.net> (raw)
In-Reply-To: m3oeg28iek.fsf@0x53586c58.boanxx18.adsl-dhcp.tele.dk

"Mark Lorenzen" <mark.lorenzen@ofir.dk> wrote in message
news:m3oeg28iek.fsf@0x53586c58.boanxx18.adsl-dhcp.tele.dk...
> Duncan Sands <baldrick@free.fr> writes:
>
> > Hi Mark,
> >
> > > We now want to copy parts ("slices") of the data to other tasks that
> > > may do something interesting with these slices. The rate of data is
> > > too high to simply copy the wanted slices, so instead we make "cheap
> > > copies".
> >
> > if I understand right, you have a bunch of bytes that you would like the
> > rest of your program to see as an array of an unconstrained array type.
>
> Correct.

I think you are trying too hard to hide the information about the slices.
Forget that and simply pass the original buffer pointer and slice bounds to
the queuing tasks. (Package it up in a record to clean it up a bit and make
it clear that these are logically one entity). As someone else mentioned,
creating a slice doesn't copy anything. Neither does a type conversion from
one array subtype to another. So, in the queuing task, just create the slice
using the bounds passed, then type convert the slice to the appropriate type
for use (probably to use an input to Unchecked_Conversion).

                      Randy Brukardt







      reply	other threads:[~2005-01-06 20:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-05 22:31 Converting access values Mark Lorenzen
2005-01-05 23:32 ` Stephen Leake
2005-01-05 23:51   ` Mark Lorenzen
2005-01-06  0:18 ` Jeffrey Carter
2005-01-06  0:28   ` Mark Lorenzen
2005-01-07 16:55     ` Nick Roberts
2005-01-07 19:49       ` Mark Lorenzen
2005-01-07 20:23         ` Nick Roberts
2005-01-07 21:23           ` Robert A Duff
2005-01-11 17:02             ` Upkeep
2005-01-11 21:37               ` Robert A Duff
2005-01-12  4:56                 ` Alexander E. Kopilovich
2005-01-12 10:48                 ` Dmitry A. Kazakov
2005-01-07 21:17         ` Randy Brukardt
2005-01-07 22:15           ` Robert A Duff
2005-01-06 10:52 ` Dmitry A. Kazakov
2005-01-06 11:02 ` Duncan Sands
2005-01-06 12:17   ` Martin Dowie
2005-01-06 19:30   ` Mark Lorenzen
2005-01-06 20:40     ` Randy Brukardt [this message]
replies disabled

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