mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
we were already aligning to 16 byte boundary fixed-size objects that are multiple of 16 bytes;
now we also align to 8byte boundary fixed-size objects that are multiple of 8 bytes. That's only useful for now for double, not e.g. for Vector2f, but that didn't seem to hurt. Am I missing something? Do you prefer that we don't align Vector2f at all? Also, improvements in test_unalignedassert.
This commit is contained in:
@@ -265,14 +265,14 @@ template<> inline void ei_pstoreu(int* to , const v4i& from )
|
||||
|
||||
template<> inline float ei_pfirst(const v4f& a)
|
||||
{
|
||||
float EIGEN_ALIGN_128 af[4];
|
||||
float EIGEN_ALIGN16 af[4];
|
||||
vec_st(a, 0, af);
|
||||
return af[0];
|
||||
}
|
||||
|
||||
template<> inline int ei_pfirst(const v4i& a)
|
||||
{
|
||||
int EIGEN_ALIGN_128 ai[4];
|
||||
int EIGEN_ALIGN16 ai[4];
|
||||
vec_st(a, 0, ai);
|
||||
return ai[0];
|
||||
}
|
||||
@@ -373,7 +373,7 @@ inline float ei_predux_mul(const v4f& a)
|
||||
|
||||
inline int ei_predux_mul(const v4i& a)
|
||||
{
|
||||
EIGEN_ALIGN_128 int aux[4];
|
||||
EIGEN_ALIGN16 int aux[4];
|
||||
ei_pstore(aux, a);
|
||||
return aux[0] * aux[1] * aux[2] * aux[3];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user