From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Allocated aligned arrays
Date: Tue, 22 Nov 2005 18:17:50 -0600
Date: 2005-11-22T18:17:50-06:00 [thread overview]
Message-ID: <zP2dnWthuPWqKR7enZ2dnUVZ_s-dnZ2d@megapath.net> (raw)
In-Reply-To: m2wtj56qdv.fsf@grendel.local
"Simon Wright" <simon@pushface.org> wrote in message
news:m2wtj56qdv.fsf@grendel.local...
> "ldb" <louis@pittpatt.com> writes:
...
> > 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).
>
> A little experiment here shows that GCC 4.0.0 on Darwin seems to work
> reasonably, but your problem is no doubt bigger.
>
> What compiler/architecture? sounds like a bug to me -- I don't believe
> a compiler is (should be!) allowed to accept a pragma like this and
> then fail to honour it?
I agree, that sounds like a compiler bug. If you accept an alignment clause,
you ought to honor it. (Janus/Ada only accepts alignments of 1, 2 and 4 for
this reason.) That's little help for the OP, however.
It's quite possible that a variable (rather than an allocator) would do the
right thing. (Often there is separate code controlling such things.) That
may not be practical for the OP, either. Someone suggested a user-defined
storage pool, which may be the only recourse.
Randy.
next prev parent reply other threads:[~2005-11-23 0:17 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 [this message]
2005-11-23 14:28 ` ldb
2005-11-24 1:39 ` Frank J. Lhota
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