]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a bug when using 64 bit indices. 2539/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 21 Apr 2016 18:39:40 +0000 (14:39 -0400)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 21 Apr 2016 18:39:40 +0000 (14:39 -0400)
include/deal.II/lac/vector.templates.h

index 8be3c304d77efd02c2679b1dc86981b51af43639..d23c303352b99d860b7a117f54b97974007588be 100644 (file)
@@ -140,7 +140,8 @@ namespace internal
     {
       // set chunk size for sub-tasks
       const unsigned int gs = internal::Vector::minimum_parallel_grain_size;
-      n_chunks = std::min(4*MultithreadInfo::n_threads(), vec_size / gs);
+      n_chunks = std::min(static_cast<size_type>(4*MultithreadInfo::n_threads()),
+                          vec_size / gs);
       chunk_size = vec_size / n_chunks;
 
       // round to next multiple of 512 (or minimum grain size if that happens
@@ -989,7 +990,8 @@ namespace internal
     {
       // set chunk size for sub-tasks
       const unsigned int gs = internal::Vector::minimum_parallel_grain_size;
-      n_chunks = std::min(4*MultithreadInfo::n_threads(), vec_size / gs);
+      n_chunks = std::min(static_cast<size_type>(4*MultithreadInfo::n_threads()),
+                          vec_size / gs);
       chunk_size = vec_size / n_chunks;
 
       // round to next multiple of 512 (or leave it at the minimum grain size

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.