comp.lang.ada
 help / color / mirror / Atom feed
From: Bill Findlay <yaldnifw@blueyonder.co.uk>
Subject: Re: Efficient Matrix?
Date: Sat, 28 Dec 2002 17:35:43 +0000
Date: 2002-12-28T17:35:43+00:00	[thread overview]
Message-ID: <BA33916F.1703%yaldnifw@blueyonder.co.uk> (raw)
In-Reply-To: BA338F12.1700%yaldnifw@blueyonder.co.uk

On 28/12/02 17:25, in article BA338F12.1700%yaldnifw@blueyonder.co.uk, "Bill
Findlay" <yaldnifw@blueyonder.co.uk> wrote:

> procedure bla is
> 
>  type unconstrained_type is
>       array (Positive range <>, Positive range <>) of Boolean;
>  for unconstrained_type'Component_Size use 1;
>  pragma Pack (unconstrained_type);
>  type unconstrained_type_ptr is access unconstrained_type;
> 
>  subtype constrained_type is unconstrained_type (1 .. 1000, 1 .. 500);
>  type constrained_type_ptr is access constrained_type;
> 
>  C : constrained_type_ptr   := new constrained_type;
>  U : unconstrained_type_ptr := new unconstrained_type
>                                    (1 .. 1000, 1 .. 500);
> 
...

Well I had a closer look and found this:
        li r6,0
        ori r3,r6,62500
                  ^^^^^ = 1000*500 / 8
        bl L___gnat_malloc$stub
        stw r3,1556(r1)

        li r7,0
        ori r3,r7,62516
                  ^^^^^ = 1000*500 / 8 + 16 (for dope vector?)
        bl L___gnat_malloc$stub
...
So it looks as though the component size and packing are honoured, but the
attributes are lying about it

-- 
Bill-Findlay chez blue-yonder.co.uk ("-" => "")





  reply	other threads:[~2002-12-28 17:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3e0b2a66_4@news.bluewin.ch>
2002-12-26 22:09 ` Efficient Matrix? Adrian Knoth
2002-12-27  0:23   ` Alvery Grazebrook
2002-12-27  9:53     ` Adrian Knoth
2002-12-27 16:58       ` Robert A Duff
2002-12-28  1:44         ` Nick Roberts
2002-12-28 13:00         ` Adrian Knoth
2002-12-28 15:21           ` Bill Findlay
2002-12-28 15:48             ` Adrian Knoth
2002-12-28 23:26               ` Adrian Knoth
2002-12-28 16:07             ` Robert A Duff
2002-12-28 17:25               ` Bill Findlay
2002-12-28 17:35                 ` Bill Findlay [this message]
2002-12-28 20:51                 ` Robert A Duff
2002-12-28 15:58           ` Robert A Duff
2002-12-28 17:19             ` Adrian Knoth
2002-12-28 19:16               ` James S. Rogers
2002-12-28 20:45               ` Robert A Duff
2002-12-28 22:07                 ` Adrian Knoth
2002-12-28 23:42                   ` Robert A Duff
2002-12-27 12:25 ` Gautier
replies disabled

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