From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c4003439e5ce36e1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Thu, 06 Jan 2005 14:39:19 -0600 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: Subject: Re: Converting access values Date: Thu, 6 Jan 2005 14:40:56 -0600 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: <9rydnQ_4ZrxqPEDcRVn-hQ@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-FgQzELowSR+9TKGSd8jU20YrGG922cC/N7F7lSA7SWEq3+uVUjL+CEVpazKi40K0VC7z5I9Sw4NPF2T!wund9EAtNM92VTJSRk6lxCgQgvEspY6sZDl/l75BcWCnydDFKleeVxJf5TDZgI7sjOY6XZJR6RHr X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.22 Xref: g2news1.google.com comp.lang.ada:7530 Date: 2005-01-06T14:40:56-06:00 List-Id: "Mark Lorenzen" wrote in message news:m3oeg28iek.fsf@0x53586c58.boanxx18.adsl-dhcp.tele.dk... > Duncan Sands 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