From: Wolfgang Bangerth Date: Mon, 26 May 2025 22:27:48 +0000 (-0600) Subject: Avoid including .cc files for split instantiations. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce1cac9f7d8cbca4918926c34032eb5a8c757720;p=dealii.git Avoid including .cc files for split instantiations. --- diff --git a/source/matrix_free/evaluation_template_face_factory.cc b/source/matrix_free/evaluation_template_face_factory.cc index 42917cec36..4b8abba4fc 100644 --- a/source/matrix_free/evaluation_template_face_factory.cc +++ b/source/matrix_free/evaluation_template_face_factory.cc @@ -18,9 +18,7 @@ DEAL_II_NAMESPACE_OPEN #define SPLIT_INSTANTIATIONS_COUNT 6 -#ifndef SPLIT_INSTANTIATIONS_INDEX -# define SPLIT_INSTANTIATIONS_INDEX 0 -#endif +#define SPLIT_INSTANTIATIONS_INDEX 0 #include "matrix_free/evaluation_template_face_factory.inst" diff --git a/source/matrix_free/evaluation_template_face_factory_inst2.cc b/source/matrix_free/evaluation_template_face_factory_inst2.cc index 5c4fcbe2db..52bb4f38be 100644 --- a/source/matrix_free/evaluation_template_face_factory_inst2.cc +++ b/source/matrix_free/evaluation_template_face_factory_inst2.cc @@ -12,5 +12,13 @@ // // ------------------------------------------------------------------------ +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 6 #define SPLIT_INSTANTIATIONS_INDEX 1 -#include "evaluation_template_face_factory.cc" + +#include "matrix_free/evaluation_template_face_factory.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/evaluation_template_face_factory_inst3.cc b/source/matrix_free/evaluation_template_face_factory_inst3.cc index 2fffdc898a..12a3588833 100644 --- a/source/matrix_free/evaluation_template_face_factory_inst3.cc +++ b/source/matrix_free/evaluation_template_face_factory_inst3.cc @@ -12,5 +12,13 @@ // // ------------------------------------------------------------------------ +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 6 #define SPLIT_INSTANTIATIONS_INDEX 2 -#include "evaluation_template_face_factory.cc" + +#include "matrix_free/evaluation_template_face_factory.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/evaluation_template_face_factory_inst4.cc b/source/matrix_free/evaluation_template_face_factory_inst4.cc index 8d2c3cb040..bf0da5ded7 100644 --- a/source/matrix_free/evaluation_template_face_factory_inst4.cc +++ b/source/matrix_free/evaluation_template_face_factory_inst4.cc @@ -12,5 +12,13 @@ // // ------------------------------------------------------------------------ +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 6 #define SPLIT_INSTANTIATIONS_INDEX 3 -#include "evaluation_template_face_factory.cc" + +#include "matrix_free/evaluation_template_face_factory.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/evaluation_template_face_factory_inst5.cc b/source/matrix_free/evaluation_template_face_factory_inst5.cc index a07e7d75f1..154ec25bee 100644 --- a/source/matrix_free/evaluation_template_face_factory_inst5.cc +++ b/source/matrix_free/evaluation_template_face_factory_inst5.cc @@ -12,5 +12,13 @@ // // ------------------------------------------------------------------------ +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 6 #define SPLIT_INSTANTIATIONS_INDEX 4 -#include "evaluation_template_face_factory.cc" + +#include "matrix_free/evaluation_template_face_factory.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/evaluation_template_face_factory_inst6.cc b/source/matrix_free/evaluation_template_face_factory_inst6.cc index b39eba0dab..3c8db8bd85 100644 --- a/source/matrix_free/evaluation_template_face_factory_inst6.cc +++ b/source/matrix_free/evaluation_template_face_factory_inst6.cc @@ -12,5 +12,13 @@ // // ------------------------------------------------------------------------ +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 6 #define SPLIT_INSTANTIATIONS_INDEX 5 -#include "evaluation_template_face_factory.cc" + +#include "matrix_free/evaluation_template_face_factory.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/evaluation_template_factory.cc b/source/matrix_free/evaluation_template_factory.cc index 7239376b99..5b7c3c231a 100644 --- a/source/matrix_free/evaluation_template_factory.cc +++ b/source/matrix_free/evaluation_template_factory.cc @@ -18,9 +18,7 @@ DEAL_II_NAMESPACE_OPEN #define SPLIT_INSTANTIATIONS_COUNT 6 -#ifndef SPLIT_INSTANTIATIONS_INDEX -# define SPLIT_INSTANTIATIONS_INDEX 0 -#endif +#define SPLIT_INSTANTIATIONS_INDEX 0 #include "matrix_free/evaluation_template_factory.inst" diff --git a/source/matrix_free/evaluation_template_factory_inst2.cc b/source/matrix_free/evaluation_template_factory_inst2.cc index 4d13a0ac47..11ecbd51b3 100644 --- a/source/matrix_free/evaluation_template_factory_inst2.cc +++ b/source/matrix_free/evaluation_template_factory_inst2.cc @@ -12,5 +12,13 @@ // // ------------------------------------------------------------------------ +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 6 #define SPLIT_INSTANTIATIONS_INDEX 1 -#include "evaluation_template_factory.cc" + +#include "matrix_free/evaluation_template_factory.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/evaluation_template_factory_inst3.cc b/source/matrix_free/evaluation_template_factory_inst3.cc index 0ecf474662..2bdd64c0b0 100644 --- a/source/matrix_free/evaluation_template_factory_inst3.cc +++ b/source/matrix_free/evaluation_template_factory_inst3.cc @@ -12,5 +12,13 @@ // // ------------------------------------------------------------------------ +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 6 #define SPLIT_INSTANTIATIONS_INDEX 2 -#include "evaluation_template_factory.cc" + +#include "matrix_free/evaluation_template_factory.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/evaluation_template_factory_inst4.cc b/source/matrix_free/evaluation_template_factory_inst4.cc index 68b2e235f3..874a16082a 100644 --- a/source/matrix_free/evaluation_template_factory_inst4.cc +++ b/source/matrix_free/evaluation_template_factory_inst4.cc @@ -12,5 +12,13 @@ // // ------------------------------------------------------------------------ +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 6 #define SPLIT_INSTANTIATIONS_INDEX 3 -#include "evaluation_template_factory.cc" + +#include "matrix_free/evaluation_template_factory.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/evaluation_template_factory_inst5.cc b/source/matrix_free/evaluation_template_factory_inst5.cc index bc3f72de30..70f53ecbcc 100644 --- a/source/matrix_free/evaluation_template_factory_inst5.cc +++ b/source/matrix_free/evaluation_template_factory_inst5.cc @@ -12,5 +12,13 @@ // // ------------------------------------------------------------------------ +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 6 #define SPLIT_INSTANTIATIONS_INDEX 4 -#include "evaluation_template_factory.cc" + +#include "matrix_free/evaluation_template_factory.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/evaluation_template_factory_inst6.cc b/source/matrix_free/evaluation_template_factory_inst6.cc index 8cf67bb980..8108baae57 100644 --- a/source/matrix_free/evaluation_template_factory_inst6.cc +++ b/source/matrix_free/evaluation_template_factory_inst6.cc @@ -12,5 +12,13 @@ // // ------------------------------------------------------------------------ +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 6 #define SPLIT_INSTANTIATIONS_INDEX 5 -#include "evaluation_template_factory.cc" + +#include "matrix_free/evaluation_template_factory.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/mapping_info.cc b/source/matrix_free/mapping_info.cc index 0de5389d6a..82a728f002 100644 --- a/source/matrix_free/mapping_info.cc +++ b/source/matrix_free/mapping_info.cc @@ -23,9 +23,8 @@ DEAL_II_NAMESPACE_OPEN #define SPLIT_INSTANTIATIONS_COUNT 3 -#ifndef SPLIT_INSTANTIATIONS_INDEX -# define SPLIT_INSTANTIATIONS_INDEX 0 -#endif +#define SPLIT_INSTANTIATIONS_INDEX 0 + #include "matrix_free/mapping_info.inst" DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/mapping_info_inst2.cc b/source/matrix_free/mapping_info_inst2.cc index 109bb82f41..11cef66def 100644 --- a/source/matrix_free/mapping_info_inst2.cc +++ b/source/matrix_free/mapping_info_inst2.cc @@ -12,5 +12,17 @@ // // ------------------------------------------------------------------------ +#include +#include + +#include + +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 3 #define SPLIT_INSTANTIATIONS_INDEX 1 -#include "mapping_info.cc" +#include "matrix_free/mapping_info.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/mapping_info_inst3.cc b/source/matrix_free/mapping_info_inst3.cc index 044b7a4200..3b6a117816 100644 --- a/source/matrix_free/mapping_info_inst3.cc +++ b/source/matrix_free/mapping_info_inst3.cc @@ -12,5 +12,18 @@ // // ------------------------------------------------------------------------ +#include +#include + +#include + +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 3 #define SPLIT_INSTANTIATIONS_INDEX 2 -#include "mapping_info.cc" + +#include "matrix_free/mapping_info.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/numerics/matrix_creator.cc b/source/numerics/matrix_creator.cc index 6e5187f529..4160ae96db 100644 --- a/source/numerics/matrix_creator.cc +++ b/source/numerics/matrix_creator.cc @@ -19,9 +19,8 @@ DEAL_II_NAMESPACE_OPEN // explicit instantiations #define SPLIT_INSTANTIATIONS_COUNT 3 -#ifndef SPLIT_INSTANTIATIONS_INDEX -# define SPLIT_INSTANTIATIONS_INDEX 0 -#endif +#define SPLIT_INSTANTIATIONS_INDEX 0 + #include "numerics/matrix_creator.inst" DEAL_II_NAMESPACE_CLOSE diff --git a/source/numerics/matrix_creator_inst2.cc b/source/numerics/matrix_creator_inst2.cc index 2331d097c9..9e22e58476 100644 --- a/source/numerics/matrix_creator_inst2.cc +++ b/source/numerics/matrix_creator_inst2.cc @@ -12,8 +12,15 @@ // // ------------------------------------------------------------------------ -// This file compiles a part of the instantiations from matrix_creator.cc -// to reduce the compilation unit (and memory consumption) +#include + +DEAL_II_NAMESPACE_OPEN + +// explicit instantiations +#define SPLIT_INSTANTIATIONS_COUNT 3 #define SPLIT_INSTANTIATIONS_INDEX 1 -#include "matrix_creator.cc" + +#include "numerics/matrix_creator.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/numerics/matrix_creator_inst3.cc b/source/numerics/matrix_creator_inst3.cc index 5ea5fee894..779578bba2 100644 --- a/source/numerics/matrix_creator_inst3.cc +++ b/source/numerics/matrix_creator_inst3.cc @@ -12,8 +12,15 @@ // // ------------------------------------------------------------------------ -// This file compiles a part of the instantiations from matrix_creator.cc -// to reduce the compilation unit (and memory consumption) +#include + +DEAL_II_NAMESPACE_OPEN + +// explicit instantiations +#define SPLIT_INSTANTIATIONS_COUNT 3 #define SPLIT_INSTANTIATIONS_INDEX 2 -#include "matrix_creator.cc" + +#include "numerics/matrix_creator.inst" + +DEAL_II_NAMESPACE_CLOSE