StorageMode.h 1.01 KB
Newer Older
1
2
3
4
5
6
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI,
//     NScD Oak Ridge National Laboratory, European Spallation Source
//     & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
7
#pragma once
8
9
10
11

#include "MantidParallel/DllConfig.h"

#include <map>
12
#include <stdexcept>
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <string>

namespace Mantid {
namespace Parallel {

/** Storage mode used for a Workspace in an MPI build.

  Cloned: There is a copy (clone) of the Workspace on each rank.
  Distributed: Each rank holds parts of the Workspace (spectra).
  MasterOnly: The master/root rank has the Workspace.

  @author Simon Heybrock
  @date 2017
*/
enum class StorageMode { Cloned, Distributed, MasterOnly };

MANTID_PARALLEL_DLL std::string toString(StorageMode mode);
MANTID_PARALLEL_DLL std::string
toString(const std::map<std::string, StorageMode> &map);
32
MANTID_PARALLEL_DLL StorageMode fromString(const std::string &mode);
33
34
35

} // namespace Parallel
} // namespace Mantid