Luc Bourhis:

With "auto a = new double[1000]", is there any guarantee that a.ptr is aligned on a 16-byte boundary?

Arrays are aligned on a 16-byte. But if you slice them, this alignment can be broken.

In past I suggested to put the alignment of an array in the D type system, as an optional extra information (if the alignment is not correct this causes compile-time errors in some cases and some run-time errors when the slicing bounds are runtime values).

Bye,
bearophile

Reply via email to