A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
ResourceInfo.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* *
3
* Copyright 2018 Rice University *
4
* *
5
* Licensed under the Apache License, Version 2.0 (the "License"); *
6
* you may not use this file except in compliance with the License. *
7
* You may obtain a copy of the License at *
8
* *
9
* http://www.apache.org/licenses/LICENSE-2.0 *
10
* *
11
* Unless required by applicable law or agreed to in writing, software *
12
* distributed under the License is distributed on an "AS IS" BASIS, *
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14
* See the License for the specific language governing permissions and *
15
* limitations under the License. *
16
* *
17
*****************************************************************************/
18
19
#ifndef RESOURCE_INFO_H
20
#define RESOURCE_INFO_H
21
22
#include "
Object.h
"
23
#include "
Handle.h
"
24
#include "
PDBString.h
"
25
#include "
DataTypes.h
"
26
27
// PRELOAD %ResourceInfo%
28
29
namespace
pdb {
30
34
class
ResourceInfo
:
public
Object
{
35
36
public
:
37
ResourceInfo
() {}
38
39
~ResourceInfo
() {}
40
41
ResourceInfo
(
int
numCores
,
int
memSize
, std::string
address
,
int
port
,
int
nodeId
)
42
: numCores(numCores), memSize(memSize), address(address), port(port), nodeId(nodeId) {}
43
44
// To get number of CPUs in this resource
45
int
getNumCores
() {
46
return
this->
numCores
;
47
}
48
49
void
setNumCores
(
int
numCores
) {
50
this->numCores =
numCores
;
51
}
52
53
// To get size of memory in this resource
54
int
getMemSize
() {
55
return
this->
memSize
;
56
}
57
58
void
setMemSize
(
int
memSize
) {
59
this->memSize =
memSize
;
60
}
61
62
63
String
&
getAddress
() {
64
return
address
;
65
}
66
67
void
setAddress
(
pdb::String
&
address
) {
68
this->address =
address
;
69
}
70
71
NodeID
getNodeId
() {
72
return
this->
nodeId
;
73
}
74
75
void
setNodeId
(
NodeID
nodeId
) {
76
this->nodeId =
nodeId
;
77
}
78
79
int
getPort
() {
80
81
return
port
;
82
}
83
84
void
setPort
(
int
port
) {
85
86
this->port =
port
;
87
}
88
89
ENABLE_DEEP_COPY
90
91
private
:
92
// number of CPU cores
93
int
numCores
;
94
95
// size of memory in MB
96
int
memSize
;
97
98
// hostname or IP address of the PDB server
99
String
address
;
100
101
// port of the PDB server
102
int
port
;
103
104
// NodeID of the PDB server
105
NodeID
nodeId
;
106
};
107
}
108
109
#endif
ENABLE_DEEP_COPY
#define ENABLE_DEEP_COPY
Definition:
DeepCopy.h:52
pdb::ResourceInfo::getNumCores
int getNumCores()
Definition:
ResourceInfo.h:45
pdb::ResourceInfo::setAddress
void setAddress(pdb::String &address)
Definition:
ResourceInfo.h:67
pdb::ResourceInfo::ResourceInfo
ResourceInfo(int numCores, int memSize, std::string address, int port, int nodeId)
Definition:
ResourceInfo.h:41
pdb::Object
Definition:
Object.h:42
PDBString.h
Handle.h
pdb::ResourceInfo::memSize
int memSize
Definition:
ResourceInfo.h:96
NodeID
unsigned int NodeID
Definition:
DataTypes.h:27
pdb::ResourceInfo::getAddress
String & getAddress()
Definition:
ResourceInfo.h:63
pdb::ResourceInfo::getNodeId
NodeID getNodeId()
Definition:
ResourceInfo.h:71
pdb::String
Definition:
PDBString.h:43
pdb::ResourceInfo::~ResourceInfo
~ResourceInfo()
Definition:
ResourceInfo.h:39
DataTypes.h
pdb::ResourceInfo::ResourceInfo
ResourceInfo()
Definition:
ResourceInfo.h:37
pdb::ResourceInfo
Definition:
ResourceInfo.h:34
Object.h
pdb::ResourceInfo::setMemSize
void setMemSize(int memSize)
Definition:
ResourceInfo.h:58
pdb::ResourceInfo::setPort
void setPort(int port)
Definition:
ResourceInfo.h:84
pdb::ResourceInfo::numCores
int numCores
Definition:
ResourceInfo.h:93
pdb::ResourceInfo::address
String address
Definition:
ResourceInfo.h:99
pdb::ResourceInfo::port
int port
Definition:
ResourceInfo.h:102
pdb::ResourceInfo::setNumCores
void setNumCores(int numCores)
Definition:
ResourceInfo.h:49
pdb::ResourceInfo::setNodeId
void setNodeId(NodeID nodeId)
Definition:
ResourceInfo.h:75
pdb::ResourceInfo::getMemSize
int getMemSize()
Definition:
ResourceInfo.h:54
pdb::ResourceInfo::getPort
int getPort()
Definition:
ResourceInfo.h:79
pdb::ResourceInfo::nodeId
NodeID nodeId
Definition:
ResourceInfo.h:105
plinycompute
pdb
src
builtInPDBObjects
headers
ResourceInfo.h
Generated on Mon Jun 18 2018 18:10:35 by
1.8.6