2017-12-14 01:30:04 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2017-12-14 01:30:04 +00:00
|
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE. See the above copyright notice for more information.
|
|
|
|
//============================================================================
|
|
|
|
#ifndef vtk_m_cont_EnvironmentTracker_h
|
|
|
|
#define vtk_m_cont_EnvironmentTracker_h
|
|
|
|
|
|
|
|
#include <vtkm/Types.h>
|
|
|
|
#include <vtkm/cont/vtkm_cont_export.h>
|
|
|
|
#include <vtkm/internal/ExportMacros.h>
|
2018-01-03 19:37:54 +00:00
|
|
|
|
2019-02-05 16:02:29 +00:00
|
|
|
#include <vtkm/thirdparty/diy/diy.h>
|
2017-12-14 01:30:04 +00:00
|
|
|
|
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace cont
|
|
|
|
{
|
2018-02-22 14:59:15 +00:00
|
|
|
|
|
|
|
/// \brief Maintain MPI controller, if any, for distributed operation.
|
|
|
|
///
|
|
|
|
/// `EnvironmentTracker` is a class that provides static API to track the global
|
|
|
|
/// MPI controller to use for operating in a distributed environment.
|
2017-12-14 01:30:04 +00:00
|
|
|
class VTKM_CONT_EXPORT EnvironmentTracker
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
VTKM_CONT
|
2019-02-05 16:02:29 +00:00
|
|
|
static void SetCommunicator(const vtkmdiy::mpi::communicator& comm);
|
2017-12-14 01:30:04 +00:00
|
|
|
|
|
|
|
VTKM_CONT
|
2019-02-05 16:02:29 +00:00
|
|
|
static const vtkmdiy::mpi::communicator& GetCommunicator();
|
2017-12-14 01:30:04 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif // vtk_m_cont_EnvironmentTracker_h
|