comp.lang.ada
 help / color / mirror / Atom feed
* Q: GNAT and GCC variable/type attributes
@ 2009-10-12 10:05 Georg Bauhaus
  0 siblings, 0 replies; only message in thread
From: Georg Bauhaus @ 2009-10-12 10:05 UTC (permalink / raw)


GCC allows __attribute__ (...) to be applied to
variables, types, and functions.
Specifically, as explained in the GCC manual, ᅵ 5.45,
the "vector_size" attribute can be applied to
floating point types.  The effect is that variables
so declared can be used with SIMD instructions on Intel
or AMD CPUs.  Corresponding functions are built into
GCC, e.g.
http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html

GNAT does have a pragma Machine_Attribute (and pragma
Import (Intrinsic, ..., ...).  But naive use doesn't
have the desired effect: "vector_size" is rejected
as an Attribute_Name argument to the pragma.

Browsing the (surface of) GNAT sources, there seems
to be some support for this mechanism.  Does someone
know whether we might expect more of it in the future?



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-12 10:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-12 10:05 Q: GNAT and GCC variable/type attributes Georg Bauhaus

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