Skip to content

Commit 088f4da

Browse files
committed
be able to skip compiling fermion instantiations altogether
1 parent 2e68402 commit 088f4da

48 files changed

Lines changed: 291 additions & 70 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Grid/Makefile.am

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,24 @@ Version.h: version-cache
5454
include Make.inc
5555
include Eigen.inc
5656

57-
extra_sources+=$(WILS_FERMION_FILES)
58-
extra_sources+=$(STAG_FERMION_FILES)
57+
if BUILD_FERMION_INSTANTIATIONS
58+
extra_sources+=$(WILS_FERMION_FILES)
59+
extra_sources+=$(STAG_FERMION_FILES)
5960
if BUILD_ZMOBIUS
60-
extra_sources+=$(ZWILS_FERMION_FILES)
61+
extra_sources+=$(ZWILS_FERMION_FILES)
6162
endif
6263
if BUILD_GPARITY
63-
extra_sources+=$(GP_FERMION_FILES)
64+
extra_sources+=$(GP_FERMION_FILES)
6465
endif
6566
if BUILD_FERMION_REPS
66-
extra_sources+=$(ADJ_FERMION_FILES)
67-
extra_sources+=$(TWOIND_FERMION_FILES)
67+
extra_sources+=$(ADJ_FERMION_FILES)
68+
extra_sources+=$(TWOIND_FERMION_FILES)
6869
endif
6970
if BUILD_SP
7071
extra_sources+=$(SP_FERMION_FILES)
7172
if BUILD_FERMION_REPS
72-
extra_sources+=$(SP_TWOIND_FERMION_FILES)
73+
extra_sources+=$(SP_TWOIND_FERMION_FILES)
74+
endif
7375
endif
7476
endif
7577

HMC/FTHMC2p1f.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ See the full license in the file "LICENSE" in the top level distribution
2424
directory
2525
*************************************************************************************/
2626
/* END LEGAL */
27-
#include <Grid/Grid.h>
27+
28+
#include "disable_examples_without_instantiations.h"
29+
#ifdef ENABLE_FERMION_INSTANTIATIONS
30+
31+
#include<Grid/Grid.h>
2832

2933
#if Nc == 3
3034
#include <Grid/qcd/smearing/GaugeConfigurationMasked.h>
@@ -230,3 +234,4 @@ int main(int argc, char **argv)
230234
#endif
231235
} // main
232236

237+
#endif

HMC/FTHMC2p1f_3GeV.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ directory
2525
*************************************************************************************/
2626
/* END LEGAL */
2727

28-
#include <Grid/Grid.h>
28+
29+
#include "disable_examples_without_instantiations.h"
30+
#ifdef ENABLE_FERMION_INSTANTIATIONS
31+
32+
#include<Grid/Grid.h>
2933

3034
#if Nc == 3
3135
#include <Grid/qcd/smearing/GaugeConfigurationMasked.h>
@@ -231,5 +235,4 @@ int main(int argc, char **argv)
231235
#endif
232236
} // main
233237

234-
235-
238+
#endif

HMC/HMC2p1f_3GeV.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ See the full license in the file "LICENSE" in the top level distribution
2424
directory
2525
*************************************************************************************/
2626
/* END LEGAL */
27-
#include <Grid/Grid.h>
27+
28+
#include "disable_examples_without_instantiations.h"
29+
#ifdef ENABLE_FERMION_INSTANTIATIONS
30+
31+
#include<Grid/Grid.h>
2832

2933
#if Nc == 3
3034
#include <Grid/qcd/smearing/GaugeConfigurationMasked.h>
@@ -230,5 +234,4 @@ int main(int argc, char **argv)
230234
#endif
231235
} // main
232236

233-
234-
237+
#endif

