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,2c498d4a35691643,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mail From: "ldb" Newsgroups: comp.lang.ada Subject: Allocated aligned arrays Date: 18 Nov 2005 13:35:53 -0800 Organization: http://groups.google.com Message-ID: <1132349753.719540.119910@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: 206.210.81.52 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1132349758 26028 127.0.0.1 (18 Nov 2005 21:35:58 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 18 Nov 2005 21:35:58 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/416.11 (KHTML, like Gecko) Safari/416.12,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g44g2000cwa.googlegroups.com; posting-host=206.210.81.52; posting-account=V3awPg0AAAB11Uk1Sshvlrxz0peUf-At Xref: g2news1.google.com comp.lang.ada:6468 Date: 2005-11-18T13:35:53-08:00 List-Id: I'm trying to allocate two floating point (4 bytes each) arrays that are both address-aligned to 16. Ideally, the first element of each array is aligned on 16 (ie, the address mod 16 = 0), but that's not really necessary, as long as they are both aligned to the same mod 16 (i don't care if the first element is 8 or 12 or whatever, as long as both arrays have the same). I'm trying to set up these arrays so I can use aligned SSE instructions in assembly. I have tried something along the lines of: type Matrix is array (INTEGER range <>, INTEGER range <>) of float; for Matrix'Alignment use 16; and then, for an input of 0..200 by 0..200 sam := new Matrix(0..200,2..198) bob := new Matrix(2..198,2..198); These are the actual indicies I would use (it's an image processing algorithm that trims the edges). I'm not sure if the strange indices could be causing the problem, but I cannot imagine it is. However, the three matricies, input, sam, and bob aren't necessarily aligned (for certain input index ranges they are, by default, and some times they are not. The alignment statement I am using seems to have no effect). Any ideas?