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: a07f3367d7,56525db28240414a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.74.40 with SMTP id q8mr1610690pav.19.1344324840371; Tue, 07 Aug 2012 00:34:00 -0700 (PDT) Path: p10ni3175475pbh.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!news.nctu.edu.tw!csnews.cs.nctu.edu.tw!news.cs.nctu.edu.tw!feeder.erje.net!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Efficient Sequential Access to Arrays Date: Mon, 30 Jul 2012 16:18:03 +0200 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: <871ujtfi3o.fsf@adaheads.sparre-andersen.dk> References: <01983f1c-f842-4b1f-a180-bcef531dad4c@googlegroups.com> <87ipdf4vh6.fsf@mid.deneb.enyo.de> <01174147-b078-40bb-a52b-8861bee52816@googlegroups.com> NNTP-Posting-Host: 79.138.229.207.bredband.3.dk Mime-Version: 1.0 X-Trace: munin.nbi.dk 1343657884 14887 79.138.229.207 (30 Jul 2012 14:18:04 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 30 Jul 2012 14:18:04 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:3cNd7ODKfV/gJBygDux4X9vYV8g= Content-Type: text/plain; charset=us-ascii Date: 2012-07-30T16:18:03+02:00 List-Id: Keean Schupke wrote: > So with the relative addressing code, stepping through the subset is > dereference link, add constant[+/- row_size * element_size] and > constant[+/- element_size] to access the neighbours, then dereference > next link etc. The size of the array are generic parameters, so I > presume the constants get pre-calculated at elaboration time. If the generic is instantiated at compile-time this is likely to be true, but I doubt it is the case for run-time instantiations. Greetings, Jacob -- "For there are only two reasons why war is made against a republic: The one, to become lord over her: the other, the fear of being occupied by her." -- Nicolo Machiavelli