From: Paul Bauer Date: Tue, 19 May 2020 05:29:21 +0000 (+0000) Subject: Remove unnecessary includes of arrayref.h X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=d124594129a9e7b9c63597e42c7976333d05e3f2;p=alexxy%2Fgromacs.git Remove unnecessary includes of arrayref.h Changed to forward declaration. Don't think I got all of them yet. Change-Id: I7c148364db152ed0a6645e91ee1ab93421441c0d --- diff --git a/src/gromacs/analysisdata/framelocaldata.h b/src/gromacs/analysisdata/framelocaldata.h index 432926cbc8..33d9e977ed 100644 --- a/src/gromacs/analysisdata/framelocaldata.h +++ b/src/gromacs/analysisdata/framelocaldata.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2015,2017,2019, by the GROMACS development team, led by + * Copyright (c) 2014,2015,2017,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -47,12 +47,14 @@ #include #include "gromacs/analysisdata/paralleloptions.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/gmxassert.h" namespace gmx { +template +class ArrayRef; + //! \addtogroup module_analysisdata //! \{ diff --git a/src/gromacs/applied_forces/densityfittingamplitudelookup.cpp b/src/gromacs/applied_forces/densityfittingamplitudelookup.cpp index 3b7343b717..27be15efb3 100644 --- a/src/gromacs/applied_forces/densityfittingamplitudelookup.cpp +++ b/src/gromacs/applied_forces/densityfittingamplitudelookup.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -47,6 +47,7 @@ #include #include "gromacs/mdtypes/mdatom.h" +#include "gromacs/utility/arrayref.h" namespace gmx { diff --git a/src/gromacs/applied_forces/densityfittingamplitudelookup.h b/src/gromacs/applied_forces/densityfittingamplitudelookup.h index 9b32472cf5..86675bcec6 100644 --- a/src/gromacs/applied_forces/densityfittingamplitudelookup.h +++ b/src/gromacs/applied_forces/densityfittingamplitudelookup.h @@ -44,8 +44,8 @@ #include #include +#include -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/enumerationhelpers.h" #include "gromacs/utility/real.h" @@ -54,6 +54,9 @@ struct t_mdatoms; namespace gmx { +template +class ArrayRef; + /*! \brief * The methods that determine how amplitudes are spread on a grid in density guided simulations. */ diff --git a/src/gromacs/applied_forces/tests/densityfittingamplitudelookup.cpp b/src/gromacs/applied_forces/tests/densityfittingamplitudelookup.cpp index 531052885e..2cd5125bfc 100644 --- a/src/gromacs/applied_forces/tests/densityfittingamplitudelookup.cpp +++ b/src/gromacs/applied_forces/tests/densityfittingamplitudelookup.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -48,6 +48,7 @@ #include #include "gromacs/mdtypes/mdatom.h" +#include "gromacs/utility/arrayref.h" namespace gmx { diff --git a/src/gromacs/awh/biasstate.h b/src/gromacs/awh/biasstate.h index 161a4bd1ee..b36c5e86e8 100644 --- a/src/gromacs/awh/biasstate.h +++ b/src/gromacs/awh/biasstate.h @@ -58,7 +58,6 @@ #include "gromacs/math/vectypes.h" #include "gromacs/utility/alignedallocator.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/gmxassert.h" @@ -72,6 +71,8 @@ struct t_commrec; namespace gmx { +template +class ArrayRef; struct AwhBiasHistory; struct AwhBiasParams; class BiasParams; diff --git a/src/gromacs/awh/coordstate.h b/src/gromacs/awh/coordstate.h index e3d2550cab..f924ef449d 100644 --- a/src/gromacs/awh/coordstate.h +++ b/src/gromacs/awh/coordstate.h @@ -54,13 +54,13 @@ #include -#include "gromacs/utility/arrayref.h" - #include "dimparams.h" namespace gmx { +template +class ArrayRef; struct AwhBiasParams; struct AwhBiasStateHistory; class BiasParams; diff --git a/src/gromacs/awh/correlationgrid.h b/src/gromacs/awh/correlationgrid.h index 742d760ca2..a1c4338d03 100644 --- a/src/gromacs/awh/correlationgrid.h +++ b/src/gromacs/awh/correlationgrid.h @@ -50,7 +50,6 @@ #include -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/gmxassert.h" @@ -59,6 +58,8 @@ namespace gmx { +template +class ArrayRef; struct CorrelationGridHistory; /*! \internal diff --git a/src/gromacs/awh/histogramsize.cpp b/src/gromacs/awh/histogramsize.cpp index f405685d74..fcfd452d4a 100644 --- a/src/gromacs/awh/histogramsize.cpp +++ b/src/gromacs/awh/histogramsize.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2016,2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2017,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -54,6 +54,7 @@ #include "gromacs/mdtypes/awh_history.h" #include "gromacs/mdtypes/awh_params.h" +#include "gromacs/utility/arrayref.h" #include "gromacs/utility/gmxassert.h" #include "gromacs/utility/stringutil.h" diff --git a/src/gromacs/awh/histogramsize.h b/src/gromacs/awh/histogramsize.h index 7fb3a21ce9..7d9313549c 100644 --- a/src/gromacs/awh/histogramsize.h +++ b/src/gromacs/awh/histogramsize.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2016,2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2017,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -57,11 +57,12 @@ #include #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" namespace gmx { +template +class ArrayRef; struct AwhBiasStateHistory; struct AwhBiasParams; class BiasParams; diff --git a/src/gromacs/awh/tests/biasstate.cpp b/src/gromacs/awh/tests/biasstate.cpp index dcf43a9f66..cdb08acd00 100644 --- a/src/gromacs/awh/tests/biasstate.cpp +++ b/src/gromacs/awh/tests/biasstate.cpp @@ -48,6 +48,7 @@ #include "gromacs/awh/pointstate.h" #include "gromacs/math/functions.h" #include "gromacs/mdtypes/awh_params.h" +#include "gromacs/utility/arrayref.h" #include "gromacs/utility/smalloc.h" #include "testutils/testasserts.h" diff --git a/src/gromacs/commandline/filenm.cpp b/src/gromacs/commandline/filenm.cpp index 696368f08a..ec798075f3 100644 --- a/src/gromacs/commandline/filenm.cpp +++ b/src/gromacs/commandline/filenm.cpp @@ -46,6 +46,7 @@ #include #include "gromacs/fileio/filetypes.h" +#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/gmxassert.h" diff --git a/src/gromacs/commandline/filenm.h b/src/gromacs/commandline/filenm.h index d5e654abb0..5cc0e620a1 100644 --- a/src/gromacs/commandline/filenm.h +++ b/src/gromacs/commandline/filenm.h @@ -50,13 +50,18 @@ #include #include "gromacs/fileio/filetypes.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" //! \addtogroup module_commandline //! \{ +namespace gmx +{ +template +class ArrayRef; +} // namespace gmx + /*! \brief * File name option definition for C code. * diff --git a/src/gromacs/coordinateio/tests/requirements.h b/src/gromacs/coordinateio/tests/requirements.h index 9afbfbf243..8a91f71262 100644 --- a/src/gromacs/coordinateio/tests/requirements.h +++ b/src/gromacs/coordinateio/tests/requirements.h @@ -52,7 +52,6 @@ #include "gromacs/coordinateio/requirements.h" #include "gromacs/options/options.h" #include "gromacs/utility/any.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/stringutil.h" #include "gromacs/coordinateio/tests/coordinate_test.h" @@ -60,6 +59,9 @@ namespace gmx { +template +class ArrayRef; + namespace test { diff --git a/src/gromacs/domdec/box.h b/src/gromacs/domdec/box.h index d02c34b9d8..4cc482b402 100644 --- a/src/gromacs/domdec/box.h +++ b/src/gromacs/domdec/box.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2018,2019, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -47,8 +47,12 @@ #include #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" +namespace gmx +{ +template +class ArrayRef; +} struct gmx_ddbox_t; struct gmx_domdec_t; struct t_commrec; diff --git a/src/gromacs/domdec/cellsizes.h b/src/gromacs/domdec/cellsizes.h index d35da8357f..cf07585e89 100644 --- a/src/gromacs/domdec/cellsizes.h +++ b/src/gromacs/domdec/cellsizes.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2018,2019, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -47,8 +47,12 @@ #include "gromacs/math/vectypes.h" #include "gromacs/timing/wallcycle.h" -#include "gromacs/utility/arrayref.h" +namespace gmx +{ +template +class ArrayRef; +} struct gmx_ddbox_t; struct gmx_domdec_comm_t; struct gmx_domdec_t; diff --git a/src/gromacs/domdec/collect.h b/src/gromacs/domdec/collect.h index 4d4b3b766f..62d28c0f2a 100644 --- a/src/gromacs/domdec/collect.h +++ b/src/gromacs/domdec/collect.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2018,2019, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -44,8 +44,12 @@ #define GMX_DOMDEC_COLLECT_H #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" +namespace gmx +{ +template +class ArrayRef; +} struct gmx_domdec_t; class t_state; diff --git a/src/gromacs/domdec/domdec_network.h b/src/gromacs/domdec/domdec_network.h index 902dbb768a..48d8702bcd 100644 --- a/src/gromacs/domdec/domdec_network.h +++ b/src/gromacs/domdec/domdec_network.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2008-2018, The GROMACS development team. - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -50,10 +50,14 @@ #define GMX_DOMDEC_DOMDEC_NETWORK_H #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" struct gmx_domdec_t; +namespace gmx +{ +template +class ArrayRef; +} /* \brief */ enum { diff --git a/src/gromacs/domdec/localatomset.h b/src/gromacs/domdec/localatomset.h index 594c18b5c2..41599d37b2 100644 --- a/src/gromacs/domdec/localatomset.h +++ b/src/gromacs/domdec/localatomset.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2018,2019, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -43,11 +43,12 @@ #ifndef GMX_DOMDEC_LOCALATOMSET_H #define GMX_DOMDEC_LOCALATOMSET_H -#include "gromacs/utility/arrayref.h" +#include namespace gmx { - +template +class ArrayRef; namespace internal { class LocalAtomSetData; diff --git a/src/gromacs/domdec/localatomsetmanager.h b/src/gromacs/domdec/localatomsetmanager.h index 2c7bafed20..8a2c227f32 100644 --- a/src/gromacs/domdec/localatomsetmanager.h +++ b/src/gromacs/domdec/localatomsetmanager.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2018,2019, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -46,7 +46,6 @@ #include -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/classhelpers.h" @@ -54,7 +53,8 @@ class gmx_ga2la_t; namespace gmx { - +template +class ArrayRef; class LocalAtomSet; /*! \libinternal \brief diff --git a/src/gromacs/domdec/tests/localatomsetmanager.cpp b/src/gromacs/domdec/tests/localatomsetmanager.cpp index 282ad6824e..6feb1b03d3 100644 --- a/src/gromacs/domdec/tests/localatomsetmanager.cpp +++ b/src/gromacs/domdec/tests/localatomsetmanager.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2018,2019, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -51,6 +51,7 @@ #include #include "gromacs/domdec/localatomset.h" +#include "gromacs/utility/arrayref.h" #include "gromacs/utility/exceptions.h" #include "testutils/testasserts.h" diff --git a/src/gromacs/domdec/utility.h b/src/gromacs/domdec/utility.h index 89e804aaf6..e3fea6e1e7 100644 --- a/src/gromacs/domdec/utility.h +++ b/src/gromacs/domdec/utility.h @@ -44,10 +44,15 @@ #include "gromacs/math/vectypes.h" #include "gromacs/mdtypes/forcerec.h" -#include "gromacs/utility/arrayref.h" #include "domdec_internal.h" +namespace gmx +{ +template +class ArrayRef; +} + /*! \brief Returns true if the DLB state indicates that the balancer is on. */ static inline bool isDlbOn(const gmx_domdec_comm_t* comm) { diff --git a/src/gromacs/ewald/pme.h b/src/gromacs/ewald/pme.h index 11fe087389..d60f2e6326 100644 --- a/src/gromacs/ewald/pme.h +++ b/src/gromacs/ewald/pme.h @@ -54,7 +54,6 @@ #include "gromacs/gpu_utils/devicebuffer_datatype.h" #include "gromacs/gpu_utils/gpu_macros.h" #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/real.h" @@ -78,6 +77,8 @@ class GpuEventSynchronizer; namespace gmx { +template +class ArrayRef; class ForceWithVirial; class MDLogger; enum class PinningPolicy : int; diff --git a/src/gromacs/ewald/pme_coordinate_receiver_gpu_impl.h b/src/gromacs/ewald/pme_coordinate_receiver_gpu_impl.h index e1186a2f3a..9094a7c7b3 100644 --- a/src/gromacs/ewald/pme_coordinate_receiver_gpu_impl.h +++ b/src/gromacs/ewald/pme_coordinate_receiver_gpu_impl.h @@ -43,6 +43,8 @@ #ifndef GMX_PMECOORDINATERECEIVERGPU_IMPL_H #define GMX_PMECOORDINATERECEIVERGPU_IMPL_H +#include + #include "gromacs/ewald/pme_coordinate_receiver_gpu.h" #include "gromacs/utility/arrayref.h" @@ -50,7 +52,6 @@ class GpuEventSynchronizer; namespace gmx { - /*! \internal \brief Class with interfaces and data for CUDA version of PME coordinate receiving functionality */ class PmeCoordinateReceiverGpu::Impl diff --git a/src/gromacs/ewald/pme_gpu_internal.h b/src/gromacs/ewald/pme_gpu_internal.h index 9a15c3bbc9..f2cbc94c5d 100644 --- a/src/gromacs/ewald/pme_gpu_internal.h +++ b/src/gromacs/ewald/pme_gpu_internal.h @@ -49,7 +49,6 @@ #include "gromacs/fft/fft.h" // for the gmx_fft_direction enum #include "gromacs/gpu_utils/devicebuffer_datatype.h" #include "gromacs/gpu_utils/gpu_macros.h" // for the GPU_FUNC_ macros -#include "gromacs/utility/arrayref.h" #include "pme_gpu_types_host.h" #include "pme_output.h" @@ -72,6 +71,8 @@ struct t_complex; namespace gmx { +template +class ArrayRef; class MDLogger; } // namespace gmx diff --git a/src/gromacs/ewald/tests/pmetestcommon.h b/src/gromacs/ewald/tests/pmetestcommon.h index 7f2e727c5f..8e6e135409 100644 --- a/src/gromacs/ewald/tests/pmetestcommon.h +++ b/src/gromacs/ewald/tests/pmetestcommon.h @@ -50,13 +50,15 @@ #include "gromacs/ewald/pme_gpu_internal.h" #include "gromacs/math/gmxcomplex.h" #include "gromacs/mdtypes/state_propagator_data_gpu.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/unique_cptr.h" namespace gmx { class DeviceStreamManager; +template +class ArrayRef; + namespace test { diff --git a/src/gromacs/fileio/mrcdensitymap.h b/src/gromacs/fileio/mrcdensitymap.h index 7f74656730..aec1d970ac 100644 --- a/src/gromacs/fileio/mrcdensitymap.h +++ b/src/gromacs/fileio/mrcdensitymap.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -46,12 +46,12 @@ #include "gromacs/math/multidimarray.h" #include "gromacs/mdspan/extensions.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/classhelpers.h" namespace gmx { - +template +class ArrayRef; struct MrcDensityMapHeader; class ISerializer; class TranslateAndScale; diff --git a/src/gromacs/fileio/readinp.cpp b/src/gromacs/fileio/readinp.cpp index 1d2d501760..907e49050a 100644 --- a/src/gromacs/fileio/readinp.cpp +++ b/src/gromacs/fileio/readinp.cpp @@ -45,6 +45,7 @@ #include #include "gromacs/fileio/warninp.h" +#include "gromacs/utility/arrayref.h" #include "gromacs/utility/binaryinformation.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/exceptions.h" diff --git a/src/gromacs/fileio/readinp.h b/src/gromacs/fileio/readinp.h index e8e23f0d17..4ae78cb21a 100644 --- a/src/gromacs/fileio/readinp.h +++ b/src/gromacs/fileio/readinp.h @@ -44,7 +44,6 @@ #include #include -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" struct warninp; @@ -52,6 +51,8 @@ typedef warninp* warninp_t; namespace gmx { +template +class ArrayRef; class KeyValueTreeObject; class TextInputStream; class TextOutputStream; diff --git a/src/gromacs/fileio/tests/mrcdensitymapheader.cpp b/src/gromacs/fileio/tests/mrcdensitymapheader.cpp index e9e17df359..0cc8580d65 100644 --- a/src/gromacs/fileio/tests/mrcdensitymapheader.cpp +++ b/src/gromacs/fileio/tests/mrcdensitymapheader.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -50,6 +50,8 @@ #include #include +#include "gromacs/utility/arrayref.h" + #include "testutils/testasserts.h" #include "testutils/testmatchers.h" diff --git a/src/gromacs/fileio/tngio.h b/src/gromacs/fileio/tngio.h index 1ee34cc140..6a33e33d96 100644 --- a/src/gromacs/fileio/tngio.h +++ b/src/gromacs/fileio/tngio.h @@ -40,7 +40,6 @@ #include #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/real.h" @@ -50,6 +49,11 @@ struct gmx_tng_trajectory; typedef struct gmx_tng_trajectory* gmx_tng_trajectory_t; struct t_trxframe; +namespace gmx +{ +template +class ArrayRef; +} /*! \brief Open a TNG trajectory file * * \param filename Name of file to open diff --git a/src/gromacs/fileio/tpxio.h b/src/gromacs/fileio/tpxio.h index b3633a7c79..5fc0bea2bc 100644 --- a/src/gromacs/fileio/tpxio.h +++ b/src/gromacs/fileio/tpxio.h @@ -44,7 +44,6 @@ #include "gromacs/math/vectypes.h" #include "gromacs/pbcutil/pbc.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/real.h" @@ -55,6 +54,11 @@ struct t_inputrec; class t_state; struct t_topology; +namespace gmx +{ +template +class ArrayRef; +} /*! \libinternal * \brief * First part of the TPR file structure containing information about diff --git a/src/gromacs/fileio/trxio.h b/src/gromacs/fileio/trxio.h index 8940bc5903..ae1660c99a 100644 --- a/src/gromacs/fileio/trxio.h +++ b/src/gromacs/fileio/trxio.h @@ -40,7 +40,6 @@ #define GMX_FILEIO_TRXIO_H #include "gromacs/fileio/pdbio.h" -#include "gromacs/utility/arrayref.h" struct gmx_mtop_t; struct gmx_output_env_t; @@ -49,6 +48,11 @@ struct t_fileio; struct t_topology; struct t_trxframe; +namespace gmx +{ +template +class ArrayRef; +} /* a dedicated status type contains fp, etc. */ typedef struct t_trxstatus t_trxstatus; diff --git a/src/gromacs/gmxana/powerspect.cpp b/src/gromacs/gmxana/powerspect.cpp index c8cbfa8963..118491ccf1 100644 --- a/src/gromacs/gmxana/powerspect.cpp +++ b/src/gromacs/gmxana/powerspect.cpp @@ -40,6 +40,7 @@ #include "gromacs/fft/fft.h" #include "gromacs/gmxana/interf.h" +#include "gromacs/utility/arrayref.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/futil.h" #include "gromacs/utility/real.h" diff --git a/src/gromacs/gmxana/powerspect.h b/src/gromacs/gmxana/powerspect.h index da1c36d912..e37bb57c17 100644 --- a/src/gromacs/gmxana/powerspect.h +++ b/src/gromacs/gmxana/powerspect.h @@ -41,9 +41,14 @@ #include #include "gromacs/gmxana/interf.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/real.h" +namespace gmx +{ +template +class ArrayRef; +} + extern void powerspectavg(real*** interface, int t, int xbins, int ybins, gmx::ArrayRef outfiles); extern void powerspectavg_intf(t_interf*** if1, diff --git a/src/gromacs/gmxana/tests/entropy.cpp b/src/gromacs/gmxana/tests/entropy.cpp index ff2ec4de0c..2890f084af 100644 --- a/src/gromacs/gmxana/tests/entropy.cpp +++ b/src/gromacs/gmxana/tests/entropy.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -41,6 +41,7 @@ #include "gmxpre.h" #include "gromacs/gmxana/thermochemistry.h" +#include "gromacs/utility/arrayref.h" #include "testutils/refdata.h" #include "testutils/testasserts.h" diff --git a/src/gromacs/gmxana/thermochemistry.h b/src/gromacs/gmxana/thermochemistry.h index b704d0e8d3..efc50dd853 100644 --- a/src/gromacs/gmxana/thermochemistry.h +++ b/src/gromacs/gmxana/thermochemistry.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -43,9 +43,14 @@ #include "gromacs/math/units.h" #include "gromacs/math/vec.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" +namespace gmx +{ +template +class ArrayRef; +} + /*! \brief Compute zero point energy from an array of eigenvalues. * * This routine first converts the eigenvalues from a normal mode diff --git a/src/gromacs/gmxpreprocess/add_par.h b/src/gromacs/gmxpreprocess/add_par.h index 048d42e799..22d60b8477 100644 --- a/src/gromacs/gmxpreprocess/add_par.h +++ b/src/gromacs/gmxpreprocess/add_par.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -38,12 +38,17 @@ #ifndef GMX_GMXPREPROCESS_ADD_PAR_H #define GMX_GMXPREPROCESS_ADD_PAR_H -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/real.h" struct InteractionsOfType; struct PreprocessResidue; +namespace gmx +{ +template +class ArrayRef; +} + void add_param(InteractionsOfType* ps, int ai, int aj, gmx::ArrayRef c, const char* s); void add_cmap_param(InteractionsOfType* ps, int ai, int aj, int ak, int al, int am, const char* s); diff --git a/src/gromacs/gmxpreprocess/convparm.h b/src/gromacs/gmxpreprocess/convparm.h index 5268cde9fc..a3d65b8e84 100644 --- a/src/gromacs/gmxpreprocess/convparm.h +++ b/src/gromacs/gmxpreprocess/convparm.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -38,13 +38,18 @@ #ifndef GMX_GMXPREPROCESS_CONVPARM_H #define GMX_GMXPREPROCESS_CONVPARM_H -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/real.h" struct gmx_mtop_t; struct MoleculeInformation; struct InteractionsOfType; +namespace gmx +{ +template +class ArrayRef; +} + void convertInteractionsOfType(int atnr, gmx::ArrayRef nbtypes, gmx::ArrayRef mi, diff --git a/src/gromacs/gmxpreprocess/gen_ad.h b/src/gromacs/gmxpreprocess/gen_ad.h index f05ffdcf4d..e722f6c1eb 100644 --- a/src/gromacs/gmxpreprocess/gen_ad.h +++ b/src/gromacs/gmxpreprocess/gen_ad.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2012,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2012,2014,2015,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -38,14 +38,18 @@ #ifndef GMX_GMXPREPROCESS_GEN_AD_H #define GMX_GMXPREPROCESS_GEN_AD_H -#include "gromacs/utility/arrayref.h" - struct t_atoms; struct t_excls; struct MoleculePatchDatabase; struct InteractionsOfType; struct PreprocessResidue; +namespace gmx +{ +template +class ArrayRef; +} + void gen_pad(t_atoms* atoms, gmx::ArrayRef rtpFFDB, gmx::ArrayRef plist, diff --git a/src/gromacs/gmxpreprocess/gen_vsite.h b/src/gromacs/gmxpreprocess/gen_vsite.h index a86f4f4926..2cd20ce9ad 100644 --- a/src/gromacs/gmxpreprocess/gen_vsite.h +++ b/src/gromacs/gmxpreprocess/gen_vsite.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -38,8 +38,9 @@ #ifndef GMX_GMXPREPROCESS_GEN_VSITE_H #define GMX_GMXPREPROCESS_GEN_VSITE_H +#include + #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/real.h" class PreprocessingAtomTypes; @@ -48,6 +49,12 @@ struct InteractionsOfType; struct PreprocessResidue; struct t_symtab; +namespace gmx +{ +template +class ArrayRef; +} + /* stuff for pdb2gmx */ void do_vsites(gmx::ArrayRef rtpFFDB, diff --git a/src/gromacs/gmxpreprocess/genhydro.h b/src/gromacs/gmxpreprocess/genhydro.h index a7c451fb29..3193d5709b 100644 --- a/src/gromacs/gmxpreprocess/genhydro.h +++ b/src/gromacs/gmxpreprocess/genhydro.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -38,13 +38,20 @@ #ifndef GMX_GMXPREPROCESS_GENHYDRO_H #define GMX_GMXPREPROCESS_GENHYDRO_H +#include + #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" struct t_atoms; struct t_symtab; struct MoleculePatchDatabase; +namespace gmx +{ +template +class ArrayRef; +} + /*! \brief * Generate hydrogen atoms and N and C terminal patches. * diff --git a/src/gromacs/gmxpreprocess/gpp_atomtype.h b/src/gromacs/gmxpreprocess/gpp_atomtype.h index 2ced59ad23..3cdcee59bb 100644 --- a/src/gromacs/gmxpreprocess/gpp_atomtype.h +++ b/src/gromacs/gmxpreprocess/gpp_atomtype.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2011,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2011,2014,2015,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -48,7 +48,6 @@ #include -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/classhelpers.h" #include "gromacs/utility/real.h" @@ -59,6 +58,12 @@ class InteractionOfType; struct InteractionsOfType; struct t_symtab; +namespace gmx +{ +template +class ArrayRef; +} + /*! \libinternal \brief * Storage of all atom types used during preprocessing of a simulation * input. diff --git a/src/gromacs/gmxpreprocess/gpp_nextnb.h b/src/gromacs/gmxpreprocess/gpp_nextnb.h index 8e640c1bab..2788f1853b 100644 --- a/src/gromacs/gmxpreprocess/gpp_nextnb.h +++ b/src/gromacs/gmxpreprocess/gpp_nextnb.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2010,2014,2015,2019, by the GROMACS development team, led by + * Copyright (c) 2010,2014,2015,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -38,15 +38,15 @@ #ifndef GMX_GMXPREPROCESS_GPP_NEXTNB_H #define GMX_GMXPREPROCESS_GPP_NEXTNB_H -#include "gromacs/utility/arrayref.h" - struct InteractionsOfType; namespace gmx { template +class ArrayRef; +template class ListOfLists; -} +} // namespace gmx struct t_nextnb { diff --git a/src/gromacs/gmxpreprocess/grompp_impl.h b/src/gromacs/gmxpreprocess/grompp_impl.h index c10d25360a..47ecb013b4 100644 --- a/src/gromacs/gmxpreprocess/grompp_impl.h +++ b/src/gromacs/gmxpreprocess/grompp_impl.h @@ -45,12 +45,17 @@ #include "gromacs/topology/atoms.h" #include "gromacs/topology/block.h" #include "gromacs/topology/idef.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/listoflists.h" #include "gromacs/utility/real.h" +namespace gmx +{ +template +class ArrayRef; +} + /*! \libinternal \brief * Describes an interaction of a given type, plus its parameters. */ diff --git a/src/gromacs/gmxpreprocess/hackblock.cpp b/src/gromacs/gmxpreprocess/hackblock.cpp index fa74340fee..bc00ea2c46 100644 --- a/src/gromacs/gmxpreprocess/hackblock.cpp +++ b/src/gromacs/gmxpreprocess/hackblock.cpp @@ -47,6 +47,7 @@ #include "gromacs/mdtypes/md_enums.h" #include "gromacs/topology/atoms.h" #include "gromacs/topology/symtab.h" +#include "gromacs/utility/arrayref.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/gmxpreprocess/hackblock.h b/src/gromacs/gmxpreprocess/hackblock.h index 9fa36722eb..33613291bb 100644 --- a/src/gromacs/gmxpreprocess/hackblock.h +++ b/src/gromacs/gmxpreprocess/hackblock.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -43,15 +43,22 @@ #include +#include #include #include #include "gromacs/gmxpreprocess/notset.h" #include "gromacs/topology/ifunc.h" -#include "gromacs/utility/arrayref.h" struct t_atom; struct t_symtab; + +namespace gmx +{ +template +class ArrayRef; +} + /*! \brief * Used for reading .rtp/.tdb * ebtsBONDS must be the first, new types can be added to the end diff --git a/src/gromacs/gmxpreprocess/pdb2top.h b/src/gromacs/gmxpreprocess/pdb2top.h index 1bd3f2e3e1..b9dd8f8fa4 100644 --- a/src/gromacs/gmxpreprocess/pdb2top.h +++ b/src/gromacs/gmxpreprocess/pdb2top.h @@ -40,17 +40,19 @@ #include +#include #include #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" class PreprocessingAtomTypes; namespace gmx { +template +class ArrayRef; class MDLogger; -} +} // namespace gmx struct t_atoms; struct t_excls; diff --git a/src/gromacs/gmxpreprocess/specbond.cpp b/src/gromacs/gmxpreprocess/specbond.cpp index 9fdf332a27..5e30f10c28 100644 --- a/src/gromacs/gmxpreprocess/specbond.cpp +++ b/src/gromacs/gmxpreprocess/specbond.cpp @@ -48,6 +48,7 @@ #include "gromacs/fileio/pdbio.h" #include "gromacs/gmxpreprocess/pdb2top.h" #include "gromacs/math/vec.h" +#include "gromacs/utility/arrayref.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/gmxpreprocess/ter_db.h b/src/gromacs/gmxpreprocess/ter_db.h index f451c45074..25288ce0a3 100644 --- a/src/gromacs/gmxpreprocess/ter_db.h +++ b/src/gromacs/gmxpreprocess/ter_db.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2011,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2011,2014,2015,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -40,11 +40,15 @@ #include -#include "gromacs/utility/arrayref.h" - class PreprocessingAtomTypes; struct MoleculePatchDatabase; +namespace gmx +{ +template +class ArrayRef; +} + /*! \brief * Read database for N&C terminal modifications. * diff --git a/src/gromacs/gmxpreprocess/tomorse.h b/src/gromacs/gmxpreprocess/tomorse.h index 647279996a..e41adeb714 100644 --- a/src/gromacs/gmxpreprocess/tomorse.h +++ b/src/gromacs/gmxpreprocess/tomorse.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2012,2013,2014,2015,2019, by the GROMACS development team, led by + * Copyright (c) 2012,2013,2014,2015,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -38,11 +38,15 @@ #ifndef GMX_GMXPREPROCESS_TOMORSE_H #define GMX_GMXPREPROCESS_TOMORSE_H -#include "gromacs/utility/arrayref.h" - class PreprocessingAtomTypes; struct MoleculeInformation; +namespace gmx +{ +template +class ArrayRef; +} + void convert_harmonics(gmx::ArrayRef mols, PreprocessingAtomTypes* atype); #endif diff --git a/src/gromacs/gmxpreprocess/topio.h b/src/gromacs/gmxpreprocess/topio.h index e42bd306ae..f39c8ec2f0 100644 --- a/src/gromacs/gmxpreprocess/topio.h +++ b/src/gromacs/gmxpreprocess/topio.h @@ -42,7 +42,6 @@ #include #include -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/real.h" struct gmx_molblock_t; @@ -58,8 +57,10 @@ typedef warninp* warninp_t; namespace gmx { +template +class ArrayRef; class MDLogger; -} +} // namespace gmx double check_mol(const gmx_mtop_t* mtop, warninp_t wi); /* Check mass and charge */ diff --git a/src/gromacs/gmxpreprocess/toppush.h b/src/gromacs/gmxpreprocess/toppush.h index 82595099b0..66df62b9d3 100644 --- a/src/gromacs/gmxpreprocess/toppush.h +++ b/src/gromacs/gmxpreprocess/toppush.h @@ -41,7 +41,6 @@ #include -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/real.h" enum class Directive : int; @@ -58,6 +57,8 @@ struct warninp; namespace gmx { +template +class ArrayRef; struct ExclusionBlock; } // namespace gmx diff --git a/src/gromacs/gmxpreprocess/topshake.h b/src/gromacs/gmxpreprocess/topshake.h index 9244f71df8..93b7bd8e38 100644 --- a/src/gromacs/gmxpreprocess/topshake.h +++ b/src/gromacs/gmxpreprocess/topshake.h @@ -38,15 +38,15 @@ #ifndef GMX_GMXPREPROCESS_TOPSHAKE_H #define GMX_GMXPREPROCESS_TOPSHAKE_H -#include "gromacs/utility/arrayref.h" - struct t_atoms; struct InteractionsOfType; namespace gmx { +template +class ArrayRef; class MDLogger; -} +} // namespace gmx void make_shake(gmx::ArrayRef plist, t_atoms* atoms, int nshake, const gmx::MDLogger& logger); diff --git a/src/gromacs/gmxpreprocess/toputil.h b/src/gromacs/gmxpreprocess/toputil.h index 829929bd46..ef1fea15f0 100644 --- a/src/gromacs/gmxpreprocess/toputil.h +++ b/src/gromacs/gmxpreprocess/toputil.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2012,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2012,2014,2015,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -40,10 +40,6 @@ #include -#include "gromacs/utility/arrayref.h" - -#include "gromacs/utility/arrayref.h" - enum class Directive : int; class PreprocessingAtomTypes; struct t_atoms; @@ -53,6 +49,12 @@ struct MoleculeInformation; class InteractionOfType; struct InteractionsOfType; +namespace gmx +{ +template +class ArrayRef; +} + /* UTILITIES */ void add_param_to_list(InteractionsOfType* list, const InteractionOfType& b); diff --git a/src/gromacs/gmxpreprocess/vsite_parm.h b/src/gromacs/gmxpreprocess/vsite_parm.h index 0141efe4de..98d6615114 100644 --- a/src/gromacs/gmxpreprocess/vsite_parm.h +++ b/src/gromacs/gmxpreprocess/vsite_parm.h @@ -38,8 +38,6 @@ #ifndef GMX_GMXPREPROCESS_VSITE_PARM_H #define GMX_GMXPREPROCESS_VSITE_PARM_H -#include "gromacs/utility/arrayref.h" - class PreprocessingAtomTypes; struct gmx_moltype_t; struct t_atoms; @@ -47,8 +45,10 @@ struct InteractionsOfType; namespace gmx { +template +class ArrayRef; class MDLogger; -} +} // namespace gmx int set_vsites(bool bVerbose, t_atoms* atoms, diff --git a/src/gromacs/gmxpreprocess/xlate.h b/src/gromacs/gmxpreprocess/xlate.h index bb2b12b375..e37cf210e2 100644 --- a/src/gromacs/gmxpreprocess/xlate.h +++ b/src/gromacs/gmxpreprocess/xlate.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -38,13 +38,17 @@ #ifndef GMX_GMXPREPROCESS_XLATE_H #define GMX_GMXPREPROCESS_XLATE_H -#include "gromacs/utility/arrayref.h" - class ResidueType; struct t_atoms; struct PreprocessResidue; struct t_symtab; +namespace gmx +{ +template +class ArrayRef; +} + /* If bResname is true renames atoms based on residue names, * otherwise renames atoms based on rtp entry names. */ diff --git a/src/gromacs/gpu_utils/tests/devicetransfers.h b/src/gromacs/gpu_utils/tests/devicetransfers.h index 730f2a1ec6..64acdd5b0a 100644 --- a/src/gromacs/gpu_utils/tests/devicetransfers.h +++ b/src/gromacs/gpu_utils/tests/devicetransfers.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2017,2019, by the GROMACS development team, led by + * Copyright (c) 2017,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -51,12 +51,12 @@ #ifndef GMX_GPU_UTILS_TESTS_DEVICETRANSFERS_H #define GMX_GPU_UTILS_TESTS_DEVICETRANSFERS_H -#include "gromacs/utility/arrayref.h" - struct gmx_gpu_info_t; namespace gmx { +template +class ArrayRef; /*! \brief Helper function for GPU test code to be platform agnostic. * diff --git a/src/gromacs/listed_forces/gpubonded.h b/src/gromacs/listed_forces/gpubonded.h index 2ad8969019..1cfeed429d 100644 --- a/src/gromacs/listed_forces/gpubonded.h +++ b/src/gromacs/listed_forces/gpubonded.h @@ -53,7 +53,6 @@ #include "gromacs/math/vectypes.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/topology/idef.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/classhelpers.h" class DeviceContext; @@ -69,6 +68,8 @@ struct gmx_wallcycle; namespace gmx { +template +class ArrayRef; class StepWorkload; /*! \brief The number on bonded function types supported on GPUs */ diff --git a/src/gromacs/math/coordinatetransformation.cpp b/src/gromacs/math/coordinatetransformation.cpp index c380efecf3..e93cdc125e 100644 --- a/src/gromacs/math/coordinatetransformation.cpp +++ b/src/gromacs/math/coordinatetransformation.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -44,6 +44,7 @@ #include #include "gromacs/math/vec.h" +#include "gromacs/utility/arrayref.h" namespace gmx { diff --git a/src/gromacs/math/coordinatetransformation.h b/src/gromacs/math/coordinatetransformation.h index 5e962fc92f..70b74697e2 100644 --- a/src/gromacs/math/coordinatetransformation.h +++ b/src/gromacs/math/coordinatetransformation.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -44,12 +44,13 @@ #define GMX_MATH_COORDINATETRANSFORMATION_H #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/classhelpers.h" namespace gmx { +template +class ArrayRef; class ScaleCoordinates { public: diff --git a/src/gromacs/math/gausstransform.h b/src/gromacs/math/gausstransform.h index c5af105177..40ef38d790 100644 --- a/src/gromacs/math/gausstransform.h +++ b/src/gromacs/math/gausstransform.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -49,13 +49,13 @@ #include "gromacs/math/vectypes.h" #include "gromacs/mdspan/extensions.h" #include "gromacs/mdspan/mdspan.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/classhelpers.h" #include "gromacs/utility/real.h" namespace gmx { - +template +class ArrayRef; /*! \internal * \brief Provide result of Gaussian function evaluation on a one-dimensional lattice. * diff --git a/src/gromacs/math/tests/coordinatetransformation.cpp b/src/gromacs/math/tests/coordinatetransformation.cpp index 28533b42f2..5abb0b6f03 100644 --- a/src/gromacs/math/tests/coordinatetransformation.cpp +++ b/src/gromacs/math/tests/coordinatetransformation.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -48,6 +48,8 @@ #include #include +#include "gromacs/utility/arrayref.h" + #include "testutils/testasserts.h" #include "testutils/testmatchers.h" diff --git a/src/gromacs/mdlib/boxdeformation.cpp b/src/gromacs/mdlib/boxdeformation.cpp index b621bb8e5b..e42a95fe46 100644 --- a/src/gromacs/mdlib/boxdeformation.cpp +++ b/src/gromacs/mdlib/boxdeformation.cpp @@ -58,6 +58,7 @@ #include "gromacs/mdtypes/commrec.h" #include "gromacs/mdtypes/inputrec.h" #include "gromacs/mdtypes/md_enums.h" +#include "gromacs/utility/arrayref.h" #include "gromacs/utility/exceptions.h" namespace gmx diff --git a/src/gromacs/mdlib/boxdeformation.h b/src/gromacs/mdlib/boxdeformation.h index caa863e691..0eea78a5c2 100644 --- a/src/gromacs/mdlib/boxdeformation.h +++ b/src/gromacs/mdlib/boxdeformation.h @@ -46,7 +46,6 @@ #include #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/classhelpers.h" #include "gromacs/utility/gmxmpi.h" @@ -58,6 +57,8 @@ enum class NumRanks; namespace gmx { +template +class ArrayRef; class BoxDeformation { public: diff --git a/src/gromacs/mdlib/broadcaststructs.h b/src/gromacs/mdlib/broadcaststructs.h index d6a5b15a26..f8416edf20 100644 --- a/src/gromacs/mdlib/broadcaststructs.h +++ b/src/gromacs/mdlib/broadcaststructs.h @@ -48,13 +48,20 @@ #include #include "gromacs/gmxlib/network.h" -#include "gromacs/utility/arrayref.h" +#include "gromacs/mdtypes/commrec.h" +#include "gromacs/utility/smalloc.h" struct gmx_mtop_t; struct t_inputrec; struct PartialDeserializedTprFile; class t_state; +namespace gmx +{ +template +class ArrayRef; +} + //! Convenience wrapper for gmx_bcast to communicator of a single value. template void block_bc(MPI_Comm communicator, T& data) diff --git a/src/gromacs/mdlib/calc_verletbuf.h b/src/gromacs/mdlib/calc_verletbuf.h index 7314a1bba2..a013cf2bf9 100644 --- a/src/gromacs/mdlib/calc_verletbuf.h +++ b/src/gromacs/mdlib/calc_verletbuf.h @@ -37,7 +37,6 @@ #ifndef GMX_MDLIB_CALC_VERLETBUF_H #define GMX_MDLIB_CALC_VERLETBUF_H -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/real.h" @@ -46,6 +45,8 @@ struct t_inputrec; namespace gmx { +template +class ArrayRef; class RangePartitioning; } // namespace gmx diff --git a/src/gromacs/mdlib/calcmu.cpp b/src/gromacs/mdlib/calcmu.cpp index 006fe7fffa..83a61bed78 100644 --- a/src/gromacs/mdlib/calcmu.cpp +++ b/src/gromacs/mdlib/calcmu.cpp @@ -47,6 +47,7 @@ #include "gromacs/math/units.h" #include "gromacs/math/vec.h" #include "gromacs/mdlib/gmx_omp_nthreads.h" +#include "gromacs/utility/arrayref.h" void calc_mu(int start, int homenr, diff --git a/src/gromacs/mdlib/calcmu.h b/src/gromacs/mdlib/calcmu.h index b96f12e86a..4081afc4ef 100644 --- a/src/gromacs/mdlib/calcmu.h +++ b/src/gromacs/mdlib/calcmu.h @@ -41,9 +41,14 @@ #include #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" +namespace gmx +{ +template +class ArrayRef; +} + void calc_mu(int start, int homenr, gmx::ArrayRef x, diff --git a/src/gromacs/mdlib/constr.cpp b/src/gromacs/mdlib/constr.cpp index d832420e9e..16b5c6eba0 100644 --- a/src/gromacs/mdlib/constr.cpp +++ b/src/gromacs/mdlib/constr.cpp @@ -76,7 +76,6 @@ #include "gromacs/topology/ifunc.h" #include "gromacs/topology/mtop_lookup.h" #include "gromacs/topology/mtop_util.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/gmxassert.h" diff --git a/src/gromacs/mdlib/dispersioncorrection.h b/src/gromacs/mdlib/dispersioncorrection.h index 88c8c7b40b..ec23aea75c 100644 --- a/src/gromacs/mdlib/dispersioncorrection.h +++ b/src/gromacs/mdlib/dispersioncorrection.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -40,7 +40,6 @@ #include #include "gromacs/math/vectypes.h" -#include "gromacs/utility/arrayref.h" struct gmx_mtop_t; struct interaction_const_t; @@ -50,6 +49,8 @@ struct t_inputrec; namespace gmx { +template +class ArrayRef; class MDLogger; } // namespace gmx diff --git a/src/gromacs/mdlib/ebin.cpp b/src/gromacs/mdlib/ebin.cpp index a0d0c90fe1..6c830526be 100644 --- a/src/gromacs/mdlib/ebin.cpp +++ b/src/gromacs/mdlib/ebin.cpp @@ -50,6 +50,7 @@ #include "gromacs/math/vec.h" #include "gromacs/topology/ifunc.h" #include "gromacs/trajectory/energyframe.h" +#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/mdlib/ebin.h b/src/gromacs/mdlib/ebin.h index d475e37cf0..ac76a2aade 100644 --- a/src/gromacs/mdlib/ebin.h +++ b/src/gromacs/mdlib/ebin.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -50,9 +50,14 @@ #include "gromacs/fileio/enxio.h" #include "gromacs/trajectory/energyframe.h" -#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" +namespace gmx +{ +template +class ArrayRef; +} + /* \brief Running averaging structure ('energy bin') to store thermodynamic values. * * Collects the data on thermodynamic parameters (energy terms, temperature, diff --git a/src/gromacs/mdrun/legacymdrunoptions.cpp b/src/gromacs/mdrun/legacymdrunoptions.cpp index 2b8e3a0760..42d0a7df38 100644 --- a/src/gromacs/mdrun/legacymdrunoptions.cpp +++ b/src/gromacs/mdrun/legacymdrunoptions.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2011-2019, by the GROMACS development team, led by + * Copyright (c) 2011-2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -52,6 +52,7 @@ #include #include "gromacs/math/functions.h" +#include "gromacs/utility/arrayref.h" #include "gromacs/utility/arraysize.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/mdrun/runner.h b/src/gromacs/mdrun/runner.h index 82eccd97d5..13a10041d3 100644 --- a/src/gromacs/mdrun/runner.h +++ b/src/gromacs/mdrun/runner.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2017,2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -55,6 +55,7 @@ #include "gromacs/mdrun/mdmodules.h" #include "gromacs/mdrunutility/handlerestart.h" #include "gromacs/mdtypes/mdrunoptions.h" +#include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/gmxmpi.h" #include "gromacs/utility/real.h"