]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use AlignedVector instead of std::vector as data container for TableBase. It uses...
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 8 Apr 2014 20:33:01 +0000 (20:33 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 8 Apr 2014 20:33:01 +0000 (20:33 +0000)
git-svn-id: https://svn.dealii.org/trunk@32740 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/aligned_vector.h
deal.II/include/deal.II/base/table.h

index 7c8241a2734813858309a13cdc82ef8bf37708c1..c73f58f662fdec5cb1cf88f1b6e24d7db8858a78 100644 (file)
@@ -341,7 +341,10 @@ namespace internal
       if (size == 0)
         return;
 
-      if (std_cxx1x::is_trivial<T>::value == true)
+      // do not use memset for long double because on some systems it does not
+      // completely fill its memory
+      if (std_cxx1x::is_trivial<T>::value == true &&
+          types_are_equal<T,long double>::value == false)
         {
           const unsigned char zero [sizeof(T)] = {};
           // cast element to (void*) to silence compiler warning for virtual
index 890d8d9af476cf83152abde593d7d7c3e9efb64b..8bd939aa91e93495b56761e5f3f3dcdb933dcc10 100644 (file)
@@ -22,6 +22,7 @@
 #include <deal.II/base/subscriptor.h>
 #include <deal.II/base/table_indices.h>
 #include <deal.II/base/memory_consumption.h>
+#include <deal.II/base/aligned_vector.h>
 
 #include <cstddef>
 #include <algorithm>
@@ -86,11 +87,11 @@ namespace internal
       typedef const T value_type;
       typedef const TableBase<N,T> TableType;
 
-      typedef typename std::vector<T>::const_iterator iterator;
-      typedef typename std::vector<T>::const_iterator const_iterator;
+      typedef typename AlignedVector<T>::const_iterator iterator;
+      typedef typename AlignedVector<T>::const_iterator const_iterator;
 
-      typedef typename std::vector<T>::const_reference reference;
-      typedef typename std::vector<T>::const_reference const_reference;
+      typedef typename AlignedVector<T>::const_reference reference;
+      typedef typename AlignedVector<T>::const_reference const_reference;
     };
 
     /**
@@ -104,11 +105,11 @@ namespace internal
       typedef T value_type;
       typedef TableBase<N,T> TableType;
 
-      typedef typename std::vector<T>::iterator iterator;
-      typedef typename std::vector<T>::const_iterator const_iterator;
+      typedef typename AlignedVector<T>::iterator iterator;
+      typedef typename AlignedVector<T>::const_iterator const_iterator;
 
-      typedef typename std::vector<T>::reference reference;
-      typedef typename std::vector<T>::const_reference const_reference;
+      typedef typename AlignedVector<T>::reference reference;
+      typedef typename AlignedVector<T>::const_reference const_reference;
     };
 
 
@@ -648,7 +649,7 @@ public:
    * Return a read-write reference
    * to the indicated element.
    */
-  typename std::vector<T>::reference
+  typename AlignedVector<T>::reference
   operator () (const TableIndices<N> &indices);
 
   /**
@@ -664,7 +665,7 @@ public:
    * don't know here whether
    * copying is expensive or not.
    */
-  typename std::vector<T>::const_reference
+  typename AlignedVector<T>::const_reference
   operator () (const TableIndices<N> &indices) const;
 
   /**
@@ -712,7 +713,7 @@ protected:
    * used internally and in
    * functions already checked.
    */
-  typename std::vector<T>::reference el (const TableIndices<N> &indices);
+  typename AlignedVector<T>::reference el (const TableIndices<N> &indices);
 
   /**
    * Return the value of the
@@ -732,7 +733,7 @@ protected:
    * don't know here whether
    * copying is expensive or not.
    */
-  typename std::vector<T>::const_reference el (const TableIndices<N> &indices) const;
+  typename AlignedVector<T>::const_reference el (const TableIndices<N> &indices) const;
 
   /**
    * @deprecated This function
@@ -746,13 +747,13 @@ protected:
    * cast from const), otherwise,
    * keep away!
    */
-  typename std::vector<T>::const_pointer data () const DEAL_II_DEPRECATED;
+  typename AlignedVector<T>::const_pointer data () const DEAL_II_DEPRECATED;
 
 protected:
   /**
    * Component-array.
    */
-  std::vector<T> values;
+  AlignedVector<T> values;
 
   /**
    * Size in each direction of the
@@ -869,7 +870,7 @@ public:
    * data element. Returns a
    * read-only reference.
    */
-  typename std::vector<T>::const_reference
+  typename AlignedVector<T>::const_reference
   operator [] (const unsigned int i) const;
 
   /**
@@ -879,7 +880,7 @@ public:
    * data element. Returns a
    * read-write reference.
    */
-  typename std::vector<T>::reference
+  typename AlignedVector<T>::reference
   operator [] (const unsigned int i);
 
   /**
@@ -889,7 +890,7 @@ public:
    * data element. Returns a
    * read-only reference.
    */
-  typename std::vector<T>::const_reference
+  typename AlignedVector<T>::const_reference
   operator () (const unsigned int i) const;
 
   /**
@@ -899,7 +900,7 @@ public:
    * data element. Returns a
    * read-write reference.
    */
-  typename std::vector<T>::reference
+  typename AlignedVector<T>::reference
   operator () (const unsigned int i);
 
   /**
@@ -908,7 +909,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::reference
+  typename AlignedVector<T>::reference
   operator () (const TableIndices<1> &indices);
 
   /**
@@ -917,7 +918,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::const_reference
+  typename AlignedVector<T>::const_reference
   operator () (const TableIndices<1> &indices) const;
 };
 
@@ -1049,7 +1050,7 @@ public:
    * This version of the function
    * only allows read access.
    */
-  typename std::vector<T>::const_reference
+  typename AlignedVector<T>::const_reference
   operator () (const unsigned int i,
                const unsigned int j) const;
 
@@ -1063,7 +1064,7 @@ public:
    * This version of the function
    * allows read-write access.
    */
-  typename std::vector<T>::reference
+  typename AlignedVector<T>::reference
   operator () (const unsigned int i,
                const unsigned int j);
 
@@ -1073,7 +1074,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::reference
+  typename AlignedVector<T>::reference
   operator () (const TableIndices<2> &indices);
 
   /**
@@ -1082,7 +1083,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::const_reference
+  typename AlignedVector<T>::const_reference
   operator () (const TableIndices<2> &indices) const;
 
 
@@ -1118,8 +1119,8 @@ protected:
    * table classes for 2d arrays,
    * then called <tt>vector2d</tt>.
    */
-  typename std::vector<T>::reference el (const unsigned int i,
-                                         const unsigned int j);
+  typename AlignedVector<T>::reference el (const unsigned int i,
+                                           const unsigned int j);
 
   /**
    * Return the value of the
@@ -1145,8 +1146,8 @@ protected:
    * table classes for 2d arrays,
    * then called <tt>vector2d</tt>.
    */
-  typename std::vector<T>::const_reference el (const unsigned int i,
-                                               const unsigned int j) const;
+  typename AlignedVector<T>::const_reference el (const unsigned int i,
+                                                 const unsigned int j) const;
 };
 
 
