Newer
Older
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
* GroupFunctions.h helper functions for class CGroup
*
* Created on: Oct 27, 2016
* Author: wfg
*/
#ifndef GROUPFUNCTIONS_H_
#define GROUPFUNCTIONS_H_
/// \cond EXCLUDE_FROM_DOXYGEN
#include <string>
#include <map>
#include <memory> //unique_ptr
/// \endcond
#ifdef HAVE_MPI
#include <mpi.h>
#else
#include "public/mpidummy.h"
#endif
#include "core/CVariableBase.h"
namespace adios
{
/**
* Create a language (C++, C, Fortran, etc.) supported type variable and add it to variables map
* @param hostLanguage must be in SSupport::HostLanguages in public/SSupport.h
* @param name name of variable, key in variables map
* @param isGlobal true: global variable defined in XML Config
* @param type variable type, must be in SSupport::Datatypes[hostLanguage] in public/SSupport.h
* @param dimensionsCSV dimensionsCSV comma separated variable dimensions
* @param transform method, format = lib or lib:level, where lib = zlib, bzip2, szip, and level=1:9
* @param variables map belonging to class CGroup
*/
void CreateVariableLanguage( const std::string hostLanguage, const std::string name, const bool isGlobal,
const std::string type, const std::string dimensionsCSV, const std::string transform,
std::map<std::string, std::unique_ptr<CVariableBase> >& variables ) noexcept;
/**
* Create a C++ supported variable, including STL vector types
* @param name name of variable, key in variables map
* @param isGlobal true: global variable defined in XML Config
* @param type variable type, must be in SSupport::Datatypes[hostLanguage] in public/SSupport.h
* @param dimensionsCSV dimensionsCSV comma separated variable dimensions
* @param transform method, format = lib or lib:level, where lib = zlib, bzip2, szip, and level=1:9
* @param variables map belonging to class CGroup
*/
void CreateVariableCpp( const std::string name, const bool isGlobal,
const std::string type, const std::string dimensionsCSV, const std::string transform,
std::map< std::string, std::unique_ptr<CVariableBase> >& variables ) noexcept;
/**
* Create a C supported variable, including STL vector types
* @param name name of variable, key in variables map
* @param isGlobal true: global variable defined in XML Config
* @param type variable type, must be in SSupport::Datatypes[hostLanguage] in public/SSupport.h
* @param dimensionsCSV dimensionsCSV comma separated variable dimensions
* @param transform method, format = lib or lib:level, where lib = zlib, bzip2, szip, and level=1:9
* @param variables map belonging to class CGroup
*/
void CreateVariableC( const std::string name, const bool isGlobal,
const std::string type, const std::string dimensionsCSV, const std::string transform,
std::map< std::string, std::unique_ptr<CVariableBase> >& variables ) noexcept;
/**
* Create a Fortran supported variable, including STL vector types
* @param name name of variable, key in variables map
* @param isGlobal true: global variable defined in XML Config
* @param type variable type, must be in SSupport::Datatypes[hostLanguage] in public/SSupport.h
* @param dimensionsCSV dimensionsCSV comma separated variable dimensions
* @param transform method, format = lib or lib:level, where lib = zlib, bzip2, szip, and level=1:9
* @param variables map belonging to class CGroup
*/
void CreateVariableFortran( const std::string name, const bool isGlobal,
const std::string type, const std::string dimensionsCSV, const std::string transform,
std::map< std::string, std::unique_ptr<CVariableBase> >& variables ) noexcept;
/**
* Create a derived (child) class of CTransport in transport unique_ptr
* @param method supported values in SSupport.h TransportMethods
* @param priority numeric priority for the I/O to schedule this write with others that might be pending
* @param iteration iterations between writes of a group to gauge how quickly this data should be evacuated from the compute node
* @param mpiComm MPI communicator from User->ADIOS->Group
* @param transport passed from CGroup m_Transport member
*/
void CreateTransport( const std::string method, const unsigned int priority, const unsigned int iteration,
const MPI_Comm mpiComm, std::unique_ptr<CTransport>& transport ) noexcept;
} //end namespace
#endif /* GROUPFUNCTIONS_H_ */