Is there an obvious reason why the following code segfaults ?
#include
#include
struct point {
__m128i v;
point()
SSE intrinsics are required to be 16-byte aligned in memory. When you allocate an __m128 on the stack, there's no problem because the compiler automatically aligns these correctly. The default allocator for std::vector<>, which handles dynamic memory allocation, does not produce aligned allocations.