forked from AmbaPant/mantid
-
Notifications
You must be signed in to change notification settings - Fork 1
/
StorageMode.h
34 lines (26 loc) · 1.05 KB
/
StorageMode.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// 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 & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include "MantidParallel/DllConfig.h"
#include <map>
#include <stdexcept>
#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);
MANTID_PARALLEL_DLL StorageMode fromString(const std::string &mode);
} // namespace Parallel
} // namespace Mantid