/*
* 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.
#include "config.h"
+#include <mutex>
+
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/exceptions.h"
-#include "gromacs/utility/mutex.h"
#include "gromacs/utility/stringutil.h"
#if GMX_GPU_OPENCL
* initialize it more than once. */
//! @{
bool g_clfftInitialized = false;
-gmx::Mutex g_clfftMutex;
+std::mutex g_clfftMutex;
//! @}
#endif
ClfftInitializer::ClfftInitializer()
{
#if GMX_GPU_OPENCL
- gmx::lock_guard<gmx::Mutex> guard(g_clfftMutex);
+ std::lock_guard<std::mutex> guard(g_clfftMutex);
clfftSetupData fftSetup;
int initErrorCode = clfftInitSetupData(&fftSetup);
if (initErrorCode != 0)
ClfftInitializer::~ClfftInitializer()
{
#if GMX_GPU_OPENCL
- gmx::lock_guard<gmx::Mutex> guard(g_clfftMutex);
+ std::lock_guard<std::mutex> guard(g_clfftMutex);
if (g_clfftInitialized)
{
clfftTeardown();