39 #ifndef EXATN_RUNTIME_TENSOR_EXEC_STATE_HPP_
40 #define EXATN_RUNTIME_TENSOR_EXEC_STATE_HPP_
42 #include "tensor_operation.hpp"
45 #include <unordered_map>
54 using VertexIdType = std::size_t;
57 using numerics::TensorHashType;
58 using numerics::Tensor;
59 using numerics::TensorOperation;
67 std::atomic<std::size_t> update_count;
68 std::atomic<int> rw_epoch;
69 std::vector<VertexIdType> rw_epoch_nodes;
96 VertexIdType node_id);
99 VertexIdType node_id);
128 std::unordered_map<TensorHashType,std::shared_ptr<TensorExecInfo>> tensor_info_;
130 std::list<VertexIdType> nodes_ready_;
132 std::list<VertexIdType> nodes_executing_;
134 VertexIdType front_node_;
140 #endif //EXATN_RUNTIME_TENSOR_EXEC_STATE_HPP_
Definition: tensor.hpp:63
std::size_t registerWriteCompletion(const Tensor &tensor)
Definition: tensor_exec_state.cpp:62
int registerTensorWrite(const Tensor &tensor, VertexIdType node_id)
Definition: tensor_exec_state.cpp:44
void registerExecutingNode(VertexIdType node_id)
Definition: tensor_exec_state.cpp:94
bool extractDependencyFreeNode(VertexIdType *node_id)
Definition: tensor_exec_state.cpp:84
VertexIdType getFrontNode() const
Definition: tensor_exec_state.cpp:117
Definition: DriverClient.hpp:10
void registerDependencyFreeNode(VertexIdType node_id)
Definition: tensor_exec_state.cpp:78
const std::vector< VertexIdType > * getTensorEpochNodes(const Tensor &tensor, int *epoch)
Definition: tensor_exec_state.cpp:16
bool extractExecutingNode(VertexIdType *node_id)
Definition: tensor_exec_state.cpp:100
bool progressFrontNode(VertexIdType node_executed)
Definition: tensor_exec_state.cpp:110
std::size_t getTensorUpdateCount(const Tensor &tensor)
Definition: tensor_exec_state.cpp:70
Definition: tensor_exec_state.hpp:66
int registerTensorRead(const Tensor &tensor, VertexIdType node_id)
Definition: tensor_exec_state.cpp:27
Definition: tensor_exec_state.hpp:62