help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: _mm_add_ps SIGSEGV


From: Paul Pluzhnikov
Subject: Re: _mm_add_ps SIGSEGV
Date: Tue, 06 Jun 2006 06:09:44 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

Alan Woodland <ajw05@aber.ac.uk> writes:

> This code segfaults on the last line quoted here, which isn't surprising
> because c isn't aligned correctly. My question now is twofold:
> a) Why isn't c aligned how __m128 needs to be? and

Because "operator new[]" has been compiled with "strictest alignment
8 on this platform", which is true for all "regular" types, but
not for SSE :(

> b) How to work around it? Is it even possible to get an array of __m128s
> aligned correctly?

Use memalign() or posix_memalign().

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]