You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for moving this here. Before I start getting my hands dirty, I would like to define the means of ensuring alignment that we want to support:
Something like dart_memalign: Fairly easy to do as the offset would be stored in the gptr alone. Downside: you can still access the unaligned leading portion of the allocated memory. Also, the aligned portions will likely be smaller, thus holding less elements than initially requested.
Pass minimum alignment as an option to dart_team_memalloc_symmetric (previously dart_team_memalloc_aligned), dart_team_memalloc (to be introduced), and dart_memalloc: the functions would allocate additional padding bytes and ensure alignment of the first element. This likely requires some additional book keeping of the raw pointer and the aligned pointer. A value of 0 will cause a fall-back to the alignment provided by the underlying allocator (MPI).
Alternative to 2: introduce separate functions that allow the specification of alignment. This is similar to the POSIX model, where malloc and posix_memalign are two different functions.
Personally, I am in favor of 2) but open for discussions.
As previously discussed in issue #280, DART should support user-specified alignment for allocation (also see #280 (comment))
The text was updated successfully, but these errors were encountered: