]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Eliminating unnecessary copy operations from FullMatrix
authordanshapero <shapero.daniel@gmail.com>
Tue, 17 Jan 2017 07:09:45 +0000 (23:09 -0800)
committerdanshapero <shapero.daniel@gmail.com>
Tue, 17 Jan 2017 07:09:45 +0000 (23:09 -0800)
The copy constructor and copy assignment operator for FullMatrix are
unnecessary, since FullMatrix inherits from Table<2>.

include/deal.II/lac/full_matrix.h
include/deal.II/lac/full_matrix.templates.h

index 7e7f985b3285007f63762e49d2e904de3da3431d..d4cf55dd47a7bb29d15de1fc9eea42203c7fd7c0 100644 (file)
@@ -224,17 +224,6 @@ public:
   FullMatrix (const size_type rows,
               const size_type cols);
 
-  /**
-   * Copy constructor. This constructor does a deep copy of the matrix.
-   * Therefore, it poses a possible efficiency problem, if for example,
-   * function arguments are passed by value rather than by reference.
-   * Unfortunately, we can't mark this copy constructor <tt>explicit</tt>,
-   * since that prevents the use of this class in containers, such as
-   * <tt>std::vector</tt>. The responsibility to check performance of programs
-   * must therefore remain with the user of this class.
-   */
-  FullMatrix (const FullMatrix &);
-
   /**
    * Constructor initializing from an array of numbers. The array is arranged
    * line by line. No range checking is performed.
@@ -263,14 +252,6 @@ public:
    * @{
    */
 
-  /**
-   * Assignment operator.
-   *
-   * @dealiiOperationIsMultithreaded
-   */
-  FullMatrix<number> &
-  operator = (const FullMatrix<number> &);
-
   /**
    * Variable assignment operator.
    */
index d941e38acbc505c744a028bc21267189ff33e9ef..a91162222ee7f07a369e22f7e7aae2e2303fec31 100644 (file)
@@ -66,13 +66,6 @@ FullMatrix<number>::FullMatrix (const size_type m,
 }
 
 
-template <typename number>
-FullMatrix<number>::FullMatrix (const FullMatrix &m)
-  :
-  Table<2,number> (m)
-{}
-
-
 
 template <typename number>
 FullMatrix<number>::FullMatrix (const IdentityMatrix &id)
@@ -84,14 +77,6 @@ FullMatrix<number>::FullMatrix (const IdentityMatrix &id)
 }
 
 
-template <typename number>
-FullMatrix<number> &
-FullMatrix<number>::operator = (const FullMatrix<number> &M)
-{
-  Table<2,number>::operator=(M);
-  return *this;
-}
-
 
 template <typename number>
 template <typename number2>

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.