diff --git a/src/debug.c b/src/debug.c index e42daf3..5d990d5 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1,4 +1,5 @@ -/* Functions for printing debugging information when compiling with option -DDEBUGFULL +/* Functions for printing debugging information when compiling with option -DDEBUGFULL. + * Should only be used with this macro, but IDE syntax checking works fine even without it. * * Copyright (C) ADDA contributors * This file is part of ADDA. @@ -12,14 +13,6 @@ * You should have received a copy of the GNU General Public License along with ADDA. If not, see * . */ - -/* This file should be compiled only in full debug mode, hence the following declaration is redundant. However, it helps - * proper syntax checking in IDE, such as Eclipse. - */ -#ifndef DEBUGFULL -# define DEBUGFULL -#endif - #include "const.h" // keep this first #include "debug.h" // corresponding header // project headers diff --git a/src/fft.c b/src/fft.c index ed8b613..a9a0643 100644 --- a/src/fft.c +++ b/src/fft.c @@ -13,6 +13,14 @@ * You should have received a copy of the GNU General Public License along with ADDA. If not, see * . */ +/* The following tests for compilation inconsistencies, but also helps proper syntax checking in IDE, such as Eclipse. + * Otherwise, a lot of unresolved-symbol errors are produced, when another build configuration is selected. + */ +#ifdef SPARSE +# error "This file is incompatible with SPARSE" +# undef SPARSE +#endif + #include "const.h" // keep this first #include "fft.h" // corresponding header // project headers diff --git a/src/matvec.c b/src/matvec.c index 83e9eac..6e1dcef 100644 --- a/src/matvec.c +++ b/src/matvec.c @@ -1,5 +1,6 @@ /* Calculate local matrix vector product of decomposed interaction matrix with r_k or p_k, using a FFT-based convolution * algorithm. Also contains code for SPARSE (non-FFT) mode. + * Should not be used with OPENCL mode, but IDE syntax checking works fine even in this mode. * * Copyright (C) ADDA contributors * This file is part of ADDA. @@ -36,9 +37,8 @@ extern doublecomplex * restrict arg_full; // defined and initialized in fft.c extern const doublecomplex * restrict Dmatrix,* restrict Rmatrix; extern doublecomplex * restrict Xmatrix,* restrict slices,* restrict slices_tr,* restrict slicesR,* restrict slicesR_tr; -extern const size_t DsizeY,DsizeZ; +extern const size_t DsizeY,DsizeZ,RsizeY; #endif // !SPARSE -extern const size_t RsizeY; // defined and initialized in timing.c extern size_t TotalMatVec; diff --git a/src/oclcore.c b/src/oclcore.c index db8db53..4ce44d4 100644 --- a/src/oclcore.c +++ b/src/oclcore.c @@ -12,11 +12,11 @@ * You should have received a copy of the GNU General Public License along with ADDA. If not, see * . */ - -/* This file should be compiled only in OpenCL mode, hence the following declaration is redundant. However, it helps - * proper syntax checking in IDE, such as Eclipse. +/* The following tests for compilation inconsistencies, but also helps proper syntax checking in IDE, such as Eclipse. + * Otherwise, a lot of unresolved-symbol errors are produced, when another build configuration is selected. */ #ifndef OPENCL +# error "This file requires OPENCL to be defined" # define OPENCL #endif diff --git a/src/oclmatvec.c b/src/oclmatvec.c index 12e1aa5..cf18e6c 100644 --- a/src/oclmatvec.c +++ b/src/oclmatvec.c @@ -13,6 +13,18 @@ * You should have received a copy of the GNU General Public License along with ADDA. If not, see * . */ +/* The following tests for compilation inconsistencies, but also helps proper syntax checking in IDE, such as Eclipse. + * Otherwise, a lot of unresolved-symbol errors are produced, when another build configuration is selected. + */ +#ifndef OPENCL +# error "This file requires OPENCL to be defined" +# define OPENCL +#endif +#ifdef SPARSE +# error "This file is incompatible with SPARSE" +# undef SPARSE +#endif + #include "const.h" // keep this first // project headers #include "comm.h" diff --git a/src/prec_time.c b/src/prec_time.c index 008538c..439ecc2 100644 --- a/src/prec_time.c +++ b/src/prec_time.c @@ -12,11 +12,11 @@ * You should have received a copy of the GNU General Public License along with ADDA. If not, see * . */ - -/* This file should be compiled only in precise timing mode, hence the following declaration is redundant. However, it - * helps proper syntax checking in IDE, such as Eclipse. +/* The following tests for compilation inconsistencies, but also helps proper syntax checking in IDE, such as Eclipse. + * Otherwise, a lot of unresolved-symbol errors are produced, when another build configuration is selected. */ #ifndef PRECISE_TIMING +# error "This file requires PRECISE_TIMING to be defined" # define PRECISE_TIMING #endif