HMC/Mobius2p1f.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ See the full license in the file "LICENSE" in the top level distribution
2727
directory
2828
*************************************************************************************/
2929
/* END LEGAL */
30-
#include <Grid/Grid.h>
30+
31+
#include "disable_examples_without_instantiations.h"
32+
#ifdef ENABLE_FERMION_INSTANTIATIONS
33+
34+
#include<Grid/Grid.h>
3135

3236
int main(int argc, char **argv) {
3337
using namespace Grid;
@@ -195,5 +199,4 @@ int main(int argc, char **argv) {
195199
Grid_finalize();
196200
} // main
197201

198-
199-
202+
#endif

HMC/Mobius2p1fEOFA.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ See the full license in the file "LICENSE" in the top level distribution
2828
directory
2929
*************************************************************************************/
3030
/* END LEGAL */
31-
#include <Grid/Grid.h>
31+
32+
#include "disable_examples_without_instantiations.h"
33+
#ifdef ENABLE_FERMION_INSTANTIATIONS
34+
35+
#include<Grid/Grid.h>
3236

3337
#ifdef GRID_DEFAULT_PRECISION_DOUBLE
3438
#define MIXED_PRECISION
@@ -449,5 +453,4 @@ int main(int argc, char **argv) {
449453
Grid_finalize();
450454
} // main
451455

452-
453-
456+
#endif

HMC/Mobius2p1fEOFA_F1.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ See the full license in the file "LICENSE" in the top level distribution
2828
directory
2929
*************************************************************************************/
3030
/* END LEGAL */
31-
#include <Grid/Grid.h>
31+
32+
#include "disable_examples_without_instantiations.h"
33+
#ifdef ENABLE_FERMION_INSTANTIATIONS
34+
35+
#include<Grid/Grid.h>
3236

3337
#ifdef GRID_DEFAULT_PRECISION_DOUBLE
3438
#define MIXED_PRECISION
@@ -442,5 +446,4 @@ int main(int argc, char **argv) {
442446
Grid_finalize();
443447
} // main
444448

445-
446-
449+
#endif

HMC/Mobius2p1fIDSDRGparityEOFA_40ID.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ See the full license in the file "LICENSE" in the top level distribution
2828
directory
2929
*************************************************************************************/
3030
/* END LEGAL */
31-
#include <Grid/Grid.h>
31+
32+
#include "disable_examples_without_instantiations.h"
33+
#ifdef ENABLE_FERMION_INSTANTIATIONS
34+
35+
#include<Grid/Grid.h>
3236

3337
using namespace Grid;
3438

@@ -918,3 +922,5 @@ int main(int argc, char **argv) {
918922
return 0;
919923
#endif
920924
} // main
925+
926+
#endif

HMC/Mobius2p1fIDSDRGparityEOFA_48ID.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ See the full license in the file "LICENSE" in the top level distribution
2828
directory
2929
*************************************************************************************/
3030
/* END LEGAL */
31-
#include <Grid/Grid.h>
31+
32+
#include "disable_examples_without_instantiations.h"
33+
#ifdef ENABLE_FERMION_INSTANTIATIONS
34+
35+
#include<Grid/Grid.h>
3236

3337
using namespace Grid;
3438

@@ -873,3 +877,5 @@ int main(int argc, char **argv) {
873877
return 0;
874878
#endif
875879
} // main
880+
881+
#endif

HMC/Mobius2p1fRHMC.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ See the full license in the file "LICENSE" in the top level distribution
2727
directory
2828
*************************************************************************************/
2929
/* END LEGAL */
30-
#include <Grid/Grid.h>
30+
31+
#include "disable_examples_without_instantiations.h"
32+
#ifdef ENABLE_FERMION_INSTANTIATIONS
33+
34+
#include<Grid/Grid.h>
3135

3236
int main(int argc, char **argv) {
3337
using namespace Grid;
@@ -193,5 +197,4 @@ int main(int argc, char **argv) {
193197
Grid_finalize();
194198
} // main
195199

196-
197-
200+
#endif

0 commit comments

Comments
 (0)