Re: Alligned gc allocation of struct

2018-10-07 Thread Stanislav Blinov via Digitalmars-d-learn
On Friday, 5 October 2018 at 20:41:15 UTC, Sjoerd Nijboer wrote: On Friday, 5 October 2018 at 14:55:04 UTC, Dennis wrote: On Friday, 5 October 2018 at 10:03:35 UTC, Kagamin wrote: GC allocations are 16 bytes aligned. Is that an implementation detail or well-defined behavior? The GC_Allocato

Re: Alligned gc allocation of struct

2018-10-05 Thread Sjoerd Nijboer via Digitalmars-d-learn
On Friday, 5 October 2018 at 14:55:04 UTC, Dennis wrote: On Friday, 5 October 2018 at 10:03:35 UTC, Kagamin wrote: GC allocations are 16 bytes aligned. Is that an implementation detail or well-defined behavior? The GC_Allocator doesn't support alignedAllocate from the IAllocate interface, w

Re: Alligned gc allocation of struct

2018-10-05 Thread Dennis via Digitalmars-d-learn
On Friday, 5 October 2018 at 10:03:35 UTC, Kagamin wrote: GC allocations are 16 bytes aligned. Is that an implementation detail or well-defined behavior?

Re: Alligned gc allocation of struct

2018-10-05 Thread Sjoerd Nijboer via Digitalmars-d-learn
On Friday, 5 October 2018 at 10:03:35 UTC, Kagamin wrote: GC allocations are 16 bytes aligned. That's perfect. Thank you!

Re: Alligned gc allocation of struct

2018-10-05 Thread Kagamin via Digitalmars-d-learn
GC allocations are 16 bytes aligned.

Alligned gc allocation of struct

2018-10-05 Thread Sjoerd Nijboer via Digitalmars-d-learn
I've got a `struct Foo{ubyte16 field1, field2 fieldn;}` for which I would like a heap allocation `Foo* foo = new Foo();` But the fields itsself must be 16 bytes aligned for SIMD instructions. Is there a neat way to do this in D? As far as I can tell the GC_allocator doesn't do aligned alloc