From: danshapero Date: Tue, 17 Jan 2017 07:09:45 +0000 (-0800) Subject: Eliminating unnecessary copy operations from FullMatrix X-Git-Tag: v8.5.0-rc1~224^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b53e4ff081b498098cc2aa86766ab645aece15f;p=dealii.git Eliminating unnecessary copy operations from FullMatrix The copy constructor and copy assignment operator for FullMatrix are unnecessary, since FullMatrix inherits from Table<2>. --- diff --git a/include/deal.II/lac/full_matrix.h b/include/deal.II/lac/full_matrix.h index 7e7f985b32..d4cf55dd47 100644 --- a/include/deal.II/lac/full_matrix.h +++ b/include/deal.II/lac/full_matrix.h @@ -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 explicit, - * since that prevents the use of this class in containers, such as - * std::vector. 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 & - operator = (const FullMatrix &); - /** * Variable assignment operator. */ diff --git a/include/deal.II/lac/full_matrix.templates.h b/include/deal.II/lac/full_matrix.templates.h index d941e38acb..a91162222e 100644 --- a/include/deal.II/lac/full_matrix.templates.h +++ b/include/deal.II/lac/full_matrix.templates.h @@ -66,13 +66,6 @@ FullMatrix::FullMatrix (const size_type m, } -template -FullMatrix::FullMatrix (const FullMatrix &m) - : - Table<2,number> (m) -{} - - template FullMatrix::FullMatrix (const IdentityMatrix &id) @@ -84,14 +77,6 @@ FullMatrix::FullMatrix (const IdentityMatrix &id) } -template -FullMatrix & -FullMatrix::operator = (const FullMatrix &M) -{ - Table<2,number>::operator=(M); - return *this; -} - template template