]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Use std::memset. Fix typo in in-code comment.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Jan 2013 14:43:28 +0000 (14:43 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Jan 2013 14:43:28 +0000 (14:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@28147 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 3ce6ea26c30bb731ae7fe7f78a2d67d8587428e8..6a2854ef911965bde2c9004e26bcc116c7d2d188 100644 (file)
@@ -1497,7 +1497,7 @@ FullMatrix<number>::operator = (const number d)
   (void)d; // removes -Wunused-parameter warning in optimized mode
 
   if (this->n_elements() != 0)
-    memset (&this->values[0], 0, this->n_elements()*sizeof(number));
+    std::memset (&this->values[0], 0, this->n_elements()*sizeof(number));
 
   return *this;
 }
index f032403de4da6c8164f6304af3c1db0038f13f2d..d9d982f3ee7bc523b165bc56dec519433dd2328d 100644 (file)
@@ -144,18 +144,13 @@ SparseMatrix<number>::operator = (const double d)
   Assert (cols != 0, ExcNotInitialized());
   Assert (cols->compressed || cols->empty(), SparsityPattern::ExcNotCompressed());
 
-  // do initial zeroing of elements in
-  // parallel. Try to achieve a similar layout
-  // as when doing matrix-vector products, as on
-  // some NUMA systems, a memory block is
-  // assigned to memory banks where the first
-  // access is generated. For sparse matrices,
-  // the first operations is usually the
-  // operator=. The grain size is chosen to
-  // reflect the number of rows in
-  // minimum_parallel_grain_size, weighted by
-  // the number of nonzero entries per row on
-  // average.
+  // do initial zeroing of elements in parallel. Try to achieve a similar
+  // layout as when doing matrix-vector products, as on some NUMA systems, a
+  // memory block is assigned to memory banks where the first access is
+  // generated. For sparse matrices, the first operations is usually the
+  // operator=. The grain size is chosen to reflect the number of rows in
+  // minimum_parallel_grain_size, weighted by the number of nonzero entries
+  // per row on average.
   const unsigned int matrix_size = cols->n_nonzero_elements();
   const unsigned int grain_size =
     internal::SparseMatrix::minimum_parallel_grain_size *
@@ -168,7 +163,7 @@ SparseMatrix<number>::operator = (const double d)
                                                   val),
                                   grain_size);
   else if (matrix_size > 0)
-    memset (&val[0], 0, matrix_size*sizeof(number));
+    std::memset (&val[0], 0, matrix_size*sizeof(number));
 
   return *this;
 }

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.