YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
physicresource.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_MANAGER_PHYSICRESOURCE
7#define YARP_MANAGER_PHYSICRESOURCE
8
10#include <yarp/manager/node.h>
14
15namespace yarp::manager {
16
17
18class GPU : public GenericResource {
19
20public:
21 GPU();
22 GPU(const char* szName);
23 GPU(const GPU &res);
24 ~GPU() override;
25 Node* clone() override;
26 bool satisfy(GenericResource* resource) override;
27
28 void setCores(size_t n) { cores = n; }
29 void setFrequency(double f) { frequency = f; }
30 void setCompCompatibility(const char* cap) { compCompatibility = cap; }
31 void setGlobalMemory(Capacity c) { globalMemory = c; }
32 void setSharedMemory(Capacity c) { sharedMemory = c; }
33 void setConstantMemory(Capacity c) { constantMemory = c; }
34 void setResgisterPerBlock(size_t val) { registerPerBlock = val; }
35 void setThreadPerBlock(size_t val) { threadPerBlock = val; }
36 void setOverlap(bool flag) { bOverlap = flag;}
37
38 size_t getCores() { return cores; }
39 double getFrequency() { return frequency; }
40 const char* getCompCompatibility() { return compCompatibility.c_str(); }
41 Capacity getGlobalMemory() { return globalMemory; }
42 Capacity getSharedMemory() { return sharedMemory; }
43 Capacity getConstantMemory() { return constantMemory; }
44 size_t getRegisterPerBlock() { return registerPerBlock; }
45 size_t getThreadPerBlock() { return threadPerBlock; }
46 bool getOverlap() { return bOverlap; }
47
48protected:
49
50private:
51 size_t cores;
52 double frequency;
53 std::string compCompatibility;
54 Capacity globalMemory;
55 Capacity sharedMemory;
56 Capacity constantMemory;
57 size_t registerPerBlock;
58 size_t threadPerBlock;
59 bool bOverlap;
60};
61
62} // namespace yarp::manager
63
64
65#endif // __YARP_MANAGER_PHYSICRESOURCE__
void setFrequency(double f)
void setThreadPerBlock(size_t val)
bool satisfy(GenericResource *resource) override
Capacity getGlobalMemory()
void setOverlap(bool flag)
void setCompCompatibility(const char *cap)
Capacity getSharedMemory()
void setConstantMemory(Capacity c)
Capacity getConstantMemory()
Node * clone() override
void setSharedMemory(Capacity c)
void setCores(size_t n)
void setResgisterPerBlock(size_t val)
void setGlobalMemory(Capacity c)
const char * getCompCompatibility()
size_t getRegisterPerBlock()
a Node of a Graph
Definition node.h:64