clr - Are arrays in Mono naturally aligned? -
what situation alignment of arrays in mono implementation of clr? guaranteed naturally aligned on platforms? if no, on platforms safe assume natural alignment of clr-managed arrays?
there 2 related questions on so:
alignment of arrays in .net answer describes alignment guarantees of ecma-335 standard
are arrays in .net naturally aligned? answer described alignment guarantees of microsoft .net framework
i looking similar information on mono framework.
for long , double arrays, guarantee array elements naturally aligned on 64 bit platforms.
on 32 bit platforms happen naturally aligned, , unlikely change since 32 bit architectures require doubles aligned , we'll keep code consistent on them.
note want library support processing starting @ index in array , since you're using simd instructions require 16 byte alignment, need check , scalar processing @ start/end of data anyway.
as long , double fields inside structs/classes, alignment not guaranteed on 32 bit systems, depends on abi, @ least 32 bits.
Comments
Post a Comment