@@ -1266,9 +1267,9 @@ public:
    * This version of the function
    * only allows read access.
    */
-  typename std::vector<T>::const_reference operator () (const unsigned int i,
-                                                        const unsigned int j,
-                                                        const unsigned int k) const;
+  typename AlignedVector<T>::const_reference operator () (const unsigned int i,
+                                                          const unsigned int j,
+                                                          const unsigned int k) const;
 
 
   /**
@@ -1280,9 +1281,9 @@ public:
    * This version of the function
    * allows read-write access.
    */
-  typename std::vector<T>::reference operator () (const unsigned int i,
-                                                  const unsigned int j,
-                                                  const unsigned int k);
+  typename AlignedVector<T>::reference operator () (const unsigned int i,
+                                                    const unsigned int j,
+                                                    const unsigned int k);
 
   /**
    * Make the corresponding
@@ -1290,7 +1291,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::reference operator () (const TableIndices<3> &indices);
+  typename AlignedVector<T>::reference operator () (const TableIndices<3> &indices);
 
   /**
    * Make the corresponding
@@ -1298,7 +1299,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::const_reference operator () (const TableIndices<3> &indices) const;
+  typename AlignedVector<T>::const_reference operator () (const TableIndices<3> &indices) const;
 };
 
 
@@ -1370,10 +1371,10 @@ public:
    * This version of the function
    * only allows read access.
    */
