Is it possible to cast floats directly to __m128 if they are 16 byte aligned?

前端 未结 5 1677
时光取名叫无心
时光取名叫无心 2020-12-06 05:26

Is it safe/possible/advisable to cast floats directly to __m128 if they are 16 byte aligned?

I noticed using _mm_load_ps and _mm_stor

5条回答
  •  旧巷少年郎
    2020-12-06 05:56

    What makes you think that _mm_load_ps and _mm_store_ps "add a significant overhead" ? This is the normal way to load/store float data to/from SSE registers assuming source/destination is memory (and any other method eventually boils down to this anyway).

提交回复
热议问题