Skip to content

Fix #15#16

Open
uphoffc wants to merge 7 commits intomasterfrom
new_alignment_mode
Open

Fix #15#16
uphoffc wants to merge 7 commits intomasterfrom
new_alignment_mode

Conversation

@uphoffc
Copy link
Contributor

@uphoffc uphoffc commented Jul 24, 2020

When a tensor's stride is divisible by the vector width then memory is always assumed to be aligned. In some situations one might want to work with unaligned memory even if the stride is divisible by the vector width (e.g. when interfacing existing data structures without aligned memory allocation).

With this PR one may pass Alignment.Unaligned to the alignStride option to enforce unaligned memory access. The previous "False" value maps to Alignment.Automatic and the previous "True" value maps to Alignment.Aligned. Passing True and False is still ok such that existing code does not need to be changed.

@krenzland krenzland requested a review from lrannabauer July 28, 2020 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant