Thread overview | |||||
---|---|---|---|---|---|
|
November 30, 2014 static array alignment | ||||
---|---|---|---|---|
| ||||
void main() { align(128) float[128] a; assert((cast(size_t)(a.ptr) & 127) == 0); } the assert fails. What gives? |
November 30, 2014 Re: static array alignment | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Colvin | align doesn't work in DMD. There's bugreport for a long time. |
November 30, 2014 Re: static array alignment | ||||
---|---|---|---|---|
| ||||
Posted in reply to Temtaime | On Sunday, 30 November 2014 at 13:55:16 UTC, Temtaime wrote:
> align doesn't work in DMD.
It does in some places, but not on local variables. I think the best you can do for them is use the core.simd types which are intrinsicially aligned.
|
Copyright © 1999-2021 by the D Language Foundation