-  typename std::vector<T>::const_reference operator () (const unsigned int i,
-                                                        const unsigned int j,
-                                                        const unsigned int k,
-                                                        const unsigned int l) const;
+  typename AlignedVector<T>::const_reference operator () (const unsigned int i,
+                                                          const unsigned int j,
+                                                          const unsigned int k,
+                                                          const unsigned int l) const;
 
 
   /**
@@ -1385,10 +1386,10 @@ public:
    * This version of the function
    * allows read-write access.
    */
-  typename std::vector<T>::reference operator () (const unsigned int i,
-                                                  const unsigned int j,
-                                                  const unsigned int k,
-                                                  const unsigned int l);
+  typename AlignedVector<T>::reference operator () (const unsigned int i,
+                                                    const unsigned int j,
+                                                    const unsigned int k,
+                                                    const unsigned int l);
 
   /**
    * Make the corresponding
@@ -1396,7 +1397,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::reference
+  typename AlignedVector<T>::reference
   operator () (const TableIndices<4> &indices);
 
   /**
@@ -1405,7 +1406,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::const_reference
+  typename AlignedVector<T>::const_reference
   operator () (const TableIndices<4> &indices) const;
 };
 
@@ -1479,11 +1480,11 @@ public:
    * This version of the function
    * only allows read access.
    */
-  typename std::vector<T>::const_reference operator () (const unsigned int i,
-                                                        const unsigned int j,
-                                                        const unsigned int k,
-                                                        const unsigned int l,
-                                                        const unsigned int m) const;
+  typename AlignedVector<T>::const_reference operator () (const unsigned int i,
+                                                          const unsigned int j,
+                                                          const unsigned int k,
+                                                          const unsigned int l,
+                                                          const unsigned int m) const;
 
   /**
    * Direct access to one element
@@ -1494,11 +1495,11 @@ public:
    * This version of the function
    * allows read-write access.
    */
-  typename std::vector<T>::reference operator () (const unsigned int i,
-                                                  const unsigned int j,
-                                                  const unsigned int k,
-                                                  const unsigned int l,
-                                                  const unsigned int m);
+  typename AlignedVector<T>::reference operator () (const unsigned int i,
+                                                    const unsigned int j,
+                                                    const unsigned int k,
+                                                    const unsigned int l,
+                                                    const unsigned int m);
 
   /**
    * Make the corresponding
@@ -1506,7 +1507,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::reference
+  typename AlignedVector<T>::reference
   operator () (const TableIndices<5> &indices);
 
   /**
@@ -1515,7 +1516,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::const_reference
+  typename AlignedVector<T>::const_reference
   operator () (const TableIndices<5> &indices) const;
 };
 
@@ -1590,12 +1591,12 @@ public:
    * This version of the function
    * only allows read access.
    */
-  typename std::vector<T>::const_reference operator () (const unsigned int i,
-                                                        const unsigned int j,
-                                                        const unsigned int k,
-                                                        const unsigned int l,
-                                                        const unsigned int m,
-                                                        const unsigned int n) const;
+  typename AlignedVector<T>::const_reference operator () (const unsigned int i,
+                                                          const unsigned int j,
+                                                          const unsigned int k,
+                                                          const unsigned int l,
+                                                          const unsigned int m,
+                                                          const unsigned int n) const;
 
   /**
    * Direct access to one element
@@ -1606,12 +1607,12 @@ public:
    * This version of the function
    * allows read-write access.
    */
