]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MatrixFree: Fix DoFInfo::memory_consumption 17825/head
authorMartin Kronbichler <martin.kronbichler@rub.de>
Fri, 1 Nov 2024 18:47:48 +0000 (19:47 +0100)
committerMartin Kronbichler <martin.kronbichler@rub.de>
Fri, 1 Nov 2024 18:51:47 +0000 (19:51 +0100)
source/matrix_free/dof_info.cc

index 4804548a36aec3b1ec40fc70f813ddd62cc771d0..91bbfcdfaa644a88f3283b5d10737200e027f059 100644 (file)
@@ -1527,15 +1527,45 @@ namespace internal
     DoFInfo::memory_consumption() const
     {
       std::size_t memory = sizeof(*this);
+      for (const auto &storage : index_storage_variants)
+        memory += storage.capacity() * sizeof(storage[0]);
       memory +=
         (row_starts.capacity() * sizeof(std::pair<unsigned int, unsigned int>));
       memory += MemoryConsumption::memory_consumption(dof_indices);
+      memory += MemoryConsumption::memory_consumption(dof_indices_interleaved);
+      memory += MemoryConsumption::memory_consumption(dof_indices_contiguous);
+      memory +=
+        MemoryConsumption::memory_consumption(dof_indices_contiguous_sm);
+      memory +=
+        MemoryConsumption::memory_consumption(dof_indices_interleave_strides);
+      memory +=
+        MemoryConsumption::memory_consumption(n_vectorization_lanes_filled);
+      memory += MemoryConsumption::memory_consumption(
+        hanging_node_constraint_masks_comp);
       memory +=
         MemoryConsumption::memory_consumption(hanging_node_constraint_masks);
+      memory += MemoryConsumption::memory_consumption(constrained_dofs);
       memory += MemoryConsumption::memory_consumption(row_starts_plain_indices);
       memory += MemoryConsumption::memory_consumption(plain_dof_indices);
       memory += MemoryConsumption::memory_consumption(constraint_indicator);
       memory += MemoryConsumption::memory_consumption(*vector_partitioner);
+      memory += MemoryConsumption::memory_consumption(n_components);
+      memory += MemoryConsumption::memory_consumption(start_components);
+      memory += MemoryConsumption::memory_consumption(component_to_base_index);
+      memory +=
+        MemoryConsumption::memory_consumption(component_dof_indices_offset);
+      memory += MemoryConsumption::memory_consumption(dofs_per_cell);
+      memory += MemoryConsumption::memory_consumption(dofs_per_face);
+      memory += MemoryConsumption::memory_consumption(cell_active_fe_index);
+      memory += MemoryConsumption::memory_consumption(fe_index_conversion);
+      memory +=
+        MemoryConsumption::memory_consumption(vector_zero_range_list_index);
+      memory += MemoryConsumption::memory_consumption(vector_zero_range_list);
+      memory += MemoryConsumption::memory_consumption(cell_loop_pre_list_index);
+      memory += MemoryConsumption::memory_consumption(cell_loop_pre_list);
+      memory +=
+        MemoryConsumption::memory_consumption(cell_loop_post_list_index);
+      memory += MemoryConsumption::memory_consumption(cell_loop_post_list);
       return memory;
     }
   } // namespace MatrixFreeFunctions

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.