HTGS  v2.0
The Hybrid Task Graph Scheduler
Types.hpp
Go to the documentation of this file.
1 
2 // NIST-developed software is provided by NIST as a public service. You may use, copy and distribute copies of the software in any medium, provided that you keep intact this entire notice. You may improve, modify and create derivative works of the software or any portion of the software, and you may copy and distribute such modifications or works. Modified works should carry a notice stating that you changed the software and should note the date and nature of any such change. Please explicitly acknowledge the National Institute of Standards and Technology as the source of the software.
3 // NIST-developed software is expressly provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED, IN FACT OR ARISING BY OPERATION OF LAW, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT AND DATA ACCURACY. NIST NEITHER REPRESENTS NOR WARRANTS THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT ANY DEFECTS WILL BE CORRECTED. NIST DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF THE SOFTWARE OR THE RESULTS THEREOF, INCLUDING BUT NOT LIMITED TO THE CORRECTNESS, ACCURACY, RELIABILITY, OR USEFULNESS OF THE SOFTWARE.
4 // You are solely responsible for determining the appropriateness of using and distributing the software and you assume all risks associated with its use, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and the unavailability or interruption of operation. This software is not intended to be used in any situation where a failure could cause risk of injury or damage to property. The software developed by NIST employees is not subject to copyright protection within the United States.
5 
14 #ifndef HTGS_TYPES_HPP
15 #define HTGS_TYPES_HPP
16 
17 #include <vector>
18 #include <unordered_map>
20 #include <htgs/api/IRule.hpp>
21 #include <htgs/api/MemoryData.hpp>
22 #include <map>
23 
27 namespace htgs {
28 
35 template<class T, class U>
36 using IRuleList = std::list<std::shared_ptr<IRule<T, U>>>;
37 
42 typedef std::unordered_map<std::string, std::shared_ptr<AnyConnector>> ConnectorMap;
43 
48 typedef std::pair<std::string, std::shared_ptr<AnyConnector>> ConnectorPair;
49 
54 typedef std::vector<std::shared_ptr<AnyConnector>> ConnectorVector;
55 
63 typedef std::unordered_map<std::string, std::shared_ptr<ConnectorVector>> ConnectorVectorMap;
64 
69 typedef std::pair<std::string, std::shared_ptr<ConnectorVector>> ConnectorVectorPair;
70 
75 typedef std::map<AnyIRule *, std::shared_ptr<AnyIRule>> IRuleMap;
76 
81 typedef std::pair<AnyIRule *, std::shared_ptr<AnyIRule>> IRulePair;
82 
87 typedef std::map<AnyMemoryAllocator *, std::shared_ptr<AnyMemoryAllocator>> MemAllocMap;
88 
93 typedef std::pair<AnyMemoryAllocator *, std::shared_ptr<AnyMemoryAllocator>> MemAllocPair;
94 
100 template<class V>
101 using m_data_t = std::shared_ptr<MemoryData<V>>;
102 
103 }
104 #endif //HTGS_TYPES_HPP
std::vector< std::shared_ptr< AnyConnector > > ConnectorVector
A vector of Connectors.
Definition: Types.hpp:54
std::map< AnyIRule *, std::shared_ptr< AnyIRule > > IRuleMap
Defines a mapping between an IRule pointer and the shared pointer of that IRule.
Definition: Types.hpp:75
Provides an interface to send data along RuleManager edges for processing state and dependencies...
std::unordered_map< std::string, std::shared_ptr< ConnectorVector > > ConnectorVectorMap
An unordered mapping of string names mapping to a pointer to ConnectorVectors.
Definition: Types.hpp:63
Holds parent class for Connector, removes template type of Connector.
std::map< AnyMemoryAllocator *, std::shared_ptr< AnyMemoryAllocator > > MemAllocMap
Defines a mapping between a BaseMemoryAllocator and its shared_ptr.
Definition: Types.hpp:87
std::list< std::shared_ptr< IRule< T, U > >> IRuleList
Stores a list of rules with the specified types.
Definition: Types.hpp:36
std::pair< std::string, std::shared_ptr< AnyConnector > > ConnectorPair
A pair used for the ConnectorMap.
Definition: Types.hpp:48
std::pair< std::string, std::shared_ptr< ConnectorVector > > ConnectorVectorPair
Defines a pair to be added to a ConnectorVectorMap.
Definition: Types.hpp:69
std::unordered_map< std::string, std::shared_ptr< AnyConnector > > ConnectorMap
A mapping between the name of a task and its connector.
Definition: Types.hpp:42
std::pair< AnyMemoryAllocator *, std::shared_ptr< AnyMemoryAllocator > > MemAllocPair
Defines a pair to be added to the MemAllocMap.
Definition: Types.hpp:93
std::pair< AnyIRule *, std::shared_ptr< AnyIRule > > IRulePair
Defines a pair to be added to the IRuleMap.
Definition: Types.hpp:81
Implements MemoryData used by a MemoryManager, which can be shared among multiple ITask...
std::shared_ptr< MemoryData< V > > m_data_t
Defines a shared pointer to htgs::MemoryData.
Definition: Types.hpp:101
Definition: Bookkeeper.hpp:23