-  typename std::vector<T>::reference operator () (const unsigned int i,
-                                                  const unsigned int j,
-                                                  const unsigned int k,
-                                                  const unsigned int l,
-                                                  const unsigned int m,
-                                                  const unsigned int n);
+  typename AlignedVector<T>::reference operator () (const unsigned int i,
+                                                    const unsigned int j,
+                                                    const unsigned int k,
+                                                    const unsigned int l,
+                                                    const unsigned int m,
+                                                    const unsigned int n);
 
   /**
    * Make the corresponding
@@ -1619,7 +1620,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::reference
+  typename AlignedVector<T>::reference
   operator () (const TableIndices<6> &indices);
 
   /**
@@ -1628,7 +1629,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::const_reference
+  typename AlignedVector<T>::const_reference
   operator () (const TableIndices<6> &indices) const;
 };
 
@@ -1703,13 +1704,13 @@ public:
    * This version of the function
    * only allows read access.
    */
-  typename std::vector<T>::const_reference operator () (const unsigned int i,
-                                                        const unsigned int j,
-                                                        const unsigned int k,
-                                                        const unsigned int l,
-                                                        const unsigned int m,
-                                                        const unsigned int n,
-                                                        const unsigned int o) const;
+  typename AlignedVector<T>::const_reference operator () (const unsigned int i,
+                                                          const unsigned int j,
+                                                          const unsigned int k,
+                                                          const unsigned int l,
+                                                          const unsigned int m,
+                                                          const unsigned int n,
+                                                          const unsigned int o) const;
 
   /**
    * Direct access to one element
@@ -1720,13 +1721,13 @@ public:
    * This version of the function
    * allows read-write access.
    */
-  typename std::vector<T>::reference operator () (const unsigned int i,
-                                                  const unsigned int j,
-                                                  const unsigned int k,
-                                                  const unsigned int l,
-                                                  const unsigned int m,
-                                                  const unsigned int n,
-                                                  const unsigned int o);
+  typename AlignedVector<T>::reference operator () (const unsigned int i,
+                                                    const unsigned int j,
+                                                    const unsigned int k,
+                                                    const unsigned int l,
+                                                    const unsigned int m,
+                                                    const unsigned int n,
+                                                    const unsigned int o);
 
   /**
    * Make the corresponding
@@ -1734,7 +1735,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::reference
+  typename AlignedVector<T>::reference
   operator () (const TableIndices<7> &indices);
 
   /**
@@ -1743,7 +1744,7 @@ public:
    * base class available also in
    * this class.
    */
-  typename std::vector<T>::const_reference
+  typename AlignedVector<T>::const_reference
   operator () (const TableIndices<7> &indices) const;
 };
 
@@ -1803,8 +1804,8 @@ public:
    * This version of the function
    * only allows read access.
    */
-  typename std::vector<T>::const_reference operator () (const unsigned int i,
-                                                        const unsigned int j) const;
+  typename AlignedVector<T>::const_reference operator () (const unsigned int i,
+                                                          const unsigned int j) const;
 
   /**
    * Direct access to one element
@@ -1815,8 +1816,8 @@ public:
    * This version of the function
    * allows read-write access.
    */
-  typename std::vector<T>::reference operator () (const unsigned int i,
-                                                  const unsigned int j);
+  typename AlignedVector<T>::reference operator () (const unsigned int i,
+                                                    const unsigned int j);
 
   /**
    * Number of rows. This function
@@ -1850,7 +1851,7 @@ protected:
    * table classes for 2d arrays,
    * then called <tt>vector2d</tt>.
    */
