comp.lang.ada
 help / color / mirror / Atom feed
From: "Frank J. Lhota" <NOSPAM.FrankLho@rcn.com>
Subject: Re: Allocated aligned arrays
Date: Wed, 23 Nov 2005 20:39:40 -0500
Date: 2005-11-23T20:39:40-05:00	[thread overview]
Message-ID: <7ZGdnUrGCp-jhxjeRVn-og@rcn.net> (raw)
In-Reply-To: 1132756111.751623.309350@g14g2000cwa.googlegroups.com


"ldb" <louis@pittpatt.com> wrote in message 
news:1132756111.751623.309350@g14g2000cwa.googlegroups.com...
> Thanks for all the responses. I have looked into user-defined storage
> pools, but they appear to have two very large limitations:
>
> Can they be dynamically sized?

Yes. When you define your own storage pool, it is up to you to devise how 
the allocations and deallocations are performed. There is no prohibition on 
dynamically sized pools, and in fact that is frequently done.

> Can I only associate entire types with storage pools.. or can I
> associate individual instances of a type with different pools?

Pools are associated with access types. For a given type T, you can create 
multiple access types for accessing T, each with its own storage pool, e.g.

    type T is ...;

    type T_Acc_1 is access T;
    for T_Acc_1'Storage_Pool use Pool_1;

    type T_Acc_2 is access T;
    for T_Acc_2'Storage_Pool use Pool_2;

> In other words, I'd like to be able to allocate the storage-pool size
> at run-time, after I know the dimensions of the input. I can't really
> seem to figure out if this is even possible. And furthermore, I'd only
> like certain instances of a particular class to use that storage pool,
> not all of them (I don't want every instance of a particular variable
> in a large structure to have to use my storage pool).
>
> Perhaps, then, using subtypes, there is a way around the second issue?
> But, again, the entire purpose of requesting aligned arrays is to
> improve the speed of the run, so any rigorous conversion function is
> essentially a killer, also.
> 





  reply	other threads:[~2005-11-24  1:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-18 21:35 Allocated aligned arrays ldb
2005-11-18 22:06 ` jimmaureenrogers
2005-11-18 22:31   ` ldb
2005-11-20 11:21     ` Martin Krischik
2005-11-18 22:51   ` Simon Wright
2005-11-18 23:03     ` ldb
2005-11-19  7:36 ` Simon Wright
2005-11-19 13:12   ` Jeff Creem
2005-11-23  0:17   ` Randy Brukardt
2005-11-23 14:28     ` ldb
2005-11-24  1:39       ` Frank J. Lhota [this message]
2005-11-27 20:49       ` Robert A Duff
replies disabled

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