/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2020,2021, 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.
SessionImpl::~SessionImpl() = default;
SessionResources::SessionResources(gmxapi::SessionImpl* session, std::string name) :
- sessionImpl_(session),
- name_(std::move(name))
+ sessionImpl_(session), name_(std::move(name))
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2020,2021, 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.
}
System::Impl::Impl(std::unique_ptr<gmxapi::Workflow> workflow) noexcept :
- workflow_(std::move(workflow)),
- spec_(std::make_shared<MDWorkSpec>())
+ workflow_(std::move(workflow)), spec_(std::make_shared<MDWorkSpec>())
{
GMX_ASSERT(workflow_, "Class invariant implies non-null workflow_ member");
GMX_ASSERT(spec_, "Class invariant implies non-null work specification member.");
# define GMX_RELEASE_ASSERT(condition, msg) \
((void)((condition) ? (void)0 \
: ::gmx::internal::assertHandler( \
- #condition, msg, GMX_CURRENT_FUNCTION, __FILE__, __LINE__)))
+ #condition, msg, GMX_CURRENT_FUNCTION, __FILE__, __LINE__)))
# else
// Use an "immediately invoked function expression" to allow being
// used in constexpr context with older GCC versions
* \param[in] elements Elements for all lists concatenated, is consumed
*/
ListOfLists(std::vector<int>&& listRanges, std::vector<T>&& elements) :
- listRanges_(std::move(listRanges)),
- elements_(std::move(elements))
+ listRanges_(std::move(listRanges)), elements_(std::move(elements))
{
if (listRanges_.empty() || listRanges_.at(0) != 0)
{
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2013,2014,2015,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
*/
# define GMX_DOUBLE_NEGZERO \
({ \
- const union { \
+ const union \
+ { \
int di[2]; \
double d; \
} _gmx_dzero = { 0, -2147483648 }; \
})
# define GMX_FLOAT_NEGZERO \
({ \
- const union { \
+ const union \
+ { \
int fi; \
float f; \
} _gmx_fzero = { -2147483648 }; \
void NbvSetupUtil::setupNbnxmInstance(const size_t numParticleTypes, const NBKernelOptions& options)
{
const auto pinPolicy = (options.useGpu ? gmx::PinningPolicy::PinnedIfSupported
- : gmx::PinningPolicy::CannotBePinned);
+ : gmx::PinningPolicy::CannotBePinned);
const int numThreads = options.numOpenMPThreads;
// Note: the options and Nbnxm combination rule enums values should match
const int combinationRule = static_cast<int>(options.ljCombinationRule);
{
CubicBondType() = default;
CubicBondType(ForceConstant fq, ForceConstant fc, EquilDistance d) :
- quadraticForceConstant_(fq),
- cubicForceConstant_(fc),
- equilDistance_(d)
+ quadraticForceConstant_(fq), cubicForceConstant_(fc), equilDistance_(d)
{
}
public:
MorseBondType() = default;
MorseBondType(ForceConstant f, Exponent e, EquilDistance d) :
- forceConstant_(f),
- exponent_(e),
- equilDistance_(d)
+ forceConstant_(f), exponent_(e), equilDistance_(d)
{
}
ProperDihedral() = default;
ProperDihedral(Radians phi, ForceConstant f, Multiplicity m) :
- phi_(phi),
- forceConstant_(f),
- multiplicity_(m)
+ phi_(phi), forceConstant_(f), multiplicity_(m)
{
}
ProperDihedral(Degrees phi, ForceConstant f, Multiplicity m) :
- phi_(phi * DEG2RAD),
- forceConstant_(f),
- multiplicity_(m)
+ phi_(phi * DEG2RAD), forceConstant_(f), multiplicity_(m)
{
}
public:
Default5Center() = default;
Default5Center(Radians phi, Radians psi, ForceConstant fphi, ForceConstant fpsi) :
- phi_(phi),
- psi_(psi),
- fphi_(fphi),
- fpsi_(fpsi)
+ phi_(phi), psi_(psi), fphi_(fphi), fpsi_(fpsi)
{
}
public:
//! \brief construct form a ParticleName, allow implicit conversion
ParticleIdentifier(ParticleName particleName) :
- particleName_(std::move(particleName)),
- residueName_()
+ particleName_(std::move(particleName)), residueName_()
{
}
//! \brief construct with a non-default ResidueName
ParticleIdentifier(ParticleName particleName, ResidueName residueName) :
- particleName_(std::move(particleName)),
- residueName_(std::move(residueName))
+ particleName_(std::move(particleName)), residueName_(std::move(residueName))
{
}
const std::vector<Vec3>& forces,
const Box& box,
Topology topology) :
- box_(box),
- topology_(std::move(topology))
+ box_(box), topology_(std::move(topology))
{
auto numParticles = topology_.numParticles();
}
ArgonSimulationStateBuilder::ArgonSimulationStateBuilder() :
- box_(6.05449),
- topology_(ArgonTopologyBuilder(12).argonTopology())
+ box_(6.05449), topology_(ArgonTopologyBuilder(12).argonTopology())
{
coordinates_ = {
}
SpcMethanolSimulationStateBuilder::SpcMethanolSimulationStateBuilder() :
- box_(3.01000),
- topology_(SpcMethanolTopologyBuilder().buildTopology(1, 1))
+ box_(3.01000), topology_(SpcMethanolTopologyBuilder().buildTopology(1, 1))
{
coordinates_ = {
{ 1.970, 1.460, 1.209 }, // Me1
std::transform(begin(expansionArrayStage1),
end(expansionArrayStage1),
begin(expansionArray),
- [& S2 = expansionArrayStage2](size_t S1Element) { return S2[S1Element]; });
+ [&S2 = expansionArrayStage2](size_t S1Element) { return S2[S1Element]; });
// add data about InteractionType instances
interactionDataElement.parameters = std::move(uniqueInteractionInstances);
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team.
- * Copyright (c) 2015,2017,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2015,2017,2019,2020,2021, 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.
{
AbstractAnalysisArrayData::AbstractAnalysisArrayData() :
- rowCount_(0),
- pointSetInfo_(0, 0, 0, 0),
- xstep_(1.0),
- bUniformX_(true),
- bReady_(false)
+ rowCount_(0), pointSetInfo_(0, 0, 0, 0), xstep_(1.0), bUniformX_(true), bReady_(false)
{
xvalue_.push_back(0);
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2017,2019, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2017,2019,2021, 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.
AnalysisDataFrameHeader::AnalysisDataFrameHeader(int index, real x, real dx) :
- index_(index),
- x_(x),
- dx_(dx)
+ index_(index), x_(x), dx_(dx)
{
GMX_ASSERT(index >= 0, "Invalid frame index");
}
AnalysisDataPointSetRef::AnalysisDataPointSetRef(const AnalysisDataFrameHeader& header,
const std::vector<AnalysisDataValue>& values) :
- header_(header),
- dataSetIndex_(0),
- firstColumn_(0),
- values_(values)
+ header_(header), dataSetIndex_(0), firstColumn_(0), values_(values)
{
GMX_ASSERT(header_.isValid(), "Invalid point set reference should not be constructed");
}
AnalysisDataPointSetRef::AnalysisDataPointSetRef(const AnalysisDataPointSetRef& points,
int firstColumn,
int columnCount) :
- header_(points.header()),
- dataSetIndex_(points.dataSetIndex()),
- firstColumn_(0)
+ header_(points.header()), dataSetIndex_(points.dataSetIndex()), firstColumn_(0)
{
GMX_ASSERT(firstColumn >= 0, "Invalid first column");
GMX_ASSERT(columnCount >= 0, "Invalid column count");
AnalysisDataFrameRef::AnalysisDataFrameRef(const AnalysisDataFrameHeader& header,
const AnalysisDataValuesRef& values,
const AnalysisDataPointSetInfosRef& pointSets) :
- header_(header),
- values_(values),
- pointSets_(pointSets)
+ header_(header), values_(values), pointSets_(pointSets)
{
GMX_ASSERT(!pointSets_.empty(), "There must always be a point set");
}
AnalysisDataFrameRef::AnalysisDataFrameRef(const AnalysisDataFrameHeader& header,
const std::vector<AnalysisDataValue>& values,
const std::vector<AnalysisDataPointSetInfo>& pointSets) :
- header_(header),
- values_(values),
- pointSets_(pointSets)
+ header_(header), values_(values), pointSets_(pointSets)
{
GMX_ASSERT(!pointSets_.empty(), "There must always be a point set");
}
public:
//! Construct point set data object with the given values.
AnalysisDataPointSetInfo(int valueOffset, int valueCount, int dataSetIndex, int firstColumn) :
- valueOffset_(valueOffset),
- valueCount_(valueCount),
- dataSetIndex_(dataSetIndex),
- firstColumn_(firstColumn)
+ valueOffset_(valueOffset), valueCount_(valueCount), dataSetIndex_(dataSetIndex), firstColumn_(firstColumn)
{
GMX_ASSERT(valueOffset >= 0, "Negative value offsets are invalid");
GMX_ASSERT(valueCount >= 0, "Negative value counts are invalid");
{
//! Initializes the module information.
explicit ModuleInfo(AnalysisDataModulePointer module) :
- module(std::move(module)),
- bParallel(false)
+ module(std::move(module)), bParallel(false)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team.
- * Copyright (c) 2017,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,2019,2020,2021, 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.
{
AnalysisDataProxy::AnalysisDataProxy(int firstColumn, int columnSpan, AbstractAnalysisData* data) :
- source_(*data),
- firstColumn_(firstColumn),
- columnSpan_(columnSpan),
- bParallel_(false)
+ source_(*data), firstColumn_(firstColumn), columnSpan_(columnSpan), bParallel_(false)
{
GMX_RELEASE_ASSERT(data != nullptr, "Source data must not be NULL");
GMX_RELEASE_ASSERT(firstColumn >= 0 && columnSpan > 0, "Invalid proxy column");
*/
AnalysisDataStorageFrameData::AnalysisDataStorageFrameData(AnalysisDataStorageImpl* storageImpl, int index) :
- storageImpl_(*storageImpl),
- header_(index, 0.0, 0.0),
- status_(eMissing)
+ storageImpl_(*storageImpl), header_(index, 0.0, 0.0), status_(eMissing)
{
GMX_RELEASE_ASSERT(storageImpl->data_ != nullptr,
"Storage frame constructed before data started");
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2019,2020,2021, 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.
//! Constructs a handle from specified frame data.
AnalysisDataFrameLocalDataHandle(const std::vector<int>* dataSetIndices, ValueArray* values) :
- dataSetIndices_(dataSetIndices),
- values_(values)
+ dataSetIndices_(dataSetIndices), values_(values)
{
}
*/
AnalysisHistogramSettings::AnalysisHistogramSettings() :
- firstEdge_(0.0),
- lastEdge_(0.0),
- binWidth_(0.0),
- inverseBinWidth_(0.0),
- binCount_(0),
- bAll_(false)
+ firstEdge_(0.0), lastEdge_(0.0), binWidth_(0.0), inverseBinWidth_(0.0), binCount_(0), bAll_(false)
{
}
BasicHistogramImpl::BasicHistogramImpl(const AnalysisHistogramSettings& settings) :
- settings_(settings),
- averager_(new BasicAverageHistogramModule(settings))
+ settings_(settings), averager_(new BasicAverageHistogramModule(settings))
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010-2018, The GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
*/
AnalysisDataPlotSettings::AnalysisDataPlotSettings() :
- selections_(nullptr),
- timeUnit_(TimeUnit::Default),
- plotFormat_(XvgFormat::Xmgrace)
+ selections_(nullptr), timeUnit_(TimeUnit::Default), plotFormat_(XvgFormat::Xmgrace)
{
}
AnalysisDataVectorPlotModule::AnalysisDataVectorPlotModule(const AnalysisDataPlotSettings& settings) :
- AbstractPlotModule(settings),
- bWrite_{ true, true, true, false }
+ AbstractPlotModule(settings), bWrite_{ true, true, true, false }
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2011,2012,2013,2014,2015 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
*/
AnalysisDataTestInputPointSet::AnalysisDataTestInputPointSet(int index, int dataSetIndex, int firstColumn) :
- index_(index),
- dataSetIndex_(dataSetIndex),
- firstColumn_(firstColumn)
+ index_(index), dataSetIndex_(dataSetIndex), firstColumn_(firstColumn)
{
}
*/
AnalysisDataTestInput::AnalysisDataTestInput(int dataSetCount, bool bMultipoint) :
- columnCounts_(dataSetCount),
- bMultipoint_(bMultipoint)
+ columnCounts_(dataSetCount), bMultipoint_(bMultipoint)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2011,2012,2013,2014,2015 by the GROMACS development team.
- * Copyright (c) 2017,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,2019,2020,2021, 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.
const AnalysisDataTestInputPointSet* points,
int firstcol,
int n) :
- frame_(frame),
- points_(points),
- firstcol_(firstcol),
- n_(n)
+ frame_(frame), points_(points), firstcol_(firstcol), n_(n)
{
}
}
BiasCoupledToSystem::BiasCoupledToSystem(Bias bias, const std::vector<int>& pullCoordIndex) :
- bias_(std::move(bias)),
- pullCoordIndex_(pullCoordIndex)
+ bias_(std::move(bias)), pullCoordIndex_(pullCoordIndex)
{
/* We already checked for this in grompp, but check again here. */
GMX_RELEASE_ASSERT(
const t_commrec* commRecord_; /**< Pointer to the communication record. */
const gmx_multisim_t* multiSimRecord_; /**< Handler for multi-simulations. */
pull_t* pull_; /**< Pointer to the pull working data. */
- double potentialOffset_; /**< The offset of the bias potential which changes due to bias updates. */
+ double potentialOffset_; /**< The offset of the bias potential which changes due to bias updates. */
const int numFepLambdaStates_; /**< The number of free energy lambda states of the system. */
int fepLambdaState_; /**< The current free energy lambda state. */
};
}
GridAxis::GridAxis(double origin, double end, double period, double pointDensity) :
- origin_(origin),
- period_(period),
- isFepLambdaAxis_(false)
+ origin_(origin), period_(period), isFepLambdaAxis_(false)
{
length_ = getIntervalLengthPeriodic(origin_, end, period_);
}
GridAxis::GridAxis(double origin, double end, double period, int numPoints, bool isFepLambdaAxis) :
- origin_(origin),
- period_(period),
- numPoints_(numPoints),
- isFepLambdaAxis_(isFepLambdaAxis)
+ origin_(origin), period_(period), numPoints_(numPoints), isFepLambdaAxis_(isFepLambdaAxis)
{
if (isFepLambdaAxis)
{
const int64_t numStepsUpdateTarget_; /**< Number of steps per updating the target distribution. */
const int64_t numStepsCheckCovering_; /**< Number of steps per checking for covering. */
public:
- const AwhTargetType eTarget; /**< Type of target distribution. */
- const double freeEnergyCutoffInKT; /**< Free energy cut-off in kT for cut-off target distribution. */
- const double temperatureScaleFactor; /**< Temperature scaling factor for temperature scaled targed distributions. */
- const bool idealWeighthistUpdate; /**< Update reference weighthistogram using the target distribution? Otherwise use the realized distribution. */
+ const AwhTargetType eTarget; /**< Type of target distribution. */
+ const double freeEnergyCutoffInKT; /**< Free energy cut-off in kT for cut-off target distribution. */
+ const double temperatureScaleFactor; /**< Temperature scaling factor for temperature scaled targed distributions. */
+ const bool idealWeighthistUpdate; /**< Update reference weighthistogram using the target distribution? Otherwise use the realized distribution. */
const int numSharedUpdate; /**< The number of (multi-)simulations sharing the bias update */
const double updateWeight; /**< The probability weight accumulated for each update. */
const double localWeightScaling; /**< Scaling factor applied to a sample before adding it to the reference weight histogram (= 1, usually). */
awh_ivec coverRadius_; /**< The radius (in points) that needs to be sampled around a point before it is considered covered. */
public:
const bool convolveForce; /**< True if we convolve the force, false means use MC between umbrellas. */
- const int biasIndex; /**< Index of the bias, used as a second random seed and for priting. */
+ const int biasIndex; /**< Index of the bias, used as a second random seed and for priting. */
private:
const bool disableUpdateSkips_; /**< If true, we disallow update skips, even when the method supports it. */
};
} // namespace
AwhEnergyBlock::AwhEnergyBlock(int numPoints, Normalization normalizationType, float normalizationValue) :
- normalizationType(normalizationType),
- normalizationValue(normalizationValue),
- data_(numPoints)
+ normalizationType(normalizationType), normalizationValue(normalizationValue), data_(numPoints)
{
}
double blockLengthInit,
BlockLengthMeasure blockLengthMeasure,
double dtSample) :
- dtSample(dtSample),
- blockLengthMeasure(blockLengthMeasure)
+ dtSample(dtSample), blockLengthMeasure(blockLengthMeasure)
{
/* Set the initial block length for the block averaging. The length doesn't really matter
after the block length has been doubled a few times, as long as it's set small enough */
* Private constructor called by public builder functions for PullDimParams and FepLambdaDimParams.
*/
DimParams(double conversionFactor, std::variant<PullDimParams, FepDimParams> dimParams) :
- dimParams(std::move(dimParams)),
- userCoordUnitsToInternal(conversionFactor)
+ dimParams(std::move(dimParams)), userCoordUnitsToInternal(conversionFactor)
{
}
explicit AwhTestParameters(ISerializer* serializer);
//! Move constructor
AwhTestParameters(AwhTestParameters&& o) noexcept :
- beta(o.beta),
- awhParams(std::move(o.awhParams)),
- dimParams(std::move(o.dimParams))
+ beta(o.beta), awhParams(std::move(o.awhParams)), dimParams(std::move(o.dimParams))
{
}
//! 1/(kB*T).
DensityFittingAmplitudeLookup::DensityFittingAmplitudeLookup(DensityFittingAmplitudeLookup&&) noexcept = default;
-DensityFittingAmplitudeLookup& DensityFittingAmplitudeLookup::
- operator=(DensityFittingAmplitudeLookup&&) noexcept = default;
+DensityFittingAmplitudeLookup&
+DensityFittingAmplitudeLookup::operator=(DensityFittingAmplitudeLookup&&) noexcept = default;
} // namespace gmx
Matrix3x3 translationMatrix = transformationMatrixParametersAsArray.has_value()
? *transformationMatrixParametersAsArray
: identityMatrix<real, 3>();
- RVec translationVector = translationParametersAsArray.has_value()
- ? RVec((*translationParametersAsArray)[XX],
+ RVec translationVector = translationParametersAsArray.has_value()
+ ? RVec((*translationParametersAsArray)[XX],
(*translationParametersAsArray)[YY],
(*translationParametersAsArray)[ZZ])
- : RVec(0, 0, 0);
+ : RVec(0, 0, 0);
affineTransformation_.emplace(translationMatrix.asConstView(), translationVector);
}
}
//! Creates an implementation class from a low-level context.
explicit Impl(const HelpWriterContext& writerContext) :
- writerContext_(writerContext),
- completionWriter_(nullptr),
- bHidden_(false)
+ writerContext_(writerContext), completionWriter_(nullptr), bHidden_(false)
{
}
public:
//! Constructs a help topic for a specific module.
ModuleHelpTopic(const ICommandLineModule& module, const CommandLineHelpModuleImpl& helpModule) :
- module_(module),
- helpModule_(helpModule)
+ module_(module), helpModule_(helpModule)
{
}
HelpExportReStructuredText::HelpExportReStructuredText(const CommandLineHelpModuleImpl& helpModule,
IFileOutputRedirector* outputRedirector) :
- outputRedirector_(outputRedirector),
- binaryName_(helpModule.binaryName_),
- links_(eHelpOutputFormat_Rst)
+ outputRedirector_(outputRedirector), binaryName_(helpModule.binaryName_), links_(eHelpOutputFormat_Rst)
{
TextReader linksFile("links.dat");
std::string line;
{
public:
ModificationCheckingFileOutputStream(const char* path, IFileOutputRedirector* redirector) :
- path_(path),
- redirector_(redirector)
+ path_(path), redirector_(redirector)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010-2018, The GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
public:
//! Creates a helper object for formatting the synopsis.
explicit SynopsisFormatter(const HelpWriterContext& context) :
- context_(context),
- bFormatted_(false),
- lineLength_(0),
- indent_(0),
- currentLength_(0)
+ context_(context), bFormatted_(false), lineLength_(0), indent_(0), currentLength_(0)
{
}
OptionsListFormatter::OptionsListFormatter(const HelpWriterContext& context,
const CommonFormatterData& common,
const char* title) :
- context_(context),
- common_(common),
- title_(title),
- header_(nullptr),
- bDidOutput_(false)
+ context_(context), common_(common), title_(title), header_(nullptr), bDidOutput_(false)
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2019, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2019,2021, 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.
* Does not throw.
*/
CommandLineModuleGroupData(const CommandLineModuleMap& modules, const char* binaryName, const char* title) :
- allModules_(modules),
- binaryName_(binaryName),
- title_(title)
+ allModules_(modules), binaryName_(binaryName), title_(title)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
typedef ICommandLineOptionsModule::FactoryMethod FactoryMethod;
CommandLineOptionsModule(const char* name, const char* description, FactoryMethod factory) :
- name_(name),
- description_(description),
- factory_(std::move(factory))
+ name_(name), description_(description), factory_(std::move(factory))
{
}
CommandLineOptionsModule(const char* name, const char* description, ICommandLineOptionsModulePointer module) :
- name_(name),
- description_(description),
- module_(std::move(module))
+ name_(name), description_(description), module_(std::move(module))
{
}
const char* name() const override { return name_; }
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010-2018, The GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
};
CommandLineParser::Impl::Impl(Options* options) :
- assigner_(options),
- bSkipUnknown_(false),
- bAllowPositionalArguments_(false)
+ assigner_(options), bSkipUnknown_(false), bAllowPositionalArguments_(false)
{
assigner_.setAcceptBooleanNoPrefix(true);
}
CommandLineProgramContext::Impl::Impl() : programName_("GROMACS"), bSourceLayout_(false) {}
CommandLineProgramContext::Impl::Impl(int argc, const char* const argv[], ExecutableEnvironmentPointer env) :
- executableEnv_(std::move(env)),
- invokedName_(argc != 0 ? argv[0] : ""),
- bSourceLayout_(false)
+ executableEnv_(std::move(env)), invokedName_(argc != 0 ? argv[0] : ""), bSourceLayout_(false)
{
programName_ = Path::getFilename(invokedName_);
programName_ = stripSuffixIfPresent(programName_, ".exe");
{
//! Creates a conversion helper for a given `t_pargs` struct.
explicit ProgramArgData(t_pargs* pa) :
- pa(pa),
- optionInfo(nullptr),
- enumIndex(0),
- boolValue(false)
+ pa(pa), optionInfo(nullptr), enumIndex(0), boolValue(false)
{
}
* changed. In other words, the initial value for the variable defines the
* default value.
*/
- union {
+ union
+ {
/*! \brief
* Generic pointer for operations that do not need type information.
*
{
public:
Impl(const CommandLine& args, const char* realBinaryName) :
- programContext_(args.argc(), args.argv()),
- manager_(realBinaryName, &programContext_)
+ programContext_(args.argc(), args.argv()), manager_(realBinaryName, &programContext_)
{
manager_.setQuiet(true);
manager_.setOutputRedirector(&redirector_);
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010-2018, The GROMACS development team.
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2021, 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.
};
CommandLineParserTest::CommandLineParserTest() :
- parser_(&options_),
- flag_(false),
- ivalue1p_(0),
- ivalue12_(0)
+ parser_(&options_), flag_(false), ivalue1p_(0), ivalue12_(0)
{
using gmx::BooleanOption;
using gmx::DoubleOption;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
* than the object created here.
*/
TrajectoryFileOpener(const std::string& name, int filetype, const Selection& sel, const gmx_mtop_t* mtop) :
- outputFileName_(name),
- outputFile_(nullptr),
- filetype_(filetype),
- sel_(sel),
- mtop_(mtop)
+ outputFileName_(name), outputFile_(nullptr), filetype_(filetype), sel_(sel), mtop_(mtop)
{
}
const Selection& sel,
const gmx_mtop_t* mtop,
OutputAdapterContainer adapters) :
- file_(name, filetype, sel, mtop),
- outputAdapters_(std::move(adapters))
+ file_(name, filetype, sel, mtop), outputAdapters_(std::move(adapters))
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
* framework.
*/
explicit SetAtoms(ChangeAtomsType atomFlag, AtomsDataPtr inputAtoms) :
- atomFlag_(atomFlag),
- haveStructureFileAtoms_(false),
- atoms_(std::move(inputAtoms))
+ atomFlag_(atomFlag), haveStructureFileAtoms_(false), atoms_(std::move(inputAtoms))
{
if (atoms_ != nullptr)
{
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2021, 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.
* \param[in] startTime User defined value for the initial time.
*/
explicit SetStartTime(real startTime) :
- startTime_(startTime),
- haveProcessedFirstFrame_(false),
- differenceToInitialTime_(0)
+ startTime_(startTime), haveProcessedFirstFrame_(false), differenceToInitialTime_(0)
{
}
/*! \brief
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2021, 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.
* \param[in] timeStep User defined value for the time step.
*/
explicit SetTimeStep(real timeStep) :
- timeStep_(timeStep),
- previousFrameTime_(0.0),
- haveProcessedFirstFrame_(false)
+ timeStep_(timeStep), previousFrameTime_(0.0), haveProcessedFirstFrame_(false)
{
}
/*! \brief
{
/*! \brief Constructor */
BalanceRegion() :
- isOpen(false),
- isOpenOnCpu(false),
- isOpenOnGpu(false),
- cyclesOpenCpu(0),
- cyclesLastCpu(0)
+ isOpen(false), isOpenOnCpu(false), isOpenOnGpu(false), cyclesOpenCpu(0), cyclesLastCpu(0)
{
}
static void make_pp_communicator(const gmx::MDLogger& mdlog,
gmx_domdec_t* dd,
t_commrec gmx_unused* cr,
- bool gmx_unused reorder)
+ bool gmx_unused reorder)
{
#if GMX_MPI
gmx_domdec_comm_t* comm = dd->comm;
static CartesianRankSetup split_communicator(const gmx::MDLogger& mdlog,
t_commrec* cr,
const DdRankOrder ddRankOrder,
- bool gmx_unused reorder,
- const DDRankSetup& ddRankSetup,
- ivec ddCellIndex,
- std::vector<int>* pmeRanks)
+ bool gmx_unused reorder,
+ const DDRankSetup& ddRankSetup,
+ ivec ddCellIndex,
+ std::vector<int>* pmeRanks)
{
CartesianRankSetup cartSetup;
const t_inputrec& ir,
const matrix box,
ArrayRef<const RVec> xGlobal) :
- mdlog_(mdlog),
- cr_(cr),
- options_(options),
- mtop_(mtop),
- ir_(ir)
+ mdlog_(mdlog), cr_(cr), options_(options), mtop_(mtop), ir_(ir)
{
GMX_LOG(mdlog_.info).appendTextFormatted("\nInitializing Domain Decomposition on %d ranks", cr_->sizeOfDefaultCommunicator);
template void ddSendrecv(const gmx_domdec_t*, int, int, gmx::ArrayRef<gmx::RVec>, gmx::ArrayRef<gmx::RVec>);
void dd_sendrecv2_rvec(const struct gmx_domdec_t gmx_unused* dd,
- int gmx_unused ddimind,
+ int gmx_unused ddimind,
rvec gmx_unused* buf_s_fw,
- int gmx_unused n_s_fw,
+ int gmx_unused n_s_fw,
rvec gmx_unused* buf_r_fw,
- int gmx_unused n_r_fw,
+ int gmx_unused n_r_fw,
rvec gmx_unused* buf_s_bw,
- int gmx_unused n_s_bw,
+ int gmx_unused n_s_bw,
rvec gmx_unused* buf_r_bw,
- int gmx_unused n_r_bw)
+ int gmx_unused n_r_bw)
{
#if GMX_MPI
MPI_Request req[4];
}
void dd_gather(const gmx_domdec_t gmx_unused* dd,
- int gmx_unused nbytes,
+ int gmx_unused nbytes,
const void gmx_unused* src,
void gmx_unused* dest)
{
}
void dd_gatherv(const gmx_domdec_t gmx_unused* dd,
- int gmx_unused scount,
+ int gmx_unused scount,
const void gmx_unused* sbuf,
int gmx_unused* rcounts,
int gmx_unused* disps,
for (int d = dd->ndim - 1; d >= 0; d--)
{
/* Pulse the grid forward and backward */
- int dim = dd->dim[d];
- bool bPBC = (dim < dd->unitCellInfo.npbcdim);
- const int ndir = (dd->numCells[dim] == 2)
- ?
- /* Only 2 cells, so we only need to communicate once */
+ int dim = dd->dim[d];
+ bool bPBC = (dim < dd->unitCellInfo.npbcdim);
+ const int ndir = (dd->numCells[dim] == 2)
+ ?
+ /* Only 2 cells, so we only need to communicate once */
1
- : 2;
- int* nsend_ptr = nullptr;
+ : 2;
+ int* nsend_ptr = nullptr;
for (int dir = 0; dir < ndir; dir++)
{
if (!bPBC && dd->numCells[dim] > 2
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2010,2014,2015,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
}
private:
- union Data {
+ union Data
+ {
std::vector<Entry> direct;
gmx::HashedMap<Entry> hashed;
// constructor and destructor function in parent class
/* Gets the rms deviation of the positions to the structure s */
/* fit_to_structure has to be called before calling this routine! */
-static real rmsd_from_structure(rvec* x, /* The positions under consideration */
+static real rmsd_from_structure(rvec* x, /* The positions under consideration */
struct gmx_edx* s) /* The structure from which the rmsd shall be computed */
{
real rmsd = 0.0;
const int pmeOrder,
const int dimIndex,
const bool doSpread) :
- dimind(dimIndex),
- bSpread(doSpread),
- pme_order(pmeOrder),
- nthread(numThreads),
- spline(nthread)
+ dimind(dimIndex), bSpread(doSpread), pme_order(pmeOrder), nthread(numThreads), spline(nthread)
{
if (PmeMpiCommunicator != MPI_COMM_NULL)
{
PmeCoordinateReceiverGpu::Impl::Impl(const DeviceStream& pmeStream,
MPI_Comm comm,
gmx::ArrayRef<PpRanks> ppRanks) :
- pmeStream_(pmeStream),
- comm_(comm),
- ppRanks_(ppRanks)
+ pmeStream_(pmeStream), comm_(comm), ppRanks_(ppRanks)
{
request_.resize(ppRanks.size());
ppSync_.resize(ppRanks.size());
PmeForceSenderGpu::Impl::Impl(GpuEventSynchronizer* pmeForcesReady,
MPI_Comm comm,
gmx::ArrayRef<PpRanks> ppRanks) :
- pmeForcesReady_(pmeForcesReady),
- comm_(comm),
- ppRanks_(ppRanks)
+ pmeForcesReady_(pmeForcesReady), comm_(comm), ppRanks_(ppRanks)
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
#define gridlineIndicesSize (atomsPerBlock * DIM)
#define splineParamsSize (atomsPerBlock * DIM * order)
- __local int sm_gridlineIndices[gridlineIndicesSize];
+ __local int sm_gridlineIndices[gridlineIndicesSize];
__local float2 sm_splineParams[splineParamsSize]; /* Theta/dtheta pairs as .x/.y */
/* Spline Y/Z coordinates */
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2013,2014,2015,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
*/
struct do_fspline
{
- do_fspline(const gmx_pme_t* pme,
- const real* gmx_restrict grid,
- const PmeAtomComm* gmx_restrict atc,
+ do_fspline(const gmx_pme_t* pme,
+ const real* gmx_restrict grid,
+ const PmeAtomComm* gmx_restrict atc,
const splinedata_t* gmx_restrict spline,
int nn) :
- pme(pme),
- grid(grid),
- atc(atc),
- spline(spline),
- nn(nn)
+ pme(pme), grid(grid), atc(atc), spline(spline), nn(nn)
{
}
}
#endif
private:
- const gmx_pme_t* const pme;
- const real* const gmx_restrict grid;
- const PmeAtomComm* const gmx_restrict atc;
+ const gmx_pme_t* const pme;
+ const real* const gmx_restrict grid;
+ const PmeAtomComm* const gmx_restrict atc;
const splinedata_t* const gmx_restrict spline;
const int nn;
*
* \return Pointer to CUDA kernel
*/
-static auto selectSplineKernelPtr(const PmeGpu* pmeGpu,
- ThreadsPerAtom threadsPerAtom,
+static auto selectSplineKernelPtr(const PmeGpu* pmeGpu,
+ ThreadsPerAtom threadsPerAtom,
bool gmx_unused writeSplinesToGlobal,
const int numGrids)
{
* \param[in] pmeStream GPU pme stream.
*/
PmeGpuSpecific(const DeviceContext& deviceContext, const DeviceStream& pmeStream) :
- deviceContext_(deviceContext),
- pmeStream_(pmeStream)
+ deviceContext_(deviceContext), pmeStream_(pmeStream)
{
}
real* ewaldcoeff_lj,
bool useGpuForPme,
gmx::StatePropagatorDataGpu* stateGpu,
- PmeRunMode gmx_unused runMode)
+ PmeRunMode gmx_unused runMode)
{
int status = -1;
int nat = 0;
//! Communicates buffers between rank separated by \p shift slabs
static void pme_dd_sendrecv(PmeAtomComm gmx_unused* atc,
- gmx_bool gmx_unused bBackward,
- int gmx_unused shift,
+ gmx_bool gmx_unused bBackward,
+ int gmx_unused shift,
void gmx_unused* buf_s,
- int gmx_unused nbyte_s,
+ int gmx_unused nbyte_s,
void gmx_unused* buf_r,
- int gmx_unused nbyte_r)
+ int gmx_unused nbyte_r)
{
#if GMX_MPI
int dest, src;
inputRec.nkz = gridSize[ZZ];
inputRec.coulombtype = (moduliType == ModuliType::P3M) ? CoulombInteractionType::P3mAD
: CoulombInteractionType::Pme;
- inputRec.pme_order = pmeOrder;
+ inputRec.pme_order = pmeOrder;
/* PME initialization call which checks the inputs and computes the B-spline moduli according to the grid sizes. */
PmeSafePointer pme = pmeInitEmpty(&inputRec);
PmeTestHardwareContext::PmeTestHardwareContext() : codePath_(CodePath::CPU) {}
PmeTestHardwareContext::PmeTestHardwareContext(TestDevice* testDevice) :
- codePath_(CodePath::CPU),
- testDevice_(testDevice)
+ codePath_(CodePath::CPU), testDevice_(testDevice)
{
setActiveDevice(testDevice_->deviceInfo());
pmeGpuProgram_ = buildPmeGpuProgram(testDevice_->deviceContext());
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
};
MrcDensityMapOfFloatWriter::Impl::Impl(const MrcDensityMapHeader& header, ArrayRef<const float> data) :
- header_(header),
- data_(data)
+ header_(header), data_(data)
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2021, 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.
*/
struct MrcDataStatistics
{
- float min_ = 0.; //!< Minimum data value scales values in (currently unsupported) compressed data mode.
- float max_ = 0.; //!< Maximum data value scales values in (currently unsupported) compressed data mode.
+ float min_ = 0.; //!< Minimum data value scales values in (currently unsupported) compressed data mode.
+ float max_ = 0.; //!< Maximum data value scales values in (currently unsupported) compressed data mode.
float mean_ = 0.; //!< mean of the data
float rms_ = 0.; //!< rms of the data
};
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
{
namespace
{
-union IntAndFloat32 {
+union IntAndFloat32
+{
std::int32_t int32Value_;
float floatValue_;
};
-union IntAndFloat64 {
+union IntAndFloat64
+{
std::int64_t int64Value_;
double doubleValue_;
};
double doubleValue_ = c_intAndFloat64.doubleValue_;
int intValue_ = integerSizeDependentTestingValue();
real realValue_ = std::is_same_v<real, double>
- ? static_cast<real>(c_intAndFloat64.doubleValue_)
- : static_cast<real>(c_intAndFloat32.floatValue_);
+ ? static_cast<real>(c_intAndFloat64.doubleValue_)
+ : static_cast<real>(c_intAndFloat32.floatValue_);
} defaultValues_;
TestFileManager fileManager_;
} // namespace
OutputFile::OutputFile(const std::string& filename, const std::string& baseTitle, int numBias, int biasIndex) :
- numDim_(0),
- firstGraphSubBlock_(0),
- numGraph_(0),
- useKTForEnergy_(false)
+ numDim_(0), firstGraphSubBlock_(0), numGraph_(0), useKTForEnergy_(false)
{
baseFilename_ = filename.substr(0, filename.find('.'));
nr_tails, /* nr tails, to check if index file is correct */
size = 0, /* nr. of atoms in group. same as nr_tails */
i, j, m, k, teller = 0, slice; /* current slice number */
- real nr_frames = 0;
- int* slCount; /* nr. of atoms in one slice */
- real sdbangle = 0; /* sum of these angles */
- gmx_bool use_unitvector = FALSE; /* use a specified unit vector instead of axis to specify unit normal*/
+ real nr_frames = 0;
+ int* slCount; /* nr. of atoms in one slice */
+ real sdbangle = 0; /* sum of these angles */
+ gmx_bool use_unitvector = FALSE; /* use a specified unit vector instead of axis to specify unit normal*/
rvec direction, com;
int comsize, distsize;
int * comidx = nullptr, *distidx = nullptr;
this_min.ener = W[this_min.index];
if (is_local_minimum_from_below(&this_min, i, 0, index3(ibox, i - 1, j, k), W)
&& is_local_minimum_from_above(
- &this_min, i, ibox[0] - 1, index3(ibox, i + 1, j, k), W)
+ &this_min, i, ibox[0] - 1, index3(ibox, i + 1, j, k), W)
&& is_local_minimum_from_below(&this_min, j, 0, index3(ibox, i, j - 1, k), W)
&& is_local_minimum_from_above(
- &this_min, j, ibox[1] - 1, index3(ibox, i, j + 1, k), W)
+ &this_min, j, ibox[1] - 1, index3(ibox, i, j + 1, k), W)
&& is_local_minimum_from_below(&this_min, k, 0, index3(ibox, i, j, k - 1), W)
&& is_local_minimum_from_above(
- &this_min, k, ibox[2] - 1, index3(ibox, i, j, k + 1), W))
+ &this_min, k, ibox[2] - 1, index3(ibox, i, j, k + 1), W))
{
add_minimum(fp, nmin, &this_min, mm);
nmin++;
this_point[i]--;
bMin = bMin
&& is_local_minimum_from_below(
- &this_min, index, 0, indexn(ndim, ibox, this_point), W);
+ &this_min, index, 0, indexn(ndim, ibox, this_point), W);
this_point[i] += 2;
bMin = bMin
&& is_local_minimum_from_above(
- &this_min, index, ibox[i] - 1, indexn(ndim, ibox, this_point), W);
+ &this_min, index, ibox[i] - 1, indexn(ndim, ibox, this_point), W);
this_point[i]--;
}
if (bMin)
double* k; //!< force constants for the nPull coords
double* pos; //!< umbrella positions for the nPull coords
double* z; //!< z=(-Fi/kT) for the nPull coords. These values are iteratively computed during wham
- int* N; //!< nr of data points in nPull histograms.
- int* Ntot; //!< also nr of data points. N and Ntot only differ if bHistEq==TRUE
+ int* N; //!< nr of data points in nPull histograms.
+ int* Ntot; //!< also nr of data points. N and Ntot only differ if bHistEq==TRUE
/*! \brief g = 1 + 2*tau[int]/dt where tau is the integrated autocorrelation time.
*
* \name Basic WHAM options
*/
/*!\{*/
- int bins; //!< nr of bins, min, max, and dz of profile
- real min, max, dz;
- real Temperature, Tolerance; //!< temperature, converged when probability changes less than Tolerance
- gmx_bool bCycl; //!< generate cyclic (periodic) PMF
+ int bins; //!< nr of bins, min, max, and dz of profile
+ real min, max, dz;
+ real Temperature, Tolerance; //!< temperature, converged when probability changes less than Tolerance
+ gmx_bool bCycl; //!< generate cyclic (periodic) PMF
/*!\}*/
/*!
* \name Output control
gmx::ArrayRef<real> dvdl,
gmx::ArrayRef<real> energygrp_elec,
gmx::ArrayRef<real> energygrp_vdw,
- t_nrnb* gmx_restrict nrnb)
+ t_nrnb* gmx_restrict nrnb)
{
#define STATE_A 0
#define STATE_B 1
}
// TODO: We should get rid of using pointers to real
- const real* x = coords[0];
+ const real* x = coords[0];
real* gmx_restrict f = &(forceWithShiftForces->force()[0][0]);
real* gmx_restrict fshift = &(forceWithShiftForces->shiftForces()[0][0]);
gmx::ArrayRef<real> dvdl,
gmx::ArrayRef<real> energygrp_elec,
gmx::ArrayRef<real> energygrp_vdw,
- t_nrnb* gmx_restrict nrnb);
+ t_nrnb* gmx_restrict nrnb);
template<bool useSoftCore, bool scLambdasOrAlphasDiffer, bool vdwInteractionTypeIsEwald, bool elecInteractionTypeIsEwald, bool vdwModifierIsPotSwitch>
static KernelFunction dispatchKernelOnUseSimd(const bool useSimd)
gmx::ArrayRef<real> dvdl,
gmx::ArrayRef<real> energygrp_elec,
gmx::ArrayRef<real> energygrp_vdw,
- t_nrnb* gmx_restrict nrnb);
+ t_nrnb* gmx_restrict nrnb);
#endif
int nhyd,
const std::string& nextheavy,
const std::string& dummy) :
- atomtype(type),
- isplanar(planar),
- nHydrogens(nhyd),
- nextHeavyType(nextheavy),
- dummyMass(dummy)
+ atomtype(type), isplanar(planar), nHydrogens(nhyd), nextHeavyType(nextheavy), dummyMass(dummy)
{
}
//! Type for the XH3/XH2 atom.
* \param[in] v Value for distance.
*/
VirtualSiteBond(const std::string& a1, const std::string& a2, real v) :
- atom1(a1),
- atom2(a2),
- value(v)
+ atom1(a1), atom2(a2), value(v)
{
}
//! Atom 1 in bond.
* \param[in] v Value for angle.
*/
VirtualSiteAngle(const std::string& a1, const std::string& a2, const std::string& a3, real v) :
- atom1(a1),
- atom2(a2),
- atom3(a3),
- value(v)
+ atom1(a1), atom2(a2), atom3(a3), value(v)
{
}
//! Atom 1 in angle.
nadd--;
break;
}
- case MoleculePatchType::Replace: { break;
+ case MoleculePatchType::Replace:
+ {
+ break;
}
- default: { GMX_THROW(gmx::InternalError("Case not handled"));
+ default:
+ {
+ GMX_THROW(gmx::InternalError("Case not handled"));
}
}
}
{
//! Explicit constructor.
AtomTypeData(const t_atom& a, char** name, const InteractionOfType& nb, const int bondAtomType, const int atomNumber) :
- atom_(a),
- name_(name),
- nb_(nb),
- bondAtomType_(bondAtomType),
- atomNumber_(atomNumber)
+ atom_(a), name_(name), nb_(nb), bondAtomType_(bondAtomType), atomNumber_(atomNumber)
{
}
//! Actual atom data.
{
//! Constructor initializes datastructure.
VsiteBondParameter(int ftype, const InteractionOfType& vsiteInteraction) :
- ftype_(ftype),
- vsiteInteraction_(vsiteInteraction)
+ ftype_(ftype), vsiteInteraction_(vsiteInteraction)
{
}
//! Function type for virtual site.
* i.e. if atom k and l are dummy masses (MNH* or MCH3*) */
bXH3 = ((gmx::equalCaseInsensitive(get_atomtype_name_AB(&at->atom[vsite->ak()], atypes), "MNH", 3))
&& (gmx::equalCaseInsensitive(
- get_atomtype_name_AB(&at->atom[vsite->al()], atypes), "MNH", 3)))
+ get_atomtype_name_AB(&at->atom[vsite->al()], atypes), "MNH", 3)))
|| ((gmx::equalCaseInsensitive(
get_atomtype_name_AB(&at->atom[vsite->ak()], atypes), "MCH3", 4))
&& (gmx::equalCaseInsensitive(
- get_atomtype_name_AB(&at->atom[vsite->al()], atypes), "MCH3", 4)));
+ get_atomtype_name_AB(&at->atom[vsite->al()], atypes), "MCH3", 4)));
bjk = get_bond_length(bonds, vsite->aj(), vsite->ak());
bjl = get_bond_length(bonds, vsite->aj(), vsite->al());
* i.e. if atom k and l are dummy masses (MNH* or MCH3*) */
bXH3 = ((gmx::equalCaseInsensitive(get_atomtype_name_AB(&at->atom[vsite->ak()], atypes), "MNH", 3))
&& (gmx::equalCaseInsensitive(
- get_atomtype_name_AB(&at->atom[vsite->al()], atypes), "MNH", 3)))
+ get_atomtype_name_AB(&at->atom[vsite->al()], atypes), "MNH", 3)))
|| ((gmx::equalCaseInsensitive(
get_atomtype_name_AB(&at->atom[vsite->ak()], atypes), "MCH3", 4))
&& (gmx::equalCaseInsensitive(
- get_atomtype_name_AB(&at->atom[vsite->al()], atypes), "MCH3", 4)));
+ get_atomtype_name_AB(&at->atom[vsite->al()], atypes), "MCH3", 4)));
/* check if construction parity must be swapped */
bSwapParity = (vsite->c1() == -1);
public:
//! Only construct with all information in place or nothing
VsiteAtomMapping(int functionType, int interactionIndex) :
- functionType_(functionType),
- interactionIndex_(interactionIndex)
+ functionType_(functionType), interactionIndex_(interactionIndex)
{
}
VsiteAtomMapping() : functionType_(-1), interactionIndex_(-1) {}
int al = dihedral.al();
real ph =
gmx::c_rad2Deg
- * dih_angle(x[ai], x[aj], x[ak], x[al], bPBC ? &pbc : nullptr, r_ij, r_kj, r_kl, m, n, &t1, &t2, &t3);
+ * dih_angle(
+ x[ai], x[aj], x[ak], x[al], bPBC ? &pbc : nullptr, r_ij, r_kj, r_kl, m, n, &t1, &t2, &t3);
dihedral.setForceParameter(0, ph);
}
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2020, by the GROMACS development team, led by
+ * Copyright (c) 2020,2021, 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.
//! Constructor
DeviceContext::DeviceContext(const DeviceInformation& deviceInfo) :
- deviceInfo_(deviceInfo),
- context_(cl::sycl::context(deviceInfo.syclDevice))
+ deviceInfo_(deviceInfo), context_(cl::sycl::context(deviceInfo.syclDevice))
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2012,2018,2019,2021, 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.
*/
gmx_opencl_inline void atomicAdd_l_f(volatile __local float* addr, float val)
{
- union {
+ union
+ {
unsigned int u32;
float f32;
} next, expected, current;
*/
gmx_opencl_inline void atomicAdd_g_f(volatile __global float* addr, float val)
{
- union {
+ union
+ {
unsigned int u32;
float f32;
} next, expected, current;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019,2020,2021, 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.
{
if (events_[i]) // This conditional is ugly, but is required to make some tests (e.g. empty domain) pass
{
- cl_ulong start_ns, end_ns;
+ cl_ulong start_ns, end_ns;
cl_int gmx_unused cl_error;
cl_error = clGetEventProfilingInfo(
for (std::size_t i = 0; i < uniqueSortedV.size(); i++)
{
unsigned int val = uniqueSortedV[i];
- std::replace_if(v->begin(),
- v->end(),
- [val](unsigned int& c) -> bool { return c == val; },
- static_cast<unsigned int>(i));
+ std::replace_if(
+ v->begin(),
+ v->end(),
+ [val](unsigned int& c) -> bool { return c == val; },
+ static_cast<unsigned int>(i));
}
}
}
CpuInfo::CpuInfo() :
- vendor_(CpuInfo::Vendor::Unknown),
- brandString_("Unknown CPU brand"),
- family_(0),
- model_(0),
- stepping_(0)
+ vendor_(CpuInfo::Vendor::Unknown), brandString_("Unknown CPU brand"), family_(0), model_(0), stepping_(0)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2012,2013,2014,2015,2016, The GROMACS development team.
- * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019,2020,2021, 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.
gmx_hw_info_t::gmx_hw_info_t(std::unique_ptr<gmx::CpuInfo> cpuInfo,
std::unique_ptr<gmx::HardwareTopology> hardwareTopology) :
- cpuInfo(std::move(cpuInfo)),
- hardwareTopology(std::move(hardwareTopology))
+ cpuInfo(std::move(cpuInfo)), hardwareTopology(std::move(hardwareTopology))
{
}
cgh.parallel_for<class DummyKernel>(range, [=](cl::sycl::id<1> threadId) {
d_buffer[threadId] = threadId.get(0);
});
- })
- .wait_and_throw();
+ }).wait_and_throw();
const auto h_Buffer = buffer.get_access<cl::sycl::access::mode::read>();
for (int i = 0; i < numThreads; i++)
{
HardwareTopology::HardwareTopology() :
- supportLevel_(SupportLevel::None),
- machine_(),
- isThisSystem_(true)
+ supportLevel_(SupportLevel::None), machine_(), isThisSystem_(true)
{
}
HardwareTopology::HardwareTopology(int logicalProcessorCount) :
- supportLevel_(SupportLevel::None),
- machine_(),
- isThisSystem_(true)
+ supportLevel_(SupportLevel::None), machine_(), isThisSystem_(true)
{
if (logicalProcessorCount > 0)
{
/*! \libinternal \brief Information about a single numa node */
struct Numa
{
- std::vector<NumaNode> nodes; //!< Information about each numa node
- float baseLatency; //!< Scale factor for relative latencies
+ std::vector<NumaNode> nodes; //!< Information about each numa node
+ float baseLatency; //!< Scale factor for relative latencies
std::vector<std::vector<float>> relativeLatency; //!< 2D matrix of relative latencies between nodes
float maxRelativeLatency; //!< Largest relative latency
};
rvec4 f[],
rvec gmx_unused fshift[],
const t_pbc gmx_unused* pbc,
- real gmx_unused lambda,
+ real gmx_unused lambda,
real gmx_unused* dvdlambda,
gmx::ArrayRef<const real> charge,
t_fcdata gmx_unused* fcd,
}
-real unimplemented(int gmx_unused nbonds,
- const t_iatom gmx_unused forceatoms[],
+real unimplemented(int gmx_unused nbonds,
+ const t_iatom gmx_unused forceatoms[],
const t_iparams gmx_unused forceparams[],
- const rvec gmx_unused x[],
- rvec4 gmx_unused f[],
- rvec gmx_unused fshift[],
+ const rvec gmx_unused x[],
+ rvec4 gmx_unused f[],
+ rvec gmx_unused fshift[],
const t_pbc gmx_unused* pbc,
- real gmx_unused lambda,
+ real gmx_unused lambda,
real gmx_unused* dvdlambda,
gmx::ArrayRef<const real> /*charge*/,
t_fcdata gmx_unused* fcd,
rvec4 f[],
rvec fshift[],
const struct t_pbc* pbc,
- real gmx_unused lambda,
+ real gmx_unused lambda,
real gmx_unused* dvdlambda,
gmx::ArrayRef<const real> /*charge*/,
t_fcdata gmx_unused* fcd,
rvec4 f[],
rvec fshift[],
const struct t_pbc* pbc,
- real gmx_unused lambda,
+ real gmx_unused lambda,
real gmx_unused* dvdlambda,
gmx::ArrayRef<const real> /*charge*/,
t_fcdata gmx_unused* fcd,
rvec4* f,
rvec* fshift,
const t_pbc* pbc,
- real gmx_unused lambda,
+ real gmx_unused lambda,
real gmx_unused* dvdlambda,
gmx::ArrayRef<const real> /*charge*/,
t_fcdata gmx_unused* fcd,
const DeviceContext& deviceContext,
const DeviceStream& deviceStream,
gmx_wallcycle* wcycle) :
- deviceContext_(deviceContext),
- deviceStream_(deviceStream)
+ deviceContext_(deviceContext), deviceStream_(deviceStream)
{
GMX_RELEASE_ASSERT(deviceStream.isValid(),
"Can't run GPU version of bonded forces in stream that is not valid.");
/* Harmonic */
__device__ __forceinline__ static void
- harmonic_gpu(const float kA, const float xA, const float x, float* V, float* F)
+harmonic_gpu(const float kA, const float xA, const float x, float* V, float* F)
{
constexpr float half = 0.5f;
float dx, dx2;
__device__ __forceinline__ static void
- dopdihs_gpu(const float cpA, const float phiA, const int mult, const float phi, float* v, float* f)
+dopdihs_gpu(const float cpA, const float phiA, const int mult, const float phi, float* v, float* f)
{
float mdphi, sdphi;
}
template<bool calcVir>
-__device__ static void do_dih_fup_gpu(const int i,
- const int j,
- const int k,
- const int l,
- const float ddphi,
- const float3 r_ij,
- const float3 r_kj,
- const float3 r_kl,
- const float3 m,
- const float3 n,
- float3 gm_f[],
- float3 sm_fShiftLoc[],
- const PbcAiuc& pbcAiuc,
- const float4 gm_xq[],
- const int t1,
- const int t2,
+__device__ static void do_dih_fup_gpu(const int i,
+ const int j,
+ const int k,
+ const int l,
+ const float ddphi,
+ const float3 r_ij,
+ const float3 r_kj,
+ const float3 r_kl,
+ const float3 m,
+ const float3 n,
+ float3 gm_f[],
+ float3 sm_fShiftLoc[],
+ const PbcAiuc& pbcAiuc,
+ const float4 gm_xq[],
+ const int t1,
+ const int t2,
const int gmx_unused t3)
{
float iprm = norm2(m);
struct OutputQuantities
{
OutputQuantities(int energyGroup) :
- energy(energyGroup),
- dvdLambda(static_cast<int>(FreeEnergyPerturbationCouplingType::Count), 0.0)
+ energy(energyGroup), dvdLambda(static_cast<int>(FreeEnergyPerturbationCouplingType::Count), 0.0)
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
* Passed pointers must remain valid for the lifetime of this object.
*/
ArrayRefWithPadding(pointer begin, pointer end, pointer paddedEnd) :
- begin_(begin),
- end_(end),
- paddedEnd_(paddedEnd)
+ begin_(begin), end_(end), paddedEnd_(paddedEnd)
{
GMX_ASSERT(end >= begin, "Invalid range");
GMX_ASSERT(paddedEnd >= end, "Invalid range");
}
//! Copy constructor
ArrayRefWithPadding(const ArrayRefWithPadding& o) :
- begin_(o.begin_),
- end_(o.end_),
- paddedEnd_(o.paddedEnd_)
+ begin_(o.begin_), end_(o.end_), paddedEnd_(o.paddedEnd_)
{
}
//! Move constructor
ArrayRefWithPadding(ArrayRefWithPadding&& o) noexcept :
- begin_(std::move(o.begin_)),
- end_(std::move(o.end_)),
- paddedEnd_(std::move(o.paddedEnd_))
+ begin_(std::move(o.begin_)), end_(std::move(o.end_)), paddedEnd_(std::move(o.paddedEnd_))
{
}
/*! \brief Convenience overload constructor to make an ArrayRefWithPadding<const T> from a non-const one.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
};
TranslateAndScale::Impl::Impl(const RVec& scale, const RVec& translation) :
- scale_{ scale },
- translation_{ translation }
+ scale_{ scale }, translation_{ translation }
{
}
};
DensitySimilarityInnerProduct::DensitySimilarityInnerProduct(density referenceDensity) :
- referenceDensity_{ referenceDensity },
- gradient_{ referenceDensity.extents() }
+ referenceDensity_{ referenceDensity }, gradient_{ referenceDensity.extents() }
{
const auto numVoxels = gradient_.asConstView().mapping().required_span_size();
/* the gradient for the inner product measure of fit is constant and does not
};
DensitySimilarityRelativeEntropy::DensitySimilarityRelativeEntropy(density referenceDensity) :
- referenceDensity_{ referenceDensity },
- gradient_(referenceDensity.extents())
+ referenceDensity_{ referenceDensity }, gradient_(referenceDensity.extents())
{
}
};
DensitySimilarityCrossCorrelation::DensitySimilarityCrossCorrelation(density referenceDensity) :
- referenceDensity_{ referenceDensity },
- gradient_(referenceDensity.extents())
+ referenceDensity_{ referenceDensity }, gradient_(referenceDensity.extents())
{
}
* OuterProductEvaluator
*/
-mdspan<const float, dynamic_extent, dynamic_extent> OuterProductEvaluator::
- operator()(ArrayRef<const float> x, ArrayRef<const float> y)
+mdspan<const float, dynamic_extent, dynamic_extent>
+OuterProductEvaluator::operator()(ArrayRef<const float> x, ArrayRef<const float> y)
{
data_.resize(ssize(x), ssize(y));
for (gmx::index xIndex = 0; xIndex < ssize(x); ++xIndex)
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
}
//! Copy constructor
constexpr MultiDimArray(const MultiDimArray& o) :
- data_(o.data_),
- view_(data_.data(), o.view_.extents())
+ data_(o.data_), view_(data_.data(), o.view_.extents())
{
}
//! Move constructor
MultiDimArray(MultiDimArray&& o) noexcept :
- data_(std::move(o.data_)),
- view_(data_.data(), o.view_.extents())
+ data_(std::move(o.data_)), view_(data_.data(), o.view_.extents())
{
}
//! Copy assignment
PaddedVector() : storage_(), unpaddedEnd_(begin()) {}
/*! \brief Constructor that specifies the initial size. */
explicit PaddedVector(size_type count, const allocator_type& allocator = Allocator()) :
- storage_(count, allocator),
- unpaddedEnd_(begin() + count)
+ storage_(count, allocator), unpaddedEnd_(begin() + count)
{
// The count elements have been default inserted, and now
// the padding elements are added
}
/*! \brief Constructor that specifies the initial size and an element to copy. */
explicit PaddedVector(size_type count, value_type const& v, const allocator_type& allocator = Allocator()) :
- storage_(count, v, allocator),
- unpaddedEnd_(begin() + count)
+ storage_(count, v, allocator), unpaddedEnd_(begin() + count)
{
// The count elements have been default inserted, and now
// the padding elements are added
}
//! Default constructor with allocator
explicit PaddedVector(allocator_type const& allocator) :
- storage_(allocator),
- unpaddedEnd_(begin())
+ storage_(allocator), unpaddedEnd_(begin())
{
}
//! Copy constructor
* Leaves \c o in a valid state (ie the destructor can be
* called). */
PaddedVector(PaddedVector&& o) noexcept :
- storage_(std::exchange(o.storage_, {})),
- unpaddedEnd_(o.unpaddedEnd_)
+ storage_(std::exchange(o.storage_, {})), unpaddedEnd_(o.unpaddedEnd_)
{
}
/*! \brief Move constructor using \c alloc for the new vector.
* Leaves \c o in a valid state (ie. the destructor can be
* called). */
PaddedVector(PaddedVector&& o, const Allocator& alloc) noexcept :
- storage_(alloc),
- unpaddedEnd_(begin())
+ storage_(alloc), unpaddedEnd_(begin())
{
if (alloc == o.storage_.get_allocator())
{
}
//! Construct from an initializer list
PaddedVector(std::initializer_list<value_type> const& il) :
- storage_(il),
- unpaddedEnd_(storage_.end())
+ storage_(il), unpaddedEnd_(storage_.end())
{
// We can't choose the padding until we know the size of
// the normal vector, so we have to make the storage_ and
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2020, by the GROMACS development team, led by
+ * Copyright (c) 2020,2021, 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.
public:
//! Set up a one-d, two-vertices Nelder-Mead simplex
NelderMeadSimplexTest() :
- initialGuess_{ 1 },
- simplex_{ NelderMeadSimplexTest::doubleFirstCoordinateValue, initialGuess_ }
+ initialGuess_{ 1 }, simplex_{ NelderMeadSimplexTest::doubleFirstCoordinateValue, initialGuess_ }
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
int64_t initialStep,
const tensor& deformationTensor,
const matrix& referenceBox) :
- timeStep_(timeStep),
- initialStep_(initialStep)
+ timeStep_(timeStep), initialStep_(initialStep)
{
copy_mat(deformationTensor, deformationTensor_);
copy_mat(referenceBox, referenceBox_);
const gmx_moltype_t& moltype = mtop.moltype[molblock.type];
chance += molblock.nmol
* chanceOfUpdateGroupCrossingCell(
- moltype, mtop.ffparams, updateGrouping[molblock.type], kT_fac, cellSize);
+ moltype, mtop.ffparams, updateGrouping[molblock.type], kT_fac, cellSize);
}
return chance;
real dt,
const matrix pres,
const matrix box,
- real scalar_pressure,
- real xy_pressure,
+ real scalar_pressure,
+ real xy_pressure,
int64_t gmx_unused step)
{
real p_corr_z = 0;
{
t_oriresdata& orires = *fcd->orires;
diagonalize_orires_tensors(&orires);
- nr[enxOR] = orires.numRestraints;
- block[enxOR] = orires.orientationsTimeAndEnsembleAv.data();
- id[enxOR] = enxOR;
- nr[enxORI] = (orires.orientations.data() != orires.orientationsTimeAndEnsembleAv.data())
- ? orires.numRestraints
- : 0;
+ nr[enxOR] = orires.numRestraints;
+ block[enxOR] = orires.orientationsTimeAndEnsembleAv.data();
+ id[enxOR] = enxOR;
+ nr[enxORI] = (orires.orientations.data() != orires.orientationsTimeAndEnsembleAv.data())
+ ? orires.numRestraints
+ : 0;
block[enxORI] = orires.orientations.data();
id[enxORI] = enxORI;
nr[enxORT] = ssize(orires.eigenOutput);
{
told = ir->opts.ref_t[i];
ir->opts.ref_t[i] = simtemp->temperatures[lamnew];
- buf_ngtc[i] = std::sqrt(ir->opts.ref_t[i] / told); /* using the buffer as temperature scaling */
+ buf_ngtc[i] = std::sqrt(ir->opts.ref_t[i] / told); /* using the buffer as temperature scaling */
}
}
int nthreads_hw_avail,
int omp_nthreads_req,
int omp_nthreads_pme_req,
- gmx_bool gmx_unused bThisNodePMEOnly,
- int numRanksOnThisNode,
- gmx_bool bSepPME)
+ gmx_bool gmx_unused bThisNodePMEOnly,
+ int numRanksOnThisNode,
+ gmx_bool bSepPME)
{
int nth;
char* env;
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2008, The GROMACS development team.
* Copyright (c) 2012,2014,2015,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
int* nr_loc, /* OUT: Number of group atoms found locally */
int* anrs_loc[], /* OUT: Local atom numbers of the group */
int* nalloc_loc, /* IN+OUT: Allocation size of anrs_loc */
- int coll_ind[]) /* OUT (opt): Where is this position found in the collective array? */
+ int coll_ind[]) /* OUT (opt): Where is this position found in the collective array? */
{
GMX_ASSERT(ga2la, "We need a valid ga2la object");
LeapFrogGpu::LeapFrogGpu(const DeviceContext& deviceContext,
const DeviceStream& deviceStream,
const int numTempScaleValues) :
- deviceContext_(deviceContext),
- deviceStream_(deviceStream),
- numTempScaleValues_(numTempScaleValues)
+ deviceContext_(deviceContext), deviceStream_(deviceStream), numTempScaleValues_(numTempScaleValues)
{
numAtoms_ = 0;
static void gmx_simdcall calc_dr_x_f_simd(int b0,
int b1,
gmx::ArrayRef<const AtomPair> atoms,
- const rvec* gmx_restrict x,
- const rvec* gmx_restrict f,
- const real* gmx_restrict blc,
- const real* pbc_simd,
- rvec* gmx_restrict r,
- real* gmx_restrict rhs,
- real* gmx_restrict sol)
+ const rvec* gmx_restrict x,
+ const rvec* gmx_restrict f,
+ const real* gmx_restrict blc,
+ const real* pbc_simd,
+ rvec* gmx_restrict r,
+ real* gmx_restrict rhs,
+ real* gmx_restrict sol)
{
assert(b0 % GMX_SIMD_REAL_WIDTH == 0);
static void gmx_simdcall calc_dr_x_xp_simd(int b0,
int b1,
gmx::ArrayRef<const AtomPair> atoms,
- const rvec* gmx_restrict x,
- const rvec* gmx_restrict xp,
- const real* gmx_restrict bllen,
- const real* gmx_restrict blc,
- const real* pbc_simd,
- rvec* gmx_restrict r,
- real* gmx_restrict rhs,
- real* gmx_restrict sol)
+ const rvec* gmx_restrict x,
+ const rvec* gmx_restrict xp,
+ const real* gmx_restrict bllen,
+ const real* gmx_restrict blc,
+ const real* pbc_simd,
+ rvec* gmx_restrict r,
+ real* gmx_restrict rhs,
+ real* gmx_restrict sol)
{
assert(b0 % GMX_SIMD_REAL_WIDTH == 0);
alignas(GMX_SIMD_ALIGNMENT) std::int32_t offset2[GMX_SIMD_REAL_WIDTH];
gmx_unused static void calc_dist_iter(int b0,
int b1,
gmx::ArrayRef<const AtomPair> atoms,
- const rvec* gmx_restrict xp,
- const real* gmx_restrict bllen,
- const real* gmx_restrict blc,
- const t_pbc* pbc,
- real wfac,
- real* gmx_restrict rhs,
- real* gmx_restrict sol,
- bool* bWarn)
+ const rvec* gmx_restrict xp,
+ const real* gmx_restrict bllen,
+ const real* gmx_restrict blc,
+ const t_pbc* pbc,
+ real wfac,
+ real* gmx_restrict rhs,
+ real* gmx_restrict sol,
+ bool* bWarn)
{
for (int b = b0; b < b1; b++)
{
static void gmx_simdcall calc_dist_iter_simd(int b0,
int b1,
gmx::ArrayRef<const AtomPair> atoms,
- const rvec* gmx_restrict x,
- const real* gmx_restrict bllen,
- const real* gmx_restrict blc,
- const real* pbc_simd,
- real wfac,
- real* gmx_restrict rhs,
- real* gmx_restrict sol,
- bool* bWarn)
+ const rvec* gmx_restrict x,
+ const real* gmx_restrict bllen,
+ const real* gmx_restrict blc,
+ const real* pbc_simd,
+ real wfac,
+ real* gmx_restrict rhs,
+ real* gmx_restrict sol,
+ bool* bWarn)
{
SimdReal min_S(GMX_REAL_MIN);
SimdReal two_S(2.0);
bool bCalcVir,
tensor vir_r_m_dr)
{
- const rvec* x = as_rvec_array(xPadded.paddedArrayRef().data());
- rvec* xp = as_rvec_array(xpPadded.paddedArrayRef().data());
- rvec* gmx_restrict v = as_rvec_array(vRef.data());
+ const rvec* x = as_rvec_array(xPadded.paddedArrayRef().data());
+ rvec* xp = as_rvec_array(xpPadded.paddedArrayRef().data());
+ rvec* gmx_restrict v = as_rvec_array(vRef.data());
const int b0 = lincsd->task[th].b0;
const int b1 = lincsd->task[th].b1;
int expansionOrder,
const DeviceContext& deviceContext,
const DeviceStream& deviceStream) :
- deviceContext_(deviceContext),
- deviceStream_(deviceStream)
+ deviceContext_(deviceContext), deviceStream_(deviceStream)
{
GMX_RELEASE_ASSERT(GMX_GPU_CUDA, "LINCS GPU is only implemented in CUDA.");
kernelParams_.numIterations = numIterations;
{
gmx_bool bLJPME;
const t_grpopts* opts;
- int nthreads gmx_unused;
+ int nthreads gmx_unused;
bLJPME = EVDW_PME(inputrec.vdwtype);
const MDLogger& mdlog,
gmx_wallcycle* wcycle,
gmx_walltime_accounting_t walltime_accounting) :
- signal_(*signal),
- rankCanSetSignal_(false),
- simulationNeedsReset_(false),
- maximumHoursToRun_(maximumHoursToRun)
+ signal_(*signal), rankCanSetSignal_(false), simulationNeedsReset_(false), maximumHoursToRun_(maximumHoursToRun)
{
if (simulationsShareState)
{
/*! \brief The actual settle code, templated for real/SimdReal and for optimization */
template<typename T, typename TypeBool, int packSize, typename TypePbc, bool bCorrectVelocity, bool bCalcVirial>
-static void settleTemplate(const SettleData& settled,
- int settleStart,
- int settleEnd,
- const TypePbc pbc,
- const real* x,
- real* xprime,
- real invdt,
+static void settleTemplate(const SettleData& settled,
+ int settleStart,
+ int settleEnd,
+ const TypePbc pbc,
+ const real* x,
+ real* xprime,
+ real invdt,
real* gmx_restrict v,
tensor vir_r_m_dr,
bool* bErrorHasOccurred)
}
SettleGpu::SettleGpu(const gmx_mtop_t& mtop, const DeviceContext& deviceContext, const DeviceStream& deviceStream) :
- deviceContext_(deviceContext),
- deviceStream_(deviceStream)
+ deviceContext_(deviceContext), deviceStream_(deviceStream)
{
static_assert(sizeof(real) == sizeof(float),
"Real numbers should be in single precision in GPU code.");
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
const gmx_multisim_t* ms,
bool doInterSim,
bool doIntraSim) :
- signals_(signals),
- cr_(cr),
- ms_(ms),
- doInterSim_(doInterSim),
- doIntraSim_(doInterSim || doIntraSim),
- mpiBuffer_{}
+ signals_(signals), cr_(cr), ms_(ms), doInterSim_(doInterSim), doIntraSim_(doInterSim || doIntraSim), mpiBuffer_{}
{
}
testData->mdAtoms_.invmass
? gmx::arrayRefFromArray(testData->mdAtoms_.invmass, testData->mdAtoms_.nr)
: gmx::ArrayRef<real>{},
- testData->mdAtoms_.invMassPerDim ? gmx::arrayRefFromArray(testData->mdAtoms_.invMassPerDim,
- testData->mdAtoms_.nr)
+ testData->mdAtoms_.invMassPerDim ? gmx::arrayRefFromArray(
+ testData->mdAtoms_.invMassPerDim, testData->mdAtoms_.nr)
: gmx::ArrayRef<rvec>{},
&testData->state_,
testData->f_,
gmx::ArrayRef<const t_grp_tcstat> tcstat,
gmx::ArrayRef<const unsigned short> cTC,
const rvec pRVScaleMatrixDiagonal,
- const rvec* gmx_restrict x,
- rvec* gmx_restrict xprime,
- VelocityType* gmx_restrict v,
- const rvec* gmx_restrict f)
+ const rvec* gmx_restrict x,
+ rvec* gmx_restrict xprime,
+ VelocityType* gmx_restrict v,
+ const rvec* gmx_restrict f)
{
real lambdaGroup;
real dt,
gmx::ArrayRef<const real> invMass,
gmx::ArrayRef<const t_grp_tcstat> tcstat,
- const rvec* gmx_restrict x,
- rvec* gmx_restrict xprime,
- VelocityType* gmx_restrict v,
- const rvec* gmx_restrict f)
+ const rvec* gmx_restrict x,
+ rvec* gmx_restrict xprime,
+ VelocityType* gmx_restrict v,
+ const rvec* gmx_restrict f)
{
SimdReal timestep(dt);
SimdReal lambdaSystem(tcstat[0].lambda);
gmx::ArrayRef<const rvec> invMassPerDim,
const gmx_ekindata_t* ekind,
const matrix box,
- const rvec* gmx_restrict x,
- rvec* gmx_restrict xprime,
- rvec* gmx_restrict v,
- const rvec* gmx_restrict f,
- const double* gmx_restrict nh_vxi,
- const int nsttcouple,
- const matrix M)
+ const rvec* gmx_restrict x,
+ rvec* gmx_restrict xprime,
+ rvec* gmx_restrict v,
+ const rvec* gmx_restrict f,
+ const double* gmx_restrict nh_vxi,
+ const int nsttcouple,
+ const matrix M)
{
/* This is a version of the leap-frog integrator that supports
* all combinations of T-coupling, P-coupling and NEMD.
}
/*! \brief Handles the Leap-frog MD x and v integration */
-static void do_update_md(int start,
- int nrend,
- real dt,
- int64_t step,
- const rvec* gmx_restrict x,
- rvec* gmx_restrict xprime,
- rvec* gmx_restrict v,
- const rvec* gmx_restrict f,
- const TemperatureCoupling etc,
- const PressureCoupling epc,
- const int nsttcouple,
- const int nstpcouple,
- gmx::ArrayRef<const unsigned short> cTC,
+static void do_update_md(int start,
+ int nrend,
+ real dt,
+ int64_t step,
+ const rvec* gmx_restrict x,
+ rvec* gmx_restrict xprime,
+ rvec* gmx_restrict v,
+ const rvec* gmx_restrict f,
+ const TemperatureCoupling etc,
+ const PressureCoupling epc,
+ const int nsttcouple,
+ const int nstpcouple,
+ gmx::ArrayRef<const unsigned short> cTC,
gmx::ArrayRef<const real> gmx_unused invmass,
gmx::ArrayRef<const rvec> invMassPerDim,
const gmx_ekindata_t* ekind,
const matrix box,
- const double* gmx_restrict nh_vxi,
- const matrix M,
- bool gmx_unused havePartiallyFrozenAtoms)
+ const double* gmx_restrict nh_vxi,
+ const matrix M,
+ bool gmx_unused havePartiallyFrozenAtoms)
{
GMX_ASSERT(nrend == start || xprime != x,
"For SIMD optimization certain compilers need to have xprime != x");
}
}
/*! \brief Handles the Leap-frog MD x and v integration */
-static void doUpdateMDDoNotUpdateVelocities(int start,
- int nrend,
- real dt,
+static void doUpdateMDDoNotUpdateVelocities(int start,
+ int nrend,
+ real dt,
const rvec* gmx_restrict x,
- rvec* gmx_restrict xprime,
+ rvec* gmx_restrict xprime,
const rvec* gmx_restrict v,
const rvec* gmx_restrict f,
- bool gmx_unused havePartiallyFrozenAtoms,
+ bool gmx_unused havePartiallyFrozenAtoms,
gmx::ArrayRef<const real> gmx_unused invmass,
gmx::ArrayRef<const rvec> invMassPerDim,
const gmx_ekindata_t& ekind)
}
Update::Impl::Impl(const t_inputrec& inputRecord, BoxDeformation* boxDeformation) :
- sd_(inputRecord),
- deform_(boxDeformation)
+ sd_(inputRecord), deform_(boxDeformation)
{
update_temperature_constants(inputRecord);
xp_.resizeWithPadding(0);
}
}
-static void do_update_sd(int start,
- int nrend,
- real dt,
- int64_t step,
- const rvec* gmx_restrict x,
- rvec* gmx_restrict xprime,
- rvec* gmx_restrict v,
+static void do_update_sd(int start,
+ int nrend,
+ real dt,
+ int64_t step,
+ const rvec* gmx_restrict x,
+ rvec* gmx_restrict xprime,
+ rvec* gmx_restrict v,
const rvec* gmx_restrict f,
gmx::ArrayRef<const ivec> nFreeze,
gmx::ArrayRef<const real> invmass,
}
}
-static void do_update_bd(int start,
- int nrend,
- real dt,
- int64_t step,
- const rvec* gmx_restrict x,
- rvec* gmx_restrict xprime,
- rvec* gmx_restrict v,
+static void do_update_bd(int start,
+ int nrend,
+ real dt,
+ int64_t step,
+ const rvec* gmx_restrict x,
+ rvec* gmx_restrict xprime,
+ rvec* gmx_restrict v,
const rvec* gmx_restrict f,
gmx::ArrayRef<const ivec> nFreeze,
gmx::ArrayRef<const real> invmass,
struct ScalingMatrix
{
ScalingMatrix(const matrix m) :
- xx(m[XX][XX]),
- yy(m[YY][YY]),
- zz(m[ZZ][ZZ]),
- yx(m[YY][XX]),
- zx(m[ZZ][XX]),
- zy(m[ZZ][YY])
+ xx(m[XX][XX]), yy(m[YY][YY]), zz(m[ZZ][ZZ]), yx(m[YY][XX]), zx(m[ZZ][XX]), zy(m[ZZ][YY])
{
}
float xx, yy, zz, yx, zx, zy;
gmx::ArrayRef<const gmx::RangePartitioning> updateGroupingsPerMoleculeType,
real temperature,
int numHomeAtoms) :
- globalToLocalMap_(numHomeAtoms),
- mtop_(mtop)
+ globalToLocalMap_(numHomeAtoms), mtop_(mtop)
{
int firstUpdateGroupInMolecule = 0;
for (const auto& molblock : mtop.molblock)
ForceBuffers f(fr->useMts,
((useGpuForNonbonded && useGpuForBufferOps) || useGpuForUpdate)
- ? PinningPolicy::PinnedIfSupported
- : PinningPolicy::CannotBePinned);
+ ? PinningPolicy::PinnedIfSupported
+ : PinningPolicy::CannotBePinned);
const t_mdatoms* md = mdAtoms->mdatoms();
if (DOMAINDECOMP(cr))
{
state->v.rvec_array(),
md->homenr,
md->cTC ? gmx::arrayRefFromArray(md->cTC, md->nr)
- : gmx::ArrayRef<const unsigned short>());
+ : gmx::ArrayRef<const unsigned short>());
/* history is maintained in state->dfhist, but state_global is what is sent to trajectory and log output */
if (MASTER(cr))
{
const DeviceContext* deviceContext = runScheduleWork.simulationWork.useGpuPme
? &deviceStreamManager->context()
: nullptr;
- const DeviceStream* pmeStream =
+ const DeviceStream* pmeStream =
runScheduleWork.simulationWork.useGpuPme
- ? &deviceStreamManager->stream(DeviceStreamType::Pme)
- : nullptr;
+ ? &deviceStreamManager->stream(DeviceStreamType::Pme)
+ : nullptr;
pmedata = gmx_pme_init(cr,
getNumPmeDomains(cr->dd),
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2020, by the GROMACS development team, led by
+ * Copyright (c) 2020,2021, 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.
{
public:
SimulationInput(const char* tprFilename, const char* cpiFilename) :
- tprFilename_(tprFilename),
- cpiFilename_(cpiFilename)
+ tprFilename_(tprFilename), cpiFilename_(cpiFilename)
{
}
detail::SimulationInputHandleImplDeleter::SimulationInputHandleImplDeleter(
SimulationInputHandleImplDeleter&&) noexcept = default;
-detail::SimulationInputHandleImplDeleter& detail::SimulationInputHandleImplDeleter::
- operator=(const SimulationInputHandleImplDeleter&) noexcept = default;
+detail::SimulationInputHandleImplDeleter& detail::SimulationInputHandleImplDeleter::operator=(
+ const SimulationInputHandleImplDeleter&) noexcept = default;
-detail::SimulationInputHandleImplDeleter& detail::SimulationInputHandleImplDeleter::
- operator=(SimulationInputHandleImplDeleter&&) noexcept = default;
+detail::SimulationInputHandleImplDeleter& detail::SimulationInputHandleImplDeleter::operator=(
+ SimulationInputHandleImplDeleter&&) noexcept = default;
void detail::SimulationInputHandleImplDeleter::operator()(SimulationInputHandleImpl* impl) const
{
SimulatorConfig(const MdrunOptions& mdrunOptions,
StartingBehavior startingBehavior,
MdrunScheduleWorkload* runScheduleWork) :
- mdrunOptions_(mdrunOptions),
- startingBehavior_(startingBehavior),
- runScheduleWork_(runScheduleWork)
+ mdrunOptions_(mdrunOptions), startingBehavior_(startingBehavior), runScheduleWork_(runScheduleWork)
{
}
// TODO: Specify copy and move semantics.
gmx_multisim_t* multisimCommRec,
const MDLogger& logger,
gmx_output_env_t* outputEnv) :
- fplog_{ fplog },
- commRec_{ commRec },
- multisimCommRec_{ multisimCommRec },
- logger_{ logger },
- outputEnv_{ outputEnv }
+ fplog_{ fplog }, commRec_{ commRec }, multisimCommRec_{ multisimCommRec }, logger_{ logger }, outputEnv_{ outputEnv }
{
}
public:
//! Build profiling information collection.
Profiling(t_nrnb* nrnb, gmx_walltime_accounting* walltimeAccounting, gmx_wallcycle* wallCycle) :
- nrnb(nrnb),
- wallCycle(wallCycle),
- walltimeAccounting(walltimeAccounting)
+ nrnb(nrnb), wallCycle(wallCycle), walltimeAccounting(walltimeAccounting)
{
}
public:
//! Build collection with handle to actual objects.
ConstraintsParam(Constraints* constraints, gmx_enfrot* enforcedRotation, VirtualSitesHandler* vSite) :
- constr(constraints),
- enforcedRotation(enforcedRotation),
- vsite(vSite)
+ constr(constraints), enforcedRotation(enforcedRotation), vsite(vSite)
{
}
public:
//! Build collection from legacy input data.
LegacyInput(int filenamesSize, const t_filenm* filenamesData, t_inputrec* inputRec, t_forcerec* forceRec) :
- numFile(filenamesSize),
- filenames(filenamesData),
- inputrec(inputRec),
- forceRec(forceRec)
+ numFile(filenamesSize), filenames(filenamesData), inputrec(inputRec), forceRec(forceRec)
{
}
{
public:
SimulatorModules(IMDOutputProvider* mdOutputProvider, const MDModulesNotifiers& notifiers) :
- outputProvider(mdOutputProvider),
- mdModulesNotifiers(notifiers)
+ outputProvider(mdOutputProvider), mdModulesNotifiers(notifiers)
{
}
public:
//! Build collection from simulation data.
TopologyData(const gmx_mtop_t& globalTopology, MDAtoms* mdAtoms) :
- top_global(globalTopology),
- mdAtoms(mdAtoms)
+ top_global(globalTopology), mdAtoms(mdAtoms)
{
}
*/
void gmx_check_thread_affinity_set(const gmx::MDLogger& mdlog,
gmx_hw_opt_t* hw_opt,
- int gmx_unused nthreads_hw_avail,
- gmx_bool bAfterOpenmpInit)
+ int gmx_unused nthreads_hw_avail,
+ gmx_bool bAfterOpenmpInit)
{
GMX_RELEASE_ASSERT(hw_opt, "hw_opt must be a non-NULL pointer");
/*
* 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,2021, 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.
*/
template<std::size_t Rank>
extents_analyse(const std::array<std::ptrdiff_t, Rank>& de, const std::size_t r) :
- next(de, r + 1),
- this_extent(de[r])
+ next(de, r + 1), this_extent(de[r])
{
}
//! Copy constructor.
template<std::ptrdiff_t... OtherStaticExtents>
extents_analyse(extents_analyse<R, OtherStaticExtents...> rhs) :
- next(rhs.next),
- this_extent(rhs.extent(R))
+ next(rhs.next), this_extent(rhs.extent(R))
{
}
*
* \param[in] dynamic_extents array of dynamic rank size containing extents
*/
- constexpr extents(const std::array<std::ptrdiff_t, extents_analyse_t::rank_dynamic()> dynamic_extents) noexcept :
+ constexpr extents(const std::array<std::ptrdiff_t, extents_analyse_t::rank_dynamic()> dynamic_extents) noexcept
+ :
impl(dynamic_extents, 0)
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
//! Copy constructor
template<class OtherElementType, class OtherExtents, class OtherLayoutPolicy, class OtherAccessor>
constexpr basic_mdspan(
- const basic_mdspan<OtherElementType, OtherExtents, OtherLayoutPolicy, OtherAccessor>& rhs) noexcept :
- acc_(rhs.acc_),
- map_(rhs.map_),
- ptr_(rhs.ptr_)
+ const basic_mdspan<OtherElementType, OtherExtents, OtherLayoutPolicy, OtherAccessor>& rhs) noexcept
+ :
+ acc_(rhs.acc_), map_(rhs.map_), ptr_(rhs.ptr_)
{
}
//! Copy assignment constructor
*/
template<class... IndexType>
explicit constexpr basic_mdspan(pointer ptr, IndexType... DynamicExtents) noexcept :
- acc_(accessor_type()),
- map_(extents_type(DynamicExtents...)),
- ptr_(ptr)
+ acc_(accessor_type()), map_(extents_type(DynamicExtents...)), ptr_(ptr)
{
}
/*! \brief Construct from array describing dynamic extents.
*/
constexpr basic_mdspan(pointer ptr,
const std::array<ptrdiff_t, extents_type::rank_dynamic()>& dynamic_extents) :
- acc_(accessor_type()),
- map_(extents_type(dynamic_extents)),
- ptr_(ptr)
+ acc_(accessor_type()), map_(extents_type(dynamic_extents)), ptr_(ptr)
{
}
/*! \brief Construct from pointer and mapping.
* \param[in] m Mapping from multidimenisonal indices to one-dimensional offset.
*/
constexpr basic_mdspan(pointer ptr, const mapping_type& m) noexcept :
- acc_(accessor_type()),
- map_(m),
- ptr_(ptr)
+ acc_(accessor_type()), map_(m), ptr_(ptr)
{
}
/*! \brief Construct with pointer, mapping and accessor.
* \param[in] a Accessor implementing memory access model.
*/
constexpr basic_mdspan(pointer ptr, const mapping_type& m, const accessor_type& a) noexcept :
- acc_(a),
- map_(m),
- ptr_(ptr)
+ acc_(a), map_(m), ptr_(ptr)
{
}
/*! \brief Construct mdspan from multidimensional arrays implemented with mdspan
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2020, by the GROMACS development team, led by
+ * Copyright (c) 2020,2021, 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.
{
ForceBuffers::ForceBuffers() :
- force_({}),
- forceMtsCombined_({}),
- view_({}, {}, false),
- useForceMtsCombined_(false)
+ force_({}), forceMtsCombined_({}), view_({}, {}, false), useForceMtsCombined_(false)
{
}
ForceBuffersView(const ArrayRefWithPadding<RVec>& force,
const ArrayRefWithPadding<RVec>& forceMtsCombined,
const bool useForceMtsCombined) :
- force_(force),
- forceMtsCombined_(forceMtsCombined),
- useForceMtsCombined_(useForceMtsCombined)
+ force_(force), forceMtsCombined_(forceMtsCombined), useForceMtsCombined_(useForceMtsCombined)
{
}
* \param[in] computeVirial True when algorithms are required to provide their virial contribution (for the current force evaluation)
*/
ForceWithVirial(const ArrayRef<RVec>& force, const bool computeVirial) :
- force_(force),
- computeVirial_(computeVirial)
+ force_(force), computeVirial_(computeVirial)
{
for (int dim1 = 0; dim1 < DIM; dim1++)
{
#include "gromacs/utility/exceptions.h"
gmx_ekindata_t::gmx_ekindata_t(int numTempCoupleGroups, real cos_accel, int numThreads) :
- ngtc(numTempCoupleGroups),
- nthreads_(numThreads)
+ ngtc(numTempCoupleGroups), nthreads_(numThreads)
{
tcstat.resize(ngtc);
/* Set Berendsen tcoupl lambda's to 1,
double time,
const matrix box,
const t_commrec& cr) :
- x_(x),
- homenr_(homenr),
- chargeA_(chargeA),
- massT_(massT),
- t_(time),
- cr_(cr)
+ x_(x), homenr_(homenr), chargeA_(chargeA), massT_(massT), t_(time), cr_(cr)
{
copy_mat(box, box_);
}
* \param[in,out] enerd Structure containing energy data
*/
ForceProviderOutput(ForceWithVirial* forceWithVirial, gmx_enerdata_t* enerd) :
- forceWithVirial_(makeRefFromPointer(forceWithVirial)),
- enerd_(makeRefFromPointer(enerd))
+ forceWithVirial_(makeRefFromPointer(forceWithVirial)), enerd_(makeRefFromPointer(enerd))
{
}
real rcoulomb_switch = 0;
/* PME/Ewald */
- real ewaldcoeff_q = 0;
- real ewaldcoeff_lj = 0;
+ real ewaldcoeff_q = 0;
+ real ewaldcoeff_lj = 0;
LongRangeVdW ljpme_comb_rule = LongRangeVdW::Geom; /* LJ combination rule for the LJ PME mesh part */
- real sh_ewald = 0; /* -sh_ewald is added to the direct space potential */
- real sh_lj_ewald = 0; /* sh_lj_ewald is added to the correction potential */
+ real sh_ewald = 0; /* -sh_ewald is added to the direct space potential */
+ real sh_lj_ewald = 0; /* sh_lj_ewald is added to the correction potential */
/* Dielectric constant resp. multiplication factor for charges */
real epsilon_r = 1;
int* fluxleak_p; // Pointer to this data
bool bFromCpt; // Did we start from a checkpoint file?
gmx::EnumerationArray<Channel, int> nat; // Size of xc_old_whole, i.e. the number of atoms in each channel
- gmx::EnumerationArray<Channel, rvec*> xc_old_whole; // Last known whole positions of the two channels (important for multimeric ch.!)
+ gmx::EnumerationArray<Channel, rvec*> xc_old_whole; // Last known whole positions of the two channels (important for multimeric ch.!)
gmx::EnumerationArray<Channel, rvec**> xc_old_whole_p; // Pointer to these positions
swapstateIons_t* ionType; // History information for one ion type
} swaphistory_t;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
CompositeSimulatorElement::CompositeSimulatorElement(
std::vector<compat::not_null<ISimulatorElement*>> elementCallList,
std::vector<std::unique_ptr<gmx::ISimulatorElement>> elements) :
- elementCallList_(std::move(elementCallList)),
- elementOwnershipList_(std::move(elements))
+ elementCallList_(std::move(elementCallList)), elementOwnershipList_(std::move(elements))
{
}
const real lambdaBonded =
freeEnergyPerturbationData_
? freeEnergyPerturbationData_->constLambdaView()[static_cast<int>(
- FreeEnergyPerturbationCouplingType::Bonded)]
+ FreeEnergyPerturbationCouplingType::Bonded)]
: 0;
// Constrain the initial coordinates and velocities
do_constrain_first(fplog_,
}
template<ConstraintVariable variable>
-void ConstraintsElement<variable>::scheduleTask(Step step,
+void ConstraintsElement<variable>::scheduleTask(Step step,
Time gmx_unused time,
const RegisterRunFunction& registerRunFunction)
{
lambda_);
}
-void FreeEnergyPerturbationData::Element::scheduleTask(Step step,
+void FreeEnergyPerturbationData::Element::scheduleTask(Step step,
Time gmx_unused time,
const RegisterRunFunction& registerRunFunction)
{
FreeEnergyPerturbationData::Element::Element(FreeEnergyPerturbationData* freeEnergyPerturbationElement,
double deltaLambda) :
- freeEnergyPerturbationData_(freeEnergyPerturbationElement),
- lambdasChange_(deltaLambda != 0)
+ freeEnergyPerturbationData_(freeEnergyPerturbationElement), lambdasChange_(deltaLambda != 0)
{
}
}
}
-void ParrinelloRahmanBarostat::scheduleTask(Step step,
+void ParrinelloRahmanBarostat::scheduleTask(Step step,
Time gmx_unused time,
const RegisterRunFunction& registerRunFunction)
{
template<NumVelocityScalingValues numStartVelocityScalingValues,
ParrinelloRahmanVelocityScaling parrinelloRahmanVelocityScaling,
NumVelocityScalingValues numEndVelocityScalingValues>
-static void inline updateVelocities(int a,
- real dt,
- real lambdaStart,
- real lambdaEnd,
+static void inline updateVelocities(int a,
+ real dt,
+ real lambdaStart,
+ real lambdaEnd,
const rvec* gmx_restrict invMassPerDim,
- rvec* gmx_restrict v,
+ rvec* gmx_restrict v,
const rvec* gmx_restrict f,
const rvec diagPR,
const matrix matrixPR)
}
//! Update positions
-static void inline updatePositions(int a,
- real dt,
+static void inline updatePositions(int a,
+ real dt,
const rvec* gmx_restrict x,
- rvec* gmx_restrict xprime,
+ rvec* gmx_restrict xprime,
const rvec* gmx_restrict v)
{
for (int d = 0; d < DIM; d++)
const real lambdaStart = (numStartVelocityScalingValues == NumVelocityScalingValues::Single)
? startVelocityScaling_[0]
: 1.0;
- const real lambdaEnd = (numEndVelocityScalingValues == NumVelocityScalingValues::Single)
- ? endVelocityScaling_[0]
- : 1.0;
+ const real lambdaEnd = (numEndVelocityScalingValues == NumVelocityScalingValues::Single)
+ ? endVelocityScaling_[0]
+ : 1.0;
const bool isFullScalingMatrixDiagonal =
diagonalizePRMatrix<parrinelloRahmanVelocityScaling>(matrixPR_, diagPR_);
const real lambdaStart = (numStartVelocityScalingValues == NumVelocityScalingValues::Single)
? startVelocityScaling_[0]
: 1.0;
- const real lambdaEnd = (numEndVelocityScalingValues == NumVelocityScalingValues::Single)
- ? endVelocityScaling_[0]
- : 1.0;
+ const real lambdaEnd = (numEndVelocityScalingValues == NumVelocityScalingValues::Single)
+ ? endVelocityScaling_[0]
+ : 1.0;
const bool isFullScalingMatrixDiagonal =
diagonalizePRMatrix<parrinelloRahmanVelocityScaling>(matrixPR_, diagPR_);
const real lambdaStart = (numStartVelocityScalingValues == NumVelocityScalingValues::Single)
? startVelocityScaling_[0]
: 1.0;
- const real lambdaEnd = (numEndVelocityScalingValues == NumVelocityScalingValues::Single)
- ? endVelocityScaling_[0]
- : 1.0;
+ const real lambdaEnd = (numEndVelocityScalingValues == NumVelocityScalingValues::Single)
+ ? endVelocityScaling_[0]
+ : 1.0;
const bool isFullScalingMatrixDiagonal =
diagonalizePRMatrix<parrinelloRahmanVelocityScaling>(matrixPR_, diagPR_);
}
template<IntegrationStage integrationStage>
-void Propagator<integrationStage>::scheduleTask(Step step,
+void Propagator<integrationStage>::scheduleTask(Step step,
Time gmx_unused time,
const RegisterRunFunction& registerRunFunction)
{
Step nstlist,
Step initStep,
Time initTime) :
- callbacks_(std::move(callbacks)),
- nstlist_(nstlist),
- initStep_(initStep),
- initTime_(initTime)
+ callbacks_(std::move(callbacks)), nstlist_(nstlist), initStep_(initStep), initTime_(initTime)
{
}
}
}
-void StatePropagatorData::Element::scheduleTask(Step step,
+void StatePropagatorData::Element::scheduleTask(Step step,
Time gmx_unused time,
const RegisterRunFunction& registerRunFunction)
{
{
public:
//! Apply the v-rescale temperature control
- real apply(Step step,
- int temperatureGroup,
- real currentKineticEnergy,
+ real apply(Step step,
+ int temperatureGroup,
+ real currentKineticEnergy,
real gmx_unused currentTemperature,
const TemperatureCouplingData& temperatureCouplingData) override
{
}
}
-void VelocityScalingTemperatureCoupling::scheduleTask(Step step,
+void VelocityScalingTemperatureCoupling::scheduleTask(Step step,
Time gmx_unused time,
const RegisterRunFunction& registerRunFunction)
{
const real currentKineticEnergy = useFullStepKE_ == UseFullStepKE::Yes
? trace(ekind->tcstat[temperatureGroup].ekinf)
: trace(ekind->tcstat[temperatureGroup].ekinh);
- const real currentTemperature = useFullStepKE_ == UseFullStepKE::Yes
- ? ekind->tcstat[temperatureGroup].T
- : ekind->tcstat[temperatureGroup].Th;
+ const real currentTemperature = useFullStepKE_ == UseFullStepKE::Yes
+ ? ekind->tcstat[temperatureGroup].T
+ : ekind->tcstat[temperatureGroup].Th;
temperatureCouplingIntegral_[temperatureGroup] = temperatureCouplingImpl_->apply(
step, temperatureGroup, currentKineticEnergy, currentTemperature, thermostatData);
/* Compare 6*C6 and 12*C12 for geometric cobination rule */
bCombGeom =
bCombGeom
- && gmx_within_tol(c6 * c6, nbfp[(i * ntype + i) * 2] * nbfp[(j * ntype + j) * 2], tol)
+ && gmx_within_tol(
+ c6 * c6, nbfp[(i * ntype + i) * 2] * nbfp[(j * ntype + j) * 2], tol)
&& gmx_within_tol(c12 * c12,
nbfp[(i * ntype + i) * 2 + 1] * nbfp[(j * ntype + j) * 2 + 1],
tol);
/* Compare C6 and C12 for Lorentz-Berthelot combination rule */
c6 /= 6.0;
c12 /= 12.0;
- bCombLB =
- bCombLB
- && ((c6 == 0 && c12 == 0
- && (params->nbfp_comb[i * 2 + 1] == 0 || params->nbfp_comb[j * 2 + 1] == 0))
- || (c6 > 0 && c12 > 0
- && gmx_within_tol(gmx::sixthroot(c12 / c6),
- 0.5 * (params->nbfp_comb[i * 2] + params->nbfp_comb[j * 2]),
- tol)
- && gmx_within_tol(0.25 * c6 * c6 / c12,
- std::sqrt(params->nbfp_comb[i * 2 + 1]
- * params->nbfp_comb[j * 2 + 1]),
- tol)));
+ bCombLB = bCombLB
+ && ((c6 == 0 && c12 == 0
+ && (params->nbfp_comb[i * 2 + 1] == 0 || params->nbfp_comb[j * 2 + 1] == 0))
+ || (c6 > 0 && c12 > 0
+ && gmx_within_tol(
+ gmx::sixthroot(c12 / c6),
+ 0.5 * (params->nbfp_comb[i * 2] + params->nbfp_comb[j * 2]),
+ tol)
+ && gmx_within_tol(0.25 * c6 * c6 / c12,
+ std::sqrt(params->nbfp_comb[i * 2 + 1]
+ * params->nbfp_comb[j * 2 + 1]),
+ tol)));
}
else
{
}
}
-gmx_unused static void nbnxn_atomdata_reduce_reals(real* gmx_restrict dest,
- gmx_bool bDestSet,
+gmx_unused static void nbnxn_atomdata_reduce_reals(real* gmx_restrict dest,
+ gmx_bool bDestSet,
const real** gmx_restrict src,
int nsrc,
int i0,
}
gmx_unused static void nbnxn_atomdata_reduce_reals_simd(real gmx_unused* gmx_restrict dest,
- gmx_bool gmx_unused bDestSet,
+ gmx_bool gmx_unused bDestSet,
const gmx_unused real** gmx_restrict src,
- int gmx_unused nsrc,
- int gmx_unused i0,
- int gmx_unused i1)
+ int gmx_unused nsrc,
+ int gmx_unused i0,
+ int gmx_unused i1)
{
#if GMX_SIMD
/* The SIMD width here is actually independent of that in the kernels,
const gmx::BenchmarkSystem& system)
{
const auto pinPolicy = (options.useGpu ? gmx::PinningPolicy::PinnedIfSupported
- : gmx::PinningPolicy::CannotBePinned);
+ : gmx::PinningPolicy::CannotBePinned);
const int numThreads = options.numThreads;
// Note: the options and Nbnxm combination rule enums values should match
const int combinationRule = static_cast<int>(options.ljCombinationRule);
/*! Convert LJ sigma,epsilon parameters to C6,C12. */
static __forceinline__ __device__ void
- convert_sigma_epsilon_to_c6_c12(const float sigma, const float epsilon, float* c6, float* c12)
+convert_sigma_epsilon_to_c6_c12(const float sigma, const float epsilon, float* c6, float* c12)
{
float sigma2, sigma6;
/*! Apply force switch, force + energy version. */
static __forceinline__ __device__ void
- calculate_force_switch_F(const NBParamGpu nbparam, float c6, float c12, float inv_r, float r2, float* F_invr)
+calculate_force_switch_F(const NBParamGpu nbparam, float c6, float c12, float inv_r, float r2, float* F_invr)
{
float r, r_switch;
/*! Apply potential switch, force-only version. */
static __forceinline__ __device__ void
- calculate_potential_switch_F(const NBParamGpu nbparam, float inv_r, float r2, float* F_invr, float* E_lj)
+calculate_potential_switch_F(const NBParamGpu nbparam, float inv_r, float r2, float* F_invr, float* E_lj)
{
float r, r_switch;
float sw, dsw;
/*! Apply potential switch, force + energy version. */
static __forceinline__ __device__ void
- calculate_potential_switch_F_E(const NBParamGpu nbparam, float inv_r, float r2, float* F_invr, float* E_lj)
+calculate_potential_switch_F_E(const NBParamGpu nbparam, float inv_r, float r2, float* F_invr, float* E_lj)
{
float r, r_switch;
float sw, dsw;
* arbitrary array sizes.
*/
static __forceinline__ __device__ void
- reduce_force_j_generic(float* f_buf, float3* fout, int tidxi, int tidxj, int aidx)
+reduce_force_j_generic(float* f_buf, float3* fout, int tidxi, int tidxj, int aidx)
{
if (tidxi < 3)
{
* array sizes.
*/
static __forceinline__ __device__ void
- reduce_force_j_warp_shfl(float3 f, float3* fout, int tidxi, int aidx, const unsigned int activemask)
+reduce_force_j_warp_shfl(float3 f, float3* fout, int tidxi, int aidx, const unsigned int activemask)
{
f.x += __shfl_down_sync(activemask, f.x, 1);
f.y += __shfl_up_sync(activemask, f.y, 1);
* on whether the size of the array to be reduced is power of two or not.
*/
static __forceinline__ __device__ void
- reduce_force_i(float* f_buf, float3* f, float* fshift_buf, bool bCalcFshift, int tidxi, int tidxj, int ai)
+reduce_force_i(float* f_buf, float3* f, float* fshift_buf, bool bCalcFshift, int tidxi, int tidxj, int ai)
{
if ((c_clSize & (c_clSize - 1)))
{
* array sizes.
*/
static __forceinline__ __device__ void
- reduce_energy_pow2(volatile float* buf, float* e_lj, float* e_el, unsigned int tidx)
+reduce_energy_pow2(volatile float* buf, float* e_lj, float* e_el, unsigned int tidx)
{
float e1, e2;
* array sizes.
*/
static __forceinline__ __device__ void
- reduce_energy_warp_shfl(float E_lj, float E_el, float* e_lj, float* e_el, int tidx, const unsigned int activemask)
+reduce_energy_warp_shfl(float E_lj, float E_el, float* e_lj, float* e_el, int tidx, const unsigned int activemask)
{
int i, sh;
GPU_FUNC_QUALIFIER
void gpu_init_pairlist(NbnxmGpu gmx_unused* nb,
const struct NbnxnPairlistGpu gmx_unused* h_nblist,
- gmx::InteractionLocality gmx_unused iloc) GPU_FUNC_TERM;
+ gmx::InteractionLocality gmx_unused iloc) GPU_FUNC_TERM;
/** Initializes atom-data on the GPU, called at every pair search step. */
GPU_FUNC_QUALIFIER
const real* gmx_restrict vVdwSimd = out->VSvdw.data();
const real* gmx_restrict vCoulombSimd = out->VSc.data();
- real* gmx_restrict vVdw = out->Vvdw.data();
- real* gmx_restrict vCoulomb = out->Vc.data();
+ real* gmx_restrict vVdw = out->Vvdw.data();
+ real* gmx_restrict vCoulomb = out->Vc.data();
/* The size of the SIMD energy group buffer array is:
* numGroups*numGroups*numGroupsStorage*unrollj_half*simd_width
nbl->cj.resize(nbl->cjOuter.size());
const nbnxn_ci_t* gmx_restrict ciOuter = nbl->ciOuter.data();
- nbnxn_ci_t* gmx_restrict ciInner = nbl->ci.data();
+ nbnxn_ci_t* gmx_restrict ciInner = nbl->ci.data();
const nbnxn_cj_t* gmx_restrict cjOuter = nbl->cjOuter.data();
- nbnxn_cj_t* gmx_restrict cjInner = nbl->cj.data();
+ nbnxn_cj_t* gmx_restrict cjInner = nbl->cj.data();
const real* gmx_restrict x = nbat->x().data();
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2012,2013,2014,2015,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
*interact_S0 = cvtIB2B(testBits(mask_pr_S & filter_S0));
*interact_S2 = cvtIB2B(testBits(mask_pr_S & filter_S2));
#elif GMX_SIMD_HAVE_LOGICAL
- union {
+ union
+ {
# if GMX_DOUBLE
std::int64_t i;
# else
#if !(defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined FIX_LJ_C)
/* No combination rule used */
const real* gmx_restrict nbfp_ptr = nbatParams.nbfp_aligned.data();
- const int* gmx_restrict type = nbatParams.type.data();
+ const int* gmx_restrict type = nbatParams.type.data();
#endif
/* Load j-i for the first i */
nbl->cj.resize(nbl->cjOuter.size());
const nbnxn_ci_t* gmx_restrict ciOuter = nbl->ciOuter.data();
- nbnxn_ci_t* gmx_restrict ciInner = nbl->ci.data();
+ nbnxn_ci_t* gmx_restrict ciInner = nbl->ci.data();
const nbnxn_cj_t* gmx_restrict cjOuter = nbl->cjOuter.data();
- nbnxn_cj_t* gmx_restrict cjInner = nbl->cj.data();
+ nbnxn_cj_t* gmx_restrict cjInner = nbl->cj.data();
const real* gmx_restrict x = nbat->x().data();
typedef gmx::SimdReal SimdBitMask;
#endif
-static inline void gmx_simdcall gmx_load_simd_4xn_interactions(int excl,
+static inline void gmx_simdcall gmx_load_simd_4xn_interactions(int excl,
SimdBitMask gmx_unused filter_S0,
SimdBitMask gmx_unused filter_S1,
SimdBitMask gmx_unused filter_S2,
*interact_S2 = cvtIB2B(testBits(mask_pr_S & filter_S2));
*interact_S3 = cvtIB2B(testBits(mask_pr_S & filter_S3));
#elif GMX_SIMD_HAVE_LOGICAL
- union {
+ union
+ {
# if GMX_DOUBLE
std::int64_t i;
# else
#if !(defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined FIX_LJ_C)
/* No combination rule used */
const real* gmx_restrict nbfp_ptr = nbatParams.nbfp_aligned.data();
- const int* gmx_restrict type = nbatParams.type.data();
+ const int* gmx_restrict type = nbatParams.type.data();
#endif
/* Load j-i for the first i */
nbl->cj.resize(nbl->cjOuter.size());
const nbnxn_ci_t* gmx_restrict ciOuter = nbl->ciOuter.data();
- nbnxn_ci_t* gmx_restrict ciInner = nbl->ci.data();
+ nbnxn_ci_t* gmx_restrict ciInner = nbl->ci.data();
const nbnxn_cj_t* gmx_restrict cjOuter = nbl->cjOuter.data();
- nbnxn_cj_t* gmx_restrict cjInner = nbl->cj.data();
+ nbnxn_cj_t* gmx_restrict cjInner = nbl->cj.data();
const real* gmx_restrict x = nbat->x().data();
GPU_FUNC_QUALIFIER
void gpu_copy_xq_to_gpu(NbnxmGpu gmx_unused* nb,
const struct nbnxn_atomdata_t gmx_unused* nbdata,
- gmx::AtomLocality gmx_unused aloc) GPU_FUNC_TERM;
+ gmx::AtomLocality gmx_unused aloc) GPU_FUNC_TERM;
/*! \brief
* Launch asynchronously the nonbonded force calculations.
* \param [in] numParts Number of parts the pair list is split into in the rolling kernel.
*/
GPU_FUNC_QUALIFIER
-void gpu_launch_kernel_pruneonly(NbnxmGpu gmx_unused* nb,
+void gpu_launch_kernel_pruneonly(NbnxmGpu gmx_unused* nb,
gmx::InteractionLocality gmx_unused iloc,
- int gmx_unused numParts) GPU_FUNC_TERM;
+ int gmx_unused numParts) GPU_FUNC_TERM;
/*! \brief
* Launch asynchronously the download of short-range forces from the GPU
void gpu_launch_cpyback(NbnxmGpu gmx_unused* nb,
nbnxn_atomdata_t gmx_unused* nbatom,
const gmx::StepWorkload gmx_unused& stepWork,
- gmx::AtomLocality gmx_unused aloc) GPU_FUNC_TERM;
+ gmx::AtomLocality gmx_unused aloc) GPU_FUNC_TERM;
/*! \brief Attempts to complete nonbonded GPU task.
*
GPU_FUNC_QUALIFIER
bool gpu_try_finish_task(NbnxmGpu gmx_unused* nb,
const gmx::StepWorkload gmx_unused& stepWork,
- gmx::AtomLocality gmx_unused aloc,
+ gmx::AtomLocality gmx_unused aloc,
real gmx_unused* e_lj,
- real gmx_unused* e_el,
+ real gmx_unused* e_el,
gmx::ArrayRef<gmx::RVec> gmx_unused shiftForces,
- GpuTaskCompletion gmx_unused completionKind,
+ GpuTaskCompletion gmx_unused completionKind,
gmx_wallcycle gmx_unused* wcycle) GPU_FUNC_TERM_WITH_RETURN(false);
/*! \brief Completes the nonbonded GPU task blocking until GPU tasks and data
GPU_FUNC_QUALIFIER
float gpu_wait_finish_task(NbnxmGpu gmx_unused* nb,
const gmx::StepWorkload gmx_unused& stepWork,
- gmx::AtomLocality gmx_unused aloc,
+ gmx::AtomLocality gmx_unused aloc,
real gmx_unused* e_lj,
- real gmx_unused* e_el,
+ real gmx_unused* e_el,
gmx::ArrayRef<gmx::RVec> gmx_unused shiftForces,
gmx_wallcycle gmx_unused* wcycle) GPU_FUNC_TERM_WITH_RETURN(0.0);
*/
GPU_FUNC_QUALIFIER
void nbnxn_gpu_x_to_nbat_x(const Nbnxm::Grid gmx_unused& grid,
- NbnxmGpu gmx_unused* gpu_nbv,
+ NbnxmGpu gmx_unused* gpu_nbv,
DeviceBuffer<gmx::RVec> gmx_unused d_x,
GpuEventSynchronizer gmx_unused* xReadyOnDevice,
- gmx::AtomLocality gmx_unused locality,
- int gmx_unused gridId,
- int gmx_unused numColumnsMax,
+ gmx::AtomLocality gmx_unused locality,
+ int gmx_unused gridId,
+ int gmx_unused numColumnsMax,
bool gmx_unused mustInsertNonLocalDependency) GPU_FUNC_TERM;
/*! \brief Sync the nonlocal stream with dependent tasks in the local queue.
* \param[in] interactionLocality Local or NonLocal sync point
*/
GPU_FUNC_QUALIFIER
-void nbnxnInsertNonlocalGpuDependency(NbnxmGpu gmx_unused* nb,
+void nbnxnInsertNonlocalGpuDependency(NbnxmGpu gmx_unused* nb,
gmx::InteractionLocality gmx_unused interactionLocality) GPU_FUNC_TERM;
/*! \brief Set up internal flags that indicate what type of short-range work there is.
*/
GPU_FUNC_QUALIFIER
void setupGpuShortRangeWork(NbnxmGpu gmx_unused* nb,
- const gmx::GpuBonded gmx_unused* gpuBonded,
+ const gmx::GpuBonded gmx_unused* gpuBonded,
gmx::InteractionLocality gmx_unused iLocality) GPU_FUNC_TERM;
/*! \brief Returns true if there is GPU short-range work for the given interaction locality.
PairlistSets::PairlistSets(const PairlistParams& pairlistParams,
const bool haveMultipleDomains,
const int minimumIlistCountForGpuBalancing) :
- params_(pairlistParams),
- minimumIlistCountForGpuBalancing_(minimumIlistCountForGpuBalancing)
+ params_(pairlistParams), minimumIlistCountForGpuBalancing_(minimumIlistCountForGpuBalancing)
{
localSet_ = std::make_unique<PairlistSet>(params_);
#ifndef LJ_COMB
int ntypes, /* IN */
#endif
- cl_nbparam_params_t nbparam_params, /* IN */
- const __global float4* restrict xq, /* IN */
- __global float* restrict f, /* OUT stores float3 values */
- __global float* restrict gmx_unused e_lj, /* OUT */
- __global float* restrict gmx_unused e_el, /* OUT */
- __global float* restrict fshift, /* OUT stores float3 values */
+ cl_nbparam_params_t nbparam_params, /* IN */
+ const __global float4* restrict xq, /* IN */
+ __global float* restrict f, /* OUT stores float3 values */
+ __global float* restrict gmx_unused e_lj, /* OUT */
+ __global float* restrict gmx_unused e_el, /* OUT */
+ __global float* restrict fshift, /* OUT stores float3 values */
#ifdef LJ_COMB
const __global float2* restrict lj_comb, /* IN stores float2 values */
#else
#endif
const __global float* restrict shift_vec, /* IN stores float3 values */
__constant const float2* restrict gmx_unused nbfp, /* IN */
- __constant const float2* restrict gmx_unused nbfp_comb, /* IN */
- __constant const float* restrict gmx_unused coulomb_tab, /* IN */
- const __global nbnxn_sci_t* pl_sci, /* IN */
+ __constant const float2* restrict gmx_unused nbfp_comb, /* IN */
+ __constant const float* restrict gmx_unused coulomb_tab, /* IN */
+ const __global nbnxn_sci_t* pl_sci, /* IN */
#ifndef PRUNE_NBL
const
#endif
F_invr += qi * qj_f
* (int_bit * inv_r2
- interpolate_coulomb_force_r(
- coulomb_tab, r2 * inv_r, coulomb_tab_scale))
+ coulomb_tab, r2 * inv_r, coulomb_tab_scale))
* inv_r;
#endif /* EL_EWALD_ANA/TAB */
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019,2020,2021, 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.
#endif
(cl_nbparam_params_t nbparam_params,
const __global float4* restrict xq,
- const __global float* restrict shift_vec,
+ const __global float* restrict shift_vec,
const __global nbnxn_sci_t* pl_sci,
__global nbnxn_cj4_t* pl_cj4,
#if !defined HAVE_FRESH_LIST
const __global int* gm_cj,
int tidxi,
int tidxj,
- bool gmx_unused iMaskCond)
+ bool gmx_unused iMaskCond)
{
/* Pre-load cj into shared memory */
# if defined _AMD_SOURCE_ // TODO: fix by setting c_nbnxnGpuClusterpairSplit properly
*/
gmx_opencl_inline void preloadCj4(CjType gmx_unused* cjs,
const __global int gmx_unused* gm_cj,
- int gmx_unused tidxi,
- int gmx_unused tidxj,
- bool gmx_unused iMaskCond)
+ int gmx_unused tidxi,
+ int gmx_unused tidxj,
+ bool gmx_unused iMaskCond)
{
# if USE_SUBGROUP_PRELOAD
*cjs = preloadCj4Subgroup(gm_cj);
* array sizes.
*/
gmx_opencl_inline void reduce_force_i_and_shift_pow2(volatile __local float* f_buf,
- __private fvec fci_buf[],
- __global float* fout,
- bool bCalcFshift,
- int tidxi,
- int tidxj,
- int sci,
- int shift,
- __global float* fshift)
+ __private fvec fci_buf[],
+ __global float* fout,
+ bool bCalcFshift,
+ int tidxi,
+ int tidxj,
+ int sci,
+ int shift,
+ __global float* fshift)
{
float fshift_buf = 0;
for (int ci_offset = 0; ci_offset < c_nbnxnGpuNumClusterPerSupercluster; ci_offset++)
/*! Final i-force reduction
*/
gmx_opencl_inline void reduce_force_i_and_shift(__local float gmx_unused* f_buf,
- __private fvec fci_buf[],
- __global float* f,
- bool bCalcFshift,
- int tidxi,
- int tidxj,
- int sci,
- int shift,
- __global float* fshift)
+ __private fvec fci_buf[],
+ __global float* f,
+ bool bCalcFshift,
+ int tidxi,
+ int tidxj,
+ int sci,
+ int shift,
+ __global float* fshift)
{
# if REDUCE_SHUFFLE
reduce_force_i_and_shift_shfl(fci_buf, f, bCalcFshift, tidxi, tidxj, sci, shift, fshift);
: c_nbnxnCpuIClusterSize;
//! Copies PBC shifted i-cell packed atom coordinates to working array
-static inline void icell_set_x_simd_2xnn(int ci,
- real shx,
- real shy,
- real shz,
+static inline void icell_set_x_simd_2xnn(int ci,
+ real shx,
+ real shy,
+ real shz,
int gmx_unused stride,
const real* x,
NbnxnPairlistCpuWork* work)
* \param[in] rbb2 The squared cut-off for putting cluster-pairs in the list based on bounding box distance only
* \param[in,out] numDistanceChecks The number of distance checks performed
*/
-static inline void makeClusterListSimd2xnn(const Grid& jGrid,
- NbnxnPairlistCpu* nbl,
- int icluster,
- int firstCell,
- int lastCell,
- bool excludeSubDiagonal,
+static inline void makeClusterListSimd2xnn(const Grid& jGrid,
+ NbnxnPairlistCpu* nbl,
+ int icluster,
+ int firstCell,
+ int lastCell,
+ bool excludeSubDiagonal,
const real* gmx_restrict x_j,
real rlist2,
float rbb2,
- int* gmx_restrict numDistanceChecks)
+ int* gmx_restrict numDistanceChecks)
{
using namespace gmx;
- const real* gmx_restrict x_ci_simd = nbl->work->iClusterData.xSimd.data();
- const BoundingBox* gmx_restrict bb_ci = nbl->work->iClusterData.bb.data();
+ const real* gmx_restrict x_ci_simd = nbl->work->iClusterData.xSimd.data();
+ const BoundingBox* gmx_restrict bb_ci = nbl->work->iClusterData.bb.data();
SimdReal jx_S, jy_S, jz_S;
(GMX_SIMD_REAL_WIDTH > c_nbnxnCpuIClusterSize ? GMX_SIMD_REAL_WIDTH : c_nbnxnCpuIClusterSize);
//! Copies PBC shifted i-cell packed atom coordinates to working array
-static inline void icell_set_x_simd_4xn(int ci,
- real shx,
- real shy,
- real shz,
+static inline void icell_set_x_simd_4xn(int ci,
+ real shx,
+ real shy,
+ real shz,
int gmx_unused stride,
const real* x,
NbnxnPairlistCpuWork* work)
* \param[in] rbb2 The squared cut-off for putting cluster-pairs in the list based on bounding box distance only
* \param[in,out] numDistanceChecks The number of distance checks performed
*/
-static inline void makeClusterListSimd4xn(const Grid& jGrid,
- NbnxnPairlistCpu* nbl,
- int icluster,
- int firstCell,
- int lastCell,
- bool excludeSubDiagonal,
+static inline void makeClusterListSimd4xn(const Grid& jGrid,
+ NbnxnPairlistCpu* nbl,
+ int icluster,
+ int firstCell,
+ int lastCell,
+ bool excludeSubDiagonal,
const real* gmx_restrict x_j,
real rlist2,
float rbb2,
- int* gmx_restrict numDistanceChecks)
+ int* gmx_restrict numDistanceChecks)
{
using namespace gmx;
- const real* gmx_restrict x_ci_simd = nbl->work->iClusterData.xSimd.data();
- const BoundingBox* gmx_restrict bb_ci = nbl->work->iClusterData.bb.data();
+ const real* gmx_restrict x_ci_simd = nbl->work->iClusterData.xSimd.data();
+ const BoundingBox* gmx_restrict bb_ci = nbl->work->iClusterData.bb.data();
SimdReal jx_S, jy_S, jz_S;
"with an appropriate message above");
const bool runningOnXeonPhi = (cpuinfo.brandString().find("Xeon Phi") != std::string::npos);
- const float listfac_ok = useOrEmulateGpuForNonbondeds
- ? c_nbnxnListSizeFactorGPU
- : runningOnXeonPhi ? c_nbnxnListSizeFactorIntelXeonPhi
- : c_nbnxnListSizeFactorCpu;
- float listfac_max = listfac_ok + c_nbnxnListSizeFactorMargin;
+ const float listfac_ok = useOrEmulateGpuForNonbondeds ? c_nbnxnListSizeFactorGPU
+ : runningOnXeonPhi ? c_nbnxnListSizeFactorIntelXeonPhi
+ : c_nbnxnListSizeFactorCpu;
+ float listfac_max = listfac_ok + c_nbnxnListSizeFactorMargin;
const int nstlist_orig = ir->nstlist;
if (nstlist_cmdline > 0)
};
NbnxnPairlistGpuWork() :
- distanceBuffer(c_gpuNumClusterPerCell),
- sci_sort({}, { gmx::PinningPolicy::PinnedIfSupported })
+ distanceBuffer(c_gpuNumClusterPerCell), sci_sort({}, { gmx::PinningPolicy::PinnedIfSupported })
{
}
#ifndef DOXYGEN
PairsearchWork::PairsearchWork() :
- cp0({ { 0 } }),
- ndistc(0),
- nbl_fep(std::make_unique<t_nblist>()),
- cp1({ { 0 } })
+ cp0({ { 0 } }), ndistc(0), nbl_fep(std::make_unique<t_nblist>()), cp1({ { 0 } })
{
}
fInvR += qi * qj
* (pairExclMask * r2Inv
- interpolateCoulombForceR(
- a_coulombTab, coulombTabScale, r2 * rInv))
+ a_coulombTab, coulombTabScale, r2 * rInv))
* rInv;
}
};
TextTableFormatter::Impl::Impl() :
- firstColumnIndent_(0),
- foldLastColumnToNextLineIndent_(-1),
- bFirstRow_(true),
- bPrintHeader_(false)
+ firstColumnIndent_(0), foldLastColumnToNextLineIndent_(-1), bFirstRow_(true), bPrintHeader_(false)
{
}
struct LinkItem
{
LinkItem(const std::string& linkName, const std::string& replacement) :
- linkName(linkName),
- replacement(replacement)
+ linkName(linkName), replacement(replacement)
{
}
std::string linkName;
public:
//! Initializes the state with the given parameters.
SharedState(TextWriter* writer, HelpOutputFormat format, const HelpLinks* links) :
- file_(*writer),
- format_(format),
- links_(links)
+ file_(*writer), format_(format), links_(links)
{
}
struct ReplaceItem
{
ReplaceItem(const std::string& search, const std::string& replace) :
- search(search),
- replace(replace)
+ search(search), replace(replace)
{
}
std::string search;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2014,2015,2017,2019, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2017,2019,2021, 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.
}
MockHelpTopic::MockHelpTopic(const char* name, const char* title, const char* text) :
- name_(name),
- title_(title),
- text_(text != nullptr ? text : "")
+ name_(name), title_(title), text_(text != nullptr ? text : "")
{
if (!isNullOrEmpty(text))
{
/*! \cond libapi */
//! Initializes the name and default values for an option.
explicit AbstractOption(const char* name) :
- minValueCount_(1),
- maxValueCount_(1),
- name_(name),
- descr_(nullptr),
- storeIsSet_(nullptr)
+ minValueCount_(1), maxValueCount_(1), name_(name), descr_(nullptr), storeIsSet_(nullptr)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010-2018, The GROMACS development team.
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2021, 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.
*/
DoubleOptionStorage::DoubleOptionStorage(const DoubleOption& settings) :
- MyBase(settings),
- info_(this),
- bTime_(settings.bTime_),
- factor_(1.0)
+ MyBase(settings), info_(this), bTime_(settings.bTime_), factor_(1.0)
{
}
*/
FloatOptionStorage::FloatOptionStorage(const FloatOption& settings) :
- MyBase(settings),
- info_(this),
- bTime_(settings.bTime_),
- factor_(1.0)
+ MyBase(settings), info_(this), bTime_(settings.bTime_), factor_(1.0)
{
}
*/
StringOptionStorage::StringOptionStorage(const StringOption& settings) :
- MyBase(settings),
- info_(this)
+ MyBase(settings), info_(this)
{
if (settings.defaultEnumIndex_ >= 0 && settings.enumValues_ == nullptr)
{
int defaultValue,
int defaultValueIfSet,
StorePointer store) :
- MyBase(settings, std::move(store)),
- info_(this)
+ MyBase(settings, std::move(store)), info_(this)
{
if (enumValues == nullptr)
{
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010-2018, The GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
//! Initializes an option with the given name.
explicit StringOption(const char* name) :
- MyBase(name),
- enumValues_(nullptr),
- enumValuesCount_(0),
- defaultEnumIndex_(-1)
+ MyBase(name), enumValues_(nullptr), enumValuesCount_(0), defaultEnumIndex_(-1)
{
}
public:
//! Initializes the storage for the given actual enum variables.
EnumIndexStore(EnumType* store, std::vector<EnumType>* storeVector) :
- store_(store),
- storeVector_(storeVector)
+ store_(store), storeVector_(storeVector)
{
if (storeVector_ != nullptr)
{
//! Initializes an option with the given name.
explicit LegacyEnumOption(const char* name) :
- MyBase(name),
- enumValues_(nullptr),
- enumValuesCount_(0)
+ MyBase(name), enumValues_(nullptr), enumValuesCount_(0)
{
}
};
FileTypeHandler::FileTypeHandler(int fileType) :
- fileType_(fileType),
- extensionCount_(0),
- genericTypes_(nullptr)
+ fileType_(fileType), extensionCount_(0), genericTypes_(nullptr)
{
if (fileType_ >= 0)
{
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010-2018, The GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
template<class U>
explicit OptionStorageTemplateSimple(const OptionTemplate<T, U>& settings,
OptionFlags staticFlags = OptionFlags()) :
- OptionStorageTemplate<T>(settings, staticFlags),
- initialized_(false)
+ OptionStorageTemplate<T>(settings, staticFlags), initialized_(false)
{
}
//! Initializes the storage.
OptionStorageTemplateSimple(const AbstractOption& settings,
typename OptionStorageTemplate<T>::StorePointer store) :
- OptionStorageTemplate<T>(settings, std::move(store)),
- initialized_(false)
+ OptionStorageTemplate<T>(settings, std::move(store)), initialized_(false)
{
}
template<typename T>
OptionStorageTemplate<T>::OptionStorageTemplate(const AbstractOption& settings, StorePointer store) :
- AbstractOptionStorage(settings, OptionFlags()),
- store_(std::move(store))
+ AbstractOptionStorage(settings, OptionFlags()), store_(std::move(store))
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018,2019,2021, 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.
//! Creates a section with the given name.
explicit RepeatingOptionSection(const char* name) :
- AbstractOptionSection(name),
- values_(nullptr)
+ AbstractOptionSection(name), values_(nullptr)
{
}
public:
//! Initializes the storage for given section properties.
explicit RepeatingOptionSectionStorage(const RepeatingOptionSection<T>& section) :
- store_(new OptionValueStoreVector<T>(section.values_)),
- currentData_()
+ store_(new OptionValueStoreVector<T>(section.values_)), currentData_()
{
}
{
public:
TreeAssignHelper(Options* options, IKeyValueTreeErrorHandler* errorHandler) :
- assigner_(options),
- errorHandler_(errorHandler)
+ assigner_(options), errorHandler_(errorHandler)
{
if (errorHandler_ == nullptr)
{
{
public:
TreeCheckHelper(const KeyValueTreeObject& root) :
- currentObject_(&root),
- currentKnownNames_(nullptr)
+ currentObject_(&root), currentKnownNames_(nullptr)
{
}
{
public:
TreeAdjustHelper(const KeyValueTreeObject& root, KeyValueTreeBuilder* builder) :
- currentSourceObject_(&root),
- currentObjectBuilder_(builder->rootObject())
+ currentSourceObject_(&root), currentObjectBuilder_(builder->rootObject())
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019,2021, 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.
{
public:
OptionValueStorePlain(T* store, int* storeCount, int initialCount) :
- count_(initialCount),
- store_(store),
- storeCount_(storeCount)
+ count_(initialCount), store_(store), storeCount_(storeCount)
{
}
*/
template<bool returnShift>
static __forceinline__ __device__ int
- pbcDxAiuc(const PbcAiuc& pbcAiuc, const float4 r1, const float4 r2, float3& dr)
+pbcDxAiuc(const PbcAiuc& pbcAiuc, const float4 r1, const float4 r2, float3& dr)
{
dr.x = r1.x - r2.x;
dr.y = r1.y - r2.y;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2020, by the GROMACS development team, led by
+ * Copyright (c) 2020,2021, 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.
};
COMInPlaceTest::COMInPlaceTest() :
- testCoordinates_(initialCoordinates()),
- checker_(data_.rootChecker())
+ testCoordinates_(initialCoordinates()), checker_(data_.rootChecker())
{
auto& moltype = testTopology_.moltype.emplace_back();
populateMoleculeType(&moltype);
/* The cylinder group is always a slab in the system, thus large.
* Therefore we always thread-parallelize this group.
*/
- const int numAtomsLocal = localAtomIndices.size();
- const int gmx_unused numThreads = pgrp.numThreads();
+ const int numAtomsLocal = localAtomIndices.size();
+ const int gmx_unused numThreads = pgrp.numThreads();
#pragma omp parallel for num_threads(numThreads) schedule(static)
for (int i = 0; i < numAtomsLocal; i++)
{
#if GMX_MPI
MPI_Comm mpi_comm_com; /* Communicator for pulling */
#endif
- int nparticipate; /* The number of ranks participating */
+ int nparticipate; /* The number of ranks participating */
bool isMasterRank; /* Tells whether our rank is the master rank and thus should add the pull virial */
int64_t setup_count; /* The number of decomposition calls */
return V;
}
-static void sort_collective_coordinates(gmx_enfrotgrp* erg,
+static void sort_collective_coordinates(gmx_enfrotgrp* erg,
sort_along_vec_t* data) /* Buffer for sorting the positions */
{
/* The projection of the position vector on the rotation vector is
* \param beta Second parameter of gamma distribution
*/
explicit param_type(result_type alpha = 1.0, result_type beta = 1.0) :
- alpha_(alpha),
- beta_(beta)
+ alpha_(alpha), beta_(beta)
{
}
* \param stddev Standard deviation of normal distribution
*/
explicit param_type(result_type mean = 0.0, result_type stddev = 1.0) :
- mean_(mean),
- stddev_(stddev)
+ mean_(mean), stddev_(stddev)
{
}
* \param stddev Standard deviation of normal distribution
*/
explicit NormalDistribution(result_type mean = 0.0, result_type stddev = 1.0) :
- param_(param_type(mean, stddev)),
- hot_(false),
- saved_(0)
+ param_(param_type(mean, stddev)), hot_(false), saved_(0)
{
}
*
*/
explicit param_type(result_type mean = 0.0, result_type stddev = 1.0) :
- mean_(mean),
- stddev_(stddev)
+ mean_(mean), stddev_(stddev)
{
}
* \param stddev Standard deviation of tabulated normal distribution
*/
explicit TabulatedNormalDistribution(result_type mean = 0.0, result_type stddev = 1.0) :
- param_(param_type(mean, stddev)),
- savedRandomBits_(0),
- savedRandomBitsLeft_(0)
+ param_(param_type(mean, stddev)), savedRandomBits_(0), savedRandomBitsLeft_(0)
{
}
* \param param Parameter class containing mean and standard deviation.
*/
explicit TabulatedNormalDistribution(const param_type& param) :
- param_(param),
- savedRandomBits_(0),
- savedRandomBitsLeft_(0)
+ param_(param), savedRandomBits_(0), savedRandomBitsLeft_(0)
{
}
* \param b Upper end of range (inclusive)
*/
explicit param_type(result_type a = 0, result_type b = std::numeric_limits<result_type>::max()) :
- a_(a),
- b_(b)
+ a_(a), b_(b)
{
GMX_RELEASE_ASSERT(a <= b, "The uniform integer distribution requires a<=b");
}
*/
explicit UniformIntDistribution(result_type a = 0,
result_type b = std::numeric_limits<result_type>::max()) :
- param_(param_type(a, b)),
- savedRandomBits_(0),
- savedRandomBitsLeft_(0)
+ param_(param_type(a, b)), savedRandomBits_(0), savedRandomBitsLeft_(0)
{
}
* \param param Parameter class as defined inside gmx::UniformIntDistribution.
*/
explicit UniformIntDistribution(const param_type& param) :
- param_(param),
- savedRandomBits_(0),
- savedRandomBitsLeft_(0)
+ param_(param), savedRandomBits_(0), savedRandomBitsLeft_(0)
{
}
/*
* 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,2021, 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.
gmx::PotentialPointData evaluate(gmx::Vector gmx_unused r1,
gmx::Vector gmx_unused r2,
- double gmx_unused t) override
+ double gmx_unused t) override
{
return {};
}
*/
MindistAction(int* closestPoint, real* minDist2, rvec* dx) // NOLINT(readability-non-const-parameter)
:
- closestPoint_(*closestPoint),
- minDist2_(*minDist2),
- dx_(*dx)
+ closestPoint_(*closestPoint), minDist2_(*minDist2), dx_(*dx)
{
}
//! Copies the action.
* to methods that accept positions.
*/
AnalysisNeighborhoodPositions(const rvec& x) :
- count_(1),
- index_(-1),
- x_(&x),
- exclusionIds_(nullptr),
- indices_(nullptr)
+ count_(1), index_(-1), x_(&x), exclusionIds_(nullptr), indices_(nullptr)
{
}
/*! \brief
* Initializes positions from an array of position vectors.
*/
AnalysisNeighborhoodPositions(const rvec x[], int count) :
- count_(count),
- index_(-1),
- x_(x),
- exclusionIds_(nullptr),
- indices_(nullptr)
+ count_(count), index_(-1), x_(x), exclusionIds_(nullptr), indices_(nullptr)
{
}
/*! \brief
* Initializes positions from a vector of position vectors.
*/
AnalysisNeighborhoodPositions(const std::vector<RVec>& x) :
- count_(ssize(x)),
- index_(-1),
- x_(as_rvec_array(x.data())),
- exclusionIds_(nullptr),
- indices_(nullptr)
+ count_(ssize(x)), index_(-1), x_(as_rvec_array(x.data())), exclusionIds_(nullptr), indices_(nullptr)
{
}
AnalysisNeighborhoodPair() : refIndex_(-1), testIndex_(0), distance2_(0.0), dx_() {}
//! Initializes a pair object with the given data.
AnalysisNeighborhoodPair(int refIndex, int testIndex, real distance2, const rvec dx) :
- refIndex_(refIndex),
- testIndex_(testIndex),
- distance2_(distance2),
- dx_()
+ refIndex_(refIndex), testIndex_(testIndex), distance2_(distance2), dx_()
{
copy_rvec(dx, dx_);
}
*
* Copyright (c) 2009,2010,2011,2012,2013 by the GROMACS development team.
* Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
*/
SelectionParserValue::SelectionParserValue(e_selvalue_t type, const SelectionLocation& location) :
- type(type),
- location_(location)
+ type(type), location_(location)
{
memset(&u, 0, sizeof(u));
}
SelectionParserValue::SelectionParserValue(const SelectionTreeElementPointer& expr) :
- type(expr->v.type),
- expr(expr),
- location_(expr->location())
+ type(expr->v.type), expr(expr), location_(expr->location())
{
memset(&u, 0, sizeof(u));
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2009-2018, The GROMACS development team.
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2021, 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.
//! String value for \a type ::STR_VALUE.
std::string str;
//! The actual value if \a expr is NULL and \a type is not ::STR_VALUE.
- union {
+ union
+ {
//! The integer value/range (\a type ::INT_VALUE).
struct
{
// Default move constructor and assignment. Only needed for old compilers.
//! \cond
SelectionParserParameter(SelectionParserParameter&& o) noexcept :
- name_(std::move(o.name_)),
- location_(o.location_),
- values_(std::move(o.values_))
+ name_(std::move(o.name_)), location_(o.location_), values_(std::move(o.values_))
{
}
*
* Copyright (c) 2009,2010,2011,2012,2013 by the GROMACS development team.
* Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
*/
PositionCalculationCollection::Impl::Impl() :
- top_(nullptr),
- first_(nullptr),
- last_(nullptr),
- bInit_(false)
+ top_(nullptr), first_(nullptr), last_(nullptr), bInit_(false)
{
}
*/
SelectionCollection::Impl::Impl() :
- debugLevel_(DebugLevel::None),
- bExternalGroupsSet_(false),
- grps_(nullptr)
+ debugLevel_(DebugLevel::None), bExternalGroupsSet_(false), grps_(nullptr)
{
sc_.nvars = 0;
sc_.varstrs = nullptr;
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010,2012,2013,2014,2015 by the GROMACS development team.
- * Copyright (c) 2016,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018,2019,2020,2021, 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.
SelectionTopologyProperties() : needsTopology(false), needsMasses(false) {}
//! Initializes properties with the given flags.
SelectionTopologyProperties(bool needsTopology, bool needsMasses) :
- needsTopology(needsTopology),
- needsMasses(needsMasses)
+ needsTopology(needsTopology), needsMasses(needsMasses)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team.
- * Copyright (c) 2015,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2015,2018,2019,2020,2021, 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.
//! Initializes an option with the given name.
explicit SelectionOption(const char* name) :
- MyBase(name),
- defaultText_(""),
- selectionFlags_(efSelection_DisallowEmpty)
+ MyBase(name), defaultText_(""), selectionFlags_(efSelection_DisallowEmpty)
{
}
{
public:
Impl(SelectionCollection* selections, ITopologyProvider* topologyProvider) :
- selections_(*selections),
- topologyProvider_(*topologyProvider),
- manager_(selections),
- grps_(nullptr)
+ selections_(*selections), topologyProvider_(*topologyProvider), manager_(selections), grps_(nullptr)
{
}
~Impl()
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2009-2017, The GROMACS development team.
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2021, 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.
*/
int flags;
//! Data required by the evaluation function.
- union {
+ union
+ {
/*! \brief Index group data for several element types.
*
* - \ref SEL_CONST : if the value type is \ref GROUP_VALUE,
public:
//! Initialize help topic for the given selection method.
KeywordDetailsHelpTopic(const std::string& name, const gmx_ana_selmethod_t& method) :
- name_(name),
- method_(method)
+ name_(name), method_(method)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2009-2016, The GROMACS development team.
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2021, 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.
{
//! Initializes the context with given values.
SelMethodEvalContext(const gmx_mtop_t* top, t_trxframe* fr, const t_pbc* pbc) :
- top(top),
- fr(fr),
- pbc(pbc)
+ top(top), fr(fr), pbc(pbc)
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2014,2019, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2014,2019,2021, 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.
*/
int nr;
/** Pointer to the value. */
- union {
+ union
+ {
/*! \brief
* Generic pointer for operations that do not need type information.
*
*
* Copyright (c) 2009,2010,2011,2012,2013 by the GROMACS development team.
* Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
typedef struct
{
/** Value for each atom to match. */
- union {
+ union
+ {
int* i;
char** s;
void* ptr;
*/
int nas;
/** Values to match against. */
- union {
+ union
+ {
int* i;
char** s;
void* ptr;
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
struct RefPair
{
RefPair(int refIndex, real distance) :
- refIndex(refIndex),
- distance(distance),
- bFound(false),
- bExcluded(false),
- bIndexed(true)
+ refIndex(refIndex), distance(distance), bFound(false), bExcluded(false), bIndexed(true)
{
}
typedef std::vector<NeighborhoodSearchTestData::RefPair> RefPairList;
NeighborhoodSearchTestData::NeighborhoodSearchTestData(uint64_t seed, real cutoff) :
- rng_(seed),
- cutoff_(cutoff),
- refPosCount_(0)
+ rng_(seed), cutoff_(cutoff), refPosCount_(0)
{
clear_mat(box_);
set_pbc(&pbc_, PbcType::No, box_);
}
ExclusionsHelper::ExclusionsHelper(int refPosCount, int testPosCount) :
- refPosCount_(refPosCount),
- testPosCount_(testPosCount)
+ refPosCount_(refPosCount), testPosCount_(testPosCount)
{
// Generate an array of 0, 1, 2, ...
// TODO: Make the tests work also with non-trivial exclusion IDs,
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
struct PositionTest
{
PositionTest(PositionPointer pos, gmx_ana_poscalc_t* pc, const char* name) :
- pos(std::move(pos)),
- pc(pc),
- name(name)
+ pos(std::move(pos)), pc(pc), name(name)
{
}
const int32x4_t exponentMask = vdupq_n_s32(0x7F800000);
const int32x4_t mantissaMask = vdupq_n_s32(0x807FFFFF);
const int32x4_t exponentBias = vdupq_n_s32(126); // add 1 to make our definition identical to frexp()
- const float32x4_t half = vdupq_n_f32(0.5F);
+ const float32x4_t half = vdupq_n_f32(0.5F);
int32x4_t iExponent;
iExponent = vandq_s32(vreinterpretq_s32_f32(value.simdInternal_), exponentMask);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018,2019,2021, 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.
template<int align>
static inline void gmx_simdcall
- gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v0, SimdDouble* v1)
+gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v0, SimdDouble* v1)
{
float64x2_t t1, t2;
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
float64x2_t t0, t1, t2;
float64x1_t t3;
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
float64x2_t t0, t1, t2;
float64x1_t t3;
template<int align>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
+gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
{
alignas(GMX_SIMD_ALIGNMENT) std::int32_t ioffset[GMX_SIMD_DINT32_WIDTH];
template<int align>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
+gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
{
alignas(GMX_SIMD_ALIGNMENT) std::int32_t ioffset[GMX_SIMD_DINT32_WIDTH];
static inline double gmx_simdcall
- reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
+reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
{
float64x2_t t1, t2, t3, t4;
template<int align>
static inline void gmx_simdcall
- gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v0, SimdFloat* v1)
+gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v0, SimdFloat* v1)
{
assert(std::size_t(offset) % 16 == 0);
assert(std::size_t(base) % 8 == 0);
template<int align>
static inline void gmx_simdcall
- transposeScatterStoreU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterStoreU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
assert(std::size_t(offset) % 16 == 0);
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
assert(std::size_t(offset) % 16 == 0);
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
assert(std::size_t(offset) % 16 == 0);
template<int align>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
+gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
{
alignas(GMX_SIMD_ALIGNMENT) std::int32_t ioffset[GMX_SIMD_FINT32_WIDTH];
template<int align>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
+gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
{
alignas(GMX_SIMD_ALIGNMENT) std::int32_t ioffset[GMX_SIMD_FINT32_WIDTH];
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2020 Research Organization for Information Science and Technology (RIST).
- * Copyright (c) 2020, by the GROMACS development team, led by
+ * Copyright (c) 2020,2021, 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.
const svint32_t exponentMask = svdup_n_s32(0x7F800000);
const svint32_t mantissaMask = svdup_n_s32(0x807FFFFF);
const svint32_t exponentBias = svdup_n_s32(126); // add 1 to make our definition identical to frexp()
- const svfloat32_t half = svdup_n_f32(0.5f);
+ const svfloat32_t half = svdup_n_f32(0.5f);
svint32_t iExponent;
iExponent = svand_s32_x(pg, svreinterpret_s32_f32(value.simdInternal_), exponentMask);
template<int align>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
+gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
{
// Base pointer must be aligned to the smaller of 2 elements and float SIMD width
assert(std::size_t(base) % 8 == 0);
template<int align>
static inline void gmx_simdcall
- gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v0, SimdDouble* v1)
+gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v0, SimdDouble* v1)
{
assert(std::size_t(offset) % 64 == 0);
assert(std::size_t(base) % 8 == 0);
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
assert(std::size_t(offset) % 32 == 0);
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
assert(std::size_t(offset) % 16 == 0);
template<int align>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
+gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
{
svbool_t pg = svptrue_b64();
svint64_t offsets = svmul_n_s64_x(pg, offset.simdInternal_, align * sizeof(double));
}
static inline double gmx_simdcall
- reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
+reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
{
assert(std::size_t(m) % 16 == 0);
svbool_t pg = svptrue_b64();
template<int align>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
+gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
{
// Base pointer must be aligned to the smaller of 2 elements and float SIMD width
assert(std::size_t(base) % 8 == 0);
template<int align>
static inline void gmx_simdcall
- gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v0, SimdFloat* v1)
+gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v0, SimdFloat* v1)
{
assert(std::size_t(offset) % 64 == 0);
assert(std::size_t(base) % 8 == 0);
template<int align>
static inline void gmx_simdcall
- transposeScatterStoreU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterStoreU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
assert(std::size_t(offset) % 16 == 0);
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
assert(std::size_t(offset) % 64 == 0);
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
assert(std::size_t(offset) % 16 == 0);
template<int align>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
+gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
{
svbool_t pg = svptrue_b32();
svint32_t offsets = svmul_n_s32_x(pg, offset.simdInternal_, align * 4);
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
template<int align>
static inline void gmx_simdcall
- gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v0, SimdDouble* v1)
+gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v0, SimdDouble* v1)
{
__vector double t1, t2;
// gcc-4.9 fails to recognize that the argument to vec_extract() is used
template<int align>
-static inline void gmx_simdcall transposeScatterStoreU(double* base,
- const std::int32_t offset[],
- SimdDouble v0,
- SimdDouble v1,
+static inline void gmx_simdcall transposeScatterStoreU(double* base,
+ const std::int32_t offset[],
+ SimdDouble v0,
+ SimdDouble v1,
SimdDouble gmx_unused v2)
{
SimdDouble t1, t2;
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
if (align % 4 == 0)
{
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
if (align % 4 == 0)
{
template<int align>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
+gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
{
alignas(GMX_SIMD_ALIGNMENT) std::int32_t ioffset[GMX_SIMD_DINT32_WIDTH];
template<int align>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
+gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
{
alignas(GMX_SIMD_ALIGNMENT) std::int32_t ioffset[GMX_SIMD_DINT32_WIDTH];
}
static inline double gmx_simdcall
- reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
+reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
{
__vector double t1, t2, t3, t4;
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
template<int align>
static inline void gmx_simdcall
- gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v0, SimdFloat* v1)
+gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v0, SimdFloat* v1)
{
__vector float t0, t1, t2, t3;
// gcc-4.9 does not recognize that the argument to vec_extract() is used
template<int align>
-static inline void gmx_simdcall transposeScatterStoreU(float* base,
- const std::int32_t offset[],
- SimdFloat v0,
- SimdFloat v1,
+static inline void gmx_simdcall transposeScatterStoreU(float* base,
+ const std::int32_t offset[],
+ SimdFloat v0,
+ SimdFloat v1,
SimdFloat gmx_unused v2)
{
__vector float t1, t2;
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
if (align < 4)
{
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
if (align < 4)
{
template<int align>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
+gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
{
alignas(GMX_SIMD_ALIGNMENT) std::int32_t ioffset[GMX_SIMD_FINT32_WIDTH];
template<int align>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
+gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
{
alignas(GMX_SIMD_ALIGNMENT) std::int32_t ioffset[GMX_SIMD_FINT32_WIDTH];
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2019, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2019,2021, 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.
{
Simd4Double res;
- union {
+ union
+ {
double r;
std::int64_t i;
} conv1, conv2;
{
Simd4Double res;
- union {
+ union
+ {
double r;
std::int64_t i;
} conv1, conv2;
{
Simd4Double res;
- union {
+ union
+ {
double r;
std::int64_t i;
} conv1, conv2;
{
Simd4Double res;
- union {
+ union
+ {
double r;
std::int64_t i;
} conv1, conv2;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2019, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2019,2021, 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.
{
Simd4Float res;
- union {
+ union
+ {
float r;
std::int32_t i;
} conv1, conv2;
{
Simd4Float res;
- union {
+ union
+ {
float r;
std::int32_t i;
} conv1, conv2;
{
Simd4Float res;
- union {
+ union
+ {
float r;
std::int32_t i;
} conv1, conv2;
{
Simd4Float res;
- union {
+ union
+ {
float r;
std::int32_t i;
} conv1, conv2;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2019,2020,2021, 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.
{
SimdDouble res;
- union {
+ union
+ {
double r;
std::int64_t i;
} conv1, conv2;
{
SimdDouble res;
- union {
+ union
+ {
double r;
std::int64_t i;
} conv1, conv2;
{
SimdDouble res;
- union {
+ union
+ {
double r;
std::int64_t i;
} conv1, conv2;
{
SimdDouble res;
- union {
+ union
+ {
double r;
std::int64_t i;
} conv1, conv2;
for (std::size_t i = 0; i < res.simdInternal_.size(); i++)
{
- union {
+ union
+ {
std::uint64_t i;
double d;
} conv;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2019,2020,2021, 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.
{
SimdFloat res;
- union {
+ union
+ {
float r;
std::int32_t i;
} conv1, conv2;
{
SimdFloat res;
- union {
+ union
+ {
float r;
std::int32_t i;
} conv1, conv2;
{
SimdFloat res;
- union {
+ union
+ {
float r;
std::int32_t i;
} conv1, conv2;
{
SimdFloat res;
- union {
+ union
+ {
float r;
std::int32_t i;
} conv1, conv2;
for (std::size_t i = 0; i < res.simdInternal_.size(); i++)
{
- union {
+ union
+ {
std::uint32_t i;
float f;
} conv;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2019,2020,2021, 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.
*/
template<int align>
static inline void gmx_simdcall
- gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v0, SimdDouble* v1)
+gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v0, SimdDouble* v1)
{
// Offset list must be aligned for SIMD DINT32
assert(std::size_t(offset) % (GMX_SIMD_DINT32_WIDTH * sizeof(std::int32_t)) == 0);
*/
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
// Offset list must be aligned for SIMD DINT32
assert(std::size_t(offset) % (GMX_SIMD_DINT32_WIDTH * sizeof(std::int32_t)) == 0);
*/
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
// Offset list must be aligned for SIMD DINT32
assert(std::size_t(offset) % (GMX_SIMD_DINT32_WIDTH * sizeof(std::int32_t)) == 0);
*/
template<int align>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
+gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
{
for (std::size_t i = 0; i < v0->simdInternal_.size(); i++)
{
*/
template<int align>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
+gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
{
// Base pointer must be aligned to the smaller of 2 elements and double SIMD width
assert(std::size_t(base) % (std::min(GMX_SIMD_DOUBLE_WIDTH, 2) * sizeof(double)) == 0);
* just ignore the return value (Checked with gcc-4.9.1 and clang-3.6 for AVX).
*/
static inline double gmx_simdcall
- reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
+reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
{
double sum[4]; // Note that the 4 here corresponds to the 4 m-elements, not any SIMD width
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2019,2020,2021, 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.
*/
template<int align>
static inline void gmx_simdcall
- gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v0, SimdFloat* v1)
+gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v0, SimdFloat* v1)
{
// Offset list must be aligned for SIMD FINT32
assert(std::size_t(offset) % (GMX_SIMD_FINT32_WIDTH * sizeof(std::int32_t)) == 0);
*/
template<int align>
static inline void gmx_simdcall
- transposeScatterStoreU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterStoreU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
// Offset list must be aligned for SIMD FINT32
assert(std::size_t(offset) % (GMX_SIMD_FINT32_WIDTH * sizeof(std::int32_t)) == 0);
*/
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
// Offset list must be aligned for SIMD FINT32
assert(std::size_t(offset) % (GMX_SIMD_FINT32_WIDTH * sizeof(std::int32_t)) == 0);
*/
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
// Offset list must be aligned for SIMD FINT32
assert(std::size_t(offset) % (GMX_SIMD_FINT32_WIDTH * sizeof(std::int32_t)) == 0);
*/
template<int align>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
+gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
{
for (std::size_t i = 0; i < v0->simdInternal_.size(); i++)
{
*/
template<int align>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
+gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
{
// Base pointer must be aligned to the smaller of 2 elements and float SIMD width
assert(std::size_t(base) % (std::min(GMX_SIMD_FLOAT_WIDTH, 2) * sizeof(float)) == 0);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2019,2020,2021, 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.
template<MathOptimization opt = MathOptimization::Safe>
static inline SimdFloat gmx_simdcall frexp(SimdFloat value, SimdFInt32* exponent)
{
- const __m256 exponentMask = _mm256_castsi256_ps(_mm256_set1_epi32(0x7F800000));
- const __m256 mantissaMask = _mm256_castsi256_ps(_mm256_set1_epi32(0x807FFFFF));
+ const __m256 exponentMask = _mm256_castsi256_ps(_mm256_set1_epi32(0x7F800000));
+ const __m256 mantissaMask = _mm256_castsi256_ps(_mm256_set1_epi32(0x807FFFFF));
const __m256i exponentBias = _mm256_set1_epi32(126); // add 1 to make our definition identical to frexp()
- const __m256 half = _mm256_set1_ps(0.5);
+ const __m256 half = _mm256_set1_ps(0.5);
__m256i iExponent = _mm256_castps_si256(_mm256_and_ps(value.simdInternal_, exponentMask));
iExponent = _mm256_sub_epi32(_mm256_srli_epi32(iExponent, 23), exponentBias);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018,2019,2021, 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.
template<int align>
static inline void gmx_simdcall
- gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v0, SimdDouble* v1)
+gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v0, SimdDouble* v1)
{
__m128d t1, t2, t3, t4;
__m256d tA, tB;
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
__m256d t0, t1;
__m128d t2, tA, tB;
}
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
__m256d t0, t1;
__m128d t2, tA, tB;
template<int align>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
+gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
{
__m128d t1, t2, t3, t4;
__m256d tA, tB;
template<int align>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
+gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
{
__m128d t1, t2, t3, t4;
__m256d tA, tB;
}
static inline double gmx_simdcall
- reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
+reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
{
__m256d t0, t1, t2;
__m128d a0, a1;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018,2019,2020,2021, 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.
template<int align>
static inline void gmx_simdcall
- gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v0, SimdFloat* v1)
+gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v0, SimdFloat* v1)
{
__m128 t1, t2, t3, t4, t5, t6, t7, t8;
__m256 tA, tB, tC, tD;
template<int align>
static inline void gmx_simdcall
- transposeScatterStoreU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterStoreU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
__m256 tv3;
__m128i mask = _mm_set_epi32(0, -1, -1, -1);
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
__m256 t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
__m128 tA, tB, tC, tD, tE, tF, tG, tH, tX;
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
__m256 t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
__m128 tA, tB, tC, tD, tE, tF, tG, tH, tX;
template<int align>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 simdoffset, SimdFloat* v0, SimdFloat* v1)
+gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 simdoffset, SimdFloat* v0, SimdFloat* v1)
{
alignas(GMX_SIMD_ALIGNMENT) std::int32_t offset[GMX_SIMD_FLOAT_WIDTH];
_mm256_store_si256(reinterpret_cast<__m256i*>(offset), simdoffset.simdInternal_);
template<int align>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 simdoffset, SimdFloat* v0, SimdFloat* v1)
+gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 simdoffset, SimdFloat* v0, SimdFloat* v1)
{
__m128 t1, t2, t3, t4, t5, t6, t7, t8;
__m256 tA, tB, tC, tD;
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2014-2018, The GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
template<int align, typename... Targs>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v, Targs... Fargs)
+gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v, Targs... Fargs)
{
if (align > 1)
{
template<int align, typename... Targs>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v, Targs... Fargs)
+gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v, Targs... Fargs)
{
gatherLoadBySimdIntTranspose<align>(base, offset, v, Fargs...);
}
template<int align, typename... Targs>
static inline void gmx_simdcall
- gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v, Targs... Fargs)
+gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v, Targs... Fargs)
{
gatherLoadBySimdIntTranspose<align>(base, simdLoad(offset, SimdDInt32Tag()), v, Fargs...);
}
template<int align, typename... Targs>
static inline void gmx_simdcall
- gatherLoadUTranspose(const double* base, const std::int32_t offset[], SimdDouble* v, Targs... Fargs)
+gatherLoadUTranspose(const double* base, const std::int32_t offset[], SimdDouble* v, Targs... Fargs)
{
gatherLoadBySimdIntTranspose<align>(base, simdLoad(offset, SimdDInt32Tag()), v, Fargs...);
}
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
__m512d t[4], t5, t6, t7, t8;
alignas(GMX_SIMD_ALIGNMENT) std::int64_t o[8];
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
__m512d t[4], t5, t6, t7, t8;
alignas(GMX_SIMD_ALIGNMENT) std::int64_t o[8];
static inline double gmx_simdcall
- reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
+reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
{
__m512d t0, t2;
__m256d t3, t4;
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
template<int align, typename... Targs>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v, Targs... Fargs)
+gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v, Targs... Fargs)
{
// For align 1 or 2: No multiplication of offset is needed
if (align > 2)
template<int align, typename... Targs>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v, Targs... Fargs)
+gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v, Targs... Fargs)
{
gatherLoadBySimdIntTranspose<align>(base, offset, v, Fargs...);
}
template<int align, typename... Targs>
static inline void gmx_simdcall
- gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v, Targs... Fargs)
+gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v, Targs... Fargs)
{
gatherLoadBySimdIntTranspose<align>(base, simdLoad(offset, SimdFInt32Tag()), v, Fargs...);
}
template<int align, typename... Targs>
static inline void gmx_simdcall
- gatherLoadUTranspose(const float* base, const std::int32_t offset[], SimdFloat* v, Targs... Fargs)
+gatherLoadUTranspose(const float* base, const std::int32_t offset[], SimdFloat* v, Targs... Fargs)
{
gatherLoadBySimdIntTranspose<align>(base, simdLoad(offset, SimdFInt32Tag()), v, Fargs...);
}
template<int align>
static inline void gmx_simdcall
- transposeScatterStoreU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterStoreU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
SimdFInt32 simdoffset = simdLoad(offset, SimdFInt32Tag());
if (align > 2)
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
__m512 t[4], t5, t6, t7, t8;
int i;
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
__m512 t[4], t5, t6, t7, t8;
int i;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2019,2020,2021, 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.
const __m128d mantissaMask =
_mm_castsi128_pd(_mm_set_epi32(0x800FFFFF, 0xFFFFFFFF, 0x800FFFFF, 0xFFFFFFFF));
const __m128i exponentBias = _mm_set1_epi32(1022); // add 1 to make our definition identical to frexp()
- const __m128d half = _mm_set1_pd(0.5);
+ const __m128d half = _mm_set1_pd(0.5);
__m128i iExponent = _mm_castpd_si128(_mm_and_pd(value.simdInternal_, exponentMask));
iExponent = _mm_sub_epi32(_mm_srli_epi64(iExponent, 52), exponentBias);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2019,2020,2021, 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.
const __m128 exponentMask = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));
const __m128 mantissaMask = _mm_castsi128_ps(_mm_set1_epi32(0x807FFFFF));
const __m128i exponentBias = _mm_set1_epi32(126); // add 1 to make our definition identical to frexp()
- const __m128 half = _mm_set1_ps(0.5F);
+ const __m128 half = _mm_set1_ps(0.5F);
__m128i iExponent = _mm_castps_si128(_mm_and_ps(value.simdInternal_, exponentMask));
iExponent = _mm_sub_epi32(_mm_srli_epi32(iExponent, 23), exponentBias);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2019, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2019,2021, 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.
template<int align>
static inline void gmx_simdcall
- gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v0, SimdDouble* v1)
+gatherLoadTranspose(const double* base, const std::int32_t offset[], SimdDouble* v0, SimdDouble* v1)
{
__m128d t1, t2;
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterIncrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
__m128d t1, t2, t3, t4, t5, t6, t7;
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
+transposeScatterDecrU(double* base, const std::int32_t offset[], SimdDouble v0, SimdDouble v1, SimdDouble v2)
{
// This implementation is identical to the increment version, apart from using subtraction instead
__m128d t1, t2, t3, t4, t5, t6, t7;
template<int align>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
+gatherLoadBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
{
__m128d t1, t2;
template<int align>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
+gatherLoadUBySimdIntTranspose(const double* base, SimdDInt32 offset, SimdDouble* v0, SimdDouble* v1)
{
__m128d t1, t2;
// Use optimized bit-shift multiply for the most common alignments.
// Override for AVX-128-FMA and higher
#if GMX_SIMD_X86_SSE2 || GMX_SIMD_X86_SSE4_1
static inline double gmx_simdcall
- reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
+reduceIncr4ReturnSum(double* m, SimdDouble v0, SimdDouble v1, SimdDouble v2, SimdDouble v3)
{
__m128d t1, t2, t3, t4;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018,2019,2021, 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.
template<int align>
static inline void gmx_simdcall
- gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v0, SimdFloat* v1)
+gatherLoadTranspose(const float* base, const std::int32_t offset[], SimdFloat* v0, SimdFloat* v1)
{
__m128 t1, t2;
template<int align>
static inline void gmx_simdcall
- transposeScatterStoreU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterStoreU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
__m128 t1, t2;
template<int align>
static inline void gmx_simdcall
- transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterIncrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
__m128 t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
template<int align>
static inline void gmx_simdcall
- transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
+transposeScatterDecrU(float* base, const std::int32_t offset[], SimdFloat v0, SimdFloat v1, SimdFloat v2)
{
// This implementation is identical to the increment version, apart from using subtraction instead
__m128 t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
template<int align>
static inline void gmx_simdcall
- gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
+gatherLoadBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
{
// For present-generation x86 CPUs it appears to be faster to simply
// store the SIMD integer to memory and then use the normal load operations.
template<int align>
static inline void gmx_simdcall
- gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
+gatherLoadUBySimdIntTranspose(const float* base, SimdFInt32 offset, SimdFloat* v0, SimdFloat* v1)
{
// For present-generation x86 CPUs it appears to be faster to simply
// store the SIMD integer to memory and then use the normal load operations.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019,2020,2021, 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.
*/
static inline float andNot(float a, float b)
{
- union {
+ union
+ {
float r;
std::uint32_t i;
} conv1, conv2;
*/
static inline bool testBits(float a)
{
- union {
+ union
+ {
std::uint32_t i;
float f;
} conv;
*/
static inline double andNot(double a, double b)
{
- union {
+ union
+ {
double r;
std::uint64_t i;
} conv1, conv2;
*/
static inline bool testBits(double a)
{
- union {
+ union
+ {
std::uint64_t i;
double f;
} conv;
const int isieve = 0xFFFFF000;
alignas(GMX_SIMD_ALIGNMENT) float mem[GMX_SIMD_FLOAT_WIDTH];
- union {
+ union
+ {
float f;
int i;
} conv;
bool allOk;
size_t i;
- union {
+ union
+ {
#if GMX_DOUBLE
double r;
std::int64_t i;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018,2019,2021, 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.
*/
template<typename T, typename TSimd, int simdWidth>
void loadStoreTester(TSimd gmx_simdcall loadFn(const T* mem),
- void gmx_simdcall storeFn(T* mem, TSimd),
- const int loadOffset,
- const int storeOffset)
+ void gmx_simdcall storeFn(T* mem, TSimd),
+ const int loadOffset,
+ const int storeOffset)
{
/* We need simdWidth storage in the first place, another simdWidth elements
* so we can create (deliberately) offset un-aligned pointers, and finally
{
alignas(GMX_SIMD_ALIGNMENT) float f[GMX_SIMD_FLOAT_WIDTH];
alignas(GMX_SIMD_ALIGNMENT) double d[GMX_SIMD_FLOAT_WIDTH]; // Yes, double array length should be same as float
- int i;
- SimdFloat vf;
- SimdDouble vd0;
+ int i;
+ SimdFloat vf;
+ SimdDouble vd0;
FloatingPointTolerance tolerance(defaultRealTolerance());
// This fills elements for pd1 too when double width is 2*single width
MatchRule matchRule; //!< Decide what we consider a match
};
- ::testing::AssertionResult compareSimdMathFunction(const char* refFuncExpr,
- const char* simdFuncExpr,
- const char* compareSettingsExpr,
- real refFunc(real x),
+ ::testing::AssertionResult compareSimdMathFunction(const char* refFuncExpr,
+ const char* simdFuncExpr,
+ const char* compareSettingsExpr,
+ real refFunc(real x),
SimdReal gmx_simdcall simdFunc(SimdReal x),
const CompareSettings& compareSettings);
points--; // Used one point
}
- union {
+ union
+ {
real r;
std::conditional<sizeof(real) == sizeof(double), std::int64_t, std::int32_t>::type i;
} low, high, x;
real refValMaxUlpDiff, simdValMaxUlpDiff;
const int niter = s_nPoints / GMX_SIMD_REAL_WIDTH;
- union {
+ union
+ {
real r;
std::conditional<sizeof(real) == sizeof(double), std::int64_t, std::int32_t>::type i;
} conv0, conv1;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2013,2014,2015,2017,2019, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2019,2021, 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.
* \note The SIMD part is that we calculate many scalar products in one call.
*/
static inline SimdFloat gmx_simdcall
- iprod(SimdFloat ax, SimdFloat ay, SimdFloat az, SimdFloat bx, SimdFloat by, SimdFloat bz)
+iprod(SimdFloat ax, SimdFloat ay, SimdFloat az, SimdFloat bx, SimdFloat by, SimdFloat bz)
{
SimdFloat ret;
* \note The SIMD part is that we calculate many scalar products in one call.
*/
static inline SimdDouble gmx_simdcall
- iprod(SimdDouble ax, SimdDouble ay, SimdDouble az, SimdDouble bx, SimdDouble by, SimdDouble bz)
+iprod(SimdDouble ax, SimdDouble ay, SimdDouble az, SimdDouble bx, SimdDouble by, SimdDouble bz)
{
SimdDouble ret;
gmx::EnumerationArray<Compartment, t_compartment> comp; /**< Distribution of particles of this
group across the two compartments */
gmx::EnumerationArray<Compartment, real> vacancy; /**< How many molecules need to be swapped in? */
- gmx::EnumerationArray<Channel, int> fluxfromAtoB; /**< Net flux of ions per channel */
+ gmx::EnumerationArray<Channel, int> fluxfromAtoB; /**< Net flux of ions per channel */
gmx::EnumerationArray<Channel, int> nCyl; /**< Number of ions residing in a channel */
int nCylBoth = 0; /**< Ions assigned to cyl0 and cyl1. Not good. */
} t_swapgrp;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019,2020,2021, 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.
CubicSplineTable::CubicSplineTable(std::initializer_list<AnalyticalSplineTableInput> analyticalInputList,
const std::pair<real, real>& range,
real tolerance) :
- numFuncInTable_(analyticalInputList.size()),
- range_(range)
+ numFuncInTable_(analyticalInputList.size()), range_(range)
{
// Sanity check on input values
if (range_.first < 0.0 || (range_.second - range_.first) < 0.001)
CubicSplineTable::CubicSplineTable(std::initializer_list<NumericalSplineTableInput> numericalInputList,
const std::pair<real, real>& range,
real tolerance) :
- numFuncInTable_(numericalInputList.size()),
- range_(range)
+ numFuncInTable_(numericalInputList.size()), range_(range)
{
// Sanity check on input values
if (range.first < 0.0 || (range.second - range.first) < 0.001)
}
t_tabledata::t_tabledata(int n, int nx0, double tabscale, bool bAlloc) :
- nx(n),
- nx0(nx0),
- tabscale(tabscale)
+ nx(n), nx0(nx0), tabscale(tabscale)
{
if (bAlloc)
{
}
t_forcetable::t_forcetable(enum gmx_table_interaction interaction, enum gmx_table_format format) :
- interaction(interaction),
- format(format),
- r(0),
- n(0),
- scale(0),
- formatsize(0),
- ninteractions(0),
- stride(0)
+ interaction(interaction), format(format), r(0), n(0), scale(0), formatsize(0), ninteractions(0), stride(0)
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019,2020,2021, 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.
QuadraticSplineTable::QuadraticSplineTable(std::initializer_list<AnalyticalSplineTableInput> analyticalInputList,
const std::pair<real, real>& range,
real tolerance) :
- numFuncInTable_(analyticalInputList.size()),
- range_(range)
+ numFuncInTable_(analyticalInputList.size()), range_(range)
{
// Sanity check on input values
if (range_.first < 0.0 || (range_.second - range_.first) < 0.001)
QuadraticSplineTable::QuadraticSplineTable(std::initializer_list<NumericalSplineTableInput> numericalInputList,
const std::pair<real, real>& range,
real tolerance) :
- numFuncInTable_(numericalInputList.size()),
- range_(range)
+ numFuncInTable_(numericalInputList.size()), range_(range)
{
// Sanity check on input values
if (range.first < 0.0 || (range.second - range.first) < 0.001)
*
* Copyright (c) 1991-2006 David van der Spoel, Erik Lindahl, Berk Hess, University of Groningen.
* Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
&& defined(__x86_64__) && !defined(__ILP32__) && !defined(_CRAYC))
long gmx_unused tmp;
int cpuid1;
- int gmx_unused cpuid2;
- const int l0 = 0x0;
- const int l16 = 0x16;
- gmx_cycles_t cycles;
+ int gmx_unused cpuid2;
+ const int l0 = 0x0;
+ const int l16 = 0x16;
+ gmx_cycles_t cycles;
/* cpuid clobbers ebx but it must be restored for -fPIC so save
* then restore ebx */
{
//! Default constructor.
BaseEntry(const std::string& aName, const std::string& rName) :
- atomName(aName),
- residueName(rName),
- isAvailable(false),
- value(0.0)
+ atomName(aName), residueName(rName), isAvailable(false), value(0.0)
{
}
//! Name for atom.
}
InteractionDefinitions::InteractionDefinitions(const gmx_ffparams_t& ffparams) :
- iparams(ffparams.iparams),
- functype(ffparams.functype),
- cmap_grid(ffparams.cmap_grid)
+ iparams(ffparams.iparams), functype(ffparams.functype), cmap_grid(ffparams.cmap_grid)
{
}
struct gmx_ffparams_t;
-typedef union t_iparams {
+typedef union t_iparams
+{
/* Some parameters have A and B values for free energy calculations.
* The B values are not used for regular simulations of course.
* Free Energy for nonbondeds can be computed by changing the atom type.
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010,2013,2014,2015,2016 by the GROMACS development team.
- * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019,2020,2021, 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.
{
//! Default constructor creates complete object.
ResidueTypeEntry(const std::string& rName, const std::string& rType) :
- residueName(rName),
- residueType(rType)
+ residueName(rName), residueType(rType)
{
}
//! Name of the residue in the entry.
{
EnergyFrame::EnergyFrame(const t_enxframe& enxframe, const std::map<std::string, int>& indicesOfEnergyFields) :
- step_(enxframe.step),
- time_(enxframe.t)
+ step_(enxframe.step), time_(enxframe.t)
{
for (const auto& index : indicesOfEnergyFields)
{
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010,2011,2012,2014,2015 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
public:
//! Initializes the default values for the settings object.
Impl() :
- timeUnit(TimeUnit::Default),
- flags(0),
- frflags(0),
- bRmPBC(true),
- bPBC(true),
- optionsModuleSettings_(nullptr)
+ timeUnit(TimeUnit::Default), flags(0), frflags(0), bRmPBC(true), bPBC(true), optionsModuleSettings_(nullptr)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010-2018, The GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
{
public:
explicit RunnerModule(TrajectoryAnalysisModulePointer module) :
- module_(std::move(module)),
- common_(&settings_)
+ module_(std::move(module)), common_(&settings_)
{
}
* called, but values cannot be accessed.
*/
AnglePositionIterator(const SelectionList& selections, int posCountPerValue) :
- selections_(selections),
- posCountPerValue_(posCountPerValue),
- currentSelection_(0),
- nextPosition_(0)
+ selections_(selections), posCountPerValue_(posCountPerValue), currentSelection_(0), nextPosition_(0)
{
}
MsdCoordinateManager(const int numAtoms,
ArrayRef<const MoleculeData> molecules,
ArrayRef<const int> moleculeIndexMapping) :
- current_(numAtoms),
- previous_(numAtoms),
- molecules_(molecules),
- moleculeIndexMapping_(moleculeIndexMapping)
+ current_(numAtoms), previous_(numAtoms), molecules_(molecules), moleculeIndexMapping_(moleculeIndexMapping)
{
}
/*! \brief Prepares coordinates for the current frame.
};
Sasa::Sasa() :
- solsize_(0.14),
- ndots_(24),
- dgsDefault_(0),
- bIncludeSolute_(true),
- mtop_(nullptr),
- atoms_(nullptr)
+ solsize_(0.14), ndots_(24), dgsDefault_(0), bIncludeSolute_(true), mtop_(nullptr), atoms_(nullptr)
{
// minarea_ = 0.5;
registerAnalysisDataset(&area_, "area");
*/
IndexFileWriterModule::IndexFileWriterModule() :
- fp_(nullptr),
- currentGroup_(-1),
- currentSize_(0),
- bAnyWritten_(false)
+ fp_(nullptr), currentGroup_(-1), currentSize_(0), bAnyWritten_(false)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2012,2013,2014,2015,2017 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
};
AbstractTrajectoryAnalysisModuleTestFixture::Impl::Impl(AbstractTrajectoryAnalysisModuleTestFixture* parent) :
- parent_(*parent),
- bDatasetsIncluded_(false)
+ parent_(*parent), bDatasetsIncluded_(false)
{
}
{
public:
SurfaceAreaTest() :
- box_(),
- rng_(12345),
- area_(0.0),
- volume_(0.0),
- atomArea_(nullptr),
- dotCount_(0),
- dots_(nullptr)
+ box_(), rng_(12345), area_(0.0), volume_(0.0), atomArea_(nullptr), dotCount_(0), dots_(nullptr)
{
}
~SurfaceAreaTest() override
{
TopologyInformation::TopologyInformation() :
- hasLoadedMtop_(false),
- expandedTopology_(nullptr),
- atoms_(nullptr),
- bTop_(false),
- pbcType_(PbcType::Unset)
+ hasLoadedMtop_(false), expandedTopology_(nullptr), atoms_(nullptr), bTop_(false), pbcType_(PbcType::Unset)
{
}
}
//! \copydoc DataFileOptions(const char *)
DataFileOptions(const std::string& filename) :
- filename_(filename.c_str()),
- bCurrentDir_(true),
- bThrow_(true)
+ filename_(filename.c_str()), bCurrentDir_(true), bThrow_(true)
{
}
{
//! Initializes the structure with given values.
DataFileInfo(const std::string& dir, const std::string& name, bool bDefault) :
- dir(dir),
- name(name),
- bFromDefaultDir(bDefault)
+ dir(dir), name(name), bFromDefaultDir(bDefault)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010,2011,2014,2015,2016 by the GROMACS development team.
- * Copyright (c) 2017,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,2019,2020,2021, 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.
return new Impl(handle, finddata);
}
Impl(intptr_t handle, _finddata_t finddata) :
- windows_handle(handle),
- finddata(finddata),
- bFirst_(true)
+ windows_handle(handle), finddata(finddata), bFirst_(true)
{
}
~Impl() { _findclose(windows_handle); }
}
private:
- union {
+ union
+ {
char c[ValueSize];
T v;
} u;
template<typename T>
T swapEndian(const T& value)
{
- union {
+ union
+ {
T value_;
std::array<char, sizeof(T)> valueAsCharArray_;
} endianessSwappedValue;
{
public:
CompareHelper(TextWriter* writer, real ftol, real abstol) :
- writer_(writer),
- ftol_(ftol),
- abstol_(abstol)
+ writer_(writer), ftol_(ftol), abstol_(abstol)
{
}
void compareObjects(const KeyValueTreeObject& obj1, const KeyValueTreeObject& obj2)
{
public:
Impl(internal::KeyValueTreeTransformerImpl* impl, const KeyValueTreePath& prefix) :
- impl_(impl),
- prefix_(prefix)
+ impl_(impl), prefix_(prefix)
{
}
KeyValueTreeTransformRulesScoped::KeyValueTreeTransformRulesScoped(KeyValueTreeTransformRulesScoped&&) noexcept = default;
-KeyValueTreeTransformRulesScoped& KeyValueTreeTransformRulesScoped::
- operator=(KeyValueTreeTransformRulesScoped&&) noexcept = default;
+KeyValueTreeTransformRulesScoped&
+KeyValueTreeTransformRulesScoped::operator=(KeyValueTreeTransformRulesScoped&&) noexcept = default;
KeyValueTreeTransformRulesScoped::~KeyValueTreeTransformRulesScoped() {}
typedef std::map<std::string, Rule, StringCompare> ChildRuleMap;
explicit Rule(StringCompareType keyMatchType) :
- expectedType_(typeid(void)),
- childRules_(keyMatchType)
+ expectedType_(typeid(void)), childRules_(keyMatchType)
{
}
{
public:
explicit Transformer(IKeyValueTreeErrorHandler* errorHandler) :
- errorHandler_(errorHandler),
- backMapping_(new KeyValueTreeBackMapping)
+ errorHandler_(errorHandler), backMapping_(new KeyValueTreeBackMapping)
{
if (errorHandler_ == nullptr)
{
KeyValueTreeTransformRuleBuilder::KeyValueTreeTransformRuleBuilder(internal::KeyValueTreeTransformerImpl* impl,
const KeyValueTreePath& prefix) :
- impl_(impl),
- data_(new Data(prefix))
+ impl_(impl), data_(new Data(prefix))
{
}
typedef std::unique_ptr<IKeyValueTreeBackMapping> MappingPointer;
KeyValueTreeTransformResult(KeyValueTreeObject&& object, MappingPointer&& mapping) :
- object_(std::move(object)),
- mapping_(std::move(mapping))
+ object_(std::move(object)), mapping_(std::move(mapping))
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018,2019,2021, 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.
}
MDLogger::MDLogger() :
- warning(nullptr),
- error(nullptr),
- debug(nullptr),
- verboseDebug(nullptr),
- info(nullptr)
+ warning(nullptr), error(nullptr), debug(nullptr), verboseDebug(nullptr), info(nullptr)
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018,2019,2021, 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.
*/
LoggerOwner::LoggerOwner(std::unique_ptr<Impl> impl) :
- impl_(impl.release()),
- logger_(&impl_->logger_)
+ impl_(impl.release()), logger_(&impl_->logger_)
{
}
LoggerOwner::LoggerOwner(LoggerOwner&& other) noexcept :
- impl_(std::move(other.impl_)),
- logger_(&impl_->logger_)
+ impl_(std::move(other.impl_)), logger_(&impl_->logger_)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2011,2012,2013,2014,2015 by the GROMACS development team.
- * Copyright (c) 2016,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018,2019,2020,2021, 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.
struct NotFoundInfo
{
NotFoundInfo(const char* filename, const char* message, const char* call, bool wasError, int err) :
- filename(filename),
- message(message),
- call(call),
- wasError(wasError),
- err(err)
+ filename(filename), message(message), call(call), wasError(wasError), err(err)
{
}
/*
* 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,2021, 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.
StringInputStream::StringInputStream(const std::string& input) : input_(input), pos_(0) {}
StringInputStream::StringInputStream(const std::vector<std::string>& input) :
- input_(joinStrings(input.begin(), input.end(), "\n")),
- pos_(0)
+ input_(joinStrings(input.begin(), input.end(), "\n")), pos_(0)
{
input_.append("\n");
}
StringInputStream::StringInputStream(ArrayRef<const char* const> const& input) :
- input_(joinStrings(input.begin(), input.end(), "\n")),
- pos_(0)
+ input_(joinStrings(input.begin(), input.end(), "\n")), pos_(0)
{
input_.append("\n");
}
*/
TextLineWrapperSettings::TextLineWrapperSettings() :
- maxLength_(0),
- indent_(0),
- firstLineIndent_(-1),
- bKeepFinalSpaces_(false),
- continuationChar_('\0')
+ maxLength_(0), indent_(0), firstLineIndent_(-1), bKeepFinalSpaces_(false), continuationChar_('\0')
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
{
namespace
{
-union IntAndFloat32 {
+union IntAndFloat32
+{
std::int32_t int32Value_;
float floatValue_;
};
-union IntAndFloat64 {
+union IntAndFloat64
+{
std::int64_t int64Value_;
double doubleValue_;
};
//! Return the endianess-swapped integer used for testing, depending on the size of int.
constexpr int integerSizeDependentTestingValueEndianessSwapped()
{
- return sizeof(int) == 4 ? c_int32ValueSwapped
- : sizeof(int) == 8 ? c_int64ValueSwapped : c_int16ValueSwapped;
+ return sizeof(int) == 4 ? c_int32ValueSwapped
+ : sizeof(int) == 8 ? c_int64ValueSwapped
+ : c_int16ValueSwapped;
}
class InMemorySerializerTest : public ::testing::Test
/*
* 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,2021, 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.
{
public:
explicit Impl(const TextOutputStreamPointer& stream) :
- stream_(stream),
- newLineCount_(2),
- currentLineLength_(0),
- pendingNewLine_(false)
+ stream_(stream), newLineCount_(2), currentLineLength_(0), pendingNewLine_(false)
{
wrapper_.settings().setKeepFinalSpaces(true);
}
EnergyComparison::EnergyComparison(const EnergyTermsToCompare& energyTermsToCompare,
MaxNumFrames maxNumFrames) :
- energyTermsToCompare_(energyTermsToCompare),
- maxNumFrames_(maxNumFrames)
+ energyTermsToCompare_(energyTermsToCompare), maxNumFrames_(maxNumFrames)
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018,2019,2021, 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.
typedef std::unique_ptr<FrameReader> FrameReaderPtr;
//! Constructor
FramePairManager(FrameReaderPtr first, FrameReaderPtr second) :
- first_(std::move(first)),
- second_(std::move(second))
+ first_(std::move(first)), second_(std::move(second))
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2020, by the GROMACS development team, led by
+ * Copyright (c) 2020,2021, 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.
const int nstfout = 2 * numSteps;
auto refMdpOptions = sharedMdpOptions
+ gmx::formatString(
- "mts = no\n"
- "nstcalcenergy = %d\n"
- "nstenergy = %d\n"
- "nstxout = 0\n"
- "nstvout = 0\n"
- "nstfout = %d\n",
- numSteps,
- numSteps,
- nstfout);
+ "mts = no\n"
+ "nstcalcenergy = %d\n"
+ "nstenergy = %d\n"
+ "nstxout = 0\n"
+ "nstvout = 0\n"
+ "nstfout = %d\n",
+ numSteps,
+ numSteps,
+ nstfout);
auto mtsMdpOptions = sharedMdpOptions
+ gmx::formatString(
- "mts = yes\n"
- "mts-levels = 2\n"
- "mts-level2-forces = %s\n"
- "mts-level2-factor = 2\n"
- "nstcalcenergy = %d\n"
- "nstenergy = %d\n"
- "nstxout = 0\n"
- "nstvout = 0\n"
- "nstfout = %d\n",
- mtsScheme.c_str(),
- numSteps,
- numSteps,
- nstfout);
+ "mts = yes\n"
+ "mts-levels = 2\n"
+ "mts-level2-forces = %s\n"
+ "mts-level2-factor = 2\n"
+ "nstcalcenergy = %d\n"
+ "nstenergy = %d\n"
+ "nstxout = 0\n"
+ "nstvout = 0\n"
+ "nstfout = %d\n",
+ mtsScheme.c_str(),
+ numSteps,
+ numSteps,
+ nstfout);
// At step 0 the energy and virial should only differ due to rounding errors
EnergyTermsToCompare energyTermsToCompareStep0 = energyTermsToCompare(0.001, 0.01);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018,2019,2021, 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.
TerminationHelper::TerminationHelper(TestFileManager* fileManager,
CommandLine* mdrunCaller,
SimulationRunner* runner) :
- mdrunCaller_(mdrunCaller),
- runner_(runner)
+ mdrunCaller_(mdrunCaller), runner_(runner)
{
runner_->cptFileName_ = fileManager->getTemporaryFilePath(".cpt");
runner_->useTopGroAndNdxFromDatabase("spc2");
TrajectoryComparison::TrajectoryComparison(const TrajectoryFrameMatchSettings& matchSettings,
const TrajectoryTolerances& tolerances) :
- matchSettings_(matchSettings),
- tolerances_(tolerances)
+ matchSettings_(matchSettings), tolerances_(tolerances)
{
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2019, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2019,2021, 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.
char * set, *get, *help;
edlgitem type;
int (*WndProc)(t_x11* x11, struct t_dlgitem* dlgitem, XEvent* event);
- union {
+ union
+ {
t_button button;
t_radiobutton radiobutton;
t_groupbox groupbox;
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
- * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019,2020,2021, 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.
struct OutputFileInfo
{
OutputFileInfo(const char* option, const std::string& path, FileMatcherPointer matcher) :
- option(option),
- path(path),
- matcher(move(matcher))
+ option(option), path(path), matcher(move(matcher))
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019,2020,2021, 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.
{
public:
explicit Impl(TestReferenceChecker checker) :
- checker_(std::move(checker)),
- bLastNewline_(true),
- currentLine_(0),
- bHasOutput_(false)
+ checker_(std::move(checker)), bLastNewline_(true), currentLine_(0), bHasOutput_(false)
{
using ::testing::_;
using ::testing::Invoke;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2013,2014,2015,2016,2019, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2019,2021, 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.
{
public:
MPIEventForward(TestEventListener* defaultPrinter, int rank, int size) :
- defaultPrinter_(defaultPrinter),
- rank_(rank),
- size_(size)
+ defaultPrinter_(defaultPrinter), rank_(rank), size_(size)
{
}
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2011-2018, The GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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.
{
TestReferenceDataImpl::TestReferenceDataImpl(ReferenceDataMode mode, bool bSelfTestMode) :
- updateMismatchingEntries_(false),
- bSelfTestMode_(bSelfTestMode),
- bInUse_(false)
+ updateMismatchingEntries_(false), bSelfTestMode_(bSelfTestMode), bInUse_(false)
{
- const std::string dirname = bSelfTestMode ? TestFileManager::getGlobalOutputTempDirectory()
- : TestFileManager::getInputDataDirectory();
+ const std::string dirname = bSelfTestMode ? TestFileManager::getGlobalOutputTempDirectory()
+ : TestFileManager::getInputDataDirectory();
const std::string filename = TestFileManager::getTestSpecificFileName(".xml");
fullFilename_ = Path::join(dirname, "refdata", filename);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019,2020,2021, 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.
{
public:
FloatingPointChecker(FloatType value, const FloatingPointTolerance& tolerance) :
- value_(value),
- tolerance_(tolerance)
+ value_(value), tolerance_(tolerance)
{
}
{
public:
FloatingPointFromStringChecker(const std::string& value, const FloatingPointTolerance& tolerance) :
- value_(value),
- tolerance_(tolerance)
+ value_(value), tolerance_(tolerance)
{
}
* \param[in] context Current \Gromacs program context.
*/
explicit TestProgramContext(const IProgramContext& context) :
- context_(context),
- dataPath_(CMAKE_SOURCE_DIR)
+ context_(context), dataPath_(CMAKE_SOURCE_DIR)
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2019,2020,2021, 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.
{
public:
explicit InteractiveSession(ReferenceDataMode mode) :
- data_(mode),
- helper_(data_.rootChecker()),
- nextInputLine_(0)
+ data_(mode), helper_(data_.rootChecker()), nextInputLine_(0)
{
}