Trass3r wrote:
Don schrieb:
Well, sort of.
It's impossible to align stack-allocated structs with any alignment
greater than the alignment of the stack itself (which is 4 bytes).
Anything larger than that and you HAVE to use the heap or alloca().
So how do other compilers supporting that al
Don schrieb:
Well, sort of.
It's impossible to align stack-allocated structs with any alignment
greater than the alignment of the stack itself (which is 4 bytes).
Anything larger than that and you HAVE to use the heap or alloca().
So how do other compilers supporting that alignment syntax d
On Wed, 18 Nov 2009 11:03:19 -0500, Don wrote:
Trass3r wrote:
Don schrieb:
http://d.puremagic.com/issues/show_bug.cgi?id=2278
Isn't this a distinct problem or am I wrong? This is not only about
8-byte boundaries.
Well, sort of.
It's impossible to align stack-allocated structs with any al
Trass3r wrote:
Don schrieb:
http://d.puremagic.com/issues/show_bug.cgi?id=2278
Isn't this a distinct problem or am I wrong? This is not only about
8-byte boundaries.
Well, sort of.
It's impossible to align stack-allocated structs with any alignment
greater than the alignment of the stack i
Don schrieb:
http://d.puremagic.com/issues/show_bug.cgi?id=2278
Isn't this a distinct problem or am I wrong? This is not only about
8-byte boundaries.
OpenCL requires all types to be naturally aligned.
/*
* Vector types
*
* Note: OpenCL requires that all types be naturally aligned.
* This means that vector types must be naturally aligned.
* For example, a vector of four floats must be aligned to
* a 16 byte
Robert Jacques schrieb:
To the best of my knowlegde, D only supports align(1) and align(4). On
the other hand, compile time introspection allows my CUDA api to convert
alignment correctly for any given struct.
gotta look that up in your code.
Maybe I also find some other ideas for writing m
On Tue, 17 Nov 2009 15:12:50 -0500, Trass3r wrote:
I originally posted a question about this in D.learn. bearophile advised
me to ask for that feature here.
Original post:
==
OpenCL requires all types to be naturally aligned.
The D specs state:
"AlignAttribute is ignored when
Tomas Lindquist Olsen:
> yep, D provides no way to do this, they'd all align to 4 bytes (at
> least on x86-32)
The idea, that I suggested to the LDC team too, is to extend the semantics of
align, no new syntax seems needed:
align(8) alias int[4] Foo;
align(8) double good;
Bye,
bearophile
On Tue, Nov 17, 2009 at 9:12 PM, Trass3r wrote:
> I originally posted a question about this in D.learn. bearophile advised me
> to ask for that feature here.
>
>
> Original post:
> ==
>
> OpenCL requires all types to be naturally aligned.
>
> The D specs state:
> "AlignAttribute is ign
I originally posted a question about this in D.learn. bearophile advised
me to ask for that feature here.
Original post:
==
OpenCL requires all types to be naturally aligned.
The D specs state:
"AlignAttribute is ignored when applied to declarations that are not
struct members."
11 matches
Mail list logo