-  typename std::vector<T>::reference el (const unsigned int i,
+  typename AlignedVector<T>::reference el (const unsigned int i,
                                          const unsigned int j);
 
   /**
@@ -1877,7 +1878,7 @@ protected:
    * table classes for 2d arrays,
    * then called <tt>vector2d</tt>.
    */
-  typename std::vector<T>::const_reference el (const unsigned int i,
+  typename AlignedVector<T>::const_reference el (const unsigned int i,
                                                const unsigned int j) const;
 };
 
@@ -1923,7 +1924,10 @@ TableBase<N,T>::TableBase (const TableBase<N,T> &src)
 {
   reinit (src.table_size);
   if (src.n_elements() != 0)
-    std::copy (src.values.begin(), src.values.end(), values.begin());
+    internal::AlignedVectorMove<T> (const_cast<T*>(src.values.begin()),
+                                    const_cast<T*>(src.values.end()),
+                                    values.begin(),
+                                    true);
 }
 
 
@@ -2114,7 +2118,10 @@ TableBase<N,T>::operator = (const TableBase<N,T> &m)
 {
   reinit (m.size());
   if (!empty())
-    std::copy (m.values.begin(), m.values.end(), values.begin());
+    internal::AlignedVectorMove<T> (const_cast<T*>(m.values.begin()),
+                                    const_cast<T*>(m.values.end()),
+                                    values.begin(),
+                                    true);
 
   return *this;
 }
@@ -2127,7 +2134,7 @@ inline
 TableBase<N,T> &
 TableBase<N,T>::operator = (const TableBase<N,T2> &m)
 {
-  reinit (m.size());
+  reinit (m.size(), true);
   if (!empty())
     std::copy (m.values.begin(), m.values.begin() + n_elements(),
                values.begin());
@@ -2151,8 +2158,10 @@ inline
 void
 TableBase<N,T>::reset_values ()
 {
+  // use parallel set operation
   if (n_elements() != 0)
-    std::fill (values.begin(), values.end(), T());
+    internal::AlignedVectorSet<T> (values.size(), T(),
+                                   values.begin());
 }
 
 
@@ -2163,7 +2172,8 @@ void
 TableBase<N,T>::fill (const T &value)
 {
   if (n_elements() != 0)
-    std::fill (values.begin(), values.end(), value);
+    internal::AlignedVectorSet<T> (values.size(), value,
+                                   values.begin());
 }
 
 
@@ -2179,8 +2189,7 @@ TableBase<N,T>::reinit (const TableIndices<N> &new_sizes,
 
   const unsigned int new_size = n_elements();
 
-  // if zero size was given: free all
-  // memory
+  // if zero size was given: free all memory
   if (new_size == 0)
     {
       values.resize (0);
@@ -2193,27 +2202,12 @@ TableBase<N,T>::reinit (const TableIndices<N> &new_sizes,
       return;
     }
 
-  // if new size is nonzero:
-  // if necessary allocate
-  // additional memory
-  values.resize (new_size);
-
-  // reinitialize contents of old or
-  // new memory. note that we
-  // actually need to do this here,
-  // even in the case that we
-  // reallocated memory, since per
-  // C++ standard, clause 5.3.4/15
-  // the newly allocated objects are
-  // only default initialized by
-  // operator new[] if they are
-  // non-POD type. In other words, if
-  // we have a table of doubles, then
-  // their values after calling 'new
-  // double[val_size]' is
-  // indetermined.
-  if (fast == false)
-    reset_values ();
+  // if new size is nonzero: if necessary allocate additional memory, and if
+  // not fast resize, zero out all values)
+  values.resize_fast (new_size);
+  if (!fast)
+    internal::AlignedVectorSet<T> (values.size(), T(),
+                                   values.begin());
 }
 
 
@@ -2317,7 +2311,7 @@ TableBase<N,T>::fill (InputIterator entries,
           ExcMessage("Trying to fill an empty matrix."));
 
   if (C_style_indexing)
-    for (typename std::vector<T>::iterator p = values.begin();
+    for (typename AlignedVector<T>::iterator p = values.begin();
         p != values.end(); ++p)
       *p = *entries++;
   else
@@ -2380,7 +2374,7 @@ TableBase<N,T>::position (const TableIndices<N> &indices) const
 
 template <int N, typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 TableBase<N,T>::operator () (const TableIndices<N> &indices) const
 {
   for (unsigned int n=0; n<N; ++n)
@@ -2393,7 +2387,7 @@ TableBase<N,T>::operator () (const TableIndices<N> &indices) const
 
 template <int N, typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 TableBase<N,T>::operator () (const TableIndices<N> &indices)
 {
   for (unsigned int n=0; n<N; ++n)
@@ -2406,7 +2400,7 @@ TableBase<N,T>::operator () (const TableIndices<N> &indices)
 
 template <int N, typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 TableBase<N,T>::el (const TableIndices<N> &indices) const
 {
   return values[position(indices)];
@@ -2416,7 +2410,7 @@ TableBase<N,T>::el (const TableIndices<N> &indices) const
 
 template <int N, typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 TableBase<N,T>::el (const TableIndices<N> &indices)
 {
   Assert (position(indices) < values.size(),
@@ -2428,11 +2422,11 @@ TableBase<N,T>::el (const TableIndices<N> &indices)
 
 template <int N, typename T>
 inline
-typename std::vector<T>::const_pointer
+typename AlignedVector<T>::const_pointer
 TableBase<N,T>::data () const
 {
   if (values.size() == 0)
-    return typename std::vector<T>::const_pointer();
+    return typename AlignedVector<T>::const_pointer();
   else
     return &values[0];
 }
@@ -2472,7 +2466,7 @@ Table<1,T>::Table (const unsigned int size,
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<1,T>::operator [] (const unsigned int i) const
 {
   Assert (i < this->table_size[0],
@@ -2484,7 +2478,7 @@ Table<1,T>::operator [] (const unsigned int i) const
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<1,T>::operator [] (const unsigned int i)
 {
   Assert (i < this->table_size[0],
@@ -2496,7 +2490,7 @@ Table<1,T>::operator [] (const unsigned int i)
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<1,T>::operator () (const unsigned int i) const
 {
   Assert (i < this->table_size[0],
@@ -2508,7 +2502,7 @@ Table<1,T>::operator () (const unsigned int i) const
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<1,T>::operator () (const unsigned int i)
 {
   Assert (i < this->table_size[0],
@@ -2520,7 +2514,7 @@ Table<1,T>::operator () (const unsigned int i)
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<1,T>::operator () (const TableIndices<1> &indices) const
 {
   return TableBase<1,T>::operator () (indices);
@@ -2530,7 +2524,7 @@ Table<1,T>::operator () (const TableIndices<1> &indices) const
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<1,T>::operator () (const TableIndices<1> &indices)
 {
   return TableBase<1,T>::operator () (indices);
@@ -2611,7 +2605,7 @@ Table<2,T>::operator [] (const unsigned int i)
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<2,T>::operator () (const unsigned int i,
                          const unsigned int j) const
 {
@@ -2626,7 +2620,7 @@ Table<2,T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<2,T>::operator () (const unsigned int i,
                          const unsigned int j)
 {
@@ -2641,7 +2635,7 @@ Table<2,T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<2,T>::operator () (const TableIndices<2> &indices) const
 {
   return TableBase<2,T>::operator () (indices);
@@ -2651,7 +2645,7 @@ Table<2,T>::operator () (const TableIndices<2> &indices) const
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<2,T>::operator () (const TableIndices<2> &indices)
 {
   return TableBase<2,T>::operator () (indices);
@@ -2661,7 +2655,7 @@ Table<2,T>::operator () (const TableIndices<2> &indices)
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<2,T>::el (const unsigned int i,
                 const unsigned int j) const
 {
@@ -2672,7 +2666,7 @@ Table<2,T>::el (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<2,T>::el (const unsigned int i,
                 const unsigned int j)
 {
@@ -2734,7 +2728,7 @@ TransposeTable<T>::reinit (const unsigned int size1,
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 TransposeTable<T>::operator () (const unsigned int i,
                                 const unsigned int j) const
 {
@@ -2749,7 +2743,7 @@ TransposeTable<T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 TransposeTable<T>::operator () (const unsigned int i,
                                 const unsigned int j)
 {
@@ -2764,7 +2758,7 @@ TransposeTable<T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 TransposeTable<T>::el (const unsigned int i,
                        const unsigned int j) const
 {
@@ -2775,7 +2769,7 @@ TransposeTable<T>::el (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 TransposeTable<T>::el (const unsigned int i,
                        const unsigned int j)
 {
@@ -2875,7 +2869,7 @@ Table<3,T>::operator [] (const unsigned int i)
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<3,T>::operator () (const unsigned int i,
                          const unsigned int j,
                          const unsigned int k) const
@@ -2894,7 +2888,7 @@ Table<3,T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<3,T>::operator () (const unsigned int i,
                          const unsigned int j,
                          const unsigned int k)
@@ -2913,7 +2907,7 @@ Table<3,T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<3,T>::operator () (const TableIndices<3> &indices) const
 {
   return TableBase<3,T>::operator () (indices);
@@ -2923,7 +2917,7 @@ Table<3,T>::operator () (const TableIndices<3> &indices) const
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<3,T>::operator () (const TableIndices<3> &indices)
 {
   return TableBase<3,T>::operator () (indices);
@@ -2986,7 +2980,7 @@ Table<4,T>::operator [] (const unsigned int i)
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<4,T>::operator () (const unsigned int i,
                          const unsigned int j,
                          const unsigned int k,
@@ -3009,7 +3003,7 @@ Table<4,T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<4,T>::operator () (const unsigned int i,
                          const unsigned int j,
                          const unsigned int k,
@@ -3032,7 +3026,7 @@ Table<4,T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<4,T>::operator () (const TableIndices<4> &indices) const
 {
   return TableBase<4,T>::operator () (indices);
@@ -3042,7 +3036,7 @@ Table<4,T>::operator () (const TableIndices<4> &indices) const
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<4,T>::operator () (const TableIndices<4> &indices)
 {
   return TableBase<4,T>::operator () (indices);
@@ -3108,7 +3102,7 @@ Table<5,T>::operator [] (const unsigned int i)
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<5,T>::operator () (const unsigned int i,
                          const unsigned int j,
                          const unsigned int k,
@@ -3135,7 +3129,7 @@ Table<5,T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<5,T>::operator () (const unsigned int i,
                          const unsigned int j,
                          const unsigned int k,
@@ -3162,7 +3156,7 @@ Table<5,T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<5,T>::operator () (const TableIndices<5> &indices) const
 {
   return TableBase<5,T>::operator () (indices);
@@ -3172,7 +3166,7 @@ Table<5,T>::operator () (const TableIndices<5> &indices) const
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<5,T>::operator () (const TableIndices<5> &indices)
 {
   return TableBase<5,T>::operator () (indices);
@@ -3241,7 +3235,7 @@ Table<6,T>::operator [] (const unsigned int i)
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<6,T>::operator () (const unsigned int i,
                          const unsigned int j,
                          const unsigned int k,
@@ -3272,7 +3266,7 @@ Table<6,T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<6,T>::operator () (const unsigned int i,
                          const unsigned int j,
                          const unsigned int k,
@@ -3303,7 +3297,7 @@ Table<6,T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<6,T>::operator () (const TableIndices<6> &indices) const
 {
   return TableBase<6,T>::operator () (indices);
@@ -3313,7 +3307,7 @@ Table<6,T>::operator () (const TableIndices<6> &indices) const
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<6,T>::operator () (const TableIndices<6> &indices)
 {
   return TableBase<6,T>::operator () (indices);
@@ -3385,7 +3379,7 @@ Table<7,T>::operator [] (const unsigned int i)
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<7,T>::operator () (const unsigned int i,
                          const unsigned int j,
                          const unsigned int k,
@@ -3420,7 +3414,7 @@ Table<7,T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<7,T>::operator () (const unsigned int i,
                          const unsigned int j,
                          const unsigned int k,
@@ -3455,7 +3449,7 @@ Table<7,T>::operator () (const unsigned int i,
 
 template <typename T>
 inline
-typename std::vector<T>::const_reference
+typename AlignedVector<T>::const_reference
 Table<7,T>::operator () (const TableIndices<7> &indices) const
 {
   return TableBase<7,T>::operator () (indices);
@@ -3465,7 +3459,7 @@ Table<7,T>::operator () (const TableIndices<7> &indices) const
 
 template <typename T>
 inline
-typename std::vector<T>::reference
+typename AlignedVector<T>::reference
 Table<7,T>::operator () (const TableIndices<7> &indices)
 {
   return TableBase<7,T>::operator () (indices);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.