Download

How do you align memory addresses for SSE (AVX)

Hi guys.

I tried to ask this question at last Epic streaming ( C++ ) but there was a ton of questions, so my question was not chosen :frowning:

I usually just use alignas() but everytime I use the SIMD operations, I’m getting have more hesitation to using this way.

Is there any proper way to align memory adresses for SIMD operations?

Or If you prefer your own way would you like to tell me? Thank you.

Haven’t looked if AVX is any different. But usually when moving data into the Registers you can choose between moving aligned or unaligned. Unaligned has a little performancehit, but depending on what you do, that is most likely nottoo noticeable.

I know this is not the answer for your initial question, but i think it is an alternative viable route. At least to kick it off.