From: kronbichler Date: Wed, 12 Dec 2012 15:31:35 +0000 (+0000) Subject: Undo 27799 on vectorization as the new trick did the same thing and obscured things. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed0c3452a7adbd40235272883d7a418b53330b84;p=dealii-svn.git Undo 27799 on vectorization as the new trick did the same thing and obscured things. git-svn-id: https://svn.dealii.org/trunk@27801 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/vectorization.h b/deal.II/include/deal.II/base/vectorization.h index f5830f514f..28403b7d48 100644 --- a/deal.II/include/deal.II/base/vectorization.h +++ b/deal.II/include/deal.II/base/vectorization.h @@ -103,10 +103,7 @@ public: operator [] (const unsigned int comp) { AssertIndexRange (comp, 4); - // __m256d stores doubles in adjacent memory blocks. to access one double - // data field at a time, first cast the address of the given data field to - // void* and then back to double*. - return *(static_cast(static_cast(&data))+comp); + return *(reinterpret_cast(&data)+comp); } /** @@ -116,7 +113,7 @@ public: operator [] (const unsigned int comp) const { AssertIndexRange (comp, 4); - return *(static_cast(static_cast(&data))+comp); + return *(reinterpret_cast(&data)+comp); } /** @@ -289,7 +286,7 @@ public: operator [] (const unsigned int comp) { AssertIndexRange (comp, 8); - return *(static_cast(static_cast(&data))+comp); + return *(reinterpret_cast(&data)+comp); } /** @@ -299,7 +296,7 @@ public: operator [] (const unsigned int comp) const { AssertIndexRange (comp, 8); - return *(static_cast(static_cast(&data))+comp); + return *(reinterpret_cast(&data)+comp); } /** @@ -475,7 +472,7 @@ public: operator [] (const unsigned int comp) { AssertIndexRange (comp, 2); - return *(static_cast(static_cast(&data))+comp); + return *(reinterpret_cast(&data)+comp); } /** @@ -485,7 +482,7 @@ public: operator [] (const unsigned int comp) const { AssertIndexRange (comp, 2); - return *(static_cast(static_cast(&data))+comp); + return *(reinterpret_cast(&data)+comp); } /** @@ -654,7 +651,7 @@ public: operator [] (const unsigned int comp) { AssertIndexRange (comp, 4); - return *(static_cast(static_cast(&data))+comp); + return *(reinterpret_cast(&data)+comp); } /** @@ -664,7 +661,7 @@ public: operator [] (const unsigned int comp) const { AssertIndexRange (comp, 4); - return *(static_cast(static_cast(&data))+comp); + return *(reinterpret_cast(&data)+comp);; } /**