# Order (or more generally, edge selection) is significant (see gmxtree.md);
# "moduleA -> moduleB" means that moduleA should not depend on moduleB, and is
# a problem to be addressed at some point.
-compat -> utility
domdec -> imd
domdec -> ewald
domdec -> mdlib
CheckOptions:
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: 1
- - key: modernize-make-unique.MakeSmartPtrFunction
- value: gmx::compat::make_unique
- - key: modernize-make-unique.MakeSmartPtrFunctionHeader
- value: gromacs/compat/make_unique.h
- key: modernize-make-unique.IncludeStyle
value: google
- key: modernize-make-shared.IncludeStyle
CheckOptions:
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: 1
- - key: modernize-make-unique.MakeSmartPtrFunction
- value: gmx::compat::make_unique
- - key: modernize-make-unique.MakeSmartPtrFunctionHeader
- value: gromacs/compat/make_unique.h
- key: modernize-make-unique.IncludeStyle
value: google
- key: modernize-make-shared.IncludeStyle
#include "gromacs/commandline/pargs.h"
#include "gromacs/commandline/filenm.h"
#include "gromacs/commandline/pargs.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/mdlib/stophandler.h"
#include "gromacs/mdrun/logging.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
*
* # With `system` as a gmxapi::System object
* auto spec = system->getSpec();
- * auto holder = gmx::compat::make_unique<gmxapi::MDHolder>(spec);
+ * auto holder = std::make_unique<gmxapi::MDHolder>(spec);
*
* A PyCapsule object with the name given by gmxapi::MDHolder_Name is assumed to
* contain a pointer to an MDHolder and to have an appropriate deleter attached.
#include <memory>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/utility/keyvaluetree.h"
//! \endcond
MDWorkSpec::MDWorkSpec() :
- impl_ {gmx::compat::make_unique<Impl>()}
+ impl_ {std::make_unique<Impl>()}
{
GMX_ASSERT(impl_, "Expected non-null implementation object.");
}
#include <atomic>
-#include "gromacs/compat/make_unique.h"
+#include <memory>
#include "gromacs/mdlib/simulationsignal.h"
#include "gromacs/mdrun/runner.h"
#include "gromacs/utility/gmxassert.h"
throw gmxapi::NotImplementedError("This signaller only handles stop signals.");
}
- auto signalImpl = gmx::compat::make_unique<LogicalAND>(this, name);
+ auto signalImpl = std::make_unique<LogicalAND>(this, name);
auto functor = Signal(std::move(signalImpl));
return functor;
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
#include <atomic>
#include <functional>
-#include "gromacs/compat/make_unique.h"
+#include <memory>
#include "gromacs/mdlib/simulationsignal.h"
#include "gromacs/mdlib/stophandler.h"
#include "gromacs/mdrun/runner.h"
#include "gmxapi/session.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
#include "gromacs/gmxlib/network.h"
#include "gromacs/mdlib/sighandler.h"
#include "gromacs/mdrun/logging.h"
{
// We should be able to get a communicator (or subcommunicator) through the
// Context.
- return gmx::compat::make_unique<SessionImpl>(std::move(context),
- std::move(runnerBuilder),
- simulationContext,
- std::move(logFilehandle),
- multiSim);
+ return std::make_unique<SessionImpl>(std::move(context),
+ std::move(runnerBuilder),
+ simulationContext,
+ std::move(logFilehandle),
+ multiSim);
}
SessionImpl::SessionImpl(std::shared_ptr<ContextImpl> context,
gmx::LogFilePtr fplog,
gmx_multisim_t * multiSim) :
context_(std::move(context)),
- mpiContextManager_(gmx::compat::make_unique<MpiContextManager>()),
+ mpiContextManager_(std::make_unique<MpiContextManager>()),
simulationContext_(simulationContext),
logFilePtr_(std::move(fplog)),
multiSim_(multiSim)
// \todo Session objects can have logic specialized for the runtime environment.
- auto stopHandlerBuilder = gmx::compat::make_unique<gmx::StopHandlerBuilder>();
- signalManager_ = gmx::compat::make_unique<SignalManager>(stopHandlerBuilder.get());
+ auto stopHandlerBuilder = std::make_unique<gmx::StopHandlerBuilder>();
+ signalManager_ = std::make_unique<SignalManager>(stopHandlerBuilder.get());
GMX_ASSERT(signalManager_, "SessionImpl invariant includes a valid SignalManager.");
runnerBuilder.addStopHandlerBuilder(std::move(stopHandlerBuilder));
- runner_ = gmx::compat::make_unique<gmx::Mdrunner>(runnerBuilder.build());
+ runner_ = std::make_unique<gmx::Mdrunner>(runnerBuilder.build());
GMX_ASSERT(runner_, "SessionImpl invariant implies valid Mdrunner handle.");
// For the libgromacs context, a session should explicitly reset global variables that could
const auto &name = module->name();
if (resources_.find(name) == resources_.end())
{
- auto resourcesInstance = gmx::compat::make_unique<SessionResources>(this, name);
+ auto resourcesInstance = std::make_unique<SessionResources>(this, name);
resources_.emplace(std::make_pair(name, std::move(resourcesInstance)));
resources = resources_.at(name).get();
// To do: This should be more dynamic.
#include "gmxapi/status.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
namespace gmxapi
{
/// \endcond
Status::Status() :
- impl_ {gmx::compat::make_unique<Status::Impl>()}
+ impl_ {std::make_unique<Status::Impl>()}
{}
Status::Status(const Status &status)
{
- impl_ = gmx::compat::make_unique<Impl>(status.success());
+ impl_ = std::make_unique<Impl>(status.success());
}
Status &Status::operator=(const Status &status)
{
- this->impl_ = gmx::compat::make_unique<Impl>(status.success());
+ this->impl_ = std::make_unique<Impl>(status.success());
return *this;
}
Status &Status::operator=(bool success)
{
- this->impl_ = gmx::compat::make_unique<Impl>(success);
+ this->impl_ = std::make_unique<Impl>(success);
return *this;
}
Status::Status(Status &&) noexcept = default;
Status::Status(bool success) :
- impl_ {gmx::compat::make_unique<Status::Impl>(success)}
+ impl_ {std::make_unique<Status::Impl>(success)}
{}
bool Status::success() const
#include <array>
#include "gromacs/utility.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
#include "gromacs/mdrun/runner.h"
#include "gmxapi/context.h"
// This may produce errors or throw exceptions in the future, but as of
// 0.0.3 only memory allocation errors are possible, and we do not have a
// plan for how to recover from them.
- auto systemImpl = gmx::compat::make_unique<System::Impl>(std::move(workflow));
+ auto systemImpl = std::make_unique<System::Impl>(std::move(workflow));
GMX_ASSERT(systemImpl, "Could not create a valid implementation object.");
auto system = System(std::move(systemImpl));
#include <memory>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/utility/gmxassert.h"
#include "workflow-impl.h"
{
GMX_ASSERT(!tprfilename_.empty(), "Need a non-empty filename string.");
std::unique_ptr<NodeSpecification> node = nullptr;
- node = gmx::compat::make_unique<MDNodeSpecification>(tprfilename_);
+ node = std::make_unique<MDNodeSpecification>(tprfilename_);
return node;
}
std::unique_ptr<Workflow> Workflow::create(const std::string &filename)
{
const std::string name = "MD";
- auto spec = gmx::compat::make_unique<MDNodeSpecification>(filename);
+ auto spec = std::make_unique<MDNodeSpecification>(filename);
Workflow::Impl graph;
graph.emplace(std::make_pair(name, std::move(spec)));
- auto workflow = gmx::compat::make_unique<Workflow>(std::move(graph));
+ auto workflow = std::make_unique<Workflow>(std::move(graph));
return workflow;
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
#include "api/cpp/include/gmxapi/status.h"
#include "api/cpp/include/gmxapi/system.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/utility/arrayref.h"
#include "api/cpp/tests/testingconfiguration.h"
{
makeTprFile(100);
// Create work spec
- auto node = gmx::compat::make_unique<gmxapi::MDNodeSpecification>(runner_.tprFileName_);
+ auto node = std::make_unique<gmxapi::MDNodeSpecification>(runner_.tprFileName_);
EXPECT_NE(node, nullptr);
// Create key
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, 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.
#include "gromacs/analysisdata/dataframe.h"
#include "gromacs/analysisdata/datamodulemanager.h"
#include "gromacs/analysisdata/paralleloptions.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
frames_.reserve(newSize);
while (frames_.size() < newSize)
{
- frames_.push_back(compat::make_unique<AnalysisDataStorageFrameData>(this, nextIndex_));
+ frames_.push_back(std::make_unique<AnalysisDataStorageFrameData>(this, nextIndex_));
++nextIndex_;
}
// The unused frame should not be included in the count.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, 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_THROW(InvalidInputError("AWH biasing does not support shell particles."));
}
- auto awh = compat::make_unique<Awh>(fplog, inputRecord, commRecord, multiSimRecord, *inputRecord.awhParams,
- biasInitFilename, pull_work);
+ auto awh = std::make_unique<Awh>(fplog, inputRecord, commRecord, multiSimRecord, *inputRecord.awhParams,
+ biasInitFilename, pull_work);
if (startingFromCheckpoint)
{
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, 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.
#include <cstring>
#include <algorithm>
+#include <memory>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/math/functions.h"
double blockLength = 0;
/* Construct the force correlation object. */
forceCorrelationGrid_ =
- compat::make_unique<CorrelationGrid>(state_.points().size(), ndim(),
- blockLength, CorrelationGrid::BlockLengthMeasure::Time,
- awhParams.nstSampleCoord*mdTimeStep);
+ std::make_unique<CorrelationGrid>(state_.points().size(), ndim(),
+ blockLength, CorrelationGrid::BlockLengthMeasure::Time,
+ awhParams.nstSampleCoord*mdTimeStep);
- writer_ = compat::make_unique<BiasWriter>(*this);
+ writer_ = std::make_unique<BiasWriter>(*this);
}
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, 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.
#include <memory>
#include <vector>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/utility/alignedallocator.h"
#include "gromacs/utility/basedefinitions.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019, 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.
#include "gromacs/awh/correlationgrid.h"
#include "gromacs/awh/pointstate.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/mdtypes/awh-params.h"
#include "gromacs/utility/stringutil.h"
int numSamples = coordinates_.size() - 1; // No sample taken at step 0
GMX_RELEASE_ASSERT(numSamples % params.awhParams.numSamplesUpdateFreeEnergy == 0, "This test is intended to reproduce the situation when the might need to write output during a normal AWH run, therefore the number of samples should be a multiple of the free-energy update interval (but the test should also runs fine without this condition).");
- bias_ = gmx::compat::make_unique<Bias>(-1, params.awhParams, params.awhBiasParams, params.dimParams, params.beta, mdTimeStep, 1, "", Bias::ThisRankWillDoIO::No, disableUpdateSkips);
+ bias_ = std::make_unique<Bias>(-1, params.awhParams, params.awhBiasParams, params.dimParams, params.beta, mdTimeStep, 1, "", Bias::ThisRankWillDoIO::No, disableUpdateSkips);
}
};
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019, 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.
#include "gromacs/awh/grid.h"
#include "gromacs/awh/pointstate.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/math/functions.h"
#include "gromacs/mdtypes/awh-params.h"
#include "gromacs/utility/smalloc.h"
dimParams.emplace_back(1.0, 15.0, params.beta);
Grid grid(dimParams, awhBiasParams.dimParams);
BiasParams biasParams(awhParams, awhBiasParams, dimParams, 1.0, 1.0, BiasParams::DisableUpdateSkips::no, 1, grid.axis(), 0);
- biasState_ = gmx::compat::make_unique<BiasState>(awhBiasParams, 1.0, dimParams, grid);
+ biasState_ = std::make_unique<BiasState>(awhBiasParams, 1.0, dimParams, grid);
// Here we initialize the grid point state using the input file
std::string filename = gmx::test::TestFileManager::getInputFilePath(GetParam());
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, 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.
#include "gromacs/commandline/cmdlinehelpcontext.h"
#include "gromacs/commandline/cmdlinehelpwriter.h"
#include "gromacs/commandline/cmdlineparser.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/onlinehelp/helpformat.h"
#include "gromacs/onlinehelp/helpmanager.h"
#include "gromacs/onlinehelp/helptopic.h"
void HelpExportReStructuredText::startModuleExport()
{
- indexFile_ = compat::make_unique<TextWriter>(
+ indexFile_ = std::make_unique<TextWriter>(
outputRedirector_->openTextOutputFile("fragments/byname.rst"));
indexFile_->writeLine(formatString("* :doc:`%s </onlinehelp/%s>` - %s",
binaryName_.c_str(), binaryName_.c_str(),
RootHelpText::title));
- manPagesFile_ = compat::make_unique<TextWriter>(
+ manPagesFile_ = std::make_unique<TextWriter>(
outputRedirector_->openTextOutputFile("conf-man.py"));
manPagesFile_->writeLine("man_pages = [");
}
void HelpExportReStructuredText::startModuleGroupExport()
{
- indexFile_ = compat::make_unique<TextWriter>(
+ indexFile_ = std::make_unique<TextWriter>(
outputRedirector_->openTextOutputFile("fragments/bytopic.rst"));
- manPagesFile_ = compat::make_unique<TextWriter>(
+ manPagesFile_ = std::make_unique<TextWriter>(
outputRedirector_->openTextOutputFile("fragments/bytopic-man.rst"));
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018,2019, 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.
#include "gromacs/commandline/cmdlinemodulemanager.h"
#include "gromacs/commandline/cmdlineoptionsmodule.h"
#include "gromacs/commandline/cmdlineprogramcontext.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/utility/basenetwork.h"
#include "gromacs/utility/datafilefinder.h"
#include "gromacs/utility/exceptions.h"
broadcastArguments(argc, argv);
try
{
- g_commandLineContext = compat::make_unique<CommandLineProgramContext>(*argc, *argv);
+ g_commandLineContext = std::make_unique<CommandLineProgramContext>(*argc, *argv);
setProgramContext(g_commandLineContext.get());
- g_libFileFinder = compat::make_unique<DataFileFinder>();
+ g_libFileFinder = std::make_unique<DataFileFinder>();
g_libFileFinder->setSearchPathFromEnv("GMXLIB");
setLibraryFileFinder(g_libFileFinder.get());
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
#include "gromacs/commandline/cmdlinehelpcontext.h"
#include "gromacs/commandline/pargs.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/fileio/filetypes.h"
#include "gromacs/options/basicoptions.h"
#include "gromacs/options/filenameoption.h"
void ShellCompletionWriter::startCompletions()
{
- impl_->file_ = compat::make_unique<TextWriter>(impl_->binaryName_ + "-completion.bash");
+ impl_->file_ = std::make_unique<TextWriter>(impl_->binaryName_ + "-completion.bash");
}
void ShellCompletionWriter::writeModuleCompletions(
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2018, by the GROMACS development team, led by
+# Copyright (c) 2018,2019, 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.
# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
-gmx_install_headers(make_unique.h)
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
+++ /dev/null
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 2017,2018, 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.
- *
- * GROMACS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * GROMACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GROMACS; if not, see
- * http://www.gnu.org/licenses, or write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * If you want to redistribute modifications to GROMACS, please
- * consider that scientific software is very special. Version
- * control is crucial - bugs must be traceable. We will be happy to
- * consider code for inclusion in the official distribution, but
- * derived work must not be called official GROMACS. Details are found
- * in the README & COPYING files - if they are missing, get the
- * official version at http://www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org.
- */
-#ifndef GMX_COMPAT_MAKE_UNIQUE_H
-#define GMX_COMPAT_MAKE_UNIQUE_H
-/*! \libinternal
- * \defgroup module_compat C++ "standard" library compatibility helpers.
- *
- * \brief Provide uniform interface to selected C++ standard and
- * popular library features.
- *
- * For some features not available on all platforms supported by
- * \Gromacs, provides back-ports or mappings to available standard
- * library implementations as appropriate.
- *
- * Backported implementations of features from newer C++ standards, or
- * from community libraries such as Abseil or the Guidelines Support
- * Library may also be considered for inclusion here. We generally
- * expect that features included here are either already standard,
- * proposed for the standard, or so useful in solving a frequently
- * occuring problem that their use is not controversial.
- */
-
-/*!
- * \file
- * \brief Provides template gmx::compat::make_unique
- *
- * The implementation of gmx::compat::make_unique is copied with little
- * modification from C++ standardization doc N3656
- * at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3656.htm
- * though additional wrapping has been added for use in \Gromacs.
- *
- * \author M. Eric Irrgang <ericirrgang@gmail.com>
- * \ingroup module_compat
- * \inlibraryapi
- */
-/*! \addtogroup module_compat
- * ### gmx::compat::make_unique
- *
- * Provide a trivially adapted implementation of the C++ standard library `make_unique` function template.
- * When All supported \Gromacs build platforms provide `std::make_unique`, this should be removed.
- *
- */
-#include <cstddef>
-
-#include <memory>
-#include <type_traits>
-#include <utility>
-
-namespace gmx
-{
-namespace compat
-{
-
-///\cond
-
-// All gmx::compat code should use std::unique_ptr
-using ::std::unique_ptr;
-
-template<class T> struct Unique_if {
- typedef unique_ptr<T> Single_object;
-};
-
-template<class T> struct Unique_if<T[]> {
- typedef unique_ptr<T[]> Unknown_bound;
-};
-
-template<class T, size_t N> struct Unique_if<T[N]> {
- typedef void Known_bound;
-};
-
-template<class T, class ... Args>
-typename Unique_if<T>::Single_object
-make_unique(Args && ... args)
-{
- return unique_ptr<T>(new T(::std::forward<Args>(args) ...));
-}
-
-template<class T>
-typename Unique_if<T>::Unknown_bound
-make_unique(size_t n)
-{
- typedef typename ::std::remove_extent<T>::type U;
- return unique_ptr<T>(new U[n]());
-}
-
-template<class T, class ... Args>
-typename Unique_if<T>::Known_bound
-make_unique(Args && ...) = delete;
-
-///\endcond
-
-} // namespace compat
-} // namespace gmx
-
-#endif // header guard
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019, 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.
* the research papers on the package. Check out http://www.gromacs.org.
*/
/*! \internal \file
- * \brief Tests for gmx::compat::make_unique
+ * \brief Tests for std::make_unique
*
* \author M. Eric Irrgang <ericirrgang@gmail.com>
* \ingroup module_compat
*/
#include "gmxpre.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
#include <gtest/gtest.h>
TEST(CompatibilityHelper, MakeUniqueCompiles)
{
// Check template parameters
- auto ptr = gmx::compat::make_unique<dummy>();
+ auto ptr = std::make_unique<dummy>();
ASSERT_NE(ptr, nullptr);
ASSERT_NE(ptr.get(), nullptr);
constexpr bool is_dummy = std::is_same < decltype(ptr), std::unique_ptr < dummy>>::value;
ASSERT_TRUE(is_dummy);
// Check template and function parameters
- ptr = gmx::compat::make_unique<dummy>('a', 'b');
+ ptr = std::make_unique<dummy>('a', 'b');
ASSERT_EQ(ptr->foo, 'a');
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018,2019, 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.
#include <gtest/gtest.h>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/correlationfunctions/expfit.h"
#include "gromacs/fft/fft.h"
#include "gromacs/utility/gmxassert.h"
{
int n = 0;
std::string fileName = "testCOS3.xvg";
- data_ = gmx::compat::make_unique<CorrelationDataSet>(fileName);
+ data_ = std::make_unique<CorrelationDataSet>(fileName);
nrFrames_ = data_->getNrLines();
tempArgs_ = add_acf_pargs(&n, nullptr);
}
#include <cstring>
#include <algorithm>
+#include <memory>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/collect.h"
#include "gromacs/domdec/dlb.h"
#include "gromacs/domdec/dlbtiming.h"
if (dd->ci[dim] == dd->master_ci[dim])
{
/* This is the root process of this row */
- cellsizes.rowMaster = gmx::compat::make_unique<RowMaster>();
+ cellsizes.rowMaster = std::make_unique<RowMaster>();
RowMaster &rowMaster = *cellsizes.rowMaster;
rowMaster.cellFrac.resize(ddCellFractionBufferSize(dd, dim_ind));
/* We can not use DDMASTER(dd), because dd->masterrank is set later */
if (MASTER(cr))
{
- dd->ma = gmx::compat::make_unique<AtomDistribution>(dd->nc,
- comm->cgs_gl.nr,
- comm->cgs_gl.index[comm->cgs_gl.nr]);
+ dd->ma = std::make_unique<AtomDistribution>(dd->nc,
+ comm->cgs_gl.nr,
+ comm->cgs_gl.index[comm->cgs_gl.nr]);
}
}
*/
int homeAtomCountEstimate = mtop.natoms/numMpiRanksTotal;
comm->updateGroupsCog =
- gmx::compat::make_unique<gmx::UpdateGroupsCog>(mtop,
- comm->updateGroupingPerMoleculetype,
- maxReferenceTemperature(inputrec),
- homeAtomCountEstimate);
+ std::make_unique<gmx::UpdateGroupsCog>(mtop,
+ comm->updateGroupingPerMoleculetype,
+ maxReferenceTemperature(inputrec),
+ homeAtomCountEstimate);
/* To use update groups, the large domain-to-domain cutoff distance
* should be compatible with the box size.
comm->bPMELoadBalDLBLimits = FALSE;
/* Allocate the charge group/atom sorting struct */
- comm->sort = gmx::compat::make_unique<gmx_domdec_sort_t>();
+ comm->sort = std::make_unique<gmx_domdec_sort_t>();
comm->bCGs = (ncg_mtop(mtop) < mtop->natoms);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2006,2007,2008,2009,2010,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2006,2007,2008,2009,2010,2012,2013,2014,2015,2016,2017,2018,2019, 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.
#include <cassert>
#include <algorithm>
+#include <memory>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/dlbtiming.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_struct.h"
*/
int numKeysEstimate = std::min(mtop->natoms/20,
mtop->natoms/(2*dd->nnodes));
- dc->ga2la = gmx::compat::make_unique < gmx::HashedMap < int>>(numKeysEstimate);
+ dc->ga2la = std::make_unique < gmx::HashedMap < int>>(numKeysEstimate);
dc->nthread = gmx_omp_nthreads_get(emntDomdec);
dc->ils.resize(dc->nthread);
#include <cstring>
#include <algorithm>
+#include <memory>
#include <string>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_network.h"
#include "gromacs/domdec/ga2la.h"
{
for (thread_work_t &th_work : rt.th_work)
{
- th_work.vsitePbc = gmx::compat::make_unique<VsitePbc>();
+ th_work.vsitePbc = std::make_unique<VsitePbc>();
}
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
#include <algorithm>
#include <memory>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/localatomset.h"
#include "gromacs/utility/exceptions.h"
LocalAtomSet
LocalAtomSetManager::add(ArrayRef<const int> globalAtomIndex)
{
- impl_->atomSetData_.push_back(compat::make_unique<internal::LocalAtomSetData>(globalAtomIndex));
+ impl_->atomSetData_.push_back(std::make_unique<internal::LocalAtomSetData>(globalAtomIndex));
return LocalAtomSet(*impl_->atomSetData_.back());
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
#include <cstring>
#include <ctime>
+#include <memory>
+
#include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/xvgr.h"
const gmx_output_env_t *oenv,
const t_commrec *cr)
{
- auto edHandle = gmx::compat::make_unique<gmx::EssentialDynamics>();
+ auto edHandle = std::make_unique<gmx::EssentialDynamics>();
auto ed = edHandle->getLegacyED();
/* We want to perform ED (this switch might later be upgraded to EssentialDynamicsType::Flooding) */
ed->eEDtype = EssentialDynamicsType::EDSampling;
// If we start from a checkpoint file, we already have an edsamHistory struct
if (oh->edsamHistory == nullptr)
{
- oh->edsamHistory = gmx::compat::make_unique<edsamhistory_t>(edsamhistory_t {});
+ oh->edsamHistory = std::make_unique<edsamhistory_t>(edsamhistory_t {});
}
edsamhistory_t *EDstate = oh->edsamHistory.get();
#include "config.h"
#include <list>
+#include <memory>
#include <string>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/ewald/ewald-utils.h"
#include "gromacs/gpu_utils/gpu_utils.h"
#include "gromacs/math/invertmatrix.h"
pmeGpu->archSpecific->fftSetup.resize(0);
for (int i = 0; i < pmeGpu->common->ngrids; i++)
{
- pmeGpu->archSpecific->fftSetup.push_back(gmx::compat::make_unique<GpuParallel3dFft>(pmeGpu));
+ pmeGpu->archSpecific->fftSetup.push_back(std::make_unique<GpuParallel3dFft>(pmeGpu));
}
}
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
#include "pme-gpu-program.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
#include "pme-gpu-program-impl.h"
PmeGpuProgram::PmeGpuProgram(const gmx_device_info_t *deviceInfo) :
- impl_(gmx::compat::make_unique<PmeGpuProgramImpl>(deviceInfo))
+ impl_(std::make_unique<PmeGpuProgramImpl>(deviceInfo))
{
}
// This workaround is only needed for CodePath::CPU dummy in testhardwarecontexts.cpp
return nullptr;
}
- return gmx::compat::make_unique<PmeGpuProgram>(deviceInfo);
+ return std::make_unique<PmeGpuProgram>(deviceInfo);
}
#include <numeric>
#include <vector>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/ewald/pme.h"
#include "gromacs/fft/parallel_3dfft.h"
/*! \brief Initialize the PME-only side of the PME <-> PP communication */
static std::unique_ptr<gmx_pme_pp> gmx_pme_pp_init(const t_commrec *cr)
{
- auto pme_pp = gmx::compat::make_unique<gmx_pme_pp>();
+ auto pme_pp = std::make_unique<gmx_pme_pp>();
#if GMX_MPI
int rank;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019, 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.
#include "testhardwarecontexts.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
#include "gromacs/ewald/pme.h"
#include "gromacs/gpu_utils/gpu_utils.h"
#include "gromacs/hardware/detecthardware.h"
void PmeTestEnvironment::SetUp()
{
- hardwareContexts_.emplace_back(compat::make_unique<TestHardwareContext>(CodePath::CPU, "", nullptr));
+ hardwareContexts_.emplace_back(std::make_unique<TestHardwareContext>(CodePath::CPU, "", nullptr));
hardwareInfo_ = hardwareInit();
if (!pme_gpu_supports_build(*hardwareInfo_, nullptr))
char stmp[200] = {};
get_gpu_device_info_string(stmp, hardwareInfo_->gpu_info, gpuIndex);
std::string description = "(GPU " + std::string(stmp) + ") ";
- hardwareContexts_.emplace_back(compat::make_unique<TestHardwareContext>
+ hardwareContexts_.emplace_back(std::make_unique<TestHardwareContext>
(CodePath::GPU, description.c_str(),
deviceInfo));
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, 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.
#include <memory>
#include "buildinfo.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/fileio/filetypes.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/gmxfio-xdr.h"
{
if (deltaH == nullptr)
{
- enerhist->deltaHForeignLambdas = gmx::compat::make_unique<delta_h_history_t>();
+ enerhist->deltaHForeignLambdas = std::make_unique<delta_h_history_t>();
deltaH = enerhist->deltaHForeignLambdas.get();
}
deltaH->dh.resize(numDeltaH);
if (headerContents->flags_enh && observablesHistory->energyHistory == nullptr)
{
- observablesHistory->energyHistory = gmx::compat::make_unique<energyhistory_t>();
+ observablesHistory->energyHistory = std::make_unique<energyhistory_t>();
}
ret = do_cpt_enerhist(gmx_fio_getxdr(fp), TRUE,
headerContents->flags_enh, observablesHistory->energyHistory.get(), nullptr);
{
if (observablesHistory->pullHistory == nullptr)
{
- observablesHistory->pullHistory = gmx::compat::make_unique<PullHistory>();
+ observablesHistory->pullHistory = std::make_unique<PullHistory>();
}
ret = doCptPullHist(gmx_fio_getxdr(fp), TRUE,
headerContents->flagsPullHistory, observablesHistory->pullHistory.get(), StatePart::pullHistory, nullptr);
if (headerContents->nED > 0 && observablesHistory->edsamHistory == nullptr)
{
- observablesHistory->edsamHistory = gmx::compat::make_unique<edsamhistory_t>(edsamhistory_t {});
+ observablesHistory->edsamHistory = std::make_unique<edsamhistory_t>(edsamhistory_t {});
}
ret = do_cpt_EDstate(gmx_fio_getxdr(fp), TRUE, headerContents->nED, observablesHistory->edsamHistory.get(), nullptr);
if (ret)
if (headerContents->eSwapCoords != eswapNO && observablesHistory->swapHistory == nullptr)
{
- observablesHistory->swapHistory = gmx::compat::make_unique<swaphistory_t>(swaphistory_t {});
+ observablesHistory->swapHistory = std::make_unique<swaphistory_t>(swaphistory_t {});
}
ret = do_cpt_swapstate(gmx_fio_getxdr(fp), TRUE, headerContents->eSwapCoords, observablesHistory->swapHistory.get(), nullptr);
if (ret)
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
#include <cstring>
#include <algorithm>
+#include <memory>
#include <vector>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/fileio/filetypes.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/gmxfio-xdr.h"
{
if (bRead)
{
- mtop->intermolecular_ilist = gmx::compat::make_unique<InteractionLists>();
+ mtop->intermolecular_ilist = std::make_unique<InteractionLists>();
}
do_ilists(fio, mtop->intermolecular_ilist.get(), bRead, file_version);
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
#include <string>
#include "gromacs/commandline/pargs.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/fileio/enxio.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/oenv.h"
std::unique_ptr<OutputFile> frictionOutputFile;
if (outputFriction)
{
- frictionOutputFile = gmx::compat::make_unique<OutputFile>(opt2fn("-fric", numFileOptions, filenames), "Friction tensor", awhParams->numBias, k);
+ frictionOutputFile = std::make_unique<OutputFile>(opt2fn("-fric", numFileOptions, filenames), "Friction tensor", awhParams->numBias, k);
frictionOutputFile->initializeFrictionOutputFile(subblockStart, numSubBlocks, awhBiasParams, energyUnit, kT);
}
AwhGraphSelection awhGraphSelection = (moreGraphs ? AwhGraphSelection::All : AwhGraphSelection::Pmf);
EnergyUnit energyUnit = (kTUnit ? EnergyUnit::KT : EnergyUnit::KJPerMol);
awhReader =
- gmx::compat::make_unique<AwhReader>(ir.awhParams,
- nfile, fnm,
- awhGraphSelection,
- energyUnit, BOLTZ*ir.opts.ref_t[0],
- block);
+ std::make_unique<AwhReader>(ir.awhParams,
+ nfile, fnm,
+ awhGraphSelection,
+ energyUnit, BOLTZ*ir.opts.ref_t[0],
+ block);
}
awhReader->processAwhFrame(*block, frame->t, oenv);
#include <cmath>
#include <cstring>
+#include <memory>
+
#include "gromacs/commandline/pargs.h"
#include "gromacs/commandline/viewit.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/fileio/trxio.h"
#include "gromacs/fileio/xvgr.h"
index_atom2mol(&gnx[0], index[0], &top->mols);
}
- msd = gmx::compat::make_unique<t_corr>(nrgrp, type, axis, dim_factor,
- mol_file == nullptr ? 0 : gnx[0],
- bTen, bMW, dt, top, beginfit, endfit);
+ msd = std::make_unique<t_corr>(nrgrp, type, axis, dim_factor,
+ mol_file == nullptr ? 0 : gnx[0],
+ bTen, bMW, dt, top, beginfit, endfit);
nat_trx =
corr_loop(msd.get(), trx_file, top, ePBC, mol_file ? gnx[0] != 0 : false, gnx.data(), index,
#include <cstring>
#include <algorithm>
+#include <memory>
#include "gromacs/commandline/pargs.h"
#include "gromacs/commandline/viewit.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/fileio/g96io.h"
#include "gromacs/fileio/gmxfio.h"
efTNG == fn2ftp(output_file))
{
int temp_natoms = -1;
- mtop = gmx::compat::make_unique<gmx_mtop_t>();
+ mtop = std::make_unique<gmx_mtop_t>();
read_tpx(tps_file, nullptr, nullptr, &temp_natoms,
nullptr, nullptr, mtop.get());
}
#include <cmath>
#include <cstring>
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
#include "gromacs/gmxpreprocess/gpp_atomtype.h"
#include "gromacs/gmxpreprocess/grompp-impl.h"
#include "gromacs/gmxpreprocess/topio.h"
if (intermolecular_interactions != nullptr)
{
/* Process the intermolecular interaction list */
- mtop->intermolecular_ilist = gmx::compat::make_unique<InteractionLists>();
+ mtop->intermolecular_ilist = std::make_unique<InteractionLists>();
for (i = 0; (i < F_NRE); i++)
{
#include <cstring>
#include <algorithm>
+#include <memory>
#include <vector>
#include <sys/types.h>
#include "gromacs/awh/read-params.h"
#include "gromacs/commandline/pargs.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/ewald/ewald-utils.h"
#include "gromacs/ewald/pme.h"
#include "gromacs/fft/calcgrid.h"
#include <ctime>
#include <algorithm>
+#include <memory>
#include <string>
#include <vector>
#include "gromacs/commandline/cmdlineoptionsmodule.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/fileio/filetypes.h"
#include "gromacs/fileio/gmxfio.h"
"Convert coordinate files to topology and FF-compliant coordinate files";
ICommandLineOptionsModulePointer pdb2gmxInfo::create()
{
- return compat::make_unique<pdb2gmx>();
+ return std::make_unique<pdb2gmx>();
}
} // namespace gmx
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
#include "config.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/stringutil.h"
std::unique_ptr<ClfftInitializer> initializeClfftLibrary()
{
- return compat::make_unique<ClfftInitializer>();
+ return std::make_unique<ClfftInitializer>();
}
} // namespace gmx
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, 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.
#include "thread_mpi/threads.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/gpu_utils/gpu_utils.h"
#include "gromacs/hardware/cpuinfo.h"
#include "gromacs/hardware/hardwaretopology.h"
/* only initialize the hwinfo structure if it is not already initalized */
if (n_hwinfo == 0)
{
- hwinfo_g = compat::make_unique<gmx_hw_info_t>();
+ hwinfo_g = std::make_unique<gmx_hw_info_t>();
/* TODO: We should also do CPU hardware detection only once on each
* physical node and broadcast it, instead of do it on every MPI rank. */
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
#include "boxdeformation.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
#include "gromacs/gmxlib/network.h"
#include "gromacs/math/invertmatrix.h"
#include "gromacs/math/vec.h"
gmx_bcast(sizeof(box), box, cr);
}
- return compat::make_unique<BoxDeformation>(inputrec.delta_t,
- inputrec.init_step,
- inputrec.deform,
- box);
+ return std::make_unique<BoxDeformation>(inputrec.delta_t,
+ inputrec.init_step,
+ inputrec.deform,
+ box);
}
BoxDeformation::BoxDeformation(double timeStep,
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
#include <cstring>
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
#include "gromacs/gmxlib/network.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/mdrun.h"
block_bc(cr, mtop->bIntermolecularInteractions);
if (mtop->bIntermolecularInteractions)
{
- mtop->intermolecular_ilist = gmx::compat::make_unique<InteractionLists>();
+ mtop->intermolecular_ilist = std::make_unique<InteractionLists>();
bc_ilists(cr, mtop->intermolecular_ilist.get());
}
#include <cstring>
#include <algorithm>
+#include <memory>
#include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/ewald/ewald.h"
}
}
- nbv->listParams = gmx::compat::make_unique<NbnxnListParameters>(ir->rlist);
+ nbv->listParams = std::make_unique<NbnxnListParameters>(ir->rlist);
setupDynamicPairlistPruning(mdlog, ir, mtop, box, nbv->grp[0].kernel_type, fr->ic,
nbv->listParams.get());
- nbv->nbs = gmx::compat::make_unique<nbnxn_search>(DOMAINDECOMP(cr) ? &cr->dd->nc : nullptr,
- DOMAINDECOMP(cr) ? domdec_zones(cr->dd) : nullptr,
- bFEP_NonBonded,
- gmx_omp_nthreads_get(emntPairsearch));
+ nbv->nbs = std::make_unique<nbnxn_search>(DOMAINDECOMP(cr) ? &cr->dd->nc : nullptr,
+ DOMAINDECOMP(cr) ? domdec_zones(cr->dd) : nullptr,
+ bFEP_NonBonded,
+ gmx_omp_nthreads_get(emntPairsearch));
for (int i = 0; i < nbv->ngrp; i++)
{
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
#include <memory>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/mdlib/constr.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/pulling/pull.h"
// No work, so don't make a Constraints object.
return nullptr;
}
- return compat::make_unique<Constraints::CreationHelper>
+ return std::make_unique<Constraints::CreationHelper>
(mtop, ir, std::forward<Args>(args) ..., numConstraints, numSettles);
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, 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.
#include <memory>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/ewald/pme.h"
#include "gromacs/gpu_utils/hostallocator.h"
#include "gromacs/math/functions.h"
makeMDAtoms(FILE *fp, const gmx_mtop_t &mtop, const t_inputrec &ir,
const bool rankHasPmeGpuTask)
{
- auto mdAtoms = compat::make_unique<MDAtoms>();
+ auto mdAtoms = std::make_unique<MDAtoms>();
// GPU transfers may want to use a suitable pinning mode.
if (rankHasPmeGpuTask)
{
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
#include <cmath>
#include <cstring>
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
#include "gromacs/fileio/enxio.h"
#include "gromacs/mdlib/mdebin.h"
#include "gromacs/mdtypes/energyhistory.h"
{
if (enerhist->deltaHForeignLambdas == nullptr)
{
- enerhist->deltaHForeignLambdas = gmx::compat::make_unique<delta_h_history_t>();
+ enerhist->deltaHForeignLambdas = std::make_unique<delta_h_history_t>();
enerhist->deltaHForeignLambdas->dh.resize(dhc->ndh);
}
#include "config.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
#include "gromacs/timing/walltime_accounting.h"
#include "gromacs/utility/cstringutil.h"
{return stopConditionTime->getSignal(bNS, step, fplog, walltime_accounting); });
}
- return compat::make_unique<StopHandler>(
+ return std::make_unique<StopHandler>(
signal, simulationShareState, stopConditions_, neverUpdateNeighborList);
}
#include <cstdio>
#include <algorithm>
+#include <memory>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/gmxlib/network.h"
Update::Impl::Impl(const t_inputrec *ir, BoxDeformation *boxDeformation)
{
- sd = gmx::compat::make_unique<gmx_stochd_t>(ir);
+ sd = std::make_unique<gmx_stochd_t>(ir);
update_temperature_constants(sd.get(), ir);
xp.resizeWithPadding(0);
deform = boxDeformation;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
#include <cstdio>
#include <algorithm>
+#include <memory>
#include <vector>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/gmxlib/network.h"
return vsite;
}
- vsite = gmx::compat::make_unique<gmx_vsite_t>();
+ vsite = std::make_unique<gmx_vsite_t>();
vsite->n_intercg_vsite = count_intercg_vsites(&mtop);
molt.cgs);
}
- vsite->vsite_pbc_loc = gmx::compat::make_unique<VsitePbc>();
+ vsite->vsite_pbc_loc = std::make_unique<VsitePbc>();
}
vsite->nthreads = gmx_omp_nthreads_get(emntVSITE);
{
try
{
- vsite->tData[thread] = gmx::compat::make_unique<VsiteThread>();
+ vsite->tData[thread] = std::make_unique<VsiteThread>();
InterdependentTask &idTask = vsite->tData[thread]->idTask;
idTask.nuse = 0;
}
if (vsite->nthreads > 1)
{
- vsite->tData[vsite->nthreads] = gmx::compat::make_unique<VsiteThread>();
+ vsite->tData[vsite->nthreads] = std::make_unique<VsiteThread>();
}
}
{
if (vsite->n_intercg_vsite > 0 && vsite->bHaveChargeGroups)
{
- vsite->vsite_pbc_loc = gmx::compat::make_unique<VsitePbc>();
+ vsite->vsite_pbc_loc = std::make_unique<VsitePbc>();
*vsite->vsite_pbc_loc = get_vsite_pbc(top->idef.iparams,
top->idef.il, nullptr, md,
top->cgs);
#include "gromacs/awh/awh.h"
#include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/collect.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_network.h"
enerd);
/* Kinetic energy data */
- std::unique_ptr<gmx_ekindata_t> eKinData = compat::make_unique<gmx_ekindata_t>();
+ std::unique_ptr<gmx_ekindata_t> eKinData = std::make_unique<gmx_ekindata_t>();
gmx_ekindata_t *ekind = eKinData.get();
init_ekindata(fplog, top_global, &(ir->opts), ekind);
/* Copy the cos acceleration to the groups struct */
{
dd_init_local_top(*top_global, &top);
- stateInstance = compat::make_unique<t_state>();
+ stateInstance = std::make_unique<t_state>();
state = stateInstance.get();
dd_init_local_state(cr->dd, state_global, state);
}
if (!observablesHistory->energyHistory)
{
- observablesHistory->energyHistory = compat::make_unique<energyhistory_t>();
+ observablesHistory->energyHistory = std::make_unique<energyhistory_t>();
}
if (!observablesHistory->pullHistory)
{
- observablesHistory->pullHistory = compat::make_unique<PullHistory>();
+ observablesHistory->pullHistory = std::make_unique<PullHistory>();
}
/* Set the initial energy history in state by updating once */
update_energyhistory(observablesHistory->energyHistory.get(), mdebin);
MASTER(cr), ir->nstlist, mdrunOptions.reproducible, nstSignalComm,
mdrunOptions.maximumHoursToRun, ir->nstlist == 0, fplog, step, bNS, walltime_accounting);
- auto checkpointHandler = compat::make_unique<CheckpointHandler>(
+ auto checkpointHandler = std::make_unique<CheckpointHandler>(
compat::make_not_null<SimulationSignal*>(&signals[eglsCHKPT]),
simulationsShareState, ir->nstlist == 0, MASTER(cr),
mdrunOptions.writeConfout, mdrunOptions.checkpointOptions.period);
const bool resetCountersIsLocal = true;
- auto resetHandler = compat::make_unique<ResetHandler>(
+ auto resetHandler = std::make_unique<ResetHandler>(
compat::make_not_null<SimulationSignal*>(&signals[eglsRESETCOUNTERS]), !resetCountersIsLocal,
ir->nsteps, MASTER(cr), mdrunOptions.timingOptions.resetHalfway,
mdrunOptions.maximumHoursToRun, mdlog, wcycle, walltime_accounting);
#include "gromacs/awh/awh.h"
#include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/collect.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_network.h"
enerd);
/* Kinetic energy data */
- std::unique_ptr<gmx_ekindata_t> eKinData = compat::make_unique<gmx_ekindata_t>();
+ std::unique_ptr<gmx_ekindata_t> eKinData = std::make_unique<gmx_ekindata_t>();
gmx_ekindata_t *ekind = eKinData.get();
init_ekindata(fplog, top_global, &(ir->opts), ekind);
/* Copy the cos acceleration to the groups struct */
{
dd_init_local_top(*top_global, &top);
- stateInstance = compat::make_unique<t_state>();
+ stateInstance = std::make_unique<t_state>();
state = stateInstance.get();
dd_init_local_state(cr->dd, state_global, state);
#include "gromacs/awh/awh.h"
#include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/collect.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_network.h"
enerd);
/* Kinetic energy data */
- std::unique_ptr<gmx_ekindata_t> eKinData = compat::make_unique<gmx_ekindata_t>();
+ std::unique_ptr<gmx_ekindata_t> eKinData = std::make_unique<gmx_ekindata_t>();
gmx_ekindata_t *ekind = eKinData.get();
init_ekindata(fplog, top_global, &(ir->opts), ekind);
/* Copy the cos acceleration to the groups struct */
{
dd_init_local_top(*top_global, &top);
- stateInstance = compat::make_unique<t_state>();
+ stateInstance = std::make_unique<t_state>();
state = stateInstance.get();
dd_init_local_state(cr->dd, state_global, state);
#include <cstring>
#include <algorithm>
+#include <memory>
#include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/domdec/localatomsetmanager.h"
// part of the interface to the client code, which is associated only with the
// original thread. Handles to the same resources can be obtained by copy.
{
- newRunner.restraintManager_ = compat::make_unique<RestraintManager>(*restraintManager_);
+ newRunner.restraintManager_ = std::make_unique<RestraintManager>(*restraintManager_);
}
// Copy original cr pointer before master thread can pass the thread barrier
newRunner.replExParams = replExParams;
newRunner.pforce = pforce;
newRunner.ms = ms;
- newRunner.stopHandlerBuilder_ = compat::make_unique<StopHandlerBuilder>(*stopHandlerBuilder_);
+ newRunner.stopHandlerBuilder_ = std::make_unique<StopHandlerBuilder>(*stopHandlerBuilder_);
threadMpiMdrunnerAccessBarrier();
if (SIMMASTER(cr))
{
/* Only the master rank has the global state */
- globalState = compat::make_unique<t_state>();
+ globalState = std::make_unique<t_state>();
/* Read (nearly) all data required for the simulation */
read_tpx_state(ftp2fn(efTPR, filenames.size(), filenames.data()), inputrec, globalState.get(), &mtop);
{
if (!MASTER(cr))
{
- globalState = compat::make_unique<t_state>();
+ globalState = std::make_unique<t_state>();
}
broadcastStateWithoutDynamics(cr, globalState.get());
}
void Mdrunner::BuilderImplementation::addMultiSim(gmx_multisim_t* multisim)
{
- multisim_ = compat::make_unique<gmx_multisim_t*>(multisim);
+ multisim_ = std::make_unique<gmx_multisim_t*>(multisim);
}
Mdrunner Mdrunner::BuilderImplementation::build()
GMX_THROW(gmx::APIError("MdrunnerBuilder::addBondedTaskAssignment() is required before build()"));
}
- newRunner.restraintManager_ = compat::make_unique<gmx::RestraintManager>();
+ newRunner.restraintManager_ = std::make_unique<gmx::RestraintManager>();
if (stopHandlerBuilder_)
{
}
else
{
- newRunner.stopHandlerBuilder_ = compat::make_unique<StopHandlerBuilder>();
+ newRunner.stopHandlerBuilder_ = std::make_unique<StopHandlerBuilder>();
}
return newRunner;
}
MdrunnerBuilder::MdrunnerBuilder(compat::not_null<SimulationContext*> context) :
- impl_ {gmx::compat::make_unique<Mdrunner::BuilderImplementation>(context)}
+ impl_ {std::make_unique<Mdrunner::BuilderImplementation>(context)}
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
#include <cassert>
+#include <memory>
+
#include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/fileio/oenv.h"
#include "gromacs/hardware/hw_info.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019, 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.
#include <memory>
#include "gromacs/applied-forces/electricfield.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/mdtypes/iforceprovider.h"
#include "gromacs/mdtypes/imdmodule.h"
#include "gromacs/mdtypes/imdoutputprovider.h"
{
GMX_RELEASE_ASSERT(impl_->forceProviders_ == nullptr,
"Force providers initialized multiple times");
- impl_->forceProviders_ = compat::make_unique<ForceProviders>();
+ impl_->forceProviders_ = std::make_unique<ForceProviders>();
impl_->field_->initForceProviders(impl_->forceProviders_.get());
for (auto && module : impl_->modules_)
{
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019, 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.
#include "config.h"
+#include <memory>
+
#include <gmock/gmock.h>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/hardware/hardwaretopology.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/utility/basenetwork.h"
void ThreadAffinityTestHelper::setLogicalProcessorCount(int logicalProcessorCount)
{
- hwTop_ = gmx::compat::make_unique<HardwareTopology>(logicalProcessorCount);
+ hwTop_ = std::make_unique<HardwareTopology>(logicalProcessorCount);
}
} // namespace test
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, 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.
#include <string>
#include <vector>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/onlinehelp/helpformat.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
"Accessing console formatter for non-console output");
if (!consoleOptionsFormatter_)
{
- consoleOptionsFormatter_ = compat::make_unique<TextTableFormatter>();
+ consoleOptionsFormatter_ = std::make_unique<TextTableFormatter>();
consoleOptionsFormatter_->setFirstColumnIndent(1);
consoleOptionsFormatter_->addColumn(nullptr, 7, false);
consoleOptionsFormatter_->addColumn(nullptr, 18, false);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, 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.
#ifndef GMX_OPTIONS_BASICOPTIONS_H
#define GMX_OPTIONS_BASICOPTIONS_H
+#include <memory>
#include <string>
#include <vector>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/options/abstractoption.h"
#include "gromacs/options/ivaluestore.h"
#include "gromacs/utility/arrayref.h"
*this, enumValues_, enumValuesCount_,
convertToInt(MyBase::defaultValue()),
convertToInt(MyBase::defaultValueIfSet()),
- compat::make_unique<internal::EnumIndexStore<EnumType> >(
+ std::make_unique<internal::EnumIndexStore<EnumType> >(
MyBase::store(), MyBase::storeVector()));
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2014,2015,2016,2017,2018,2019, 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.
#include "options.h"
+#include <memory>
#include <utility>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/options/abstractoption.h"
#include "gromacs/options/abstractoptionstorage.h"
#include "gromacs/options/optionsection.h"
// Make sure that there are no duplicate sections.
GMX_RELEASE_ASSERT(findSection(name) == nullptr, "Duplicate subsection name");
std::unique_ptr<IOptionSectionStorage> storage(section.createStorage());
- subsections_.push_back(compat::make_unique<OptionSectionImpl>(managers_, std::move(storage), name));
+ subsections_.push_back(std::make_unique<OptionSectionImpl>(managers_, std::move(storage), name));
return subsections_.back().get();
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2018, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018,2019, 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.
#include "optionsection.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
#include "gromacs/options/isectionstorage.h"
namespace gmx
std::unique_ptr<IOptionSectionStorage> OptionSection::createStorage() const
{
- return compat::make_unique<OptionSectionStorage>();
+ return std::make_unique<OptionSectionStorage>();
}
} // namespace gmx
GMX_THROW(APIError("defaultValueIfSet() is not supported with allowMultiple()"));
}
setFlag(efOption_DefaultValueIfSetExists);
- defaultValueIfSet_ = compat::make_unique<T>(value);
+ defaultValueIfSet_ = std::make_unique<T>(value);
}
} // namespace gmx
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2018, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018,2019, 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.
#include <memory>
#include <vector>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/options/abstractsection.h"
#include "gromacs/options/ioptionscontainerwithsections.h"
#include "gromacs/options/isectionstorage.h"
std::unique_ptr<IOptionSectionStorage> RepeatingOptionSection<T>::createStorage() const
{
- return compat::make_unique<RepeatingOptionSectionStorage<T> >(*this);
+ return std::make_unique<RepeatingOptionSectionStorage<T> >(*this);
}
/*! \brief
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
#include <cstdio>
+#include <memory>
+
#include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/math/vec.h"
/* If pull->coordForceHistory is already set we are starting from a checkpoint. Do not reset it. */
if (observablesHistory->pullHistory == nullptr)
{
- observablesHistory->pullHistory = gmx::compat::make_unique<PullHistory>();
+ observablesHistory->pullHistory = std::make_unique<PullHistory>();
pull->coordForceHistory = observablesHistory->pullHistory.get();
pull->coordForceHistory->numValuesInXSum = 0;
pull->coordForceHistory->numValuesInFSum = 0;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
#include <cstdlib>
#include <algorithm>
+#include <memory>
#include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/domdec/localatomset.h"
#include "gromacs/domdec/localatomsetmanager.h"
if (group.epgrppbc == epgrppbcREFAT || group.epgrppbc == epgrppbcPREVSTEPCOM)
{
/* pbcAtomSet consists of a single atom */
- group.pbcAtomSet = gmx::compat::make_unique<gmx::LocalAtomSet>(atomSets->add({&group.params.pbcatom, &group.params.pbcatom + 1}));
+ group.pbcAtomSet = std::make_unique<gmx::LocalAtomSet>(atomSets->add({&group.params.pbcatom, &group.params.pbcatom + 1}));
}
}
}
#include <cstring>
#include <algorithm>
+#include <memory>
#include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/dlbtiming.h"
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/domdec/ga2la.h"
fprintf(stdout, "%s Initializing ...\n", RotStr);
}
- auto enforcedRotation = gmx::compat::make_unique<gmx::EnforcedRotation>();
+ auto enforcedRotation = std::make_unique<gmx::EnforcedRotation>();
gmx_enfrot *er = enforcedRotation->getLegacyEnfrot();
// TODO When this module implements IMdpOptions, the ownership will become more clear.
er->rot = ir->rot;
{
gmx_enfrotgrp *erg = &ergRef;
erg->rotg = &er->rot->grp[groupIndex];
- erg->atomSet = gmx::compat::make_unique<gmx::LocalAtomSet>(atomSets->add({erg->rotg->ind, erg->rotg->ind + erg->rotg->nat}));
+ erg->atomSet = std::make_unique<gmx::LocalAtomSet>(atomSets->add({erg->rotg->ind, erg->rotg->ind + erg->rotg->nat}));
erg->groupIndex = groupIndex;
if (nullptr != fplog)
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
#include <mutex>
#include <vector>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/utility/exceptions.h"
namespace gmx
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
#include "restraintmdmodule.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
#include "gromacs/mdtypes/forceoutput.h"
#include "gromacs/mdtypes/iforceprovider.h"
RestraintMDModuleImpl::RestraintMDModuleImpl(std::shared_ptr<IRestraintPotential> restraint,
const std::vector<int> &sites) :
- forceProvider_(compat::make_unique<RestraintForceProvider>(restraint,
- sites))
+ forceProvider_(std::make_unique<RestraintForceProvider>(restraint,
+ sites))
{
GMX_ASSERT(forceProvider_, "Class invariant implies non-null ForceProvider.");
}
RestraintMDModule::create(std::shared_ptr<IRestraintPotential> restraint,
const std::vector<int> &sites)
{
- auto implementation = compat::make_unique<RestraintMDModuleImpl>(std::move(restraint),
- sites);
- auto newModule = compat::make_unique<RestraintMDModule>(std::move(implementation));
+ auto implementation = std::make_unique<RestraintMDModuleImpl>(std::move(restraint),
+ sites);
+ auto newModule = std::make_unique<RestraintMDModule>(std::move(implementation));
return newModule;
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, 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.
#include <cstdio>
#include <exception>
+#include <memory>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/selection/selection.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/exceptions.h"
const SelectionLocation &location)
: name_(name != nullptr ? name : ""),
location_(location),
- values_(values ? std::move(values) : compat::make_unique<SelectionParserValueList>())
+ values_(values ? std::move(values) : std::make_unique<SelectionParserValueList>())
{
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2018, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2018,2019, 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.
#include <memory>
#include <string>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/utility/gmxassert.h"
//! Allocates and initializes an empty value list.
static SelectionParserValueListPointer createList()
{
- return compat::make_unique<SelectionParserValueList>();
+ return std::make_unique<SelectionParserValueList>();
}
/*! \brief
* Allocates and initializes a value list with a single value.
//! Allocates and initializes an empty parameter list.
static SelectionParserParameterListPointer createList()
{
- return compat::make_unique<SelectionParserParameterList>();
+ return std::make_unique<SelectionParserParameterList>();
}
/*! \brief
* Allocates and initializes a parsed method parameter.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, 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.
#include <string>
#include <vector>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/onlinehelp/helpmanager.h"
#include "gromacs/onlinehelp/helpwritercontext.h"
#include "gromacs/options/basicoptions.h"
sc_.top = nullptr;
gmx_ana_index_clear(&sc_.gall);
sc_.mempool = nullptr;
- sc_.symtab = compat::make_unique<SelectionParserSymbolTable>();
+ sc_.symtab = std::make_unique<SelectionParserSymbolTable>();
gmx_ana_index_clear(&requiredAtoms_);
gmx_ana_selmethod_register_defaults(sc_.symtab.get());
}
std::unique_ptr<TextWriter> statusWriter;
if (statusStream != nullptr)
{
- statusWriter = compat::make_unique<TextWriter>(statusStream);
+ statusWriter = std::make_unique<TextWriter>(statusStream);
statusWriter->wrapperSettings().setLineLength(78);
}
return statusWriter;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
#include <cstring>
#include <algorithm>
+#include <memory>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/fileio/trxio.h"
#include "gromacs/math/vec.h"
matrix box;
GMX_RELEASE_ASSERT(mtop_ == nullptr, "Topology initialized more than once");
- mtop_ = gmx::compat::make_unique<gmx_mtop_t>();
+ mtop_ = std::make_unique<gmx_mtop_t>();
readConfAndTopology(
gmx::test::TestFileManager::getInputFilePath(filename).c_str(),
&fullTopology, mtop_.get(), &ePBC, frame_ != nullptr ? &xtop : nullptr,
void TopologyManager::initAtoms(int count)
{
GMX_RELEASE_ASSERT(mtop_ == nullptr, "Topology initialized more than once");
- mtop_ = gmx::compat::make_unique<gmx_mtop_t>();
+ mtop_ = std::make_unique<gmx_mtop_t>();
mtop_->moltype.resize(1);
init_t_atoms(&mtop_->moltype[0].atoms, count, FALSE);
mtop_->molblock.resize(1);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
#include <cstdlib>
#include <ctime>
+#include <memory>
#include <string>
#include <vector>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/domdec/localatomset.h"
#include "gromacs/domdec/localatomsetmanager.h"
{
if (oh->swapHistory == nullptr)
{
- oh->swapHistory = gmx::compat::make_unique<swaphistory_t>(swaphistory_t {});
+ oh->swapHistory = std::make_unique<swaphistory_t>(swaphistory_t {});
}
swapstate = oh->swapHistory.get();
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
"and/or to the standard output.";
ICommandLineOptionsModulePointer ReportMethodsInfo::create()
{
- return ICommandLineOptionsModulePointer(compat::make_unique<ReportMethods>());
+ return ICommandLineOptionsModulePointer(std::make_unique<ReportMethods>());
}
} // namespace gmx
#include <cstring>
#include <algorithm>
+#include <memory>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/math/functions.h"
#include "gromacs/math/utilities.h"
#include "gromacs/topology/residuetypes.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015,2016,2017,2018,2019, 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.
#include "angle.h"
#include <algorithm>
+#include <memory>
#include <string>
#include <vector>
#include "gromacs/analysisdata/modules/average.h"
#include "gromacs/analysisdata/modules/histogram.h"
#include "gromacs/analysisdata/modules/plot.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/options/basicoptions.h"
g1type_(Group1Type_Angle), g2type_(Group2Type_None),
binWidth_(1.0), natoms1_(0), natoms2_(0)
{
- averageModule_ = compat::make_unique<AnalysisDataFrameAverageModule>();
+ averageModule_ = std::make_unique<AnalysisDataFrameAverageModule>();
angles_.addModule(averageModule_);
- histogramModule_ = compat::make_unique<AnalysisDataSimpleHistogramModule>();
+ histogramModule_ = std::make_unique<AnalysisDataSimpleHistogramModule>();
angles_.addModule(histogramModule_);
registerAnalysisDataset(&angles_, "angle");
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, 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.
#include "distance.h"
+#include <memory>
#include <string>
#include "gromacs/analysisdata/analysisdata.h"
#include "gromacs/analysisdata/modules/average.h"
#include "gromacs/analysisdata/modules/histogram.h"
#include "gromacs/analysisdata/modules/plot.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/math/vec.h"
#include "gromacs/options/basicoptions.h"
#include "gromacs/options/filenameoption.h"
Distance::Distance()
: meanLength_(0.1), lengthDev_(1.0), binWidth_(0.001),
- summaryStatsModule_(compat::make_unique<AnalysisDataAverageModule>()),
- allStatsModule_(compat::make_unique<AnalysisDataAverageModule>()),
- averageModule_(compat::make_unique<AnalysisDataFrameAverageModule>()),
- histogramModule_(compat::make_unique<AnalysisDataSimpleHistogramModule>())
+ summaryStatsModule_(std::make_unique<AnalysisDataAverageModule>()),
+ allStatsModule_(std::make_unique<AnalysisDataAverageModule>()),
+ averageModule_(std::make_unique<AnalysisDataFrameAverageModule>()),
+ histogramModule_(std::make_unique<AnalysisDataSimpleHistogramModule>())
{
summaryStatsModule_->setAverageDataSets(true);
distances_.addModule(summaryStatsModule_);
#include "topologyinformation.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
#include "gromacs/fileio/confio.h"
#include "gromacs/math/vec.h"
#include "gromacs/pbcutil/rmpbc.h"
{
TopologyInformation::TopologyInformation()
- : mtop_(compat::make_unique<gmx_mtop_t>()),
+ : mtop_(std::make_unique<gmx_mtop_t>()),
hasLoadedMtop_(false),
expandedTopology_(nullptr),
atoms_ (nullptr),
void TopologyInformation::fillFromInputFile(const std::string &filename)
{
- mtop_ = gmx::compat::make_unique<gmx_mtop_t>();
+ mtop_ = std::make_unique<gmx_mtop_t>();
// TODO When filename is not a .tpr, then using readConfAndAtoms
// would be efficient for not doing multiple conversions for
// makeAtomsData. However we'd also need to be able to copy the
// Do lazy initialization
if (expandedTopology_ == nullptr && hasTopology())
{
- expandedTopology_ = gmx::compat::make_unique<gmx_localtop_t>();
+ expandedTopology_ = std::make_unique<gmx_localtop_t>();
gmx_mtop_generate_local_top(*mtop_, expandedTopology_.get(), false);
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2017,2018,2019, 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.
#include <windows.h> // only for the page size query purposes
#endif
-#include "gromacs/compat/make_unique.h"
#include "gromacs/utility/gmxassert.h"
namespace gmx
#include <typeinfo>
#include <utility>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/utility/gmxassert.h"
namespace gmx
explicit Content(T &&value) : value_(std::move(value)) {}
const std::type_info &typeInfo() const override { return typeid(T); }
- std::unique_ptr<IContent> clone() const override { return compat::make_unique<Content>(value_); }
+ std::unique_ptr<IContent> clone() const override { return std::make_unique<Content>(value_); }
T value_;
};
#include <typeindex>
#include <vector>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/ikeyvaluetreeerror.h"
#include "gromacs/utility/keyvaluetreebuilder.h"
{
GMX_RELEASE_ASSERT(rootRule_ == nullptr,
"Cannot specify key match type after child rules");
- rootRule_ = compat::make_unique<Rule>(keyMatchType);
+ rootRule_ = std::make_unique<Rule>(keyMatchType);
}
std::unique_ptr<Rule> rootRule_;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015,2016,2017,2018,2019, 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.
*/
#include "gmxpre.h"
+#include <memory>
+
#include "gromacs/commandline/pargs.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/compat/pointers.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/fileio/gmxfio.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019, 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.
#include <string>
#include <vector>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/fileio/enxio.h"
#include "gromacs/trajectory/energyframe.h"
#include "gromacs/utility/exceptions.h"
GMX_THROW(APIError(requiredEnergiesNotFound));
}
- return EnergyFrameReaderPtr(compat::make_unique<EnergyFrameReader>(indicesOfEnergyFields,
- energyFile.release()));
+ return EnergyFrameReaderPtr(std::make_unique<EnergyFrameReader>(indicesOfEnergyFields,
+ energyFile.release()));
}
//! Helper function to obtain resources
#include <gtest/gtest.h>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/options/filenameoption.h"
#include "gromacs/topology/idef.h"
#include "gromacs/topology/ifunc.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
#include <gtest/gtest.h>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/options/filenameoption.h"
#include "gromacs/topology/idef.h"
#include "gromacs/topology/ifunc.h"
#include <gtest/gtest.h>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/options/filenameoption.h"
#include "gromacs/topology/idef.h"
#include "gromacs/topology/ifunc.h"
};
// Build the manager that will present matching pairs of frames to compare
FramePairManager<TrajectoryFrameReader, TrajectoryFrame>
- trajectoryManager(compat::make_unique<TrajectoryFrameReader>(normalRunTrajectoryFileName),
- compat::make_unique<TrajectoryFrameReader>(rerunTrajectoryFileName));
+ trajectoryManager(std::make_unique<TrajectoryFrameReader>(normalRunTrajectoryFileName),
+ std::make_unique<TrajectoryFrameReader>(rerunTrajectoryFileName));
// Compare the trajectory frames.
trajectoryManager.compareAllFramePairs(trajectoryComparator);
}
#include <gtest/gtest.h>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/options/filenameoption.h"
#include "gromacs/topology/idef.h"
#include "gromacs/topology/ifunc.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, 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.
#include <memory>
#include <string>
-#include "gromacs/compat/make_unique.h"
#include "gromacs/utility/gmxassert.h"
namespace gmx
static EntryPointer createRoot()
{
- return gmx::compat::make_unique<ReferenceDataEntry>("", "");
+ return std::make_unique<ReferenceDataEntry>("", "");
}
ReferenceDataEntry(const char *type, const char *id)
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, 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.
#include "gromacs/commandline/cmdlineinit.h"
#include "gromacs/commandline/cmdlineparser.h"
#include "gromacs/commandline/cmdlineprogramcontext.h"
-#include "gromacs/compat/make_unique.h"
#include "gromacs/math/utilities.h"
#include "gromacs/options/basicoptions.h"
#include "gromacs/options/options.h"
{
callAddGlobalTestEnvironment();
}
- g_testContext = gmx::compat::make_unique<TestProgramContext>(context);
+ g_testContext = std::make_unique<TestProgramContext>(context);
setProgramContext(g_testContext.get());
// Use the default finder that does not respect GMXLIB, since the tests
// generally can only get confused by a different set of data files.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2018,2019, 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.
#include "textblockmatchers.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
#include "gromacs/utility/gmxregex.h"
#include "gromacs/utility/stringstream.h"
#include "gromacs/utility/textreader.h"
TextBlockMatcherPointer ExactTextMatch::createMatcher() const
{
- return TextBlockMatcherPointer(compat::make_unique<ExactTextMatcher>());
+ return TextBlockMatcherPointer(std::make_unique<ExactTextMatcher>());
}
TextBlockMatcherPointer NoTextMatch::createMatcher() const
{
- return TextBlockMatcherPointer(compat::make_unique<NoTextMatcher>());
+ return TextBlockMatcherPointer(std::make_unique<NoTextMatcher>());
}
void FilteringExactTextMatch::addRegexToSkip(const std::string &lineToSkip)
TextBlockMatcherPointer FilteringExactTextMatch::createMatcher() const
{
- return TextBlockMatcherPointer(compat::make_unique<FilteringExactTextMatcher>(linesToSkip_));
+ return TextBlockMatcherPointer(std::make_unique<FilteringExactTextMatcher>(linesToSkip_));
}
} // namespace test